diff --git a/API Server/internal/api/logbook.go b/API Server/internal/api/logbook.go new file mode 100644 index 0000000..8958bdd --- /dev/null +++ b/API Server/internal/api/logbook.go @@ -0,0 +1,817 @@ +package api + +import ( + "context" + "encoding/json" + "net/http" + "net/url" + "strings" + "time" +) + +// The logbook models Denmark's BEK nr. 1649 af 12/12/2023 ("Dronebekendtgørelsen") +// § 5 on top of the EU 2019/947 framework. Two collections back it: `drones` +// (airframes + the classification inputs that drive exemption / logging-path +// logic) and `flights` (the log entries). Like user/org management, all access +// flows through the superuser service account; per-role scoping is enforced here +// in Go, and the collections' own API rules stay locked. +// +// Scoping: +// - user → only their own flights; drones in their org (or unowned). +// - admin → all flights + drones in their organization. +// - superadmin → everything. + +// requireUser gates a handler on any authenticated caller (and, like the other +// managed collections, on the service account being configured). The caller is +// stashed on the request context for the handler to read via caller(r). +func (s *Server) requireUser(next http.HandlerFunc) http.HandlerFunc { + return s.requireRole(next, func(c *callerIdentity) bool { return true }, "authentication required") +} + +// --------------------------------------------------------------------------- +// PocketBase record shapes (snake_case, as stored) + client-facing views. +// --------------------------------------------------------------------------- + +type droneRecord struct { + ID string `json:"id"` + Name string `json:"name"` + Model string `json:"model"` + Serial string `json:"serial"` + OperatorNumber string `json:"operator_number"` + MtomGrams float64 `json:"mtom_grams"` + IsToy bool `json:"is_toy"` + AutologsFlights bool `json:"autologs_flights"` + CClass string `json:"c_class"` + Organization string `json:"organization"` + Created string `json:"created"` + Updated string `json:"updated"` +} + +type droneView struct { + ID string `json:"id"` + Name string `json:"name"` + Model string `json:"model"` + Serial string `json:"serial"` + OperatorNumber string `json:"operatorNumber"` + MtomGrams float64 `json:"mtomGrams"` + IsToy bool `json:"isToy"` + AutologsFlights bool `json:"autologsFlights"` + CClass string `json:"cClass"` + Organization string `json:"organization"` + Created string `json:"created"` +} + +func (d droneRecord) view() droneView { + return droneView{ + ID: d.ID, Name: d.Name, Model: d.Model, Serial: d.Serial, + OperatorNumber: d.OperatorNumber, MtomGrams: d.MtomGrams, IsToy: d.IsToy, + AutologsFlights: d.AutologsFlights, CClass: d.CClass, + Organization: d.Organization, Created: d.Created, + } +} + +type flightRecord struct { + ID string `json:"id"` + OperationDate string `json:"operation_date"` + StartTime string `json:"start_time"` + EndTime string `json:"end_time"` + Drone string `json:"drone"` + AreaRoute string `json:"area_route"` + RouteGeoJSON json.RawMessage `json:"route_geojson"` + MaxAltitudeAGL float64 `json:"max_altitude_agl"` + RemotePilot string `json:"remote_pilot"` + PilotName string `json:"pilot_name"` + CertificateRef string `json:"certificate_ref"` + Category string `json:"category"` + Purpose string `json:"purpose"` + LoggingPath string `json:"logging_path"` + RawFDRLogURL string `json:"raw_fdr_log_url"` + AuthorisationRef string `json:"authorisation_ref"` + Weather string `json:"weather"` + AirspaceRef string `json:"airspace_ref"` + Observer string `json:"observer"` + Incidents string `json:"incidents"` + Notes string `json:"notes"` + Organization string `json:"organization"` + RetentionUntil string `json:"retention_until"` + Created string `json:"created"` +} + +type flightView struct { + ID string `json:"id"` + OperationDate string `json:"operationDate"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + Drone string `json:"drone"` + DroneName string `json:"droneName"` + AreaRoute string `json:"areaRoute"` + RouteGeoJSON json.RawMessage `json:"routeGeojson,omitempty"` + MaxAltitudeAGL float64 `json:"maxAltitudeAgl"` + RemotePilot string `json:"remotePilot"` + PilotName string `json:"pilotName"` + CertificateRef string `json:"certificateRef"` + Category string `json:"category"` + Purpose string `json:"purpose"` + LoggingPath string `json:"loggingPath"` + RawFDRLogURL string `json:"rawFdrLogUrl"` + AuthorisationRef string `json:"authorisationRef"` + Weather string `json:"weather"` + AirspaceRef string `json:"airspaceRef"` + Observer string `json:"observer"` + Incidents string `json:"incidents"` + Notes string `json:"notes"` + Organization string `json:"organization"` + RetentionUntil string `json:"retentionUntil"` + Created string `json:"created"` + Compliance compliance `json:"compliance"` +} + +// compliance is the server-computed regulatory assessment for a single flight. +type compliance struct { + Required bool `json:"required"` // does § 5 require a logbook entry? + Exempt bool `json:"exempt"` // exempt from the logbook obligation + ExemptReason string `json:"exemptReason"` // why, when exempt + LoggingPath string `json:"loggingPath"` // automatic | manual + RedFlags []string `json:"redFlags"` // compliance gaps to surface +} + +func (f flightRecord) view(drones map[string]droneRecord) flightView { + var d *droneRecord + if dr, ok := drones[f.Drone]; ok { + d = &dr + } + name := "" + if d != nil { + name = d.Name + } + return flightView{ + ID: f.ID, OperationDate: f.OperationDate, StartTime: f.StartTime, EndTime: f.EndTime, + Drone: f.Drone, DroneName: name, AreaRoute: f.AreaRoute, RouteGeoJSON: f.RouteGeoJSON, + MaxAltitudeAGL: f.MaxAltitudeAGL, RemotePilot: f.RemotePilot, PilotName: f.PilotName, + CertificateRef: f.CertificateRef, Category: f.Category, Purpose: f.Purpose, + LoggingPath: f.LoggingPath, RawFDRLogURL: f.RawFDRLogURL, AuthorisationRef: f.AuthorisationRef, + Weather: f.Weather, AirspaceRef: f.AirspaceRef, Observer: f.Observer, + Incidents: f.Incidents, Notes: f.Notes, Organization: f.Organization, + RetentionUntil: f.RetentionUntil, Created: f.Created, + Compliance: computeCompliance(f, d), + } +} + +// --------------------------------------------------------------------------- +// Compliance logic (BEK 1649 § 5 + the checklist's red flags). +// --------------------------------------------------------------------------- + +// effectiveLoggingPath is the stored path, or — when blank — derived from the +// drone's capability (autologging → automatic, else manual). +func effectiveLoggingPath(f flightRecord, d *droneRecord) string { + if p := strings.TrimSpace(f.LoggingPath); p != "" { + return p + } + if d != nil && d.AutologsFlights { + return "automatic" + } + return "manual" +} + +// manualRequired are the § 5 minimum fields a manual-path entry must carry. +// Returns the human labels of any that are missing. +func missingManualFields(f flightRecord) []string { + var missing []string + if strings.TrimSpace(f.OperationDate) == "" { + missing = append(missing, "operation date") + } + if strings.TrimSpace(f.StartTime) == "" { + missing = append(missing, "start time") + } + if strings.TrimSpace(f.EndTime) == "" { + missing = append(missing, "end time") + } + if strings.TrimSpace(f.Drone) == "" { + missing = append(missing, "drone") + } + if strings.TrimSpace(f.AreaRoute) == "" { + missing = append(missing, "area or route flown") + } + if f.MaxAltitudeAGL <= 0 { + missing = append(missing, "maximum altitude (AGL)") + } + if strings.TrimSpace(f.PilotName) == "" { + missing = append(missing, "remote pilot name") + } + return missing +} + +func computeCompliance(f flightRecord, d *droneRecord) compliance { + c := compliance{RedFlags: []string{}} + + // 1. Exemption (BEK 1649 § 5 scope). + switch { + case d != nil && d.IsToy: + c.Exempt, c.ExemptReason = true, "toy drone" + case f.Purpose == "club_area": + c.Exempt, c.ExemptReason = true, "flown within a model-flying club's designated area" + case d != nil && d.MtomGrams > 0 && d.MtomGrams < 250 && f.Purpose == "hobby": + c.Exempt, c.ExemptReason = true, "private hobby flight under 250 g" + } + c.Required = !c.Exempt + + // 2. Logging path. + c.LoggingPath = effectiveLoggingPath(f, d) + + // 3. Red flags (compliance gaps, not just missing data). + if d != nil && d.AutologsFlights && c.LoggingPath == "automatic" && strings.TrimSpace(f.RawFDRLogURL) == "" { + c.RedFlags = append(c.RedFlags, "Automatic-logging drone but no FDR log stored for this operation") + } + if f.Category == "specific" && strings.TrimSpace(f.AuthorisationRef) == "" { + c.RedFlags = append(c.RedFlags, "Specific-category flight with no linked authorisation reference") + } + if c.Required && c.LoggingPath == "manual" { + for _, m := range missingManualFields(f) { + c.RedFlags = append(c.RedFlags, "Missing § 5 field: "+m) + } + } + if until := parseDay(f.RetentionUntil); !until.IsZero() && time.Now().After(until) { + c.RedFlags = append(c.RedFlags, "Past the 5-year retention window — archive before any cleanup") + } + return c +} + +// parseDay parses the leading YYYY-MM-DD of a PocketBase date string. +func parseDay(s string) time.Time { + if len(s) >= 10 { + if t, err := time.Parse("2006-01-02", s[:10]); err == nil { + return t + } + } + return time.Time{} +} + +// addFiveYears returns operation_date + 5 years as YYYY-MM-DD (the § 5 retention +// boundary, counted from the operation date). "" if the date can't be parsed. +func addFiveYears(dateStr string) string { + t := parseDay(dateStr) + if t.IsZero() { + return "" + } + return t.AddDate(5, 0, 0).Format("2006-01-02") +} + +// --------------------------------------------------------------------------- +// PocketBase helpers. +// --------------------------------------------------------------------------- + +// listRecords fetches a collection's records (up to 500) with an optional filter +// and sort, decoding items into out (a *struct{ Items []T }). +func (s *Server) listRecords(ctx context.Context, collection, filter, sort string, out any) (int, error) { + path := "/api/collections/" + collection + "/records?perPage=500" + if sort != "" { + path += "&sort=" + url.QueryEscape(sort) + } + if filter != "" { + path += "&filter=" + url.QueryEscape(filter) + } + data, status, err := s.admin.do(ctx, http.MethodGet, path, nil) + if err != nil { + return 0, err + } + if status != http.StatusOK { + return status, nil + } + return status, json.Unmarshal(data, out) +} + +// dronesInScope returns an id→record map of the drones the caller may see. +func (s *Server) dronesInScope(ctx context.Context, who *callerIdentity) (map[string]droneRecord, error) { + var list struct { + Items []droneRecord `json:"items"` + } + if _, err := s.listRecords(ctx, "drones", droneScopeFilter(who), "name", &list); err != nil { + return nil, err + } + m := make(map[string]droneRecord, len(list.Items)) + for _, d := range list.Items { + m[d.ID] = d + } + return m, nil +} + +func droneScopeFilter(who *callerIdentity) string { + if who.isSuperadmin() { + return "" + } + if who.OrgID != "" { + return "organization = \"" + who.OrgID + "\" || organization = \"\"" + } + return "organization = \"\"" +} + +func flightScopeFilter(who *callerIdentity) string { + if who.isSuperadmin() { + return "" + } + if who.isManager() && who.OrgID != "" { + return "organization = \"" + who.OrgID + "\"" + } + return "remote_pilot = \"" + who.ID + "\"" +} + +func canManageDrone(who *callerIdentity, d droneRecord) bool { + if who.isSuperadmin() { + return true + } + if who.OrgID != "" { + return d.Organization == who.OrgID + } + return d.Organization == "" +} + +func canManageFlight(who *callerIdentity, f flightRecord) bool { + if who.isSuperadmin() { + return true + } + if who.isManager() && who.OrgID != "" && f.Organization == who.OrgID { + return true + } + return f.RemotePilot == who.ID +} + +// getDrone fetches one drone record by id. +func (s *Server) getDrone(ctx context.Context, id string) (droneRecord, int, error) { + var d droneRecord + data, status, err := s.admin.do(ctx, http.MethodGet, + "/api/collections/drones/records/"+url.PathEscape(id), nil) + if err != nil { + return d, 0, err + } + if status == http.StatusOK { + _ = json.Unmarshal(data, &d) + } + return d, status, nil +} + +// getFlight fetches one flight record by id. +func (s *Server) getFlight(ctx context.Context, id string) (flightRecord, int, error) { + var f flightRecord + data, status, err := s.admin.do(ctx, http.MethodGet, + "/api/collections/flights/records/"+url.PathEscape(id), nil) + if err != nil { + return f, 0, err + } + if status == http.StatusOK { + _ = json.Unmarshal(data, &f) + } + return f, status, nil +} + +// gatewayError relays a PocketBase transport failure. +func gatewayError(w http.ResponseWriter, err error) { + writeJSON(w, http.StatusBadGateway, map[string]any{"error": "cannot reach PocketBase", "detail": err.Error()}) +} + +// --------------------------------------------------------------------------- +// Drones CRUD. +// --------------------------------------------------------------------------- + +// GET /api/drones — list drones in the caller's scope. +func (s *Server) handleListDrones(w http.ResponseWriter, r *http.Request) { + who := caller(r) + m, err := s.dronesInScope(r.Context(), who) + if err != nil { + gatewayError(w, err) + return + } + out := make([]droneView, 0, len(m)) + for _, d := range m { + out = append(out, d.view()) + } + writeJSON(w, http.StatusOK, map[string]any{"drones": out}) +} + +type droneInput struct { + Name string `json:"name"` + Model string `json:"model"` + Serial string `json:"serial"` + OperatorNumber string `json:"operatorNumber"` + MtomGrams float64 `json:"mtomGrams"` + IsToy bool `json:"isToy"` + AutologsFlights bool `json:"autologsFlights"` + CClass string `json:"cClass"` + Organization *string `json:"organization"` // superadmin may target any org +} + +func (in droneInput) payload(who *callerIdentity) map[string]any { + org := who.OrgID + if who.isSuperadmin() && in.Organization != nil { + org = strings.TrimSpace(*in.Organization) + } + return map[string]any{ + "name": strings.TrimSpace(in.Name), + "model": strings.TrimSpace(in.Model), + "serial": strings.TrimSpace(in.Serial), + "operator_number": strings.TrimSpace(in.OperatorNumber), + "mtom_grams": in.MtomGrams, + "is_toy": in.IsToy, + "autologs_flights": in.AutologsFlights, + "c_class": strings.TrimSpace(in.CClass), + "organization": org, + } +} + +// POST /api/drones — register a drone (assigned to the caller's org). +func (s *Server) handleCreateDrone(w http.ResponseWriter, r *http.Request) { + who := caller(r) + var in droneInput + if err := json.NewDecoder(r.Body).Decode(&in); err != nil { + writeError(w, http.StatusBadRequest, "invalid json") + return + } + if strings.TrimSpace(in.Name) == "" { + writeError(w, http.StatusBadRequest, "drone name is required") + return + } + data, status, err := s.admin.do(r.Context(), http.MethodPost, + "/api/collections/drones/records", in.payload(who)) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + relayRaw(w, status, data) + return + } + var d droneRecord + _ = json.Unmarshal(data, &d) + writeJSON(w, http.StatusCreated, map[string]any{"drone": d.view()}) +} + +// PATCH /api/drones/{id} — update a drone (must be in the caller's scope). +func (s *Server) handleUpdateDrone(w http.ResponseWriter, r *http.Request) { + who := caller(r) + id := r.PathValue("id") + existing, status, err := s.getDrone(r.Context(), id) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + writeError(w, http.StatusNotFound, "drone not found") + return + } + if !canManageDrone(who, existing) { + writeError(w, http.StatusForbidden, "you cannot modify this drone") + return + } + var in droneInput + if err := json.NewDecoder(r.Body).Decode(&in); err != nil { + writeError(w, http.StatusBadRequest, "invalid json") + return + } + if strings.TrimSpace(in.Name) == "" { + writeError(w, http.StatusBadRequest, "drone name is required") + return + } + // Preserve org ownership unless a superadmin explicitly retargets it. + payload := in.payload(who) + if !who.isSuperadmin() { + payload["organization"] = existing.Organization + } + data, status, err := s.admin.do(r.Context(), http.MethodPatch, + "/api/collections/drones/records/"+url.PathEscape(id), payload) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + relayRaw(w, status, data) + return + } + var d droneRecord + _ = json.Unmarshal(data, &d) + writeJSON(w, http.StatusOK, map[string]any{"drone": d.view()}) +} + +// DELETE /api/drones/{id} — delete a drone. Refused while flights reference it. +func (s *Server) handleDeleteDrone(w http.ResponseWriter, r *http.Request) { + who := caller(r) + id := r.PathValue("id") + existing, status, err := s.getDrone(r.Context(), id) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + writeError(w, http.StatusNotFound, "drone not found") + return + } + if !canManageDrone(who, existing) { + writeError(w, http.StatusForbidden, "you cannot delete this drone") + return + } + // Guard: don't orphan logbook entries. + var refs struct { + TotalItems int `json:"totalItems"` + } + data, st, err := s.admin.do(r.Context(), http.MethodGet, + "/api/collections/flights/records?perPage=1&fields=id&filter="+ + url.QueryEscape("drone = \""+id+"\""), nil) + if err != nil { + gatewayError(w, err) + return + } + if st == http.StatusOK { + _ = json.Unmarshal(data, &refs) + if refs.TotalItems > 0 { + writeError(w, http.StatusConflict, "drone still has logbook entries; delete or reassign them first") + return + } + } + _, st, err = s.admin.do(r.Context(), http.MethodDelete, + "/api/collections/drones/records/"+url.PathEscape(id), nil) + if err != nil { + gatewayError(w, err) + return + } + if st != http.StatusOK && st != http.StatusNoContent { + writeError(w, http.StatusBadGateway, "could not delete drone") + return + } + writeJSON(w, http.StatusOK, map[string]any{"ok": true}) +} + +// --------------------------------------------------------------------------- +// Flights CRUD. +// --------------------------------------------------------------------------- + +// GET /api/flights — list the caller's in-scope flights (newest first), each +// with its computed compliance assessment. +func (s *Server) handleListFlights(w http.ResponseWriter, r *http.Request) { + who := caller(r) + drones, err := s.dronesInScope(r.Context(), who) + if err != nil { + gatewayError(w, err) + return + } + var list struct { + Items []flightRecord `json:"items"` + } + if _, err := s.listRecords(r.Context(), "flights", flightScopeFilter(who), + "-operation_date,-start_time", &list); err != nil { + gatewayError(w, err) + return + } + out := make([]flightView, 0, len(list.Items)) + for _, f := range list.Items { + out = append(out, f.view(drones)) + } + writeJSON(w, http.StatusOK, map[string]any{"flights": out}) +} + +type flightInput struct { + OperationDate string `json:"operationDate"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + Drone string `json:"drone"` + AreaRoute string `json:"areaRoute"` + RouteGeoJSON json.RawMessage `json:"routeGeojson"` + MaxAltitudeAGL float64 `json:"maxAltitudeAgl"` + RemotePilot string `json:"remotePilot"` // managers may log for another pilot + PilotName string `json:"pilotName"` + CertificateRef string `json:"certificateRef"` + Category string `json:"category"` + Purpose string `json:"purpose"` + LoggingPath string `json:"loggingPath"` + RawFDRLogURL string `json:"rawFdrLogUrl"` + AuthorisationRef string `json:"authorisationRef"` + Weather string `json:"weather"` + AirspaceRef string `json:"airspaceRef"` + Observer string `json:"observer"` + Incidents string `json:"incidents"` + Notes string `json:"notes"` +} + +// asRecord projects the input onto a flightRecord (used for validation before +// persisting). Pilot/org resolution happens in the handler. +func (in flightInput) asRecord() flightRecord { + return flightRecord{ + OperationDate: strings.TrimSpace(in.OperationDate), StartTime: strings.TrimSpace(in.StartTime), + EndTime: strings.TrimSpace(in.EndTime), Drone: strings.TrimSpace(in.Drone), + AreaRoute: strings.TrimSpace(in.AreaRoute), MaxAltitudeAGL: in.MaxAltitudeAGL, + PilotName: strings.TrimSpace(in.PilotName), CertificateRef: strings.TrimSpace(in.CertificateRef), + Category: strings.TrimSpace(in.Category), Purpose: strings.TrimSpace(in.Purpose), + LoggingPath: strings.TrimSpace(in.LoggingPath), RawFDRLogURL: strings.TrimSpace(in.RawFDRLogURL), + AuthorisationRef: strings.TrimSpace(in.AuthorisationRef), + } +} + +func (in flightInput) payload(remotePilot, org, retentionUntil string) map[string]any { + p := map[string]any{ + "operation_date": strings.TrimSpace(in.OperationDate), + "start_time": strings.TrimSpace(in.StartTime), + "end_time": strings.TrimSpace(in.EndTime), + "drone": strings.TrimSpace(in.Drone), + "area_route": strings.TrimSpace(in.AreaRoute), + "max_altitude_agl": in.MaxAltitudeAGL, + "remote_pilot": remotePilot, + "pilot_name": strings.TrimSpace(in.PilotName), + "certificate_ref": strings.TrimSpace(in.CertificateRef), + "category": strings.TrimSpace(in.Category), + "purpose": strings.TrimSpace(in.Purpose), + "logging_path": strings.TrimSpace(in.LoggingPath), + "raw_fdr_log_url": strings.TrimSpace(in.RawFDRLogURL), + "authorisation_ref": strings.TrimSpace(in.AuthorisationRef), + "weather": strings.TrimSpace(in.Weather), + "airspace_ref": strings.TrimSpace(in.AirspaceRef), + "observer": strings.TrimSpace(in.Observer), + "incidents": strings.TrimSpace(in.Incidents), + "notes": strings.TrimSpace(in.Notes), + "organization": org, + "retention_until": retentionUntil, + } + if len(in.RouteGeoJSON) > 0 { + p["route_geojson"] = in.RouteGeoJSON + } + return p +} + +// validateFlight enforces the § 5 minimum for the effective logging path. It +// returns an error message (and false) when a manual-path entry is incomplete — +// callers must block the save rather than store a silent partial record. +func validateFlight(rec flightRecord, d *droneRecord) (string, bool) { + if strings.TrimSpace(rec.OperationDate) == "" { + return "operation date is required", false + } + if strings.TrimSpace(rec.Drone) == "" { + return "a drone must be selected", false + } + if effectiveLoggingPath(rec, d) == "manual" { + if missing := missingManualFields(rec); len(missing) > 0 { + return "manual logbook entry is missing required § 5 field(s): " + strings.Join(missing, ", "), false + } + } + return "", true +} + +// POST /api/flights — create a logbook entry. +func (s *Server) handleCreateFlight(w http.ResponseWriter, r *http.Request) { + who := caller(r) + var in flightInput + if err := json.NewDecoder(r.Body).Decode(&in); err != nil { + writeError(w, http.StatusBadRequest, "invalid json") + return + } + + // Resolve + authorise the drone. + drone, status, err := s.getDrone(r.Context(), strings.TrimSpace(in.Drone)) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + writeError(w, http.StatusBadRequest, "selected drone does not exist") + return + } + if !droneVisibleTo(who, drone) { + writeError(w, http.StatusForbidden, "selected drone is not in your scope") + return + } + + // Pilot: default to the caller; a manager may log on behalf of another pilot. + pilot := who.ID + if who.isManager() && strings.TrimSpace(in.RemotePilot) != "" { + pilot = strings.TrimSpace(in.RemotePilot) + } + if strings.TrimSpace(in.PilotName) == "" { + in.PilotName = who.Email + } + + rec := in.asRecord() + if msg, ok := validateFlight(rec, &drone); !ok { + writeError(w, http.StatusUnprocessableEntity, msg) + return + } + + payload := in.payload(pilot, who.OrgID, addFiveYears(in.OperationDate)) + data, status, err := s.admin.do(r.Context(), http.MethodPost, + "/api/collections/flights/records", payload) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + relayRaw(w, status, data) + return + } + var f flightRecord + _ = json.Unmarshal(data, &f) + writeJSON(w, http.StatusCreated, map[string]any{"flight": f.view(map[string]droneRecord{drone.ID: drone})}) +} + +// PATCH /api/flights/{id} — update a logbook entry. +func (s *Server) handleUpdateFlight(w http.ResponseWriter, r *http.Request) { + who := caller(r) + id := r.PathValue("id") + existing, status, err := s.getFlight(r.Context(), id) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + writeError(w, http.StatusNotFound, "flight not found") + return + } + if !canManageFlight(who, existing) { + writeError(w, http.StatusForbidden, "you cannot modify this flight") + return + } + var in flightInput + if err := json.NewDecoder(r.Body).Decode(&in); err != nil { + writeError(w, http.StatusBadRequest, "invalid json") + return + } + drone, status, err := s.getDrone(r.Context(), strings.TrimSpace(in.Drone)) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + writeError(w, http.StatusBadRequest, "selected drone does not exist") + return + } + if !droneVisibleTo(who, drone) { + writeError(w, http.StatusForbidden, "selected drone is not in your scope") + return + } + if strings.TrimSpace(in.PilotName) == "" { + in.PilotName = existing.PilotName + } + rec := in.asRecord() + if msg, ok := validateFlight(rec, &drone); !ok { + writeError(w, http.StatusUnprocessableEntity, msg) + return + } + // Preserve the original pilot + org; recompute retention from the new date. + payload := in.payload(existing.RemotePilot, existing.Organization, addFiveYears(in.OperationDate)) + data, status, err := s.admin.do(r.Context(), http.MethodPatch, + "/api/collections/flights/records/"+url.PathEscape(id), payload) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + relayRaw(w, status, data) + return + } + var f flightRecord + _ = json.Unmarshal(data, &f) + writeJSON(w, http.StatusOK, map[string]any{"flight": f.view(map[string]droneRecord{drone.ID: drone})}) +} + +// DELETE /api/flights/{id} — delete a logbook entry. +func (s *Server) handleDeleteFlight(w http.ResponseWriter, r *http.Request) { + who := caller(r) + id := r.PathValue("id") + existing, status, err := s.getFlight(r.Context(), id) + if err != nil { + gatewayError(w, err) + return + } + if status != http.StatusOK { + writeError(w, http.StatusNotFound, "flight not found") + return + } + if !canManageFlight(who, existing) { + writeError(w, http.StatusForbidden, "you cannot delete this flight") + return + } + _, st, err := s.admin.do(r.Context(), http.MethodDelete, + "/api/collections/flights/records/"+url.PathEscape(id), nil) + if err != nil { + gatewayError(w, err) + return + } + if st != http.StatusOK && st != http.StatusNoContent { + writeError(w, http.StatusBadGateway, "could not delete flight") + return + } + writeJSON(w, http.StatusOK, map[string]any{"ok": true}) +} + +// droneVisibleTo reports whether the caller may reference this drone on a flight +// (same rule as list scope: in the caller's org, or unowned; superadmin: any). +func droneVisibleTo(who *callerIdentity, d droneRecord) bool { + if who.isSuperadmin() { + return true + } + if who.OrgID != "" { + return d.Organization == who.OrgID || d.Organization == "" + } + return d.Organization == "" +} + +// relayRaw relays a raw upstream body + status (used to surface PocketBase's own +// validation errors verbatim). +func relayRaw(w http.ResponseWriter, status int, data []byte) { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(status) + _, _ = w.Write(data) +} diff --git a/API Server/internal/api/logbook_export.go b/API Server/internal/api/logbook_export.go new file mode 100644 index 0000000..ec09ed6 --- /dev/null +++ b/API Server/internal/api/logbook_export.go @@ -0,0 +1,91 @@ +package api + +import ( + "encoding/csv" + "net/http" + "strconv" + "strings" + "time" +) + +// GET /api/logbook/export — exports the caller's in-scope logbook as CSV. +// +// This is the "readable electronic format" disclosure path required by BEK 1649 +// § 5: retained 5 years and producible on request from Trafikstyrelsen (and, +// under the 2026 hearing draft, the police). CSV is an open format, so it holds +// regardless of whether the source records came from a manual entry or an +// automatic FDR export. +func (s *Server) handleExportLogbook(w http.ResponseWriter, r *http.Request) { + who := caller(r) + drones, err := s.dronesInScope(r.Context(), who) + if err != nil { + gatewayError(w, err) + return + } + var list struct { + Items []flightRecord `json:"items"` + } + if _, err := s.listRecords(r.Context(), "flights", flightScopeFilter(who), + "operation_date,start_time", &list); err != nil { + gatewayError(w, err) + return + } + + filename := "pilotvault-logbook-" + time.Now().Format("2006-01-02") + ".csv" + w.Header().Set("Content-Type", "text/csv; charset=utf-8") + w.Header().Set("Content-Disposition", "attachment; filename=\""+filename+"\"") + w.WriteHeader(http.StatusOK) + + cw := csv.NewWriter(w) + defer cw.Flush() + + _ = cw.Write([]string{ + "operation_date", "start_time", "end_time", + "drone_name", "drone_model", "drone_serial", "operator_number", + "area_or_route", "max_altitude_agl_m", + "remote_pilot", "certificate_ref", + "category", "purpose", "logging_path", "fdr_log_url", "authorisation_ref", + "weather", "airspace_ref", "observer", "incidents", "notes", + "retention_until", "logbook_required", "compliance_flags", + }) + + for _, f := range list.Items { + var d *droneRecord + if dr, ok := drones[f.Drone]; ok { + d = &dr + } + c := computeCompliance(f, d) + droneName, model, serial, opNo := "", "", "", "" + if d != nil { + droneName, model, serial, opNo = d.Name, d.Model, d.Serial, d.OperatorNumber + } + alt := "" + if f.MaxAltitudeAGL > 0 { + alt = strconv.FormatFloat(f.MaxAltitudeAGL, 'f', -1, 64) + } + _ = cw.Write([]string{ + day(f.OperationDate), f.StartTime, f.EndTime, + droneName, model, serial, opNo, + f.AreaRoute, alt, + f.PilotName, f.CertificateRef, + f.Category, f.Purpose, c.LoggingPath, f.RawFDRLogURL, f.AuthorisationRef, + f.Weather, f.AirspaceRef, f.Observer, f.Incidents, f.Notes, + day(f.RetentionUntil), boolText(c.Required), strings.Join(c.RedFlags, "; "), + }) + } +} + +// day trims a PocketBase datetime string to its YYYY-MM-DD date. +func day(s string) string { + if len(s) >= 10 { + return s[:10] + } + return s +} + +func boolText(b bool) string { + if b { + return "yes" + } + return "no" +} diff --git a/API Server/internal/api/server.go b/API Server/internal/api/server.go index e6aa30d..e9b3d59 100644 --- a/API Server/internal/api/server.go +++ b/API Server/internal/api/server.go @@ -140,6 +140,19 @@ func (s *Server) Handler() http.Handler { mux.HandleFunc("DELETE /api/admin/plugins/{name}", s.requireSuperadminAuth(s.handleDeletePlugin)) mux.HandleFunc("POST /api/admin/plugins/{name}/health", s.requireSuperadminAuth(s.handlePluginHealth)) + // Logbook — drones + flights (BEK 1649 §5). Available to any authenticated + // user; per-role scoping (user→own, admin→org, superadmin→all) is enforced + // inside the handlers, so the shared requireUser gate suffices. + mux.HandleFunc("GET /api/drones", s.requireUser(s.handleListDrones)) + mux.HandleFunc("POST /api/drones", s.requireUser(s.handleCreateDrone)) + mux.HandleFunc("PATCH /api/drones/{id}", s.requireUser(s.handleUpdateDrone)) + mux.HandleFunc("DELETE /api/drones/{id}", s.requireUser(s.handleDeleteDrone)) + mux.HandleFunc("GET /api/flights", s.requireUser(s.handleListFlights)) + mux.HandleFunc("POST /api/flights", s.requireUser(s.handleCreateFlight)) + mux.HandleFunc("PATCH /api/flights/{id}", s.requireUser(s.handleUpdateFlight)) + mux.HandleFunc("DELETE /api/flights/{id}", s.requireUser(s.handleDeleteFlight)) + mux.HandleFunc("GET /api/logbook/export", s.requireUser(s.handleExportLogbook)) + // Device / dashboard API. mux.HandleFunc("GET /api/devices", s.handleListDevices) mux.HandleFunc("GET /api/devices/{id}/track", s.handleTrack) diff --git a/API Server/pocketbase/pb_migrations/1720300700_add_logbook.js b/API Server/pocketbase/pb_migrations/1720300700_add_logbook.js new file mode 100644 index 0000000..edec447 --- /dev/null +++ b/API Server/pocketbase/pb_migrations/1720300700_add_logbook.js @@ -0,0 +1,163 @@ +/// + +// Creates the drone-pilot logbook collections: `drones` (the airframes an +// operator flies, carrying the classification inputs that drive exemption / +// logging-path logic) and `flights` (the logbook entries themselves, modelled on +// Denmark's BEK nr. 1649 af 12/12/2023 "Dronebekendtgørelsen" § 5). +// +// Both collections are reached only through the API Server's superuser service +// account (like `organizations` + user management), so their API rules are left +// locked (superusers only); the API Server enforces per-role scoping in Go. +// +// Apply by copying into your PocketBase deployment's `pb_migrations/` directory +// and restarting. Written for PocketBase v0.22+/v0.23. Idempotent: each +// collection is created only if absent, so re-running is a no-op. +// +// Depends on 1720300200_add_organizations.js (organizations) and the `users` +// auth collection. +migrate( + (app) => { + const orgs = app.findCollectionByNameOrId('organizations') + const users = app.findCollectionByNameOrId('users') + + // ---- drones ----------------------------------------------------------- + let drones + try { + drones = app.findCollectionByNameOrId('drones') + } catch (_) { + drones = new Collection({ + type: 'base', + name: 'drones', + fields: [ + { name: 'name', type: 'text', required: true, max: 120, presentable: true }, + { name: 'model', type: 'text', max: 120 }, + { name: 'serial', type: 'text', max: 120 }, + // Trafikstyrelsen operator number displayed on the drone. + { name: 'operator_number', type: 'text', max: 60 }, + // Max take-off mass in grams — drives the < 250 g exemption. + { name: 'mtom_grams', type: 'number', min: 0 }, + { name: 'is_toy', type: 'bool' }, + // Has an onboard flight-data recorder (automatic-logging path). + { name: 'autologs_flights', type: 'bool' }, + // C-class marking: C0..C6 (or blank for legacy/unmarked). + { name: 'c_class', type: 'select', maxSelect: 1, values: ['C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6'] }, + { + name: 'organization', + type: 'relation', + required: false, + collectionId: orgs.id, + cascadeDelete: false, + minSelect: 0, + maxSelect: 1, + presentable: false, + }, + { name: 'created', type: 'autodate', onCreate: true, onUpdate: false }, + { name: 'updated', type: 'autodate', onCreate: true, onUpdate: true }, + ], + indexes: [ + 'CREATE INDEX `idx_drones_org` ON `drones` (`organization`)', + ], + }) + app.save(drones) + drones = app.findCollectionByNameOrId('drones') + } + + // ---- flights ---------------------------------------------------------- + try { + app.findCollectionByNameOrId('flights') + return // already present + } catch (_) { + // create below + } + + const flights = new Collection({ + type: 'base', + name: 'flights', + fields: [ + // -- BEK 1649 § 5 minimum content -- + { name: 'operation_date', type: 'date', required: true }, + { name: 'start_time', type: 'text', max: 5 }, // "HH:MM" + { name: 'end_time', type: 'text', max: 5 }, // "HH:MM" + { + name: 'drone', + type: 'relation', + required: true, + collectionId: drones.id, + cascadeDelete: false, + minSelect: 1, + maxSelect: 1, + presentable: true, + }, + // Area flown or route taken (free text; optional GeoJSON alongside). + { name: 'area_route', type: 'text', max: 500 }, + { name: 'route_geojson', type: 'json', maxSize: 200000 }, + // Maximum altitude relative to terrain, in metres AGL. + { name: 'max_altitude_agl', type: 'number', min: 0 }, + { + name: 'remote_pilot', + type: 'relation', + required: true, + collectionId: users.id, + cascadeDelete: false, + minSelect: 1, + maxSelect: 1, + presentable: false, + }, + // Denormalised pilot name — § 5 requires the remote pilot's *name*, which + // the users relation alone may not carry. + { name: 'pilot_name', type: 'text', max: 160 }, + { name: 'certificate_ref', type: 'text', max: 120 }, + + // -- category / logging path -- + { name: 'category', type: 'select', maxSelect: 1, values: ['open', 'specific', 'certified'] }, + // Declared flight purpose — drives the exemption computation. + { name: 'purpose', type: 'select', maxSelect: 1, values: ['hobby', 'commercial', 'research', 'public', 'club_area'] }, + { name: 'logging_path', type: 'select', maxSelect: 1, values: ['automatic', 'manual'] }, + // Link to the stored FDR export (automatic path). + { name: 'raw_fdr_log_url', type: 'text', max: 500 }, + // Authorisation reference for Specific-category ops (STS/PDRA/SORA). + { name: 'authorisation_ref', type: 'text', max: 200 }, + + // -- operational maturity (beyond the legal minimum) -- + { name: 'weather', type: 'text', max: 300 }, + { name: 'airspace_ref', type: 'text', max: 200 }, + { name: 'observer', type: 'text', max: 160 }, + { name: 'incidents', type: 'text', max: 1000 }, + { name: 'notes', type: 'text', max: 1000 }, + + // -- ownership + retention -- + { + name: 'organization', + type: 'relation', + required: false, + collectionId: orgs.id, + cascadeDelete: false, + minSelect: 0, + maxSelect: 1, + presentable: false, + }, + // 5-year retention boundary — computed as operation_date + 5y at create. + { name: 'retention_until', type: 'date' }, + + { name: 'created', type: 'autodate', onCreate: true, onUpdate: false }, + { name: 'updated', type: 'autodate', onCreate: true, onUpdate: true }, + ], + indexes: [ + 'CREATE INDEX `idx_flights_pilot` ON `flights` (`remote_pilot`)', + 'CREATE INDEX `idx_flights_org` ON `flights` (`organization`)', + 'CREATE INDEX `idx_flights_date` ON `flights` (`operation_date`)', + ], + }) + app.save(flights) + }, + (app) => { + // Down: remove flights first (it references drones), then drones. + for (const name of ['flights', 'drones']) { + try { + app.delete(app.findCollectionByNameOrId(name)) + } catch (_) { + // already gone + } + } + }, +) diff --git a/Web App/server/bff.go b/Web App/server/bff.go index 9ed923a..f820f9a 100644 --- a/Web App/server/bff.go +++ b/Web App/server/bff.go @@ -371,6 +371,100 @@ func (a *App) handleDeleteOrg(w http.ResponseWriter, r *http.Request) { a.doRelay(w, req) } +/* ---------- Logbook: drones ---------- */ + +// GET /bff/drones → API Server /api/drones +func (a *App) handleListDrones(w http.ResponseWriter, r *http.Request) { + req, _ := http.NewRequest(http.MethodGet, a.apiBaseFor(r)+"/api/drones", nil) + req.Header.Set("Authorization", tokenOf(r)) + a.doRelay(w, req) +} + +// POST /bff/drones → API Server /api/drones +func (a *App) handleCreateDrone(w http.ResponseWriter, r *http.Request) { + body, _ := io.ReadAll(r.Body) + req, _ := http.NewRequest(http.MethodPost, a.apiBaseFor(r)+"/api/drones", bytes.NewReader(body)) + req.Header.Set("Authorization", tokenOf(r)) + req.Header.Set("Content-Type", "application/json") + a.doRelay(w, req) +} + +// PATCH /bff/drones/{id} → API Server /api/drones/{id} +func (a *App) handleUpdateDrone(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + body, _ := io.ReadAll(r.Body) + req, _ := http.NewRequest(http.MethodPatch, a.apiBaseFor(r)+"/api/drones/"+url.PathEscape(id), bytes.NewReader(body)) + req.Header.Set("Authorization", tokenOf(r)) + req.Header.Set("Content-Type", "application/json") + a.doRelay(w, req) +} + +// DELETE /bff/drones/{id} → API Server /api/drones/{id} +func (a *App) handleDeleteDrone(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + req, _ := http.NewRequest(http.MethodDelete, a.apiBaseFor(r)+"/api/drones/"+url.PathEscape(id), nil) + req.Header.Set("Authorization", tokenOf(r)) + a.doRelay(w, req) +} + +/* ---------- Logbook: flights ---------- */ + +// GET /bff/flights → API Server /api/flights +func (a *App) handleListFlights(w http.ResponseWriter, r *http.Request) { + req, _ := http.NewRequest(http.MethodGet, a.apiBaseFor(r)+"/api/flights", nil) + req.Header.Set("Authorization", tokenOf(r)) + a.doRelay(w, req) +} + +// POST /bff/flights → API Server /api/flights +func (a *App) handleCreateFlight(w http.ResponseWriter, r *http.Request) { + body, _ := io.ReadAll(r.Body) + req, _ := http.NewRequest(http.MethodPost, a.apiBaseFor(r)+"/api/flights", bytes.NewReader(body)) + req.Header.Set("Authorization", tokenOf(r)) + req.Header.Set("Content-Type", "application/json") + a.doRelay(w, req) +} + +// PATCH /bff/flights/{id} → API Server /api/flights/{id} +func (a *App) handleUpdateFlight(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + body, _ := io.ReadAll(r.Body) + req, _ := http.NewRequest(http.MethodPatch, a.apiBaseFor(r)+"/api/flights/"+url.PathEscape(id), bytes.NewReader(body)) + req.Header.Set("Authorization", tokenOf(r)) + req.Header.Set("Content-Type", "application/json") + a.doRelay(w, req) +} + +// DELETE /bff/flights/{id} → API Server /api/flights/{id} +func (a *App) handleDeleteFlight(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + req, _ := http.NewRequest(http.MethodDelete, a.apiBaseFor(r)+"/api/flights/"+url.PathEscape(id), nil) + req.Header.Set("Authorization", tokenOf(r)) + a.doRelay(w, req) +} + +// GET /bff/logbook/export → API Server /api/logbook/export. Unlike the JSON +// endpoints this streams a CSV download, so it preserves the upstream +// Content-Type + Content-Disposition instead of forcing application/json. +func (a *App) handleExportLogbook(w http.ResponseWriter, r *http.Request) { + req, _ := http.NewRequest(http.MethodGet, a.apiBaseFor(r)+"/api/logbook/export", nil) + req.Header.Set("Authorization", tokenOf(r)) + resp, err := client.Do(req) + if err != nil { + writeJSON(w, http.StatusBadGateway, map[string]any{"error": "cannot reach API server"}) + return + } + defer resp.Body.Close() + if ct := resp.Header.Get("Content-Type"); ct != "" { + w.Header().Set("Content-Type", ct) + } + if cd := resp.Header.Get("Content-Disposition"); cd != "" { + w.Header().Set("Content-Disposition", cd) + } + w.WriteHeader(resp.StatusCode) + _, _ = io.Copy(w, resp.Body) +} + // doRelay executes an outbound request and relays the response verbatim. func (a *App) doRelay(w http.ResponseWriter, req *http.Request) { resp, err := client.Do(req) diff --git a/Web App/server/dist/assets/index-BldP9Pra.js b/Web App/server/dist/assets/index-BldP9Pra.js deleted file mode 100644 index d82de10..0000000 --- a/Web App/server/dist/assets/index-BldP9Pra.js +++ /dev/null @@ -1,20 +0,0 @@ -(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const h of c.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&a(h)}).observe(document,{childList:!0,subtree:!0});function o(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(l){if(l.ep)return;l.ep=!0;const c=o(l);fetch(l.href,c)}})();/** -* @vue/shared v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function va(e){const i=Object.create(null);for(const o of e.split(","))i[o]=1;return o=>o in i}const ie={},_s=[],Zn=()=>{},iu=()=>!1,lr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ur=e=>e.startsWith("onUpdate:"),Ce=Object.assign,ya=(e,i)=>{const o=e.indexOf(i);o>-1&&e.splice(o,1)},Qc=Object.prototype.hasOwnProperty,Xt=(e,i)=>Qc.call(e,i),pt=Array.isArray,vs=e=>po(e)==="[object Map]",Ts=e=>po(e)==="[object Set]",il=e=>po(e)==="[object Date]",Lt=e=>typeof e=="function",pe=e=>typeof e=="string",Ln=e=>typeof e=="symbol",Qt=e=>e!==null&&typeof e=="object",su=e=>(Qt(e)||Lt(e))&&Lt(e.then)&&Lt(e.catch),ou=Object.prototype.toString,po=e=>ou.call(e),td=e=>po(e).slice(8,-1),ru=e=>po(e)==="[object Object]",ba=e=>pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Xs=va(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cr=e=>{const i=Object.create(null);return(o=>i[o]||(i[o]=e(o)))},ed=/-\w/g,Pn=cr(e=>e.replace(ed,i=>i.slice(1).toUpperCase())),nd=/\B([A-Z])/g,Li=cr(e=>e.replace(nd,"-$1").toLowerCase()),au=cr(e=>e.charAt(0).toUpperCase()+e.slice(1)),jr=cr(e=>e?`on${au(e)}`:""),Vn=(e,i)=>!Object.is(e,i),Go=(e,...i)=>{for(let o=0;o{Object.defineProperty(e,i,{configurable:!0,enumerable:!1,writable:a,value:o})},dr=e=>{const i=parseFloat(e);return isNaN(i)?e:i},id=e=>{const i=pe(e)?Number(e):NaN;return isNaN(i)?e:i};let sl;const fr=()=>sl||(sl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ks(e){if(pt(e)){const i={};for(let o=0;o{if(o){const a=o.split(od);a.length>1&&(i[a[0].trim()]=a[1].trim())}}),i}function Ot(e){let i="";if(pe(e))i=e;else if(pt(e))for(let o=0;oSi(o,i))}const cu=e=>!!(e&&e.__v_isRef===!0),M=e=>pe(e)?e:e==null?"":pt(e)||Qt(e)&&(e.toString===ou||!Lt(e.toString))?cu(e)?M(e.value):JSON.stringify(e,du,2):String(e),du=(e,i)=>cu(i)?du(e,i.value):vs(i)?{[`Map(${i.size})`]:[...i.entries()].reduce((o,[a,l],c)=>(o[Wr(a,c)+" =>"]=l,o),{})}:Ts(i)?{[`Set(${i.size})`]:[...i.values()].map(o=>Wr(o))}:Ln(i)?Wr(i):Qt(i)&&!pt(i)&&!ru(i)?String(i):i,Wr=(e,i="")=>{var o;return Ln(e)?`Symbol(${(o=e.description)!=null?o:i})`:e};/** -* @vue/reactivity v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let ze;class dd{constructor(i=!1){this.detached=i,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!i&&ze&&(ze.active?(this.parent=ze,this.index=(ze.scopes||(ze.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let i,o;if(this.scopes)for(i=0,o=this.scopes.length;i0&&--this._on===0){if(ze===this)ze=this.prevScope;else{let i=ze;for(;i;){if(i.prevScope===this){i.prevScope=this.prevScope;break}i=i.prevScope}}this.prevScope=void 0}}stop(i){if(this._active){this._active=!1;let o,a;for(o=0,a=this.effects.length;o0)return;if(to){let i=to;for(to=void 0;i;){const o=i.next;i.next=void 0,i.flags&=-9,i=o}}let e;for(;Qs;){let i=Qs;for(Qs=void 0;i;){const o=i.next;if(i.next=void 0,i.flags&=-9,i.flags&1)try{i.trigger()}catch(a){e||(e=a)}i=o}}if(e)throw e}function mu(e){for(let i=e.deps;i;i=i.nextDep)i.version=-1,i.prevActiveLink=i.dep.activeLink,i.dep.activeLink=i}function gu(e){let i,o=e.depsTail,a=o;for(;a;){const l=a.prevDep;a.version===-1?(a===o&&(o=l),Sa(a),hd(a)):i=a,a.dep.activeLink=a.prevActiveLink,a.prevActiveLink=void 0,a=l}e.deps=i,e.depsTail=o}function ia(e){for(let i=e.deps;i;i=i.nextDep)if(i.dep.version!==i.version||i.dep.computed&&(_u(i.dep.computed)||i.dep.version!==i.version))return!0;return!!e._dirty}function _u(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===oo)||(e.globalVersion=oo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ia(e))))return;e.flags|=2;const i=e.dep,o=re,a=Tn;re=e,Tn=!0;try{mu(e);const l=e.fn(e._value);(i.version===0||Vn(l,e._value))&&(e.flags|=128,e._value=l,i.version++)}catch(l){throw i.version++,l}finally{re=o,Tn=a,gu(e),e.flags&=-3}}function Sa(e,i=!1){const{dep:o,prevSub:a,nextSub:l}=e;if(a&&(a.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=a,e.nextSub=void 0),o.subs===e&&(o.subs=a,!a&&o.computed)){o.computed.flags&=-5;for(let c=o.computed.deps;c;c=c.nextDep)Sa(c,!0)}!i&&!--o.sc&&o.map&&o.map.delete(o.key)}function hd(e){const{prevDep:i,nextDep:o}=e;i&&(i.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=i,e.nextDep=void 0)}let Tn=!0;const vu=[];function $n(){vu.push(Tn),Tn=!1}function Hn(){const e=vu.pop();Tn=e===void 0?!0:e}function ol(e){const{cleanup:i}=e;if(e.cleanup=void 0,i){const o=re;re=void 0;try{i()}finally{re=o}}}let oo=0;class pd{constructor(i,o){this.sub=i,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Pa{constructor(i){this.computed=i,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(i){if(!re||!Tn||re===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==re)o=this.activeLink=new pd(re,this),re.deps?(o.prevDep=re.depsTail,re.depsTail.nextDep=o,re.depsTail=o):re.deps=re.depsTail=o,yu(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){const a=o.nextDep;a.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=a),o.prevDep=re.depsTail,o.nextDep=void 0,re.depsTail.nextDep=o,re.depsTail=o,re.deps===o&&(re.deps=a)}return o}trigger(i){this.version++,oo++,this.notify(i)}notify(i){wa();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{ka()}}}function yu(e){if(e.dep.sc++,e.sub.flags&4){const i=e.dep.computed;if(i&&!e.dep.subs){i.flags|=20;for(let a=i.deps;a;a=a.nextDep)yu(a)}const o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}const sa=new WeakMap,Ki=Symbol(""),oa=Symbol(""),ro=Symbol("");function Ne(e,i,o){if(Tn&&re){let a=sa.get(e);a||sa.set(e,a=new Map);let l=a.get(o);l||(a.set(o,l=new Pa),l.map=a,l.key=o),l.track()}}function si(e,i,o,a,l,c){const h=sa.get(e);if(!h){oo++;return}const g=v=>{v&&v.trigger()};if(wa(),i==="clear")h.forEach(g);else{const v=pt(e),P=v&&ba(o);if(v&&o==="length"){const k=Number(a);h.forEach((O,$)=>{($==="length"||$===ro||!Ln($)&&$>=k)&&g(O)})}else switch((o!==void 0||h.has(void 0))&&g(h.get(o)),P&&g(h.get(ro)),i){case"add":v?P&&g(h.get("length")):(g(h.get(Ki)),vs(e)&&g(h.get(oa)));break;case"delete":v||(g(h.get(Ki)),vs(e)&&g(h.get(oa)));break;case"set":vs(e)&&g(h.get(Ki));break}}ka()}function ms(e){const i=Gt(e);return i===e?i:(Ne(i,"iterate",ro),hn(e)?i:i.map(Mn))}function hr(e){return Ne(e=Gt(e),"iterate",ro),e}function Rn(e,i){return ai(e)?Ss(qi(e)?Mn(i):i):Mn(i)}const md={__proto__:null,[Symbol.iterator](){return qr(this,Symbol.iterator,e=>Rn(this,e))},concat(...e){return ms(this).concat(...e.map(i=>pt(i)?ms(i):i))},entries(){return qr(this,"entries",e=>(e[1]=Rn(this,e[1]),e))},every(e,i){return ti(this,"every",e,i,void 0,arguments)},filter(e,i){return ti(this,"filter",e,i,o=>o.map(a=>Rn(this,a)),arguments)},find(e,i){return ti(this,"find",e,i,o=>Rn(this,o),arguments)},findIndex(e,i){return ti(this,"findIndex",e,i,void 0,arguments)},findLast(e,i){return ti(this,"findLast",e,i,o=>Rn(this,o),arguments)},findLastIndex(e,i){return ti(this,"findLastIndex",e,i,void 0,arguments)},forEach(e,i){return ti(this,"forEach",e,i,void 0,arguments)},includes(...e){return Gr(this,"includes",e)},indexOf(...e){return Gr(this,"indexOf",e)},join(e){return ms(this).join(e)},lastIndexOf(...e){return Gr(this,"lastIndexOf",e)},map(e,i){return ti(this,"map",e,i,void 0,arguments)},pop(){return js(this,"pop")},push(...e){return js(this,"push",e)},reduce(e,...i){return rl(this,"reduce",e,i)},reduceRight(e,...i){return rl(this,"reduceRight",e,i)},shift(){return js(this,"shift")},some(e,i){return ti(this,"some",e,i,void 0,arguments)},splice(...e){return js(this,"splice",e)},toReversed(){return ms(this).toReversed()},toSorted(e){return ms(this).toSorted(e)},toSpliced(...e){return ms(this).toSpliced(...e)},unshift(...e){return js(this,"unshift",e)},values(){return qr(this,"values",e=>Rn(this,e))}};function qr(e,i,o){const a=hr(e),l=a[i]();return a!==e&&!hn(e)&&(l._next=l.next,l.next=()=>{const c=l._next();return c.done||(c.value=o(c.value)),c}),l}const gd=Array.prototype;function ti(e,i,o,a,l,c){const h=hr(e),g=h!==e&&!hn(e),v=h[i];if(v!==gd[i]){const O=v.apply(e,c);return g?Mn(O):O}let P=o;h!==e&&(g?P=function(O,$){return o.call(this,Rn(e,O),$,e)}:o.length>2&&(P=function(O,$){return o.call(this,O,$,e)}));const k=v.call(h,P,a);return g&&l?l(k):k}function rl(e,i,o,a){const l=hr(e),c=l!==e&&!hn(e);let h=o,g=!1;l!==e&&(c?(g=a.length===0,h=function(P,k,O){return g&&(g=!1,P=Rn(e,P)),o.call(this,P,Rn(e,k),O,e)}):o.length>3&&(h=function(P,k,O){return o.call(this,P,k,O,e)}));const v=l[i](h,...a);return g?Rn(e,v):v}function Gr(e,i,o){const a=Gt(e);Ne(a,"iterate",ro);const l=a[i](...o);return(l===-1||l===!1)&&Ma(o[0])?(o[0]=Gt(o[0]),a[i](...o)):l}function js(e,i,o=[]){$n(),wa();const a=Gt(e)[i].apply(e,o);return ka(),Hn(),a}const _d=va("__proto__,__v_isRef,__isVue"),bu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ln));function vd(e){Ln(e)||(e=String(e));const i=Gt(this);return Ne(i,"has",e),i.hasOwnProperty(e)}class xu{constructor(i=!1,o=!1){this._isReadonly=i,this._isShallow=o}get(i,o,a){if(o==="__v_skip")return i.__v_skip;const l=this._isReadonly,c=this._isShallow;if(o==="__v_isReactive")return!l;if(o==="__v_isReadonly")return l;if(o==="__v_isShallow")return c;if(o==="__v_raw")return a===(l?c?Md:Pu:c?Su:ku).get(i)||Object.getPrototypeOf(i)===Object.getPrototypeOf(a)?i:void 0;const h=pt(i);if(!l){let v;if(h&&(v=md[o]))return v;if(o==="hasOwnProperty")return vd}const g=Reflect.get(i,o,Re(i)?i:a);if((Ln(o)?bu.has(o):_d(o))||(l||Ne(i,"get",o),c))return g;if(Re(g)){const v=h&&ba(o)?g:g.value;return l&&Qt(v)?aa(v):v}return Qt(g)?l?aa(g):xe(g):g}}class wu extends xu{constructor(i=!1){super(!1,i)}set(i,o,a,l){let c=i[o];const h=pt(i)&&ba(o);if(!this._isShallow){const P=ai(c);if(!hn(a)&&!ai(a)&&(c=Gt(c),a=Gt(a)),!h&&Re(c)&&!Re(a))return P||(c.value=a),!0}const g=h?Number(o)e,Ho=e=>Reflect.getPrototypeOf(e);function kd(e,i,o){return function(...a){const l=this.__v_raw,c=Gt(l),h=vs(c),g=e==="entries"||e===Symbol.iterator&&h,v=e==="keys"&&h,P=l[e](...a),k=o?ra:i?Ss:Mn;return!i&&Ne(c,"iterate",v?oa:Ki),Ce(Object.create(P),{next(){const{value:O,done:$}=P.next();return $?{value:O,done:$}:{value:g?[k(O[0]),k(O[1])]:k(O),done:$}}})}}function Uo(e){return function(...i){return e==="delete"?!1:e==="clear"?void 0:this}}function Sd(e,i){const o={get(l){const c=this.__v_raw,h=Gt(c),g=Gt(l);e||(Vn(l,g)&&Ne(h,"get",l),Ne(h,"get",g));const{has:v}=Ho(h),P=i?ra:e?Ss:Mn;if(v.call(h,l))return P(c.get(l));if(v.call(h,g))return P(c.get(g));c!==h&&c.get(l)},get size(){const l=this.__v_raw;return!e&&Ne(Gt(l),"iterate",Ki),l.size},has(l){const c=this.__v_raw,h=Gt(c),g=Gt(l);return e||(Vn(l,g)&&Ne(h,"has",l),Ne(h,"has",g)),l===g?c.has(l):c.has(l)||c.has(g)},forEach(l,c){const h=this,g=h.__v_raw,v=Gt(g),P=i?ra:e?Ss:Mn;return!e&&Ne(v,"iterate",Ki),g.forEach((k,O)=>l.call(c,P(k),P(O),h))}};return Ce(o,e?{add:Uo("add"),set:Uo("set"),delete:Uo("delete"),clear:Uo("clear")}:{add(l){const c=Gt(this),h=Ho(c),g=Gt(l),v=!i&&!hn(l)&&!ai(l)?g:l;return h.has.call(c,v)||Vn(l,v)&&h.has.call(c,l)||Vn(g,v)&&h.has.call(c,g)||(c.add(v),si(c,"add",v,v)),this},set(l,c){!i&&!hn(c)&&!ai(c)&&(c=Gt(c));const h=Gt(this),{has:g,get:v}=Ho(h);let P=g.call(h,l);P||(l=Gt(l),P=g.call(h,l));const k=v.call(h,l);return h.set(l,c),P?Vn(c,k)&&si(h,"set",l,c):si(h,"add",l,c),this},delete(l){const c=Gt(this),{has:h,get:g}=Ho(c);let v=h.call(c,l);v||(l=Gt(l),v=h.call(c,l)),g&&g.call(c,l);const P=c.delete(l);return v&&si(c,"delete",l,void 0),P},clear(){const l=Gt(this),c=l.size!==0,h=l.clear();return c&&si(l,"clear",void 0,void 0),h}}),["keys","values","entries",Symbol.iterator].forEach(l=>{o[l]=kd(l,e,i)}),o}function Ta(e,i){const o=Sd(e,i);return(a,l,c)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_raw"?a:Reflect.get(Xt(o,l)&&l in a?o:a,l,c)}const Pd={get:Ta(!1,!1)},Td={get:Ta(!1,!0)},Ld={get:Ta(!0,!1)};const ku=new WeakMap,Su=new WeakMap,Pu=new WeakMap,Md=new WeakMap;function Cd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xe(e){return ai(e)?e:La(e,!1,bd,Pd,ku)}function Od(e){return La(e,!1,wd,Td,Su)}function aa(e){return La(e,!0,xd,Ld,Pu)}function La(e,i,o,a,l){if(!Qt(e)||e.__v_raw&&!(i&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const c=l.get(e);if(c)return c;const h=Cd(td(e));if(h===0)return e;const g=new Proxy(e,h===2?a:o);return l.set(e,g),g}function qi(e){return ai(e)?qi(e.__v_raw):!!(e&&e.__v_isReactive)}function ai(e){return!!(e&&e.__v_isReadonly)}function hn(e){return!!(e&&e.__v_isShallow)}function Ma(e){return e?!!e.__v_raw:!1}function Gt(e){const i=e&&e.__v_raw;return i?Gt(i):e}function Ed(e){return!Xt(e,"__v_skip")&&Object.isExtensible(e)&&lu(e,"__v_skip",!0),e}const Mn=e=>Qt(e)?xe(e):e,Ss=e=>Qt(e)?aa(e):e;function Re(e){return e?e.__v_isRef===!0:!1}function J(e){return zd(e,!1)}function zd(e,i){return Re(e)?e:new Ad(e,i)}class Ad{constructor(i,o){this.dep=new Pa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?i:Gt(i),this._value=o?i:Mn(i),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(i){const o=this._rawValue,a=this.__v_isShallow||hn(i)||ai(i);i=a?i:Gt(i),Vn(i,o)&&(this._rawValue=i,this._value=a?i:Mn(i),this.dep.trigger())}}function Ct(e){return Re(e)?e.value:e}const Id={get:(e,i,o)=>i==="__v_raw"?e:Ct(Reflect.get(e,i,o)),set:(e,i,o,a)=>{const l=e[i];return Re(l)&&!Re(o)?(l.value=o,!0):Reflect.set(e,i,o,a)}};function Tu(e){return qi(e)?e:new Proxy(e,Id)}class Nd{constructor(i,o,a){this.fn=i,this.setter=o,this._value=void 0,this.dep=new Pa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=oo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=a}notify(){if(this.flags|=16,!(this.flags&8)&&re!==this)return pu(this,!0),!0}get value(){const i=this.dep.track();return _u(this),i&&(i.version=this.dep.version),this._value}set value(i){this.setter&&this.setter(i)}}function Bd(e,i,o=!1){let a,l;return Lt(e)?a=e:(a=e.get,l=e.set),new Nd(a,l,o)}const jo={},Jo=new WeakMap;let ji;function Dd(e,i=!1,o=ji){if(o){let a=Jo.get(o);a||Jo.set(o,a=[]),a.push(e)}}function Rd(e,i,o=ie){const{immediate:a,deep:l,once:c,scheduler:h,augmentJob:g,call:v}=o,P=X=>l?X:hn(X)||l===!1||l===0?oi(X,1):oi(X);let k,O,$,F,nt=!1,q=!1;if(Re(e)?(O=()=>e.value,nt=hn(e)):qi(e)?(O=()=>P(e),nt=!0):pt(e)?(q=!0,nt=e.some(X=>qi(X)||hn(X)),O=()=>e.map(X=>{if(Re(X))return X.value;if(qi(X))return P(X);if(Lt(X))return v?v(X,2):X()})):Lt(e)?i?O=v?()=>v(e,2):e:O=()=>{if($){$n();try{$()}finally{Hn()}}const X=ji;ji=k;try{return v?v(e,3,[F]):e(F)}finally{ji=X}}:O=Zn,i&&l){const X=O,ft=l===!0?1/0:l;O=()=>oi(X(),ft)}const At=fd(),Dt=()=>{k.stop(),At&&At.active&&ya(At.effects,k)};if(c&&i){const X=i;i=(...ft)=>{const jt=X(...ft);return Dt(),jt}}let bt=q?new Array(e.length).fill(jo):jo;const ut=X=>{if(!(!(k.flags&1)||!k.dirty&&!X))if(i){const ft=k.run();if(X||l||nt||(q?ft.some((jt,de)=>Vn(jt,bt[de])):Vn(ft,bt))){$&&$();const jt=ji;ji=k;try{const de=[ft,bt===jo?void 0:q&&bt[0]===jo?[]:bt,F];bt=ft,v?v(i,3,de):i(...de)}finally{ji=jt}}}else k.run()};return g&&g(ut),k=new fu(O),k.scheduler=h?()=>h(ut,!1):ut,F=X=>Dd(X,!1,k),$=k.onStop=()=>{const X=Jo.get(k);if(X){if(v)v(X,4);else for(const ft of X)ft();Jo.delete(k)}},i?a?ut(!0):bt=k.run():h?h(ut.bind(null,!0),!0):k.run(),Dt.pause=k.pause.bind(k),Dt.resume=k.resume.bind(k),Dt.stop=Dt,Dt}function oi(e,i=1/0,o){if(i<=0||!Qt(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=i))return e;if(o.set(e,i),i--,Re(e))oi(e.value,i,o);else if(pt(e))for(let a=0;a{oi(a,i,o)});else if(ru(e)){for(const a in e)oi(e[a],i,o);for(const a of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,a)&&oi(e[a],i,o)}return e}/** -* @vue/runtime-core v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function mo(e,i,o,a){try{return a?e(...a):e()}catch(l){pr(l,i,o)}}function mn(e,i,o,a){if(Lt(e)){const l=mo(e,i,o,a);return l&&su(l)&&l.catch(c=>{pr(c,i,o)}),l}if(pt(e)){const l=[];for(let c=0;c>>1,l=je[a],c=ao(l);c=ao(o)?je.push(e):je.splice(Vd(i),0,e),e.flags|=1,Cu()}}function Cu(){Xo||(Xo=Lu.then(Eu))}function Zd(e){pt(e)?ys.push(...e):ki&&e.id===-1?ki.splice(gs+1,0,e):e.flags&1||(ys.push(e),e.flags|=1),Cu()}function al(e,i,o=Dn+1){for(;oao(o)-ao(a));if(ys.length=0,ki){ki.push(...i);return}for(ki=i,gs=0;gse.id==null?e.flags&2?-1:1/0:e.id;function Eu(e){try{for(Dn=0;Dn{a._d&&nr(-1);const c=Qo(i);let h;try{h=e(...l)}finally{Qo(c),a._d&&nr(1)}return h};return a._n=!0,a._c=!0,a._d=!0,a}function xt(e,i){if(De===null)return e;const o=br(De),a=e.dirs||(e.dirs=[]);for(let l=0;l1)return o&&Lt(i)?i.call(a&&a.proxy):i}}const $d=Symbol.for("v-scx"),Hd=()=>eo($d);function Je(e,i,o){return Iu(e,i,o)}function Iu(e,i,o=ie){const{immediate:a,deep:l,flush:c,once:h}=o,g=Ce({},o),v=i&&a||!i&&c!=="post";let P;if(fo){if(c==="sync"){const F=Hd();P=F.__watcherHandles||(F.__watcherHandles=[])}else if(!v){const F=()=>{};return F.stop=Zn,F.resume=Zn,F.pause=Zn,F}}const k=We;g.call=(F,nt,q)=>mn(F,k,nt,q);let O=!1;c==="post"?g.scheduler=F=>{Ye(F,k&&k.suspense)}:c!=="sync"&&(O=!0,g.scheduler=(F,nt)=>{nt?F():Ca(F)}),g.augmentJob=F=>{i&&(F.flags|=4),O&&(F.flags|=2,k&&(F.id=k.uid,F.i=k))};const $=Rd(e,i,g);return fo&&(P?P.push($):v&&$()),$}function Ud(e,i,o){const a=this.proxy,l=pe(e)?e.includes(".")?Nu(a,e):()=>a[e]:e.bind(a,a);let c;Lt(i)?c=i:(c=i.handler,o=i);const h=go(this),g=Iu(l,c.bind(a),o);return h(),g}function Nu(e,i){const o=i.split(".");return()=>{let a=e;for(let l=0;le.__isTeleport,fn=Symbol("_leaveCb"),Ws=Symbol("_enterCb");function Wd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ls(()=>{e.isMounted=!0}),_r(()=>{e.isUnmounting=!0}),e}const cn=[Function,Array],Du={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:cn,onEnter:cn,onAfterEnter:cn,onEnterCancelled:cn,onBeforeLeave:cn,onLeave:cn,onAfterLeave:cn,onLeaveCancelled:cn,onBeforeAppear:cn,onAppear:cn,onAfterAppear:cn,onAppearCancelled:cn},Ru=e=>{const i=e.subTree;return i.component?Ru(i.component):i},Kd={name:"BaseTransition",props:Du,setup(e,{slots:i}){const o=dc(),a=Wd();return()=>{const l=i.default&&Zu(i.default(),!0),c=l&&l.length?Fu(l):o.subTree?V():void 0;if(!c)return;const h=Gt(e),{mode:g}=h;if(a.isLeaving)return Yr(c);const v=ll(c);if(!v)return Yr(c);let P=la(v,h,a,o,O=>P=O);v.type!==Be&&lo(v,P);let k=o.subTree&&ll(o.subTree);if(k&&k.type!==Be&&!Wi(k,v)&&Ru(o).type!==Be){let O=la(k,h,a,o);if(lo(k,O),g==="out-in"&&v.type!==Be)return a.isLeaving=!0,O.afterLeave=()=>{a.isLeaving=!1,o.job.flags&8||o.update(),delete O.afterLeave,k=void 0},Yr(c);g==="in-out"&&v.type!==Be?O.delayLeave=($,F,nt)=>{const q=Vu(a,k);q[String(k.key)]=k,$[fn]=()=>{F(),$[fn]=void 0,delete P.delayedLeave,k=void 0},P.delayedLeave=()=>{nt(),delete P.delayedLeave,k=void 0}}:k=void 0}else k&&(k=void 0);return c}}};function Fu(e){let i=e[0];if(e.length>1){for(const o of e)if(o.type!==Be){i=o;break}}return i}const qd=Kd;function Vu(e,i){const{leavingVNodes:o}=e;let a=o.get(i.type);return a||(a=Object.create(null),o.set(i.type,a)),a}function la(e,i,o,a,l){const{appear:c,mode:h,persisted:g=!1,onBeforeEnter:v,onEnter:P,onAfterEnter:k,onEnterCancelled:O,onBeforeLeave:$,onLeave:F,onAfterLeave:nt,onLeaveCancelled:q,onBeforeAppear:At,onAppear:Dt,onAfterAppear:bt,onAppearCancelled:ut}=i,X=String(e.key),ft=Vu(o,e),jt=(vt,Ft)=>{vt&&mn(vt,a,9,Ft)},de=(vt,Ft)=>{const Tt=Ft[1];jt(vt,Ft),pt(vt)?vt.every(G=>G.length<=1)&&Tt():vt.length<=1&&Tt()},me={mode:h,persisted:g,beforeEnter(vt){let Ft=v;if(!o.isMounted)if(c)Ft=At||v;else return;vt[fn]&&vt[fn](!0);const Tt=ft[X];Tt&&Wi(e,Tt)&&Tt.el[fn]&&Tt.el[fn](),jt(Ft,[vt])},enter(vt){if(ft[X]===e)return;let Ft=P,Tt=k,G=O;if(!o.isMounted)if(c)Ft=Dt||P,Tt=bt||k,G=ut||O;else return;let st=!1;vt[Ws]=Wt=>{st||(st=!0,Wt?jt(G,[vt]):jt(Tt,[vt]),me.delayedLeave&&me.delayedLeave(),vt[Ws]=void 0)};const It=vt[Ws].bind(null,!1);Ft?de(Ft,[vt,It]):It()},leave(vt,Ft){const Tt=String(e.key);if(vt[Ws]&&vt[Ws](!0),o.isUnmounting)return Ft();jt($,[vt]);let G=!1;vt[fn]=It=>{G||(G=!0,Ft(),It?jt(q,[vt]):jt(nt,[vt]),vt[fn]=void 0,ft[Tt]===e&&delete ft[Tt])};const st=vt[fn].bind(null,!1);ft[Tt]=e,F?de(F,[vt,st]):st()},clone(vt){const Ft=la(vt,i,o,a,l);return l&&l(Ft),Ft}};return me}function Yr(e){if(mr(e))return e=Pi(e),e.children=null,e}function ll(e){if(!mr(e))return Bu(e.type)&&e.children?Fu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:i,children:o}=e;if(o){if(i&16)return o[0];if(i&32&&Lt(o.default))return o.default()}}function lo(e,i){e.shapeFlag&6&&e.component?(e.transition=i,lo(e.component.subTree,i)):e.shapeFlag&128?(e.ssContent.transition=i.clone(e.ssContent),e.ssFallback.transition=i.clone(e.ssFallback)):e.transition=i}function Zu(e,i=!1,o){let a=[],l=0;for(let c=0;c1)for(let c=0;cno(q,i&&(pt(i)?i[At]:i),o,a,l));return}if(bs(a)&&!l){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&no(e,i,o,a.component.subTree);return}const c=a.shapeFlag&4?br(a.component):a.el,h=l?null:c,{i:g,r:v}=e,P=i&&i.r,k=g.refs===ie?g.refs={}:g.refs,O=g.setupState,$=Gt(O),F=O===ie?iu:q=>ul(k,q)?!1:Xt($,q),nt=(q,At)=>!(At&&ul(k,At));if(P!=null&&P!==v){if(cl(i),pe(P))k[P]=null,F(P)&&(O[P]=null);else if(Re(P)){const q=i;nt(P,q.k)&&(P.value=null),q.k&&(k[q.k]=null)}}if(Lt(v)){$n();try{mo(v,g,12,[h,k])}finally{Hn()}}else{const q=pe(v),At=Re(v);if(q||At){const Dt=()=>{if(e.f){const bt=q?F(v)?O[v]:k[v]:nt()||!e.k?v.value:k[e.k];if(l)pt(bt)&&ya(bt,c);else if(pt(bt))bt.includes(c)||bt.push(c);else if(q)k[v]=[c],F(v)&&(O[v]=k[v]);else{const ut=[c];nt(v,e.k)&&(v.value=ut),e.k&&(k[e.k]=ut)}}else q?(k[v]=h,F(v)&&(O[v]=h)):At&&(nt(v,e.k)&&(v.value=h),e.k&&(k[e.k]=h))};if(h){const bt=()=>{Dt(),tr.delete(e)};bt.id=-1,tr.set(e,bt),Ye(bt,o)}else cl(e),Dt()}}}function cl(e){const i=tr.get(e);i&&(i.flags|=8,tr.delete(e))}fr().requestIdleCallback;fr().cancelIdleCallback;const bs=e=>!!e.type.__asyncLoader,mr=e=>e.type.__isKeepAlive;function Gd(e,i){Hu(e,"a",i)}function Yd(e,i){Hu(e,"da",i)}function Hu(e,i,o=We){const a=e.__wdc||(e.__wdc=()=>{let l=o;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(gr(i,a,o),o){let l=o.parent;for(;l&&l.parent;)mr(l.parent.vnode)&&Jd(a,i,o,l),l=l.parent}}function Jd(e,i,o,a){const l=gr(i,e,a,!0);Uu(()=>{ya(a[i],l)},o)}function gr(e,i,o=We,a=!1){if(o){const l=o[e]||(o[e]=[]),c=i.__weh||(i.__weh=(...h)=>{$n();const g=go(o),v=mn(i,o,e,h);return g(),Hn(),v});return a?l.unshift(c):l.push(c),c}}const li=e=>(i,o=We)=>{(!fo||e==="sp")&&gr(e,(...a)=>i(...a),o)},Xd=li("bm"),Ls=li("m"),Qd=li("bu"),tf=li("u"),_r=li("bum"),Uu=li("um"),ef=li("sp"),nf=li("rtg"),sf=li("rtc");function of(e,i=We){gr("ec",e,i)}const rf=Symbol.for("v-ndc");function ce(e,i,o,a){let l;const c=o,h=pt(e);if(h||pe(e)){const g=h&&qi(e);let v=!1,P=!1;g&&(v=!hn(e),P=ai(e),e=hr(e)),l=new Array(e.length);for(let k=0,O=e.length;ki(g,v,void 0,c));else{const g=Object.keys(e);l=new Array(g.length);for(let v=0,P=g.length;v0;return b(),oe(wt,null,[E("slot",o,a)],P?-2:64)}let c=e[i];c&&c._c&&(c._d=!1),b();const h=c&&ju(c(o)),g=o.key||h&&h.key,v=oe(wt,{key:(g&&!Ln(g)?g:`_${i}`)+(!h&&a?"_fb":"")},h||[],h&&e._===1?64:-2);return v.scopeId&&(v.slotScopeIds=[v.scopeId+"-s"]),c&&c._c&&(c._d=!0),v}function ju(e){return e.some(i=>co(i)?!(i.type===Be||i.type===wt&&!ju(i.children)):!0)?e:null}const ua=e=>e?fc(e)?br(e):ua(e.parent):null,io=Ce(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ua(e.parent),$root:e=>ua(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ku(e),$forceUpdate:e=>e.f||(e.f=()=>{Ca(e.update)}),$nextTick:e=>e.n||(e.n=Mu.bind(e.proxy)),$watch:e=>Ud.bind(e)}),Jr=(e,i)=>e!==ie&&!e.__isScriptSetup&&Xt(e,i),lf={get({_:e},i){if(i==="__v_skip")return!0;const{ctx:o,setupState:a,data:l,props:c,accessCache:h,type:g,appContext:v}=e;if(i[0]!=="$"){const $=h[i];if($!==void 0)switch($){case 1:return a[i];case 2:return l[i];case 4:return o[i];case 3:return c[i]}else{if(Jr(a,i))return h[i]=1,a[i];if(l!==ie&&Xt(l,i))return h[i]=2,l[i];if(Xt(c,i))return h[i]=3,c[i];if(o!==ie&&Xt(o,i))return h[i]=4,o[i];ca&&(h[i]=0)}}const P=io[i];let k,O;if(P)return i==="$attrs"&&Ne(e.attrs,"get",""),P(e);if((k=g.__cssModules)&&(k=k[i]))return k;if(o!==ie&&Xt(o,i))return h[i]=4,o[i];if(O=v.config.globalProperties,Xt(O,i))return O[i]},set({_:e},i,o){const{data:a,setupState:l,ctx:c}=e;return Jr(l,i)?(l[i]=o,!0):a!==ie&&Xt(a,i)?(a[i]=o,!0):Xt(e.props,i)||i[0]==="$"&&i.slice(1)in e?!1:(c[i]=o,!0)},has({_:{data:e,setupState:i,accessCache:o,ctx:a,appContext:l,props:c,type:h}},g){let v;return!!(o[g]||e!==ie&&g[0]!=="$"&&Xt(e,g)||Jr(i,g)||Xt(c,g)||Xt(a,g)||Xt(io,g)||Xt(l.config.globalProperties,g)||(v=h.__cssModules)&&v[g])},defineProperty(e,i,o){return o.get!=null?e._.accessCache[i]=0:Xt(o,"value")&&this.set(e,i,o.value,null),Reflect.defineProperty(e,i,o)}};function dl(e){return pt(e)?e.reduce((i,o)=>(i[o]=null,i),{}):e}let ca=!0;function uf(e){const i=Ku(e),o=e.proxy,a=e.ctx;ca=!1,i.beforeCreate&&fl(i.beforeCreate,e,"bc");const{data:l,computed:c,methods:h,watch:g,provide:v,inject:P,created:k,beforeMount:O,mounted:$,beforeUpdate:F,updated:nt,activated:q,deactivated:At,beforeDestroy:Dt,beforeUnmount:bt,destroyed:ut,unmounted:X,render:ft,renderTracked:jt,renderTriggered:de,errorCaptured:me,serverPrefetch:vt,expose:Ft,inheritAttrs:Tt,components:G,directives:st,filters:It}=i;if(P&&cf(P,a,null),h)for(const Vt in h){const Y=h[Vt];Lt(Y)&&(a[Vt]=Y.bind(o))}if(l){const Vt=l.call(o,o);Qt(Vt)&&(e.data=xe(Vt))}if(ca=!0,c)for(const Vt in c){const Y=c[Vt],ue=Lt(Y)?Y.bind(o,o):Lt(Y.get)?Y.get.bind(o,o):Zn,rt=!Lt(Y)&&Lt(Y.set)?Y.set.bind(o):Zn,yt=ht({get:ue,set:rt});Object.defineProperty(a,Vt,{enumerable:!0,configurable:!0,get:()=>yt.value,set:Kt=>yt.value=Kt})}if(g)for(const Vt in g)Wu(g[Vt],a,o,Vt);if(v){const Vt=Lt(v)?v.call(o):v;Reflect.ownKeys(Vt).forEach(Y=>{Au(Y,Vt[Y])})}k&&fl(k,e,"c");function kt(Vt,Y){pt(Y)?Y.forEach(ue=>Vt(ue.bind(o))):Y&&Vt(Y.bind(o))}if(kt(Xd,O),kt(Ls,$),kt(Qd,F),kt(tf,nt),kt(Gd,q),kt(Yd,At),kt(of,me),kt(sf,jt),kt(nf,de),kt(_r,bt),kt(Uu,X),kt(ef,vt),pt(Ft))if(Ft.length){const Vt=e.exposed||(e.exposed={});Ft.forEach(Y=>{Object.defineProperty(Vt,Y,{get:()=>o[Y],set:ue=>o[Y]=ue,enumerable:!0})})}else e.exposed||(e.exposed={});ft&&e.render===Zn&&(e.render=ft),Tt!=null&&(e.inheritAttrs=Tt),G&&(e.components=G),st&&(e.directives=st),vt&&$u(e)}function cf(e,i,o=Zn){pt(e)&&(e=da(e));for(const a in e){const l=e[a];let c;Qt(l)?"default"in l?c=eo(l.from||a,l.default,!0):c=eo(l.from||a):c=eo(l),Re(c)?Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>c.value,set:h=>c.value=h}):i[a]=c}}function fl(e,i,o){mn(pt(e)?e.map(a=>a.bind(i.proxy)):e.bind(i.proxy),i,o)}function Wu(e,i,o,a){let l=a.includes(".")?Nu(o,a):()=>o[a];if(pe(e)){const c=i[e];Lt(c)&&Je(l,c)}else if(Lt(e))Je(l,e.bind(o));else if(Qt(e))if(pt(e))e.forEach(c=>Wu(c,i,o,a));else{const c=Lt(e.handler)?e.handler.bind(o):i[e.handler];Lt(c)&&Je(l,c,e)}}function Ku(e){const i=e.type,{mixins:o,extends:a}=i,{mixins:l,optionsCache:c,config:{optionMergeStrategies:h}}=e.appContext,g=c.get(i);let v;return g?v=g:!l.length&&!o&&!a?v=i:(v={},l.length&&l.forEach(P=>er(v,P,h,!0)),er(v,i,h)),Qt(i)&&c.set(i,v),v}function er(e,i,o,a=!1){const{mixins:l,extends:c}=i;c&&er(e,c,o,!0),l&&l.forEach(h=>er(e,h,o,!0));for(const h in i)if(!(a&&h==="expose")){const g=df[h]||o&&o[h];e[h]=g?g(e[h],i[h]):i[h]}return e}const df={data:hl,props:pl,emits:pl,methods:Gs,computed:Gs,beforeCreate:Ue,created:Ue,beforeMount:Ue,mounted:Ue,beforeUpdate:Ue,updated:Ue,beforeDestroy:Ue,beforeUnmount:Ue,destroyed:Ue,unmounted:Ue,activated:Ue,deactivated:Ue,errorCaptured:Ue,serverPrefetch:Ue,components:Gs,directives:Gs,watch:hf,provide:hl,inject:ff};function hl(e,i){return i?e?function(){return Ce(Lt(e)?e.call(this,this):e,Lt(i)?i.call(this,this):i)}:i:e}function ff(e,i){return Gs(da(e),da(i))}function da(e){if(pt(e)){const i={};for(let o=0;oi==="modelValue"||i==="model-value"?e.modelModifiers:e[`${i}Modifiers`]||e[`${Pn(i)}Modifiers`]||e[`${Li(i)}Modifiers`];function _f(e,i,...o){if(e.isUnmounted)return;const a=e.vnode.props||ie;let l=o;const c=i.startsWith("update:"),h=c&&gf(a,i.slice(7));h&&(h.trim&&(l=o.map(k=>pe(k)?k.trim():k)),h.number&&(l=o.map(dr)));let g,v=a[g=jr(i)]||a[g=jr(Pn(i))];!v&&c&&(v=a[g=jr(Li(i))]),v&&mn(v,e,6,l);const P=a[g+"Once"];if(P){if(!e.emitted)e.emitted={};else if(e.emitted[g])return;e.emitted[g]=!0,mn(P,e,6,l)}}const vf=new WeakMap;function Gu(e,i,o=!1){const a=o?vf:i.emitsCache,l=a.get(e);if(l!==void 0)return l;const c=e.emits;let h={},g=!1;if(!Lt(e)){const v=P=>{const k=Gu(P,i,!0);k&&(g=!0,Ce(h,k))};!o&&i.mixins.length&&i.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!c&&!g?(Qt(e)&&a.set(e,null),null):(pt(c)?c.forEach(v=>h[v]=null):Ce(h,c),Qt(e)&&a.set(e,h),h)}function vr(e,i){return!e||!lr(i)?!1:(i=i.slice(2),i=i==="Once"?i:i.replace(/Once$/,""),Xt(e,i[0].toLowerCase()+i.slice(1))||Xt(e,Li(i))||Xt(e,i))}function ml(e){const{type:i,vnode:o,proxy:a,withProxy:l,propsOptions:[c],slots:h,attrs:g,emit:v,render:P,renderCache:k,props:O,data:$,setupState:F,ctx:nt,inheritAttrs:q}=e,At=Qo(e);let Dt,bt;try{if(o.shapeFlag&4){const X=l||a,ft=X;Dt=Fn(P.call(ft,X,k,O,F,$,nt)),bt=g}else{const X=i;Dt=Fn(X.length>1?X(O,{attrs:g,slots:h,emit:v}):X(O,null)),bt=i.props?g:yf(g)}}catch(X){so.length=0,pr(X,e,1),Dt=E(Be)}let ut=Dt;if(bt&&q!==!1){const X=Object.keys(bt),{shapeFlag:ft}=ut;X.length&&ft&7&&(c&&X.some(ur)&&(bt=bf(bt,c)),ut=Pi(ut,bt,!1,!0))}return o.dirs&&(ut=Pi(ut,null,!1,!0),ut.dirs=ut.dirs?ut.dirs.concat(o.dirs):o.dirs),o.transition&&lo(ut,o.transition),Dt=ut,Qo(At),Dt}const yf=e=>{let i;for(const o in e)(o==="class"||o==="style"||lr(o))&&((i||(i={}))[o]=e[o]);return i},bf=(e,i)=>{const o={};for(const a in e)(!ur(a)||!(a.slice(9)in i))&&(o[a]=e[a]);return o};function xf(e,i,o){const{props:a,children:l,component:c}=e,{props:h,children:g,patchFlag:v}=i,P=c.emitsOptions;if(i.dirs||i.transition)return!0;if(o&&v>=0){if(v&1024)return!0;if(v&16)return a?gl(a,h,P):!!h;if(v&8){const k=i.dynamicProps;for(let O=0;OObject.create(Ju),Qu=e=>Object.getPrototypeOf(e)===Ju;function kf(e,i,o,a=!1){const l={},c=Xu();e.propsDefaults=Object.create(null),tc(e,i,l,c);for(const h in e.propsOptions[0])h in l||(l[h]=void 0);o?e.props=a?l:Od(l):e.type.props?e.props=l:e.props=c,e.attrs=c}function Sf(e,i,o,a){const{props:l,attrs:c,vnode:{patchFlag:h}}=e,g=Gt(l),[v]=e.propsOptions;let P=!1;if((a||h>0)&&!(h&16)){if(h&8){const k=e.vnode.dynamicProps;for(let O=0;O{v=!0;const[$,F]=ec(O,i,!0);Ce(h,$),F&&g.push(...F)};!o&&i.mixins.length&&i.mixins.forEach(k),e.extends&&k(e.extends),e.mixins&&e.mixins.forEach(k)}if(!c&&!v)return Qt(e)&&a.set(e,_s),_s;if(pt(c))for(let k=0;ke==="_"||e==="_ctx"||e==="$stable",Ea=e=>pt(e)?e.map(Fn):[Fn(e)],Tf=(e,i,o)=>{if(i._n)return i;const a=ot((...l)=>Ea(i(...l)),o);return a._c=!1,a},nc=(e,i,o)=>{const a=e._ctx;for(const l in e){if(Oa(l))continue;const c=e[l];if(Lt(c))i[l]=Tf(l,c,a);else if(c!=null){const h=Ea(c);i[l]=()=>h}}},ic=(e,i)=>{const o=Ea(i);e.slots.default=()=>o},sc=(e,i,o)=>{for(const a in i)(o||!Oa(a))&&(e[a]=i[a])},Lf=(e,i,o)=>{const a=e.slots=Xu();if(e.vnode.shapeFlag&32){const l=i._;l?(sc(a,i,o),o&&lu(a,"_",l,!0)):nc(i,a)}else i&&ic(e,i)},Mf=(e,i,o)=>{const{vnode:a,slots:l}=e;let c=!0,h=ie;if(a.shapeFlag&32){const g=i._;g?o&&g===1?c=!1:sc(l,i,o):(c=!i.$stable,nc(i,l)),h=i}else i&&(ic(e,i),h={default:1});if(c)for(const g in l)!Oa(g)&&h[g]==null&&delete l[g]},Ye=Af;function Cf(e){return Of(e)}function Of(e,i){const o=fr();o.__VUE__=!0;const{insert:a,remove:l,patchProp:c,createElement:h,createText:g,createComment:v,setText:P,setElementText:k,parentNode:O,nextSibling:$,setScopeId:F=Zn,insertStaticContent:nt}=e,q=(_,m,T,B=null,I=null,D=null,j=void 0,A=null,U=!!m.dynamicChildren)=>{if(_===m)return;_&&!Wi(_,m)&&(B=Pe(_),Kt(_,I,D,!0),_=null),m.patchFlag===-2&&(U=!1,m.dynamicChildren=null);const{type:R,ref:ct,shapeFlag:Q}=m;switch(R){case yr:At(_,m,T,B);break;case Be:Dt(_,m,T,B);break;case Qr:_==null&&bt(m,T,B,j);break;case wt:G(_,m,T,B,I,D,j,A,U);break;default:Q&1?ft(_,m,T,B,I,D,j,A,U):Q&6?st(_,m,T,B,I,D,j,A,U):(Q&64||Q&128)&&R.process(_,m,T,B,I,D,j,A,U,we)}ct!=null&&I?no(ct,_&&_.ref,D,m||_,!m):ct==null&&_&&_.ref!=null&&no(_.ref,null,D,_,!0)},At=(_,m,T,B)=>{if(_==null)a(m.el=g(m.children),T,B);else{const I=m.el=_.el;m.children!==_.children&&P(I,m.children)}},Dt=(_,m,T,B)=>{_==null?a(m.el=v(m.children||""),T,B):m.el=_.el},bt=(_,m,T,B)=>{[_.el,_.anchor]=nt(_.children,m,T,B,_.el,_.anchor)},ut=({el:_,anchor:m},T,B)=>{let I;for(;_&&_!==m;)I=$(_),a(_,T,B),_=I;a(m,T,B)},X=({el:_,anchor:m})=>{let T;for(;_&&_!==m;)T=$(_),l(_),_=T;l(m)},ft=(_,m,T,B,I,D,j,A,U)=>{if(m.type==="svg"?j="svg":m.type==="math"&&(j="mathml"),_==null)jt(m,T,B,I,D,j,A,U);else{const R=_.el&&_.el._isVueCE?_.el:null;try{R&&R._beginPatch(),vt(_,m,I,D,j,A,U)}finally{R&&R._endPatch()}}},jt=(_,m,T,B,I,D,j,A)=>{let U,R;const{props:ct,shapeFlag:Q,transition:K,dirs:dt}=_;if(U=_.el=h(_.type,D,ct&&ct.is,ct),Q&8?k(U,_.children):Q&16&&me(_.children,U,null,B,I,Xr(_,D),j,A),dt&&Zi(_,null,B,"created"),de(U,_,_.scopeId,j,B),ct){for(const at in ct)at!=="value"&&!Xs(at)&&c(U,at,null,ct[at],D,B);"value"in ct&&c(U,"value",null,ct.value,D),(R=ct.onVnodeBeforeMount)&&Bn(R,B,_)}dt&&Zi(_,null,B,"beforeMount");const Mt=Ef(I,K);Mt&&K.beforeEnter(U),a(U,m,T),((R=ct&&ct.onVnodeMounted)||Mt||dt)&&Ye(()=>{try{R&&Bn(R,B,_),Mt&&K.enter(U),dt&&Zi(_,null,B,"mounted")}finally{}},I)},de=(_,m,T,B,I)=>{if(T&&F(_,T),B)for(let D=0;D{for(let R=U;R<_.length;R++){const ct=_[R]=A?ii(_[R]):Fn(_[R]);q(null,ct,m,T,B,I,D,j,A)}},vt=(_,m,T,B,I,D,j)=>{const A=m.el=_.el;let{patchFlag:U,dynamicChildren:R,dirs:ct}=m;U|=_.patchFlag&16;const Q=_.props||ie,K=m.props||ie;let dt;if(T&&$i(T,!1),(dt=K.onVnodeBeforeUpdate)&&Bn(dt,T,m,_),ct&&Zi(m,_,T,"beforeUpdate"),T&&$i(T,!0),R&&(!_.dynamicChildren||_.dynamicChildren.length!==R.length)&&(U=0,j=!1,R=null),(Q.innerHTML&&K.innerHTML==null||Q.textContent&&K.textContent==null)&&k(A,""),R?Ft(_.dynamicChildren,R,A,T,B,Xr(m,I),D):j||Y(_,m,A,null,T,B,Xr(m,I),D,!1),U>0){if(U&16)Tt(A,Q,K,T,I);else if(U&2&&Q.class!==K.class&&c(A,"class",null,K.class,I),U&4&&c(A,"style",Q.style,K.style,I),U&8){const Mt=m.dynamicProps;for(let at=0;at{dt&&Bn(dt,T,m,_),ct&&Zi(m,_,T,"updated")},B)},Ft=(_,m,T,B,I,D,j)=>{for(let A=0;A{if(m!==T){if(m!==ie)for(const D in m)!Xs(D)&&!(D in T)&&c(_,D,m[D],null,I,B);for(const D in T){if(Xs(D))continue;const j=T[D],A=m[D];j!==A&&D!=="value"&&c(_,D,A,j,I,B)}"value"in T&&c(_,"value",m.value,T.value,I)}},G=(_,m,T,B,I,D,j,A,U)=>{const R=m.el=_?_.el:g(""),ct=m.anchor=_?_.anchor:g("");let{patchFlag:Q,dynamicChildren:K,slotScopeIds:dt}=m;dt&&(A=A?A.concat(dt):dt),_==null?(a(R,T,B),a(ct,T,B),me(m.children||[],T,ct,I,D,j,A,U)):Q>0&&Q&64&&K&&_.dynamicChildren&&_.dynamicChildren.length===K.length?(Ft(_.dynamicChildren,K,T,I,D,j,A),(m.key!=null||I&&m===I.subTree)&&oc(_,m,!0)):Y(_,m,T,ct,I,D,j,A,U)},st=(_,m,T,B,I,D,j,A,U)=>{m.slotScopeIds=A,_==null?m.shapeFlag&512?I.ctx.activate(m,T,B,j,U):It(m,T,B,I,D,j,U):Wt(_,m,U)},It=(_,m,T,B,I,D,j)=>{const A=_.component=Vf(_,B,I);if(mr(_)&&(A.ctx.renderer=we),Zf(A,!1,j),A.asyncDep){if(I&&I.registerDep(A,kt,j),!_.el){const U=A.subTree=E(Be);Dt(null,U,m,T),_.placeholder=U.el}}else kt(A,_,m,T,I,D,j)},Wt=(_,m,T)=>{const B=m.component=_.component;if(xf(_,m,T))if(B.asyncDep&&!B.asyncResolved){Vt(B,m,T);return}else B.next=m,B.update();else m.el=_.el,B.vnode=m},kt=(_,m,T,B,I,D,j)=>{const A=()=>{if(_.isMounted){let{next:Q,bu:K,u:dt,parent:Mt,vnode:at}=_;{const ke=rc(_);if(ke){Q&&(Q.el=at.el,Vt(_,Q,j)),ke.asyncDep.then(()=>{Ye(()=>{_.isUnmounted||R()},I)});return}}let Rt=Q,ne;$i(_,!1),Q?(Q.el=at.el,Vt(_,Q,j)):Q=at,K&&Go(K),(ne=Q.props&&Q.props.onVnodeBeforeUpdate)&&Bn(ne,Mt,Q,at),$i(_,!0);const ae=ml(_),fe=_.subTree;_.subTree=ae,q(fe,ae,O(fe.el),Pe(fe),_,I,D),Q.el=ae.el,Rt===null&&wf(_,ae.el),dt&&Ye(dt,I),(ne=Q.props&&Q.props.onVnodeUpdated)&&Ye(()=>Bn(ne,Mt,Q,at),I)}else{let Q;const{el:K,props:dt}=m,{bm:Mt,m:at,parent:Rt,root:ne,type:ae}=_,fe=bs(m);$i(_,!1),Mt&&Go(Mt),!fe&&(Q=dt&&dt.onVnodeBeforeMount)&&Bn(Q,Rt,m),$i(_,!0);{ne.ce&&ne.ce._hasShadowRoot()&&ne.ce._injectChildStyle(ae,_.parent?_.parent.type:void 0);const ke=_.subTree=ml(_);q(null,ke,T,B,_,I,D),m.el=ke.el}if(at&&Ye(at,I),!fe&&(Q=dt&&dt.onVnodeMounted)){const ke=m;Ye(()=>Bn(Q,Rt,ke),I)}(m.shapeFlag&256||Rt&&bs(Rt.vnode)&&Rt.vnode.shapeFlag&256)&&_.a&&Ye(_.a,I),_.isMounted=!0,m=T=B=null}};_.scope.on();const U=_.effect=new fu(A);_.scope.off();const R=_.update=U.run.bind(U),ct=_.job=U.runIfDirty.bind(U);ct.i=_,ct.id=_.uid,U.scheduler=()=>Ca(ct),$i(_,!0),R()},Vt=(_,m,T)=>{m.component=_;const B=_.vnode.props;_.vnode=m,_.next=null,Sf(_,m.props,B,T),Mf(_,m.children,T),$n(),al(_),Hn()},Y=(_,m,T,B,I,D,j,A,U=!1)=>{const R=_&&_.children,ct=_?_.shapeFlag:0,Q=m.children,{patchFlag:K,shapeFlag:dt}=m;if(K>0){if(K&128){rt(R,Q,T,B,I,D,j,A,U);return}else if(K&256){ue(R,Q,T,B,I,D,j,A,U);return}}dt&8?(ct&16&&Pt(R,I,D),Q!==R&&k(T,Q)):ct&16?dt&16?rt(R,Q,T,B,I,D,j,A,U):Pt(R,I,D,!0):(ct&8&&k(T,""),dt&16&&me(Q,T,B,I,D,j,A,U))},ue=(_,m,T,B,I,D,j,A,U)=>{_=_||_s,m=m||_s;const R=_.length,ct=m.length,Q=Math.min(R,ct);let K;for(K=0;Kct?Pt(_,I,D,!0,!1,Q):me(m,T,B,I,D,j,A,U,Q)},rt=(_,m,T,B,I,D,j,A,U)=>{let R=0;const ct=m.length;let Q=_.length-1,K=ct-1;for(;R<=Q&&R<=K;){const dt=_[R],Mt=m[R]=U?ii(m[R]):Fn(m[R]);if(Wi(dt,Mt))q(dt,Mt,T,null,I,D,j,A,U);else break;R++}for(;R<=Q&&R<=K;){const dt=_[Q],Mt=m[K]=U?ii(m[K]):Fn(m[K]);if(Wi(dt,Mt))q(dt,Mt,T,null,I,D,j,A,U);else break;Q--,K--}if(R>Q){if(R<=K){const dt=K+1,Mt=dtK)for(;R<=Q;)Kt(_[R],I,D,!0),R++;else{const dt=R,Mt=R,at=new Map;for(R=Mt;R<=K;R++){const ve=m[R]=U?ii(m[R]):Fn(m[R]);ve.key!=null&&at.set(ve.key,R)}let Rt,ne=0;const ae=K-Mt+1;let fe=!1,ke=0;const _n=new Array(ae);for(R=0;R=ae){Kt(ve,I,D,!0);continue}let Ae;if(ve.key!=null)Ae=at.get(ve.key);else for(Rt=Mt;Rt<=K;Rt++)if(_n[Rt-Mt]===0&&Wi(ve,m[Rt])){Ae=Rt;break}Ae===void 0?Kt(ve,I,D,!0):(_n[Ae-Mt]=R+1,Ae>=ke?ke=Ae:fe=!0,q(ve,m[Ae],T,null,I,D,j,A,U),ne++)}const ui=fe?zf(_n):_s;for(Rt=ui.length-1,R=ae-1;R>=0;R--){const ve=Mt+R,Ae=m[ve],Cn=m[ve+1],Fe=ve+1{const{el:D,type:j,transition:A,children:U,shapeFlag:R}=_;if(R&6){yt(_.component.subTree,m,T,B);return}if(R&128){_.suspense.move(m,T,B);return}if(R&64){j.move(_,m,T,we);return}if(j===wt){a(D,m,T);for(let Q=0;QA.enter(D),I));else{const{leave:Q,delayLeave:K,afterLeave:dt}=A,Mt=()=>{_.ctx.isUnmounted?l(D):a(D,m,T)},at=()=>{const Rt=D._isLeaving||!!D[fn];D._isLeaving&&D[fn](!0),A.persisted&&!Rt?Mt():Q(D,()=>{Mt(),dt&&dt()})};K?K(D,Mt,at):at()}else a(D,m,T)},Kt=(_,m,T,B=!1,I=!1)=>{const{type:D,props:j,ref:A,children:U,dynamicChildren:R,shapeFlag:ct,patchFlag:Q,dirs:K,cacheIndex:dt,memo:Mt}=_;if(Q===-2&&(I=!1),A!=null&&($n(),no(A,null,T,_,!0),Hn()),dt!=null&&(m.renderCache[dt]=void 0),ct&256){m.ctx.deactivate(_);return}const at=ct&1&&K,Rt=!bs(_);let ne;if(Rt&&(ne=j&&j.onVnodeBeforeUnmount)&&Bn(ne,m,_),ct&6)Ut(_.component,T,B);else{if(ct&128){_.suspense.unmount(T,B);return}at&&Zi(_,null,m,"beforeUnmount"),ct&64?_.type.remove(_,m,T,we,B):R&&!R.hasOnce&&(D!==wt||Q>0&&Q&64)?Pt(R,m,T,!1,!0):(D===wt&&Q&384||!I&&ct&16)&&Pt(U,m,T),B&&ge(_)}const ae=Mt!=null&&dt==null;(Rt&&(ne=j&&j.onVnodeUnmounted)||at||ae)&&Ye(()=>{ne&&Bn(ne,m,_),at&&Zi(_,null,m,"unmounted"),ae&&(_.el=null)},T)},ge=_=>{const{type:m,el:T,anchor:B,transition:I}=_;if(m===wt){qt(T,B);return}if(m===Qr){X(_);return}const D=()=>{l(T),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(_.shapeFlag&1&&I&&!I.persisted){const{leave:j,delayLeave:A}=I,U=()=>j(T,D);A?A(_.el,D,U):U()}else D()},qt=(_,m)=>{let T;for(;_!==m;)T=$(_),l(_),_=T;l(m)},Ut=(_,m,T)=>{const{bum:B,scope:I,job:D,subTree:j,um:A,m:U,a:R}=_;vl(U),vl(R),B&&Go(B),I.stop(),D&&(D.flags|=8,Kt(j,_,m,T)),A&&Ye(A,m),Ye(()=>{_.isUnmounted=!0},m)},Pt=(_,m,T,B=!1,I=!1,D=0)=>{for(let j=D;j<_.length;j++)Kt(_[j],m,T,B,I)},Pe=_=>{if(_.shapeFlag&6)return Pe(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();const m=$(_.anchor||_.el),T=m&&m[jd];return T?$(T):m};let Te=!1;const nn=(_,m,T)=>{let B;_==null?m._vnode&&(Kt(m._vnode,null,null,!0),B=m._vnode.component):q(m._vnode||null,_,m,null,null,null,T),m._vnode=_,Te||(Te=!0,al(B),Ou(),Te=!1)},we={p:q,um:Kt,m:yt,r:ge,mt:It,mc:me,pc:Y,pbc:Ft,n:Pe,o:e};return{render:nn,hydrate:void 0,createApp:mf(nn)}}function Xr({type:e,props:i},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&i&&i.encoding&&i.encoding.includes("html")?void 0:o}function $i({effect:e,job:i},o){o?(e.flags|=32,i.flags|=4):(e.flags&=-33,i.flags&=-5)}function Ef(e,i){return(!e||e&&!e.pendingBranch)&&i&&!i.persisted}function oc(e,i,o=!1){const a=e.children,l=i.children;if(pt(a)&&pt(l))for(let c=0;c>1,e[o[g]]0&&(i[a]=o[c-1]),o[c]=a)}}for(c=o.length,h=o[c-1];c-- >0;)o[c]=h,h=i[h];return o}function rc(e){const i=e.subTree.component;if(i)return i.asyncDep&&!i.asyncResolved?i:rc(i)}function vl(e){if(e)for(let i=0;ie.__isSuspense;function Af(e,i){i&&i.pendingBranch?pt(e)?i.effects.push(...e):i.effects.push(e):Zd(e)}const wt=Symbol.for("v-fgt"),yr=Symbol.for("v-txt"),Be=Symbol.for("v-cmt"),Qr=Symbol.for("v-stc"),so=[];let en=null;function b(e=!1){so.push(en=e?null:[])}function If(){so.pop(),en=so[so.length-1]||null}let uo=1;function nr(e,i=!1){uo+=e,e<0&&en&&i&&(en.hasOnce=!0)}function uc(e){return e.dynamicChildren=uo>0?en||_s:null,If(),uo>0&&en&&en.push(e),e}function x(e,i,o,a,l,c){return uc(f(e,i,o,a,l,c,!0))}function oe(e,i,o,a,l){return uc(E(e,i,o,a,l,!0))}function co(e){return e?e.__v_isVNode===!0:!1}function Wi(e,i){return e.type===i.type&&e.key===i.key}const cc=({key:e})=>e??null,Yo=({ref:e,ref_key:i,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?pe(e)||Re(e)||Lt(e)?{i:De,r:e,k:i,f:!!o}:e:null);function f(e,i=null,o=null,a=0,l=null,c=e===wt?0:1,h=!1,g=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:i,key:i&&cc(i),ref:i&&Yo(i),scopeId:zu,slotScopeIds:null,children:o,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:c,patchFlag:a,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:De};return g?(ir(v,o),c&128&&e.normalize(v)):o&&(v.shapeFlag|=pe(o)?8:16),uo>0&&!h&&en&&(v.patchFlag>0||c&6)&&v.patchFlag!==32&&en.push(v),v}const E=Nf;function Nf(e,i=null,o=null,a=0,l=null,c=!1){if((!e||e===rf)&&(e=Be),co(e)){const g=Pi(e,i,!0);return o&&ir(g,o),uo>0&&!c&&en&&(g.shapeFlag&6?en[en.indexOf(e)]=g:en.push(g)),g.patchFlag=-2,g}if(jf(e)&&(e=e.__vccOpts),i){i=Bf(i);let{class:g,style:v}=i;g&&!pe(g)&&(i.class=Ot(g)),Qt(v)&&(Ma(v)&&!pt(v)&&(v=Ce({},v)),i.style=ks(v))}const h=pe(e)?1:lc(e)?128:Bu(e)?64:Qt(e)?4:Lt(e)?2:0;return f(e,i,o,a,l,h,c,!0)}function Bf(e){return e?Ma(e)||Qu(e)?Ce({},e):e:null}function Pi(e,i,o=!1,a=!1){const{props:l,ref:c,patchFlag:h,children:g,transition:v}=e,P=i?Df(l||{},i):l,k={__v_isVNode:!0,__v_skip:!0,type:e.type,props:P,key:P&&cc(P),ref:i&&i.ref?o&&c?pt(c)?c.concat(Yo(i)):[c,Yo(i)]:Yo(i):c,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:i&&e.type!==wt?h===-1?16:h|16:h,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:v,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Pi(e.ssContent),ssFallback:e.ssFallback&&Pi(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return v&&a&&lo(k,v.clone(k)),k}function N(e=" ",i=0){return E(yr,null,e,i)}function V(e="",i=!1){return i?(b(),oe(Be,null,e)):E(Be,null,e)}function Fn(e){return e==null||typeof e=="boolean"?E(Be):pt(e)?E(wt,null,e.slice()):co(e)?ii(e):E(yr,null,String(e))}function ii(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Pi(e)}function ir(e,i){let o=0;const{shapeFlag:a}=e;if(i==null)i=null;else if(pt(i))o=16;else if(typeof i=="object")if(a&65){const l=i.default;l&&(l._c&&(l._d=!1),ir(e,l()),l._c&&(l._d=!0));return}else{o=32;const l=i._;!l&&!Qu(i)?i._ctx=De:l===3&&De&&(De.slots._===1?i._=1:(i._=2,e.patchFlag|=1024))}else if(Lt(i)){if(a&65){ir(e,{default:i});return}i={default:i,_ctx:De},o=32}else i=String(i),a&64?(o=16,i=[N(i)]):o=8;e.children=i,e.shapeFlag|=o}function Df(...e){const i={};for(let o=0;oWe||De;let sr,ha;{const e=fr(),i=(o,a)=>{let l;return(l=e[o])||(l=e[o]=[]),l.push(a),c=>{l.length>1?l.forEach(h=>h(c)):l[0](c)}};sr=i("__VUE_INSTANCE_SETTERS__",o=>We=o),ha=i("__VUE_SSR_SETTERS__",o=>fo=o)}const go=e=>{const i=We;return sr(e),e.scope.on(),()=>{e.scope.off(),sr(i)}},yl=()=>{We&&We.scope.off(),sr(null)};function fc(e){return e.vnode.shapeFlag&4}let fo=!1;function Zf(e,i=!1,o=!1){i&&ha(i);const{props:a,children:l}=e.vnode,c=fc(e);kf(e,a,c,i),Lf(e,l,o||i);const h=c?$f(e,i):void 0;return i&&ha(!1),h}function $f(e,i){const o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lf);const{setup:a}=o;if(a){$n();const l=e.setupContext=a.length>1?Uf(e):null,c=go(e),h=mo(a,e,0,[e.props,l]),g=su(h);if(Hn(),c(),(g||e.sp)&&!bs(e)&&$u(e),g){if(h.then(yl,yl),i)return h.then(v=>{bl(e,v)}).catch(v=>{pr(v,e,0)});e.asyncDep=h}else bl(e,h)}else hc(e)}function bl(e,i,o){Lt(i)?e.type.__ssrInlineRender?e.ssrRender=i:e.render=i:Qt(i)&&(e.setupState=Tu(i)),hc(e)}function hc(e,i,o){const a=e.type;e.render||(e.render=a.render||Zn);{const l=go(e);$n();try{uf(e)}finally{Hn(),l()}}}const Hf={get(e,i){return Ne(e,"get",""),e[i]}};function Uf(e){const i=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,Hf),slots:e.slots,emit:e.emit,expose:i}}function br(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Tu(Ed(e.exposed)),{get(i,o){if(o in i)return i[o];if(o in io)return io[o](e)},has(i,o){return o in i||o in io}})):e.proxy}function jf(e){return Lt(e)&&"__vccOpts"in e}const ht=(e,i)=>Bd(e,i,fo);function Wf(e,i,o){try{nr(-1);const a=arguments.length;return a===2?Qt(i)&&!pt(i)?co(i)?E(e,null,[i]):E(e,i):E(e,null,i):(a>3?o=Array.prototype.slice.call(arguments,2):a===3&&co(o)&&(o=[o]),E(e,i,o))}finally{nr(1)}}const Kf="3.5.39";/** -* @vue/runtime-dom v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let pa;const xl=typeof window<"u"&&window.trustedTypes;if(xl)try{pa=xl.createPolicy("vue",{createHTML:e=>e})}catch{}const pc=pa?e=>pa.createHTML(e):e=>e,qf="http://www.w3.org/2000/svg",Gf="http://www.w3.org/1998/Math/MathML",ni=typeof document<"u"?document:null,wl=ni&&ni.createElement("template"),Yf={insert:(e,i,o)=>{i.insertBefore(e,o||null)},remove:e=>{const i=e.parentNode;i&&i.removeChild(e)},createElement:(e,i,o,a)=>{const l=i==="svg"?ni.createElementNS(qf,e):i==="mathml"?ni.createElementNS(Gf,e):o?ni.createElement(e,{is:o}):ni.createElement(e);return e==="select"&&a&&a.multiple!=null&&l.setAttribute("multiple",a.multiple),l},createText:e=>ni.createTextNode(e),createComment:e=>ni.createComment(e),setText:(e,i)=>{e.nodeValue=i},setElementText:(e,i)=>{e.textContent=i},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ni.querySelector(e),setScopeId(e,i){e.setAttribute(i,"")},insertStaticContent(e,i,o,a,l,c){const h=o?o.previousSibling:i.lastChild;if(l&&(l===c||l.nextSibling))for(;i.insertBefore(l.cloneNode(!0),o),!(l===c||!(l=l.nextSibling)););else{wl.innerHTML=pc(a==="svg"?`${e}`:a==="mathml"?`${e}`:e);const g=wl.content;if(a==="svg"||a==="mathml"){const v=g.firstChild;for(;v.firstChild;)g.appendChild(v.firstChild);g.removeChild(v)}i.insertBefore(g,o)}return[h?h.nextSibling:i.firstChild,o?o.previousSibling:i.lastChild]}},xi="transition",Ks="animation",ho=Symbol("_vtc"),mc={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},Jf=Ce({},Du,mc),Xf=e=>(e.displayName="Transition",e.props=Jf,e),Qf=Xf((e,{slots:i})=>Wf(qd,th(e),i)),Hi=(e,i=[])=>{pt(e)?e.forEach(o=>o(...i)):e&&e(...i)},kl=e=>e?pt(e)?e.some(i=>i.length>1):e.length>1:!1;function th(e){const i={};for(const G in e)G in mc||(i[G]=e[G]);if(e.css===!1)return i;const{name:o="v",type:a,duration:l,enterFromClass:c=`${o}-enter-from`,enterActiveClass:h=`${o}-enter-active`,enterToClass:g=`${o}-enter-to`,appearFromClass:v=c,appearActiveClass:P=h,appearToClass:k=g,leaveFromClass:O=`${o}-leave-from`,leaveActiveClass:$=`${o}-leave-active`,leaveToClass:F=`${o}-leave-to`}=e,nt=eh(l),q=nt&&nt[0],At=nt&&nt[1],{onBeforeEnter:Dt,onEnter:bt,onEnterCancelled:ut,onLeave:X,onLeaveCancelled:ft,onBeforeAppear:jt=Dt,onAppear:de=bt,onAppearCancelled:me=ut}=i,vt=(G,st,It,Wt)=>{G._enterCancelled=Wt,Ui(G,st?k:g),Ui(G,st?P:h),It&&It()},Ft=(G,st)=>{G._isLeaving=!1,Ui(G,O),Ui(G,F),Ui(G,$),st&&st()},Tt=G=>(st,It)=>{const Wt=G?de:bt,kt=()=>vt(st,G,It);Hi(Wt,[st,kt]),Sl(()=>{Ui(st,G?v:c),ei(st,G?k:g),kl(Wt)||Pl(st,a,q,kt)})};return Ce(i,{onBeforeEnter(G){Hi(Dt,[G]),ei(G,c),ei(G,h)},onBeforeAppear(G){Hi(jt,[G]),ei(G,v),ei(G,P)},onEnter:Tt(!1),onAppear:Tt(!0),onLeave(G,st){G._isLeaving=!0;const It=()=>Ft(G,st);ei(G,O),G._enterCancelled?(ei(G,$),Ml(G)):(Ml(G),ei(G,$)),Sl(()=>{G._isLeaving&&(Ui(G,O),ei(G,F),kl(X)||Pl(G,a,At,It))}),Hi(X,[G,It])},onEnterCancelled(G){vt(G,!1,void 0,!0),Hi(ut,[G])},onAppearCancelled(G){vt(G,!0,void 0,!0),Hi(me,[G])},onLeaveCancelled(G){Ft(G),Hi(ft,[G])}})}function eh(e){if(e==null)return null;if(Qt(e))return[ta(e.enter),ta(e.leave)];{const i=ta(e);return[i,i]}}function ta(e){return id(e)}function ei(e,i){i.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[ho]||(e[ho]=new Set)).add(i)}function Ui(e,i){i.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const o=e[ho];o&&(o.delete(i),o.size||(e[ho]=void 0))}function Sl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let nh=0;function Pl(e,i,o,a){const l=e._endId=++nh,c=()=>{l===e._endId&&a()};if(o!=null)return setTimeout(c,o);const{type:h,timeout:g,propCount:v}=ih(e,i);if(!h)return a();const P=h+"end";let k=0;const O=()=>{e.removeEventListener(P,$),c()},$=F=>{F.target===e&&++k>=v&&O()};setTimeout(()=>{k(o[nt]||"").split(", "),l=a(`${xi}Delay`),c=a(`${xi}Duration`),h=Tl(l,c),g=a(`${Ks}Delay`),v=a(`${Ks}Duration`),P=Tl(g,v);let k=null,O=0,$=0;i===xi?h>0&&(k=xi,O=h,$=c.length):i===Ks?P>0&&(k=Ks,O=P,$=v.length):(O=Math.max(h,P),k=O>0?h>P?xi:Ks:null,$=k?k===xi?c.length:v.length:0);const F=k===xi&&/\b(?:transform|all)(?:,|$)/.test(a(`${xi}Property`).toString());return{type:k,timeout:O,propCount:$,hasTransform:F}}function Tl(e,i){for(;e.lengthLl(o)+Ll(e[a])))}function Ll(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ml(e){return(e?e.ownerDocument:document).body.offsetHeight}function sh(e,i,o){const a=e[ho];a&&(i=(i?[i,...a]:[...a]).join(" ")),i==null?e.removeAttribute("class"):o?e.setAttribute("class",i):e.className=i}const or=Symbol("_vod"),gc=Symbol("_vsh"),oh={name:"show",beforeMount(e,{value:i},{transition:o}){e[or]=e.style.display==="none"?"":e.style.display,o&&i?o.beforeEnter(e):qs(e,i)},mounted(e,{value:i},{transition:o}){o&&i&&o.enter(e)},updated(e,{value:i,oldValue:o},{transition:a}){!i!=!o&&(a?i?(a.beforeEnter(e),qs(e,!0),a.enter(e)):a.leave(e,()=>{qs(e,!1)}):qs(e,i))},beforeUnmount(e,{value:i}){qs(e,i)}};function qs(e,i){e.style.display=i?e[or]:"none",e[gc]=!i}const rh=Symbol(""),ah=/(?:^|;)\s*display\s*:/;function lh(e,i,o){const a=e.style,l=pe(o);let c=!1;if(o&&!l){if(i)if(pe(i))for(const h of i.split(";")){const g=h.slice(0,h.indexOf(":")).trim();o[g]==null&&Ys(a,g,"")}else for(const h in i)o[h]==null&&Ys(a,h,"");for(const h in o){h==="display"&&(c=!0);const g=o[h];g!=null?ch(e,h,!pe(i)&&i?i[h]:void 0,g)||Ys(a,h,g):Ys(a,h,"")}}else if(l){if(i!==o){const h=a[rh];h&&(o+=";"+h),a.cssText=o,c=ah.test(o)}}else i&&e.removeAttribute("style");or in e&&(e[or]=c?a.display:"",e[gc]&&(a.display="none"))}const Cl=/\s*!important$/;function Ys(e,i,o){if(pt(o))o.forEach(a=>Ys(e,i,a));else if(o==null&&(o=""),i.startsWith("--"))e.setProperty(i,o);else{const a=uh(e,i);Cl.test(o)?e.setProperty(Li(a),o.replace(Cl,""),"important"):e[a]=o}}const Ol=["Webkit","Moz","ms"],ea={};function uh(e,i){const o=ea[i];if(o)return o;let a=Pn(i);if(a!=="filter"&&a in e)return ea[i]=a;a=au(a);for(let l=0;lna||(gh.then(()=>na=0),na=Date.now());function vh(e,i){const o=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=o.attached)return;const l=o.value;if(pt(l)){const c=a.stopImmediatePropagation;a.stopImmediatePropagation=()=>{c.call(a),a._stopped=!0};const h=l.slice(),g=[a];for(let v=0;ve.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,yh=(e,i,o,a,l,c)=>{const h=l==="svg";i==="class"?sh(e,a,h):i==="style"?lh(e,o,a):lr(i)?ur(i)||fh(e,i,o,a,c):(i[0]==="."?(i=i.slice(1),!0):i[0]==="^"?(i=i.slice(1),!1):bh(e,i,a,h))?(Al(e,i,a),!e.tagName.includes("-")&&(i==="value"||i==="checked"||i==="selected")&&zl(e,i,a,h,c,i!=="value")):e._isVueCE&&(xh(e,i)||e._def.__asyncLoader&&(/[A-Z]/.test(i)||!pe(a)))?Al(e,Pn(i),a,c,i):(i==="true-value"?e._trueValue=a:i==="false-value"&&(e._falseValue=a),zl(e,i,a,h))};function bh(e,i,o,a){if(a)return!!(i==="innerHTML"||i==="textContent"||i in e&&Nl(i)&&Lt(o));if(i==="spellcheck"||i==="draggable"||i==="translate"||i==="autocorrect"||i==="sandbox"&&e.tagName==="IFRAME"||i==="form"||i==="list"&&e.tagName==="INPUT"||i==="type"&&e.tagName==="TEXTAREA")return!1;if(i==="width"||i==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return Nl(i)&&pe(o)?!1:i in e}function xh(e,i){const o=e._def.props;if(!o)return!1;const a=Pn(i);return Array.isArray(o)?o.some(l=>Pn(l)===a):Object.keys(o).some(l=>Pn(l)===a)}const Ti=e=>{const i=e.props["onUpdate:modelValue"]||!1;return pt(i)?o=>Go(i,o):i};function wh(e){e.target.composing=!0}function Bl(e){const i=e.target;i.composing&&(i.composing=!1,i.dispatchEvent(new Event("input")))}const pn=Symbol("_assign");function Dl(e,i,o){return i&&(e=e.trim()),o&&(e=dr(e)),e}const Bt={created(e,{modifiers:{lazy:i,trim:o,number:a}},l){e[pn]=Ti(l);const c=a||l.props&&l.props.type==="number";ri(e,i?"change":"input",h=>{h.target.composing||e[pn](Dl(e.value,o,c))}),(o||c)&&ri(e,"change",()=>{e.value=Dl(e.value,o,c)}),i||(ri(e,"compositionstart",wh),ri(e,"compositionend",Bl),ri(e,"change",Bl))},mounted(e,{value:i}){e.value=i??""},beforeUpdate(e,{value:i,oldValue:o,modifiers:{lazy:a,trim:l,number:c}},h){if(e[pn]=Ti(h),e.composing)return;const g=(c||e.type==="number")&&!/^0\d/.test(e.value)?dr(e.value):e.value,v=i??"";if(g===v)return;const P=e.getRootNode();(P instanceof Document||P instanceof ShadowRoot)&&P.activeElement===e&&e.type!=="range"&&(a&&i===o||l&&e.value.trim()===v)||(e.value=v)}},_c={deep:!0,created(e,i,o){e[pn]=Ti(o),ri(e,"change",()=>{const a=e._modelValue,l=Ps(e),c=e.checked,h=e[pn];if(pt(a)){const g=xa(a,l),v=g!==-1;if(c&&!v)h(a.concat(l));else if(!c&&v){const P=[...a];P.splice(g,1),h(P)}}else if(Ts(a)){const g=new Set(a);c?g.add(l):g.delete(l),h(g)}else h(vc(e,c))})},mounted:Rl,beforeUpdate(e,i,o){e[pn]=Ti(o),Rl(e,i,o)}};function Rl(e,{value:i,oldValue:o},a){e._modelValue=i;let l;if(pt(i))l=xa(i,a.props.value)>-1;else if(Ts(i))l=i.has(a.props.value);else{if(i===o)return;l=Si(i,vc(e,!0))}e.checked!==l&&(e.checked=l)}const kh={created(e,{value:i},o){e.checked=Si(i,o.props.value),e[pn]=Ti(o),ri(e,"change",()=>{e[pn](Ps(e))})},beforeUpdate(e,{value:i,oldValue:o},a){e[pn]=Ti(a),i!==o&&(e.checked=Si(i,a.props.value))}},wi={deep:!0,created(e,{value:i,modifiers:{number:o}},a){const l=Ts(i);ri(e,"change",()=>{const c=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>o?dr(Ps(h)):Ps(h));e[pn](e.multiple?l?new Set(c):c:c[0]),e._assigning=!0,Mu(()=>{e._assigning=!1})}),e[pn]=Ti(a)},mounted(e,{value:i}){Fl(e,i)},beforeUpdate(e,i,o){e[pn]=Ti(o)},updated(e,{value:i}){e._assigning||Fl(e,i)}};function Fl(e,i){const o=e.multiple,a=pt(i);if(!(o&&!a&&!Ts(i))){for(let l=0,c=e.options.length;lString(P)===String(g)):h.selected=xa(i,g)>-1}else h.selected=i.has(g);else if(Si(Ps(h),i)){e.selectedIndex!==l&&(e.selectedIndex=l);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ps(e){return"_value"in e?e._value:e.value}function vc(e,i){const o=i?"_trueValue":"_falseValue";return o in e?e[o]:i}const Sh={created(e,i,o){Wo(e,i,o,null,"created")},mounted(e,i,o){Wo(e,i,o,null,"mounted")},beforeUpdate(e,i,o,a){Wo(e,i,o,a,"beforeUpdate")},updated(e,i,o,a){Wo(e,i,o,a,"updated")}};function Ph(e,i){switch(e){case"SELECT":return wi;case"TEXTAREA":return Bt;default:switch(i){case"checkbox":return _c;case"radio":return kh;default:return Bt}}}function Wo(e,i,o,a,l){const h=Ph(e.tagName,o.props&&o.props.type)[l];h&&h(e,i,o,a)}const Th=["ctrl","shift","alt","meta"],Lh={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,i)=>Th.some(o=>e[`${o}Key`]&&!i.includes(o))},yc=(e,i)=>{if(!e)return e;const o=e._withMods||(e._withMods={}),a=i.join(".");return o[a]||(o[a]=((l,...c)=>{for(let h=0;h{const o=e._withKeys||(e._withKeys={}),a=i.join(".");return o[a]||(o[a]=(l=>{if(!("key"in l))return;const c=Li(l.key);if(i.some(h=>h===c||Mh[h]===c))return e(l)}))},Ch=Ce({patchProp:yh},Yf);let Zl;function Oh(){return Zl||(Zl=Cf(Ch))}const Eh=((...e)=>{const i=Oh().createApp(...e),{mount:o}=i;return i.mount=a=>{const l=Ah(a);if(!l)return;const c=i._component;!Lt(c)&&!c.render&&!c.template&&(c.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const h=o(l,!1,zh(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),h},i});function zh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ah(e){return pe(e)?document.querySelector(e):e}const bc="pv_theme",$l={light:"#EEF0F3",dark:"#0B1730"},rr=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;function xc(){return rr&&rr.matches?"dark":"light"}function Ih(){try{return localStorage.getItem(bc)||"light"}catch{return"light"}}function wc(e){return e==="system"?xc():e}function kc(e){const i=document.documentElement;i.setAttribute("data-theme",e),i.style.backgroundColor=$l[e]||$l.light}const Gi=J(Ih()),ws=J(wc(Gi.value));function ar(e){Gi.value=e;const i=wc(e);ws.value=i,kc(i);try{localStorage.setItem(bc,e)}catch{}}function Hl(){ar(ws.value==="dark"?"light":"dark")}rr&&rr.addEventListener("change",()=>{if(Gi.value==="system"){const e=xc();ws.value=e,kc(e)}});async function Nh(){try{const e=await fetch("/bff/config");return e.ok?await e.json():{apiBase:""}}catch{return{apiBase:""}}}async function Ul(){try{const e=await fetch("/bff/me");return e.ok?await e.json():null}catch{return null}}async function Bh(e,i,o){const a=await fetch("/bff/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:i,apiBase:o})});return{ok:a.ok,status:a.status,body:await a.json().catch(()=>({}))}}async function Dh(){try{await fetch("/bff/logout",{method:"POST"})}catch{}}async function Rh(){try{const e=await fetch("/bff/devices");return e.ok?await e.json():[]}catch{return[]}}async function Fh(){try{const e=await fetch("/bff/users");return e.ok?{ok:!0,status:200,users:(await e.json()).users||[]}:{ok:!1,status:e.status,users:[]}}catch{return{ok:!1,status:0,users:[]}}}async function Vh(e,i,o,a){const l=await fetch("/bff/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:i,role:o,organization:a})});return{ok:l.ok,status:l.status,body:await l.json().catch(()=>({}))}}async function Zh(e,i){const o=await fetch(`/bff/users/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:o.ok,status:o.status,body:await o.json().catch(()=>({}))}}async function $h(e){const i=await fetch(`/bff/users/${encodeURIComponent(e)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Hh(){try{const e=await fetch("/bff/orgs");return e.ok?{ok:!0,status:200,organizations:(await e.json()).organizations||[]}:{ok:!1,status:e.status,organizations:[]}}catch{return{ok:!1,status:0,organizations:[]}}}async function Uh(e){const i=await fetch("/bff/orgs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function jh(e,i){const o=await fetch(`/bff/orgs/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i})});return{ok:o.ok,status:o.status,body:await o.json().catch(()=>({}))}}async function Wh(e){const i=await fetch(`/bff/orgs/${encodeURIComponent(e)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Kh(){try{const e=await fetch("/bff/preferences");if(!e.ok)return null;const i=await e.json();return i&&typeof i.preferences=="object"?i.preferences:null}catch{return null}}async function qh(e){try{return(await fetch("/bff/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:e})})).ok}catch{return!1}}async function Gh(){try{const e=await fetch("/bff/integrations/opensky");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function jl(e){const i=await fetch("/bff/integrations/opensky",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Yh(){const e=await fetch("/bff/integrations/opensky/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function Jh(){try{const e=await fetch("/bff/integrations/filetransfer");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Wl(e){const i=await fetch("/bff/integrations/filetransfer",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Xh(){const e=await fetch("/bff/integrations/filetransfer/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function Qh(){try{const e=await fetch("/bff/integrations/localstorage");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Ko(e){const i=await fetch("/bff/integrations/localstorage",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function tp(){const e=await fetch("/bff/integrations/localstorage/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function ep(){try{const e=await fetch("/bff/integrations/webdav");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Kl(e){const i=await fetch("/bff/integrations/webdav",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function np(){const e=await fetch("/bff/integrations/webdav/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function ip(e,i,o){const a=await fetch(`/bff/devices/${encodeURIComponent(e)}/command`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:i,payload:o})});return{ok:a.ok,body:await a.json().catch(()=>({}))}}const Sc="pv_prefs",ma={name:"",username:"",displayName:"",bio:"",avatar:"",showEmail:!1,fontSize:"md",language:"en",region:"US",dateFormat:"MDY",timeFormat:"24",reduceMotion:!1,twoFactor:!1};function sp(){try{return{...ma,...JSON.parse(localStorage.getItem(Sc)||"{}")||{}}}catch{return{...ma}}}const gt=xe(sp());function Pc(){try{localStorage.setItem(Sc,JSON.stringify(gt))}catch{}}function Tc(e){if(!e||typeof e!="object")return!1;for(const i of Object.keys(ma))i in e&&(gt[i]=e[i]);return!0}const op={sm:15,md:16,lg:18};function za(e){document.documentElement.style.fontSize=(op[e]||16)+"px"}function Aa(e){document.documentElement.classList.toggle("reduce-motion",!!e)}function Lc(e){const i=new Date(e),o=i.getFullYear(),a=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0");let c;switch(gt.dateFormat){case"DMY":c=`${l}/${a}/${o}`;break;case"YMD":c=`${o}/${a}/${l}`;break;case"ISO":c=`${o}-${a}-${l}`;break;default:c=`${a}/${l}/${o}`}let h;return gt.timeFormat==="12"?h=i.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}):h=`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}:${String(i.getSeconds()).padStart(2,"0")}`,{date:c,time:h}}function ql(e){return Lc(e).time}function Gl(e){const i=Lc(e);return`${i.date} ${i.time}`}let Ia=!1,ga=!1,_a=null;function rp(){return{...JSON.parse(JSON.stringify(gt)),themeMode:Gi.value}}function Na(){!Ia||ga||(clearTimeout(_a),_a=setTimeout(()=>{qh(rp())},600))}function ap(e){ga=!0;try{Tc(e),e.themeMode&&ar(e.themeMode),za(gt.fontSize),Aa(gt.reduceMotion),Pc()}finally{ga=!1}}async function Yl(){Ia=!0;const e=await Kh();e&&Object.keys(e).length?ap(e):Na()}function lp(){Ia=!1,clearTimeout(_a)}Je(gt,()=>{Pc(),Na()},{deep:!0});Je(Gi,Na);Je(()=>gt.fontSize,za,{immediate:!0});Je(()=>gt.reduceMotion,Aa,{immediate:!0});const up=["width","height"],Mc={__name:"BrandMark",props:{size:{type:[Number,String],default:28}},setup(e){return(i,o)=>(b(),x("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none","aria-hidden":"true"},[...o[0]||(o[0]=[f("g",{"stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},[f("polyline",{points:"8,30 19,17 30,30",stroke:"var(--accent)"}),f("polyline",{points:"18,33 29,20 40,33",stroke:"currentColor"})],-1)])],8,up))}},cp=["title","aria-label"],dp={key:0,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},fp={key:1,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},hp={__name:"ThemeToggle",setup(e){return(i,o)=>(b(),x("button",{class:"btn-icon",type:"button",title:Ct(ws)==="dark"?"Switch to light":"Switch to dark","aria-label":Ct(ws)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:o[0]||(o[0]=(...a)=>Ct(Hl)&&Ct(Hl)(...a))},[Ct(ws)==="dark"?(b(),x("svg",dp,[...o[1]||(o[1]=[f("circle",{cx:"12",cy:"12",r:"4"},null,-1),f("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(b(),x("svg",fp,[...o[2]||(o[2]=[f("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z"},null,-1)])]))],8,cp))}},pp={class:"relative grid h-full place-items-center p-5"},mp={class:"absolute right-5 top-5"},gp={class:"mb-6 flex items-center gap-3 text-ink"},_p={class:"relative mb-1"},vp=["type"],yp=["aria-label","title"],bp={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},xp={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},wp={key:0,class:"mt-4"},kp={key:1,class:"mt-4 rounded border border-line bg-danger-soft px-3 py-2 text-sm text-danger-fg"},Sp=["disabled"],Pp={__name:"LoginView",props:{defaultApiBase:{type:String,default:""}},emits:["signed-in"],setup(e,{emit:i}){const o=e,a=i,l=J(""),c=J(""),h=J(localStorage.getItem("api_url")||o.defaultApiBase||"http://localhost:8080"),g=J(!1),v=J(!1),P=J(!1),k=J("");async function O(){P.value=!0,k.value="",localStorage.setItem("api_url",h.value.trim());const{ok:$,status:F,body:nt}=await Bh(l.value.trim(),c.value,h.value.trim());if(P.value=!1,$){a("signed-in",nt.email);return}k.value=F===400?"Invalid email or password.":F===502?"API server can't reach PocketBase.":nt.message||nt.error||"Cannot reach the API server."}return($,F)=>(b(),x("div",pp,[f("div",mp,[E(hp)]),f("form",{class:"panel w-[380px] p-8 shadow-md",onSubmit:yc(O,["prevent"])},[f("div",gp,[E(Mc,{size:34}),F[5]||(F[5]=f("div",{class:"leading-tight"},[f("div",{class:"text-mode"},"PilotVault"),f("div",{class:"eyebrow mt-0.5"},"Control panel")],-1))]),F[9]||(F[9]=f("label",{class:"eyebrow mb-1.5 block"},"Email",-1)),xt(f("input",{"onUpdate:modelValue":F[0]||(F[0]=nt=>l.value=nt),type:"email",autocomplete:"username",required:"",class:"field mb-4",placeholder:"you@example.com"},null,512),[[Bt,l.value]]),F[10]||(F[10]=f("label",{class:"eyebrow mb-1.5 block"},"Password",-1)),f("div",_p,[xt(f("input",{"onUpdate:modelValue":F[1]||(F[1]=nt=>c.value=nt),type:v.value?"text":"password",autocomplete:"current-password",required:"",class:"field w-full pr-10",placeholder:"••••••••"},null,8,vp),[[Sh,c.value]]),f("button",{type:"button",class:"absolute inset-y-0 right-0 grid w-10 place-items-center text-ink-muted transition hover:text-ink-secondary","aria-label":v.value?"Hide password":"Show password",title:v.value?"Hide password":"Show password",onClick:F[2]||(F[2]=nt=>v.value=!v.value)},[v.value?(b(),x("svg",bp,[...F[6]||(F[6]=[f("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"},null,-1),f("line",{x1:"1",y1:"1",x2:"23",y2:"23"},null,-1)])])):(b(),x("svg",xp,[...F[7]||(F[7]=[f("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},null,-1),f("circle",{cx:"12",cy:"12",r:"3"},null,-1)])]))],8,yp)]),g.value?(b(),x("div",wp,[F[8]||(F[8]=f("label",{class:"eyebrow mb-1.5 block"},"API Server",-1)),xt(f("input",{"onUpdate:modelValue":F[3]||(F[3]=nt=>h.value=nt),type:"text",class:"field font-mono",placeholder:"10.2.1.101:8080"},null,512),[[Bt,h.value]])])):V("",!0),k.value?(b(),x("p",kp,M(k.value),1)):V("",!0),f("button",{type:"submit",class:"btn-accent mt-6 w-full",disabled:P.value},M(P.value?"Signing in…":"Sign in"),9,Sp),f("button",{type:"button",class:"mx-auto mt-3 block text-xs text-ink-muted transition hover:text-ink-secondary",onClick:F[4]||(F[4]=nt=>g.value=!g.value)},M(g.value?"Hide server settings":"Server settings"),1)],32)]))}};function Tp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Js={exports:{}};/* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */var Lp=Js.exports,Jl;function Mp(){return Jl||(Jl=1,(function(e,i){(function(o,a){a(i)})(Lp,(function(o){var a="1.9.4";function l(t){var n,s,r,u;for(s=1,r=arguments.length;s"u"||!L||!L.Mixin)){t=ut(t)?t:[t];for(var n=0;n0?Math.floor(t):Math.ceil(t)};Y.prototype={clone:function(){return new Y(this.x,this.y)},add:function(t){return this.clone()._add(rt(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(rt(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new Y(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new Y(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ue(this.x),this.y=ue(this.y),this},distanceTo:function(t){t=rt(t);var n=t.x-this.x,s=t.y-this.y;return Math.sqrt(n*n+s*s)},equals:function(t){return t=rt(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=rt(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+$(this.x)+", "+$(this.y)+")"}};function rt(t,n,s){return t instanceof Y?t:ut(t)?new Y(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new Y(t.x,t.y):new Y(t,n,s)}function yt(t,n){if(t)for(var s=n?[t,n]:t,r=0,u=s.length;r=this.min.x&&s.x<=this.max.x&&n.y>=this.min.y&&s.y<=this.max.y},intersects:function(t){t=Kt(t);var n=this.min,s=this.max,r=t.min,u=t.max,p=u.x>=n.x&&r.x<=s.x,S=u.y>=n.y&&r.y<=s.y;return p&&S},overlaps:function(t){t=Kt(t);var n=this.min,s=this.max,r=t.min,u=t.max,p=u.x>n.x&&r.xn.y&&r.y=n.lat&&u.lat<=s.lat&&r.lng>=n.lng&&u.lng<=s.lng},intersects:function(t){t=qt(t);var n=this._southWest,s=this._northEast,r=t.getSouthWest(),u=t.getNorthEast(),p=u.lat>=n.lat&&r.lat<=s.lat,S=u.lng>=n.lng&&r.lng<=s.lng;return p&&S},overlaps:function(t){t=qt(t);var n=this._southWest,s=this._northEast,r=t.getSouthWest(),u=t.getNorthEast(),p=u.lat>n.lat&&r.latn.lng&&r.lng1,kr=(function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",O,n),window.removeEventListener("testPassiveEventSupport",O,n)}catch{}return t})(),Sr=(function(){return!!document.createElement("canvas").getContext})(),Cs=!!(document.createElementNS&&B("svg").createSVGRect),vo=!!Cs&&(function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Pr=!Cs&&(function(){try{var t=document.createElement("div");t.innerHTML='';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}})(),Tr=navigator.platform.indexOf("Mac")===0,Lr=navigator.platform.indexOf("Linux")===0;function Et(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var it={ie:j,ielt9:A,edge:U,webkit:R,android:ct,android23:Q,androidStock:dt,opera:Mt,chrome:at,gecko:Rt,safari:ne,phantom:ae,opera12:fe,win:ke,ie3d:_n,webkit3d:ui,gecko3d:ve,any3d:Ae,mobile:Cn,mobileWebkit:Fe,mobileWebkit3d:Yi,msPointer:Oe,pointer:Ve,touch:xr,touchNative:he,mobileOpera:_o,mobileGecko:Ms,retina:wr,passiveEvents:kr,canvas:Sr,svg:Cs,vml:Pr,inlineSvg:vo,mac:Tr,linux:Lr},Ji=it.msPointer?"MSPointerDown":"pointerdown",Ee=it.msPointer?"MSPointerMove":"pointermove",ci=it.msPointer?"MSPointerUp":"pointerup",Mi=it.msPointer?"MSPointerCancel":"pointercancel",di={touchstart:Ji,touchmove:Ee,touchend:ci,touchcancel:Mi},sn={touchstart:bo,touchmove:Ze,touchend:Ze,touchcancel:Ze},Xe={},yo=!1;function Os(t,n,s){return n==="touchstart"&&fi(),sn[n]?(s=sn[n].bind(this,s),t.addEventListener(di[n],s,!1),s):(console.warn("wrong event specified:",n),O)}function Es(t,n,s){if(!di[n]){console.warn("wrong event specified:",n);return}t.removeEventListener(di[n],s,!1)}function Mr(t){Xe[t.pointerId]=t}function on(t){Xe[t.pointerId]&&(Xe[t.pointerId]=t)}function vn(t){delete Xe[t.pointerId]}function fi(){yo||(document.addEventListener(Ji,Mr,!0),document.addEventListener(Ee,on,!0),document.addEventListener(ci,vn,!0),document.addEventListener(Mi,vn,!0),yo=!0)}function Ze(t,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var s in Xe)n.touches.push(Xe[s]);n.changedTouches=[n],t(n)}}function bo(t,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Se(n),Ze(t,n)}function zs(t){var n={},s,r;for(r in t)s=t[r],n[r]=s&&s.bind?s.bind(t):s;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var Cr=200;function Or(t,n){t.addEventListener("dblclick",n);var s=0,r;function u(p){if(p.detail!==1){r=p.detail;return}if(!(p.pointerType==="mouse"||p.sourceCapabilities&&!p.sourceCapabilities.firesTouchEvents)){var S=So(p);if(!(S.some(function(z){return z instanceof HTMLLabelElement&&z.attributes.for})&&!S.some(function(z){return z instanceof HTMLInputElement||z instanceof HTMLSelectElement}))){var C=Date.now();C-s<=Cr?(r++,r===2&&n(zs(p))):r=1,s=C}}}return t.addEventListener("click",u),{dblclick:n,simDblclick:u}}function Er(t,n){t.removeEventListener("dblclick",n.dblclick),t.removeEventListener("click",n.simDblclick)}var As=Xi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),hi=Xi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),xo=hi==="webkitTransition"||hi==="OTransition"?hi+"End":"transitionend";function wo(t){return typeof t=="string"?document.getElementById(t):t}function Ci(t,n){var s=t.style[n]||t.currentStyle&&t.currentStyle[n];if((!s||s==="auto")&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);s=r?r[n]:null}return s==="auto"?null:s}function W(t,n,s){var r=document.createElement(t);return r.className=n||"",s&&s.appendChild(r),r}function Yt(t){var n=t.parentNode;n&&n.removeChild(t)}function Un(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function rn(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function yn(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function pi(t,n){if(t.classList!==void 0)return t.classList.contains(n);var s=Oi(t);return s.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(s)}function mt(t,n){if(t.classList!==void 0)for(var s=nt(n),r=0,u=s.length;r0?2*window.devicePixelRatio:1;function To(t){return it.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Ar:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Wn(t,n){var s=n.relatedTarget;if(!s)return!0;try{for(;s&&s!==t;)s=s.parentNode}catch{return!1}return s!==t}var Lo={__proto__:null,on:St,off:Jt,stopPropagation:_e,disableScrollPropagation:En,disableClickPropagation:_i,preventDefault:Se,stop:xn,getPropagationPath:So,getMousePosition:Po,getWheelDelta:To,isExternalTarget:Wn,addListener:St,removeListener:Jt},Ai=Vt.extend({run:function(t,n,s,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=s||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=On(t),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Tt(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,s=this._duration*1e3;nthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,n){this._enforcingBounds=!0;var s=this.getCenter(),r=this._limitCenter(s,this._zoom,qt(t));return s.equals(r)||this.panTo(r,n),this._enforcingBounds=!1,this},panInside:function(t,n){n=n||{};var s=rt(n.paddingTopLeft||n.padding||[0,0]),r=rt(n.paddingBottomRight||n.padding||[0,0]),u=this.project(this.getCenter()),p=this.project(t),S=this.getPixelBounds(),C=Kt([S.min.add(s),S.max.subtract(r)]),z=C.getSize();if(!C.contains(p)){this._enforcingBounds=!0;var H=p.subtract(C.getCenter()),et=C.extend(p).getSize().subtract(z);u.x+=H.x<0?-et.x:et.x,u.y+=H.y<0?-et.y:et.y,this.panTo(this.unproject(u),n),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},t===!0?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),r=n.divideBy(2).round(),u=s.divideBy(2).round(),p=r.subtract(u);return!p.x&&!p.y?this:(t.animate&&t.pan?this.panBy(p):(t.pan&&this._rawPanBy(p),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(h(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:s}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=l({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=h(this._handleGeolocationResponse,this),s=h(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,s,t):navigator.geolocation.getCurrentPosition(n,s,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var n=t.code,s=t.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+s+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n=t.coords.latitude,s=t.coords.longitude,r=new Ut(n,s),u=r.toBounds(t.coords.accuracy*2),p=this._locateOptions;if(p.setView){var S=this.getBoundsZoom(u);this.setView(r,p.maxZoom?Math.min(S,p.maxZoom):S)}var C={latlng:r,bounds:u,timestamp:t.timestamp};for(var z in t.coords)typeof t.coords[z]=="number"&&(C[z]=t.coords[z]);this.fire("locationfound",C)}},addHandler:function(t,n){if(!n)return this;var s=this[t]=new n(this);return this._handlers.push(s),this.options[t]&&s.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Yt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(G(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)Yt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){var s="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=W("div",s,n||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),n=this.unproject(t.getBottomLeft()),s=this.unproject(t.getTopRight());return new ge(n,s)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,n,s){t=qt(t),s=rt(s||[0,0]);var r=this.getZoom()||0,u=this.getMinZoom(),p=this.getMaxZoom(),S=t.getNorthWest(),C=t.getSouthEast(),z=this.getSize().subtract(s),H=Kt(this.project(C,r),this.project(S,r)).getSize(),et=it.any3d?this.options.zoomSnap:1,_t=z.x/H.x,Nt=z.y/H.y,He=n?Math.max(_t,Nt):Math.min(_t,Nt);return r=this.getScaleZoom(He,r),et&&(r=Math.round(r/(et/100))*(et/100),r=n?Math.ceil(r/et)*et:Math.floor(r/et)*et),Math.max(u,Math.min(p,r))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Y(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){var s=this._getTopLeftPoint(t,n);return new yt(s,s.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,n){var s=this.options.crs;return n=n===void 0?this._zoom:n,s.scale(t)/s.scale(n)},getScaleZoom:function(t,n){var s=this.options.crs;n=n===void 0?this._zoom:n;var r=s.zoom(t*s.scale(n));return isNaN(r)?1/0:r},project:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(Pt(t),n)},unproject:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(rt(t),n)},layerPointToLatLng:function(t){var n=rt(t).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(t){var n=this.project(Pt(t))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Pt(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(qt(t))},distance:function(t,n){return this.options.crs.distance(Pt(t),Pt(n))},containerPointToLayerPoint:function(t){return rt(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return rt(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var n=this.containerPointToLayerPoint(rt(t));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Pt(t)))},mouseEventToContainerPoint:function(t){return Po(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var n=this._container=wo(t);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");St(n,"scroll",this._onScroll,this),this._containerId=v(n)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&it.any3d,mt(t,"leaflet-container"+(it.touch?" leaflet-touch":"")+(it.retina?" leaflet-retina":"")+(it.ielt9?" leaflet-oldie":"")+(it.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=Ci(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),le(this._mapPane,new Y(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(mt(t.markerPane,"leaflet-zoom-hide"),mt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n,s){le(this._mapPane,new Y(0,0));var r=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var u=this._zoom!==n;this._moveStart(u,s)._move(t,n)._moveEnd(u),this.fire("viewreset"),r&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,s,r){n===void 0&&(n=this._zoom);var u=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),r?s&&s.pinch&&this.fire("zoom",s):((u||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return G(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){le(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[v(this._container)]=this;var n=t?Jt:St;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),it.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){G(this._resizeRequest),this._resizeRequest=Tt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,n){for(var s=[],r,u=n==="mouseout"||n==="mouseover",p=t.target||t.srcElement,S=!1;p;){if(r=this._targets[v(p)],r&&(n==="click"||n==="preclick")&&this._draggableMoved(r)){S=!0;break}if(r&&r.listens(n,!0)&&(u&&!Wn(p,t)||(s.push(r),u))||p===this._container)break;p=p.parentNode}return!s.length&&!S&&!u&&this.listens(n,!0)&&(s=[this]),s},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var n=t.target||t.srcElement;if(!(!this._loaded||n._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(n))){var s=t.type;s==="mousedown"&&es(n),this._fireDOMEvent(t,s)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,s){if(t.type==="click"){var r=l({},t);r.type="preclick",this._fireDOMEvent(r,r.type,s)}var u=this._findEventTargets(t,n);if(s){for(var p=[],S=0;S0?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),s=this.getMaxZoom(),r=it.any3d?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(n,Math.min(s,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){te(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){var s=this._getCenterOffset(t)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(s)?!1:(this.panBy(s,n),!0)},_createAnimProxy:function(){var t=this._proxy=W("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(n){var s=As,r=this._proxy.style[s];ye(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),r===this._proxy.style[s]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Yt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),n=this.getZoom();ye(this._proxy,this.project(t,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,s){if(this._animatingZoom)return!0;if(s=s||{},!this._zoomAnimated||s.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(n),u=this._getCenterOffset(t)._divideBy(1-1/r);return s.animate!==!0&&!this.getSize().contains(u)?!1:(Tt(function(){this._moveStart(!0,s.noMoveStart||!1)._animateZoom(t,n,!0)},this),!0)},_animateZoom:function(t,n,s,r){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,mt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:r}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(h(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&te(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function ss(t,n){return new zt(t,n)}var $e=It.extend({options:{position:"topright"},initialize:function(t){q(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var n=this._container=this.onAdd(t),s=this.getPosition(),r=t._controlCorners[s];return mt(n,"leaflet-control"),s.indexOf("bottom")!==-1?r.insertBefore(n,r.firstChild):r.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Yt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ii=function(t){return new $e(t)};zt.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},n="leaflet-",s=this._controlContainer=W("div",n+"control-container",this._container);function r(u,p){var S=n+u+" "+n+p;t[u+p]=W("div",S,s)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Yt(this._controlCorners[t]);Yt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Mo=$e.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,s,r){return s1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=n&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var n=this._getLayer(v(t.target)),s=n.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;s&&this._map.fire(s,n)},_createRadioElement:function(t,n){var s='",r=document.createElement("div");return r.innerHTML=s,r.firstChild},_addItem:function(t){var n=document.createElement("label"),s=this._map.hasLayer(t.layer),r;t.overlay?(r=document.createElement("input"),r.type="checkbox",r.className="leaflet-control-layers-selector",r.defaultChecked=s):r=this._createRadioElement("leaflet-base-layers_"+v(this),s),this._layerControlInputs.push(r),r.layerId=v(t.layer),St(r,"click",this._onInputClick,this);var u=document.createElement("span");u.innerHTML=" "+t.name;var p=document.createElement("span");n.appendChild(p),p.appendChild(r),p.appendChild(u);var S=t.overlay?this._overlaysList:this._baseLayersList;return S.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,n,s,r=[],u=[];this._handlingClick=!0;for(var p=t.length-1;p>=0;p--)n=t[p],s=this._getLayer(n.layerId).layer,n.checked?r.push(s):n.checked||u.push(s);for(p=0;p=0;u--)n=t[u],s=this._getLayer(n.layerId).layer,n.disabled=s.options.minZoom!==void 0&&rs.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,St(t,"click",Se),this.expand();var n=this;setTimeout(function(){Jt(t,"click",Se),n._preventClick=!1})}}),Ir=function(t,n,s){return new Mo(t,n,s)},Ke=$e.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",s=W("div",n+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,n+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,n+"-out",s,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),s},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,n,s,r,u){var p=W("a",s,r);return p.innerHTML=t,p.href="#",p.title=n,p.setAttribute("role","button"),p.setAttribute("aria-label",n),_i(p),St(p,"click",xn),St(p,"click",u,this),St(p,"click",this._refocusOnMap,this),p},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";te(this._zoomInButton,n),te(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(mt(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(mt(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});zt.mergeOptions({zoomControl:!0}),zt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ke,this.addControl(this.zoomControl))});var Nr=function(t){return new Ke(t)},Co=$e.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",s=W("div",n),r=this.options;return this._addScales(r,n+"-line",s),t.on(r.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),s},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,n,s){t.metric&&(this._mScale=W("div",n,s)),t.imperial&&(this._iScale=W("div",n,s))},_update:function(){var t=this._map,n=t.getSize().y/2,s=t.distance(t.containerPointToLatLng([0,n]),t.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(s)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t),s=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,s,n/t)},_updateImperial:function(t){var n=t*3.2808399,s,r,u;n>5280?(s=n/5280,r=this._getRoundNum(s),this._updateScale(this._iScale,r+" mi",r/s)):(u=this._getRoundNum(n),this._updateScale(this._iScale,u+" ft",u/n))},_updateScale:function(t,n,s){t.style.width=Math.round(this.options.maxWidth*s)+"px",t.innerHTML=n},_getRoundNum:function(t){var n=Math.pow(10,(Math.floor(t)+"").length-1),s=t/n;return s=s>=10?10:s>=5?5:s>=3?3:s>=2?2:1,n*s}}),Br=function(t){return new Co(t)},os='',Kn=$e.extend({options:{position:"bottomright",prefix:''+(it.inlineSvg?os+" ":"")+"Leaflet"},initialize:function(t){q(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=W("div","leaflet-control-attribution"),_i(this._container);for(var n in t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var n in this._attributions)this._attributions[n]&&t.push(n);var s=[];this.options.prefix&&s.push(this.options.prefix),t.length&&s.push(t.join(", ")),this._container.innerHTML=s.join(' ')}}});zt.mergeOptions({attributionControl:!0}),zt.addInitHook(function(){this.options.attributionControl&&new Kn().addTo(this)});var rs=function(t){return new Kn(t)};$e.Layers=Mo,$e.Zoom=Ke,$e.Scale=Co,$e.Attribution=Kn,Ii.layers=Ir,Ii.zoom=Nr,Ii.scale=Br,Ii.attribution=rs;var ee=It.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ee.addTo=function(t,n){return t.addHandler(n,this),this};var vi={Events:kt},Ni=it.touch?"touchstart mousedown":"mousedown",qe=Vt.extend({options:{clickTolerance:3},initialize:function(t,n,s,r){q(this,r),this._element=t,this._dragStartTarget=n||t,this._preventOutline=s},enable:function(){this._enabled||(St(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(qe._dragging===this&&this.finishDrag(!0),Jt(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!pi(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){qe._dragging===this&&this.finishDrag();return}if(!(qe._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(qe._dragging=this,this._preventOutline&&es(this._element),Ns(),mi(),!this._moving)){this.fire("down");var n=t.touches?t.touches[0]:t,s=ko(this._element);this._startPoint=new Y(n.clientX,n.clientY),this._startPos=On(this._element),this._parentScale=Rs(s);var r=t.type==="mousedown";St(document,r?"mousemove":"touchmove",this._onMove,this),St(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var n=t.touches&&t.touches.length===1?t.touches[0]:t,s=new Y(n.clientX,n.clientY)._subtract(this._startPoint);!s.x&&!s.y||Math.abs(s.x)+Math.abs(s.y)p&&(S=C,p=z);p>s&&(n[S]=1,$t(t,n,s,r,S),$t(t,n,s,S,u))}function zn(t,n){for(var s=[t[0]],r=1,u=0,p=t.length;rn&&(s.push(t[r]),u=r);return un.max.x&&(s|=2),t.yn.max.y&&(s|=8),s}function Fr(t,n){var s=n.x-t.x,r=n.y-t.y;return s*s+r*r}function In(t,n,s,r){var u=n.x,p=n.y,S=s.x-u,C=s.y-p,z=S*S+C*C,H;return z>0&&(H=((t.x-u)*S+(t.y-p)*C)/z,H>1?(u=s.x,p=s.y):H>0&&(u+=S*H,p+=C*H)),S=t.x-u,C=t.y-p,r?S*S+C*C:new Y(u,p)}function Le(t){return!ut(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Fi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Le(t)}function yi(t,n){var s,r,u,p,S,C,z,H;if(!t||t.length===0)throw new Error("latlngs not passed");Le(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var et=Pt([0,0]),_t=qt(t),Nt=_t.getNorthWest().distanceTo(_t.getSouthWest())*_t.getNorthEast().distanceTo(_t.getNorthWest());Nt<1700&&(et=qn(t));var He=t.length,Me=[];for(s=0;sr){z=(p-r)/u,H=[C.x-z*(C.x-S.x),C.y-z*(C.y-S.y)];break}var Ge=n.unproject(rt(H));return Pt([Ge.lat+et.lat,Ge.lng+et.lng])}var wn={__proto__:null,simplify:Gn,pointToSegmentDistance:Di,closestPointOnSegment:Dr,clipSegment:as,_getEdgeIntersection:ls,_getBitCode:An,_sqClosestPointOnSegment:In,isFlat:Le,_flat:Fi,polylineCenter:yi},kn={project:function(t){return new Y(t.lng,t.lat)},unproject:function(t){return new Ut(t.y,t.x)},bounds:new yt([-180,-90],[180,90])},Vi={R:6378137,R_MINOR:6356752314245179e-9,bounds:new yt([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var n=Math.PI/180,s=this.R,r=t.lat*n,u=this.R_MINOR/s,p=Math.sqrt(1-u*u),S=p*Math.sin(r),C=Math.tan(Math.PI/4-r/2)/Math.pow((1-S)/(1+S),p/2);return r=-s*Math.log(Math.max(C,1e-10)),new Y(t.lng*n*s,r)},unproject:function(t){for(var n=180/Math.PI,s=this.R,r=this.R_MINOR/s,u=Math.sqrt(1-r*r),p=Math.exp(-t.y/s),S=Math.PI/2-2*Math.atan(p),C=0,z=.1,H;C<15&&Math.abs(z)>1e-7;C++)H=u*Math.sin(S),H=Math.pow((1-H)/(1+H),u/2),z=Math.PI/2-2*Math.atan(p*H)-S,S+=z;return new Ut(S*n,t.x*n/s)}},Eo={__proto__:null,LonLat:kn,Mercator:Vi,SphericalMercator:we},Vr=l({},Te,{code:"EPSG:3395",projection:Vi,transformation:(function(){var t=.5/(Math.PI*Vi.R);return _(t,.5,-t,.5)})()}),Vs=l({},Te,{code:"EPSG:4326",projection:kn,transformation:_(1/180,1,-1/180,.5)}),zo=l({},Pe,{projection:kn,transformation:_(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,n){var s=n.lng-t.lng,r=n.lat-t.lat;return Math.sqrt(s*s+r*r)},infinite:!0});Pe.Earth=Te,Pe.EPSG3395=Vr,Pe.EPSG3857=m,Pe.EPSG900913=T,Pe.EPSG4326=Vs,Pe.Simple=zo;var Qe=Vt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[v(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[v(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n=t.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var s=this.getEvents();n.on(s,this),this.once("remove",function(){n.off(s,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});zt.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var n=v(t);return this._layers[n]?this:(this._layers[n]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var n=v(t);return this._layers[n]?(this._loaded&&t.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return v(t)in this._layers},eachLayer:function(t,n){for(var s in this._layers)t.call(n,this._layers[s]);return this},_addLayers:function(t){t=t?ut(t)?t:[t]:[];for(var n=0,s=t.length;nthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&n[0]instanceof Ut&&n[0].equals(n[s-1])&&n.pop(),n},_setLatLngs:function(t){Jn.prototype._setLatLngs.call(this,t),Le(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Le(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,n=this.options.weight,s=new Y(n,n);if(t=new yt(t.min.subtract(s),t.max.add(s)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var r=0,u=this._rings.length,p;rt.y!=u.y>t.y&&t.x<(u.x-r.x)*(t.y-r.y)/(u.y-r.y)+r.x&&(n=!n);return n||Jn.prototype._containsPoint.call(this,t,!0)}});function Ec(t,n){return new ds(t,n)}var Xn=Sn.extend({initialize:function(t,n){q(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n=ut(t)?t:t.features,s,r,u;if(n){for(s=0,r=n.length;s0&&u.push(u[0].slice()),u}function fs(t,n){return t.feature?l({},t.feature,{geometry:n}):Do(n)}function Do(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Hr={toGeoJSON:function(t){return fs(this,{type:"Point",coordinates:$r(this.getLatLng(),t)})}};cs.include(Hr),Ht.include(Hr),Z.include(Hr),Jn.include({toGeoJSON:function(t){var n=!Le(this._latlngs),s=Bo(this._latlngs,n?1:0,!1,t);return fs(this,{type:(n?"Multi":"")+"LineString",coordinates:s})}}),ds.include({toGeoJSON:function(t){var n=!Le(this._latlngs),s=n&&!Le(this._latlngs[0]),r=Bo(this._latlngs,s?2:n?1:0,!0,t);return n||(r=[r]),fs(this,{type:(s?"Multi":"")+"Polygon",coordinates:r})}}),bi.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(s){n.push(s.toGeoJSON(t).geometry.coordinates)}),fs(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(t);var s=n==="GeometryCollection",r=[];return this.eachLayer(function(u){if(u.toGeoJSON){var p=u.toGeoJSON(t);if(s)r.push(p.geometry);else{var S=Do(p);S.type==="FeatureCollection"?r.push.apply(r,S.features):r.push(S)}}}),s?fs(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});function Da(t,n){return new Xn(t,n)}var zc=Da,Ro=Qe.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,s){this._url=t,this._bounds=qt(n),q(this,s)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(mt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Yt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&rn(this._image),this},bringToBack:function(){return this._map&&yn(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=qt(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",n=this._image=t?this._url:W("img");if(mt(n,"leaflet-image-layer"),this._zoomAnimated&&mt(n,"leaflet-zoom-animated"),this.options.className&&mt(n,this.options.className),n.onselectstart=O,n.onmousemove=O,n.onload=h(this.fire,this,"load"),n.onerror=h(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),s=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ye(this._image,s,n)},_reset:function(){var t=this._image,n=new yt(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),s=n.getSize();le(t,n.min),t.style.width=s.x+"px",t.style.height=s.y+"px"},_updateOpacity:function(){Ie(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ac=function(t,n,s){return new Ro(t,n,s)},Ra=Ro.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",n=this._image=t?this._url:W("video");if(mt(n,"leaflet-image-layer"),this._zoomAnimated&&mt(n,"leaflet-zoom-animated"),this.options.className&&mt(n,this.options.className),n.onselectstart=O,n.onmousemove=O,n.onloadeddata=h(this.fire,this,"load"),t){for(var s=n.getElementsByTagName("source"),r=[],u=0;u0?r:[n.src];return}ut(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var p=0;pu?(n.height=u+"px",mt(t,p)):te(t,p),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),s=this._getAnchor();le(this._container,n.add(s))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,n=parseInt(Ci(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+n,r=this._containerWidth,u=new Y(this._containerLeft,-s-this._containerBottom);u._add(On(this._container));var p=t.layerPointToContainerPoint(u),S=rt(this.options.autoPanPadding),C=rt(this.options.autoPanPaddingTopLeft||S),z=rt(this.options.autoPanPaddingBottomRight||S),H=t.getSize(),et=0,_t=0;p.x+r+z.x>H.x&&(et=p.x+r-H.x+z.x),p.x-et-C.x<0&&(et=p.x-C.x),p.y+s+z.y>H.y&&(_t=p.y+s-H.y+z.y),p.y-_t-C.y<0&&(_t=p.y-C.y),(et||_t)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([et,_t]))}},_getAnchor:function(){return rt(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Bc=function(t,n){return new Fo(t,n)};zt.mergeOptions({closePopupOnClick:!0}),zt.include({openPopup:function(t,n,s){return this._initOverlay(Fo,t,n,s).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),Qe.include({bindPopup:function(t,n){return this._popup=this._initOverlay(Fo,this._popup,t,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Sn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){xn(t);var n=t.layer||t.target;if(this._popup._source===n&&!(n instanceof d)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=n,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Vo=Nn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Nn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Nn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Nn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",n=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=W("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+v(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n,s,r=this._map,u=this._container,p=r.latLngToContainerPoint(r.getCenter()),S=r.layerPointToContainerPoint(t),C=this.options.direction,z=u.offsetWidth,H=u.offsetHeight,et=rt(this.options.offset),_t=this._getAnchor();C==="top"?(n=z/2,s=H):C==="bottom"?(n=z/2,s=0):C==="center"?(n=z/2,s=H/2):C==="right"?(n=0,s=H/2):C==="left"?(n=z,s=H/2):S.xthis.options.maxZoom||sr?this._retainParent(u,p,S,r):!1)},_retainChildren:function(t,n,s,r){for(var u=2*t;u<2*t+2;u++)for(var p=2*n;p<2*n+2;p++){var S=new Y(u,p);S.z=s+1;var C=this._tileCoordsToKey(S),z=this._tiles[C];if(z&&z.active){z.retain=!0;continue}else z&&z.loaded&&(z.retain=!0);s+1this.options.maxZoom||this.options.minZoom!==void 0&&u1){this._setView(t,s);return}for(var _t=u.min.y;_t<=u.max.y;_t++)for(var Nt=u.min.x;Nt<=u.max.x;Nt++){var He=new Y(Nt,_t);if(He.z=this._tileZoom,!!this._isValidTile(He)){var Me=this._tiles[this._tileCoordsToKey(He)];Me?Me.current=!0:S.push(He)}}if(S.sort(function(Ge,ps){return Ge.distanceTo(p)-ps.distanceTo(p)}),S.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var un=document.createDocumentFragment();for(Nt=0;Nts.max.x)||!n.wrapLat&&(t.ys.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return qt(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,s=this.getTileSize(),r=t.scaleBy(s),u=r.add(s),p=n.unproject(r,t.z),S=n.unproject(u,t.z);return[p,S]},_tileCoordsToBounds:function(t){var n=this._tileCoordsToNwSe(t),s=new ge(n[0],n[1]);return this.options.noWrap||(s=this._map.wrapLatLngBounds(s)),s},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var n=t.split(":"),s=new Y(+n[0],+n[1]);return s.z=+n[2],s},_removeTile:function(t){var n=this._tiles[t];n&&(Yt(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){mt(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=O,t.onmousemove=O,it.ielt9&&this.options.opacity<1&&Ie(t,this.options.opacity)},_addTile:function(t,n){var s=this._getTilePos(t),r=this._tileCoordsToKey(t),u=this.createTile(this._wrapCoords(t),h(this._tileReady,this,t));this._initTile(u),this.createTile.length<2&&Tt(h(this._tileReady,this,t,null,u)),le(u,s),this._tiles[r]={el:u,coords:t,current:!0},n.appendChild(u),this.fire("tileloadstart",{tile:u,coords:t})},_tileReady:function(t,n,s){n&&this.fire("tileerror",{error:n,tile:s,coords:t});var r=this._tileCoordsToKey(t);s=this._tiles[r],s&&(s.loaded=+new Date,this._map._fadeAnimated?(Ie(s.el,0),G(this._fadeFrame),this._fadeFrame=Tt(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),n||(mt(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it.ielt9||!this._map._fadeAnimated?Tt(this._pruneTiles,this):setTimeout(h(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new Y(this._wrapX?k(t.x,this._wrapX):t.x,this._wrapY?k(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new yt(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Fc(t){return new $s(t)}var hs=$s.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,n){this._url=t,n=q(this,n),n.detectRetina&&it.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,n){return this._url===t&&n===void 0&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var s=document.createElement("img");return St(s,"load",h(this._tileOnLoad,this,n,s)),St(s,"error",h(this._tileOnError,this,n,s)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(s.referrerPolicy=this.options.referrerPolicy),s.alt="",s.src=this.getTileUrl(t),s},getTileUrl:function(t){var n={r:it.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var s=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=s),n["-y"]=s}return bt(this._url,l(n,this.options))},_tileOnLoad:function(t,n){it.ielt9?setTimeout(h(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,s){var r=this.options.errorTileUrl;r&&n.getAttribute("src")!==r&&(n.src=r),t(s,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom,s=this.options.zoomReverse,r=this.options.zoomOffset;return s&&(t=n-t),t+r},_getSubdomain:function(t){var n=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var t,n;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=O,n.onerror=O,!n.complete)){n.src=ft;var s=this._tiles[t].coords;Yt(n),delete this._tiles[t],this.fire("tileabort",{tile:n,coords:s})}},_removeTile:function(t){var n=this._tiles[t];if(n)return n.el.setAttribute("src",ft),$s.prototype._removeTile.call(this,t)},_tileReady:function(t,n,s){if(!(!this._map||s&&s.getAttribute("src")===ft))return $s.prototype._tileReady.call(this,t,n,s)}});function Za(t,n){return new hs(t,n)}var $a=hs.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var s=l({},this.defaultWmsParams);for(var r in n)r in this.options||(s[r]=n[r]);n=q(this,n);var u=n.detectRetina&&it.retina?2:1,p=this.getTileSize();s.width=p.x*u,s.height=p.y*u,this.wmsParams=s},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,hs.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),s=this._crs,r=Kt(s.project(n[0]),s.project(n[1])),u=r.min,p=r.max,S=(this._wmsVersion>=1.3&&this._crs===Vs?[u.y,u.x,p.y,p.x]:[u.x,u.y,p.x,p.y]).join(","),C=hs.prototype.getTileUrl.call(this,t);return C+At(this.wmsParams,C,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+S},setParams:function(t,n){return l(this.wmsParams,t),n||this.redraw(),this}});function Vc(t,n){return new $a(t,n)}hs.WMS=$a,Za.wms=Vc;var Qn=Qe.extend({options:{padding:.1},initialize:function(t){q(this,t),v(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),mt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,n){var s=this._map.getZoomScale(n,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),u=this._map.project(this._center,n),p=r.multiplyBy(-s).add(u).subtract(this._map._getNewPixelOrigin(t,n));it.any3d?ye(this._container,p,s):le(this._container,p)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,n=this._map.getSize(),s=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new yt(s,s.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ha=Qn.extend({options:{tolerance:0},getEvents:function(){var t=Qn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Qn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");St(t,"mousemove",this._onMouseMove,this),St(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),St(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){G(this._redrawRequest),delete this._ctx,Yt(this._container),Jt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var n in this._layers)t=this._layers[n],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qn.prototype._update.call(this);var t=this._bounds,n=this._container,s=t.getSize(),r=it.retina?2:1;le(n,t.min),n.width=r*s.x,n.height=r*s.y,n.style.width=s.x+"px",n.style.height=s.y+"px",it.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Qn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[v(t)]=t;var n=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var n=t._order,s=n.next,r=n.prev;s?s.prev=r:this._drawLast=r,r?r.next=s:this._drawFirst=s,delete t._order,delete this._layers[v(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var n=t.options.dashArray.split(/[, ]+/),s=[],r,u;for(u=0;u')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Zc={_initContainer:function(){this._container=W("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Qn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=Hs("shape");mt(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=Hs("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[v(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;Yt(n),t.removeInteractiveTarget(n),delete this._layers[v(t)]},_updateStyle:function(t){var n=t._stroke,s=t._fill,r=t.options,u=t._container;u.stroked=!!r.stroke,u.filled=!!r.fill,r.stroke?(n||(n=t._stroke=Hs("stroke")),u.appendChild(n),n.weight=r.weight+"px",n.color=r.color,n.opacity=r.opacity,r.dashArray?n.dashStyle=ut(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=r.lineCap.replace("butt","flat"),n.joinstyle=r.lineJoin):n&&(u.removeChild(n),t._stroke=null),r.fill?(s||(s=t._fill=Hs("fill")),u.appendChild(s),s.color=r.fillColor||r.color,s.opacity=r.fillOpacity):s&&(u.removeChild(s),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),s=Math.round(t._radius),r=Math.round(t._radiusY||s);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+s+","+r+" 0,"+65535*360)},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){rn(t._container)},_bringToBack:function(t){yn(t._container)}},Zo=it.vml?Hs:B,Us=Qn.extend({_initContainer:function(){this._container=Zo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Zo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Yt(this._container),Jt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qn.prototype._update.call(this);var t=this._bounds,n=t.getSize(),s=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,s.setAttribute("width",n.x),s.setAttribute("height",n.y)),le(s,t.min),s.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(t){var n=t._path=Zo("path");t.options.className&&mt(n,t.options.className),t.options.interactive&&mt(n,"leaflet-interactive"),this._updateStyle(t),this._layers[v(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Yt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[v(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var n=t._path,s=t.options;n&&(s.stroke?(n.setAttribute("stroke",s.color),n.setAttribute("stroke-opacity",s.opacity),n.setAttribute("stroke-width",s.weight),n.setAttribute("stroke-linecap",s.lineCap),n.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?n.setAttribute("stroke-dasharray",s.dashArray):n.removeAttribute("stroke-dasharray"),s.dashOffset?n.setAttribute("stroke-dashoffset",s.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),s.fill?(n.setAttribute("fill",s.fillColor||s.color),n.setAttribute("fill-opacity",s.fillOpacity),n.setAttribute("fill-rule",s.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,I(t._parts,n))},_updateCircle:function(t){var n=t._point,s=Math.max(Math.round(t._radius),1),r=Math.max(Math.round(t._radiusY),1)||s,u="a"+s+","+r+" 0 1,0 ",p=t._empty()?"M0 0":"M"+(n.x-s)+","+n.y+u+s*2+",0 "+u+-s*2+",0 ";this._setPath(t,p)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){rn(t._path)},_bringToBack:function(t){yn(t._path)}});it.vml&&Us.include(Zc);function ja(t){return it.svg||it.vml?new Us(t):null}zt.include({getRenderer:function(t){var n=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var n=this._paneRenderers[t];return n===void 0&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n},_createRenderer:function(t){return this.options.preferCanvas&&Ua(t)||ja(t)}});var Wa=ds.extend({initialize:function(t,n){ds.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=qt(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function $c(t,n){return new Wa(t,n)}Us.create=Zo,Us.pointsToPath=I,Xn.geometryToLayer=Io,Xn.coordsToLatLng=Zr,Xn.coordsToLatLngs=No,Xn.latLngToCoords=$r,Xn.latLngsToCoords=Bo,Xn.getFeature=fs,Xn.asFeature=Do,zt.mergeOptions({boxZoom:!0});var Ka=ee.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){St(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Jt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Yt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),mi(),Ns(),this._startPoint=this._map.mouseEventToContainerPoint(t),St(document,{contextmenu:xn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=W("div","leaflet-zoom-box",this._container),mt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var n=new yt(this._point,this._startPoint),s=n.getSize();le(this._box,n.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(Yt(this._box),te(this._container,"leaflet-crosshair")),Ei(),Bs(),Jt(document,{contextmenu:xn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(h(this._resetState,this),0);var n=new ge(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});zt.addInitHook("addHandler","boxZoom",Ka),zt.mergeOptions({doubleClickZoom:!0});var qa=ee.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,s=n.getZoom(),r=n.options.zoomDelta,u=t.originalEvent.shiftKey?s-r:s+r;n.options.doubleClickZoom==="center"?n.setZoom(u):n.setZoomAround(t.containerPoint,u)}});zt.addInitHook("addHandler","doubleClickZoom",qa),zt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ga=ee.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new qe(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}mt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){te(this._map._container,"leaflet-grab"),te(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=qt(this._map.options.maxBounds);this._offsetLimit=Kt(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var n=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(s),this._times.push(n),this._prunePositions(n)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;t.xn.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,n=Math.round(t/2),s=this._initialWorldOffset,r=this._draggable._newPos.x,u=(r-n+s)%t+n-s,p=(r+n+s)%t-n-s,S=Math.abs(u+s)0?p:-p))-n;this._delta=0,this._startTime=null,S&&(t.options.scrollWheelZoom==="center"?t.setZoom(n+S):t.setZoomAround(this._lastMousePos,n+S))}});zt.addInitHook("addHandler","scrollWheelZoom",Ja);var Hc=600;zt.mergeOptions({tapHold:it.touchNative&&it.safari&&it.mobile,tapTolerance:15});var Xa=ee.extend({addHooks:function(){St(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Jt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var n=t.touches[0];this._startPos=this._newPos=new Y(n.clientX,n.clientY),this._holdTimeout=setTimeout(h(function(){this._cancel(),this._isTapValid()&&(St(document,"touchend",Se),St(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),Hc),St(document,"touchend touchcancel contextmenu",this._cancel,this),St(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Jt(document,"touchend",Se),Jt(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Jt(document,"touchend touchcancel contextmenu",this._cancel,this),Jt(document,"touchmove",this._onMove,this)},_onMove:function(t){var n=t.touches[0];this._newPos=new Y(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,n){var s=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});s._simulated=!0,n.target.dispatchEvent(s)}});zt.addInitHook("addHandler","tapHold",Xa),zt.mergeOptions({touchZoom:it.touch,bounceAtZoomLimits:!0});var Qa=ee.extend({addHooks:function(){mt(this._map._container,"leaflet-touch-zoom"),St(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){te(this._map._container,"leaflet-touch-zoom"),Jt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n=this._map;if(!(!t.touches||t.touches.length!==2||n._animatingZoom||this._zooming)){var s=n.mouseEventToContainerPoint(t.touches[0]),r=n.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(s.add(r)._divideBy(2))),this._startDist=s.distanceTo(r),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),St(document,"touchmove",this._onTouchMove,this),St(document,"touchend touchcancel",this._onTouchEnd,this),Se(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var n=this._map,s=n.mouseEventToContainerPoint(t.touches[0]),r=n.mouseEventToContainerPoint(t.touches[1]),u=s.distanceTo(r)/this._startDist;if(this._zoom=n.getScaleZoom(u,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&u>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,u===1)return}else{var p=s._add(r)._divideBy(2)._subtract(this._centerPoint);if(u===1&&p.x===0&&p.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(p),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),G(this._animRequest);var S=h(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Tt(S,this,!0),Se(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,G(this._animRequest),Jt(document,"touchmove",this._onTouchMove,this),Jt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});zt.addInitHook("addHandler","touchZoom",Qa),zt.BoxZoom=Ka,zt.DoubleClickZoom=qa,zt.Drag=Ga,zt.Keyboard=Ya,zt.ScrollWheelZoom=Ja,zt.TapHold=Xa,zt.TouchZoom=Qa,o.Bounds=yt,o.Browser=it,o.CRS=Pe,o.Canvas=Ha,o.Circle=Ht,o.CircleMarker=Z,o.Class=It,o.Control=$e,o.DivIcon=Va,o.DivOverlay=Nn,o.DomEvent=Lo,o.DomUtil=zr,o.Draggable=qe,o.Evented=Vt,o.FeatureGroup=Sn,o.GeoJSON=Xn,o.GridLayer=$s,o.Handler=ee,o.Icon=ln,o.ImageOverlay=Ro,o.LatLng=Ut,o.LatLngBounds=ge,o.Layer=Qe,o.LayerGroup=bi,o.LineUtil=wn,o.Map=zt,o.Marker=cs,o.Mixin=vi,o.Path=d,o.Point=Y,o.PolyUtil=Oo,o.Polygon=ds,o.Polyline=Jn,o.Popup=Fo,o.PosAnimation=Ai,o.Projection=Eo,o.Rectangle=Wa,o.Renderer=Qn,o.SVG=Us,o.SVGOverlay=Fa,o.TileLayer=hs,o.Tooltip=Vo,o.Transformation=gn,o.Util=st,o.VideoOverlay=Ra,o.bind=h,o.bounds=Kt,o.canvas=Ua,o.circle=Cc,o.circleMarker=w,o.control=Ii,o.divIcon=Rc,o.extend=l,o.featureGroup=se,o.geoJSON=Da,o.geoJson=zc,o.gridLayer=Fc,o.icon=Zs,o.imageOverlay=Ac,o.latLng=Pt,o.latLngBounds=qt,o.layerGroup=us,o.map=ss,o.marker=y,o.point=rt,o.polygon=Ec,o.polyline=Oc,o.popup=Bc,o.rectangle=$c,o.setOptions=q,o.stamp=v,o.svg=ja,o.svgOverlay=Nc,o.tileLayer=Za,o.tooltip=Dc,o.transformation=_,o.version=a,o.videoOverlay=Ic;var Uc=window.L;o.noConflict=function(){return window.L=Uc,this},window.L=o}))})(Js,Js.exports)),Js.exports}var Cp=Mp();const qo=Tp(Cp),Xl={__name:"DeviceMap",props:{position:{type:Object,default:null},trail:{type:Array,default:()=>[]}},setup(e){const i=e,o=J(null);let a,l,c;function h(){if(!a)return;const g=i.position;if(g&&(g.lat||g.lng)){const v=[g.lat,g.lng];l?l.setLatLng(v):(l=qo.marker(v).addTo(a),a.setView(v,17))}if(c&&c.remove(),i.trail.length){const v=getComputedStyle(document.documentElement).getPropertyValue("--accent").trim()||"#3D7BF0";c=qo.polyline(i.trail,{color:v,weight:3}).addTo(a)}}return Ls(()=>{a=qo.map(o.value,{zoomControl:!0}).setView([20,0],2),qo.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap",maxZoom:19}).addTo(a),setTimeout(()=>a.invalidateSize(),60),h()}),Je(()=>i.position,h,{deep:!0}),Je(()=>i.trail,h,{deep:!0}),(g,v)=>(b(),x("div",{ref_key:"el",ref:o,class:"h-[320px] w-full rounded-lg"},null,512))}},Op=["width","height","stroke-width"],Ep=["d"],tt={__name:"Icon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},stroke:{type:[Number,String],default:2}},setup(e){const a=({grid:"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z",radio:"M4.9 19.1a10 10 0 0 1 0-14.2M7.8 16.2a6 6 0 0 1 0-8.4M16.2 7.8a6 6 0 0 1 0 8.4M19.1 4.9a10 10 0 0 1 0 14.2M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2z",route:"M6 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 13V9a4 4 0 0 1 4-4h4",calendar:"M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",book:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z",fileText:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M16 13H8M16 17H8M10 9H8",settings:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z",search:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM21 21l-4.3-4.3",plus:"M12 5v14M5 12h14",battery:"M3 8h14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zM22 11v2",signal:"M2 20h.01M7 20v-4M12 20v-8M17 20V8M22 20V4",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2",chevronRight:"M9 6l6 6-6 6",play:"M6 3l14 9-14 9V3z",logout:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9",wind:"M12.8 19.6A2 2 0 1 0 14 16H2M17.5 8a2.5 2.5 0 1 1 2 4H2M9.6 4.6A2 2 0 1 1 11 8H2",drone:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM6 6 4 4M18 6l2-2M6 18l-2 2M18 18l2 2",user:"M20 21a8 8 0 1 0-16 0M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z",users:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75",shield:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",sliders:"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6",alertTriangle:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM12 9v4M12 17h.01",download:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3",upload:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12",trash:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6",check:"M20 6 9 17l-5-5",mail:"M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM22 6l-10 7L2 6",lock:"M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM7 11V7a5 5 0 0 1 10 0v4",monitor:"M3 4h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8 21h8M12 17v4",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM3 12h18M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18z",smartphone:"M7 2h10a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM11 18h2",image:"M4 4h16a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM21 15l-5-5L5 21",type:"M4 7V4h16v3M9 20h6M12 4v16",sun:"M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10zM12 1v2M12 21v2M4.2 4.2l1.4 1.4M18.4 18.4l1.4 1.4M1 12h2M21 12h2M4.2 19.8l1.4-1.4M18.4 5.6l1.4-1.4",moon:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z",x:"M18 6 6 18M6 6l12 12",server:"M20 4H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM20 13H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2zM6 7.5h.01M6 16.5h.01",cloud:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9z"}[e.name]||"").split(" M").map((l,c)=>c?"M"+l:l);return(l,c)=>(b(),x("svg",{width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":e.stroke,"stroke-linecap":"round","stroke-linejoin":"round",style:{flex:"none"},"aria-hidden":"true"},[(b(!0),x(wt,null,ce(Ct(a),(h,g)=>(b(),x("path",{key:g,d:h},null,8,Ep))),128))],8,Op))}},zp=["aria-checked","disabled"],tn={__name:"Toggle",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:i}){const o=i;return(a,l)=>(b(),x("button",{type:"button",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,class:Ot(["relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition disabled:opacity-40",e.modelValue?"bg-accent":"bg-surface-2 border border-line-strong"]),onClick:l[0]||(l[0]=c=>o("update:modelValue",!e.modelValue))},[f("span",{class:Ot(["inline-block h-4 w-4 transform rounded-full bg-white shadow-sm transition",e.modelValue?"translate-x-6":"translate-x-1"])},null,2)],10,zp))}},Ap={class:"inline-flex rounded-[10px] border border-line bg-surface-2 p-0.5"},Ip=["onClick"],dn={__name:"Segmented",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:i}){const o=i;return(a,l)=>(b(),x("div",Ap,[(b(!0),x(wt,null,ce(e.options,c=>(b(),x("button",{key:c.value,type:"button",class:Ot(["inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-[13px] font-semibold transition",e.modelValue===c.value?"bg-surface-1 text-ink shadow-xs":"text-ink-secondary hover:text-ink"]),onClick:h=>o("update:modelValue",c.value)},[c.icon?(b(),oe(tt,{key:0,name:c.icon,size:15},null,8,["name"])):V("",!0),N(" "+M(c.label),1)],10,Ip))),128))]))}},Np={class:"text-sm font-semibold text-ink"},Bp={key:0,class:"mt-0.5 text-xs text-ink-muted"},lt={__name:"Row",props:{title:{type:String,default:""},desc:{type:String,default:""},keywords:{type:String,default:""},block:{type:Boolean,default:!1}},setup(e){const i=e,o=eo("settingsSearch",{value:""}),a=ht(()=>{const l=(o.value||"").trim().toLowerCase();return l?`${i.title} ${i.desc} ${i.keywords}`.toLowerCase().includes(l):!0});return(l,c)=>a.value?(b(),x("div",{key:0,class:Ot(["border-b border-line py-4 last:border-0",e.block?"":"flex items-center justify-between gap-6"])},[f("div",{class:Ot(e.block?"mb-3":"min-w-0")},[f("div",Np,M(e.title),1),e.desc?(b(),x("div",Bp,M(e.desc),1)):V("",!0)],2),f("div",{class:Ot(e.block?"":"shrink-0")},[af(l.$slots,"default")],2)],2)):V("",!0)}},Dp=(e,i)=>{const o=e.__vccOpts||e;for(const[a,l]of i)o[a]=l;return o},Rp={class:"mx-auto max-w-[1280px] p-7"},Fp={class:"mb-5 flex flex-wrap items-end justify-between gap-4"},Vp={class:"flex h-10 w-full max-w-[280px] items-center gap-2 rounded border border-line-strong bg-surface-1 px-3"},Zp={class:"grid grid-cols-[210px_1fr] gap-6 max-[760px]:grid-cols-1"},$p={class:"flex flex-col gap-0.5 max-[760px]:flex-row max-[760px]:overflow-x-auto"},Hp=["onClick"],Up={class:"whitespace-nowrap"},jp={class:"min-w-0"},Wp={key:0,class:"panel p-10 text-center text-sm text-ink-muted"},Kp={key:0,class:"eyebrow mb-2 mt-5 first:mt-0 flex items-center gap-2"},qp={key:1,class:"panel mb-5 p-5"},Gp={class:"flex items-center gap-1"},Yp={class:"flex items-center gap-2"},Jp={class:"font-mono text-sm text-ink"},Xp={class:"inline-flex items-center gap-1 rounded-full bg-amber-soft px-2 py-0.5 text-[11px] font-semibold text-amber-fg"},Qp={key:0,class:"mt-2 text-xs text-ink-muted"},tm={class:"grid max-w-[420px] gap-2"},em={class:"flex items-center gap-3"},nm={key:2,class:"panel mb-5 p-5"},im=["value"],sm=["value"],om=["value"],rm={class:"font-mono text-sm text-ink"},am={key:3},lm={key:0,class:"mb-5 flex items-center gap-1 overflow-x-auto border-b border-line"},um=["onClick"],cm={key:1,class:"panel mb-5 p-5"},dm={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},fm={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},hm={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},pm={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},mm={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},gm={key:0},_m={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},vm={class:"font-semibold text-ink-secondary"},ym={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},bm={key:7,class:"my-4 rounded-lg border border-line bg-surface-2 p-4","data-keywords":"credits usage quota remaining daily allowance rate limit"},xm={class:"flex items-center justify-between gap-3"},wm={class:"flex items-center gap-2 text-sm font-semibold text-ink"},km={key:0,class:"text-[11px] text-ink-muted"},Sm={class:"mt-2 flex items-baseline gap-1.5"},Pm={class:"font-mono text-2xl font-semibold text-ink"},Tm={class:"text-sm text-ink-muted"},Lm={class:"mt-2 h-2 w-full overflow-hidden rounded-full bg-line"},Mm={class:"mt-2 text-xs text-ink-muted"},Cm={class:"mt-2 text-sm text-ink"},Om={class:"font-semibold"},Em={class:"mt-1 text-xs text-ink-muted"},zm={key:1,class:"mt-2 text-xs text-ink-muted"},Am={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Im={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Nm={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Bm={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Dm={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Rm={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Fm={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Vm={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Zm={key:8,class:"border-b border-line py-3 text-xs text-amber-fg"},$m={class:"mt-4 flex flex-wrap items-center gap-3"},Hm=["disabled"],Um=["disabled"],jm={key:2,class:"text-xs text-danger-fg"},Wm={class:"panel mb-5 p-5"},Km={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},qm={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Gm={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Ym={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Jm={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Xm={key:0},Qm={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},tg={class:"font-semibold text-ink-secondary"},eg={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},ng={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},ig={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},sg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},og={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},rg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},ag={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},lg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},ug={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},cg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},dg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},fg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},hg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},pg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},mg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},gg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},_g={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},vg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},yg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},bg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},xg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},wg={class:"mt-4 flex flex-wrap items-center gap-3"},kg=["disabled"],Sg=["disabled"],Pg={key:2,class:"text-xs text-danger-fg"},Tg={key:3,class:"text-[11px] text-ink-muted"},Lg={class:"panel mb-5 p-5"},Mg={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Cg={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Og={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Eg={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},zg={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Ag={key:0},Ig={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},Ng={class:"font-semibold text-ink-secondary"},Bg={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Dg={key:0,class:"inline-flex items-center gap-2 break-all font-mono text-sm text-ink"},Rg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Fg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Vg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Zg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},$g={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Hg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Ug={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},jg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Wg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Kg={class:"mt-4 flex flex-wrap items-center gap-3"},qg=["disabled"],Gg=["disabled"],Yg={key:2,class:"text-xs text-danger-fg"},Jg={key:3,class:"text-[11px] text-ink-muted"},Xg={key:3,class:"panel mb-5 p-5"},Qg={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},t_={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},e_={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},n_={key:1,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},i_={key:2,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},s_={key:5,class:"border-b border-line py-3 text-xs text-amber-fg"},o_={key:0},r_={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},a_={class:"font-semibold text-ink-secondary"},l_={key:7,class:"border-b border-line py-3 text-xs text-ink-muted"},u_={class:"flex w-full flex-col gap-2"},c_={class:"break-all font-mono text-sm text-ink"},d_={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},f_={key:1,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},h_={key:0,class:"text-xs text-ink-muted"},p_={key:1,class:"border-b border-line py-3 text-xs text-ink-muted"},m_={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},g_={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},__={class:"mt-4 flex flex-wrap items-center gap-3"},v_=["disabled"],y_=["disabled"],b_={key:2,class:"text-xs text-danger-fg"},x_={key:3,class:"text-[11px] text-ink-muted"},w_={key:4,class:"panel mb-5 p-5"},k_={class:"flex items-center gap-4"},S_=["src"],P_={key:1,class:"grid h-16 w-16 place-items-center rounded-full bg-[var(--navy-800)] text-lg font-bold text-white"},T_={class:"flex gap-2"},L_={class:"btn-ghost cursor-pointer"},M_={class:"mt-1 text-right text-[11px] text-ink-muted"},C_={key:5,class:"panel mb-5 p-5"},O_={class:"flex items-center gap-3"},E_={key:0,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},z_={class:"flex flex-wrap items-center gap-4"},A_={class:"min-w-0"},I_={class:"mt-1 select-all font-mono text-sm font-bold text-ink"},N_={class:"mt-3 flex items-center gap-2"},B_={key:0,class:"mt-2 text-xs text-danger-fg"},D_={key:1,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},R_={class:"mt-2 grid grid-cols-2 gap-1 font-mono text-xs text-ink-secondary sm:grid-cols-4"},F_={class:"rounded-lg border border-line bg-surface-2 p-3"},V_={class:"flex items-center gap-3"},Z_={class:"grid h-9 w-9 place-items-center rounded-full bg-accent-soft text-accent-soft-fg"},$_={class:"min-w-0 flex-1"},H_={class:"text-sm font-semibold text-ink"},U_={class:"font-mono text-[11px] text-ink-muted"},j_={key:6,class:"mb-5"},W_={key:0,class:"panel mb-5 p-5"},K_={class:"grid max-w-[520px] gap-2"},q_={class:"flex flex-wrap gap-2"},G_=["disabled","title"],Y_=["value"],J_=["value"],X_={class:"flex items-center gap-2 py-1 text-sm text-ink-secondary"},Q_={class:"flex items-center gap-3"},tv=["disabled"],ev={key:0,class:"text-xs text-danger-fg"},nv={key:1,class:"text-xs text-ink-muted"},iv={key:1,class:"panel mb-5 p-5"},sv={class:"grid max-w-[520px] gap-2"},ov={class:"flex flex-wrap gap-2"},rv=["value"],av=["value"],lv={key:1,class:"text-xs text-ink-muted"},uv={class:"font-semibold text-ink-secondary"},cv={class:"flex items-center gap-3"},dv=["disabled"],fv={key:0,class:"text-xs text-danger-fg"},hv={class:"panel overflow-hidden p-0"},pv={class:"flex items-center justify-between px-5 py-4"},mv=["disabled"],gv={key:0,class:"px-5 pb-5 text-sm text-danger-fg"},_v={key:1,class:"px-5 pb-8 text-sm text-ink-muted"},vv={key:2,class:"overflow-x-auto"},yv={class:"w-full border-collapse text-sm"},bv={class:"text-left"},xv={class:"px-5 py-3"},wv={class:"text-ink"},kv={key:0,class:"ml-1.5 text-[11px] text-ink-muted"},Sv={class:"px-5 py-3"},Pv={class:"px-5 py-3"},Tv={class:"px-5 py-3"},Lv={class:"px-5 py-3 text-right"},Mv=["onClick"],Cv={key:1,class:"inline-flex items-center gap-1.5"},Ov=["onClick"],Ev=["onClick"],zv={key:7,class:"mb-5"},Av={key:0,class:"panel mb-5 p-5"},Iv={class:"grid max-w-[520px] gap-2"},Nv={class:"flex items-center gap-3"},Bv={key:0,class:"text-xs text-danger-fg"},Dv={key:1,class:"panel mb-5 p-5"},Rv={class:"grid max-w-[520px] gap-2"},Fv={class:"flex items-center gap-3"},Vv=["disabled"],Zv={key:0,class:"text-xs text-danger-fg"},$v={class:"panel overflow-hidden p-0"},Hv={key:0,class:"px-5 pb-8 text-sm text-ink-muted"},Uv={key:1,class:"overflow-x-auto"},jv={class:"w-full border-collapse text-sm"},Wv={class:"text-left"},Kv={class:"px-5 py-3"},qv={class:"inline-flex items-center gap-2 text-ink"},Gv={class:"px-5 py-3 text-ink-secondary"},Yv={class:"px-5 py-3 text-right"},Jv=["onClick"],Xv={key:1,class:"inline-flex items-center gap-1.5"},Qv=["onClick"],ty=["disabled","title","onClick"],ey={key:8,class:"mb-5"},ny={class:"panel mb-5 p-5"},iy={class:"btn-ghost cursor-pointer"},sy={key:0,class:"mt-2 text-xs text-ink-muted"},oy={class:"rounded-lg border p-5",style:{"border-color":"color-mix(in srgb, var(--danger) 35%, transparent)",background:"var(--danger-soft)"}},ry={class:"flex items-center gap-2 text-danger-fg"},ay={class:"mt-4 rounded-lg border border-line bg-surface-1 p-4"},ly={class:"mt-3 flex items-start gap-2 text-sm text-ink-secondary"},uy={class:"mt-3"},cy={class:"eyebrow mb-1 block"},dy={class:"text-ink"},fy=["placeholder"],hy={class:"mt-4 flex flex-wrap items-center gap-3"},py=["disabled"],my=["disabled"],gy={key:2,class:"text-xs text-ink-muted"},_y={key:0,class:"mt-3 rounded border border-line bg-surface-2 px-3 py-2 text-xs text-ink-secondary"},vy={key:0,class:"fixed bottom-5 right-5 z-20 flex items-center gap-2 rounded-lg border border-line bg-surface-1 px-4 py-2.5 text-sm text-ink shadow-md"},Ql="pv.opensky.health",tu="pv.filetransfer.health",eu="pv.webdav.health",nu="pv.localstorage.health",yy={__name:"Settings",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(e,{emit:i}){const o=e,a=i,l=ht(()=>o.role==="superadmin"),c=ht(()=>o.role==="admin"||o.role==="superadmin");function h(y){return y==="superadmin"?"Superadmin":y==="admin"?"Admin":"User"}function g(y){return y==="superadmin"||y==="admin"?"shield":"user"}function v(y){return y==="superadmin"||y==="admin"?P.accent:P.neutral}const P={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},k=ht(()=>{const y=[{id:"account",label:"Account",icon:"user",kw:"name username email password verification login credentials role"},{id:"appearance",label:"Appearance",icon:"sliders",kw:"theme light dark system language region font size accessibility date time format motion"},{id:"integrations",label:"Integrations",icon:"radio",kw:"opensky flights adsb aircraft plugin oauth credentials bounding box plan connection ftp sftp ftps file transfer server host upload download local storage folder drive isolated private read only webdav nextcloud owncloud dav url https"},{id:"profile",label:"Profile",icon:"image",kw:"avatar photo display name bio public"},{id:"security",label:"Privacy & Security",icon:"shield",kw:"two factor authentication 2fa sessions devices logout security privacy"}];return c.value&&y.push({id:"team",label:"User management",icon:"users",kw:"users team members add remove create delete role admin permissions rights organization"}),l.value&&y.push({id:"organizations",label:"Organizations",icon:"grid",kw:"organization org tenant company create rename delete members"}),y.push({id:"advanced",label:"Advanced",icon:"alertTriangle",kw:"export import data delete account danger zone",danger:!0}),y}),O=J("account"),$=J("");Au("settingsSearch",$);const F=ht(()=>$.value.trim().length>0),nt=ht(()=>$.value.trim().toLowerCase());function q(y){return nt.value?(y.label+" "+y.kw).toLowerCase().includes(nt.value)||Dt(y.id):!0}const At={account:["full name","username","email address verification verify","password change current new"],appearance:["theme light dark system","language","region","font size accessibility","reduce motion","date format","time format clock"],integrations:["opensky live flights","enable plugin","oauth client id secret","plan credits","bounding box","test connection","file transfer ftp sftp ftps","server host port username password","private key passphrase","base path directory","local storage folder drive","private isolated folder","read only access mode","webdav nextcloud owncloud dav","server url username password tls","base path directory folder"],profile:["profile photo avatar","display name","bio about","show email public"],security:["two factor authentication","active sessions devices","sign out"],team:["add user create account","members list role admin remove delete","organization org assign"],organizations:["add organization create","rename organization","delete organization members"],advanced:["export data download","import data upload","delete account permanent danger"]};function Dt(y){return nt.value?(At[y]||[]).some(d=>d.includes(nt.value)):!0}const bt=ht(()=>F.value?k.value.filter(q):k.value.filter(y=>y.id===O.value)),ut=ht({get:()=>Gi.value,set:y=>ar(y)}),X=[{value:"light",label:"Light",icon:"sun"},{value:"dark",label:"Dark",icon:"moon"},{value:"system",label:"System",icon:"monitor"}],ft=[{value:"sm",label:"Small"},{value:"md",label:"Default"},{value:"lg",label:"Large"}],jt=[{value:"12",label:"12-hour"},{value:"24",label:"24-hour"}],de=[["en","English"],["es","Español"],["de","Deutsch"],["fr","Français"],["pl","Polski"],["ja","日本語"]],me=[["US","United States"],["GB","United Kingdom"],["EU","European Union"],["CA","Canada"],["AU","Australia"],["JP","Japan"]],vt=[["MDY","MM/DD/YYYY"],["DMY","DD/MM/YYYY"],["YMD","YYYY/MM/DD"],["ISO","YYYY-MM-DD"]],Ft=J(Date.now());let Tt=null;const G=ht(()=>Gl(Ft.value)),st=xe({loaded:!1,available:!1,orgEnabled:!0,allowAnonymous:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),It=J("user"),Wt=xe({clientId:"",clientSecret:"",plan:"",bbox:""}),kt=J(""),Vt=J(!1),Y=J(!1),ue=J(null),rt=J(null),yt=ht(()=>ue.value&&ue.value.credits||null),Kt=ht(()=>{const y=yt.value;return!y||!y.daily||y.remaining==null?null:Math.max(0,Math.min(100,Math.round(y.remaining/y.daily*100)))}),ge=ht(()=>{const y=Kt.value;return y==null?"bg-accent":y<=10?"bg-danger":y<=30?"bg-amber":"bg-success"});function qt(y){return typeof y=="number"?y.toLocaleString():y}function Ut(){if(!rt.value)return"";const y=Math.max(0,Math.round((Date.now()-rt.value)/1e3));if(y<60)return"just now";const d=Math.round(y/60);if(d<60)return`${d} min ago`;const Z=Math.round(d/60);return Z<24?`${Z} h ago`:`${Math.round(Z/24)} d ago`}function Pt(){try{ue.value&&localStorage.setItem(Ql,JSON.stringify({health:ue.value,ts:rt.value}))}catch{}}function Pe(){try{const y=localStorage.getItem(Ql);if(!y)return;const d=JSON.parse(y);d&&d.health&&(ue.value=d.health,rt.value=d.ts||null)}catch{}}const Te=[{value:"",label:"Not set"},{value:"anonymous",label:"Anonymous"},{value:"standard",label:"Standard"},{value:"contributor",label:"Contributor"}],nn=[{value:"user",label:"My settings",icon:"user"},{value:"org",label:"Organization",icon:"users"}],we=ht(()=>st.isSuperadmin),gn=ht(()=>st.isSuperadmin?"user":It.value),_=ht(()=>st.scopes[gn.value]||{editableLayer:"user",fields:{}}),m=ht(()=>gn.value==="org");function T(y){return _.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function B(y){return we.value||T(y).locked}function I(y){const d=T(y).source;return d==="global"?"Set by administrator":d==="org"?"Set by your organization":""}function D(){Wt.clientId=T("clientId").own||"",Wt.clientSecret=T("clientSecret").own||"",Wt.plan=T("plan").own||"",Wt.bbox=T("bbox").own||""}function j(y){st.available=!!y.available,st.orgEnabled=y.orgEnabled!==!1,st.allowAnonymous=!!y.allowAnonymous,st.enabled=!!y.enabled,st.canEditOrg=!!y.canEditOrg,st.isSuperadmin=!!y.isSuperadmin,st.scopes=y.scopes||{},It.value==="org"&&!st.canEditOrg&&(It.value="user"),D(),st.loaded=!0}Je(It,()=>{kt.value="",D()});async function A(){Pe();const{ok:y,body:d}=await Gh();y&&j(d)}async function U(y){const d=m.value;d?st.orgEnabled=y:st.enabled=y;const{ok:Z,body:w}=await jl(d?{scope:"org",enabled:y}:{scope:"user",enabled:y});Z?(j(w),Zt(d?y?"OpenSky enabled for your organization.":"OpenSky disabled for your organization.":y?"OpenSky enabled.":"OpenSky disabled.")):(d?st.orgEnabled=!y:st.enabled=!y,Zt(w.error||"Could not update."))}async function R(){kt.value="",Vt.value=!0;const y={};for(const Ht of["clientId","clientSecret","plan","bbox"])B(Ht)||(y[Ht]=Wt[Ht]);const d={scope:gn.value,config:y};m.value||(d.enabled=st.enabled);const{ok:Z,body:w}=await jl(d);if(Vt.value=!1,!Z){kt.value=w.error||"Could not save settings.";return}j(w),Zt(m.value?"Organization OpenSky settings saved.":"OpenSky settings saved.")}async function ct(){Y.value=!0,ue.value=null;const{ok:y,body:d}=await Yh();Y.value=!1,ue.value=y&&d.health?d.health:{status:"down",detail:d.error||"Probe failed."},rt.value=Date.now(),Pt()}function Q(y){return y==="ok"?P.success:y==="degraded"?P.warning:P.danger}const K=xe({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),dt=J("user"),Mt=["protocol","host","port","username","password","privateKey","keyPassphrase","hostKeyFingerprint","insecureSkipVerify","basePath"],at=xe(Object.fromEntries(Mt.map(y=>[y,""]))),Rt=J(""),ne=J(!1),ae=J(!1),fe=J(null),ke=J(null),_n=[{value:"sftp",label:"SFTP"},{value:"ftps",label:"FTPS"},{value:"ftp",label:"FTP"}],ui=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],ve=ht(()=>K.isSuperadmin),Ae=ht(()=>K.isSuperadmin?"user":dt.value),Cn=ht(()=>K.scopes[Ae.value]||{editableLayer:"user",fields:{}}),Fe=ht(()=>Ae.value==="org"),Yi=ht(()=>(Ve("protocol")?Oe("protocol").effective:at.protocol)||"sftp");function Oe(y){return Cn.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function Ve(y){return ve.value||Oe(y).locked}function he(y){const d=Oe(y).source;return d==="global"?"Set by administrator":d==="org"?"Set by your organization":""}function xr(y){return(_n.find(d=>d.value===y)||{}).label||y||"—"}function _o(){for(const y of Mt)at[y]=Oe(y).own||"";at.protocol||(at.protocol="sftp"),at.insecureSkipVerify||(at.insecureSkipVerify="false")}function Ms(y){K.available=!!y.available,K.orgEnabled=y.orgEnabled!==!1,K.enabled=!!y.enabled,K.canEditOrg=!!y.canEditOrg,K.isSuperadmin=!!y.isSuperadmin,K.scopes=y.scopes||{},dt.value==="org"&&!K.canEditOrg&&(dt.value="user"),_o(),K.loaded=!0}Je(dt,()=>{Rt.value="",_o()});function wr(){if(!ke.value)return"";const y=Math.max(0,Math.round((Date.now()-ke.value)/1e3));if(y<60)return"just now";const d=Math.round(y/60);if(d<60)return`${d} min ago`;const Z=Math.round(d/60);return Z<24?`${Z} h ago`:`${Math.round(Z/24)} d ago`}function kr(){try{fe.value&&localStorage.setItem(tu,JSON.stringify({health:fe.value,ts:ke.value}))}catch{}}function Sr(){try{const y=localStorage.getItem(tu);if(!y)return;const d=JSON.parse(y);d&&d.health&&(fe.value=d.health,ke.value=d.ts||null)}catch{}}async function Cs(){Sr();const{ok:y,body:d}=await Jh();y&&Ms(d)}async function vo(y){const d=Fe.value;d?K.orgEnabled=y:K.enabled=y;const{ok:Z,body:w}=await Wl(d?{scope:"org",enabled:y}:{scope:"user",enabled:y});Z?(Ms(w),Zt(d?y?"File transfer enabled for your organization.":"File transfer disabled for your organization.":y?"File transfer enabled.":"File transfer disabled.")):(d?K.orgEnabled=!y:K.enabled=!y,Zt(w.error||"Could not update."))}async function Pr(){Rt.value="",ne.value=!0;const y={};for(const Ht of Mt)Ve(Ht)||(y[Ht]=at[Ht]);const d={scope:Ae.value,config:y};Fe.value||(d.enabled=K.enabled);const{ok:Z,body:w}=await Wl(d);if(ne.value=!1,!Z){Rt.value=w.error||"Could not save settings.";return}Ms(w),Zt(Fe.value?"Organization file-transfer settings saved.":"File-transfer settings saved.")}async function Tr(){ae.value=!0,fe.value=null;const{ok:y,body:d}=await Xh();ae.value=!1,fe.value=y&&d.health?d.health:{status:"down",detail:d.error||"Probe failed."},ke.value=Date.now(),kr()}function Lr(y){return y==="ok"?P.success:y==="degraded"?P.warning:P.danger}const Et=xe({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),it=J("user"),Ji=["baseURL","username","password","insecureSkipVerify","basePath"],Ee=xe(Object.fromEntries(Ji.map(y=>[y,""]))),ci=J(""),Mi=J(!1),di=J(!1),sn=J(null),Xe=J(null),yo=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],Os=ht(()=>Et.isSuperadmin),Es=ht(()=>Et.isSuperadmin?"user":it.value),Mr=ht(()=>Et.scopes[Es.value]||{editableLayer:"user",fields:{}}),on=ht(()=>Es.value==="org");function vn(y){return Mr.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function fi(y){return Os.value||vn(y).locked}function Ze(y){const d=vn(y).source;return d==="global"?"Set by administrator":d==="org"?"Set by your organization":""}function bo(){for(const y of Ji)Ee[y]=vn(y).own||"";Ee.insecureSkipVerify||(Ee.insecureSkipVerify="false")}function zs(y){Et.available=!!y.available,Et.orgEnabled=y.orgEnabled!==!1,Et.enabled=!!y.enabled,Et.canEditOrg=!!y.canEditOrg,Et.isSuperadmin=!!y.isSuperadmin,Et.scopes=y.scopes||{},it.value==="org"&&!Et.canEditOrg&&(it.value="user"),bo(),Et.loaded=!0}Je(it,()=>{ci.value="",bo()});function Cr(){if(!Xe.value)return"";const y=Math.max(0,Math.round((Date.now()-Xe.value)/1e3));if(y<60)return"just now";const d=Math.round(y/60);if(d<60)return`${d} min ago`;const Z=Math.round(d/60);return Z<24?`${Z} h ago`:`${Math.round(Z/24)} d ago`}function Or(){try{sn.value&&localStorage.setItem(eu,JSON.stringify({health:sn.value,ts:Xe.value}))}catch{}}function Er(){try{const y=localStorage.getItem(eu);if(!y)return;const d=JSON.parse(y);d&&d.health&&(sn.value=d.health,Xe.value=d.ts||null)}catch{}}async function As(){Er();const{ok:y,body:d}=await ep();y&&zs(d)}async function hi(y){const d=on.value;d?Et.orgEnabled=y:Et.enabled=y;const{ok:Z,body:w}=await Kl(d?{scope:"org",enabled:y}:{scope:"user",enabled:y});Z?(zs(w),Zt(d?y?"WebDAV enabled for your organization.":"WebDAV disabled for your organization.":y?"WebDAV enabled.":"WebDAV disabled.")):(d?Et.orgEnabled=!y:Et.enabled=!y,Zt(w.error||"Could not update."))}async function xo(){ci.value="",Mi.value=!0;const y={};for(const Ht of Ji)fi(Ht)||(y[Ht]=Ee[Ht]);const d={scope:Es.value,config:y};on.value||(d.enabled=Et.enabled);const{ok:Z,body:w}=await Kl(d);if(Mi.value=!1,!Z){ci.value=w.error||"Could not save settings.";return}zs(w),Zt(on.value?"Organization WebDAV settings saved.":"WebDAV settings saved.")}async function wo(){di.value=!0,sn.value=null;const{ok:y,body:d}=await np();di.value=!1,sn.value=y&&d.health?d.health:{status:"down",detail:d.error||"Probe failed."},Xe.value=Date.now(),Or()}function Ci(y){return y==="ok"?P.success:y==="degraded"?P.warning:P.danger}const W=xe({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,isOrgUser:!1,mounts:[],privateFolder:!1,privateEnabled:!1,allowPrivate:!0,rootConfigured:!1,scopes:{}}),Yt=J("user"),Un=J(""),rn=J(""),yn=J(!1),pi=J(!1),mt=J(null),te=J(null),jn=J({}),Oi=[{value:"",label:"Inherit"},{value:"false",label:"Read-write"},{value:"true",label:"Read-only"}],Ie=ht(()=>W.isSuperadmin),Is=ht(()=>W.isSuperadmin?"user":Yt.value),Xi=ht(()=>W.scopes[Is.value]||{editableLayer:"user",fields:{}}),ye=ht(()=>Is.value==="org");function le(y){return Xi.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function On(y){return Ie.value||le(y).locked}function mi(y){const d=le(y).source;return d==="global"?"Set by administrator":d==="org"?"Set by your organization":""}function Ei(y){return(Oi.find(d=>d.value===y)||{}).label||"Inherit"}function Qi(){Un.value=le("readOnly").own||""}function bn(y){W.available=!!y.available,W.orgEnabled=y.orgEnabled!==!1,W.enabled=!!y.enabled,W.canEditOrg=!!y.canEditOrg,W.isSuperadmin=!!y.isSuperadmin,W.isOrgUser=!!y.isOrgUser,W.mounts=Array.isArray(y.mounts)?y.mounts:[],W.privateFolder=!!y.privateFolder,W.privateEnabled=!!y.privateEnabled,W.allowPrivate=y.allowPrivate!==!1,W.rootConfigured=!!y.rootConfigured,W.scopes=y.scopes||{},Yt.value==="org"&&!W.canEditOrg&&(Yt.value="user"),Qi(),W.loaded=!0}Je(Yt,()=>{rn.value="",Qi()});function Ns(){if(!te.value)return"";const y=Math.max(0,Math.round((Date.now()-te.value)/1e3));if(y<60)return"just now";const d=Math.round(y/60);if(d<60)return`${d} min ago`;const Z=Math.round(d/60);return Z<24?`${Z} h ago`:`${Math.round(Z/24)} d ago`}function Bs(){try{mt.value&&localStorage.setItem(nu,JSON.stringify({health:mt.value,ts:te.value}))}catch{}}function ts(){try{const y=localStorage.getItem(nu);if(!y)return;const d=JSON.parse(y);d&&d.health&&(mt.value=d.health,te.value=d.ts||null)}catch{}}async function Ds(){ts();const{ok:y,body:d}=await Qh();y&&bn(d)}async function es(y){const d=ye.value;d?W.orgEnabled=y:W.enabled=y;const{ok:Z,body:w}=await Ko(d?{scope:"org",enabled:y}:{scope:"user",enabled:y});Z?(bn(w),Zt(d?y?"Local storage enabled for your organization.":"Local storage disabled for your organization.":y?"Local storage enabled.":"Local storage disabled.")):(d?W.orgEnabled=!y:W.enabled=!y,Zt(w.error||"Could not update."))}async function ns(y){W.privateFolder=y;const{ok:d,body:Z}=await Ko({scope:"user",privateFolder:y});d?(bn(Z),Zt(y?"Private folder enabled.":"Private folder disabled.")):(W.privateFolder=!y,Zt(Z.error||"Could not update."))}async function ko(y){W.allowPrivate=y;const{ok:d,body:Z}=await Ko({scope:"org",allowPrivate:y});d?(bn(Z),Zt(y?"Members may now create private folders.":"Private folders disabled for your organization.")):(W.allowPrivate=!y,Zt(Z.error||"Could not update."))}async function Rs(){rn.value="",yn.value=!0;const y={};On("readOnly")||(y.readOnly=Un.value);const d={scope:Is.value,config:y};ye.value||(d.enabled=W.enabled);const{ok:Z,body:w}=await Ko(d);if(yn.value=!1,!Z){rn.value=w.error||"Could not save settings.";return}bn(w),Zt(ye.value?"Organization local-storage settings saved.":"Local-storage settings saved.")}async function zr(){pi.value=!0,mt.value=null,jn.value={};const{ok:y,body:d}=await tp();pi.value=!1,mt.value=y&&d.health?d.health:{status:"down",detail:d.error||"Probe failed."};const Z={};if(Array.isArray(d.mounts))for(const w of d.mounts)Z[w.id]={status:w.status,detail:w.detail};jn.value=Z,te.value=Date.now(),Bs()}function St(y){return y==="ok"?P.success:y==="degraded"?P.warning:P.danger}const an=[{id:"apis-external",label:"APIs — External",icon:"globe"},{id:"drives-external",label:"Drives — External",icon:"server"},{id:"drives-local",label:"Drives — Local",icon:"monitor"}],Jt=J("apis-external");function is(y){return F.value||Jt.value===y}const gi=J("");let zi=null;function Zt(y){gi.value=y,clearTimeout(zi),zi=setTimeout(()=>gi.value="",2200)}const _e=xe({current:"",next:"",confirm:""}),En=J(""),_i=J(!1);function Se(){if(_i.value=!1,!_e.current)return En.value="Enter your current password.";if(_e.next.length<8)return En.value="New password must be at least 8 characters.";if(_e.next!==_e.confirm)return En.value="New passwords do not match.";En.value="Validated. Connecting to the account service is pending — no password endpoint yet.",_e.current=_e.next=_e.confirm=""}const xn=J("");function So(){xn.value="Verification link would be sent once the account service is wired up."}function Po(y){const d=y.target.files&&y.target.files[0];if(!d)return;if(d.size>1.5*1024*1024){Zt("Image too large (max ~1.5 MB).");return}const Z=new FileReader;Z.onload=()=>{gt.avatar=String(Z.result),Zt("Photo updated.")},Z.readAsDataURL(d)}function Ar(){gt.avatar="",Zt("Photo removed.")}const To=ht(()=>{var Z,w,Ht;const d=(gt.displayName||gt.name||o.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((Z=d[0])==null?void 0:Z[0])||"P")+(((w=d[1])==null?void 0:w[0])||((Ht=d[0])==null?void 0:Ht[1])||"V")).toUpperCase()}),Wn=J(!1),Lo=J(""),Ai=J(""),zt=J(""),ss=J([]);function $e(y){const d="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";let Z="";for(let w=0;w$e(4).toLowerCase()+"-"+$e(4).toLowerCase()),zt.value=""}function Ir(){gt.twoFactor=!1,ss.value=[],Wn.value=!1}const Ke=navigator.userAgent;function Nr(){return/Edg\//.test(Ke)?"Edge":/OPR\//.test(Ke)?"Opera":/Chrome\//.test(Ke)?"Chrome":/Firefox\//.test(Ke)?"Firefox":/Safari\//.test(Ke)?"Safari":"Browser"}function Co(){return/Windows/.test(Ke)?"Windows":/Mac OS X/.test(Ke)?"macOS":/Android/.test(Ke)?"Android":/iPhone|iPad/.test(Ke)?"iOS":/Linux/.test(Ke)?"Linux":"Unknown OS"}const Br=Date.now(),os=J([]),Kn=J(!1),rs=J(""),ee=xe({email:"",password:"",role:"user",organization:""}),vi=J(""),Ni=J(!1),qe=J(""),Fs=ht(()=>{const y=[{value:"user",label:"User"},{value:"admin",label:"Admin"}];return l.value&&y.push({value:"superadmin",label:"Superadmin"}),y}),Bi=J([]);async function qn(){if(!c.value)return;const y=await Hh();y.ok&&(Bi.value=y.organizations.slice().sort((d,Z)=>d.name.localeCompare(Z.name)))}const Oo=ht(()=>{const y=Bi.value.map(d=>({value:d.id,label:d.name}));return l.value&&y.unshift({value:"",label:"No organization"}),y});async function Gn(){if(!c.value)return;Kn.value=!0,rs.value="";const y=await Fh();if(Kn.value=!1,!y.ok){rs.value=y.status===403?"Manager role required.":"Could not load users.";return}os.value=y.users.slice().sort((d,Z)=>d.email.localeCompare(Z.email))}function Di(y){try{const d=y.data||{},Z=Object.keys(d)[0];return Z&&d[Z]&&d[Z].message||y.message||y.error||"Invalid input."}catch{return y.error||"Could not create user."}}async function Dr(){vi.value="";const y=ee.email.trim().toLowerCase();if(!y.includes("@"))return vi.value="Enter a valid email.";if(ee.password.length<8)return vi.value="Password must be at least 8 characters.";Ni.value=!0;const d=l.value?ee.organization:o.organization,{ok:Z,body:w}=await Vh(y,ee.password,ee.role,d);if(Ni.value=!1,!Z)return vi.value=Di(w);ee.email="",ee.password="",ee.role="user",ee.organization="",Zt("User created."),Gn()}async function Rr(y){const{ok:d,body:Z}=await $h(y.id);if(qe.value="",!d)return Zt(Z.error||"Could not remove user.");Zt("User removed."),Gn()}const $t=xe({id:"",email:"",role:"user",verified:!1,password:"",organization:""}),zn=J(""),Ri=J(!1),as=ht(()=>!!$t.id&&$t.email===o.email);function ls(y){qe.value="",$t.id=y.id,$t.email=y.email,$t.role=y.role||"user",$t.verified=!!y.verified,$t.password="",$t.organization=y.organization||"",zn.value=""}function An(){$t.id="",zn.value=""}async function Fr(){zn.value="";const y=$t.email.trim().toLowerCase();if(!y.includes("@"))return zn.value="Enter a valid email.";if($t.password&&$t.password.length<8)return zn.value="New password must be at least 8 characters (or leave blank).";const d={email:y,role:$t.role,verified:$t.verified};l.value&&(d.organization=$t.organization),$t.password&&(d.password=$t.password),Ri.value=!0;const{ok:Z,body:w}=await Zh($t.id,d);if(Ri.value=!1,!Z)return zn.value=Di(w);Zt("User updated."),An(),Gn()}const In=xe({name:""}),Le=J(""),Fi=J(!1),yi=J(""),wn=xe({id:"",name:""}),kn=J(""),Vi=ht(()=>{const y={};for(const d of os.value)d.organization&&(y[d.organization]=(y[d.organization]||0)+1);return y});async function Eo(){Le.value="";const y=In.name.trim();if(!y)return Le.value="Enter an organization name.";Fi.value=!0;const{ok:d,body:Z}=await Uh(y);if(Fi.value=!1,!d)return Le.value=Di(Z);In.name="",Zt("Organization created."),qn()}function Vr(y){yi.value="",wn.id=y.id,wn.name=y.name,kn.value=""}function Vs(){wn.id="",kn.value=""}async function zo(){kn.value="";const y=wn.name.trim();if(!y)return kn.value="Enter an organization name.";const{ok:d,body:Z}=await jh(wn.id,y);if(!d)return kn.value=Di(Z);Zt("Organization renamed."),Vs(),qn(),Gn()}async function Qe(y){const{ok:d,body:Z}=await Wh(y.id);if(yi.value="",!d)return Zt(Z.error||"Could not delete organization.");Zt("Organization deleted."),qn()}function bi(){const y={_app:"PilotVault",_kind:"settings-export",exportedAt:new Date().toISOString(),email:o.email,prefs:{...gt},themeMode:Gi.value},d=new Blob([JSON.stringify(y,null,2)],{type:"application/json"}),Z=URL.createObjectURL(d),w=document.createElement("a");w.href=Z,w.download=`pilotvault-settings-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(w),w.click(),w.remove(),URL.revokeObjectURL(Z),Zt("Settings exported.")}const us=J("");function Sn(y){const d=y.target.files&&y.target.files[0];if(!d)return;const Z=new FileReader;Z.onload=()=>{try{const w=JSON.parse(String(Z.result)),Ht=w.prefs||w;if(!Tc(Ht))throw new Error("bad shape");w.themeMode&&ar(w.themeMode),za(gt.fontSize),Aa(gt.reduceMotion),us.value="Settings imported and applied."}catch{us.value="That file is not a valid PilotVault settings export."}},Z.readAsText(d),y.target.value=""}const se=xe({understand:!1,typed:"",cooldown:0,armed:!1,msg:""});let ln=null;const Zs=ht(()=>o.email||"DELETE MY ACCOUNT"),Yn=ht(()=>se.understand&&se.typed===Zs.value);function Ao(){Yn.value&&(se.armed=!0,se.cooldown=5,clearInterval(ln),ln=setInterval(()=>{se.cooldown--,se.cooldown<=0&&clearInterval(ln)},1e3))}Je(Yn,y=>{!y&&se.armed&&(se.armed=!1,se.cooldown=0,clearInterval(ln))});function cs(){if(!(!se.armed||se.cooldown>0)){try{localStorage.removeItem("pv_prefs")}catch{}se.msg="Account deletion requires the account service. Local data was cleared and you were signed out.",setTimeout(()=>a("logout"),900)}}return Ls(()=>{Tt=setInterval(()=>Ft.value=Date.now(),1e3),qn(),Gn(),A(),Cs(),As(),Ds()}),_r(()=>{clearInterval(Tt),clearInterval(ln),clearTimeout(zi)}),(y,d)=>(b(),x("div",Rp,[f("div",Fp,[d[62]||(d[62]=f("div",null,[f("div",{class:"eyebrow"},"Preferences"),f("h2",{class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},"Settings")],-1)),f("div",Vp,[E(tt,{name:"search",size:16,class:"text-ink-muted"}),xt(f("input",{"onUpdate:modelValue":d[0]||(d[0]=Z=>$.value=Z),placeholder:"Search settings…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Bt,$.value]]),$.value?(b(),x("button",{key:0,class:"text-ink-muted hover:text-ink","aria-label":"Clear search",onClick:d[1]||(d[1]=Z=>$.value="")},[E(tt,{name:"x",size:15})])):V("",!0)])]),f("div",Zp,[xt(f("nav",$p,[(b(!0),x(wt,null,ce(k.value,Z=>(b(),x("button",{key:Z.id,class:Ot(["flex items-center gap-2.5 rounded px-3 py-2.5 text-left text-sm transition",[O.value===Z.id?Z.danger?"bg-danger-soft font-semibold text-danger-fg":"bg-accent-soft font-semibold text-accent-soft-fg":Z.danger?"font-medium text-danger-fg hover:bg-danger-soft":"font-medium text-ink-secondary hover:bg-surface-2"]]),onClick:w=>O.value=Z.id},[E(tt,{name:Z.icon,size:17},null,8,["name"]),f("span",Up,M(Z.label),1)],10,Hp))),128))],512),[[oh,!F.value]]),f("div",jp,[F.value&&!bt.value.length?(b(),x("div",Wp," No settings match “"+M($.value)+"”. ",1)):V("",!0),(b(!0),x(wt,null,ce(bt.value,Z=>(b(),x(wt,{key:Z.id},[F.value?(b(),x("div",Kp,[E(tt,{name:Z.icon,size:14},null,8,["name"]),N(" "+M(Z.label),1)])):V("",!0),Z.id==="account"?(b(),x("div",qp,[E(lt,{title:"Full name",desc:"Shown to your team on flights and audit logs.",keywords:"full name account"},{default:ot(()=>[xt(f("input",{"onUpdate:modelValue":d[2]||(d[2]=w=>Ct(gt).name=w),class:"field w-56",placeholder:"Jane Operator",onBlur:d[3]||(d[3]=w=>Zt("Saved."))},null,544),[[Bt,Ct(gt).name]])]),_:1}),E(lt,{title:"Username",desc:"Your unique handle within PilotVault.",keywords:"username handle"},{default:ot(()=>[f("div",Gp,[d[63]||(d[63]=f("span",{class:"text-sm text-ink-muted"},"@",-1)),xt(f("input",{"onUpdate:modelValue":d[4]||(d[4]=w=>Ct(gt).username=w),class:"field w-48",placeholder:"jane",onBlur:d[5]||(d[5]=w=>Zt("Saved."))},null,544),[[Bt,Ct(gt).username]])])]),_:1}),E(lt,{title:"Email address",desc:"Used for sign-in and notifications.",keywords:"email verification verify"},{default:ot(()=>[f("div",Yp,[f("span",Jp,M(e.email||"—"),1),f("span",Xp,[E(tt,{name:"mail",size:12}),d[64]||(d[64]=N(" Unverified ",-1))])])]),_:1}),E(lt,{title:"Role",desc:"Your access level in PilotVault.",keywords:"role admin user superadmin access rights permissions"},{default:ot(()=>[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",v(e.role)])},[E(tt,{name:g(e.role),size:12},null,8,["name"]),N(M(h(e.role)),1)],2)]),_:1}),E(lt,{title:"Organization",desc:"The organization your account belongs to.",keywords:"organization org tenant company"},{default:ot(()=>[f("span",{class:Ot(["text-sm",e.organizationName?"text-ink":"text-ink-muted"])},M(e.organizationName||(l.value?"All organizations":"None")),3)]),_:1}),E(lt,{block:"",title:"Verify email",desc:"Confirm ownership to enable password resets and alerts.",keywords:"verify email resend"},{default:ot(()=>[f("button",{class:"btn-ghost",onClick:So},"Send verification link"),xn.value?(b(),x("p",Qp,M(xn.value),1)):V("",!0)]),_:1}),E(lt,{block:"",title:"Change password",desc:"Use at least 8 characters.",keywords:"password change current new"},{default:ot(()=>[f("div",tm,[xt(f("input",{"onUpdate:modelValue":d[6]||(d[6]=w=>_e.current=w),type:"password",class:"field",placeholder:"Current password"},null,512),[[Bt,_e.current]]),xt(f("input",{"onUpdate:modelValue":d[7]||(d[7]=w=>_e.next=w),type:"password",class:"field",placeholder:"New password"},null,512),[[Bt,_e.next]]),xt(f("input",{"onUpdate:modelValue":d[8]||(d[8]=w=>_e.confirm=w),type:"password",class:"field",placeholder:"Confirm new password"},null,512),[[Bt,_e.confirm]]),f("div",em,[f("button",{class:"btn-accent",onClick:Se},"Update password"),En.value?(b(),x("span",{key:0,class:Ot(["text-xs",_i.value?"text-success-fg":"text-ink-muted"])},M(En.value),3)):V("",!0)])])]),_:1})])):Z.id==="appearance"?(b(),x("div",nm,[E(lt,{title:"Theme",desc:"Light, dark, or follow your system.",keywords:"theme light dark system appearance"},{default:ot(()=>[E(dn,{modelValue:ut.value,"onUpdate:modelValue":d[9]||(d[9]=w=>ut.value=w),options:X},null,8,["modelValue"])]),_:1}),E(lt,{title:"Font size",desc:"Scales the entire interface for readability.",keywords:"font size accessibility text"},{default:ot(()=>[E(dn,{modelValue:Ct(gt).fontSize,"onUpdate:modelValue":d[10]||(d[10]=w=>Ct(gt).fontSize=w),options:ft},null,8,["modelValue"])]),_:1}),E(lt,{title:"Reduce motion",desc:"Minimise animations and transitions.",keywords:"reduce motion accessibility animation"},{default:ot(()=>[E(tn,{modelValue:Ct(gt).reduceMotion,"onUpdate:modelValue":d[11]||(d[11]=w=>Ct(gt).reduceMotion=w)},null,8,["modelValue"])]),_:1}),E(lt,{title:"Language",desc:"Interface language.",keywords:"language locale"},{default:ot(()=>[xt(f("select",{"onUpdate:modelValue":d[12]||(d[12]=w=>Ct(gt).language=w),class:"field w-48"},[(b(),x(wt,null,ce(de,([w,Ht])=>f("option",{key:w,value:w},M(Ht),9,im)),64))],512),[[wi,Ct(gt).language]])]),_:1}),E(lt,{title:"Region",desc:"Affects number, unit and date defaults.",keywords:"region country locale"},{default:ot(()=>[xt(f("select",{"onUpdate:modelValue":d[13]||(d[13]=w=>Ct(gt).region=w),class:"field w-48"},[(b(),x(wt,null,ce(me,([w,Ht])=>f("option",{key:w,value:w},M(Ht),9,sm)),64))],512),[[wi,Ct(gt).region]])]),_:1}),E(lt,{title:"Date format",desc:"How calendar dates are displayed.",keywords:"date format"},{default:ot(()=>[xt(f("select",{"onUpdate:modelValue":d[14]||(d[14]=w=>Ct(gt).dateFormat=w),class:"field w-48"},[(b(),x(wt,null,ce(vt,([w,Ht])=>f("option",{key:w,value:w},M(Ht),9,om)),64))],512),[[wi,Ct(gt).dateFormat]])]),_:1}),E(lt,{title:"Time format",desc:"12- or 24-hour clock.",keywords:"time format clock 12 24 hour"},{default:ot(()=>[E(dn,{modelValue:Ct(gt).timeFormat,"onUpdate:modelValue":d[15]||(d[15]=w=>Ct(gt).timeFormat=w),options:jt},null,8,["modelValue"])]),_:1}),E(lt,{title:"Preview",desc:"How timestamps appear across the app.",keywords:"preview date time"},{default:ot(()=>[f("span",rm,M(G.value),1)]),_:1}),d[65]||(d[65]=f("p",{class:"mt-3 text-xs text-ink-muted"}," Language & region are stored now; full localisation ships with the account service. ",-1))])):Z.id==="integrations"?(b(),x("div",am,[F.value?V("",!0):(b(),x("div",lm,[(b(),x(wt,null,ce(an,w=>f("button",{key:w.id,type:"button",class:Ot(["-mb-px inline-flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",Jt.value===w.id?"border-accent text-ink":"border-transparent text-ink-secondary hover:text-ink"]),onClick:Ht=>Jt.value=w.id},[E(tt,{name:w.icon,size:16},null,8,["name"]),N(M(w.label),1)],10,um)),64))])),is("apis-external")?(b(),x("div",cm,[f("div",dm,[f("div",fm,[E(tt,{name:"radio",size:20})]),d[66]||(d[66]=f("div",{class:"min-w-0"},[f("div",{class:"text-sm font-semibold text-ink"},"OpenSky Network"),f("div",{class:"mt-0.5 text-xs text-ink-muted"}," Live ADS-B aircraft data. Configure your own OAuth2 credentials, plan and default bounding box. ")],-1))]),st.loaded&&!st.available?(b(),x("div",hm,[E(tt,{name:"lock",size:14,class:"mr-1 inline"}),d[67]||(d[67]=N(" OpenSky is currently disabled by your administrator. Contact them to enable it. ",-1))])):V("",!0),st.canEditOrg?(b(),x("div",pm,[d[68]||(d[68]=f("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(dn,{modelValue:It.value,"onUpdate:modelValue":d[16]||(d[16]=w=>It.value=w),options:nn},null,8,["modelValue"])])):V("",!0),m.value?(b(),oe(lt,{key:2,title:"Enable OpenSky (organization-wide)",desc:"Turn OpenSky on or off for everyone in your organization.",keywords:"enable disable plugin opensky organization"},{default:ot(()=>[E(tn,{"model-value":st.orgEnabled,disabled:!st.available,"onUpdate:modelValue":U},null,8,["model-value","disabled"])]),_:1})):(b(),oe(lt,{key:3,title:"Enable OpenSky",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin opensky"},{default:ot(()=>[E(tn,{"model-value":st.enabled,disabled:!st.available||!st.orgEnabled,"onUpdate:modelValue":U},null,8,["model-value","disabled"])]),_:1})),!m.value&&st.available&&!st.orgEnabled?(b(),x("div",mm,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[70]||(d[70]=N("OpenSky is turned off for your organization",-1)),st.canEditOrg?(b(),x("span",gm,[...d[69]||(d[69]=[N(" — switch to ",-1),f("span",{class:"font-semibold"},"Organization",-1),N(" to turn it back on",-1)])])):V("",!0),d[71]||(d[71]=N(". ",-1))])):V("",!0),m.value?(b(),x("div",_m,[E(tt,{name:"users",size:13,class:"mr-1 inline"}),d[72]||(d[72]=N("These are organization-wide settings — they apply to everyone in ",-1)),f("span",vm,M(e.organizationName||"your organization"),1),d[73]||(d[73]=N(". Leave a field blank to let each user choose their own; a value set here overrides the user's. ",-1))])):we.value?(b(),x("div",ym," As a superadmin you manage the global OpenSky configuration in the API Server panel. The effective configuration is shown below. ")):V("",!0),st.available&&!m.value?(b(),x("div",bm,[f("div",xm,[f("div",wm,[E(tt,{name:"signal",size:15}),d[74]||(d[74]=N("Credit usage ",-1))]),rt.value?(b(),x("span",km,"Checked "+M(Ut()),1)):V("",!0)]),yt.value?(b(),x(wt,{key:0},[yt.value.remaining!=null?(b(),x(wt,{key:0},[f("div",Sm,[f("span",Pm,M(qt(yt.value.remaining)),1),f("span",Tm,"/ "+M(qt(yt.value.daily))+" credits left today",1)]),f("div",Lm,[f("div",{class:Ot(["h-full rounded-full transition-all",ge.value]),style:ks({width:Kt.value+"%"})},null,6)]),f("div",Mm," Used "+M(qt(yt.value.daily-yt.value.remaining))+" today · "+M(yt.value.probeCost)+" credit"+M(yt.value.probeCost===1?"":"s")+" per query · "+M(yt.value.mode),1)],64)):(b(),x(wt,{key:1},[f("div",Cm,[d[75]||(d[75]=N("Daily allowance: ",-1)),f("span",Om,M(qt(yt.value.daily)),1),d[76]||(d[76]=N(" credits",-1))]),f("div",Em,M(yt.value.probeCost)+" credit"+M(yt.value.probeCost===1?"":"s")+" per query · "+M(yt.value.mode)+". OpenSky only reports live remaining credits for authenticated requests — add OAuth2 credentials below to track usage. ",1)],64))],64)):(b(),x("div",zm,[...d[77]||(d[77]=[N(" Run ",-1),f("span",{class:"font-semibold text-ink-secondary"},"Test connection",-1),N(" below to fetch your live OpenSky credit balance. ",-1)])]))])):V("",!0),E(lt,{title:"OpenSky plan",desc:"Your account tier — sets the daily credit allowance.",keywords:"plan tier credits"},{default:ot(()=>[B("plan")?(b(),x("span",Am,[N(M((Te.find(w=>w.value===T("plan").effective)||{}).label||T("plan").effective||"—")+" ",1),I("plan")?(b(),x("span",Im,[E(tt,{name:"lock",size:10}),N(M(I("plan")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:Wt.plan,"onUpdate:modelValue":d[17]||(d[17]=w=>Wt.plan=w),options:Te},null,8,["modelValue"]))]),_:1}),E(lt,{title:"Default bounding box",desc:"lamin,lomin,lamax,lomax — used for live queries and the health probe.",keywords:"bounding box bbox area"},{default:ot(()=>[B("bbox")?(b(),x("span",Nm,[N(M(T("bbox").effective||"—")+" ",1),I("bbox")?(b(),x("span",Bm,[E(tt,{name:"lock",size:10}),N(M(I("bbox")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[18]||(d[18]=w=>Wt.bbox=w),class:"field w-64 font-mono",placeholder:"50.5,3.2,53.7,7.3"},null,512)),[[Bt,Wt.bbox]])]),_:1}),E(lt,{title:"OAuth2 client ID",desc:"Optional — leave blank for anonymous access (lower limits).",keywords:"oauth client id credentials"},{default:ot(()=>[B("clientId")?(b(),x("span",Dm,[N(M(T("clientId").effective||"—")+" ",1),I("clientId")?(b(),x("span",Rm,[E(tt,{name:"lock",size:10}),N(M(I("clientId")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[19]||(d[19]=w=>Wt.clientId=w),class:"field w-64",placeholder:"your-api-client"},null,512)),[[Bt,Wt.clientId]])]),_:1}),E(lt,{title:"OAuth2 client secret",desc:"Paired with the client ID for authenticated access.",keywords:"oauth client secret credentials password"},{default:ot(()=>[B("clientSecret")?(b(),x("span",Fm,[N(M(T("clientSecret").effective||"—")+" ",1),I("clientSecret")?(b(),x("span",Vm,[E(tt,{name:"lock",size:10}),N(M(I("clientSecret")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[20]||(d[20]=w=>Wt.clientSecret=w),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Bt,Wt.clientSecret]])]),_:1}),st.available&&!st.allowAnonymous?(b(),x("div",Zm," Anonymous access is disabled by the administrator — OpenSky needs OAuth2 credentials from some layer to work. ")):V("",!0),f("div",$m,[we.value?V("",!0):(b(),x("button",{key:0,class:"btn-accent",disabled:Vt.value||!st.available,onClick:R},M(Vt.value?"Saving…":m.value?"Save organization settings":"Save settings"),9,Hm)),m.value?V("",!0):(b(),x("button",{key:1,class:"btn-ghost",disabled:Y.value||!st.available,onClick:ct},M(Y.value?"Testing…":"Test connection"),9,Um)),kt.value?(b(),x("span",jm,M(kt.value),1)):V("",!0),ue.value&&!m.value?(b(),x("span",{key:3,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Q(ue.value.status)])},[d[78]||(d[78]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(ue.value.detail||ue.value.status),1)],2)):V("",!0)])])):V("",!0),is("drives-external")?(b(),x(wt,{key:2},[f("div",Wm,[f("div",Km,[f("div",qm,[E(tt,{name:"server",size:20})]),d[79]||(d[79]=f("div",{class:"min-w-0"},[f("div",{class:"text-sm font-semibold text-ink"},"File Transfer (FTP / SFTP)"),f("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to an FTP, FTPS or SFTP server. Configure the connection your account uses for file transfers. ")],-1))]),K.loaded&&!K.available?(b(),x("div",Gm,[E(tt,{name:"lock",size:14,class:"mr-1 inline"}),d[80]||(d[80]=N(" File transfer is currently disabled by your administrator. Contact them to enable it. ",-1))])):V("",!0),K.canEditOrg?(b(),x("div",Ym,[d[81]||(d[81]=f("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(dn,{modelValue:dt.value,"onUpdate:modelValue":d[21]||(d[21]=w=>dt.value=w),options:nn},null,8,["modelValue"])])):V("",!0),Fe.value?(b(),oe(lt,{key:2,title:"Enable file transfer (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin ftp sftp organization"},{default:ot(()=>[E(tn,{"model-value":K.orgEnabled,disabled:!K.available,"onUpdate:modelValue":vo},null,8,["model-value","disabled"])]),_:1})):(b(),oe(lt,{key:3,title:"Enable file transfer",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin ftp sftp"},{default:ot(()=>[E(tn,{"model-value":K.enabled,disabled:!K.available||!K.orgEnabled,"onUpdate:modelValue":vo},null,8,["model-value","disabled"])]),_:1})),!Fe.value&&K.available&&!K.orgEnabled?(b(),x("div",Jm,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[83]||(d[83]=N("File transfer is turned off for your organization",-1)),K.canEditOrg?(b(),x("span",Xm,[...d[82]||(d[82]=[N(" — switch to ",-1),f("span",{class:"font-semibold"},"Organization",-1),N(" to turn it back on",-1)])])):V("",!0),d[84]||(d[84]=N(". ",-1))])):V("",!0),Fe.value?(b(),x("div",Qm,[E(tt,{name:"users",size:13,class:"mr-1 inline"}),d[85]||(d[85]=N("These are organization-wide settings — they apply to everyone in ",-1)),f("span",tg,M(e.organizationName||"your organization"),1),d[86]||(d[86]=N(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):ve.value?(b(),x("div",eg," As a superadmin you manage the global file-transfer configuration in the API Server panel. The effective configuration is shown below. ")):V("",!0),E(lt,{title:"Protocol",desc:"SFTP (over SSH), FTPS (FTP over TLS), or plain FTP.",keywords:"protocol sftp ftps ftp"},{default:ot(()=>[Ve("protocol")?(b(),x("span",ng,[N(M(xr(Oe("protocol").effective))+" ",1),he("protocol")?(b(),x("span",ig,[E(tt,{name:"lock",size:10}),N(M(he("protocol")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:at.protocol,"onUpdate:modelValue":d[22]||(d[22]=w=>at.protocol=w),options:_n},null,8,["modelValue"]))]),_:1}),E(lt,{title:"Host",desc:"Server hostname or IP address.",keywords:"host server address"},{default:ot(()=>[Ve("host")?(b(),x("span",sg,[N(M(Oe("host").effective||"—")+" ",1),he("host")?(b(),x("span",og,[E(tt,{name:"lock",size:10}),N(M(he("host")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[23]||(d[23]=w=>at.host=w),class:"field w-64",placeholder:"files.example.com"},null,512)),[[Bt,at.host]])]),_:1}),E(lt,{title:"Port",desc:"Leave blank for the protocol default (22 for SFTP, 21 for FTP/FTPS).",keywords:"port"},{default:ot(()=>[Ve("port")?(b(),x("span",rg,[N(M(Oe("port").effective||"default")+" ",1),he("port")?(b(),x("span",ag,[E(tt,{name:"lock",size:10}),N(M(he("port")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[24]||(d[24]=w=>at.port=w),inputmode:"numeric",class:"field w-24 font-mono",placeholder:"22"},null,512)),[[Bt,at.port]])]),_:1}),E(lt,{title:"Username",desc:"Account used to authenticate.",keywords:"username login account"},{default:ot(()=>[Ve("username")?(b(),x("span",lg,[N(M(Oe("username").effective||"—")+" ",1),he("username")?(b(),x("span",ug,[E(tt,{name:"lock",size:10}),N(M(he("username")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[25]||(d[25]=w=>at.username=w),class:"field w-64",placeholder:"user"},null,512)),[[Bt,at.username]])]),_:1}),E(lt,{title:"Password",desc:"Password auth for FTP/FTPS, or SFTP password login. Leave blank to use a key.",keywords:"password secret credentials"},{default:ot(()=>[Ve("password")?(b(),x("span",cg,[N(M(Oe("password").effective||"—")+" ",1),he("password")?(b(),x("span",dg,[E(tt,{name:"lock",size:10}),N(M(he("password")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[26]||(d[26]=w=>at.password=w),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Bt,at.password]])]),_:1}),Yi.value==="sftp"?(b(),oe(lt,{key:7,block:"",title:"SSH private key",desc:"PEM key for SFTP key auth — used instead of, or alongside, a password.",keywords:"private key ssh pem identity"},{default:ot(()=>[Ve("privateKey")?(b(),x("span",fg,[N(M(Oe("privateKey").effective||"—")+" ",1),he("privateKey")?(b(),x("span",hg,[E(tt,{name:"lock",size:10}),N(M(he("privateKey")),1)])):V("",!0)])):xt((b(),x("textarea",{key:1,"onUpdate:modelValue":d[27]||(d[27]=w=>at.privateKey=w),rows:"3",class:"field w-full font-mono text-xs",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----"},null,512)),[[Bt,at.privateKey]])]),_:1})):V("",!0),Yi.value==="sftp"?(b(),oe(lt,{key:8,title:"Private key passphrase",desc:"Passphrase protecting the SSH private key, if any.",keywords:"passphrase key secret"},{default:ot(()=>[Ve("keyPassphrase")?(b(),x("span",pg,[N(M(Oe("keyPassphrase").effective||"—")+" ",1),he("keyPassphrase")?(b(),x("span",mg,[E(tt,{name:"lock",size:10}),N(M(he("keyPassphrase")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[28]||(d[28]=w=>at.keyPassphrase=w),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Bt,at.keyPassphrase]])]),_:1})):V("",!0),Yi.value==="sftp"?(b(),oe(lt,{key:9,title:"Host key fingerprint",desc:"Optional SHA256:… fingerprint to pin the server's host key. Blank accepts any key.",keywords:"host key fingerprint verify trust"},{default:ot(()=>[Ve("hostKeyFingerprint")?(b(),x("span",gg,[N(M(Oe("hostKeyFingerprint").effective||"—")+" ",1),he("hostKeyFingerprint")?(b(),x("span",_g,[E(tt,{name:"lock",size:10}),N(M(he("hostKeyFingerprint")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[29]||(d[29]=w=>at.hostKeyFingerprint=w),class:"field w-full font-mono text-xs",placeholder:"SHA256:…"},null,512)),[[Bt,at.hostKeyFingerprint]])]),_:1})):V("",!0),Yi.value==="ftps"?(b(),oe(lt,{key:10,title:"TLS verification",desc:"Skip only for self-signed test servers.",keywords:"tls certificate verify insecure ftps"},{default:ot(()=>[Ve("insecureSkipVerify")?(b(),x("span",vg,[N(M(Oe("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),he("insecureSkipVerify")?(b(),x("span",yg,[E(tt,{name:"lock",size:10}),N(M(he("insecureSkipVerify")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:at.insecureSkipVerify,"onUpdate:modelValue":d[30]||(d[30]=w=>at.insecureSkipVerify=w),options:ui},null,8,["modelValue"]))]),_:1})):V("",!0),E(lt,{title:"Base path",desc:"Working directory and health-check target, e.g. /uploads.",keywords:"base path directory folder root"},{default:ot(()=>[Ve("basePath")?(b(),x("span",bg,[N(M(Oe("basePath").effective||"—")+" ",1),he("basePath")?(b(),x("span",xg,[E(tt,{name:"lock",size:10}),N(M(he("basePath")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[31]||(d[31]=w=>at.basePath=w),class:"field w-64 font-mono",placeholder:"/uploads"},null,512)),[[Bt,at.basePath]])]),_:1}),f("div",wg,[ve.value?V("",!0):(b(),x("button",{key:0,class:"btn-accent",disabled:ne.value||!K.available,onClick:Pr},M(ne.value?"Saving…":Fe.value?"Save organization settings":"Save settings"),9,kg)),Fe.value?V("",!0):(b(),x("button",{key:1,class:"btn-ghost",disabled:ae.value||!K.available,onClick:Tr},M(ae.value?"Testing…":"Test connection"),9,Sg)),Rt.value?(b(),x("span",Pg,M(Rt.value),1)):V("",!0),ke.value&&!Fe.value?(b(),x("span",Tg,"Checked "+M(wr()),1)):V("",!0),fe.value&&!Fe.value?(b(),x("span",{key:4,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Lr(fe.value.status)])},[d[87]||(d[87]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(fe.value.detail||fe.value.status),1)],2)):V("",!0)])]),f("div",Lg,[f("div",Mg,[f("div",Cg,[E(tt,{name:"cloud",size:20})]),d[88]||(d[88]=f("div",{class:"min-w-0"},[f("div",{class:"text-sm font-semibold text-ink"},"WebDAV"),f("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to a WebDAV server (Nextcloud, ownCloud, IIS, …). Configure the connection your account uses. ")],-1))]),Et.loaded&&!Et.available?(b(),x("div",Og,[E(tt,{name:"lock",size:14,class:"mr-1 inline"}),d[89]||(d[89]=N(" WebDAV is currently disabled by your administrator. Contact them to enable it. ",-1))])):V("",!0),Et.canEditOrg?(b(),x("div",Eg,[d[90]||(d[90]=f("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(dn,{modelValue:it.value,"onUpdate:modelValue":d[32]||(d[32]=w=>it.value=w),options:nn},null,8,["modelValue"])])):V("",!0),on.value?(b(),oe(lt,{key:2,title:"Enable WebDAV (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin webdav organization"},{default:ot(()=>[E(tn,{"model-value":Et.orgEnabled,disabled:!Et.available,"onUpdate:modelValue":hi},null,8,["model-value","disabled"])]),_:1})):(b(),oe(lt,{key:3,title:"Enable WebDAV",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin webdav"},{default:ot(()=>[E(tn,{"model-value":Et.enabled,disabled:!Et.available||!Et.orgEnabled,"onUpdate:modelValue":hi},null,8,["model-value","disabled"])]),_:1})),!on.value&&Et.available&&!Et.orgEnabled?(b(),x("div",zg,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[92]||(d[92]=N("WebDAV is turned off for your organization",-1)),Et.canEditOrg?(b(),x("span",Ag,[...d[91]||(d[91]=[N(" — switch to ",-1),f("span",{class:"font-semibold"},"Organization",-1),N(" to turn it back on",-1)])])):V("",!0),d[93]||(d[93]=N(". ",-1))])):V("",!0),on.value?(b(),x("div",Ig,[E(tt,{name:"users",size:13,class:"mr-1 inline"}),d[94]||(d[94]=N("These are organization-wide settings — they apply to everyone in ",-1)),f("span",Ng,M(e.organizationName||"your organization"),1),d[95]||(d[95]=N(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):Os.value?(b(),x("div",Bg," As a superadmin you manage the global WebDAV configuration in the API Server panel. The effective configuration is shown below. ")):V("",!0),E(lt,{block:"",title:"Server URL",desc:"WebDAV endpoint including scheme, e.g. https://cloud.example.com/remote.php/dav/files/alice/.",keywords:"url server address endpoint webdav host"},{default:ot(()=>[fi("baseURL")?(b(),x("span",Dg,[N(M(vn("baseURL").effective||"—")+" ",1),Ze("baseURL")?(b(),x("span",Rg,[E(tt,{name:"lock",size:10}),N(M(Ze("baseURL")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[33]||(d[33]=w=>Ee.baseURL=w),class:"field w-full font-mono text-xs",placeholder:"https://cloud.example.com/remote.php/dav/files/alice/"},null,512)),[[Bt,Ee.baseURL]])]),_:1}),E(lt,{title:"Username",desc:"Account used to authenticate (leave blank for a public share).",keywords:"username login account"},{default:ot(()=>[fi("username")?(b(),x("span",Fg,[N(M(vn("username").effective||"—")+" ",1),Ze("username")?(b(),x("span",Vg,[E(tt,{name:"lock",size:10}),N(M(Ze("username")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[34]||(d[34]=w=>Ee.username=w),class:"field w-64",placeholder:"user"},null,512)),[[Bt,Ee.username]])]),_:1}),E(lt,{title:"Password",desc:"Password or app-specific token for HTTP Basic auth.",keywords:"password secret credentials token"},{default:ot(()=>[fi("password")?(b(),x("span",Zg,[N(M(vn("password").effective||"—")+" ",1),Ze("password")?(b(),x("span",$g,[E(tt,{name:"lock",size:10}),N(M(Ze("password")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[35]||(d[35]=w=>Ee.password=w),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Bt,Ee.password]])]),_:1}),E(lt,{title:"TLS verification",desc:"Only affects HTTPS. Skip only for self-signed test servers.",keywords:"tls certificate verify insecure https"},{default:ot(()=>[fi("insecureSkipVerify")?(b(),x("span",Hg,[N(M(vn("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),Ze("insecureSkipVerify")?(b(),x("span",Ug,[E(tt,{name:"lock",size:10}),N(M(Ze("insecureSkipVerify")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:Ee.insecureSkipVerify,"onUpdate:modelValue":d[36]||(d[36]=w=>Ee.insecureSkipVerify=w),options:yo},null,8,["modelValue"]))]),_:1}),E(lt,{title:"Base path",desc:"Working directory under the server URL and health-check target, e.g. /Documents.",keywords:"base path directory folder root"},{default:ot(()=>[fi("basePath")?(b(),x("span",jg,[N(M(vn("basePath").effective||"—")+" ",1),Ze("basePath")?(b(),x("span",Wg,[E(tt,{name:"lock",size:10}),N(M(Ze("basePath")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[37]||(d[37]=w=>Ee.basePath=w),class:"field w-64 font-mono",placeholder:"/Documents"},null,512)),[[Bt,Ee.basePath]])]),_:1}),f("div",Kg,[Os.value?V("",!0):(b(),x("button",{key:0,class:"btn-accent",disabled:Mi.value||!Et.available,onClick:xo},M(Mi.value?"Saving…":on.value?"Save organization settings":"Save settings"),9,qg)),on.value?V("",!0):(b(),x("button",{key:1,class:"btn-ghost",disabled:di.value||!Et.available,onClick:wo},M(di.value?"Testing…":"Test connection"),9,Gg)),ci.value?(b(),x("span",Yg,M(ci.value),1)):V("",!0),Xe.value&&!on.value?(b(),x("span",Jg,"Checked "+M(Cr()),1)):V("",!0),sn.value&&!on.value?(b(),x("span",{key:4,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Ci(sn.value.status)])},[d[96]||(d[96]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(sn.value.detail||sn.value.status),1)],2)):V("",!0)])])],64)):V("",!0),is("drives-local")?(b(),x("div",Xg,[f("div",Qg,[f("div",t_,[E(tt,{name:"monitor",size:20})]),d[97]||(d[97]=f("div",{class:"min-w-0"},[f("div",{class:"text-sm font-semibold text-ink"},"Local Storage"),f("div",{class:"mt-0.5 text-xs text-ink-muted"}," A private folder on the server for your files. Each user has their own; members of an organization share one. ")],-1))]),W.loaded&&!W.available?(b(),x("div",e_,[E(tt,{name:"lock",size:14,class:"mr-1 inline"}),d[98]||(d[98]=N(" Local storage is currently disabled by your administrator. Contact them to enable it. ",-1))])):W.loaded&&!W.rootConfigured?(b(),x("div",n_,[E(tt,{name:"alertTriangle",size:14,class:"mr-1 inline"}),d[99]||(d[99]=N(" No storage root has been configured by your administrator yet. ",-1))])):V("",!0),W.canEditOrg?(b(),x("div",i_,[d[100]||(d[100]=f("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(dn,{modelValue:Yt.value,"onUpdate:modelValue":d[38]||(d[38]=w=>Yt.value=w),options:nn},null,8,["modelValue"])])):V("",!0),ye.value?(b(),oe(lt,{key:3,title:"Enable local storage (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin local storage folder organization"},{default:ot(()=>[E(tn,{"model-value":W.orgEnabled,disabled:!W.available,"onUpdate:modelValue":es},null,8,["model-value","disabled"])]),_:1})):(b(),oe(lt,{key:4,title:"Enable local storage",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin local storage folder"},{default:ot(()=>[E(tn,{"model-value":W.enabled,disabled:!W.available||!W.orgEnabled,"onUpdate:modelValue":es},null,8,["model-value","disabled"])]),_:1})),!ye.value&&W.available&&!W.orgEnabled?(b(),x("div",s_,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[102]||(d[102]=N("Local storage is turned off for your organization",-1)),W.canEditOrg?(b(),x("span",o_,[...d[101]||(d[101]=[N(" — switch to ",-1),f("span",{class:"font-semibold"},"Organization",-1),N(" to turn it back on",-1)])])):V("",!0),d[103]||(d[103]=N(". ",-1))])):V("",!0),ye.value?(b(),x("div",r_,[E(tt,{name:"users",size:13,class:"mr-1 inline"}),d[104]||(d[104]=N("These are organization-wide settings — they apply to everyone in ",-1)),f("span",a_,M(e.organizationName||"your organization"),1),d[105]||(d[105]=N(", who all share the organization folder. Members can additionally enable a private folder inside it. ",-1))])):Ie.value?(b(),x("div",l_," As a superadmin you manage the global storage root in the API Server panel. The effective configuration is shown below. ")):V("",!0),ye.value?(b(),oe(lt,{key:8,title:"Private folders",desc:"Let members create a private folder inside the organization folder, reachable only by them.",keywords:"private folder members allow policy organization"},{default:ot(()=>[E(tn,{"model-value":W.allowPrivate,disabled:!W.available,"onUpdate:modelValue":ko},null,8,["model-value","disabled"])]),_:1})):V("",!0),ye.value?V("",!0):(b(),x(wt,{key:9},[E(lt,{block:"",title:"Your folders",desc:"Assigned automatically and isolated — no one else can reach your private folder.",keywords:"folder directory path storage location isolated private shared"},{default:ot(()=>[f("div",u_,[(b(!0),x(wt,null,ce(W.mounts,w=>(b(),x("div",{key:w.id,class:"flex flex-wrap items-center gap-2"},[f("span",c_,M(w.path),1),w.kind==="shared"?(b(),x("span",d_,[E(tt,{name:"users",size:10}),d[106]||(d[106]=N("Shared with your organization",-1))])):(b(),x("span",f_,[E(tt,{name:"lock",size:10}),d[107]||(d[107]=N("Private to you",-1))])),jn.value[w.id]?(b(),x("span",{key:2,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-semibold",St(jn.value[w.id].status)])},[d[108]||(d[108]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(jn.value[w.id].status),1)],2)):V("",!0)]))),128)),W.mounts.length?V("",!0):(b(),x("div",h_,M(W.rootConfigured?"No folder assigned yet.":"Waiting for the administrator to configure a storage root."),1))])]),_:1}),W.isOrgUser&&W.allowPrivate?(b(),oe(lt,{key:0,title:"My private folder",desc:"Add a private folder inside the organization folder, reachable only by you — you keep the shared folder too.",keywords:"private folder personal isolated organization inside"},{default:ot(()=>[E(tn,{"model-value":W.privateFolder,disabled:!W.available||!W.orgEnabled,"onUpdate:modelValue":ns},null,8,["model-value","disabled"])]),_:1})):W.isOrgUser&&!W.allowPrivate?(b(),x("div",p_,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[109]||(d[109]=N("Private folders are turned off by your organization. ",-1))])):V("",!0)],64)),E(lt,{title:"Access mode",desc:"Read-only prevents uploads, deletes and folder creation.",keywords:"read only write access mode permission"},{default:ot(()=>[On("readOnly")?(b(),x("span",m_,[N(M(Ei(le("readOnly").effective))+" ",1),mi("readOnly")?(b(),x("span",g_,[E(tt,{name:"lock",size:10}),N(M(mi("readOnly")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:Un.value,"onUpdate:modelValue":d[39]||(d[39]=w=>Un.value=w),options:Oi},null,8,["modelValue"]))]),_:1}),f("div",__,[Ie.value?V("",!0):(b(),x("button",{key:0,class:"btn-accent",disabled:yn.value||!W.available,onClick:Rs},M(yn.value?"Saving…":ye.value?"Save organization settings":"Save settings"),9,v_)),ye.value?V("",!0):(b(),x("button",{key:1,class:"btn-ghost",disabled:pi.value||!W.available,onClick:zr},M(pi.value?"Testing…":"Test folder"),9,y_)),rn.value?(b(),x("span",b_,M(rn.value),1)):V("",!0),te.value&&!ye.value?(b(),x("span",x_,"Checked "+M(Ns()),1)):V("",!0),mt.value&&!ye.value?(b(),x("span",{key:4,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",St(mt.value.status)])},[d[110]||(d[110]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(mt.value.detail||mt.value.status),1)],2)):V("",!0)])])):V("",!0)])):Z.id==="profile"?(b(),x("div",w_,[E(lt,{block:"",title:"Profile photo",desc:"PNG or JPG, up to ~1.5 MB. Stored on this device.",keywords:"avatar photo picture"},{default:ot(()=>[f("div",k_,[Ct(gt).avatar?(b(),x("img",{key:0,src:Ct(gt).avatar,alt:"Avatar",class:"h-16 w-16 rounded-full object-cover"},null,8,S_)):(b(),x("div",P_,M(To.value),1)),f("div",T_,[f("label",L_,[E(tt,{name:"upload",size:15,class:"mr-1.5 inline"}),d[111]||(d[111]=N("Upload ",-1)),f("input",{type:"file",accept:"image/*",class:"hidden",onChange:Po},null,32)]),Ct(gt).avatar?(b(),x("button",{key:0,class:"btn-ghost",onClick:Ar},"Remove")):V("",!0)])])]),_:1}),E(lt,{title:"Display name",desc:"The name shown on your public profile.",keywords:"display name profile"},{default:ot(()=>[xt(f("input",{"onUpdate:modelValue":d[40]||(d[40]=w=>Ct(gt).displayName=w),class:"field w-56",placeholder:"Jane O.",onBlur:d[41]||(d[41]=w=>Zt("Saved."))},null,544),[[Bt,Ct(gt).displayName]])]),_:1}),E(lt,{block:"",title:"Bio",desc:"A short description others can see.",keywords:"bio about description"},{default:ot(()=>[xt(f("textarea",{"onUpdate:modelValue":d[42]||(d[42]=w=>Ct(gt).bio=w),rows:"3",maxlength:"240",class:"field w-full resize-none",placeholder:"Flight director, North yard operations…",onBlur:d[43]||(d[43]=w=>Zt("Saved."))},null,544),[[Bt,Ct(gt).bio]]),f("div",M_,M((Ct(gt).bio||"").length)+"/240",1)]),_:1}),E(lt,{title:"Show email on profile",desc:"Let teammates see your email address.",keywords:"show email public visibility"},{default:ot(()=>[E(tn,{modelValue:Ct(gt).showEmail,"onUpdate:modelValue":d[44]||(d[44]=w=>Ct(gt).showEmail=w)},null,8,["modelValue"])]),_:1})])):Z.id==="security"?(b(),x("div",C_,[E(lt,{block:"",title:"Two-factor authentication",desc:"Require a one-time code at sign-in.",keywords:"two factor 2fa authentication security"},{default:ot(()=>[f("div",O_,[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Ct(gt).twoFactor?"bg-success-soft text-success-fg":"bg-surface-2 text-ink-secondary"])},[d[112]||(d[112]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(Ct(gt).twoFactor?"Enabled":"Disabled"),1)],2),!Ct(gt).twoFactor&&!Wn.value?(b(),x("button",{key:0,class:"btn-accent",onClick:Ii},"Enable 2FA")):Ct(gt).twoFactor?(b(),x("button",{key:1,class:"btn-ghost",onClick:Ir},"Disable")):V("",!0)]),Wn.value?(b(),x("div",E_,[f("div",z_,[d[114]||(d[114]=f("div",{class:"grid h-28 w-28 place-items-center rounded bg-white p-2"},[f("svg",{viewBox:"0 0 100 100",class:"h-full w-full"},[f("rect",{width:"100",height:"100",fill:"#fff"}),f("g",{fill:"#0F1E3D"},[f("rect",{x:"6",y:"6",width:"24",height:"24"}),f("rect",{x:"70",y:"6",width:"24",height:"24"}),f("rect",{x:"6",y:"70",width:"24",height:"24"}),f("rect",{x:"12",y:"12",width:"12",height:"12",fill:"#fff"}),f("rect",{x:"76",y:"12",width:"12",height:"12",fill:"#fff"}),f("rect",{x:"12",y:"76",width:"12",height:"12",fill:"#fff"}),f("rect",{x:"40",y:"10",width:"8",height:"8"}),f("rect",{x:"52",y:"20",width:"8",height:"8"}),f("rect",{x:"40",y:"40",width:"8",height:"8"}),f("rect",{x:"60",y:"44",width:"8",height:"8"}),f("rect",{x:"44",y:"60",width:"8",height:"8"}),f("rect",{x:"70",y:"60",width:"8",height:"8"}),f("rect",{x:"80",y:"72",width:"8",height:"8"}),f("rect",{x:"60",y:"80",width:"8",height:"8"})])])],-1)),f("div",A_,[d[113]||(d[113]=f("div",{class:"text-xs text-ink-secondary"},"Scan with an authenticator app, or enter this secret:",-1)),f("div",I_,M(Lo.value),1),f("div",N_,[xt(f("input",{"onUpdate:modelValue":d[45]||(d[45]=w=>Ai.value=w),inputmode:"numeric",maxlength:"6",class:"field w-28 font-mono tracking-[0.3em]",placeholder:"000000"},null,512),[[Bt,Ai.value]]),f("button",{class:"btn-accent",onClick:Mo},"Verify & enable")]),zt.value?(b(),x("p",B_,M(zt.value),1)):V("",!0)])])])):V("",!0),Ct(gt).twoFactor&&ss.value.length?(b(),x("div",D_,[d[115]||(d[115]=f("div",{class:"text-xs font-semibold text-ink"},"Recovery codes",-1)),d[116]||(d[116]=f("div",{class:"mt-0.5 text-xs text-ink-muted"},"Store these somewhere safe — each works once.",-1)),f("div",R_,[(b(!0),x(wt,null,ce(ss.value,w=>(b(),x("span",{key:w,class:"select-all"},M(w),1))),128))])])):V("",!0),d[117]||(d[117]=f("p",{class:"mt-2 text-xs text-ink-muted"},"Prototype — codes are generated locally until the account service verifies them.",-1))]),_:1}),E(lt,{block:"",title:"Active sessions",desc:"Devices currently signed in to your account.",keywords:"sessions devices logout sign out remote"},{default:ot(()=>[f("div",F_,[f("div",V_,[f("div",Z_,[E(tt,{name:"monitor",size:18})]),f("div",$_,[f("div",H_,[N(M(Nr())+" on "+M(Co())+" ",1),d[118]||(d[118]=f("span",{class:"ml-1 rounded-full bg-success-soft px-2 py-0.5 text-[10px] font-semibold text-success-fg"},"This device",-1))]),f("div",U_,"Signed in "+M(Ct(Gl)(Ct(Br))),1)]),f("button",{class:"btn-ghost",onClick:d[46]||(d[46]=w=>a("logout"))},"Log out")])]),d[119]||(d[119]=f("button",{class:"btn-ghost mt-2 opacity-60",disabled:"",title:"Requires the account service"}," Log out all other devices ",-1)),d[120]||(d[120]=f("p",{class:"mt-2 text-xs text-ink-muted"}," Only this session is visible from the browser; enumerating and revoking remote sessions needs the account service. ",-1))]),_:1})])):Z.id==="team"?(b(),x("div",j_,[$t.id?(b(),x("div",W_,[E(lt,{block:"",title:`Edit user — ${$t.email}`,desc:"Update details, change role, reset password, or set verified.",keywords:"edit user update role password verified organization"},{default:ot(()=>[f("div",K_,[f("div",q_,[xt(f("input",{"onUpdate:modelValue":d[47]||(d[47]=w=>$t.email=w),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Bt,$t.email]]),xt(f("select",{"onUpdate:modelValue":d[48]||(d[48]=w=>$t.role=w),class:"field w-32",disabled:as.value,title:as.value?"You cannot change your own role":""},[(b(!0),x(wt,null,ce(Fs.value,w=>(b(),x("option",{key:w.value,value:w.value},M(w.label),9,Y_))),128))],8,G_),[[wi,$t.role]])]),l.value?xt((b(),x("select",{key:0,"onUpdate:modelValue":d[49]||(d[49]=w=>$t.organization=w),class:"field",title:"Organization"},[(b(!0),x(wt,null,ce(Oo.value,w=>(b(),x("option",{key:w.value,value:w.value},M(w.label),9,J_))),128))],512)),[[wi,$t.organization]]):V("",!0),xt(f("input",{"onUpdate:modelValue":d[50]||(d[50]=w=>$t.password=w),type:"password",class:"field",placeholder:"New password (leave blank to keep current)"},null,512),[[Bt,$t.password]]),f("label",X_,[E(tn,{modelValue:$t.verified,"onUpdate:modelValue":d[51]||(d[51]=w=>$t.verified=w)},null,8,["modelValue"]),d[121]||(d[121]=N(" Email verified ",-1))]),f("div",Q_,[f("button",{class:"btn-accent",disabled:Ri.value,onClick:Fr},M(Ri.value?"Saving…":"Save changes"),9,tv),f("button",{class:"btn-ghost",onClick:An},"Cancel"),zn.value?(b(),x("span",ev,M(zn.value),1)):V("",!0),as.value?(b(),x("span",nv,"Editing your own account — role locked.")):V("",!0)])])]),_:1},8,["title"])])):(b(),x("div",iv,[E(lt,{block:"",title:"Add user",desc:"Create a new account. Admins add users within their organization; superadmins can target any.",keywords:"add user create account role admin organization"},{default:ot(()=>[f("div",sv,[f("div",ov,[xt(f("input",{"onUpdate:modelValue":d[52]||(d[52]=w=>ee.email=w),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Bt,ee.email]]),xt(f("select",{"onUpdate:modelValue":d[53]||(d[53]=w=>ee.role=w),class:"field w-32"},[(b(!0),x(wt,null,ce(Fs.value,w=>(b(),x("option",{key:w.value,value:w.value},M(w.label),9,rv))),128))],512),[[wi,ee.role]])]),l.value?xt((b(),x("select",{key:0,"onUpdate:modelValue":d[54]||(d[54]=w=>ee.organization=w),class:"field",title:"Organization"},[(b(!0),x(wt,null,ce(Oo.value,w=>(b(),x("option",{key:w.value,value:w.value},M(w.label),9,av))),128))],512)),[[wi,ee.organization]]):(b(),x("div",lv,[d[122]||(d[122]=N(" New users join your organization: ",-1)),f("span",uv,M(e.organizationName||"—"),1)])),xt(f("input",{"onUpdate:modelValue":d[55]||(d[55]=w=>ee.password=w),type:"password",class:"field",placeholder:"Temporary password (min 8 chars)"},null,512),[[Bt,ee.password]]),f("div",cv,[f("button",{class:"btn-accent",disabled:Ni.value,onClick:Dr},M(Ni.value?"Creating…":"Create user"),9,dv),vi.value?(b(),x("span",fv,M(vi.value),1)):V("",!0)])])]),_:1})])),f("div",hv,[f("div",pv,[d[123]||(d[123]=f("div",null,[f("div",{class:"eyebrow"},"Team"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All users")],-1)),f("button",{class:"btn-ghost",disabled:Kn.value,onClick:Gn},M(Kn.value?"Loading…":"Refresh"),9,mv)]),rs.value?(b(),x("div",gv,M(rs.value),1)):!os.value.length&&!Kn.value?(b(),x("div",_v,"No users yet.")):(b(),x("div",vv,[f("table",yv,[f("thead",null,[f("tr",bv,[(b(),x(wt,null,ce(["User","Role","Organization","Status",""],w=>f("th",{key:w,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},M(w),1)),64))])]),f("tbody",null,[(b(!0),x(wt,null,ce(os.value,w=>(b(),x("tr",{key:w.id,class:Ot(["border-b border-line last:border-0",$t.id===w.id?"bg-accent-soft":""])},[f("td",xv,[f("span",wv,M(w.email),1),w.email===e.email?(b(),x("span",kv,"(you)")):V("",!0)]),f("td",Sv,[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",v(w.role||"user")])},[E(tt,{name:g(w.role||"user"),size:12},null,8,["name"]),N(M(h(w.role||"user")),1)],2)]),f("td",Pv,[f("span",{class:Ot(["text-sm",w.organizationName?"text-ink-secondary":"text-ink-muted"])},M(w.organizationName||"—"),3)]),f("td",Tv,[f("span",{class:Ot(["text-xs",w.verified?"text-success-fg":"text-ink-muted"])},M(w.verified?"Verified":"Unverified"),3)]),f("td",Lv,[qe.value===w.id?(b(),x(wt,{key:0},[d[124]||(d[124]=f("span",{class:"mr-2 text-xs text-ink-muted"},"Remove?",-1)),f("button",{class:"btn-ghost mr-1",onClick:d[56]||(d[56]=Ht=>qe.value="")},"Cancel"),f("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:Ht=>Rr(w)}," Remove ",8,Mv)],64)):(b(),x("div",Cv,[f("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:Ht=>ls(w)},[E(tt,{name:"settings",size:14}),d[125]||(d[125]=N(" Edit ",-1))],8,Ov),w.email!==e.email?(b(),x("button",{key:0,class:"btn-ghost inline-flex items-center gap-1.5",onClick:Ht=>qe.value=w.id},[E(tt,{name:"trash",size:14}),d[126]||(d[126]=N(" Remove ",-1))],8,Ev)):V("",!0)]))])],2))),128))])])]))])])):Z.id==="organizations"?(b(),x("div",zv,[wn.id?(b(),x("div",Av,[E(lt,{block:"",title:"Rename organization",desc:"Update the organization's display name.",keywords:"rename organization edit"},{default:ot(()=>[f("div",Iv,[xt(f("input",{"onUpdate:modelValue":d[57]||(d[57]=w=>wn.name=w),class:"field",placeholder:"Organization name",onKeyup:Vl(zo,["enter"])},null,544),[[Bt,wn.name]]),f("div",Nv,[f("button",{class:"btn-accent",onClick:zo},"Save changes"),f("button",{class:"btn-ghost",onClick:Vs},"Cancel"),kn.value?(b(),x("span",Bv,M(kn.value),1)):V("",!0)])])]),_:1})])):(b(),x("div",Dv,[E(lt,{block:"",title:"Add organization",desc:"Create a new organization. Assign admins and users to it from User management.",keywords:"add organization create tenant company"},{default:ot(()=>[f("div",Rv,[xt(f("input",{"onUpdate:modelValue":d[58]||(d[58]=w=>In.name=w),class:"field",placeholder:"e.g. Northwind Aerial",onKeyup:Vl(Eo,["enter"])},null,544),[[Bt,In.name]]),f("div",Fv,[f("button",{class:"btn-accent",disabled:Fi.value,onClick:Eo},M(Fi.value?"Creating…":"Create organization"),9,Vv),Le.value?(b(),x("span",Zv,M(Le.value),1)):V("",!0)])])]),_:1})])),f("div",$v,[f("div",{class:"flex items-center justify-between px-5 py-4"},[d[127]||(d[127]=f("div",null,[f("div",{class:"eyebrow"},"Tenancy"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All organizations")],-1)),f("button",{class:"btn-ghost",onClick:qn},"Refresh")]),Bi.value.length?(b(),x("div",Uv,[f("table",jv,[f("thead",null,[f("tr",Wv,[(b(),x(wt,null,ce(["Organization","Members",""],w=>f("th",{key:w,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},M(w),1)),64))])]),f("tbody",null,[(b(!0),x(wt,null,ce(Bi.value,w=>(b(),x("tr",{key:w.id,class:Ot(["border-b border-line last:border-0",wn.id===w.id?"bg-accent-soft":""])},[f("td",Kv,[f("span",qv,[E(tt,{name:"grid",size:14,class:"text-ink-muted"}),N(M(w.name),1)])]),f("td",Gv,M(Vi.value[w.id]||0),1),f("td",Yv,[yi.value===w.id?(b(),x(wt,{key:0},[d[128]||(d[128]=f("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),f("button",{class:"btn-ghost mr-1",onClick:d[59]||(d[59]=Ht=>yi.value="")},"Cancel"),f("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:Ht=>Qe(w)}," Delete ",8,Jv)],64)):(b(),x("div",Xv,[f("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:Ht=>Vr(w)},[E(tt,{name:"settings",size:14}),d[129]||(d[129]=N(" Rename ",-1))],8,Qv),f("button",{class:"btn-ghost inline-flex items-center gap-1.5",disabled:(Vi.value[w.id]||0)>0,title:(Vi.value[w.id]||0)>0?"Reassign or remove members first":"",onClick:Ht=>yi.value=w.id},[E(tt,{name:"trash",size:14}),d[130]||(d[130]=N(" Delete ",-1))],8,ty)]))])],2))),128))])])])):(b(),x("div",Hv,"No organizations yet."))])])):Z.id==="advanced"?(b(),x("div",ey,[f("div",ny,[E(lt,{title:"Export data",desc:"Download your settings and profile as JSON.",keywords:"export data download backup"},{default:ot(()=>[f("button",{class:"btn-ghost",onClick:bi},[E(tt,{name:"download",size:15,class:"mr-1.5 inline"}),d[131]||(d[131]=N("Export",-1))])]),_:1}),E(lt,{block:"",title:"Import data",desc:"Restore settings from a previous export.",keywords:"import data upload restore"},{default:ot(()=>[f("label",iy,[E(tt,{name:"upload",size:15,class:"mr-1.5 inline"}),d[132]||(d[132]=N("Choose file… ",-1)),f("input",{type:"file",accept:"application/json,.json",class:"hidden",onChange:Sn},null,32)]),us.value?(b(),x("p",sy,M(us.value),1)):V("",!0)]),_:1})]),f("div",oy,[f("div",ry,[E(tt,{name:"alertTriangle",size:18}),d[133]||(d[133]=f("h3",{class:"text-sm font-bold uppercase tracking-caps"},"Danger zone",-1))]),d[138]||(d[138]=f("p",{class:"mt-1 text-xs text-ink-secondary"},"Deleting your account is permanent and cannot be undone.",-1)),f("div",ay,[d[137]||(d[137]=f("div",{class:"text-sm font-semibold text-ink"},"Delete account",-1)),f("label",ly,[xt(f("input",{"onUpdate:modelValue":d[60]||(d[60]=w=>se.understand=w),type:"checkbox",class:"mt-0.5 h-4 w-4 accent-[var(--danger)]"},null,512),[[_c,se.understand]]),d[134]||(d[134]=N(" I understand this permanently deletes my account and all associated data. ",-1))]),f("div",uy,[f("label",cy,[d[135]||(d[135]=N("Type ",-1)),f("span",dy,M(Zs.value),1),d[136]||(d[136]=N(" to confirm",-1))]),xt(f("input",{"onUpdate:modelValue":d[61]||(d[61]=w=>se.typed=w),class:"field w-full max-w-[360px] font-mono",placeholder:Zs.value},null,8,fy),[[Bt,se.typed]])]),f("div",hy,[se.armed?(b(),x("button",{key:1,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50",disabled:se.cooldown>0,onClick:cs},M(se.cooldown>0?`Confirm in ${se.cooldown}s…`:"Permanently delete account"),9,my)):(b(),x("button",{key:0,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-40",disabled:!Yn.value,onClick:Ao}," Delete account… ",8,py)),se.armed&&se.cooldown>0?(b(),x("span",gy,"Cooling-off period — read once more.")):V("",!0)]),se.msg?(b(),x("p",_y,M(se.msg),1)):V("",!0)])])])):V("",!0)],64))),128))])]),E(Qf,{name:"fade"},{default:ot(()=>[gi.value?(b(),x("div",vy,[E(tt,{name:"check",size:16,class:"text-success-fg"}),N(M(gi.value),1)])):V("",!0)]),_:1})]))}},by=Dp(yy,[["__scopeId","data-v-4fe25eb7"]]),xy={class:"grid h-full grid-cols-[248px_1fr] max-[900px]:grid-cols-1"},wy={class:"flex flex-col border-r border-line bg-surface-1 px-4 py-5 max-[900px]:hidden"},ky={class:"flex items-center gap-2.5 px-2 pb-5"},Sy={class:"flex flex-col gap-0.5"},Py=["onClick"],Ty={class:"mt-auto flex flex-col gap-2.5"},Ly={class:"rounded-lg bg-surface-2 p-3"},My={class:"flex items-center gap-2"},Cy={class:"text-xs font-semibold text-ink"},Oy={class:"mt-1.5 block font-mono text-[10.5px] text-ink-muted"},Ey={class:"flex items-center gap-2.5 px-2 py-1"},zy={class:"grid h-8 w-8 place-items-center rounded-full bg-[var(--navy-800)] text-xs font-bold text-white"},Ay={class:"min-w-0 flex-1"},Iy={class:"truncate text-[13px] font-semibold text-ink"},Ny={class:"flex items-center gap-1.5 text-[11px] text-ink-muted"},By=["title"],Dy={class:"overflow-y-auto"},Ry={class:"sticky top-0 z-10 flex items-center gap-4 border-b border-line px-7 py-3.5",style:{background:"color-mix(in srgb, var(--bg-app) 82%, transparent)","backdrop-filter":"blur(10px)"}},Fy={class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},Vy={class:"ml-auto flex items-center gap-3"},Zy={class:"flex h-10 w-60 items-center gap-2 rounded border border-line-strong bg-surface-1 px-3 max-[1100px]:hidden"},$y={key:0,class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},Hy={class:"grid grid-cols-4 gap-4 max-[1100px]:grid-cols-2 max-[560px]:grid-cols-1"},Uy={class:"flex items-center justify-between"},jy={class:"eyebrow"},Wy={class:"mt-2.5 text-[34px] font-bold leading-none tracking-tightest text-ink"},Ky={class:"grid grid-cols-[1.6fr_1fr] gap-5 max-[1100px]:grid-cols-1"},qy={class:"panel p-5"},Gy={class:"mb-3.5 flex items-center justify-between"},Yy={class:"panel p-5"},Jy={class:"mb-3.5 flex items-center justify-between"},Xy={class:"grid place-items-center py-10 text-center"},Qy={class:"panel overflow-hidden p-0"},t1={class:"flex items-center justify-between px-5 py-4"},e1={class:"flex gap-2"},n1={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},i1={key:1,class:"overflow-x-auto"},s1={class:"w-full border-collapse text-sm"},o1={class:"text-left"},r1=["onClick"],a1={class:"px-5 py-3 font-mono font-bold text-ink"},l1={class:"px-5 py-3 text-ink-secondary"},u1={class:"px-5 py-3"},c1={class:"px-5 py-3 font-mono text-ink-secondary"},d1={class:"px-5 py-3"},f1={key:0,class:"flex items-center gap-2"},h1={class:"h-1.5 w-12 overflow-hidden rounded bg-surface-2"},p1={class:"font-mono text-xs text-ink-secondary"},m1={key:1,class:"font-mono text-xs text-ink-muted"},g1={class:"px-5 py-3 font-mono text-ink-secondary"},_1={class:"px-5 py-3 text-right"},v1=["onClick"],y1={key:1,class:"p-7"},b1={class:"mb-4 flex flex-wrap items-center gap-3"},x1={class:"font-mono text-mode font-bold text-ink"},w1={key:0,class:"rounded-full bg-danger-soft px-2.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-caps text-danger-fg"},k1={key:1,class:"ml-auto flex flex-wrap gap-1.5"},S1=["onClick"],P1={key:0,class:"panel grid place-items-center p-16 text-center"},T1={class:"pill"},L1={class:"pill"},M1={class:"pill"},C1={class:"mt-1 text-sm font-semibold text-ink"},O1={class:"pill"},E1={class:"mt-1 font-mono text-sm font-bold tabular text-ink"},z1={class:"grid grid-cols-2 gap-4 max-[820px]:grid-cols-1"},A1={class:"panel p-4"},I1={class:"flex items-center gap-4"},N1={class:"h-9 flex-1 overflow-hidden rounded border border-line bg-surface-2"},B1={class:"readout"},D1={class:"panel p-4"},R1={class:"readout"},F1={class:"panel p-4"},V1={class:"space-y-1.5 text-sm"},Z1={class:"flex justify-between"},$1={class:"text-ink"},H1={class:"flex justify-between"},U1={class:"text-ink"},j1={class:"flex justify-between"},W1={class:"font-mono tabular text-ink"},K1={class:"flex justify-between"},q1={class:"font-mono tabular text-ink"},G1={class:"panel p-4"},Y1={class:"space-y-1.5 text-sm"},J1={class:"flex justify-between"},X1={class:"font-mono tabular text-ink"},Q1={class:"flex justify-between"},tb={class:"font-mono tabular text-ink"},eb={class:"flex justify-between"},nb={class:"font-mono tabular text-ink"},ib={class:"panel col-span-2 p-4 max-[820px]:col-span-1"},sb={class:"panel p-4"},ob={class:"flex flex-wrap gap-2"},rb={class:"mt-2 min-h-[16px] text-xs text-ink-muted"},ab={class:"panel p-4"},lb={class:"h-[180px] overflow-y-auto font-mono text-xs"},ub={class:"text-ink-muted"},cb={class:"font-semibold text-accent"},db={class:"break-all text-ink"},fb={key:3,class:"p-7"},hb={class:"panel grid place-items-center p-16 text-center"},pb={class:"mt-3 text-sm font-medium text-ink-secondary"},mb={key:0,class:"mt-1 text-xs text-ink-muted"},gb={key:1,class:"mt-1 text-xs text-ink-muted"},_b={__name:"Dashboard",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(e,{emit:i}){const o=e,a=i,l=xe({}),c=xe({}),h=J(null),g=J(!1),v=xe([]),P=J(""),k=J("Overview"),O=[["grid","Overview"],["radio","Live flights"],["route","Routes"],["calendar","Schedule"],["book","Logbook"],["fileText","Documents"],["server","Drives"],["settings","Settings"]],$=ht(()=>(O.find(([,_])=>_===k.value)||["grid"])[0]),F=J(""),nt=J(""),q=J("");let At=null,Dt=null,bt=!1;const ut=ht(()=>Object.keys(l).sort((_,m)=>(l[m].online?1:0)-(l[_].online?1:0)||_.localeCompare(m))),X=ht(()=>h.value?l[h.value]:null),ft=ht(()=>X.value&&X.value.telemetry||{}),jt=ht(()=>!!(X.value&&X.value.online)),de=ht(()=>{const _=ft.value;return typeof _.latitude=="number"&&typeof _.longitude=="number"&&(_.latitude||_.longitude)?{lat:_.latitude,lng:_.longitude}:null}),me=ht(()=>h.value&&c[h.value]||[]),vt=ht(()=>{const _=ft.value;return typeof _.velocityX=="number"&&typeof _.velocityY=="number"?Math.hypot(_.velocityX,_.velocityY):null});function Ft(_){return _.online?_.connected?["In flight","success"]:["Standby","accent"]:["Offline","neutral"]}function Tt(_){const m=_&&_.telemetry||{};return typeof m.velocityX=="number"&&typeof m.velocityY=="number"?Math.hypot(m.velocityX,m.velocityY):null}const G=ht(()=>ut.value.map(_=>{const m=l[_],T=m.telemetry||{},[B,I]=Ft(m);return{id:_,mission:m.model||(m.connected?"Drone linked":m.online?"App online":"No signal"),status:B,tone:I,alt:typeof T.altitude=="number"?T.altitude.toFixed(0)+" m":"—",battery:typeof T.batteryPercent=="number"?T.batteryPercent:null,speed:Tt(m)}})),st=ht(()=>ut.value.filter(_=>l[_].online).length),It=ht(()=>ut.value.filter(_=>l[_].online&&l[_].connected).length),Wt=ht(()=>ut.value.filter(_=>!l[_].online).length),kt=ht(()=>{const _=ut.value.map(m=>{var T;return(T=l[m].telemetry)==null?void 0:T.batteryPercent}).filter(m=>typeof m=="number");return _.length?Math.round(_.reduce((m,T)=>m+T,0)/_.length):null}),Vt=ht(()=>[{label:"Active flights",value:String(It.value),delta:`${st.value} online`,tone:"success",icon:"radio"},{label:"Avg battery",value:kt.value==null?"—":kt.value+"%",delta:kt.value==null?"no telemetry":kt.value<40?"low — watch":"nominal",tone:kt.value!=null&&kt.value<40?"danger":"neutral",icon:"battery"},{label:"Fleet size",value:String(ut.value.length),delta:`${It.value} in flight`,tone:"neutral",icon:"grid"},{label:"Offline",value:String(Wt.value),delta:Wt.value?"needs attention":"all reachable",tone:Wt.value?"warning":"success",icon:"signal"}]),Y={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},ue={success:"text-success-fg",danger:"text-danger-fg",warning:"text-amber-fg",neutral:"text-ink-muted",accent:"text-accent-soft-fg"},rt=ht(()=>{var T,B,I;const m=(o.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((T=m[0])==null?void 0:T[0])||"P")+(((B=m[1])==null?void 0:B[0])||((I=m[0])==null?void 0:I[1])||"V")).toUpperCase()}),yt={superadmin:"Superadmin",admin:"Admin",user:"Operator"},Kt=ht(()=>yt[o.role]||"Operator"),ge=ht(()=>o.organizationName||(o.role==="superadmin"?"All organizations":"No organization"));function qt(_){var T;l[_.deviceId]=_;const m=_.telemetry||{};typeof m.latitude=="number"&&typeof m.longitude=="number"&&(m.latitude||m.longitude)&&(c[_.deviceId]||(c[_.deviceId]=[]),c[_.deviceId].push([m.latitude,m.longitude]),c[_.deviceId].length>1e3&&c[_.deviceId].shift()),(!h.value||_.online&&!((T=l[h.value])!=null&&T.online))&&(h.value=_.deviceId)}function Ut(_){delete l[_],delete c[_],h.value===_&&(h.value=ut.value[0]||null)}function Pt(_){v.unshift({t:ql(Date.now()),tag:_.type||"?",text:JSON.stringify(Pe(_))}),v.length>200&&v.pop()}function Pe(_){const m={..._};return delete m.type,m}function Te(){const _=location.protocol==="https:"?"wss":"ws";At=new WebSocket(`${_}://${location.host}/bff/ws`),At.onopen=()=>g.value=!0,At.onclose=()=>{g.value=!1,bt||(Dt=setTimeout(Te,1500))},At.onerror=()=>At&&At.close(),At.onmessage=m=>{let T;try{T=JSON.parse(m.data)}catch{return}T.type==="snapshot"?(T.devices||[]).forEach(qt):T.type==="update"&&T.device?(qt(T.device),T.event&&T.device.deviceId===h.value&&Pt(T.event)):T.type==="removed"&&T.deviceId&&Ut(T.deviceId)}}async function nn(){if(!h.value)return q.value="No device selected.";if(!F.value.trim())return q.value="Enter a command name.";let _;if(nt.value.trim())try{_=JSON.parse(nt.value)}catch{return q.value="Payload is not valid JSON."}const{ok:m,body:T}=await ip(h.value,F.value.trim(),_);q.value=m?`Sent "${F.value.trim()}".`:`Error: ${T.error||"failed"}`}function we(_,m,T=""){return typeof _=="number"?_.toFixed(m)+T:"—"}function gn(_){h.value=_,k.value="Live flights"}return Ls(async()=>{(await Rh()).forEach(qt),Te()}),_r(()=>{bt=!0,Dt&&clearTimeout(Dt),At&&At.close()}),(_,m)=>{var T,B,I,D,j;return b(),x("div",xy,[f("aside",wy,[f("div",ky,[E(Mc,{size:26}),m[7]||(m[7]=f("span",{class:"text-[19px] tracking-tightest"},[f("span",{class:"font-medium text-ink-secondary"},"Pilot"),f("span",{class:"font-bold text-ink"},"Vault")],-1))]),f("nav",Sy,[(b(),x(wt,null,ce(O,([A,U])=>f("button",{key:U,class:Ot(["flex items-center gap-3 rounded px-3 py-2.5 text-left text-sm transition",k.value===U?"bg-accent-soft font-semibold text-accent-soft-fg":"font-medium text-ink-secondary hover:bg-surface-2"]),onClick:R=>k.value=U},[E(tt,{name:A,size:18,stroke:k.value===U?2.2:1.8},null,8,["name","stroke"]),N(" "+M(U),1)],10,Py)),64))]),f("div",Ty,[f("div",Ly,[f("div",My,[f("span",{class:Ot(["h-2 w-2 rounded-full",g.value?"bg-ready":"bg-caution"])},null,2),f("span",Cy,M(g.value?"Link healthy":"Reconnecting…"),1)]),f("span",Oy,"API gateway · "+M(g.value?"streaming":"retrying"),1)]),f("div",Ey,[f("div",zy,M(rt.value),1),f("div",Ay,[f("div",Iy,M(e.email||"Operator"),1),f("div",Ny,[E(tt,{name:"grid",size:11,class:"shrink-0"}),f("span",{class:"truncate",title:`${Kt.value} · ${ge.value}`},M(Kt.value)+" · "+M(ge.value),9,By)])]),f("button",{class:"text-ink-muted transition hover:text-ink",title:"Log out","aria-label":"Log out",onClick:m[0]||(m[0]=A=>a("logout"))},[E(tt,{name:"logout",size:16})])])])]),f("main",Dy,[f("header",Ry,[f("div",null,[m[8]||(m[8]=f("div",{class:"eyebrow"},"Live operations",-1)),f("h1",Fy,M(k.value),1)]),f("div",Vy,[f("div",Zy,[E(tt,{name:"search",size:16,class:"text-ink-muted"}),xt(f("input",{"onUpdate:modelValue":m[1]||(m[1]=A=>P.value=A),placeholder:"Search drones, routes…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Bt,P.value]])]),f("button",{class:"btn-accent flex items-center gap-2",onClick:m[2]||(m[2]=A=>k.value="Live flights")},[E(tt,{name:"radio",size:16}),m[9]||(m[9]=N(" Live flights ",-1))])])]),k.value==="Overview"?(b(),x("div",$y,[f("div",Hy,[(b(!0),x(wt,null,ce(Vt.value,A=>(b(),x("div",{key:A.label,class:"panel p-5"},[f("div",Uy,[f("span",jy,M(A.label),1),E(tt,{name:A.icon,size:16,class:"text-ink-muted"},null,8,["name"])]),f("div",Wy,M(A.value),1),f("span",{class:Ot(["mt-2 block font-mono text-[11px]",ue[A.tone]])},M(A.delta),3)]))),128))]),f("div",Ky,[f("div",qy,[f("div",Gy,[m[11]||(m[11]=f("div",null,[f("div",{class:"eyebrow"},"Airspace"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Live map")],-1)),It.value?(b(),x("span",{key:0,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Y.success])},[m[10]||(m[10]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(It.value)+" airborne ",1)],2)):V("",!0)]),E(Xl,{position:de.value,trail:me.value},null,8,["position","trail"])]),f("div",Yy,[f("div",Jy,[m[12]||(m[12]=f("div",null,[f("div",{class:"eyebrow"},"Today"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Schedule")],-1)),E(tt,{name:"clock",size:16,class:"text-ink-muted"})]),f("div",Xy,[E(tt,{name:"calendar",size:24,class:"text-ink-muted"}),m[13]||(m[13]=f("div",{class:"mt-2 text-sm font-medium text-ink-secondary"},"No missions scheduled",-1)),m[14]||(m[14]=f("div",{class:"mt-0.5 text-xs text-ink-muted"},"Scheduling is not wired to a backend yet.",-1))])])]),f("div",Qy,[f("div",t1,[m[17]||(m[17]=f("div",null,[f("div",{class:"eyebrow"},"Fleet"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft status")],-1)),f("div",e1,[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Y.success])},[m[15]||(m[15]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(It.value)+" in flight ",1)],2),Wt.value?(b(),x("span",{key:0,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Y.warning])},[m[16]||(m[16]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(Wt.value)+" offline ",1)],2)):V("",!0)])]),G.value.length?(b(),x("div",i1,[f("table",s1,[f("thead",null,[f("tr",o1,[(b(),x(wt,null,ce(["Aircraft","Mission","Status","Alt","Battery","Speed",""],A=>f("th",{key:A,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},M(A),1)),64))])]),f("tbody",null,[(b(!0),x(wt,null,ce(G.value,(A,U)=>(b(),x("tr",{key:A.id,class:Ot(["cursor-pointer transition hover:bg-surface-2",Ugn(A.id)},[f("td",a1,M(A.id),1),f("td",l1,M(A.mission),1),f("td",u1,[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Y[A.tone]])},[m[18]||(m[18]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(A.status),1)],2)]),f("td",c1,M(A.alt),1),f("td",d1,[A.battery!=null?(b(),x("div",f1,[f("div",h1,[f("div",{class:Ot(["h-full",A.battery<40?"bg-caution":"bg-ready"]),style:ks({width:A.battery+"%"})},null,6)]),f("span",p1,M(A.battery)+"%",1)])):(b(),x("span",m1,"—"))]),f("td",g1,[N(M(A.speed==null?"—":A.speed.toFixed(1))+" ",1),m[19]||(m[19]=f("span",{class:"text-ink-muted"},"m/s",-1))]),f("td",_1,[f("button",{class:"btn-ghost inline-flex items-center gap-1.5 whitespace-nowrap",onClick:yc(R=>gn(A.id),["stop"])},[E(tt,{name:"play",size:14}),m[20]||(m[20]=N(" Track ",-1))],8,v1)])],10,r1))),128))])])])):(b(),x("div",n1," No aircraft connected yet. Devices appear here as they come online. "))])])):k.value==="Live flights"?(b(),x("div",y1,[f("div",b1,[f("span",x1,M(h.value||"No device selected"),1),X.value&&!jt.value?(b(),x("span",w1,"Offline")):V("",!0),ut.value.length?(b(),x("div",k1,[(b(!0),x(wt,null,ce(ut.value,A=>(b(),x("button",{key:A,class:Ot(["flex items-center gap-2 rounded border px-3 py-1.5 font-mono text-xs font-bold transition",A===h.value?"border-accent bg-accent-soft text-accent-soft-fg":"border-line bg-surface-1 text-ink-secondary hover:border-line-strong"]),onClick:U=>h.value=A},[f("span",{class:Ot(["h-2 w-2 rounded-full",l[A].online?"bg-ready":"bg-ink-muted"])},null,2),N(" "+M(A),1)],10,S1))),128))])):V("",!0)]),ut.value.length?(b(),x(wt,{key:1},[f("div",{class:Ot(["mb-4 grid gap-3",!jt.value&&X.value?"opacity-60":""]),style:{"grid-template-columns":"repeat(auto-fit, minmax(150px, 1fr))"}},[f("div",T1,[m[23]||(m[23]=f("div",{class:"eyebrow"},"Registration",-1)),f("div",{class:Ot(["mt-1 text-sm font-semibold",jt.value?((T=X.value)==null?void 0:T.registration)==="success"?"text-success-fg":"text-danger-fg":"text-ink"])},M(jt.value&&((B=X.value)!=null&&B.registration)?X.value.registration:"—"),3)]),f("div",L1,[m[24]||(m[24]=f("div",{class:"eyebrow"},"Drone link",-1)),f("div",{class:Ot(["mt-1 text-sm font-semibold",jt.value?(I=X.value)!=null&&I.connected?"text-success-fg":"text-danger-fg":"text-ink"])},M(X.value?jt.value?X.value.connected?"connected":"no drone":"app offline":"—"),3)]),f("div",M1,[m[25]||(m[25]=f("div",{class:"eyebrow"},"Model",-1)),f("div",C1,M(((D=X.value)==null?void 0:D.model)||"—"),1)]),f("div",O1,[m[26]||(m[26]=f("div",{class:"eyebrow"},"Last update",-1)),f("div",E1,M((j=X.value)!=null&&j.lastSeenMs?Ct(ql)(X.value.lastSeenMs):"—"),1)])],2),f("div",z1,[f("div",A1,[m[28]||(m[28]=f("div",{class:"mb-3 eyebrow"},"Battery",-1)),f("div",I1,[f("div",N1,[f("div",{class:Ot(["h-full transition-all",typeof ft.value.batteryPercent=="number"?ft.value.batteryPercent<20?"bg-warning":ft.value.batteryPercent<40?"bg-caution":"bg-ready":""]),style:ks({width:(typeof ft.value.batteryPercent=="number"?ft.value.batteryPercent:0)+"%"})},null,6)]),f("div",B1,[N(M(typeof ft.value.batteryPercent=="number"?ft.value.batteryPercent:"—"),1),m[27]||(m[27]=f("span",{class:"text-sm text-ink-secondary"},"%",-1))])])]),f("div",D1,[m[30]||(m[30]=f("div",{class:"mb-3 eyebrow"},"Altitude",-1)),f("div",R1,[N(M(we(ft.value.altitude,1)),1),m[29]||(m[29]=f("span",{class:"text-sm text-ink-secondary"}," m",-1))])]),f("div",F1,[m[35]||(m[35]=f("div",{class:"mb-3 eyebrow"},"Flight",-1)),f("div",V1,[f("div",Z1,[m[31]||(m[31]=f("span",{class:"text-ink-secondary"},"Mode",-1)),f("b",$1,M(ft.value.flightMode||"—"),1)]),f("div",H1,[m[32]||(m[32]=f("span",{class:"text-ink-secondary"},"Flying",-1)),f("b",U1,M(ft.value.isFlying==null?"—":ft.value.isFlying?"yes":"no"),1)]),f("div",j1,[m[33]||(m[33]=f("span",{class:"text-ink-secondary"},"GPS sats",-1)),f("b",W1,M(ft.value.satelliteCount==null?"—":ft.value.satelliteCount),1)]),f("div",K1,[m[34]||(m[34]=f("span",{class:"text-ink-secondary"},"Speed (H)",-1)),f("b",q1,M(vt.value==null?"—":we(vt.value,2," m/s")),1)])])]),f("div",G1,[m[39]||(m[39]=f("div",{class:"mb-3 eyebrow"},"Position",-1)),f("div",Y1,[f("div",J1,[m[36]||(m[36]=f("span",{class:"text-ink-secondary"},"Latitude",-1)),f("b",X1,M(we(ft.value.latitude,6)),1)]),f("div",Q1,[m[37]||(m[37]=f("span",{class:"text-ink-secondary"},"Longitude",-1)),f("b",tb,M(we(ft.value.longitude,6)),1)]),f("div",eb,[m[38]||(m[38]=f("span",{class:"text-ink-secondary"},"Vert. speed",-1)),f("b",nb,M(we(typeof ft.value.velocityZ=="number"?-ft.value.velocityZ:void 0,2," m/s")),1)])])]),f("div",ib,[m[40]||(m[40]=f("div",{class:"mb-3 eyebrow"},"Track",-1)),E(Xl,{position:de.value,trail:me.value},null,8,["position","trail"])]),f("div",sb,[m[41]||(m[41]=f("div",{class:"mb-3 eyebrow"},"Send command",-1)),f("div",ob,[xt(f("input",{"onUpdate:modelValue":m[3]||(m[3]=A=>F.value=A),class:"field flex-1",placeholder:"command (e.g. startConnection)"},null,512),[[Bt,F.value]]),xt(f("input",{"onUpdate:modelValue":m[4]||(m[4]=A=>nt.value=A),class:"field flex-1",placeholder:"payload JSON (optional)"},null,512),[[Bt,nt.value]]),f("button",{class:"btn-accent",onClick:nn},"Send")]),f("div",rb,M(q.value),1)]),f("div",ab,[m[42]||(m[42]=f("div",{class:"mb-3 eyebrow"},"Event log",-1)),f("div",lb,[(b(!0),x(wt,null,ce(v,(A,U)=>(b(),x("div",{key:U,class:"border-b border-line py-1"},[f("span",ub,M(A.t),1),f("span",cb,M(A.tag),1),f("span",db,M(A.text),1)]))),128))])])])],64)):(b(),x("div",P1,[E(tt,{name:"radio",size:28,class:"text-ink-muted"}),m[21]||(m[21]=f("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No aircraft online",-1)),m[22]||(m[22]=f("div",{class:"mt-1 text-xs text-ink-muted"},"Live telemetry appears here once a drone connects.",-1))]))])):k.value==="Settings"?(b(),oe(by,{key:2,email:e.email,role:e.role,organization:e.organization,"organization-name":e.organizationName,onLogout:m[5]||(m[5]=A=>a("logout"))},null,8,["email","role","organization","organization-name"])):(b(),x("div",fb,[f("div",hb,[E(tt,{name:$.value,size:28,class:"text-ink-muted"},null,8,["name"]),f("div",pb,M(k.value),1),k.value==="Drives"?(b(),x("div",mb,[m[43]||(m[43]=N(" Browse and transfer files here once a drive is connected. Configure drives in ",-1)),f("button",{class:"font-semibold text-accent hover:underline",onClick:m[6]||(m[6]=A=>k.value="Settings")},"Settings → Integrations"),m[44]||(m[44]=N(". ",-1))])):(b(),x("div",gb,"This section is part of the console shell and has no backend yet."))])]))])])}}},vb={key:0,class:"h-full"},yb={key:1,class:"grid h-full place-items-center text-ink-muted text-sm"},bb={__name:"App",setup(e){const i=J(!1),o=J(null),a=J("user"),l=J(""),c=J(""),h=J("");function g(k){a.value=k&&k.role||"user",l.value=k&&k.organization||"",c.value=k&&k.organizationName||""}Ls(async()=>{h.value=(await Nh()).apiBase||"";const k=await Ul();k&&(o.value=k.email,g(k),await Yl()),i.value=!0});async function v(k){o.value=k,g(await Ul()),await Yl()}async function P(){lp(),await Dh(),o.value=null,a.value="user",l.value="",c.value=""}return(k,O)=>i.value?(b(),x("div",vb,[o.value?(b(),oe(_b,{key:0,email:o.value,role:a.value,organization:l.value,"organization-name":c.value,onLogout:P},null,8,["email","role","organization","organization-name"])):(b(),oe(Pp,{key:1,"default-api-base":h.value,onSignedIn:v},null,8,["default-api-base"]))])):(b(),x("div",yb,"Loading…"))}};Eh(bb).mount("#app"); diff --git a/Web App/server/dist/assets/index-Co-T5CTN.css b/Web App/server/dist/assets/index-Co-T5CTN.css new file mode 100644 index 0000000..231e11f --- /dev/null +++ b/Web App/server/dist/assets/index-Co-T5CTN.css @@ -0,0 +1 @@ +:root,[data-theme=light]{--navy-950: #0B1730;--navy-900: #0F1E3D;--navy-800: #1B2E52;--navy-700: #26406E;--blue-50: #EAF1FE;--blue-100: #D6E3FD;--blue-200: #B4CDFA;--blue-300: #8FB4F6;--blue-400: #5B93F5;--blue-500: #3D7BF0;--blue-600: #2B62CC;--blue-700: #1F4CA0;--slate-0: #FFFFFF;--slate-50: #F6F7F9;--slate-100: #EEF0F3;--slate-150: #E6E9EE;--slate-200: #DCE0E7;--slate-300: #C5CCD7;--slate-400: #97A1B0;--slate-500: #6B7688;--slate-600: #4C5566;--slate-700: #333B4A;--slate-800: #1E2635;--slate-900: #131A28;--slate-950: #0B111C;--steel: #5A6B85;--green-500: #1F8A5B;--green-100: #DCF1E7;--green-600:#177049;--amber-500: #D9852B;--amber-100: #FBEBD5;--amber-600:#B86C1B;--red-500: #D64545;--red-100: #FBE0E0;--red-600: #B83232;--bg-app: var(--slate-100);--bg-subtle: var(--slate-50);--surface: var(--slate-0);--surface-2: var(--slate-50);--surface-inset: var(--slate-100);--border: var(--slate-200);--border-strong: var(--slate-300);--border-subtle: var(--slate-150);--text-primary: var(--navy-900);--text-secondary:var(--steel);--text-tertiary: var(--slate-400);--text-inverse: var(--slate-0);--text-on-accent:#FFFFFF;--accent: var(--blue-500);--accent-hover: var(--blue-600);--accent-active: var(--blue-700);--accent-soft: var(--blue-50);--accent-soft-fg:var(--blue-700);--focus-ring: color-mix(in srgb, var(--blue-500) 45%, transparent);--success: var(--green-500);--success-soft: var(--green-100);--success-fg: var(--green-600);--warning: var(--amber-500);--warning-soft: var(--amber-100);--warning-fg: var(--amber-600);--danger: var(--red-500);--danger-soft: var(--red-100);--danger-fg: var(--red-600);--overlay: color-mix(in srgb, var(--navy-950) 55%, transparent);--font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono: "Space Mono", ui-monospace, "SF Mono", "JetBrains Mono", monospace;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px;--radius-xl: 20px;--radius-pill: 999px;--shadow-xs: 0 1px 2px rgba(15,30,61,.06);--shadow-sm: 0 1px 2px rgba(15,30,61,.06), 0 1px 3px rgba(15,30,61,.04);--shadow-md: 0 2px 4px rgba(15,30,61,.06), 0 6px 16px rgba(15,30,61,.08);--shadow-lg: 0 8px 24px rgba(15,30,61,.1), 0 2px 6px rgba(15,30,61,.06);--ease-standard: cubic-bezier(.4, 0, .2, 1);--ease-out: cubic-bezier(.16, 1, .3, 1);--dur-fast: .12s;--dur-base: .2s;color-scheme:light}[data-theme=dark]{--bg-app: var(--navy-950);--bg-subtle: var(--slate-950);--surface: #10203F;--surface-2: #142748;--surface-inset: var(--navy-950);--border: color-mix(in srgb, #FFFFFF 10%, transparent);--border-strong: color-mix(in srgb, #FFFFFF 18%, transparent);--border-subtle: color-mix(in srgb, #FFFFFF 6%, transparent);--text-primary: #F4F7FC;--text-secondary:#8FA0BE;--text-tertiary: #5E6E8C;--text-inverse: var(--navy-900);--text-on-accent:#FFFFFF;--accent: var(--blue-400);--accent-hover: var(--blue-300);--accent-active: var(--blue-200);--accent-soft: color-mix(in srgb, var(--blue-500) 18%, transparent);--accent-soft-fg:var(--blue-300);--focus-ring: color-mix(in srgb, var(--blue-400) 55%, transparent);--success:var(--green-500);--success-soft: color-mix(in srgb, var(--green-500) 22%, transparent);--success-fg:#5FD3A0;--warning:var(--amber-500);--warning-soft: color-mix(in srgb, var(--amber-500) 22%, transparent);--warning-fg:#F0B26A;--danger: var(--red-500);--danger-soft: color-mix(in srgb, var(--red-500) 22%, transparent);--danger-fg: #F08A8A;--overlay: color-mix(in srgb, #000000 62%, transparent);--shadow-xs: 0 1px 2px rgba(0,0,0,.35);--shadow-sm: 0 1px 3px rgba(0,0,0,.4);--shadow-md: 0 4px 12px rgba(0,0,0,.45);--shadow-lg: 0 12px 32px rgba(0,0,0,.5);color-scheme:dark}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Space Grotesk,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.tabular{font-variant-numeric:tabular-nums}.eyebrow{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-size:11px;text-transform:uppercase;letter-spacing:.14em;color:var(--text-tertiary)}.readout{font-variant-numeric:tabular-nums;font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-size:30px;line-height:1;font-weight:500;color:var(--text-primary)}.panel{border-radius:14px;border-width:1px;border-color:var(--border);background-color:var(--surface);--tw-shadow: var(--shadow-xs);--tw-shadow-colored: var(--shadow-xs);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.pill{border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface-2);padding:.5rem .75rem}.field{width:100%;border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface-2);padding:.625rem .75rem;font-size:.875rem;line-height:1.25rem;color:var(--text-primary);outline:2px solid transparent;outline-offset:2px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.field::-moz-placeholder{color:var(--text-tertiary)}.field::placeholder{color:var(--text-tertiary)}.field{transition-duration:var(--dur-fast)}.field:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.btn-accent{border-radius:10px;background-color:var(--accent);padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-accent:hover{background-color:var(--accent-hover)}.btn-accent:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-accent:disabled{opacity:.5}.btn-accent{transition-duration:var(--dur-fast)}.btn-ghost{border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface);padding:.375rem .75rem;font-size:.875rem;line-height:1.25rem;color:var(--text-secondary);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-ghost:hover{border-color:var(--border-strong);color:var(--text-primary)}.btn-ghost:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-ghost{transition-duration:var(--dur-fast)}.btn-icon{display:grid;height:2.25rem;width:2.25rem;place-items:center;border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface);color:var(--text-secondary);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-icon:hover{border-color:var(--border-strong);color:var(--text-primary)}.btn-icon{transition-duration:var(--dur-fast)}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-y-0{top:0;bottom:0}.bottom-5{bottom:1.25rem}.right-0{right:0}.right-5{right:1.25rem}.top-0{top:0}.top-5{top:1.25rem}.z-10{z-index:10}.z-20{z-index:20}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-28{height:7rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[18px\]{height:18px}.h-\[320px\]{height:320px}.h-full{height:100%}.min-h-\[16px\]{min-height:16px}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-56{width:14rem}.w-60{width:15rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[18px\]{width:18px}.w-\[380px\]{width:380px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\[1240px\]{max-width:1240px}.max-w-\[1280px\]{max-width:1280px}.max-w-\[220px\]{max-width:220px}.max-w-\[280px\]{max-width:280px}.max-w-\[360px\]{max-width:360px}.max-w-\[420px\]{max-width:420px}.max-w-\[520px\]{max-width:520px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[1\.6fr_1fr\]{grid-template-columns:1.6fr 1fr}.grid-cols-\[210px_1fr\]{grid-template-columns:210px 1fr}.grid-cols-\[248px_1fr\]{grid-template-columns:248px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1\.5{row-gap:.375rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded,.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:14px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-none{border-style:none}.border-accent{border-color:var(--accent)}.border-line{border-color:var(--border)}.border-line-strong{border-color:var(--border-strong)}.border-transparent{border-color:transparent}.bg-\[var\(--navy-800\)\]{background-color:var(--navy-800)}.bg-accent{background-color:var(--accent)}.bg-accent-soft{background-color:var(--accent-soft)}.bg-amber{background-color:var(--warning)}.bg-amber-soft{background-color:var(--warning-soft)}.bg-caution{background-color:var(--warning)}.bg-current{background-color:currentColor}.bg-danger{background-color:var(--danger)}.bg-danger-soft{background-color:var(--danger-soft)}.bg-ink-muted{background-color:var(--text-tertiary)}.bg-line{background-color:var(--border)}.bg-ready,.bg-success{background-color:var(--success)}.bg-success-soft{background-color:var(--success-soft)}.bg-surface-1{background-color:var(--surface)}.bg-surface-2{background-color:var(--surface-2)}.bg-transparent{background-color:transparent}.bg-warning{background-color:var(--danger)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-10{padding:2.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-7{padding:1.75rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-8{padding-bottom:2rem}.pr-10{padding-right:2.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[19px\]{font-size:19px}.text-\[22px\]{font-size:22px}.text-\[30px\]{font-size:30px}.text-\[34px\]{font-size:34px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-mode{font-size:18px;line-height:1.2;letter-spacing:-.02em;font-weight:600}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-\[0\.3em\]{letter-spacing:.3em}.tracking-caps{letter-spacing:.14em}.tracking-tightest{letter-spacing:-.02em}.text-accent{color:var(--accent)}.text-accent-soft-fg{color:var(--accent-soft-fg)}.text-amber-fg{color:var(--warning-fg)}.text-danger-fg{color:var(--danger-fg)}.text-ink{color:var(--text-primary)}.text-ink-muted{color:var(--text-tertiary)}.text-ink-secondary{color:var(--text-secondary)}.text-success-fg{color:var(--success-fg)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.accent-\[var\(--accent\)\]{accent-color:var(--accent)}.accent-\[var\(--danger\)\]{accent-color:var(--danger)}.opacity-60{opacity:.6}.shadow-md{--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: var(--shadow-sm);--tw-shadow-colored: var(--shadow-sm);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xs{--tw-shadow: var(--shadow-xs);--tw-shadow-colored: var(--shadow-xs);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}html,body,#app{height:100%}html{background-color:var(--bg-app);transition:background-color var(--dur-base) var(--ease-standard)}body{font-family:Space Grotesk,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#app{background-color:var(--bg-app);min-height:100vh;transition:background-color var(--dur-base) var(--ease-standard)}html.reduce-motion *,html.reduce-motion *:before,html.reduce-motion *:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}.leaflet-container{background:var(--surface-inset);font-family:var(--font-sans)}.leaflet-control-attribution{background:color-mix(in srgb,var(--surface) 82%,transparent)!important;color:var(--text-tertiary)!important}.leaflet-control-attribution a{color:var(--text-secondary)!important}.placeholder\:text-ink-muted::-moz-placeholder{color:var(--text-tertiary)}.placeholder\:text-ink-muted::placeholder{color:var(--text-tertiary)}.first\:mt-0:first-child{margin-top:0}.last\:border-0:last-child{border-width:0px}.hover\:border-line-strong:hover{border-color:var(--border-strong)}.hover\:bg-danger-soft:hover{background-color:var(--danger-soft)}.hover\:bg-surface-2:hover{background-color:var(--surface-2)}.hover\:text-ink:hover{color:var(--text-primary)}.hover\:text-ink-secondary:hover{color:var(--text-secondary)}.hover\:underline:hover{text-decoration-line:underline}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.enabled\:hover\:brightness-110:hover:enabled{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(max-width:1100px){.max-\[1100px\]\:hidden{display:none}.max-\[1100px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[1100px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.max-\[900px\]\:hidden{display:none}.max-\[900px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[900px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:820px){.max-\[820px\]\:col-span-1{grid-column:span 1 / span 1}.max-\[820px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:760px){.max-\[760px\]\:col-span-1{grid-column:span 1 / span 1}.max-\[760px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[760px\]\:flex-row{flex-direction:row}.max-\[760px\]\:overflow-x-auto{overflow-x:auto}}@media(max-width:560px){.max-\[560px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(min-width:640px){.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}.fade-enter-active[data-v-4fe25eb7],.fade-leave-active[data-v-4fe25eb7]{transition:opacity .2s}.fade-enter-from[data-v-4fe25eb7],.fade-leave-to[data-v-4fe25eb7]{opacity:0} diff --git a/Web App/server/dist/assets/index-DBe0h801.css b/Web App/server/dist/assets/index-DBe0h801.css deleted file mode 100644 index 9abcdd0..0000000 --- a/Web App/server/dist/assets/index-DBe0h801.css +++ /dev/null @@ -1 +0,0 @@ -:root,[data-theme=light]{--navy-950: #0B1730;--navy-900: #0F1E3D;--navy-800: #1B2E52;--navy-700: #26406E;--blue-50: #EAF1FE;--blue-100: #D6E3FD;--blue-200: #B4CDFA;--blue-300: #8FB4F6;--blue-400: #5B93F5;--blue-500: #3D7BF0;--blue-600: #2B62CC;--blue-700: #1F4CA0;--slate-0: #FFFFFF;--slate-50: #F6F7F9;--slate-100: #EEF0F3;--slate-150: #E6E9EE;--slate-200: #DCE0E7;--slate-300: #C5CCD7;--slate-400: #97A1B0;--slate-500: #6B7688;--slate-600: #4C5566;--slate-700: #333B4A;--slate-800: #1E2635;--slate-900: #131A28;--slate-950: #0B111C;--steel: #5A6B85;--green-500: #1F8A5B;--green-100: #DCF1E7;--green-600:#177049;--amber-500: #D9852B;--amber-100: #FBEBD5;--amber-600:#B86C1B;--red-500: #D64545;--red-100: #FBE0E0;--red-600: #B83232;--bg-app: var(--slate-100);--bg-subtle: var(--slate-50);--surface: var(--slate-0);--surface-2: var(--slate-50);--surface-inset: var(--slate-100);--border: var(--slate-200);--border-strong: var(--slate-300);--border-subtle: var(--slate-150);--text-primary: var(--navy-900);--text-secondary:var(--steel);--text-tertiary: var(--slate-400);--text-inverse: var(--slate-0);--text-on-accent:#FFFFFF;--accent: var(--blue-500);--accent-hover: var(--blue-600);--accent-active: var(--blue-700);--accent-soft: var(--blue-50);--accent-soft-fg:var(--blue-700);--focus-ring: color-mix(in srgb, var(--blue-500) 45%, transparent);--success: var(--green-500);--success-soft: var(--green-100);--success-fg: var(--green-600);--warning: var(--amber-500);--warning-soft: var(--amber-100);--warning-fg: var(--amber-600);--danger: var(--red-500);--danger-soft: var(--red-100);--danger-fg: var(--red-600);--overlay: color-mix(in srgb, var(--navy-950) 55%, transparent);--font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono: "Space Mono", ui-monospace, "SF Mono", "JetBrains Mono", monospace;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px;--radius-xl: 20px;--radius-pill: 999px;--shadow-xs: 0 1px 2px rgba(15,30,61,.06);--shadow-sm: 0 1px 2px rgba(15,30,61,.06), 0 1px 3px rgba(15,30,61,.04);--shadow-md: 0 2px 4px rgba(15,30,61,.06), 0 6px 16px rgba(15,30,61,.08);--shadow-lg: 0 8px 24px rgba(15,30,61,.1), 0 2px 6px rgba(15,30,61,.06);--ease-standard: cubic-bezier(.4, 0, .2, 1);--ease-out: cubic-bezier(.16, 1, .3, 1);--dur-fast: .12s;--dur-base: .2s;color-scheme:light}[data-theme=dark]{--bg-app: var(--navy-950);--bg-subtle: var(--slate-950);--surface: #10203F;--surface-2: #142748;--surface-inset: var(--navy-950);--border: color-mix(in srgb, #FFFFFF 10%, transparent);--border-strong: color-mix(in srgb, #FFFFFF 18%, transparent);--border-subtle: color-mix(in srgb, #FFFFFF 6%, transparent);--text-primary: #F4F7FC;--text-secondary:#8FA0BE;--text-tertiary: #5E6E8C;--text-inverse: var(--navy-900);--text-on-accent:#FFFFFF;--accent: var(--blue-400);--accent-hover: var(--blue-300);--accent-active: var(--blue-200);--accent-soft: color-mix(in srgb, var(--blue-500) 18%, transparent);--accent-soft-fg:var(--blue-300);--focus-ring: color-mix(in srgb, var(--blue-400) 55%, transparent);--success:var(--green-500);--success-soft: color-mix(in srgb, var(--green-500) 22%, transparent);--success-fg:#5FD3A0;--warning:var(--amber-500);--warning-soft: color-mix(in srgb, var(--amber-500) 22%, transparent);--warning-fg:#F0B26A;--danger: var(--red-500);--danger-soft: color-mix(in srgb, var(--red-500) 22%, transparent);--danger-fg: #F08A8A;--overlay: color-mix(in srgb, #000000 62%, transparent);--shadow-xs: 0 1px 2px rgba(0,0,0,.35);--shadow-sm: 0 1px 3px rgba(0,0,0,.4);--shadow-md: 0 4px 12px rgba(0,0,0,.45);--shadow-lg: 0 12px 32px rgba(0,0,0,.5);color-scheme:dark}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Space Grotesk,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.tabular{font-variant-numeric:tabular-nums}.eyebrow{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-size:11px;text-transform:uppercase;letter-spacing:.14em;color:var(--text-tertiary)}.readout{font-variant-numeric:tabular-nums;font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-size:30px;line-height:1;font-weight:500;color:var(--text-primary)}.panel{border-radius:14px;border-width:1px;border-color:var(--border);background-color:var(--surface);--tw-shadow: var(--shadow-xs);--tw-shadow-colored: var(--shadow-xs);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.pill{border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface-2);padding:.5rem .75rem}.field{width:100%;border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface-2);padding:.625rem .75rem;font-size:.875rem;line-height:1.25rem;color:var(--text-primary);outline:2px solid transparent;outline-offset:2px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.field::-moz-placeholder{color:var(--text-tertiary)}.field::placeholder{color:var(--text-tertiary)}.field{transition-duration:var(--dur-fast)}.field:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.btn-accent{border-radius:10px;background-color:var(--accent);padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-accent:hover{background-color:var(--accent-hover)}.btn-accent:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-accent:disabled{opacity:.5}.btn-accent{transition-duration:var(--dur-fast)}.btn-ghost{border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface);padding:.375rem .75rem;font-size:.875rem;line-height:1.25rem;color:var(--text-secondary);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-ghost:hover{border-color:var(--border-strong);color:var(--text-primary)}.btn-ghost:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-ghost{transition-duration:var(--dur-fast)}.btn-icon{display:grid;height:2.25rem;width:2.25rem;place-items:center;border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface);color:var(--text-secondary);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-icon:hover{border-color:var(--border-strong);color:var(--text-primary)}.btn-icon{transition-duration:var(--dur-fast)}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-y-0{top:0;bottom:0}.bottom-5{bottom:1.25rem}.right-0{right:0}.right-5{right:1.25rem}.top-0{top:0}.top-5{top:1.25rem}.z-10{z-index:10}.z-20{z-index:20}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-28{height:7rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[18px\]{height:18px}.h-\[320px\]{height:320px}.h-full{height:100%}.min-h-\[16px\]{min-height:16px}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-56{width:14rem}.w-60{width:15rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[18px\]{width:18px}.w-\[380px\]{width:380px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\[1240px\]{max-width:1240px}.max-w-\[1280px\]{max-width:1280px}.max-w-\[280px\]{max-width:280px}.max-w-\[360px\]{max-width:360px}.max-w-\[420px\]{max-width:420px}.max-w-\[520px\]{max-width:520px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[1\.6fr_1fr\]{grid-template-columns:1.6fr 1fr}.grid-cols-\[210px_1fr\]{grid-template-columns:210px 1fr}.grid-cols-\[248px_1fr\]{grid-template-columns:248px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded,.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:14px}.border{border-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-none{border-style:none}.border-accent{border-color:var(--accent)}.border-line{border-color:var(--border)}.border-line-strong{border-color:var(--border-strong)}.border-transparent{border-color:transparent}.bg-\[var\(--navy-800\)\]{background-color:var(--navy-800)}.bg-accent{background-color:var(--accent)}.bg-accent-soft{background-color:var(--accent-soft)}.bg-amber{background-color:var(--warning)}.bg-amber-soft{background-color:var(--warning-soft)}.bg-caution{background-color:var(--warning)}.bg-current{background-color:currentColor}.bg-danger{background-color:var(--danger)}.bg-danger-soft{background-color:var(--danger-soft)}.bg-ink-muted{background-color:var(--text-tertiary)}.bg-line{background-color:var(--border)}.bg-ready,.bg-success{background-color:var(--success)}.bg-success-soft{background-color:var(--success-soft)}.bg-surface-1{background-color:var(--surface)}.bg-surface-2{background-color:var(--surface-2)}.bg-transparent{background-color:transparent}.bg-warning{background-color:var(--danger)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-10{padding:2.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-7{padding:1.75rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-8{padding-bottom:2rem}.pr-10{padding-right:2.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[19px\]{font-size:19px}.text-\[22px\]{font-size:22px}.text-\[34px\]{font-size:34px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-mode{font-size:18px;line-height:1.2;letter-spacing:-.02em;font-weight:600}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-\[0\.3em\]{letter-spacing:.3em}.tracking-caps{letter-spacing:.14em}.tracking-tightest{letter-spacing:-.02em}.text-accent{color:var(--accent)}.text-accent-soft-fg{color:var(--accent-soft-fg)}.text-amber-fg{color:var(--warning-fg)}.text-danger-fg{color:var(--danger-fg)}.text-ink{color:var(--text-primary)}.text-ink-muted{color:var(--text-tertiary)}.text-ink-secondary{color:var(--text-secondary)}.text-success-fg{color:var(--success-fg)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.accent-\[var\(--danger\)\]{accent-color:var(--danger)}.opacity-60{opacity:.6}.shadow-md{--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: var(--shadow-sm);--tw-shadow-colored: var(--shadow-sm);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xs{--tw-shadow: var(--shadow-xs);--tw-shadow-colored: var(--shadow-xs);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}html,body,#app{height:100%}html{background-color:var(--bg-app);transition:background-color var(--dur-base) var(--ease-standard)}body{font-family:Space Grotesk,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#app{background-color:var(--bg-app);min-height:100vh;transition:background-color var(--dur-base) var(--ease-standard)}html.reduce-motion *,html.reduce-motion *:before,html.reduce-motion *:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}.leaflet-container{background:var(--surface-inset);font-family:var(--font-sans)}.leaflet-control-attribution{background:color-mix(in srgb,var(--surface) 82%,transparent)!important;color:var(--text-tertiary)!important}.leaflet-control-attribution a{color:var(--text-secondary)!important}.placeholder\:text-ink-muted::-moz-placeholder{color:var(--text-tertiary)}.placeholder\:text-ink-muted::placeholder{color:var(--text-tertiary)}.first\:mt-0:first-child{margin-top:0}.last\:border-0:last-child{border-width:0px}.hover\:border-line-strong:hover{border-color:var(--border-strong)}.hover\:bg-danger-soft:hover{background-color:var(--danger-soft)}.hover\:bg-surface-2:hover{background-color:var(--surface-2)}.hover\:text-ink:hover{color:var(--text-primary)}.hover\:text-ink-secondary:hover{color:var(--text-secondary)}.hover\:underline:hover{text-decoration-line:underline}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.enabled\:hover\:brightness-110:hover:enabled{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(max-width:1100px){.max-\[1100px\]\:hidden{display:none}.max-\[1100px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[1100px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.max-\[900px\]\:hidden{display:none}.max-\[900px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:820px){.max-\[820px\]\:col-span-1{grid-column:span 1 / span 1}.max-\[820px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:760px){.max-\[760px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[760px\]\:flex-row{flex-direction:row}.max-\[760px\]\:overflow-x-auto{overflow-x:auto}}@media(max-width:560px){.max-\[560px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(min-width:640px){.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}.fade-enter-active[data-v-4fe25eb7],.fade-leave-active[data-v-4fe25eb7]{transition:opacity .2s}.fade-enter-from[data-v-4fe25eb7],.fade-leave-to[data-v-4fe25eb7]{opacity:0} diff --git a/Web App/server/dist/assets/index-DLbqB6QP.js b/Web App/server/dist/assets/index-DLbqB6QP.js new file mode 100644 index 0000000..583b32f --- /dev/null +++ b/Web App/server/dist/assets/index-DLbqB6QP.js @@ -0,0 +1,20 @@ +(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const d of l)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&a(h)}).observe(document,{childList:!0,subtree:!0});function o(l){const d={};return l.integrity&&(d.integrity=l.integrity),l.referrerPolicy&&(d.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?d.credentials="include":l.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(l){if(l.ep)return;l.ep=!0;const d=o(l);fetch(l.href,d)}})();/** +* @vue/shared v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function ya(e){const i=Object.create(null);for(const o of e.split(","))i[o]=1;return o=>o in i}const ue={},vs=[],Zn=()=>{},su=()=>!1,ur=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cr=e=>e.startsWith("onUpdate:"),Oe=Object.assign,ba=(e,i)=>{const o=e.indexOf(i);o>-1&&e.splice(o,1)},Qc=Object.prototype.hasOwnProperty,ee=(e,i)=>Qc.call(e,i),wt=Array.isArray,ys=e=>po(e)==="[object Map]",Ls=e=>po(e)==="[object Set]",sl=e=>po(e)==="[object Date]",Dt=e=>typeof e=="function",be=e=>typeof e=="string",Cn=e=>typeof e=="symbol",ne=e=>e!==null&&typeof e=="object",ou=e=>(ne(e)||Dt(e))&&Dt(e.then)&&Dt(e.catch),ru=Object.prototype.toString,po=e=>ru.call(e),td=e=>po(e).slice(8,-1),au=e=>po(e)==="[object Object]",xa=e=>be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Xs=ya(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),dr=e=>{const i=Object.create(null);return(o=>i[o]||(i[o]=e(o)))},ed=/-\w/g,Tn=dr(e=>e.replace(ed,i=>i.slice(1).toUpperCase())),nd=/\B([A-Z])/g,Li=dr(e=>e.replace(nd,"-$1").toLowerCase()),lu=dr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Wr=dr(e=>e?`on${lu(e)}`:""),Vn=(e,i)=>!Object.is(e,i),qo=(e,...i)=>{for(let o=0;o{Object.defineProperty(e,i,{configurable:!0,enumerable:!1,writable:a,value:o})},fr=e=>{const i=parseFloat(e);return isNaN(i)?e:i},id=e=>{const i=be(e)?Number(e):NaN;return isNaN(i)?e:i};let ol;const hr=()=>ol||(ol=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ss(e){if(wt(e)){const i={};for(let o=0;o{if(o){const a=o.split(od);a.length>1&&(i[a[0].trim()]=a[1].trim())}}),i}function Ct(e){let i="";if(be(e))i=e;else if(wt(e))for(let o=0;oSi(o,i))}const du=e=>!!(e&&e.__v_isRef===!0),P=e=>be(e)?e:e==null?"":wt(e)||ne(e)&&(e.toString===ru||!Dt(e.toString))?du(e)?P(e.value):JSON.stringify(e,fu,2):String(e),fu=(e,i)=>du(i)?fu(e,i.value):ys(i)?{[`Map(${i.size})`]:[...i.entries()].reduce((o,[a,l],d)=>(o[Kr(a,d)+" =>"]=l,o),{})}:Ls(i)?{[`Set(${i.size})`]:[...i.values()].map(o=>Kr(o))}:Cn(i)?Kr(i):ne(i)&&!wt(i)&&!au(i)?String(i):i,Kr=(e,i="")=>{var o;return Cn(e)?`Symbol(${(o=e.description)!=null?o:i})`:e};/** +* @vue/reactivity v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ae;class dd{constructor(i=!1){this.detached=i,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!i&&Ae&&(Ae.active?(this.parent=Ae,this.index=(Ae.scopes||(Ae.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let i,o;if(this.scopes)for(i=0,o=this.scopes.length;i0&&--this._on===0){if(Ae===this)Ae=this.prevScope;else{let i=Ae;for(;i;){if(i.prevScope===this){i.prevScope=this.prevScope;break}i=i.prevScope}}this.prevScope=void 0}}stop(i){if(this._active){this._active=!1;let o,a;for(o=0,a=this.effects.length;o0)return;if(to){let i=to;for(to=void 0;i;){const o=i.next;i.next=void 0,i.flags&=-9,i=o}}let e;for(;Qs;){let i=Qs;for(Qs=void 0;i;){const o=i.next;if(i.next=void 0,i.flags&=-9,i.flags&1)try{i.trigger()}catch(a){e||(e=a)}i=o}}if(e)throw e}function gu(e){for(let i=e.deps;i;i=i.nextDep)i.version=-1,i.prevActiveLink=i.dep.activeLink,i.dep.activeLink=i}function _u(e){let i,o=e.depsTail,a=o;for(;a;){const l=a.prevDep;a.version===-1?(a===o&&(o=l),Pa(a),hd(a)):i=a,a.dep.activeLink=a.prevActiveLink,a.prevActiveLink=void 0,a=l}e.deps=i,e.depsTail=o}function sa(e){for(let i=e.deps;i;i=i.nextDep)if(i.dep.version!==i.version||i.dep.computed&&(vu(i.dep.computed)||i.dep.version!==i.version))return!0;return!!e._dirty}function vu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===oo)||(e.globalVersion=oo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!sa(e))))return;e.flags|=2;const i=e.dep,o=fe,a=Ln;fe=e,Ln=!0;try{gu(e);const l=e.fn(e._value);(i.version===0||Vn(l,e._value))&&(e.flags|=128,e._value=l,i.version++)}catch(l){throw i.version++,l}finally{fe=o,Ln=a,_u(e),e.flags&=-3}}function Pa(e,i=!1){const{dep:o,prevSub:a,nextSub:l}=e;if(a&&(a.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=a,e.nextSub=void 0),o.subs===e&&(o.subs=a,!a&&o.computed)){o.computed.flags&=-5;for(let d=o.computed.deps;d;d=d.nextDep)Pa(d,!0)}!i&&!--o.sc&&o.map&&o.map.delete(o.key)}function hd(e){const{prevDep:i,nextDep:o}=e;i&&(i.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=i,e.nextDep=void 0)}let Ln=!0;const yu=[];function Un(){yu.push(Ln),Ln=!1}function Hn(){const e=yu.pop();Ln=e===void 0?!0:e}function rl(e){const{cleanup:i}=e;if(e.cleanup=void 0,i){const o=fe;fe=void 0;try{i()}finally{fe=o}}}let oo=0;class pd{constructor(i,o){this.sub=i,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ta{constructor(i){this.computed=i,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(i){if(!fe||!Ln||fe===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==fe)o=this.activeLink=new pd(fe,this),fe.deps?(o.prevDep=fe.depsTail,fe.depsTail.nextDep=o,fe.depsTail=o):fe.deps=fe.depsTail=o,bu(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){const a=o.nextDep;a.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=a),o.prevDep=fe.depsTail,o.nextDep=void 0,fe.depsTail.nextDep=o,fe.depsTail=o,fe.deps===o&&(fe.deps=a)}return o}trigger(i){this.version++,oo++,this.notify(i)}notify(i){ka();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{Sa()}}}function bu(e){if(e.dep.sc++,e.sub.flags&4){const i=e.dep.computed;if(i&&!e.dep.subs){i.flags|=20;for(let a=i.deps;a;a=a.nextDep)bu(a)}const o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}const oa=new WeakMap,Ki=Symbol(""),ra=Symbol(""),ro=Symbol("");function De(e,i,o){if(Ln&&fe){let a=oa.get(e);a||oa.set(e,a=new Map);let l=a.get(o);l||(a.set(o,l=new Ta),l.map=a,l.key=o),l.track()}}function oi(e,i,o,a,l,d){const h=oa.get(e);if(!h){oo++;return}const _=y=>{y&&y.trigger()};if(ka(),i==="clear")h.forEach(_);else{const y=wt(e),T=y&&xa(o);if(y&&o==="length"){const w=Number(a);h.forEach((A,U)=>{(U==="length"||U===ro||!Cn(U)&&U>=w)&&_(A)})}else switch((o!==void 0||h.has(void 0))&&_(h.get(o)),T&&_(h.get(ro)),i){case"add":y?T&&_(h.get("length")):(_(h.get(Ki)),ys(e)&&_(h.get(ra)));break;case"delete":y||(_(h.get(Ki)),ys(e)&&_(h.get(ra)));break;case"set":ys(e)&&_(h.get(Ki));break}}Sa()}function gs(e){const i=Xt(e);return i===e?i:(De(i,"iterate",ro),mn(e)?i:i.map(Mn))}function pr(e){return De(e=Xt(e),"iterate",ro),e}function Fn(e,i){return li(e)?Ps(Gi(e)?Mn(i):i):Mn(i)}const md={__proto__:null,[Symbol.iterator](){return qr(this,Symbol.iterator,e=>Fn(this,e))},concat(...e){return gs(this).concat(...e.map(i=>wt(i)?gs(i):i))},entries(){return qr(this,"entries",e=>(e[1]=Fn(this,e[1]),e))},every(e,i){return ei(this,"every",e,i,void 0,arguments)},filter(e,i){return ei(this,"filter",e,i,o=>o.map(a=>Fn(this,a)),arguments)},find(e,i){return ei(this,"find",e,i,o=>Fn(this,o),arguments)},findIndex(e,i){return ei(this,"findIndex",e,i,void 0,arguments)},findLast(e,i){return ei(this,"findLast",e,i,o=>Fn(this,o),arguments)},findLastIndex(e,i){return ei(this,"findLastIndex",e,i,void 0,arguments)},forEach(e,i){return ei(this,"forEach",e,i,void 0,arguments)},includes(...e){return Yr(this,"includes",e)},indexOf(...e){return Yr(this,"indexOf",e)},join(e){return gs(this).join(e)},lastIndexOf(...e){return Yr(this,"lastIndexOf",e)},map(e,i){return ei(this,"map",e,i,void 0,arguments)},pop(){return js(this,"pop")},push(...e){return js(this,"push",e)},reduce(e,...i){return al(this,"reduce",e,i)},reduceRight(e,...i){return al(this,"reduceRight",e,i)},shift(){return js(this,"shift")},some(e,i){return ei(this,"some",e,i,void 0,arguments)},splice(...e){return js(this,"splice",e)},toReversed(){return gs(this).toReversed()},toSorted(e){return gs(this).toSorted(e)},toSpliced(...e){return gs(this).toSpliced(...e)},unshift(...e){return js(this,"unshift",e)},values(){return qr(this,"values",e=>Fn(this,e))}};function qr(e,i,o){const a=pr(e),l=a[i]();return a!==e&&!mn(e)&&(l._next=l.next,l.next=()=>{const d=l._next();return d.done||(d.value=o(d.value)),d}),l}const gd=Array.prototype;function ei(e,i,o,a,l,d){const h=pr(e),_=h!==e&&!mn(e),y=h[i];if(y!==gd[i]){const A=y.apply(e,d);return _?Mn(A):A}let T=o;h!==e&&(_?T=function(A,U){return o.call(this,Fn(e,A),U,e)}:o.length>2&&(T=function(A,U){return o.call(this,A,U,e)}));const w=y.call(h,T,a);return _&&l?l(w):w}function al(e,i,o,a){const l=pr(e),d=l!==e&&!mn(e);let h=o,_=!1;l!==e&&(d?(_=a.length===0,h=function(T,w,A){return _&&(_=!1,T=Fn(e,T)),o.call(this,T,Fn(e,w),A,e)}):o.length>3&&(h=function(T,w,A){return o.call(this,T,w,A,e)}));const y=l[i](h,...a);return _?Fn(e,y):y}function Yr(e,i,o){const a=Xt(e);De(a,"iterate",ro);const l=a[i](...o);return(l===-1||l===!1)&&Ma(o[0])?(o[0]=Xt(o[0]),a[i](...o)):l}function js(e,i,o=[]){Un(),ka();const a=Xt(e)[i].apply(e,o);return Sa(),Hn(),a}const _d=ya("__proto__,__v_isRef,__isVue"),xu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Cn));function vd(e){Cn(e)||(e=String(e));const i=Xt(this);return De(i,"has",e),i.hasOwnProperty(e)}class wu{constructor(i=!1,o=!1){this._isReadonly=i,this._isShallow=o}get(i,o,a){if(o==="__v_skip")return i.__v_skip;const l=this._isReadonly,d=this._isShallow;if(o==="__v_isReactive")return!l;if(o==="__v_isReadonly")return l;if(o==="__v_isShallow")return d;if(o==="__v_raw")return a===(l?d?Cd:Tu:d?Pu:Su).get(i)||Object.getPrototypeOf(i)===Object.getPrototypeOf(a)?i:void 0;const h=wt(i);if(!l){let y;if(h&&(y=md[o]))return y;if(o==="hasOwnProperty")return vd}const _=Reflect.get(i,o,Fe(i)?i:a);if((Cn(o)?xu.has(o):_d(o))||(l||De(i,"get",o),d))return _;if(Fe(_)){const y=h&&xa(o)?_:_.value;return l&&ne(y)?la(y):y}return ne(_)?l?la(_):xe(_):_}}class ku extends wu{constructor(i=!1){super(!1,i)}set(i,o,a,l){let d=i[o];const h=wt(i)&&xa(o);if(!this._isShallow){const T=li(d);if(!mn(a)&&!li(a)&&(d=Xt(d),a=Xt(a)),!h&&Fe(d)&&!Fe(a))return T||(d.value=a),!0}const _=h?Number(o)e,Uo=e=>Reflect.getPrototypeOf(e);function kd(e,i,o){return function(...a){const l=this.__v_raw,d=Xt(l),h=ys(d),_=e==="entries"||e===Symbol.iterator&&h,y=e==="keys"&&h,T=l[e](...a),w=o?aa:i?Ps:Mn;return!i&&De(d,"iterate",y?ra:Ki),Oe(Object.create(T),{next(){const{value:A,done:U}=T.next();return U?{value:A,done:U}:{value:_?[w(A[0]),w(A[1])]:w(A),done:U}}})}}function Ho(e){return function(...i){return e==="delete"?!1:e==="clear"?void 0:this}}function Sd(e,i){const o={get(l){const d=this.__v_raw,h=Xt(d),_=Xt(l);e||(Vn(l,_)&&De(h,"get",l),De(h,"get",_));const{has:y}=Uo(h),T=i?aa:e?Ps:Mn;if(y.call(h,l))return T(d.get(l));if(y.call(h,_))return T(d.get(_));d!==h&&d.get(l)},get size(){const l=this.__v_raw;return!e&&De(Xt(l),"iterate",Ki),l.size},has(l){const d=this.__v_raw,h=Xt(d),_=Xt(l);return e||(Vn(l,_)&&De(h,"has",l),De(h,"has",_)),l===_?d.has(l):d.has(l)||d.has(_)},forEach(l,d){const h=this,_=h.__v_raw,y=Xt(_),T=i?aa:e?Ps:Mn;return!e&&De(y,"iterate",Ki),_.forEach((w,A)=>l.call(d,T(w),T(A),h))}};return Oe(o,e?{add:Ho("add"),set:Ho("set"),delete:Ho("delete"),clear:Ho("clear")}:{add(l){const d=Xt(this),h=Uo(d),_=Xt(l),y=!i&&!mn(l)&&!li(l)?_:l;return h.has.call(d,y)||Vn(l,y)&&h.has.call(d,l)||Vn(_,y)&&h.has.call(d,_)||(d.add(y),oi(d,"add",y,y)),this},set(l,d){!i&&!mn(d)&&!li(d)&&(d=Xt(d));const h=Xt(this),{has:_,get:y}=Uo(h);let T=_.call(h,l);T||(l=Xt(l),T=_.call(h,l));const w=y.call(h,l);return h.set(l,d),T?Vn(d,w)&&oi(h,"set",l,d):oi(h,"add",l,d),this},delete(l){const d=Xt(this),{has:h,get:_}=Uo(d);let y=h.call(d,l);y||(l=Xt(l),y=h.call(d,l)),_&&_.call(d,l);const T=d.delete(l);return y&&oi(d,"delete",l,void 0),T},clear(){const l=Xt(this),d=l.size!==0,h=l.clear();return d&&oi(l,"clear",void 0,void 0),h}}),["keys","values","entries",Symbol.iterator].forEach(l=>{o[l]=kd(l,e,i)}),o}function La(e,i){const o=Sd(e,i);return(a,l,d)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_raw"?a:Reflect.get(ee(o,l)&&l in a?o:a,l,d)}const Pd={get:La(!1,!1)},Td={get:La(!1,!0)},Ld={get:La(!0,!1)};const Su=new WeakMap,Pu=new WeakMap,Tu=new WeakMap,Cd=new WeakMap;function Md(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xe(e){return li(e)?e:Ca(e,!1,bd,Pd,Su)}function Od(e){return Ca(e,!1,wd,Td,Pu)}function la(e){return Ca(e,!0,xd,Ld,Tu)}function Ca(e,i,o,a,l){if(!ne(e)||e.__v_raw&&!(i&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const d=l.get(e);if(d)return d;const h=Md(td(e));if(h===0)return e;const _=new Proxy(e,h===2?a:o);return l.set(e,_),_}function Gi(e){return li(e)?Gi(e.__v_raw):!!(e&&e.__v_isReactive)}function li(e){return!!(e&&e.__v_isReadonly)}function mn(e){return!!(e&&e.__v_isShallow)}function Ma(e){return e?!!e.__v_raw:!1}function Xt(e){const i=e&&e.__v_raw;return i?Xt(i):e}function Ed(e){return!ee(e,"__v_skip")&&Object.isExtensible(e)&&uu(e,"__v_skip",!0),e}const Mn=e=>ne(e)?xe(e):e,Ps=e=>ne(e)?la(e):e;function Fe(e){return e?e.__v_isRef===!0:!1}function G(e){return zd(e,!1)}function zd(e,i){return Fe(e)?e:new Ad(e,i)}class Ad{constructor(i,o){this.dep=new Ta,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?i:Xt(i),this._value=o?i:Mn(i),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(i){const o=this._rawValue,a=this.__v_isShallow||mn(i)||li(i);i=a?i:Xt(i),Vn(i,o)&&(this._rawValue=i,this._value=a?i:Mn(i),this.dep.trigger())}}function $t(e){return Fe(e)?e.value:e}const Id={get:(e,i,o)=>i==="__v_raw"?e:$t(Reflect.get(e,i,o)),set:(e,i,o,a)=>{const l=e[i];return Fe(l)&&!Fe(o)?(l.value=o,!0):Reflect.set(e,i,o,a)}};function Lu(e){return Gi(e)?e:new Proxy(e,Id)}class $d{constructor(i,o,a){this.fn=i,this.setter=o,this._value=void 0,this.dep=new Ta(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=oo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=a}notify(){if(this.flags|=16,!(this.flags&8)&&fe!==this)return mu(this,!0),!0}get value(){const i=this.dep.track();return vu(this),i&&(i.version=this.dep.version),this._value}set value(i){this.setter&&this.setter(i)}}function Dd(e,i,o=!1){let a,l;return Dt(e)?a=e:(a=e.get,l=e.set),new $d(a,l,o)}const jo={},Jo=new WeakMap;let ji;function Nd(e,i=!1,o=ji){if(o){let a=Jo.get(o);a||Jo.set(o,a=[]),a.push(e)}}function Rd(e,i,o=ue){const{immediate:a,deep:l,once:d,scheduler:h,augmentJob:_,call:y}=o,T=it=>l?it:mn(it)||l===!1||l===0?ri(it,1):ri(it);let w,A,U,V,rt=!1,Q=!1;if(Fe(e)?(A=()=>e.value,rt=mn(e)):Gi(e)?(A=()=>T(e),rt=!0):wt(e)?(Q=!0,rt=e.some(it=>Gi(it)||mn(it)),A=()=>e.map(it=>{if(Fe(it))return it.value;if(Gi(it))return T(it);if(Dt(it))return y?y(it,2):it()})):Dt(e)?i?A=y?()=>y(e,2):e:A=()=>{if(U){Un();try{U()}finally{Hn()}}const it=ji;ji=w;try{return y?y(e,3,[V]):e(V)}finally{ji=it}}:A=Zn,i&&l){const it=A,ht=l===!0?1/0:l;A=()=>ri(it(),ht)}const Ot=fd(),Mt=()=>{w.stop(),Ot&&Ot.active&&ba(Ot.effects,w)};if(d&&i){const it=i;i=(...ht)=>{const Kt=it(...ht);return Mt(),Kt}}let q=Q?new Array(e.length).fill(jo):jo;const dt=it=>{if(!(!(w.flags&1)||!w.dirty&&!it))if(i){const ht=w.run();if(it||l||rt||(Q?ht.some((Kt,he)=>Vn(Kt,q[he])):Vn(ht,q))){U&&U();const Kt=ji;ji=w;try{const he=[ht,q===jo?void 0:Q&&q[0]===jo?[]:q,V];q=ht,y?y(i,3,he):i(...he)}finally{ji=Kt}}}else w.run()};return _&&_(dt),w=new hu(A),w.scheduler=h?()=>h(dt,!1):dt,V=it=>Nd(it,!1,w),U=w.onStop=()=>{const it=Jo.get(w);if(it){if(y)y(it,4);else for(const ht of it)ht();Jo.delete(w)}},i?a?dt(!0):q=w.run():h?h(dt.bind(null,!0),!0):w.run(),Mt.pause=w.pause.bind(w),Mt.resume=w.resume.bind(w),Mt.stop=Mt,Mt}function ri(e,i=1/0,o){if(i<=0||!ne(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=i))return e;if(o.set(e,i),i--,Fe(e))ri(e.value,i,o);else if(wt(e))for(let a=0;a{ri(a,i,o)});else if(au(e)){for(const a in e)ri(e[a],i,o);for(const a of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,a)&&ri(e[a],i,o)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function mo(e,i,o,a){try{return a?e(...a):e()}catch(l){mr(l,i,o)}}function _n(e,i,o,a){if(Dt(e)){const l=mo(e,i,o,a);return l&&ou(l)&&l.catch(d=>{mr(d,i,o)}),l}if(wt(e)){const l=[];for(let d=0;d>>1,l=We[a],d=ao(l);d=ao(o)?We.push(e):We.splice(Bd(i),0,e),e.flags|=1,Ou()}}function Ou(){Xo||(Xo=Cu.then(zu))}function Vd(e){wt(e)?bs.push(...e):ki&&e.id===-1?ki.splice(_s+1,0,e):e.flags&1||(bs.push(e),e.flags|=1),Ou()}function ll(e,i,o=Rn+1){for(;oao(o)-ao(a));if(bs.length=0,ki){ki.push(...i);return}for(ki=i,_s=0;_se.id==null?e.flags&2?-1:1/0:e.id;function zu(e){try{for(Rn=0;Rn{a._d&&nr(-1);const d=Qo(i);let h;try{h=e(...l)}finally{Qo(d),a._d&&nr(1)}return h};return a._n=!0,a._c=!0,a._d=!0,a}function ot(e,i){if(Re===null)return e;const o=xr(Re),a=e.dirs||(e.dirs=[]);for(let l=0;l1)return o&&Dt(i)?i.call(a&&a.proxy):i}}const Zd=Symbol.for("v-scx"),Ud=()=>eo(Zd);function Qe(e,i,o){return $u(e,i,o)}function $u(e,i,o=ue){const{immediate:a,deep:l,flush:d,once:h}=o,_=Oe({},o),y=i&&a||!i&&d!=="post";let T;if(fo){if(d==="sync"){const V=Ud();T=V.__watcherHandles||(V.__watcherHandles=[])}else if(!y){const V=()=>{};return V.stop=Zn,V.resume=Zn,V.pause=Zn,V}}const w=Ke;_.call=(V,rt,Q)=>_n(V,w,rt,Q);let A=!1;d==="post"?_.scheduler=V=>{Xe(V,w&&w.suspense)}:d!=="sync"&&(A=!0,_.scheduler=(V,rt)=>{rt?V():Oa(V)}),_.augmentJob=V=>{i&&(V.flags|=4),A&&(V.flags|=2,w&&(V.id=w.uid,V.i=w))};const U=Rd(e,i,_);return fo&&(T?T.push(U):y&&U()),U}function Hd(e,i,o){const a=this.proxy,l=be(e)?e.includes(".")?Du(a,e):()=>a[e]:e.bind(a,a);let d;Dt(i)?d=i:(d=i.handler,o=i);const h=go(this),_=$u(l,d.bind(a),o);return h(),_}function Du(e,i){const o=i.split(".");return()=>{let a=e;for(let l=0;le.__isTeleport,pn=Symbol("_leaveCb"),Ws=Symbol("_enterCb");function Wd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Yi(()=>{e.isMounted=!0}),vr(()=>{e.isUnmounting=!0}),e}const fn=[Function,Array],Ru={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:fn,onEnter:fn,onAfterEnter:fn,onEnterCancelled:fn,onBeforeLeave:fn,onLeave:fn,onAfterLeave:fn,onLeaveCancelled:fn,onBeforeAppear:fn,onAppear:fn,onAfterAppear:fn,onAppearCancelled:fn},Fu=e=>{const i=e.subTree;return i.component?Fu(i.component):i},Kd={name:"BaseTransition",props:Ru,setup(e,{slots:i}){const o=fc(),a=Wd();return()=>{const l=i.default&&Zu(i.default(),!0),d=l&&l.length?Bu(l):o.subTree?N():void 0;if(!d)return;const h=Xt(e),{mode:_}=h;if(a.isLeaving)return Jr(d);const y=ul(d);if(!y)return Jr(d);let T=ua(y,h,a,o,A=>T=A);y.type!==Ne&&lo(y,T);let w=o.subTree&&ul(o.subTree);if(w&&w.type!==Ne&&!Wi(w,y)&&Fu(o).type!==Ne){let A=ua(w,h,a,o);if(lo(w,A),_==="out-in"&&y.type!==Ne)return a.isLeaving=!0,A.afterLeave=()=>{a.isLeaving=!1,o.job.flags&8||o.update(),delete A.afterLeave,w=void 0},Jr(d);_==="in-out"&&y.type!==Ne?A.delayLeave=(U,V,rt)=>{const Q=Vu(a,w);Q[String(w.key)]=w,U[pn]=()=>{V(),U[pn]=void 0,delete T.delayedLeave,w=void 0},T.delayedLeave=()=>{rt(),delete T.delayedLeave,w=void 0}}:w=void 0}else w&&(w=void 0);return d}}};function Bu(e){let i=e[0];if(e.length>1){for(const o of e)if(o.type!==Ne){i=o;break}}return i}const Gd=Kd;function Vu(e,i){const{leavingVNodes:o}=e;let a=o.get(i.type);return a||(a=Object.create(null),o.set(i.type,a)),a}function ua(e,i,o,a,l){const{appear:d,mode:h,persisted:_=!1,onBeforeEnter:y,onEnter:T,onAfterEnter:w,onEnterCancelled:A,onBeforeLeave:U,onLeave:V,onAfterLeave:rt,onLeaveCancelled:Q,onBeforeAppear:Ot,onAppear:Mt,onAfterAppear:q,onAppearCancelled:dt}=i,it=String(e.key),ht=Vu(o,e),Kt=(St,Nt)=>{St&&_n(St,a,9,Nt)},he=(St,Nt)=>{const Et=Nt[1];Kt(St,Nt),wt(St)?St.every(nt=>nt.length<=1)&&Et():St.length<=1&&Et()},pe={mode:h,persisted:_,beforeEnter(St){let Nt=y;if(!o.isMounted)if(d)Nt=Ot||y;else return;St[pn]&&St[pn](!0);const Et=ht[it];Et&&Wi(e,Et)&&Et.el[pn]&&Et.el[pn](),Kt(Nt,[St])},enter(St){if(ht[it]===e)return;let Nt=T,Et=w,nt=A;if(!o.isMounted)if(d)Nt=Mt||T,Et=q||w,nt=dt||A;else return;let ut=!1;St[Ws]=Ft=>{ut||(ut=!0,Ft?Kt(nt,[St]):Kt(Et,[St]),pe.delayedLeave&&pe.delayedLeave(),St[Ws]=void 0)};const zt=St[Ws].bind(null,!1);Nt?he(Nt,[St,zt]):zt()},leave(St,Nt){const Et=String(e.key);if(St[Ws]&&St[Ws](!0),o.isUnmounting)return Nt();Kt(U,[St]);let nt=!1;St[pn]=zt=>{nt||(nt=!0,Nt(),zt?Kt(Q,[St]):Kt(rt,[St]),St[pn]=void 0,ht[Et]===e&&delete ht[Et])};const ut=St[pn].bind(null,!1);ht[Et]=e,V?he(V,[St,ut]):ut()},clone(St){const Nt=ua(St,i,o,a,l);return l&&l(Nt),Nt}};return pe}function Jr(e){if(gr(e))return e=Pi(e),e.children=null,e}function ul(e){if(!gr(e))return Nu(e.type)&&e.children?Bu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:i,children:o}=e;if(o){if(i&16)return o[0];if(i&32&&Dt(o.default))return o.default()}}function lo(e,i){e.shapeFlag&6&&e.component?(e.transition=i,lo(e.component.subTree,i)):e.shapeFlag&128?(e.ssContent.transition=i.clone(e.ssContent),e.ssFallback.transition=i.clone(e.ssFallback)):e.transition=i}function Zu(e,i=!1,o){let a=[],l=0;for(let d=0;d1)for(let d=0;dno(Q,i&&(wt(i)?i[Ot]:i),o,a,l));return}if(xs(a)&&!l){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&no(e,i,o,a.component.subTree);return}const d=a.shapeFlag&4?xr(a.component):a.el,h=l?null:d,{i:_,r:y}=e,T=i&&i.r,w=_.refs===ue?_.refs={}:_.refs,A=_.setupState,U=Xt(A),V=A===ue?su:Q=>cl(w,Q)?!1:ee(U,Q),rt=(Q,Ot)=>!(Ot&&cl(w,Ot));if(T!=null&&T!==y){if(dl(i),be(T))w[T]=null,V(T)&&(A[T]=null);else if(Fe(T)){const Q=i;rt(T,Q.k)&&(T.value=null),Q.k&&(w[Q.k]=null)}}if(Dt(y)){Un();try{mo(y,_,12,[h,w])}finally{Hn()}}else{const Q=be(y),Ot=Fe(y);if(Q||Ot){const Mt=()=>{if(e.f){const q=Q?V(y)?A[y]:w[y]:rt()||!e.k?y.value:w[e.k];if(l)wt(q)&&ba(q,d);else if(wt(q))q.includes(d)||q.push(d);else if(Q)w[y]=[d],V(y)&&(A[y]=w[y]);else{const dt=[d];rt(y,e.k)&&(y.value=dt),e.k&&(w[e.k]=dt)}}else Q?(w[y]=h,V(y)&&(A[y]=h)):Ot&&(rt(y,e.k)&&(y.value=h),e.k&&(w[e.k]=h))};if(h){const q=()=>{Mt(),tr.delete(e)};q.id=-1,tr.set(e,q),Xe(q,o)}else dl(e),Mt()}}}function dl(e){const i=tr.get(e);i&&(i.flags|=8,tr.delete(e))}hr().requestIdleCallback;hr().cancelIdleCallback;const xs=e=>!!e.type.__asyncLoader,gr=e=>e.type.__isKeepAlive;function qd(e,i){Hu(e,"a",i)}function Yd(e,i){Hu(e,"da",i)}function Hu(e,i,o=Ke){const a=e.__wdc||(e.__wdc=()=>{let l=o;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(_r(i,a,o),o){let l=o.parent;for(;l&&l.parent;)gr(l.parent.vnode)&&Jd(a,i,o,l),l=l.parent}}function Jd(e,i,o,a){const l=_r(i,e,a,!0);ju(()=>{ba(a[i],l)},o)}function _r(e,i,o=Ke,a=!1){if(o){const l=o[e]||(o[e]=[]),d=i.__weh||(i.__weh=(...h)=>{Un();const _=go(o),y=_n(i,o,e,h);return _(),Hn(),y});return a?l.unshift(d):l.push(d),d}}const ui=e=>(i,o=Ke)=>{(!fo||e==="sp")&&_r(e,(...a)=>i(...a),o)},Xd=ui("bm"),Yi=ui("m"),Qd=ui("bu"),tf=ui("u"),vr=ui("bum"),ju=ui("um"),ef=ui("sp"),nf=ui("rtg"),sf=ui("rtc");function of(e,i=Ke){_r("ec",e,i)}const rf=Symbol.for("v-ndc");function Wt(e,i,o,a){let l;const d=o,h=wt(e);if(h||be(e)){const _=h&&Gi(e);let y=!1,T=!1;_&&(y=!mn(e),T=li(e),e=pr(e)),l=new Array(e.length);for(let w=0,A=e.length;wi(_,y,void 0,d));else{const _=Object.keys(e);l=new Array(_.length);for(let y=0,T=_.length;y0;return g(),ie(ct,null,[O("slot",o,a)],T?-2:64)}let d=e[i];d&&d._c&&(d._d=!1),g();const h=d&&Wu(d(o)),_=o.key||h&&h.key,y=ie(ct,{key:(_&&!Cn(_)?_:`_${i}`)+(!h&&a?"_fb":"")},h||[],h&&e._===1?64:-2);return y.scopeId&&(y.slotScopeIds=[y.scopeId+"-s"]),d&&d._c&&(d._d=!0),y}function Wu(e){return e.some(i=>co(i)?!(i.type===Ne||i.type===ct&&!Wu(i.children)):!0)?e:null}const ca=e=>e?hc(e)?xr(e):ca(e.parent):null,io=Oe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ca(e.parent),$root:e=>ca(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Gu(e),$forceUpdate:e=>e.f||(e.f=()=>{Oa(e.update)}),$nextTick:e=>e.n||(e.n=Mu.bind(e.proxy)),$watch:e=>Hd.bind(e)}),Xr=(e,i)=>e!==ue&&!e.__isScriptSetup&&ee(e,i),lf={get({_:e},i){if(i==="__v_skip")return!0;const{ctx:o,setupState:a,data:l,props:d,accessCache:h,type:_,appContext:y}=e;if(i[0]!=="$"){const U=h[i];if(U!==void 0)switch(U){case 1:return a[i];case 2:return l[i];case 4:return o[i];case 3:return d[i]}else{if(Xr(a,i))return h[i]=1,a[i];if(l!==ue&&ee(l,i))return h[i]=2,l[i];if(ee(d,i))return h[i]=3,d[i];if(o!==ue&&ee(o,i))return h[i]=4,o[i];da&&(h[i]=0)}}const T=io[i];let w,A;if(T)return i==="$attrs"&&De(e.attrs,"get",""),T(e);if((w=_.__cssModules)&&(w=w[i]))return w;if(o!==ue&&ee(o,i))return h[i]=4,o[i];if(A=y.config.globalProperties,ee(A,i))return A[i]},set({_:e},i,o){const{data:a,setupState:l,ctx:d}=e;return Xr(l,i)?(l[i]=o,!0):a!==ue&&ee(a,i)?(a[i]=o,!0):ee(e.props,i)||i[0]==="$"&&i.slice(1)in e?!1:(d[i]=o,!0)},has({_:{data:e,setupState:i,accessCache:o,ctx:a,appContext:l,props:d,type:h}},_){let y;return!!(o[_]||e!==ue&&_[0]!=="$"&&ee(e,_)||Xr(i,_)||ee(d,_)||ee(a,_)||ee(io,_)||ee(l.config.globalProperties,_)||(y=h.__cssModules)&&y[_])},defineProperty(e,i,o){return o.get!=null?e._.accessCache[i]=0:ee(o,"value")&&this.set(e,i,o.value,null),Reflect.defineProperty(e,i,o)}};function fl(e){return wt(e)?e.reduce((i,o)=>(i[o]=null,i),{}):e}let da=!0;function uf(e){const i=Gu(e),o=e.proxy,a=e.ctx;da=!1,i.beforeCreate&&hl(i.beforeCreate,e,"bc");const{data:l,computed:d,methods:h,watch:_,provide:y,inject:T,created:w,beforeMount:A,mounted:U,beforeUpdate:V,updated:rt,activated:Q,deactivated:Ot,beforeDestroy:Mt,beforeUnmount:q,destroyed:dt,unmounted:it,render:ht,renderTracked:Kt,renderTriggered:he,errorCaptured:pe,serverPrefetch:St,expose:Nt,inheritAttrs:Et,components:nt,directives:ut,filters:zt}=i;if(T&&cf(T,a,null),h)for(const At in h){const et=h[At];Dt(et)&&(a[At]=et.bind(o))}if(l){const At=l.call(o,o);ne(At)&&(e.data=xe(At))}if(da=!0,d)for(const At in d){const et=d[At],ce=Dt(et)?et.bind(o,o):Dt(et.get)?et.get.bind(o,o):Zn,pt=!Dt(et)&&Dt(et.set)?et.set.bind(o):Zn,kt=xt({get:ce,set:pt});Object.defineProperty(a,At,{enumerable:!0,configurable:!0,get:()=>kt.value,set:Yt=>kt.value=Yt})}if(_)for(const At in _)Ku(_[At],a,o,At);if(y){const At=Dt(y)?y.call(o):y;Reflect.ownKeys(At).forEach(et=>{Iu(et,At[et])})}w&&hl(w,e,"c");function lt(At,et){wt(et)?et.forEach(ce=>At(ce.bind(o))):et&&At(et.bind(o))}if(lt(Xd,A),lt(Yi,U),lt(Qd,V),lt(tf,rt),lt(qd,Q),lt(Yd,Ot),lt(of,pe),lt(sf,Kt),lt(nf,he),lt(vr,q),lt(ju,it),lt(ef,St),wt(Nt))if(Nt.length){const At=e.exposed||(e.exposed={});Nt.forEach(et=>{Object.defineProperty(At,et,{get:()=>o[et],set:ce=>o[et]=ce,enumerable:!0})})}else e.exposed||(e.exposed={});ht&&e.render===Zn&&(e.render=ht),Et!=null&&(e.inheritAttrs=Et),nt&&(e.components=nt),ut&&(e.directives=ut),St&&Uu(e)}function cf(e,i,o=Zn){wt(e)&&(e=fa(e));for(const a in e){const l=e[a];let d;ne(l)?"default"in l?d=eo(l.from||a,l.default,!0):d=eo(l.from||a):d=eo(l),Fe(d)?Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>d.value,set:h=>d.value=h}):i[a]=d}}function hl(e,i,o){_n(wt(e)?e.map(a=>a.bind(i.proxy)):e.bind(i.proxy),i,o)}function Ku(e,i,o,a){let l=a.includes(".")?Du(o,a):()=>o[a];if(be(e)){const d=i[e];Dt(d)&&Qe(l,d)}else if(Dt(e))Qe(l,e.bind(o));else if(ne(e))if(wt(e))e.forEach(d=>Ku(d,i,o,a));else{const d=Dt(e.handler)?e.handler.bind(o):i[e.handler];Dt(d)&&Qe(l,d,e)}}function Gu(e){const i=e.type,{mixins:o,extends:a}=i,{mixins:l,optionsCache:d,config:{optionMergeStrategies:h}}=e.appContext,_=d.get(i);let y;return _?y=_:!l.length&&!o&&!a?y=i:(y={},l.length&&l.forEach(T=>er(y,T,h,!0)),er(y,i,h)),ne(i)&&d.set(i,y),y}function er(e,i,o,a=!1){const{mixins:l,extends:d}=i;d&&er(e,d,o,!0),l&&l.forEach(h=>er(e,h,o,!0));for(const h in i)if(!(a&&h==="expose")){const _=df[h]||o&&o[h];e[h]=_?_(e[h],i[h]):i[h]}return e}const df={data:pl,props:ml,emits:ml,methods:qs,computed:qs,beforeCreate:je,created:je,beforeMount:je,mounted:je,beforeUpdate:je,updated:je,beforeDestroy:je,beforeUnmount:je,destroyed:je,unmounted:je,activated:je,deactivated:je,errorCaptured:je,serverPrefetch:je,components:qs,directives:qs,watch:hf,provide:pl,inject:ff};function pl(e,i){return i?e?function(){return Oe(Dt(e)?e.call(this,this):e,Dt(i)?i.call(this,this):i)}:i:e}function ff(e,i){return qs(fa(e),fa(i))}function fa(e){if(wt(e)){const i={};for(let o=0;oi==="modelValue"||i==="model-value"?e.modelModifiers:e[`${i}Modifiers`]||e[`${Tn(i)}Modifiers`]||e[`${Li(i)}Modifiers`];function _f(e,i,...o){if(e.isUnmounted)return;const a=e.vnode.props||ue;let l=o;const d=i.startsWith("update:"),h=d&&gf(a,i.slice(7));h&&(h.trim&&(l=o.map(w=>be(w)?w.trim():w)),h.number&&(l=o.map(fr)));let _,y=a[_=Wr(i)]||a[_=Wr(Tn(i))];!y&&d&&(y=a[_=Wr(Li(i))]),y&&_n(y,e,6,l);const T=a[_+"Once"];if(T){if(!e.emitted)e.emitted={};else if(e.emitted[_])return;e.emitted[_]=!0,_n(T,e,6,l)}}const vf=new WeakMap;function Yu(e,i,o=!1){const a=o?vf:i.emitsCache,l=a.get(e);if(l!==void 0)return l;const d=e.emits;let h={},_=!1;if(!Dt(e)){const y=T=>{const w=Yu(T,i,!0);w&&(_=!0,Oe(h,w))};!o&&i.mixins.length&&i.mixins.forEach(y),e.extends&&y(e.extends),e.mixins&&e.mixins.forEach(y)}return!d&&!_?(ne(e)&&a.set(e,null),null):(wt(d)?d.forEach(y=>h[y]=null):Oe(h,d),ne(e)&&a.set(e,h),h)}function yr(e,i){return!e||!ur(i)?!1:(i=i.slice(2),i=i==="Once"?i:i.replace(/Once$/,""),ee(e,i[0].toLowerCase()+i.slice(1))||ee(e,Li(i))||ee(e,i))}function gl(e){const{type:i,vnode:o,proxy:a,withProxy:l,propsOptions:[d],slots:h,attrs:_,emit:y,render:T,renderCache:w,props:A,data:U,setupState:V,ctx:rt,inheritAttrs:Q}=e,Ot=Qo(e);let Mt,q;try{if(o.shapeFlag&4){const it=l||a,ht=it;Mt=Bn(T.call(ht,it,w,A,V,U,rt)),q=_}else{const it=i;Mt=Bn(it.length>1?it(A,{attrs:_,slots:h,emit:y}):it(A,null)),q=i.props?_:yf(_)}}catch(it){so.length=0,mr(it,e,1),Mt=O(Ne)}let dt=Mt;if(q&&Q!==!1){const it=Object.keys(q),{shapeFlag:ht}=dt;it.length&&ht&7&&(d&&it.some(cr)&&(q=bf(q,d)),dt=Pi(dt,q,!1,!0))}return o.dirs&&(dt=Pi(dt,null,!1,!0),dt.dirs=dt.dirs?dt.dirs.concat(o.dirs):o.dirs),o.transition&&lo(dt,o.transition),Mt=dt,Qo(Ot),Mt}const yf=e=>{let i;for(const o in e)(o==="class"||o==="style"||ur(o))&&((i||(i={}))[o]=e[o]);return i},bf=(e,i)=>{const o={};for(const a in e)(!cr(a)||!(a.slice(9)in i))&&(o[a]=e[a]);return o};function xf(e,i,o){const{props:a,children:l,component:d}=e,{props:h,children:_,patchFlag:y}=i,T=d.emitsOptions;if(i.dirs||i.transition)return!0;if(o&&y>=0){if(y&1024)return!0;if(y&16)return a?_l(a,h,T):!!h;if(y&8){const w=i.dynamicProps;for(let A=0;AObject.create(Xu),tc=e=>Object.getPrototypeOf(e)===Xu;function kf(e,i,o,a=!1){const l={},d=Qu();e.propsDefaults=Object.create(null),ec(e,i,l,d);for(const h in e.propsOptions[0])h in l||(l[h]=void 0);o?e.props=a?l:Od(l):e.type.props?e.props=l:e.props=d,e.attrs=d}function Sf(e,i,o,a){const{props:l,attrs:d,vnode:{patchFlag:h}}=e,_=Xt(l),[y]=e.propsOptions;let T=!1;if((a||h>0)&&!(h&16)){if(h&8){const w=e.vnode.dynamicProps;for(let A=0;A{y=!0;const[U,V]=nc(A,i,!0);Oe(h,U),V&&_.push(...V)};!o&&i.mixins.length&&i.mixins.forEach(w),e.extends&&w(e.extends),e.mixins&&e.mixins.forEach(w)}if(!d&&!y)return ne(e)&&a.set(e,vs),vs;if(wt(d))for(let w=0;we==="_"||e==="_ctx"||e==="$stable",za=e=>wt(e)?e.map(Bn):[Bn(e)],Tf=(e,i,o)=>{if(i._n)return i;const a=mt((...l)=>za(i(...l)),o);return a._c=!1,a},ic=(e,i,o)=>{const a=e._ctx;for(const l in e){if(Ea(l))continue;const d=e[l];if(Dt(d))i[l]=Tf(l,d,a);else if(d!=null){const h=za(d);i[l]=()=>h}}},sc=(e,i)=>{const o=za(i);e.slots.default=()=>o},oc=(e,i,o)=>{for(const a in i)(o||!Ea(a))&&(e[a]=i[a])},Lf=(e,i,o)=>{const a=e.slots=Qu();if(e.vnode.shapeFlag&32){const l=i._;l?(oc(a,i,o),o&&uu(a,"_",l,!0)):ic(i,a)}else i&&sc(e,i)},Cf=(e,i,o)=>{const{vnode:a,slots:l}=e;let d=!0,h=ue;if(a.shapeFlag&32){const _=i._;_?o&&_===1?d=!1:oc(l,i,o):(d=!i.$stable,ic(i,l)),h=i}else i&&(sc(e,i),h={default:1});if(d)for(const _ in l)!Ea(_)&&h[_]==null&&delete l[_]},Xe=Af;function Mf(e){return Of(e)}function Of(e,i){const o=hr();o.__VUE__=!0;const{insert:a,remove:l,patchProp:d,createElement:h,createText:_,createComment:y,setText:T,setElementText:w,parentNode:A,nextSibling:U,setScopeId:V=Zn,insertStaticContent:rt}=e,Q=(v,m,M,F=null,R=null,B=null,J=void 0,D=null,K=!!m.dynamicChildren)=>{if(v===m)return;v&&!Wi(v,m)&&(F=C(v),Yt(v,R,B,!0),v=null),m.patchFlag===-2&&(K=!1,m.dynamicChildren=null);const{type:Z,ref:yt,shapeFlag:st}=m;switch(Z){case br:Ot(v,m,M,F);break;case Ne:Mt(v,m,M,F);break;case ta:v==null&&q(m,M,F,J);break;case ct:nt(v,m,M,F,R,B,J,D,K);break;default:st&1?ht(v,m,M,F,R,B,J,D,K):st&6?ut(v,m,M,F,R,B,J,D,K):(st&64||st&128)&&Z.process(v,m,M,F,R,B,J,D,K,se)}yt!=null&&R?no(yt,v&&v.ref,B,m||v,!m):yt==null&&v&&v.ref!=null&&no(v.ref,null,B,v,!0)},Ot=(v,m,M,F)=>{if(v==null)a(m.el=_(m.children),M,F);else{const R=m.el=v.el;m.children!==v.children&&T(R,m.children)}},Mt=(v,m,M,F)=>{v==null?a(m.el=y(m.children||""),M,F):m.el=v.el},q=(v,m,M,F)=>{[v.el,v.anchor]=rt(v.children,m,M,F,v.el,v.anchor)},dt=({el:v,anchor:m},M,F)=>{let R;for(;v&&v!==m;)R=U(v),a(v,M,F),v=R;a(m,M,F)},it=({el:v,anchor:m})=>{let M;for(;v&&v!==m;)M=U(v),l(v),v=M;l(m)},ht=(v,m,M,F,R,B,J,D,K)=>{if(m.type==="svg"?J="svg":m.type==="math"&&(J="mathml"),v==null)Kt(m,M,F,R,B,J,D,K);else{const Z=v.el&&v.el._isVueCE?v.el:null;try{Z&&Z._beginPatch(),St(v,m,R,B,J,D,K)}finally{Z&&Z._endPatch()}}},Kt=(v,m,M,F,R,B,J,D)=>{let K,Z;const{props:yt,shapeFlag:st,transition:tt,dirs:bt}=v;if(K=v.el=h(v.type,B,yt&&yt.is,yt),st&8?w(K,v.children):st&16&&pe(v.children,K,null,F,R,Qr(v,B),J,D),bt&&Vi(v,null,F,"created"),he(K,v,v.scopeId,J,F),yt){for(const gt in yt)gt!=="value"&&!Xs(gt)&&d(K,gt,null,yt[gt],B,F);"value"in yt&&d(K,"value",null,yt.value,B),(Z=yt.onVnodeBeforeMount)&&Nn(Z,F,v)}bt&&Vi(v,null,F,"beforeMount");const Rt=Ef(R,tt);Rt&&tt.beforeEnter(K),a(K,m,M),((Z=yt&&yt.onVnodeMounted)||Rt||bt)&&Xe(()=>{try{Z&&Nn(Z,F,v),Rt&&tt.enter(K),bt&&Vi(v,null,F,"mounted")}finally{}},R)},he=(v,m,M,F,R)=>{if(M&&V(v,M),F)for(let B=0;B{for(let Z=K;Z{const D=m.el=v.el;let{patchFlag:K,dynamicChildren:Z,dirs:yt}=m;K|=v.patchFlag&16;const st=v.props||ue,tt=m.props||ue;let bt;if(M&&Zi(M,!1),(bt=tt.onVnodeBeforeUpdate)&&Nn(bt,M,m,v),yt&&Vi(m,v,M,"beforeUpdate"),M&&Zi(M,!0),Z&&(!v.dynamicChildren||v.dynamicChildren.length!==Z.length)&&(K=0,J=!1,Z=null),(st.innerHTML&&tt.innerHTML==null||st.textContent&&tt.textContent==null)&&w(D,""),Z?Nt(v.dynamicChildren,Z,D,M,F,Qr(m,R),B):J||et(v,m,D,null,M,F,Qr(m,R),B,!1),K>0){if(K&16)Et(D,st,tt,M,R);else if(K&2&&st.class!==tt.class&&d(D,"class",null,tt.class,R),K&4&&d(D,"style",st.style,tt.style,R),K&8){const Rt=m.dynamicProps;for(let gt=0;gt{bt&&Nn(bt,M,m,v),yt&&Vi(m,v,M,"updated")},F)},Nt=(v,m,M,F,R,B,J)=>{for(let D=0;D{if(m!==M){if(m!==ue)for(const B in m)!Xs(B)&&!(B in M)&&d(v,B,m[B],null,R,F);for(const B in M){if(Xs(B))continue;const J=M[B],D=m[B];J!==D&&B!=="value"&&d(v,B,D,J,R,F)}"value"in M&&d(v,"value",m.value,M.value,R)}},nt=(v,m,M,F,R,B,J,D,K)=>{const Z=m.el=v?v.el:_(""),yt=m.anchor=v?v.anchor:_("");let{patchFlag:st,dynamicChildren:tt,slotScopeIds:bt}=m;bt&&(D=D?D.concat(bt):bt),v==null?(a(Z,M,F),a(yt,M,F),pe(m.children||[],M,yt,R,B,J,D,K)):st>0&&st&64&&tt&&v.dynamicChildren&&v.dynamicChildren.length===tt.length?(Nt(v.dynamicChildren,tt,M,R,B,J,D),(m.key!=null||R&&m===R.subTree)&&rc(v,m,!0)):et(v,m,M,yt,R,B,J,D,K)},ut=(v,m,M,F,R,B,J,D,K)=>{m.slotScopeIds=D,v==null?m.shapeFlag&512?R.ctx.activate(m,M,F,J,K):zt(m,M,F,R,B,J,K):Ft(v,m,K)},zt=(v,m,M,F,R,B,J)=>{const D=v.component=Bf(v,F,R);if(gr(v)&&(D.ctx.renderer=se),Vf(D,!1,J),D.asyncDep){if(R&&R.registerDep(D,lt,J),!v.el){const K=D.subTree=O(Ne);Mt(null,K,m,M),v.placeholder=K.el}}else lt(D,v,m,M,R,B,J)},Ft=(v,m,M)=>{const F=m.component=v.component;if(xf(v,m,M))if(F.asyncDep&&!F.asyncResolved){At(F,m,M);return}else F.next=m,F.update();else m.el=v.el,F.vnode=m},lt=(v,m,M,F,R,B,J)=>{const D=()=>{if(v.isMounted){let{next:st,bu:tt,u:bt,parent:Rt,vnode:gt}=v;{const Te=ac(v);if(Te){st&&(st.el=gt.el,At(v,st,J)),Te.asyncDep.then(()=>{Xe(()=>{v.isUnmounted||Z()},R)});return}}let Ht=st,le;Zi(v,!1),st?(st.el=gt.el,At(v,st,J)):st=gt,tt&&qo(tt),(le=st.props&&st.props.onVnodeBeforeUpdate)&&Nn(le,Rt,st,gt),Zi(v,!0);const me=gl(v),ve=v.subTree;v.subTree=me,Q(ve,me,A(ve.el),C(ve),v,R,B),st.el=me.el,Ht===null&&wf(v,me.el),bt&&Xe(bt,R),(le=st.props&&st.props.onVnodeUpdated)&&Xe(()=>Nn(le,Rt,st,gt),R)}else{let st;const{el:tt,props:bt}=m,{bm:Rt,m:gt,parent:Ht,root:le,type:me}=v,ve=xs(m);Zi(v,!1),Rt&&qo(Rt),!ve&&(st=bt&&bt.onVnodeBeforeMount)&&Nn(st,Ht,m),Zi(v,!0);{le.ce&&le.ce._hasShadowRoot()&&le.ce._injectChildStyle(me,v.parent?v.parent.type:void 0);const Te=v.subTree=gl(v);Q(null,Te,M,F,v,R,B),m.el=Te.el}if(gt&&Xe(gt,R),!ve&&(st=bt&&bt.onVnodeMounted)){const Te=m;Xe(()=>Nn(st,Ht,Te),R)}(m.shapeFlag&256||Ht&&xs(Ht.vnode)&&Ht.vnode.shapeFlag&256)&&v.a&&Xe(v.a,R),v.isMounted=!0,m=M=F=null}};v.scope.on();const K=v.effect=new hu(D);v.scope.off();const Z=v.update=K.run.bind(K),yt=v.job=K.runIfDirty.bind(K);yt.i=v,yt.id=v.uid,K.scheduler=()=>Oa(yt),Zi(v,!0),Z()},At=(v,m,M)=>{m.component=v;const F=v.vnode.props;v.vnode=m,v.next=null,Sf(v,m.props,F,M),Cf(v,m.children,M),Un(),ll(v),Hn()},et=(v,m,M,F,R,B,J,D,K=!1)=>{const Z=v&&v.children,yt=v?v.shapeFlag:0,st=m.children,{patchFlag:tt,shapeFlag:bt}=m;if(tt>0){if(tt&128){pt(Z,st,M,F,R,B,J,D,K);return}else if(tt&256){ce(Z,st,M,F,R,B,J,D,K);return}}bt&8?(yt&16&&j(Z,R,B),st!==Z&&w(M,st)):yt&16?bt&16?pt(Z,st,M,F,R,B,J,D,K):j(Z,R,B,!0):(yt&8&&w(M,""),bt&16&&pe(st,M,F,R,B,J,D,K))},ce=(v,m,M,F,R,B,J,D,K)=>{v=v||vs,m=m||vs;const Z=v.length,yt=m.length,st=Math.min(Z,yt);let tt;for(tt=0;ttyt?j(v,R,B,!0,!1,st):pe(m,M,F,R,B,J,D,K,st)},pt=(v,m,M,F,R,B,J,D,K)=>{let Z=0;const yt=m.length;let st=v.length-1,tt=yt-1;for(;Z<=st&&Z<=tt;){const bt=v[Z],Rt=m[Z]=K?si(m[Z]):Bn(m[Z]);if(Wi(bt,Rt))Q(bt,Rt,M,null,R,B,J,D,K);else break;Z++}for(;Z<=st&&Z<=tt;){const bt=v[st],Rt=m[tt]=K?si(m[tt]):Bn(m[tt]);if(Wi(bt,Rt))Q(bt,Rt,M,null,R,B,J,D,K);else break;st--,tt--}if(Z>st){if(Z<=tt){const bt=tt+1,Rt=bttt)for(;Z<=st;)Yt(v[Z],R,B,!0),Z++;else{const bt=Z,Rt=Z,gt=new Map;for(Z=Rt;Z<=tt;Z++){const ke=m[Z]=K?si(m[Z]):Bn(m[Z]);ke.key!=null&>.set(ke.key,Z)}let Ht,le=0;const me=tt-Rt+1;let ve=!1,Te=0;const vn=new Array(me);for(Z=0;Z=me){Yt(ke,R,B,!0);continue}let Ie;if(ke.key!=null)Ie=gt.get(ke.key);else for(Ht=Rt;Ht<=tt;Ht++)if(vn[Ht-Rt]===0&&Wi(ke,m[Ht])){Ie=Ht;break}Ie===void 0?Yt(ke,R,B,!0):(vn[Ie-Rt]=Z+1,Ie>=Te?Te=Ie:ve=!0,Q(ke,m[Ie],M,null,R,B,J,D,K),le++)}const ci=ve?zf(vn):vs;for(Ht=ci.length-1,Z=me-1;Z>=0;Z--){const ke=Rt+Z,Ie=m[ke],On=m[ke+1],Be=ke+1{const{el:B,type:J,transition:D,children:K,shapeFlag:Z}=v;if(Z&6){kt(v.component.subTree,m,M,F);return}if(Z&128){v.suspense.move(m,M,F);return}if(Z&64){J.move(v,m,M,se);return}if(J===ct){a(B,m,M);for(let st=0;stD.enter(B),R));else{const{leave:st,delayLeave:tt,afterLeave:bt}=D,Rt=()=>{v.ctx.isUnmounted?l(B):a(B,m,M)},gt=()=>{const Ht=B._isLeaving||!!B[pn];B._isLeaving&&B[pn](!0),D.persisted&&!Ht?Rt():st(B,()=>{Rt(),bt&&bt()})};tt?tt(B,Rt,gt):gt()}else a(B,m,M)},Yt=(v,m,M,F=!1,R=!1)=>{const{type:B,props:J,ref:D,children:K,dynamicChildren:Z,shapeFlag:yt,patchFlag:st,dirs:tt,cacheIndex:bt,memo:Rt}=v;if(st===-2&&(R=!1),D!=null&&(Un(),no(D,null,M,v,!0),Hn()),bt!=null&&(m.renderCache[bt]=void 0),yt&256){m.ctx.deactivate(v);return}const gt=yt&1&&tt,Ht=!xs(v);let le;if(Ht&&(le=J&&J.onVnodeBeforeUnmount)&&Nn(le,m,v),yt&6)Bt(v.component,M,F);else{if(yt&128){v.suspense.unmount(M,F);return}gt&&Vi(v,null,m,"beforeUnmount"),yt&64?v.type.remove(v,m,M,se,F):Z&&!Z.hasOnce&&(B!==ct||st>0&&st&64)?j(Z,m,M,!1,!0):(B===ct&&st&384||!R&&yt&16)&&j(K,m,M),F&&ae(v)}const me=Rt!=null&&bt==null;(Ht&&(le=J&&J.onVnodeUnmounted)||gt||me)&&Xe(()=>{le&&Nn(le,m,v),gt&&Vi(v,null,m,"unmounted"),me&&(v.el=null)},M)},ae=v=>{const{type:m,el:M,anchor:F,transition:R}=v;if(m===ct){Jt(M,F);return}if(m===ta){it(v);return}const B=()=>{l(M),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(v.shapeFlag&1&&R&&!R.persisted){const{leave:J,delayLeave:D}=R,K=()=>J(M,B);D?D(v.el,B,K):K()}else B()},Jt=(v,m)=>{let M;for(;v!==m;)M=U(v),l(v),v=M;l(m)},Bt=(v,m,M)=>{const{bum:F,scope:R,job:B,subTree:J,um:D,m:K,a:Z}=v;yl(K),yl(Z),F&&qo(F),R.stop(),B&&(B.flags|=8,Yt(J,v,m,M)),D&&Xe(D,m),Xe(()=>{v.isUnmounted=!0},m)},j=(v,m,M,F=!1,R=!1,B=0)=>{for(let J=B;J{if(v.shapeFlag&6)return C(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();const m=U(v.anchor||v.el),M=m&&m[jd];return M?U(M):m};let E=!1;const _e=(v,m,M)=>{let F;v==null?m._vnode&&(Yt(m._vnode,null,null,!0),F=m._vnode.component):Q(m._vnode||null,v,m,null,null,null,M),m._vnode=v,E||(E=!0,ll(F),Eu(),E=!1)},se={p:Q,um:Yt,m:kt,r:ae,mt:zt,mc:pe,pc:et,pbc:Nt,n:C,o:e};return{render:_e,hydrate:void 0,createApp:mf(_e)}}function Qr({type:e,props:i},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&i&&i.encoding&&i.encoding.includes("html")?void 0:o}function Zi({effect:e,job:i},o){o?(e.flags|=32,i.flags|=4):(e.flags&=-33,i.flags&=-5)}function Ef(e,i){return(!e||e&&!e.pendingBranch)&&i&&!i.persisted}function rc(e,i,o=!1){const a=e.children,l=i.children;if(wt(a)&&wt(l))for(let d=0;d>1,e[o[_]]0&&(i[a]=o[d-1]),o[d]=a)}}for(d=o.length,h=o[d-1];d-- >0;)o[d]=h,h=i[h];return o}function ac(e){const i=e.subTree.component;if(i)return i.asyncDep&&!i.asyncResolved?i:ac(i)}function yl(e){if(e)for(let i=0;ie.__isSuspense;function Af(e,i){i&&i.pendingBranch?wt(e)?i.effects.push(...e):i.effects.push(e):Vd(e)}const ct=Symbol.for("v-fgt"),br=Symbol.for("v-txt"),Ne=Symbol.for("v-cmt"),ta=Symbol.for("v-stc"),so=[];let on=null;function g(e=!1){so.push(on=e?null:[])}function If(){so.pop(),on=so[so.length-1]||null}let uo=1;function nr(e,i=!1){uo+=e,e<0&&on&&i&&(on.hasOnce=!0)}function cc(e){return e.dynamicChildren=uo>0?on||vs:null,If(),uo>0&&on&&on.push(e),e}function x(e,i,o,a,l,d){return cc(u(e,i,o,a,l,d,!0))}function ie(e,i,o,a,l){return cc(O(e,i,o,a,l,!0))}function co(e){return e?e.__v_isVNode===!0:!1}function Wi(e,i){return e.type===i.type&&e.key===i.key}const dc=({key:e})=>e??null,Yo=({ref:e,ref_key:i,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?be(e)||Fe(e)||Dt(e)?{i:Re,r:e,k:i,f:!!o}:e:null);function u(e,i=null,o=null,a=0,l=null,d=e===ct?0:1,h=!1,_=!1){const y={__v_isVNode:!0,__v_skip:!0,type:e,props:i,key:i&&dc(i),ref:i&&Yo(i),scopeId:Au,slotScopeIds:null,children:o,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:d,patchFlag:a,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:Re};return _?(ir(y,o),d&128&&e.normalize(y)):o&&(y.shapeFlag|=be(o)?8:16),uo>0&&!h&&on&&(y.patchFlag>0||d&6)&&y.patchFlag!==32&&on.push(y),y}const O=$f;function $f(e,i=null,o=null,a=0,l=null,d=!1){if((!e||e===rf)&&(e=Ne),co(e)){const _=Pi(e,i,!0);return o&&ir(_,o),uo>0&&!d&&on&&(_.shapeFlag&6?on[on.indexOf(e)]=_:on.push(_)),_.patchFlag=-2,_}if(jf(e)&&(e=e.__vccOpts),i){i=Df(i);let{class:_,style:y}=i;_&&!be(_)&&(i.class=Ct(_)),ne(y)&&(Ma(y)&&!wt(y)&&(y=Oe({},y)),i.style=Ss(y))}const h=be(e)?1:uc(e)?128:Nu(e)?64:ne(e)?4:Dt(e)?2:0;return u(e,i,o,a,l,h,d,!0)}function Df(e){return e?Ma(e)||tc(e)?Oe({},e):e:null}function Pi(e,i,o=!1,a=!1){const{props:l,ref:d,patchFlag:h,children:_,transition:y}=e,T=i?Nf(l||{},i):l,w={__v_isVNode:!0,__v_skip:!0,type:e.type,props:T,key:T&&dc(T),ref:i&&i.ref?o&&d?wt(d)?d.concat(Yo(i)):[d,Yo(i)]:Yo(i):d,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:_,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:i&&e.type!==ct?h===-1?16:h|16:h,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:y,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Pi(e.ssContent),ssFallback:e.ssFallback&&Pi(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return y&&a&&lo(w,y.clone(w)),w}function $(e=" ",i=0){return O(br,null,e,i)}function N(e="",i=!1){return i?(g(),ie(Ne,null,e)):O(Ne,null,e)}function Bn(e){return e==null||typeof e=="boolean"?O(Ne):wt(e)?O(ct,null,e.slice()):co(e)?si(e):O(br,null,String(e))}function si(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Pi(e)}function ir(e,i){let o=0;const{shapeFlag:a}=e;if(i==null)i=null;else if(wt(i))o=16;else if(typeof i=="object")if(a&65){const l=i.default;l&&(l._c&&(l._d=!1),ir(e,l()),l._c&&(l._d=!0));return}else{o=32;const l=i._;!l&&!tc(i)?i._ctx=Re:l===3&&Re&&(Re.slots._===1?i._=1:(i._=2,e.patchFlag|=1024))}else if(Dt(i)){if(a&65){ir(e,{default:i});return}i={default:i,_ctx:Re},o=32}else i=String(i),a&64?(o=16,i=[$(i)]):o=8;e.children=i,e.shapeFlag|=o}function Nf(...e){const i={};for(let o=0;oKe||Re;let sr,pa;{const e=hr(),i=(o,a)=>{let l;return(l=e[o])||(l=e[o]=[]),l.push(a),d=>{l.length>1?l.forEach(h=>h(d)):l[0](d)}};sr=i("__VUE_INSTANCE_SETTERS__",o=>Ke=o),pa=i("__VUE_SSR_SETTERS__",o=>fo=o)}const go=e=>{const i=Ke;return sr(e),e.scope.on(),()=>{e.scope.off(),sr(i)}},bl=()=>{Ke&&Ke.scope.off(),sr(null)};function hc(e){return e.vnode.shapeFlag&4}let fo=!1;function Vf(e,i=!1,o=!1){i&&pa(i);const{props:a,children:l}=e.vnode,d=hc(e);kf(e,a,d,i),Lf(e,l,o||i);const h=d?Zf(e,i):void 0;return i&&pa(!1),h}function Zf(e,i){const o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lf);const{setup:a}=o;if(a){Un();const l=e.setupContext=a.length>1?Hf(e):null,d=go(e),h=mo(a,e,0,[e.props,l]),_=ou(h);if(Hn(),d(),(_||e.sp)&&!xs(e)&&Uu(e),_){if(h.then(bl,bl),i)return h.then(y=>{xl(e,y)}).catch(y=>{mr(y,e,0)});e.asyncDep=h}else xl(e,h)}else pc(e)}function xl(e,i,o){Dt(i)?e.type.__ssrInlineRender?e.ssrRender=i:e.render=i:ne(i)&&(e.setupState=Lu(i)),pc(e)}function pc(e,i,o){const a=e.type;e.render||(e.render=a.render||Zn);{const l=go(e);Un();try{uf(e)}finally{Hn(),l()}}}const Uf={get(e,i){return De(e,"get",""),e[i]}};function Hf(e){const i=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,Uf),slots:e.slots,emit:e.emit,expose:i}}function xr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Lu(Ed(e.exposed)),{get(i,o){if(o in i)return i[o];if(o in io)return io[o](e)},has(i,o){return o in i||o in io}})):e.proxy}function jf(e){return Dt(e)&&"__vccOpts"in e}const xt=(e,i)=>Dd(e,i,fo);function Wf(e,i,o){try{nr(-1);const a=arguments.length;return a===2?ne(i)&&!wt(i)?co(i)?O(e,null,[i]):O(e,i):O(e,null,i):(a>3?o=Array.prototype.slice.call(arguments,2):a===3&&co(o)&&(o=[o]),O(e,i,o))}finally{nr(1)}}const Kf="3.5.39";/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let ma;const wl=typeof window<"u"&&window.trustedTypes;if(wl)try{ma=wl.createPolicy("vue",{createHTML:e=>e})}catch{}const mc=ma?e=>ma.createHTML(e):e=>e,Gf="http://www.w3.org/2000/svg",qf="http://www.w3.org/1998/Math/MathML",ii=typeof document<"u"?document:null,kl=ii&&ii.createElement("template"),Yf={insert:(e,i,o)=>{i.insertBefore(e,o||null)},remove:e=>{const i=e.parentNode;i&&i.removeChild(e)},createElement:(e,i,o,a)=>{const l=i==="svg"?ii.createElementNS(Gf,e):i==="mathml"?ii.createElementNS(qf,e):o?ii.createElement(e,{is:o}):ii.createElement(e);return e==="select"&&a&&a.multiple!=null&&l.setAttribute("multiple",a.multiple),l},createText:e=>ii.createTextNode(e),createComment:e=>ii.createComment(e),setText:(e,i)=>{e.nodeValue=i},setElementText:(e,i)=>{e.textContent=i},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ii.querySelector(e),setScopeId(e,i){e.setAttribute(i,"")},insertStaticContent(e,i,o,a,l,d){const h=o?o.previousSibling:i.lastChild;if(l&&(l===d||l.nextSibling))for(;i.insertBefore(l.cloneNode(!0),o),!(l===d||!(l=l.nextSibling)););else{kl.innerHTML=mc(a==="svg"?`${e}`:a==="mathml"?`${e}`:e);const _=kl.content;if(a==="svg"||a==="mathml"){const y=_.firstChild;for(;y.firstChild;)_.appendChild(y.firstChild);_.removeChild(y)}i.insertBefore(_,o)}return[h?h.nextSibling:i.firstChild,o?o.previousSibling:i.lastChild]}},wi="transition",Ks="animation",ho=Symbol("_vtc"),gc={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},Jf=Oe({},Ru,gc),Xf=e=>(e.displayName="Transition",e.props=Jf,e),Qf=Xf((e,{slots:i})=>Wf(Gd,th(e),i)),Ui=(e,i=[])=>{wt(e)?e.forEach(o=>o(...i)):e&&e(...i)},Sl=e=>e?wt(e)?e.some(i=>i.length>1):e.length>1:!1;function th(e){const i={};for(const nt in e)nt in gc||(i[nt]=e[nt]);if(e.css===!1)return i;const{name:o="v",type:a,duration:l,enterFromClass:d=`${o}-enter-from`,enterActiveClass:h=`${o}-enter-active`,enterToClass:_=`${o}-enter-to`,appearFromClass:y=d,appearActiveClass:T=h,appearToClass:w=_,leaveFromClass:A=`${o}-leave-from`,leaveActiveClass:U=`${o}-leave-active`,leaveToClass:V=`${o}-leave-to`}=e,rt=eh(l),Q=rt&&rt[0],Ot=rt&&rt[1],{onBeforeEnter:Mt,onEnter:q,onEnterCancelled:dt,onLeave:it,onLeaveCancelled:ht,onBeforeAppear:Kt=Mt,onAppear:he=q,onAppearCancelled:pe=dt}=i,St=(nt,ut,zt,Ft)=>{nt._enterCancelled=Ft,Hi(nt,ut?w:_),Hi(nt,ut?T:h),zt&&zt()},Nt=(nt,ut)=>{nt._isLeaving=!1,Hi(nt,A),Hi(nt,V),Hi(nt,U),ut&&ut()},Et=nt=>(ut,zt)=>{const Ft=nt?he:q,lt=()=>St(ut,nt,zt);Ui(Ft,[ut,lt]),Pl(()=>{Hi(ut,nt?y:d),ni(ut,nt?w:_),Sl(Ft)||Tl(ut,a,Q,lt)})};return Oe(i,{onBeforeEnter(nt){Ui(Mt,[nt]),ni(nt,d),ni(nt,h)},onBeforeAppear(nt){Ui(Kt,[nt]),ni(nt,y),ni(nt,T)},onEnter:Et(!1),onAppear:Et(!0),onLeave(nt,ut){nt._isLeaving=!0;const zt=()=>Nt(nt,ut);ni(nt,A),nt._enterCancelled?(ni(nt,U),Ml(nt)):(Ml(nt),ni(nt,U)),Pl(()=>{nt._isLeaving&&(Hi(nt,A),ni(nt,V),Sl(it)||Tl(nt,a,Ot,zt))}),Ui(it,[nt,zt])},onEnterCancelled(nt){St(nt,!1,void 0,!0),Ui(dt,[nt])},onAppearCancelled(nt){St(nt,!0,void 0,!0),Ui(pe,[nt])},onLeaveCancelled(nt){Nt(nt),Ui(ht,[nt])}})}function eh(e){if(e==null)return null;if(ne(e))return[ea(e.enter),ea(e.leave)];{const i=ea(e);return[i,i]}}function ea(e){return id(e)}function ni(e,i){i.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[ho]||(e[ho]=new Set)).add(i)}function Hi(e,i){i.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const o=e[ho];o&&(o.delete(i),o.size||(e[ho]=void 0))}function Pl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let nh=0;function Tl(e,i,o,a){const l=e._endId=++nh,d=()=>{l===e._endId&&a()};if(o!=null)return setTimeout(d,o);const{type:h,timeout:_,propCount:y}=ih(e,i);if(!h)return a();const T=h+"end";let w=0;const A=()=>{e.removeEventListener(T,U),d()},U=V=>{V.target===e&&++w>=y&&A()};setTimeout(()=>{w(o[rt]||"").split(", "),l=a(`${wi}Delay`),d=a(`${wi}Duration`),h=Ll(l,d),_=a(`${Ks}Delay`),y=a(`${Ks}Duration`),T=Ll(_,y);let w=null,A=0,U=0;i===wi?h>0&&(w=wi,A=h,U=d.length):i===Ks?T>0&&(w=Ks,A=T,U=y.length):(A=Math.max(h,T),w=A>0?h>T?wi:Ks:null,U=w?w===wi?d.length:y.length:0);const V=w===wi&&/\b(?:transform|all)(?:,|$)/.test(a(`${wi}Property`).toString());return{type:w,timeout:A,propCount:U,hasTransform:V}}function Ll(e,i){for(;e.lengthCl(o)+Cl(e[a])))}function Cl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ml(e){return(e?e.ownerDocument:document).body.offsetHeight}function sh(e,i,o){const a=e[ho];a&&(i=(i?[i,...a]:[...a]).join(" ")),i==null?e.removeAttribute("class"):o?e.setAttribute("class",i):e.className=i}const or=Symbol("_vod"),_c=Symbol("_vsh"),oh={name:"show",beforeMount(e,{value:i},{transition:o}){e[or]=e.style.display==="none"?"":e.style.display,o&&i?o.beforeEnter(e):Gs(e,i)},mounted(e,{value:i},{transition:o}){o&&i&&o.enter(e)},updated(e,{value:i,oldValue:o},{transition:a}){!i!=!o&&(a?i?(a.beforeEnter(e),Gs(e,!0),a.enter(e)):a.leave(e,()=>{Gs(e,!1)}):Gs(e,i))},beforeUnmount(e,{value:i}){Gs(e,i)}};function Gs(e,i){e.style.display=i?e[or]:"none",e[_c]=!i}const rh=Symbol(""),ah=/(?:^|;)\s*display\s*:/;function lh(e,i,o){const a=e.style,l=be(o);let d=!1;if(o&&!l){if(i)if(be(i))for(const h of i.split(";")){const _=h.slice(0,h.indexOf(":")).trim();o[_]==null&&Ys(a,_,"")}else for(const h in i)o[h]==null&&Ys(a,h,"");for(const h in o){h==="display"&&(d=!0);const _=o[h];_!=null?ch(e,h,!be(i)&&i?i[h]:void 0,_)||Ys(a,h,_):Ys(a,h,"")}}else if(l){if(i!==o){const h=a[rh];h&&(o+=";"+h),a.cssText=o,d=ah.test(o)}}else i&&e.removeAttribute("style");or in e&&(e[or]=d?a.display:"",e[_c]&&(a.display="none"))}const Ol=/\s*!important$/;function Ys(e,i,o){if(wt(o))o.forEach(a=>Ys(e,i,a));else if(o==null&&(o=""),i.startsWith("--"))e.setProperty(i,o);else{const a=uh(e,i);Ol.test(o)?e.setProperty(Li(a),o.replace(Ol,""),"important"):e[a]=o}}const El=["Webkit","Moz","ms"],na={};function uh(e,i){const o=na[i];if(o)return o;let a=Tn(i);if(a!=="filter"&&a in e)return na[i]=a;a=lu(a);for(let l=0;lia||(gh.then(()=>ia=0),ia=Date.now());function vh(e,i){const o=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=o.attached)return;const l=o.value;if(wt(l)){const d=a.stopImmediatePropagation;a.stopImmediatePropagation=()=>{d.call(a),a._stopped=!0};const h=l.slice(),_=[a];for(let y=0;ye.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,yh=(e,i,o,a,l,d)=>{const h=l==="svg";i==="class"?sh(e,a,h):i==="style"?lh(e,o,a):ur(i)?cr(i)||fh(e,i,o,a,d):(i[0]==="."?(i=i.slice(1),!0):i[0]==="^"?(i=i.slice(1),!1):bh(e,i,a,h))?(Il(e,i,a),!e.tagName.includes("-")&&(i==="value"||i==="checked"||i==="selected")&&Al(e,i,a,h,d,i!=="value")):e._isVueCE&&(xh(e,i)||e._def.__asyncLoader&&(/[A-Z]/.test(i)||!be(a)))?Il(e,Tn(i),a,d,i):(i==="true-value"?e._trueValue=a:i==="false-value"&&(e._falseValue=a),Al(e,i,a,h))};function bh(e,i,o,a){if(a)return!!(i==="innerHTML"||i==="textContent"||i in e&&Dl(i)&&Dt(o));if(i==="spellcheck"||i==="draggable"||i==="translate"||i==="autocorrect"||i==="sandbox"&&e.tagName==="IFRAME"||i==="form"||i==="list"&&e.tagName==="INPUT"||i==="type"&&e.tagName==="TEXTAREA")return!1;if(i==="width"||i==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return Dl(i)&&be(o)?!1:i in e}function xh(e,i){const o=e._def.props;if(!o)return!1;const a=Tn(i);return Array.isArray(o)?o.some(l=>Tn(l)===a):Object.keys(o).some(l=>Tn(l)===a)}const Ti=e=>{const i=e.props["onUpdate:modelValue"]||!1;return wt(i)?o=>qo(i,o):i};function wh(e){e.target.composing=!0}function Nl(e){const i=e.target;i.composing&&(i.composing=!1,i.dispatchEvent(new Event("input")))}const gn=Symbol("_assign");function Rl(e,i,o){return i&&(e=e.trim()),o&&(e=fr(e)),e}const vt={created(e,{modifiers:{lazy:i,trim:o,number:a}},l){e[gn]=Ti(l);const d=a||l.props&&l.props.type==="number";ai(e,i?"change":"input",h=>{h.target.composing||e[gn](Rl(e.value,o,d))}),(o||d)&&ai(e,"change",()=>{e.value=Rl(e.value,o,d)}),i||(ai(e,"compositionstart",wh),ai(e,"compositionend",Nl),ai(e,"change",Nl))},mounted(e,{value:i}){e.value=i??""},beforeUpdate(e,{value:i,oldValue:o,modifiers:{lazy:a,trim:l,number:d}},h){if(e[gn]=Ti(h),e.composing)return;const _=(d||e.type==="number")&&!/^0\d/.test(e.value)?fr(e.value):e.value,y=i??"";if(_===y)return;const T=e.getRootNode();(T instanceof Document||T instanceof ShadowRoot)&&T.activeElement===e&&e.type!=="range"&&(a&&i===o||l&&e.value.trim()===y)||(e.value=y)}},rr={deep:!0,created(e,i,o){e[gn]=Ti(o),ai(e,"change",()=>{const a=e._modelValue,l=Ts(e),d=e.checked,h=e[gn];if(wt(a)){const _=wa(a,l),y=_!==-1;if(d&&!y)h(a.concat(l));else if(!d&&y){const T=[...a];T.splice(_,1),h(T)}}else if(Ls(a)){const _=new Set(a);d?_.add(l):_.delete(l),h(_)}else h(vc(e,d))})},mounted:Fl,beforeUpdate(e,i,o){e[gn]=Ti(o),Fl(e,i,o)}};function Fl(e,{value:i,oldValue:o},a){e._modelValue=i;let l;if(wt(i))l=wa(i,a.props.value)>-1;else if(Ls(i))l=i.has(a.props.value);else{if(i===o)return;l=Si(i,vc(e,!0))}e.checked!==l&&(e.checked=l)}const kh={created(e,{value:i},o){e.checked=Si(i,o.props.value),e[gn]=Ti(o),ai(e,"change",()=>{e[gn](Ts(e))})},beforeUpdate(e,{value:i,oldValue:o},a){e[gn]=Ti(a),i!==o&&(e.checked=Si(i,a.props.value))}},sn={deep:!0,created(e,{value:i,modifiers:{number:o}},a){const l=Ls(i);ai(e,"change",()=>{const d=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>o?fr(Ts(h)):Ts(h));e[gn](e.multiple?l?new Set(d):d:d[0]),e._assigning=!0,Mu(()=>{e._assigning=!1})}),e[gn]=Ti(a)},mounted(e,{value:i}){Bl(e,i)},beforeUpdate(e,i,o){e[gn]=Ti(o)},updated(e,{value:i}){e._assigning||Bl(e,i)}};function Bl(e,i){const o=e.multiple,a=wt(i);if(!(o&&!a&&!Ls(i))){for(let l=0,d=e.options.length;lString(T)===String(_)):h.selected=wa(i,_)>-1}else h.selected=i.has(_);else if(Si(Ts(h),i)){e.selectedIndex!==l&&(e.selectedIndex=l);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ts(e){return"_value"in e?e._value:e.value}function vc(e,i){const o=i?"_trueValue":"_falseValue";return o in e?e[o]:i}const Sh={created(e,i,o){Wo(e,i,o,null,"created")},mounted(e,i,o){Wo(e,i,o,null,"mounted")},beforeUpdate(e,i,o,a){Wo(e,i,o,a,"beforeUpdate")},updated(e,i,o,a){Wo(e,i,o,a,"updated")}};function Ph(e,i){switch(e){case"SELECT":return sn;case"TEXTAREA":return vt;default:switch(i){case"checkbox":return rr;case"radio":return kh;default:return vt}}}function Wo(e,i,o,a,l){const h=Ph(e.tagName,o.props&&o.props.type)[l];h&&h(e,i,o,a)}const Th=["ctrl","shift","alt","meta"],Lh={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,i)=>Th.some(o=>e[`${o}Key`]&&!i.includes(o))},yc=(e,i)=>{if(!e)return e;const o=e._withMods||(e._withMods={}),a=i.join(".");return o[a]||(o[a]=((l,...d)=>{for(let h=0;h{const o=e._withKeys||(e._withKeys={}),a=i.join(".");return o[a]||(o[a]=(l=>{if(!("key"in l))return;const d=Li(l.key);if(i.some(h=>h===d||Ch[h]===d))return e(l)}))},Mh=Oe({patchProp:yh},Yf);let Zl;function Oh(){return Zl||(Zl=Mf(Mh))}const Eh=((...e)=>{const i=Oh().createApp(...e),{mount:o}=i;return i.mount=a=>{const l=Ah(a);if(!l)return;const d=i._component;!Dt(d)&&!d.render&&!d.template&&(d.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const h=o(l,!1,zh(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),h},i});function zh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ah(e){return be(e)?document.querySelector(e):e}const bc="pv_theme",Ul={light:"#EEF0F3",dark:"#0B1730"},ar=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;function xc(){return ar&&ar.matches?"dark":"light"}function Ih(){try{return localStorage.getItem(bc)||"light"}catch{return"light"}}function wc(e){return e==="system"?xc():e}function kc(e){const i=document.documentElement;i.setAttribute("data-theme",e),i.style.backgroundColor=Ul[e]||Ul.light}const qi=G(Ih()),ks=G(wc(qi.value));function lr(e){qi.value=e;const i=wc(e);ks.value=i,kc(i);try{localStorage.setItem(bc,e)}catch{}}function Hl(){lr(ks.value==="dark"?"light":"dark")}ar&&ar.addEventListener("change",()=>{if(qi.value==="system"){const e=xc();ks.value=e,kc(e)}});async function $h(){try{const e=await fetch("/bff/config");return e.ok?await e.json():{apiBase:""}}catch{return{apiBase:""}}}async function jl(){try{const e=await fetch("/bff/me");return e.ok?await e.json():null}catch{return null}}async function Dh(e,i,o){const a=await fetch("/bff/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:i,apiBase:o})});return{ok:a.ok,status:a.status,body:await a.json().catch(()=>({}))}}async function Nh(){try{await fetch("/bff/logout",{method:"POST"})}catch{}}async function Rh(){try{const e=await fetch("/bff/devices");return e.ok?await e.json():[]}catch{return[]}}async function Fh(){try{const e=await fetch("/bff/users");return e.ok?{ok:!0,status:200,users:(await e.json()).users||[]}:{ok:!1,status:e.status,users:[]}}catch{return{ok:!1,status:0,users:[]}}}async function Bh(e,i,o,a){const l=await fetch("/bff/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:i,role:o,organization:a})});return{ok:l.ok,status:l.status,body:await l.json().catch(()=>({}))}}async function Vh(e,i){const o=await fetch(`/bff/users/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:o.ok,status:o.status,body:await o.json().catch(()=>({}))}}async function Zh(e){const i=await fetch(`/bff/users/${encodeURIComponent(e)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Uh(){try{const e=await fetch("/bff/orgs");return e.ok?{ok:!0,status:200,organizations:(await e.json()).organizations||[]}:{ok:!1,status:e.status,organizations:[]}}catch{return{ok:!1,status:0,organizations:[]}}}async function Hh(e){const i=await fetch("/bff/orgs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function jh(e,i){const o=await fetch(`/bff/orgs/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i})});return{ok:o.ok,status:o.status,body:await o.json().catch(()=>({}))}}async function Wh(e){const i=await fetch(`/bff/orgs/${encodeURIComponent(e)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Kh(){try{const e=await fetch("/bff/preferences");if(!e.ok)return null;const i=await e.json();return i&&typeof i.preferences=="object"?i.preferences:null}catch{return null}}async function Gh(e){try{return(await fetch("/bff/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:e})})).ok}catch{return!1}}async function qh(){try{const e=await fetch("/bff/integrations/opensky");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Wl(e){const i=await fetch("/bff/integrations/opensky",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Yh(){const e=await fetch("/bff/integrations/opensky/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function Jh(){try{const e=await fetch("/bff/integrations/filetransfer");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Kl(e){const i=await fetch("/bff/integrations/filetransfer",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Xh(){const e=await fetch("/bff/integrations/filetransfer/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function Qh(){try{const e=await fetch("/bff/integrations/localstorage");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Ko(e){const i=await fetch("/bff/integrations/localstorage",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function tp(){const e=await fetch("/bff/integrations/localstorage/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function ep(){try{const e=await fetch("/bff/integrations/webdav");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Gl(e){const i=await fetch("/bff/integrations/webdav",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function np(){const e=await fetch("/bff/integrations/webdav/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function ip(){try{const e=await fetch("/bff/drones");return e.ok?{ok:!0,status:200,drones:(await e.json()).drones||[]}:{ok:!1,status:e.status,drones:[]}}catch{return{ok:!1,status:0,drones:[]}}}async function sp(e){const i=await fetch("/bff/drones",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function op(e,i){const o=await fetch(`/bff/drones/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:o.ok,status:o.status,body:await o.json().catch(()=>({}))}}async function rp(e){const i=await fetch(`/bff/drones/${encodeURIComponent(e)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function ap(){try{const e=await fetch("/bff/flights");return e.ok?{ok:!0,status:200,flights:(await e.json()).flights||[]}:{ok:!1,status:e.status,flights:[]}}catch{return{ok:!1,status:0,flights:[]}}}async function lp(e){const i=await fetch("/bff/flights",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function up(e,i){const o=await fetch(`/bff/flights/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:o.ok,status:o.status,body:await o.json().catch(()=>({}))}}async function cp(e){const i=await fetch(`/bff/flights/${encodeURIComponent(e)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}function dp(){return"/bff/logbook/export"}async function fp(e,i,o){const a=await fetch(`/bff/devices/${encodeURIComponent(e)}/command`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:i,payload:o})});return{ok:a.ok,body:await a.json().catch(()=>({}))}}const Sc="pv_prefs",ga={name:"",username:"",displayName:"",bio:"",avatar:"",showEmail:!1,fontSize:"md",language:"en",region:"US",dateFormat:"MDY",timeFormat:"24",reduceMotion:!1,twoFactor:!1};function hp(){try{return{...ga,...JSON.parse(localStorage.getItem(Sc)||"{}")||{}}}catch{return{...ga}}}const Tt=xe(hp());function Pc(){try{localStorage.setItem(Sc,JSON.stringify(Tt))}catch{}}function Tc(e){if(!e||typeof e!="object")return!1;for(const i of Object.keys(ga))i in e&&(Tt[i]=e[i]);return!0}const pp={sm:15,md:16,lg:18};function Aa(e){document.documentElement.style.fontSize=(pp[e]||16)+"px"}function Ia(e){document.documentElement.classList.toggle("reduce-motion",!!e)}function Lc(e){const i=new Date(e),o=i.getFullYear(),a=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0");let d;switch(Tt.dateFormat){case"DMY":d=`${l}/${a}/${o}`;break;case"YMD":d=`${o}/${a}/${l}`;break;case"ISO":d=`${o}-${a}-${l}`;break;default:d=`${a}/${l}/${o}`}let h;return Tt.timeFormat==="12"?h=i.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}):h=`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}:${String(i.getSeconds()).padStart(2,"0")}`,{date:d,time:h}}function ql(e){return Lc(e).time}function Yl(e){const i=Lc(e);return`${i.date} ${i.time}`}let $a=!1,_a=!1,va=null;function mp(){return{...JSON.parse(JSON.stringify(Tt)),themeMode:qi.value}}function Da(){!$a||_a||(clearTimeout(va),va=setTimeout(()=>{Gh(mp())},600))}function gp(e){_a=!0;try{Tc(e),e.themeMode&&lr(e.themeMode),Aa(Tt.fontSize),Ia(Tt.reduceMotion),Pc()}finally{_a=!1}}async function Jl(){$a=!0;const e=await Kh();e&&Object.keys(e).length?gp(e):Da()}function _p(){$a=!1,clearTimeout(va)}Qe(Tt,()=>{Pc(),Da()},{deep:!0});Qe(qi,Da);Qe(()=>Tt.fontSize,Aa,{immediate:!0});Qe(()=>Tt.reduceMotion,Ia,{immediate:!0});const vp=["width","height"],Cc={__name:"BrandMark",props:{size:{type:[Number,String],default:28}},setup(e){return(i,o)=>(g(),x("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none","aria-hidden":"true"},[...o[0]||(o[0]=[u("g",{"stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},[u("polyline",{points:"8,30 19,17 30,30",stroke:"var(--accent)"}),u("polyline",{points:"18,33 29,20 40,33",stroke:"currentColor"})],-1)])],8,vp))}},yp=["title","aria-label"],bp={key:0,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},xp={key:1,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},wp={__name:"ThemeToggle",setup(e){return(i,o)=>(g(),x("button",{class:"btn-icon",type:"button",title:$t(ks)==="dark"?"Switch to light":"Switch to dark","aria-label":$t(ks)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:o[0]||(o[0]=(...a)=>$t(Hl)&&$t(Hl)(...a))},[$t(ks)==="dark"?(g(),x("svg",bp,[...o[1]||(o[1]=[u("circle",{cx:"12",cy:"12",r:"4"},null,-1),u("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(g(),x("svg",xp,[...o[2]||(o[2]=[u("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z"},null,-1)])]))],8,yp))}},kp={class:"relative grid h-full place-items-center p-5"},Sp={class:"absolute right-5 top-5"},Pp={class:"mb-6 flex items-center gap-3 text-ink"},Tp={class:"relative mb-1"},Lp=["type"],Cp=["aria-label","title"],Mp={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},Op={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},Ep={key:0,class:"mt-4"},zp={key:1,class:"mt-4 rounded border border-line bg-danger-soft px-3 py-2 text-sm text-danger-fg"},Ap=["disabled"],Ip={__name:"LoginView",props:{defaultApiBase:{type:String,default:""}},emits:["signed-in"],setup(e,{emit:i}){const o=e,a=i,l=G(""),d=G(""),h=G(localStorage.getItem("api_url")||o.defaultApiBase||"http://localhost:8080"),_=G(!1),y=G(!1),T=G(!1),w=G("");async function A(){T.value=!0,w.value="",localStorage.setItem("api_url",h.value.trim());const{ok:U,status:V,body:rt}=await Dh(l.value.trim(),d.value,h.value.trim());if(T.value=!1,U){a("signed-in",rt.email);return}w.value=V===400?"Invalid email or password.":V===502?"API server can't reach PocketBase.":rt.message||rt.error||"Cannot reach the API server."}return(U,V)=>(g(),x("div",kp,[u("div",Sp,[O(wp)]),u("form",{class:"panel w-[380px] p-8 shadow-md",onSubmit:yc(A,["prevent"])},[u("div",Pp,[O(Cc,{size:34}),V[5]||(V[5]=u("div",{class:"leading-tight"},[u("div",{class:"text-mode"},"PilotVault"),u("div",{class:"eyebrow mt-0.5"},"Control panel")],-1))]),V[9]||(V[9]=u("label",{class:"eyebrow mb-1.5 block"},"Email",-1)),ot(u("input",{"onUpdate:modelValue":V[0]||(V[0]=rt=>l.value=rt),type:"email",autocomplete:"username",required:"",class:"field mb-4",placeholder:"you@example.com"},null,512),[[vt,l.value]]),V[10]||(V[10]=u("label",{class:"eyebrow mb-1.5 block"},"Password",-1)),u("div",Tp,[ot(u("input",{"onUpdate:modelValue":V[1]||(V[1]=rt=>d.value=rt),type:y.value?"text":"password",autocomplete:"current-password",required:"",class:"field w-full pr-10",placeholder:"••••••••"},null,8,Lp),[[Sh,d.value]]),u("button",{type:"button",class:"absolute inset-y-0 right-0 grid w-10 place-items-center text-ink-muted transition hover:text-ink-secondary","aria-label":y.value?"Hide password":"Show password",title:y.value?"Hide password":"Show password",onClick:V[2]||(V[2]=rt=>y.value=!y.value)},[y.value?(g(),x("svg",Mp,[...V[6]||(V[6]=[u("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"},null,-1),u("line",{x1:"1",y1:"1",x2:"23",y2:"23"},null,-1)])])):(g(),x("svg",Op,[...V[7]||(V[7]=[u("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},null,-1),u("circle",{cx:"12",cy:"12",r:"3"},null,-1)])]))],8,Cp)]),_.value?(g(),x("div",Ep,[V[8]||(V[8]=u("label",{class:"eyebrow mb-1.5 block"},"API Server",-1)),ot(u("input",{"onUpdate:modelValue":V[3]||(V[3]=rt=>h.value=rt),type:"text",class:"field font-mono",placeholder:"10.2.1.101:8080"},null,512),[[vt,h.value]])])):N("",!0),w.value?(g(),x("p",zp,P(w.value),1)):N("",!0),u("button",{type:"submit",class:"btn-accent mt-6 w-full",disabled:T.value},P(T.value?"Signing in…":"Sign in"),9,Ap),u("button",{type:"button",class:"mx-auto mt-3 block text-xs text-ink-muted transition hover:text-ink-secondary",onClick:V[4]||(V[4]=rt=>_.value=!_.value)},P(_.value?"Hide server settings":"Server settings"),1)],32)]))}};function $p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Js={exports:{}};/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */var Dp=Js.exports,Xl;function Np(){return Xl||(Xl=1,(function(e,i){(function(o,a){a(i)})(Dp,(function(o){var a="1.9.4";function l(t){var n,s,r,c;for(s=1,r=arguments.length;s"u"||!L||!L.Mixin)){t=dt(t)?t:[t];for(var n=0;n0?Math.floor(t):Math.ceil(t)};et.prototype={clone:function(){return new et(this.x,this.y)},add:function(t){return this.clone()._add(pt(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(pt(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new et(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new et(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ce(this.x),this.y=ce(this.y),this},distanceTo:function(t){t=pt(t);var n=t.x-this.x,s=t.y-this.y;return Math.sqrt(n*n+s*s)},equals:function(t){return t=pt(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=pt(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+U(this.x)+", "+U(this.y)+")"}};function pt(t,n,s){return t instanceof et?t:dt(t)?new et(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new et(t.x,t.y):new et(t,n,s)}function kt(t,n){if(t)for(var s=n?[t,n]:t,r=0,c=s.length;r=this.min.x&&s.x<=this.max.x&&n.y>=this.min.y&&s.y<=this.max.y},intersects:function(t){t=Yt(t);var n=this.min,s=this.max,r=t.min,c=t.max,p=c.x>=n.x&&r.x<=s.x,S=c.y>=n.y&&r.y<=s.y;return p&&S},overlaps:function(t){t=Yt(t);var n=this.min,s=this.max,r=t.min,c=t.max,p=c.x>n.x&&r.xn.y&&r.y=n.lat&&c.lat<=s.lat&&r.lng>=n.lng&&c.lng<=s.lng},intersects:function(t){t=Jt(t);var n=this._southWest,s=this._northEast,r=t.getSouthWest(),c=t.getNorthEast(),p=c.lat>=n.lat&&r.lat<=s.lat,S=c.lng>=n.lng&&r.lng<=s.lng;return p&&S},overlaps:function(t){t=Jt(t);var n=this._southWest,s=this._northEast,r=t.getSouthWest(),c=t.getNorthEast(),p=c.lat>n.lat&&r.latn.lng&&r.lng1,Sr=(function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",A,n),window.removeEventListener("testPassiveEventSupport",A,n)}catch{}return t})(),Pr=(function(){return!!document.createElement("canvas").getContext})(),Ms=!!(document.createElementNS&&F("svg").createSVGRect),vo=!!Ms&&(function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Tr=!Ms&&(function(){try{var t=document.createElement("div");t.innerHTML='';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}})(),Lr=navigator.platform.indexOf("Mac")===0,Cr=navigator.platform.indexOf("Linux")===0;function Vt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var ft={ie:J,ielt9:D,edge:K,webkit:Z,android:yt,android23:st,androidStock:bt,opera:Rt,chrome:gt,gecko:Ht,safari:le,phantom:me,opera12:ve,win:Te,ie3d:vn,webkit3d:ci,gecko3d:ke,any3d:Ie,mobile:On,mobileWebkit:Be,mobileWebkit3d:Ji,msPointer:Ee,pointer:Ve,touch:wr,touchNative:ye,mobileOpera:_o,mobileGecko:Cs,retina:kr,passiveEvents:Sr,canvas:Pr,svg:Ms,vml:Tr,inlineSvg:vo,mac:Lr,linux:Cr},Xi=ft.msPointer?"MSPointerDown":"pointerdown",ze=ft.msPointer?"MSPointerMove":"pointermove",di=ft.msPointer?"MSPointerUp":"pointerup",Ci=ft.msPointer?"MSPointerCancel":"pointercancel",fi={touchstart:Xi,touchmove:ze,touchend:di,touchcancel:Ci},rn={touchstart:bo,touchmove:Ze,touchend:Ze,touchcancel:Ze},tn={},yo=!1;function Os(t,n,s){return n==="touchstart"&&hi(),rn[n]?(s=rn[n].bind(this,s),t.addEventListener(fi[n],s,!1),s):(console.warn("wrong event specified:",n),A)}function Es(t,n,s){if(!fi[n]){console.warn("wrong event specified:",n);return}t.removeEventListener(fi[n],s,!1)}function Mr(t){tn[t.pointerId]=t}function an(t){tn[t.pointerId]&&(tn[t.pointerId]=t)}function yn(t){delete tn[t.pointerId]}function hi(){yo||(document.addEventListener(Xi,Mr,!0),document.addEventListener(ze,an,!0),document.addEventListener(di,yn,!0),document.addEventListener(Ci,yn,!0),yo=!0)}function Ze(t,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var s in tn)n.touches.push(tn[s]);n.changedTouches=[n],t(n)}}function bo(t,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Le(n),Ze(t,n)}function zs(t){var n={},s,r;for(r in t)s=t[r],n[r]=s&&s.bind?s.bind(t):s;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var Or=200;function Er(t,n){t.addEventListener("dblclick",n);var s=0,r;function c(p){if(p.detail!==1){r=p.detail;return}if(!(p.pointerType==="mouse"||p.sourceCapabilities&&!p.sourceCapabilities.firesTouchEvents)){var S=So(p);if(!(S.some(function(I){return I instanceof HTMLLabelElement&&I.attributes.for})&&!S.some(function(I){return I instanceof HTMLInputElement||I instanceof HTMLSelectElement}))){var z=Date.now();z-s<=Or?(r++,r===2&&n(zs(p))):r=1,s=z}}}return t.addEventListener("click",c),{dblclick:n,simDblclick:c}}function zr(t,n){t.removeEventListener("dblclick",n.dblclick),t.removeEventListener("click",n.simDblclick)}var As=Qi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),pi=Qi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),xo=pi==="webkitTransition"||pi==="OTransition"?pi+"End":"transitionend";function wo(t){return typeof t=="string"?document.getElementById(t):t}function Mi(t,n){var s=t.style[n]||t.currentStyle&&t.currentStyle[n];if((!s||s==="auto")&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);s=r?r[n]:null}return s==="auto"?null:s}function X(t,n,s){var r=document.createElement(t);return r.className=n||"",s&&s.appendChild(r),r}function Qt(t){var n=t.parentNode;n&&n.removeChild(t)}function jn(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ln(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function bn(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function mi(t,n){if(t.classList!==void 0)return t.classList.contains(n);var s=Oi(t);return s.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(s)}function Pt(t,n){if(t.classList!==void 0)for(var s=rt(n),r=0,c=s.length;r0?2*window.devicePixelRatio:1;function To(t){return ft.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Ir:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Kn(t,n){var s=n.relatedTarget;if(!s)return!0;try{for(;s&&s!==t;)s=s.parentNode}catch{return!1}return s!==t}var Lo={__proto__:null,on:It,off:te,stopPropagation:we,disableScrollPropagation:zn,disableClickPropagation:vi,preventDefault:Le,stop:wn,getPropagationPath:So,getMousePosition:Po,getWheelDelta:To,isExternalTarget:Kn,addListener:It,removeListener:te},Ai=At.extend({run:function(t,n,s,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=s||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=En(t),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Et(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,s=this._duration*1e3;nthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,n){this._enforcingBounds=!0;var s=this.getCenter(),r=this._limitCenter(s,this._zoom,Jt(t));return s.equals(r)||this.panTo(r,n),this._enforcingBounds=!1,this},panInside:function(t,n){n=n||{};var s=pt(n.paddingTopLeft||n.padding||[0,0]),r=pt(n.paddingBottomRight||n.padding||[0,0]),c=this.project(this.getCenter()),p=this.project(t),S=this.getPixelBounds(),z=Yt([S.min.add(s),S.max.subtract(r)]),I=z.getSize();if(!z.contains(p)){this._enforcingBounds=!0;var W=p.subtract(z.getCenter()),at=z.extend(p).getSize().subtract(I);c.x+=W.x<0?-at.x:at.x,c.y+=W.y<0?-at.y:at.y,this.panTo(this.unproject(c),n),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},t===!0?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),r=n.divideBy(2).round(),c=s.divideBy(2).round(),p=r.subtract(c);return!p.x&&!p.y?this:(t.animate&&t.pan?this.panBy(p):(t.pan&&this._rawPanBy(p),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(h(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:s}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=l({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=h(this._handleGeolocationResponse,this),s=h(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,s,t):navigator.geolocation.getCurrentPosition(n,s,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var n=t.code,s=t.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+s+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n=t.coords.latitude,s=t.coords.longitude,r=new Bt(n,s),c=r.toBounds(t.coords.accuracy*2),p=this._locateOptions;if(p.setView){var S=this.getBoundsZoom(c);this.setView(r,p.maxZoom?Math.min(S,p.maxZoom):S)}var z={latlng:r,bounds:c,timestamp:t.timestamp};for(var I in t.coords)typeof t.coords[I]=="number"&&(z[I]=t.coords[I]);this.fire("locationfound",z)}},addHandler:function(t,n){if(!n)return this;var s=this[t]=new n(this);return this._handlers.push(s),this.options[t]&&s.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Qt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(nt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)Qt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){var s="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=X("div",s,n||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),n=this.unproject(t.getBottomLeft()),s=this.unproject(t.getTopRight());return new ae(n,s)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,n,s){t=Jt(t),s=pt(s||[0,0]);var r=this.getZoom()||0,c=this.getMinZoom(),p=this.getMaxZoom(),S=t.getNorthWest(),z=t.getSouthEast(),I=this.getSize().subtract(s),W=Yt(this.project(z,r),this.project(S,r)).getSize(),at=ft.any3d?this.options.zoomSnap:1,Lt=I.x/W.x,Ut=I.y/W.y,He=n?Math.max(Lt,Ut):Math.min(Lt,Ut);return r=this.getScaleZoom(He,r),at&&(r=Math.round(r/(at/100))*(at/100),r=n?Math.ceil(r/at)*at:Math.floor(r/at)*at),Math.max(c,Math.min(p,r))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new et(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){var s=this._getTopLeftPoint(t,n);return new kt(s,s.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,n){var s=this.options.crs;return n=n===void 0?this._zoom:n,s.scale(t)/s.scale(n)},getScaleZoom:function(t,n){var s=this.options.crs;n=n===void 0?this._zoom:n;var r=s.zoom(t*s.scale(n));return isNaN(r)?1/0:r},project:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(j(t),n)},unproject:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(pt(t),n)},layerPointToLatLng:function(t){var n=pt(t).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(t){var n=this.project(j(t))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Jt(t))},distance:function(t,n){return this.options.crs.distance(j(t),j(n))},containerPointToLayerPoint:function(t){return pt(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return pt(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var n=this.containerPointToLayerPoint(pt(t));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Po(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var n=this._container=wo(t);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");It(n,"scroll",this._onScroll,this),this._containerId=y(n)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&ft.any3d,Pt(t,"leaflet-container"+(ft.touch?" leaflet-touch":"")+(ft.retina?" leaflet-retina":"")+(ft.ielt9?" leaflet-oldie":"")+(ft.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=Mi(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ge(this._mapPane,new et(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Pt(t.markerPane,"leaflet-zoom-hide"),Pt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n,s){ge(this._mapPane,new et(0,0));var r=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var c=this._zoom!==n;this._moveStart(c,s)._move(t,n)._moveEnd(c),this.fire("viewreset"),r&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,s,r){n===void 0&&(n=this._zoom);var c=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),r?s&&s.pinch&&this.fire("zoom",s):((c||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return nt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ge(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[y(this._container)]=this;var n=t?te:It;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),ft.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){nt(this._resizeRequest),this._resizeRequest=Et(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,n){for(var s=[],r,c=n==="mouseout"||n==="mouseover",p=t.target||t.srcElement,S=!1;p;){if(r=this._targets[y(p)],r&&(n==="click"||n==="preclick")&&this._draggableMoved(r)){S=!0;break}if(r&&r.listens(n,!0)&&(c&&!Kn(p,t)||(s.push(r),c))||p===this._container)break;p=p.parentNode}return!s.length&&!S&&!c&&this.listens(n,!0)&&(s=[this]),s},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var n=t.target||t.srcElement;if(!(!this._loaded||n._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(n))){var s=t.type;s==="mousedown"&&ns(n),this._fireDOMEvent(t,s)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,s){if(t.type==="click"){var r=l({},t);r.type="preclick",this._fireDOMEvent(r,r.type,s)}var c=this._findEventTargets(t,n);if(s){for(var p=[],S=0;S0?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),s=this.getMaxZoom(),r=ft.any3d?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(n,Math.min(s,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){oe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){var s=this._getCenterOffset(t)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(s)?!1:(this.panBy(s,n),!0)},_createAnimProxy:function(){var t=this._proxy=X("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(n){var s=As,r=this._proxy.style[s];Se(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),r===this._proxy.style[s]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Qt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),n=this.getZoom();Se(this._proxy,this.project(t,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,s){if(this._animatingZoom)return!0;if(s=s||{},!this._zoomAnimated||s.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(n),c=this._getCenterOffset(t)._divideBy(1-1/r);return s.animate!==!0&&!this.getSize().contains(c)?!1:(Et(function(){this._moveStart(!0,s.noMoveStart||!1)._animateZoom(t,n,!0)},this),!0)},_animateZoom:function(t,n,s,r){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,Pt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:r}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(h(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&oe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function os(t,n){return new Zt(t,n)}var Ue=zt.extend({options:{position:"topright"},initialize:function(t){Q(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var n=this._container=this.onAdd(t),s=this.getPosition(),r=t._controlCorners[s];return Pt(n,"leaflet-control"),s.indexOf("bottom")!==-1?r.insertBefore(n,r.firstChild):r.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Qt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ii=function(t){return new Ue(t)};Zt.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},n="leaflet-",s=this._controlContainer=X("div",n+"control-container",this._container);function r(c,p){var S=n+c+" "+n+p;t[c+p]=X("div",S,s)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Qt(this._controlCorners[t]);Qt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Co=Ue.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,s,r){return s1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=n&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var n=this._getLayer(y(t.target)),s=n.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;s&&this._map.fire(s,n)},_createRadioElement:function(t,n){var s='",r=document.createElement("div");return r.innerHTML=s,r.firstChild},_addItem:function(t){var n=document.createElement("label"),s=this._map.hasLayer(t.layer),r;t.overlay?(r=document.createElement("input"),r.type="checkbox",r.className="leaflet-control-layers-selector",r.defaultChecked=s):r=this._createRadioElement("leaflet-base-layers_"+y(this),s),this._layerControlInputs.push(r),r.layerId=y(t.layer),It(r,"click",this._onInputClick,this);var c=document.createElement("span");c.innerHTML=" "+t.name;var p=document.createElement("span");n.appendChild(p),p.appendChild(r),p.appendChild(c);var S=t.overlay?this._overlaysList:this._baseLayersList;return S.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,n,s,r=[],c=[];this._handlingClick=!0;for(var p=t.length-1;p>=0;p--)n=t[p],s=this._getLayer(n.layerId).layer,n.checked?r.push(s):n.checked||c.push(s);for(p=0;p=0;c--)n=t[c],s=this._getLayer(n.layerId).layer,n.disabled=s.options.minZoom!==void 0&&rs.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,It(t,"click",Le),this.expand();var n=this;setTimeout(function(){te(t,"click",Le),n._preventClick=!1})}}),$r=function(t,n,s){return new Co(t,n,s)},qe=Ue.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",s=X("div",n+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,n+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,n+"-out",s,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),s},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,n,s,r,c){var p=X("a",s,r);return p.innerHTML=t,p.href="#",p.title=n,p.setAttribute("role","button"),p.setAttribute("aria-label",n),vi(p),It(p,"click",wn),It(p,"click",c,this),It(p,"click",this._refocusOnMap,this),p},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";oe(this._zoomInButton,n),oe(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Pt(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Pt(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});Zt.mergeOptions({zoomControl:!0}),Zt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new qe,this.addControl(this.zoomControl))});var Dr=function(t){return new qe(t)},Mo=Ue.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",s=X("div",n),r=this.options;return this._addScales(r,n+"-line",s),t.on(r.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),s},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,n,s){t.metric&&(this._mScale=X("div",n,s)),t.imperial&&(this._iScale=X("div",n,s))},_update:function(){var t=this._map,n=t.getSize().y/2,s=t.distance(t.containerPointToLatLng([0,n]),t.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(s)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t),s=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,s,n/t)},_updateImperial:function(t){var n=t*3.2808399,s,r,c;n>5280?(s=n/5280,r=this._getRoundNum(s),this._updateScale(this._iScale,r+" mi",r/s)):(c=this._getRoundNum(n),this._updateScale(this._iScale,c+" ft",c/n))},_updateScale:function(t,n,s){t.style.width=Math.round(this.options.maxWidth*s)+"px",t.innerHTML=n},_getRoundNum:function(t){var n=Math.pow(10,(Math.floor(t)+"").length-1),s=t/n;return s=s>=10?10:s>=5?5:s>=3?3:s>=2?2:1,n*s}}),Nr=function(t){return new Mo(t)},rs='',Gn=Ue.extend({options:{position:"bottomright",prefix:''+(ft.inlineSvg?rs+" ":"")+"Leaflet"},initialize:function(t){Q(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=X("div","leaflet-control-attribution"),vi(this._container);for(var n in t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var n in this._attributions)this._attributions[n]&&t.push(n);var s=[];this.options.prefix&&s.push(this.options.prefix),t.length&&s.push(t.join(", ")),this._container.innerHTML=s.join(' ')}}});Zt.mergeOptions({attributionControl:!0}),Zt.addInitHook(function(){this.options.attributionControl&&new Gn().addTo(this)});var as=function(t){return new Gn(t)};Ue.Layers=Co,Ue.Zoom=qe,Ue.Scale=Mo,Ue.Attribution=Gn,Ii.layers=$r,Ii.zoom=Dr,Ii.scale=Nr,Ii.attribution=as;var re=zt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});re.addTo=function(t,n){return t.addHandler(n,this),this};var yi={Events:lt},$i=ft.touch?"touchstart mousedown":"mousedown",Ye=At.extend({options:{clickTolerance:3},initialize:function(t,n,s,r){Q(this,r),this._element=t,this._dragStartTarget=n||t,this._preventOutline=s},enable:function(){this._enabled||(It(this._dragStartTarget,$i,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ye._dragging===this&&this.finishDrag(!0),te(this._dragStartTarget,$i,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!mi(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Ye._dragging===this&&this.finishDrag();return}if(!(Ye._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Ye._dragging=this,this._preventOutline&&ns(this._element),$s(),gi(),!this._moving)){this.fire("down");var n=t.touches?t.touches[0]:t,s=ko(this._element);this._startPoint=new et(n.clientX,n.clientY),this._startPos=En(this._element),this._parentScale=Rs(s);var r=t.type==="mousedown";It(document,r?"mousemove":"touchmove",this._onMove,this),It(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var n=t.touches&&t.touches.length===1?t.touches[0]:t,s=new et(n.clientX,n.clientY)._subtract(this._startPoint);!s.x&&!s.y||Math.abs(s.x)+Math.abs(s.y)p&&(S=z,p=I);p>s&&(n[S]=1,Gt(t,n,s,r,S),Gt(t,n,s,S,c))}function An(t,n){for(var s=[t[0]],r=1,c=0,p=t.length;rn&&(s.push(t[r]),c=r);return cn.max.x&&(s|=2),t.yn.max.y&&(s|=8),s}function Br(t,n){var s=n.x-t.x,r=n.y-t.y;return s*s+r*r}function $n(t,n,s,r){var c=n.x,p=n.y,S=s.x-c,z=s.y-p,I=S*S+z*z,W;return I>0&&(W=((t.x-c)*S+(t.y-p)*z)/I,W>1?(c=s.x,p=s.y):W>0&&(c+=S*W,p+=z*W)),S=t.x-c,z=t.y-p,r?S*S+z*z:new et(c,p)}function Ce(t){return!dt(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Fi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ce(t)}function bi(t,n){var s,r,c,p,S,z,I,W;if(!t||t.length===0)throw new Error("latlngs not passed");Ce(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var at=j([0,0]),Lt=Jt(t),Ut=Lt.getNorthWest().distanceTo(Lt.getSouthWest())*Lt.getNorthEast().distanceTo(Lt.getNorthWest());Ut<1700&&(at=qn(t));var He=t.length,Me=[];for(s=0;sr){I=(p-r)/c,W=[z.x-I*(z.x-S.x),z.y-I*(z.y-S.y)];break}var Je=n.unproject(pt(W));return j([Je.lat+at.lat,Je.lng+at.lng])}var kn={__proto__:null,simplify:Yn,pointToSegmentDistance:Ni,closestPointOnSegment:Rr,clipSegment:ls,_getEdgeIntersection:us,_getBitCode:In,_sqClosestPointOnSegment:$n,isFlat:Ce,_flat:Fi,polylineCenter:bi},Sn={project:function(t){return new et(t.lng,t.lat)},unproject:function(t){return new Bt(t.y,t.x)},bounds:new kt([-180,-90],[180,90])},Bi={R:6378137,R_MINOR:6356752314245179e-9,bounds:new kt([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var n=Math.PI/180,s=this.R,r=t.lat*n,c=this.R_MINOR/s,p=Math.sqrt(1-c*c),S=p*Math.sin(r),z=Math.tan(Math.PI/4-r/2)/Math.pow((1-S)/(1+S),p/2);return r=-s*Math.log(Math.max(z,1e-10)),new et(t.lng*n*s,r)},unproject:function(t){for(var n=180/Math.PI,s=this.R,r=this.R_MINOR/s,c=Math.sqrt(1-r*r),p=Math.exp(-t.y/s),S=Math.PI/2-2*Math.atan(p),z=0,I=.1,W;z<15&&Math.abs(I)>1e-7;z++)W=c*Math.sin(S),W=Math.pow((1-W)/(1+W),c/2),I=Math.PI/2-2*Math.atan(p*W)-S,S+=I;return new Bt(S*n,t.x*n/s)}},Eo={__proto__:null,LonLat:Sn,Mercator:Bi,SphericalMercator:se},Vr=l({},E,{code:"EPSG:3395",projection:Bi,transformation:(function(){var t=.5/(Math.PI*Bi.R);return v(t,.5,-t,.5)})()}),Bs=l({},E,{code:"EPSG:4326",projection:Sn,transformation:v(1/180,1,-1/180,.5)}),zo=l({},C,{projection:Sn,transformation:v(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,n){var s=n.lng-t.lng,r=n.lat-t.lat;return Math.sqrt(s*s+r*r)},infinite:!0});C.Earth=E,C.EPSG3395=Vr,C.EPSG3857=m,C.EPSG900913=M,C.EPSG4326=Bs,C.Simple=zo;var en=At.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[y(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[y(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n=t.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var s=this.getEvents();n.on(s,this),this.once("remove",function(){n.off(s,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});Zt.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var n=y(t);return this._layers[n]?this:(this._layers[n]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var n=y(t);return this._layers[n]?(this._loaded&&t.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return y(t)in this._layers},eachLayer:function(t,n){for(var s in this._layers)t.call(n,this._layers[s]);return this},_addLayers:function(t){t=t?dt(t)?t:[t]:[];for(var n=0,s=t.length;nthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&n[0]instanceof Bt&&n[0].equals(n[s-1])&&n.pop(),n},_setLatLngs:function(t){Xn.prototype._setLatLngs.call(this,t),Ce(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Ce(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,n=this.options.weight,s=new et(n,n);if(t=new kt(t.min.subtract(s),t.max.add(s)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var r=0,c=this._rings.length,p;rt.y!=c.y>t.y&&t.x<(c.x-r.x)*(t.y-r.y)/(c.y-r.y)+r.x&&(n=!n);return n||Xn.prototype._containsPoint.call(this,t,!0)}});function Ec(t,n){return new fs(t,n)}var Qn=Pn.extend({initialize:function(t,n){Q(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n=dt(t)?t:t.features,s,r,c;if(n){for(s=0,r=n.length;s0&&c.push(c[0].slice()),c}function hs(t,n){return t.feature?l({},t.feature,{geometry:n}):No(n)}function No(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Hr={toGeoJSON:function(t){return hs(this,{type:"Point",coordinates:Ur(this.getLatLng(),t)})}};ds.include(Hr),qt.include(Hr),H.include(Hr),Xn.include({toGeoJSON:function(t){var n=!Ce(this._latlngs),s=Do(this._latlngs,n?1:0,!1,t);return hs(this,{type:(n?"Multi":"")+"LineString",coordinates:s})}}),fs.include({toGeoJSON:function(t){var n=!Ce(this._latlngs),s=n&&!Ce(this._latlngs[0]),r=Do(this._latlngs,s?2:n?1:0,!0,t);return n||(r=[r]),hs(this,{type:(s?"Multi":"")+"Polygon",coordinates:r})}}),xi.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(s){n.push(s.toGeoJSON(t).geometry.coordinates)}),hs(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(t);var s=n==="GeometryCollection",r=[];return this.eachLayer(function(c){if(c.toGeoJSON){var p=c.toGeoJSON(t);if(s)r.push(p.geometry);else{var S=No(p);S.type==="FeatureCollection"?r.push.apply(r,S.features):r.push(S)}}}),s?hs(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});function Ra(t,n){return new Qn(t,n)}var zc=Ra,Ro=en.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,s){this._url=t,this._bounds=Jt(n),Q(this,s)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Pt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Qt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ln(this._image),this},bringToBack:function(){return this._map&&bn(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Jt(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",n=this._image=t?this._url:X("img");if(Pt(n,"leaflet-image-layer"),this._zoomAnimated&&Pt(n,"leaflet-zoom-animated"),this.options.className&&Pt(n,this.options.className),n.onselectstart=A,n.onmousemove=A,n.onload=h(this.fire,this,"load"),n.onerror=h(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),s=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Se(this._image,s,n)},_reset:function(){var t=this._image,n=new kt(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),s=n.getSize();ge(t,n.min),t.style.width=s.x+"px",t.style.height=s.y+"px"},_updateOpacity:function(){$e(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ac=function(t,n,s){return new Ro(t,n,s)},Fa=Ro.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",n=this._image=t?this._url:X("video");if(Pt(n,"leaflet-image-layer"),this._zoomAnimated&&Pt(n,"leaflet-zoom-animated"),this.options.className&&Pt(n,this.options.className),n.onselectstart=A,n.onmousemove=A,n.onloadeddata=h(this.fire,this,"load"),t){for(var s=n.getElementsByTagName("source"),r=[],c=0;c0?r:[n.src];return}dt(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var p=0;pc?(n.height=c+"px",Pt(t,p)):oe(t,p),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),s=this._getAnchor();ge(this._container,n.add(s))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,n=parseInt(Mi(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+n,r=this._containerWidth,c=new et(this._containerLeft,-s-this._containerBottom);c._add(En(this._container));var p=t.layerPointToContainerPoint(c),S=pt(this.options.autoPanPadding),z=pt(this.options.autoPanPaddingTopLeft||S),I=pt(this.options.autoPanPaddingBottomRight||S),W=t.getSize(),at=0,Lt=0;p.x+r+I.x>W.x&&(at=p.x+r-W.x+I.x),p.x-at-z.x<0&&(at=p.x-z.x),p.y+s+I.y>W.y&&(Lt=p.y+s-W.y+I.y),p.y-Lt-z.y<0&&(Lt=p.y-z.y),(at||Lt)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([at,Lt]))}},_getAnchor:function(){return pt(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Dc=function(t,n){return new Fo(t,n)};Zt.mergeOptions({closePopupOnClick:!0}),Zt.include({openPopup:function(t,n,s){return this._initOverlay(Fo,t,n,s).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),en.include({bindPopup:function(t,n){return this._popup=this._initOverlay(Fo,this._popup,t,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Pn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){wn(t);var n=t.layer||t.target;if(this._popup._source===n&&!(n instanceof f)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=n,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Bo=Dn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Dn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Dn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Dn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",n=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=X("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+y(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n,s,r=this._map,c=this._container,p=r.latLngToContainerPoint(r.getCenter()),S=r.layerPointToContainerPoint(t),z=this.options.direction,I=c.offsetWidth,W=c.offsetHeight,at=pt(this.options.offset),Lt=this._getAnchor();z==="top"?(n=I/2,s=W):z==="bottom"?(n=I/2,s=0):z==="center"?(n=I/2,s=W/2):z==="right"?(n=0,s=W/2):z==="left"?(n=I,s=W/2):S.xthis.options.maxZoom||sr?this._retainParent(c,p,S,r):!1)},_retainChildren:function(t,n,s,r){for(var c=2*t;c<2*t+2;c++)for(var p=2*n;p<2*n+2;p++){var S=new et(c,p);S.z=s+1;var z=this._tileCoordsToKey(S),I=this._tiles[z];if(I&&I.active){I.retain=!0;continue}else I&&I.loaded&&(I.retain=!0);s+1this.options.maxZoom||this.options.minZoom!==void 0&&c1){this._setView(t,s);return}for(var Lt=c.min.y;Lt<=c.max.y;Lt++)for(var Ut=c.min.x;Ut<=c.max.x;Ut++){var He=new et(Ut,Lt);if(He.z=this._tileZoom,!!this._isValidTile(He)){var Me=this._tiles[this._tileCoordsToKey(He)];Me?Me.current=!0:S.push(He)}}if(S.sort(function(Je,ms){return Je.distanceTo(p)-ms.distanceTo(p)}),S.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var dn=document.createDocumentFragment();for(Ut=0;Uts.max.x)||!n.wrapLat&&(t.ys.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return Jt(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,s=this.getTileSize(),r=t.scaleBy(s),c=r.add(s),p=n.unproject(r,t.z),S=n.unproject(c,t.z);return[p,S]},_tileCoordsToBounds:function(t){var n=this._tileCoordsToNwSe(t),s=new ae(n[0],n[1]);return this.options.noWrap||(s=this._map.wrapLatLngBounds(s)),s},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var n=t.split(":"),s=new et(+n[0],+n[1]);return s.z=+n[2],s},_removeTile:function(t){var n=this._tiles[t];n&&(Qt(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Pt(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=A,t.onmousemove=A,ft.ielt9&&this.options.opacity<1&&$e(t,this.options.opacity)},_addTile:function(t,n){var s=this._getTilePos(t),r=this._tileCoordsToKey(t),c=this.createTile(this._wrapCoords(t),h(this._tileReady,this,t));this._initTile(c),this.createTile.length<2&&Et(h(this._tileReady,this,t,null,c)),ge(c,s),this._tiles[r]={el:c,coords:t,current:!0},n.appendChild(c),this.fire("tileloadstart",{tile:c,coords:t})},_tileReady:function(t,n,s){n&&this.fire("tileerror",{error:n,tile:s,coords:t});var r=this._tileCoordsToKey(t);s=this._tiles[r],s&&(s.loaded=+new Date,this._map._fadeAnimated?($e(s.el,0),nt(this._fadeFrame),this._fadeFrame=Et(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),n||(Pt(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ft.ielt9||!this._map._fadeAnimated?Et(this._pruneTiles,this):setTimeout(h(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new et(this._wrapX?w(t.x,this._wrapX):t.x,this._wrapY?w(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new kt(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Fc(t){return new Zs(t)}var ps=Zs.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,n){this._url=t,n=Q(this,n),n.detectRetina&&ft.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,n){return this._url===t&&n===void 0&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var s=document.createElement("img");return It(s,"load",h(this._tileOnLoad,this,n,s)),It(s,"error",h(this._tileOnError,this,n,s)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(s.referrerPolicy=this.options.referrerPolicy),s.alt="",s.src=this.getTileUrl(t),s},getTileUrl:function(t){var n={r:ft.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var s=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=s),n["-y"]=s}return q(this._url,l(n,this.options))},_tileOnLoad:function(t,n){ft.ielt9?setTimeout(h(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,s){var r=this.options.errorTileUrl;r&&n.getAttribute("src")!==r&&(n.src=r),t(s,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom,s=this.options.zoomReverse,r=this.options.zoomOffset;return s&&(t=n-t),t+r},_getSubdomain:function(t){var n=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var t,n;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=A,n.onerror=A,!n.complete)){n.src=ht;var s=this._tiles[t].coords;Qt(n),delete this._tiles[t],this.fire("tileabort",{tile:n,coords:s})}},_removeTile:function(t){var n=this._tiles[t];if(n)return n.el.setAttribute("src",ht),Zs.prototype._removeTile.call(this,t)},_tileReady:function(t,n,s){if(!(!this._map||s&&s.getAttribute("src")===ht))return Zs.prototype._tileReady.call(this,t,n,s)}});function Za(t,n){return new ps(t,n)}var Ua=ps.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var s=l({},this.defaultWmsParams);for(var r in n)r in this.options||(s[r]=n[r]);n=Q(this,n);var c=n.detectRetina&&ft.retina?2:1,p=this.getTileSize();s.width=p.x*c,s.height=p.y*c,this.wmsParams=s},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,ps.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),s=this._crs,r=Yt(s.project(n[0]),s.project(n[1])),c=r.min,p=r.max,S=(this._wmsVersion>=1.3&&this._crs===Bs?[c.y,c.x,p.y,p.x]:[c.x,c.y,p.x,p.y]).join(","),z=ps.prototype.getTileUrl.call(this,t);return z+Ot(this.wmsParams,z,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+S},setParams:function(t,n){return l(this.wmsParams,t),n||this.redraw(),this}});function Bc(t,n){return new Ua(t,n)}ps.WMS=Ua,Za.wms=Bc;var ti=en.extend({options:{padding:.1},initialize:function(t){Q(this,t),y(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Pt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,n){var s=this._map.getZoomScale(n,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),c=this._map.project(this._center,n),p=r.multiplyBy(-s).add(c).subtract(this._map._getNewPixelOrigin(t,n));ft.any3d?Se(this._container,p,s):ge(this._container,p)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,n=this._map.getSize(),s=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new kt(s,s.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ha=ti.extend({options:{tolerance:0},getEvents:function(){var t=ti.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ti.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");It(t,"mousemove",this._onMouseMove,this),It(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),It(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){nt(this._redrawRequest),delete this._ctx,Qt(this._container),te(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var n in this._layers)t=this._layers[n],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ti.prototype._update.call(this);var t=this._bounds,n=this._container,s=t.getSize(),r=ft.retina?2:1;ge(n,t.min),n.width=r*s.x,n.height=r*s.y,n.style.width=s.x+"px",n.style.height=s.y+"px",ft.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ti.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[y(t)]=t;var n=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var n=t._order,s=n.next,r=n.prev;s?s.prev=r:this._drawLast=r,r?r.next=s:this._drawFirst=s,delete t._order,delete this._layers[y(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var n=t.options.dashArray.split(/[, ]+/),s=[],r,c;for(c=0;c')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Vc={_initContainer:function(){this._container=X("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ti.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=Us("shape");Pt(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=Us("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[y(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;Qt(n),t.removeInteractiveTarget(n),delete this._layers[y(t)]},_updateStyle:function(t){var n=t._stroke,s=t._fill,r=t.options,c=t._container;c.stroked=!!r.stroke,c.filled=!!r.fill,r.stroke?(n||(n=t._stroke=Us("stroke")),c.appendChild(n),n.weight=r.weight+"px",n.color=r.color,n.opacity=r.opacity,r.dashArray?n.dashStyle=dt(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=r.lineCap.replace("butt","flat"),n.joinstyle=r.lineJoin):n&&(c.removeChild(n),t._stroke=null),r.fill?(s||(s=t._fill=Us("fill")),c.appendChild(s),s.color=r.fillColor||r.color,s.opacity=r.fillOpacity):s&&(c.removeChild(s),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),s=Math.round(t._radius),r=Math.round(t._radiusY||s);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+s+","+r+" 0,"+65535*360)},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){ln(t._container)},_bringToBack:function(t){bn(t._container)}},Vo=ft.vml?Us:F,Hs=ti.extend({_initContainer:function(){this._container=Vo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Vo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Qt(this._container),te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ti.prototype._update.call(this);var t=this._bounds,n=t.getSize(),s=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,s.setAttribute("width",n.x),s.setAttribute("height",n.y)),ge(s,t.min),s.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(t){var n=t._path=Vo("path");t.options.className&&Pt(n,t.options.className),t.options.interactive&&Pt(n,"leaflet-interactive"),this._updateStyle(t),this._layers[y(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Qt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[y(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var n=t._path,s=t.options;n&&(s.stroke?(n.setAttribute("stroke",s.color),n.setAttribute("stroke-opacity",s.opacity),n.setAttribute("stroke-width",s.weight),n.setAttribute("stroke-linecap",s.lineCap),n.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?n.setAttribute("stroke-dasharray",s.dashArray):n.removeAttribute("stroke-dasharray"),s.dashOffset?n.setAttribute("stroke-dashoffset",s.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),s.fill?(n.setAttribute("fill",s.fillColor||s.color),n.setAttribute("fill-opacity",s.fillOpacity),n.setAttribute("fill-rule",s.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,R(t._parts,n))},_updateCircle:function(t){var n=t._point,s=Math.max(Math.round(t._radius),1),r=Math.max(Math.round(t._radiusY),1)||s,c="a"+s+","+r+" 0 1,0 ",p=t._empty()?"M0 0":"M"+(n.x-s)+","+n.y+c+s*2+",0 "+c+-s*2+",0 ";this._setPath(t,p)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){ln(t._path)},_bringToBack:function(t){bn(t._path)}});ft.vml&&Hs.include(Vc);function Wa(t){return ft.svg||ft.vml?new Hs(t):null}Zt.include({getRenderer:function(t){var n=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var n=this._paneRenderers[t];return n===void 0&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n},_createRenderer:function(t){return this.options.preferCanvas&&ja(t)||Wa(t)}});var Ka=fs.extend({initialize:function(t,n){fs.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=Jt(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Zc(t,n){return new Ka(t,n)}Hs.create=Vo,Hs.pointsToPath=R,Qn.geometryToLayer=Io,Qn.coordsToLatLng=Zr,Qn.coordsToLatLngs=$o,Qn.latLngToCoords=Ur,Qn.latLngsToCoords=Do,Qn.getFeature=hs,Qn.asFeature=No,Zt.mergeOptions({boxZoom:!0});var Ga=re.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){It(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Qt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),gi(),$s(),this._startPoint=this._map.mouseEventToContainerPoint(t),It(document,{contextmenu:wn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=X("div","leaflet-zoom-box",this._container),Pt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var n=new kt(this._point,this._startPoint),s=n.getSize();ge(this._box,n.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(Qt(this._box),oe(this._container,"leaflet-crosshair")),Ei(),Ds(),te(document,{contextmenu:wn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(h(this._resetState,this),0);var n=new ae(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Zt.addInitHook("addHandler","boxZoom",Ga),Zt.mergeOptions({doubleClickZoom:!0});var qa=re.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,s=n.getZoom(),r=n.options.zoomDelta,c=t.originalEvent.shiftKey?s-r:s+r;n.options.doubleClickZoom==="center"?n.setZoom(c):n.setZoomAround(t.containerPoint,c)}});Zt.addInitHook("addHandler","doubleClickZoom",qa),Zt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ya=re.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ye(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}Pt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){oe(this._map._container,"leaflet-grab"),oe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=Jt(this._map.options.maxBounds);this._offsetLimit=Yt(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var n=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(s),this._times.push(n),this._prunePositions(n)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;t.xn.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,n=Math.round(t/2),s=this._initialWorldOffset,r=this._draggable._newPos.x,c=(r-n+s)%t+n-s,p=(r+n+s)%t-n-s,S=Math.abs(c+s)0?p:-p))-n;this._delta=0,this._startTime=null,S&&(t.options.scrollWheelZoom==="center"?t.setZoom(n+S):t.setZoomAround(this._lastMousePos,n+S))}});Zt.addInitHook("addHandler","scrollWheelZoom",Xa);var Uc=600;Zt.mergeOptions({tapHold:ft.touchNative&&ft.safari&&ft.mobile,tapTolerance:15});var Qa=re.extend({addHooks:function(){It(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){te(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var n=t.touches[0];this._startPos=this._newPos=new et(n.clientX,n.clientY),this._holdTimeout=setTimeout(h(function(){this._cancel(),this._isTapValid()&&(It(document,"touchend",Le),It(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),Uc),It(document,"touchend touchcancel contextmenu",this._cancel,this),It(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){te(document,"touchend",Le),te(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),te(document,"touchend touchcancel contextmenu",this._cancel,this),te(document,"touchmove",this._onMove,this)},_onMove:function(t){var n=t.touches[0];this._newPos=new et(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,n){var s=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});s._simulated=!0,n.target.dispatchEvent(s)}});Zt.addInitHook("addHandler","tapHold",Qa),Zt.mergeOptions({touchZoom:ft.touch,bounceAtZoomLimits:!0});var tl=re.extend({addHooks:function(){Pt(this._map._container,"leaflet-touch-zoom"),It(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){oe(this._map._container,"leaflet-touch-zoom"),te(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n=this._map;if(!(!t.touches||t.touches.length!==2||n._animatingZoom||this._zooming)){var s=n.mouseEventToContainerPoint(t.touches[0]),r=n.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(s.add(r)._divideBy(2))),this._startDist=s.distanceTo(r),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),It(document,"touchmove",this._onTouchMove,this),It(document,"touchend touchcancel",this._onTouchEnd,this),Le(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var n=this._map,s=n.mouseEventToContainerPoint(t.touches[0]),r=n.mouseEventToContainerPoint(t.touches[1]),c=s.distanceTo(r)/this._startDist;if(this._zoom=n.getScaleZoom(c,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&c>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,c===1)return}else{var p=s._add(r)._divideBy(2)._subtract(this._centerPoint);if(c===1&&p.x===0&&p.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(p),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),nt(this._animRequest);var S=h(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Et(S,this,!0),Le(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,nt(this._animRequest),te(document,"touchmove",this._onTouchMove,this),te(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Zt.addInitHook("addHandler","touchZoom",tl),Zt.BoxZoom=Ga,Zt.DoubleClickZoom=qa,Zt.Drag=Ya,Zt.Keyboard=Ja,Zt.ScrollWheelZoom=Xa,Zt.TapHold=Qa,Zt.TouchZoom=tl,o.Bounds=kt,o.Browser=ft,o.CRS=C,o.Canvas=Ha,o.Circle=qt,o.CircleMarker=H,o.Class=zt,o.Control=Ue,o.DivIcon=Va,o.DivOverlay=Dn,o.DomEvent=Lo,o.DomUtil=Ar,o.Draggable=Ye,o.Evented=At,o.FeatureGroup=Pn,o.GeoJSON=Qn,o.GridLayer=Zs,o.Handler=re,o.Icon=cn,o.ImageOverlay=Ro,o.LatLng=Bt,o.LatLngBounds=ae,o.Layer=en,o.LayerGroup=xi,o.LineUtil=kn,o.Map=Zt,o.Marker=ds,o.Mixin=yi,o.Path=f,o.Point=et,o.PolyUtil=Oo,o.Polygon=fs,o.Polyline=Xn,o.Popup=Fo,o.PosAnimation=Ai,o.Projection=Eo,o.Rectangle=Ka,o.Renderer=ti,o.SVG=Hs,o.SVGOverlay=Ba,o.TileLayer=ps,o.Tooltip=Bo,o.Transformation=Ge,o.Util=ut,o.VideoOverlay=Fa,o.bind=h,o.bounds=Yt,o.canvas=ja,o.circle=Mc,o.circleMarker=k,o.control=Ii,o.divIcon=Rc,o.extend=l,o.featureGroup=de,o.geoJSON=Ra,o.geoJson=zc,o.gridLayer=Fc,o.icon=Vs,o.imageOverlay=Ac,o.latLng=j,o.latLngBounds=Jt,o.layerGroup=cs,o.map=os,o.marker=b,o.point=pt,o.polygon=Ec,o.polyline=Oc,o.popup=Dc,o.rectangle=Zc,o.setOptions=Q,o.stamp=y,o.svg=Wa,o.svgOverlay=$c,o.tileLayer=Za,o.tooltip=Nc,o.transformation=v,o.version=a,o.videoOverlay=Ic;var Hc=window.L;o.noConflict=function(){return window.L=Hc,this},window.L=o}))})(Js,Js.exports)),Js.exports}var Rp=Np();const Go=$p(Rp),Ql={__name:"DeviceMap",props:{position:{type:Object,default:null},trail:{type:Array,default:()=>[]}},setup(e){const i=e,o=G(null);let a,l,d;function h(){if(!a)return;const _=i.position;if(_&&(_.lat||_.lng)){const y=[_.lat,_.lng];l?l.setLatLng(y):(l=Go.marker(y).addTo(a),a.setView(y,17))}if(d&&d.remove(),i.trail.length){const y=getComputedStyle(document.documentElement).getPropertyValue("--accent").trim()||"#3D7BF0";d=Go.polyline(i.trail,{color:y,weight:3}).addTo(a)}}return Yi(()=>{a=Go.map(o.value,{zoomControl:!0}).setView([20,0],2),Go.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap",maxZoom:19}).addTo(a),setTimeout(()=>a.invalidateSize(),60),h()}),Qe(()=>i.position,h,{deep:!0}),Qe(()=>i.trail,h,{deep:!0}),(_,y)=>(g(),x("div",{ref_key:"el",ref:o,class:"h-[320px] w-full rounded-lg"},null,512))}},Fp=["width","height","stroke-width"],Bp=["d"],Y={__name:"Icon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},stroke:{type:[Number,String],default:2}},setup(e){const a=({grid:"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z",radio:"M4.9 19.1a10 10 0 0 1 0-14.2M7.8 16.2a6 6 0 0 1 0-8.4M16.2 7.8a6 6 0 0 1 0 8.4M19.1 4.9a10 10 0 0 1 0 14.2M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2z",route:"M6 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 13V9a4 4 0 0 1 4-4h4",calendar:"M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",book:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z",fileText:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M16 13H8M16 17H8M10 9H8",settings:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z",search:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM21 21l-4.3-4.3",plus:"M12 5v14M5 12h14",battery:"M3 8h14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zM22 11v2",signal:"M2 20h.01M7 20v-4M12 20v-8M17 20V8M22 20V4",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2",chevronRight:"M9 6l6 6-6 6",play:"M6 3l14 9-14 9V3z",logout:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9",wind:"M12.8 19.6A2 2 0 1 0 14 16H2M17.5 8a2.5 2.5 0 1 1 2 4H2M9.6 4.6A2 2 0 1 1 11 8H2",drone:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM6 6 4 4M18 6l2-2M6 18l-2 2M18 18l2 2",user:"M20 21a8 8 0 1 0-16 0M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z",users:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75",shield:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",sliders:"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6",alertTriangle:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM12 9v4M12 17h.01",download:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3",upload:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12",trash:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6",check:"M20 6 9 17l-5-5",mail:"M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM22 6l-10 7L2 6",lock:"M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM7 11V7a5 5 0 0 1 10 0v4",monitor:"M3 4h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8 21h8M12 17v4",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM3 12h18M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18z",smartphone:"M7 2h10a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM11 18h2",image:"M4 4h16a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM21 15l-5-5L5 21",type:"M4 7V4h16v3M9 20h6M12 4v16",sun:"M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10zM12 1v2M12 21v2M4.2 4.2l1.4 1.4M18.4 18.4l1.4 1.4M1 12h2M21 12h2M4.2 19.8l1.4-1.4M18.4 5.6l1.4-1.4",moon:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z",x:"M18 6 6 18M6 6l12 12",server:"M20 4H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM20 13H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2zM6 7.5h.01M6 16.5h.01",cloud:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9z"}[e.name]||"").split(" M").map((l,d)=>d?"M"+l:l);return(l,d)=>(g(),x("svg",{width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":e.stroke,"stroke-linecap":"round","stroke-linejoin":"round",style:{flex:"none"},"aria-hidden":"true"},[(g(!0),x(ct,null,Wt($t(a),(h,_)=>(g(),x("path",{key:_,d:h},null,8,Bp))),128))],8,Fp))}},Vp=["aria-checked","disabled"],nn={__name:"Toggle",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:i}){const o=i;return(a,l)=>(g(),x("button",{type:"button",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,class:Ct(["relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition disabled:opacity-40",e.modelValue?"bg-accent":"bg-surface-2 border border-line-strong"]),onClick:l[0]||(l[0]=d=>o("update:modelValue",!e.modelValue))},[u("span",{class:Ct(["inline-block h-4 w-4 transform rounded-full bg-white shadow-sm transition",e.modelValue?"translate-x-6":"translate-x-1"])},null,2)],10,Vp))}},Zp={class:"inline-flex rounded-[10px] border border-line bg-surface-2 p-0.5"},Up=["onClick"],hn={__name:"Segmented",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:i}){const o=i;return(a,l)=>(g(),x("div",Zp,[(g(!0),x(ct,null,Wt(e.options,d=>(g(),x("button",{key:d.value,type:"button",class:Ct(["inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-[13px] font-semibold transition",e.modelValue===d.value?"bg-surface-1 text-ink shadow-xs":"text-ink-secondary hover:text-ink"]),onClick:h=>o("update:modelValue",d.value)},[d.icon?(g(),ie(Y,{key:0,name:d.icon,size:15},null,8,["name"])):N("",!0),$(" "+P(d.label),1)],10,Up))),128))]))}},Hp={class:"text-sm font-semibold text-ink"},jp={key:0,class:"mt-0.5 text-xs text-ink-muted"},_t={__name:"Row",props:{title:{type:String,default:""},desc:{type:String,default:""},keywords:{type:String,default:""},block:{type:Boolean,default:!1}},setup(e){const i=e,o=eo("settingsSearch",{value:""}),a=xt(()=>{const l=(o.value||"").trim().toLowerCase();return l?`${i.title} ${i.desc} ${i.keywords}`.toLowerCase().includes(l):!0});return(l,d)=>a.value?(g(),x("div",{key:0,class:Ct(["border-b border-line py-4 last:border-0",e.block?"":"flex items-center justify-between gap-6"])},[u("div",{class:Ct(e.block?"mb-3":"min-w-0")},[u("div",Hp,P(e.title),1),e.desc?(g(),x("div",jp,P(e.desc),1)):N("",!0)],2),u("div",{class:Ct(e.block?"":"shrink-0")},[af(l.$slots,"default")],2)],2)):N("",!0)}},Wp=(e,i)=>{const o=e.__vccOpts||e;for(const[a,l]of i)o[a]=l;return o},Kp={class:"mx-auto max-w-[1280px] p-7"},Gp={class:"mb-5 flex flex-wrap items-end justify-between gap-4"},qp={class:"flex h-10 w-full max-w-[280px] items-center gap-2 rounded border border-line-strong bg-surface-1 px-3"},Yp={class:"grid grid-cols-[210px_1fr] gap-6 max-[760px]:grid-cols-1"},Jp={class:"flex flex-col gap-0.5 max-[760px]:flex-row max-[760px]:overflow-x-auto"},Xp=["onClick"],Qp={class:"whitespace-nowrap"},tm={class:"min-w-0"},em={key:0,class:"panel p-10 text-center text-sm text-ink-muted"},nm={key:0,class:"eyebrow mb-2 mt-5 first:mt-0 flex items-center gap-2"},im={key:1,class:"panel mb-5 p-5"},sm={class:"flex items-center gap-1"},om={class:"flex items-center gap-2"},rm={class:"font-mono text-sm text-ink"},am={class:"inline-flex items-center gap-1 rounded-full bg-amber-soft px-2 py-0.5 text-[11px] font-semibold text-amber-fg"},lm={key:0,class:"mt-2 text-xs text-ink-muted"},um={class:"grid max-w-[420px] gap-2"},cm={class:"flex items-center gap-3"},dm={key:2,class:"panel mb-5 p-5"},fm=["value"],hm=["value"],pm=["value"],mm={class:"font-mono text-sm text-ink"},gm={key:3},_m={key:0,class:"mb-5 flex items-center gap-1 overflow-x-auto border-b border-line"},vm=["onClick"],ym={key:1,class:"panel mb-5 p-5"},bm={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},xm={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},wm={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},km={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Sm={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Pm={key:0},Tm={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},Lm={class:"font-semibold text-ink-secondary"},Cm={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Mm={key:7,class:"my-4 rounded-lg border border-line bg-surface-2 p-4","data-keywords":"credits usage quota remaining daily allowance rate limit"},Om={class:"flex items-center justify-between gap-3"},Em={class:"flex items-center gap-2 text-sm font-semibold text-ink"},zm={key:0,class:"text-[11px] text-ink-muted"},Am={class:"mt-2 flex items-baseline gap-1.5"},Im={class:"font-mono text-2xl font-semibold text-ink"},$m={class:"text-sm text-ink-muted"},Dm={class:"mt-2 h-2 w-full overflow-hidden rounded-full bg-line"},Nm={class:"mt-2 text-xs text-ink-muted"},Rm={class:"mt-2 text-sm text-ink"},Fm={class:"font-semibold"},Bm={class:"mt-1 text-xs text-ink-muted"},Vm={key:1,class:"mt-2 text-xs text-ink-muted"},Zm={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Um={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Hm={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},jm={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Wm={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Km={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Gm={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},qm={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Ym={key:8,class:"border-b border-line py-3 text-xs text-amber-fg"},Jm={class:"mt-4 flex flex-wrap items-center gap-3"},Xm=["disabled"],Qm=["disabled"],tg={key:2,class:"text-xs text-danger-fg"},eg={class:"panel mb-5 p-5"},ng={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},ig={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},sg={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},og={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},rg={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},ag={key:0},lg={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},ug={class:"font-semibold text-ink-secondary"},cg={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},dg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},fg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},hg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},pg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},mg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},gg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},_g={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},vg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},yg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},bg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},xg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},wg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},kg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Sg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Pg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Tg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Lg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Cg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Mg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Og={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Eg={class:"mt-4 flex flex-wrap items-center gap-3"},zg=["disabled"],Ag=["disabled"],Ig={key:2,class:"text-xs text-danger-fg"},$g={key:3,class:"text-[11px] text-ink-muted"},Dg={class:"panel mb-5 p-5"},Ng={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Rg={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Fg={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Bg={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Vg={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Zg={key:0},Ug={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},Hg={class:"font-semibold text-ink-secondary"},jg={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Wg={key:0,class:"inline-flex items-center gap-2 break-all font-mono text-sm text-ink"},Kg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Gg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},qg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Yg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Jg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Xg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Qg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},t_={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},e_={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},n_={class:"mt-4 flex flex-wrap items-center gap-3"},i_=["disabled"],s_=["disabled"],o_={key:2,class:"text-xs text-danger-fg"},r_={key:3,class:"text-[11px] text-ink-muted"},a_={key:3,class:"panel mb-5 p-5"},l_={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},u_={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},c_={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},d_={key:1,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},f_={key:2,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},h_={key:5,class:"border-b border-line py-3 text-xs text-amber-fg"},p_={key:0},m_={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},g_={class:"font-semibold text-ink-secondary"},__={key:7,class:"border-b border-line py-3 text-xs text-ink-muted"},v_={class:"flex w-full flex-col gap-2"},y_={class:"break-all font-mono text-sm text-ink"},b_={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},x_={key:1,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},w_={key:0,class:"text-xs text-ink-muted"},k_={key:1,class:"border-b border-line py-3 text-xs text-ink-muted"},S_={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},P_={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},T_={class:"mt-4 flex flex-wrap items-center gap-3"},L_=["disabled"],C_=["disabled"],M_={key:2,class:"text-xs text-danger-fg"},O_={key:3,class:"text-[11px] text-ink-muted"},E_={key:4,class:"panel mb-5 p-5"},z_={class:"flex items-center gap-4"},A_=["src"],I_={key:1,class:"grid h-16 w-16 place-items-center rounded-full bg-[var(--navy-800)] text-lg font-bold text-white"},$_={class:"flex gap-2"},D_={class:"btn-ghost cursor-pointer"},N_={class:"mt-1 text-right text-[11px] text-ink-muted"},R_={key:5,class:"panel mb-5 p-5"},F_={class:"flex items-center gap-3"},B_={key:0,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},V_={class:"flex flex-wrap items-center gap-4"},Z_={class:"min-w-0"},U_={class:"mt-1 select-all font-mono text-sm font-bold text-ink"},H_={class:"mt-3 flex items-center gap-2"},j_={key:0,class:"mt-2 text-xs text-danger-fg"},W_={key:1,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},K_={class:"mt-2 grid grid-cols-2 gap-1 font-mono text-xs text-ink-secondary sm:grid-cols-4"},G_={class:"rounded-lg border border-line bg-surface-2 p-3"},q_={class:"flex items-center gap-3"},Y_={class:"grid h-9 w-9 place-items-center rounded-full bg-accent-soft text-accent-soft-fg"},J_={class:"min-w-0 flex-1"},X_={class:"text-sm font-semibold text-ink"},Q_={class:"font-mono text-[11px] text-ink-muted"},tv={key:6,class:"mb-5"},ev={key:0,class:"panel mb-5 p-5"},nv={class:"grid max-w-[520px] gap-2"},iv={class:"flex flex-wrap gap-2"},sv=["disabled","title"],ov=["value"],rv=["value"],av={class:"flex items-center gap-2 py-1 text-sm text-ink-secondary"},lv={class:"flex items-center gap-3"},uv=["disabled"],cv={key:0,class:"text-xs text-danger-fg"},dv={key:1,class:"text-xs text-ink-muted"},fv={key:1,class:"panel mb-5 p-5"},hv={class:"grid max-w-[520px] gap-2"},pv={class:"flex flex-wrap gap-2"},mv=["value"],gv=["value"],_v={key:1,class:"text-xs text-ink-muted"},vv={class:"font-semibold text-ink-secondary"},yv={class:"flex items-center gap-3"},bv=["disabled"],xv={key:0,class:"text-xs text-danger-fg"},wv={class:"panel overflow-hidden p-0"},kv={class:"flex items-center justify-between px-5 py-4"},Sv=["disabled"],Pv={key:0,class:"px-5 pb-5 text-sm text-danger-fg"},Tv={key:1,class:"px-5 pb-8 text-sm text-ink-muted"},Lv={key:2,class:"overflow-x-auto"},Cv={class:"w-full border-collapse text-sm"},Mv={class:"text-left"},Ov={class:"px-5 py-3"},Ev={class:"text-ink"},zv={key:0,class:"ml-1.5 text-[11px] text-ink-muted"},Av={class:"px-5 py-3"},Iv={class:"px-5 py-3"},$v={class:"px-5 py-3"},Dv={class:"px-5 py-3 text-right"},Nv=["onClick"],Rv={key:1,class:"inline-flex items-center gap-1.5"},Fv=["onClick"],Bv=["onClick"],Vv={key:7,class:"mb-5"},Zv={key:0,class:"panel mb-5 p-5"},Uv={class:"grid max-w-[520px] gap-2"},Hv={class:"flex items-center gap-3"},jv={key:0,class:"text-xs text-danger-fg"},Wv={key:1,class:"panel mb-5 p-5"},Kv={class:"grid max-w-[520px] gap-2"},Gv={class:"flex items-center gap-3"},qv=["disabled"],Yv={key:0,class:"text-xs text-danger-fg"},Jv={class:"panel overflow-hidden p-0"},Xv={key:0,class:"px-5 pb-8 text-sm text-ink-muted"},Qv={key:1,class:"overflow-x-auto"},ty={class:"w-full border-collapse text-sm"},ey={class:"text-left"},ny={class:"px-5 py-3"},iy={class:"inline-flex items-center gap-2 text-ink"},sy={class:"px-5 py-3 text-ink-secondary"},oy={class:"px-5 py-3 text-right"},ry=["onClick"],ay={key:1,class:"inline-flex items-center gap-1.5"},ly=["onClick"],uy=["disabled","title","onClick"],cy={key:8,class:"mb-5"},dy={class:"panel mb-5 p-5"},fy={class:"btn-ghost cursor-pointer"},hy={key:0,class:"mt-2 text-xs text-ink-muted"},py={class:"rounded-lg border p-5",style:{"border-color":"color-mix(in srgb, var(--danger) 35%, transparent)",background:"var(--danger-soft)"}},my={class:"flex items-center gap-2 text-danger-fg"},gy={class:"mt-4 rounded-lg border border-line bg-surface-1 p-4"},_y={class:"mt-3 flex items-start gap-2 text-sm text-ink-secondary"},vy={class:"mt-3"},yy={class:"eyebrow mb-1 block"},by={class:"text-ink"},xy=["placeholder"],wy={class:"mt-4 flex flex-wrap items-center gap-3"},ky=["disabled"],Sy=["disabled"],Py={key:2,class:"text-xs text-ink-muted"},Ty={key:0,class:"mt-3 rounded border border-line bg-surface-2 px-3 py-2 text-xs text-ink-secondary"},Ly={key:0,class:"fixed bottom-5 right-5 z-20 flex items-center gap-2 rounded-lg border border-line bg-surface-1 px-4 py-2.5 text-sm text-ink shadow-md"},tu="pv.opensky.health",eu="pv.filetransfer.health",nu="pv.webdav.health",iu="pv.localstorage.health",Cy={__name:"Settings",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(e,{emit:i}){const o=e,a=i,l=xt(()=>o.role==="superadmin"),d=xt(()=>o.role==="admin"||o.role==="superadmin");function h(b){return b==="superadmin"?"Superadmin":b==="admin"?"Admin":"User"}function _(b){return b==="superadmin"||b==="admin"?"shield":"user"}function y(b){return b==="superadmin"||b==="admin"?T.accent:T.neutral}const T={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},w=xt(()=>{const b=[{id:"account",label:"Account",icon:"user",kw:"name username email password verification login credentials role"},{id:"appearance",label:"Appearance",icon:"sliders",kw:"theme light dark system language region font size accessibility date time format motion"},{id:"integrations",label:"Integrations",icon:"radio",kw:"opensky flights adsb aircraft plugin oauth credentials bounding box plan connection ftp sftp ftps file transfer server host upload download local storage folder drive isolated private read only webdav nextcloud owncloud dav url https"},{id:"profile",label:"Profile",icon:"image",kw:"avatar photo display name bio public"},{id:"security",label:"Privacy & Security",icon:"shield",kw:"two factor authentication 2fa sessions devices logout security privacy"}];return d.value&&b.push({id:"team",label:"User management",icon:"users",kw:"users team members add remove create delete role admin permissions rights organization"}),l.value&&b.push({id:"organizations",label:"Organizations",icon:"grid",kw:"organization org tenant company create rename delete members"}),b.push({id:"advanced",label:"Advanced",icon:"alertTriangle",kw:"export import data delete account danger zone",danger:!0}),b}),A=G("account"),U=G("");Iu("settingsSearch",U);const V=xt(()=>U.value.trim().length>0),rt=xt(()=>U.value.trim().toLowerCase());function Q(b){return rt.value?(b.label+" "+b.kw).toLowerCase().includes(rt.value)||Mt(b.id):!0}const Ot={account:["full name","username","email address verification verify","password change current new"],appearance:["theme light dark system","language","region","font size accessibility","reduce motion","date format","time format clock"],integrations:["opensky live flights","enable plugin","oauth client id secret","plan credits","bounding box","test connection","file transfer ftp sftp ftps","server host port username password","private key passphrase","base path directory","local storage folder drive","private isolated folder","read only access mode","webdav nextcloud owncloud dav","server url username password tls","base path directory folder"],profile:["profile photo avatar","display name","bio about","show email public"],security:["two factor authentication","active sessions devices","sign out"],team:["add user create account","members list role admin remove delete","organization org assign"],organizations:["add organization create","rename organization","delete organization members"],advanced:["export data download","import data upload","delete account permanent danger"]};function Mt(b){return rt.value?(Ot[b]||[]).some(f=>f.includes(rt.value)):!0}const q=xt(()=>V.value?w.value.filter(Q):w.value.filter(b=>b.id===A.value)),dt=xt({get:()=>qi.value,set:b=>lr(b)}),it=[{value:"light",label:"Light",icon:"sun"},{value:"dark",label:"Dark",icon:"moon"},{value:"system",label:"System",icon:"monitor"}],ht=[{value:"sm",label:"Small"},{value:"md",label:"Default"},{value:"lg",label:"Large"}],Kt=[{value:"12",label:"12-hour"},{value:"24",label:"24-hour"}],he=[["en","English"],["es","Español"],["de","Deutsch"],["fr","Français"],["pl","Polski"],["ja","日本語"]],pe=[["US","United States"],["GB","United Kingdom"],["EU","European Union"],["CA","Canada"],["AU","Australia"],["JP","Japan"]],St=[["MDY","MM/DD/YYYY"],["DMY","DD/MM/YYYY"],["YMD","YYYY/MM/DD"],["ISO","YYYY-MM-DD"]],Nt=G(Date.now());let Et=null;const nt=xt(()=>Yl(Nt.value)),ut=xe({loaded:!1,available:!1,orgEnabled:!0,allowAnonymous:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),zt=G("user"),Ft=xe({clientId:"",clientSecret:"",plan:"",bbox:""}),lt=G(""),At=G(!1),et=G(!1),ce=G(null),pt=G(null),kt=xt(()=>ce.value&&ce.value.credits||null),Yt=xt(()=>{const b=kt.value;return!b||!b.daily||b.remaining==null?null:Math.max(0,Math.min(100,Math.round(b.remaining/b.daily*100)))}),ae=xt(()=>{const b=Yt.value;return b==null?"bg-accent":b<=10?"bg-danger":b<=30?"bg-amber":"bg-success"});function Jt(b){return typeof b=="number"?b.toLocaleString():b}function Bt(){if(!pt.value)return"";const b=Math.max(0,Math.round((Date.now()-pt.value)/1e3));if(b<60)return"just now";const f=Math.round(b/60);if(f<60)return`${f} min ago`;const H=Math.round(f/60);return H<24?`${H} h ago`:`${Math.round(H/24)} d ago`}function j(){try{ce.value&&localStorage.setItem(tu,JSON.stringify({health:ce.value,ts:pt.value}))}catch{}}function C(){try{const b=localStorage.getItem(tu);if(!b)return;const f=JSON.parse(b);f&&f.health&&(ce.value=f.health,pt.value=f.ts||null)}catch{}}const E=[{value:"",label:"Not set"},{value:"anonymous",label:"Anonymous"},{value:"standard",label:"Standard"},{value:"contributor",label:"Contributor"}],_e=[{value:"user",label:"My settings",icon:"user"},{value:"org",label:"Organization",icon:"users"}],se=xt(()=>ut.isSuperadmin),Ge=xt(()=>ut.isSuperadmin?"user":zt.value),v=xt(()=>ut.scopes[Ge.value]||{editableLayer:"user",fields:{}}),m=xt(()=>Ge.value==="org");function M(b){return v.value.fields[b]||{effective:"",own:"",source:"unset",locked:!1}}function F(b){return se.value||M(b).locked}function R(b){const f=M(b).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function B(){Ft.clientId=M("clientId").own||"",Ft.clientSecret=M("clientSecret").own||"",Ft.plan=M("plan").own||"",Ft.bbox=M("bbox").own||""}function J(b){ut.available=!!b.available,ut.orgEnabled=b.orgEnabled!==!1,ut.allowAnonymous=!!b.allowAnonymous,ut.enabled=!!b.enabled,ut.canEditOrg=!!b.canEditOrg,ut.isSuperadmin=!!b.isSuperadmin,ut.scopes=b.scopes||{},zt.value==="org"&&!ut.canEditOrg&&(zt.value="user"),B(),ut.loaded=!0}Qe(zt,()=>{lt.value="",B()});async function D(){C();const{ok:b,body:f}=await qh();b&&J(f)}async function K(b){const f=m.value;f?ut.orgEnabled=b:ut.enabled=b;const{ok:H,body:k}=await Wl(f?{scope:"org",enabled:b}:{scope:"user",enabled:b});H?(J(k),jt(f?b?"OpenSky enabled for your organization.":"OpenSky disabled for your organization.":b?"OpenSky enabled.":"OpenSky disabled.")):(f?ut.orgEnabled=!b:ut.enabled=!b,jt(k.error||"Could not update."))}async function Z(){lt.value="",At.value=!0;const b={};for(const qt of["clientId","clientSecret","plan","bbox"])F(qt)||(b[qt]=Ft[qt]);const f={scope:Ge.value,config:b};m.value||(f.enabled=ut.enabled);const{ok:H,body:k}=await Wl(f);if(At.value=!1,!H){lt.value=k.error||"Could not save settings.";return}J(k),jt(m.value?"Organization OpenSky settings saved.":"OpenSky settings saved.")}async function yt(){et.value=!0,ce.value=null;const{ok:b,body:f}=await Yh();et.value=!1,ce.value=b&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},pt.value=Date.now(),j()}function st(b){return b==="ok"?T.success:b==="degraded"?T.warning:T.danger}const tt=xe({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),bt=G("user"),Rt=["protocol","host","port","username","password","privateKey","keyPassphrase","hostKeyFingerprint","insecureSkipVerify","basePath"],gt=xe(Object.fromEntries(Rt.map(b=>[b,""]))),Ht=G(""),le=G(!1),me=G(!1),ve=G(null),Te=G(null),vn=[{value:"sftp",label:"SFTP"},{value:"ftps",label:"FTPS"},{value:"ftp",label:"FTP"}],ci=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],ke=xt(()=>tt.isSuperadmin),Ie=xt(()=>tt.isSuperadmin?"user":bt.value),On=xt(()=>tt.scopes[Ie.value]||{editableLayer:"user",fields:{}}),Be=xt(()=>Ie.value==="org"),Ji=xt(()=>(Ve("protocol")?Ee("protocol").effective:gt.protocol)||"sftp");function Ee(b){return On.value.fields[b]||{effective:"",own:"",source:"unset",locked:!1}}function Ve(b){return ke.value||Ee(b).locked}function ye(b){const f=Ee(b).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function wr(b){return(vn.find(f=>f.value===b)||{}).label||b||"—"}function _o(){for(const b of Rt)gt[b]=Ee(b).own||"";gt.protocol||(gt.protocol="sftp"),gt.insecureSkipVerify||(gt.insecureSkipVerify="false")}function Cs(b){tt.available=!!b.available,tt.orgEnabled=b.orgEnabled!==!1,tt.enabled=!!b.enabled,tt.canEditOrg=!!b.canEditOrg,tt.isSuperadmin=!!b.isSuperadmin,tt.scopes=b.scopes||{},bt.value==="org"&&!tt.canEditOrg&&(bt.value="user"),_o(),tt.loaded=!0}Qe(bt,()=>{Ht.value="",_o()});function kr(){if(!Te.value)return"";const b=Math.max(0,Math.round((Date.now()-Te.value)/1e3));if(b<60)return"just now";const f=Math.round(b/60);if(f<60)return`${f} min ago`;const H=Math.round(f/60);return H<24?`${H} h ago`:`${Math.round(H/24)} d ago`}function Sr(){try{ve.value&&localStorage.setItem(eu,JSON.stringify({health:ve.value,ts:Te.value}))}catch{}}function Pr(){try{const b=localStorage.getItem(eu);if(!b)return;const f=JSON.parse(b);f&&f.health&&(ve.value=f.health,Te.value=f.ts||null)}catch{}}async function Ms(){Pr();const{ok:b,body:f}=await Jh();b&&Cs(f)}async function vo(b){const f=Be.value;f?tt.orgEnabled=b:tt.enabled=b;const{ok:H,body:k}=await Kl(f?{scope:"org",enabled:b}:{scope:"user",enabled:b});H?(Cs(k),jt(f?b?"File transfer enabled for your organization.":"File transfer disabled for your organization.":b?"File transfer enabled.":"File transfer disabled.")):(f?tt.orgEnabled=!b:tt.enabled=!b,jt(k.error||"Could not update."))}async function Tr(){Ht.value="",le.value=!0;const b={};for(const qt of Rt)Ve(qt)||(b[qt]=gt[qt]);const f={scope:Ie.value,config:b};Be.value||(f.enabled=tt.enabled);const{ok:H,body:k}=await Kl(f);if(le.value=!1,!H){Ht.value=k.error||"Could not save settings.";return}Cs(k),jt(Be.value?"Organization file-transfer settings saved.":"File-transfer settings saved.")}async function Lr(){me.value=!0,ve.value=null;const{ok:b,body:f}=await Xh();me.value=!1,ve.value=b&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},Te.value=Date.now(),Sr()}function Cr(b){return b==="ok"?T.success:b==="degraded"?T.warning:T.danger}const Vt=xe({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),ft=G("user"),Xi=["baseURL","username","password","insecureSkipVerify","basePath"],ze=xe(Object.fromEntries(Xi.map(b=>[b,""]))),di=G(""),Ci=G(!1),fi=G(!1),rn=G(null),tn=G(null),yo=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],Os=xt(()=>Vt.isSuperadmin),Es=xt(()=>Vt.isSuperadmin?"user":ft.value),Mr=xt(()=>Vt.scopes[Es.value]||{editableLayer:"user",fields:{}}),an=xt(()=>Es.value==="org");function yn(b){return Mr.value.fields[b]||{effective:"",own:"",source:"unset",locked:!1}}function hi(b){return Os.value||yn(b).locked}function Ze(b){const f=yn(b).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function bo(){for(const b of Xi)ze[b]=yn(b).own||"";ze.insecureSkipVerify||(ze.insecureSkipVerify="false")}function zs(b){Vt.available=!!b.available,Vt.orgEnabled=b.orgEnabled!==!1,Vt.enabled=!!b.enabled,Vt.canEditOrg=!!b.canEditOrg,Vt.isSuperadmin=!!b.isSuperadmin,Vt.scopes=b.scopes||{},ft.value==="org"&&!Vt.canEditOrg&&(ft.value="user"),bo(),Vt.loaded=!0}Qe(ft,()=>{di.value="",bo()});function Or(){if(!tn.value)return"";const b=Math.max(0,Math.round((Date.now()-tn.value)/1e3));if(b<60)return"just now";const f=Math.round(b/60);if(f<60)return`${f} min ago`;const H=Math.round(f/60);return H<24?`${H} h ago`:`${Math.round(H/24)} d ago`}function Er(){try{rn.value&&localStorage.setItem(nu,JSON.stringify({health:rn.value,ts:tn.value}))}catch{}}function zr(){try{const b=localStorage.getItem(nu);if(!b)return;const f=JSON.parse(b);f&&f.health&&(rn.value=f.health,tn.value=f.ts||null)}catch{}}async function As(){zr();const{ok:b,body:f}=await ep();b&&zs(f)}async function pi(b){const f=an.value;f?Vt.orgEnabled=b:Vt.enabled=b;const{ok:H,body:k}=await Gl(f?{scope:"org",enabled:b}:{scope:"user",enabled:b});H?(zs(k),jt(f?b?"WebDAV enabled for your organization.":"WebDAV disabled for your organization.":b?"WebDAV enabled.":"WebDAV disabled.")):(f?Vt.orgEnabled=!b:Vt.enabled=!b,jt(k.error||"Could not update."))}async function xo(){di.value="",Ci.value=!0;const b={};for(const qt of Xi)hi(qt)||(b[qt]=ze[qt]);const f={scope:Es.value,config:b};an.value||(f.enabled=Vt.enabled);const{ok:H,body:k}=await Gl(f);if(Ci.value=!1,!H){di.value=k.error||"Could not save settings.";return}zs(k),jt(an.value?"Organization WebDAV settings saved.":"WebDAV settings saved.")}async function wo(){fi.value=!0,rn.value=null;const{ok:b,body:f}=await np();fi.value=!1,rn.value=b&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},tn.value=Date.now(),Er()}function Mi(b){return b==="ok"?T.success:b==="degraded"?T.warning:T.danger}const X=xe({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,isOrgUser:!1,mounts:[],privateFolder:!1,privateEnabled:!1,allowPrivate:!0,rootConfigured:!1,scopes:{}}),Qt=G("user"),jn=G(""),ln=G(""),bn=G(!1),mi=G(!1),Pt=G(null),oe=G(null),Wn=G({}),Oi=[{value:"",label:"Inherit"},{value:"false",label:"Read-write"},{value:"true",label:"Read-only"}],$e=xt(()=>X.isSuperadmin),Is=xt(()=>X.isSuperadmin?"user":Qt.value),Qi=xt(()=>X.scopes[Is.value]||{editableLayer:"user",fields:{}}),Se=xt(()=>Is.value==="org");function ge(b){return Qi.value.fields[b]||{effective:"",own:"",source:"unset",locked:!1}}function En(b){return $e.value||ge(b).locked}function gi(b){const f=ge(b).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function Ei(b){return(Oi.find(f=>f.value===b)||{}).label||"Inherit"}function ts(){jn.value=ge("readOnly").own||""}function xn(b){X.available=!!b.available,X.orgEnabled=b.orgEnabled!==!1,X.enabled=!!b.enabled,X.canEditOrg=!!b.canEditOrg,X.isSuperadmin=!!b.isSuperadmin,X.isOrgUser=!!b.isOrgUser,X.mounts=Array.isArray(b.mounts)?b.mounts:[],X.privateFolder=!!b.privateFolder,X.privateEnabled=!!b.privateEnabled,X.allowPrivate=b.allowPrivate!==!1,X.rootConfigured=!!b.rootConfigured,X.scopes=b.scopes||{},Qt.value==="org"&&!X.canEditOrg&&(Qt.value="user"),ts(),X.loaded=!0}Qe(Qt,()=>{ln.value="",ts()});function $s(){if(!oe.value)return"";const b=Math.max(0,Math.round((Date.now()-oe.value)/1e3));if(b<60)return"just now";const f=Math.round(b/60);if(f<60)return`${f} min ago`;const H=Math.round(f/60);return H<24?`${H} h ago`:`${Math.round(H/24)} d ago`}function Ds(){try{Pt.value&&localStorage.setItem(iu,JSON.stringify({health:Pt.value,ts:oe.value}))}catch{}}function es(){try{const b=localStorage.getItem(iu);if(!b)return;const f=JSON.parse(b);f&&f.health&&(Pt.value=f.health,oe.value=f.ts||null)}catch{}}async function Ns(){es();const{ok:b,body:f}=await Qh();b&&xn(f)}async function ns(b){const f=Se.value;f?X.orgEnabled=b:X.enabled=b;const{ok:H,body:k}=await Ko(f?{scope:"org",enabled:b}:{scope:"user",enabled:b});H?(xn(k),jt(f?b?"Local storage enabled for your organization.":"Local storage disabled for your organization.":b?"Local storage enabled.":"Local storage disabled.")):(f?X.orgEnabled=!b:X.enabled=!b,jt(k.error||"Could not update."))}async function is(b){X.privateFolder=b;const{ok:f,body:H}=await Ko({scope:"user",privateFolder:b});f?(xn(H),jt(b?"Private folder enabled.":"Private folder disabled.")):(X.privateFolder=!b,jt(H.error||"Could not update."))}async function ko(b){X.allowPrivate=b;const{ok:f,body:H}=await Ko({scope:"org",allowPrivate:b});f?(xn(H),jt(b?"Members may now create private folders.":"Private folders disabled for your organization.")):(X.allowPrivate=!b,jt(H.error||"Could not update."))}async function Rs(){ln.value="",bn.value=!0;const b={};En("readOnly")||(b.readOnly=jn.value);const f={scope:Is.value,config:b};Se.value||(f.enabled=X.enabled);const{ok:H,body:k}=await Ko(f);if(bn.value=!1,!H){ln.value=k.error||"Could not save settings.";return}xn(k),jt(Se.value?"Organization local-storage settings saved.":"Local-storage settings saved.")}async function Ar(){mi.value=!0,Pt.value=null,Wn.value={};const{ok:b,body:f}=await tp();mi.value=!1,Pt.value=b&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."};const H={};if(Array.isArray(f.mounts))for(const k of f.mounts)H[k.id]={status:k.status,detail:k.detail};Wn.value=H,oe.value=Date.now(),Ds()}function It(b){return b==="ok"?T.success:b==="degraded"?T.warning:T.danger}const un=[{id:"apis-external",label:"APIs — External",icon:"globe"},{id:"drives-external",label:"Drives — External",icon:"server"},{id:"drives-local",label:"Drives — Local",icon:"monitor"}],te=G("apis-external");function ss(b){return V.value||te.value===b}const _i=G("");let zi=null;function jt(b){_i.value=b,clearTimeout(zi),zi=setTimeout(()=>_i.value="",2200)}const we=xe({current:"",next:"",confirm:""}),zn=G(""),vi=G(!1);function Le(){if(vi.value=!1,!we.current)return zn.value="Enter your current password.";if(we.next.length<8)return zn.value="New password must be at least 8 characters.";if(we.next!==we.confirm)return zn.value="New passwords do not match.";zn.value="Validated. Connecting to the account service is pending — no password endpoint yet.",we.current=we.next=we.confirm=""}const wn=G("");function So(){wn.value="Verification link would be sent once the account service is wired up."}function Po(b){const f=b.target.files&&b.target.files[0];if(!f)return;if(f.size>1.5*1024*1024){jt("Image too large (max ~1.5 MB).");return}const H=new FileReader;H.onload=()=>{Tt.avatar=String(H.result),jt("Photo updated.")},H.readAsDataURL(f)}function Ir(){Tt.avatar="",jt("Photo removed.")}const To=xt(()=>{var H,k,qt;const f=(Tt.displayName||Tt.name||o.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((H=f[0])==null?void 0:H[0])||"P")+(((k=f[1])==null?void 0:k[0])||((qt=f[0])==null?void 0:qt[1])||"V")).toUpperCase()}),Kn=G(!1),Lo=G(""),Ai=G(""),Zt=G(""),os=G([]);function Ue(b){const f="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";let H="";for(let k=0;kUe(4).toLowerCase()+"-"+Ue(4).toLowerCase()),Zt.value=""}function $r(){Tt.twoFactor=!1,os.value=[],Kn.value=!1}const qe=navigator.userAgent;function Dr(){return/Edg\//.test(qe)?"Edge":/OPR\//.test(qe)?"Opera":/Chrome\//.test(qe)?"Chrome":/Firefox\//.test(qe)?"Firefox":/Safari\//.test(qe)?"Safari":"Browser"}function Mo(){return/Windows/.test(qe)?"Windows":/Mac OS X/.test(qe)?"macOS":/Android/.test(qe)?"Android":/iPhone|iPad/.test(qe)?"iOS":/Linux/.test(qe)?"Linux":"Unknown OS"}const Nr=Date.now(),rs=G([]),Gn=G(!1),as=G(""),re=xe({email:"",password:"",role:"user",organization:""}),yi=G(""),$i=G(!1),Ye=G(""),Fs=xt(()=>{const b=[{value:"user",label:"User"},{value:"admin",label:"Admin"}];return l.value&&b.push({value:"superadmin",label:"Superadmin"}),b}),Di=G([]);async function qn(){if(!d.value)return;const b=await Uh();b.ok&&(Di.value=b.organizations.slice().sort((f,H)=>f.name.localeCompare(H.name)))}const Oo=xt(()=>{const b=Di.value.map(f=>({value:f.id,label:f.name}));return l.value&&b.unshift({value:"",label:"No organization"}),b});async function Yn(){if(!d.value)return;Gn.value=!0,as.value="";const b=await Fh();if(Gn.value=!1,!b.ok){as.value=b.status===403?"Manager role required.":"Could not load users.";return}rs.value=b.users.slice().sort((f,H)=>f.email.localeCompare(H.email))}function Ni(b){try{const f=b.data||{},H=Object.keys(f)[0];return H&&f[H]&&f[H].message||b.message||b.error||"Invalid input."}catch{return b.error||"Could not create user."}}async function Rr(){yi.value="";const b=re.email.trim().toLowerCase();if(!b.includes("@"))return yi.value="Enter a valid email.";if(re.password.length<8)return yi.value="Password must be at least 8 characters.";$i.value=!0;const f=l.value?re.organization:o.organization,{ok:H,body:k}=await Bh(b,re.password,re.role,f);if($i.value=!1,!H)return yi.value=Ni(k);re.email="",re.password="",re.role="user",re.organization="",jt("User created."),Yn()}async function Fr(b){const{ok:f,body:H}=await Zh(b.id);if(Ye.value="",!f)return jt(H.error||"Could not remove user.");jt("User removed."),Yn()}const Gt=xe({id:"",email:"",role:"user",verified:!1,password:"",organization:""}),An=G(""),Ri=G(!1),ls=xt(()=>!!Gt.id&&Gt.email===o.email);function us(b){Ye.value="",Gt.id=b.id,Gt.email=b.email,Gt.role=b.role||"user",Gt.verified=!!b.verified,Gt.password="",Gt.organization=b.organization||"",An.value=""}function In(){Gt.id="",An.value=""}async function Br(){An.value="";const b=Gt.email.trim().toLowerCase();if(!b.includes("@"))return An.value="Enter a valid email.";if(Gt.password&&Gt.password.length<8)return An.value="New password must be at least 8 characters (or leave blank).";const f={email:b,role:Gt.role,verified:Gt.verified};l.value&&(f.organization=Gt.organization),Gt.password&&(f.password=Gt.password),Ri.value=!0;const{ok:H,body:k}=await Vh(Gt.id,f);if(Ri.value=!1,!H)return An.value=Ni(k);jt("User updated."),In(),Yn()}const $n=xe({name:""}),Ce=G(""),Fi=G(!1),bi=G(""),kn=xe({id:"",name:""}),Sn=G(""),Bi=xt(()=>{const b={};for(const f of rs.value)f.organization&&(b[f.organization]=(b[f.organization]||0)+1);return b});async function Eo(){Ce.value="";const b=$n.name.trim();if(!b)return Ce.value="Enter an organization name.";Fi.value=!0;const{ok:f,body:H}=await Hh(b);if(Fi.value=!1,!f)return Ce.value=Ni(H);$n.name="",jt("Organization created."),qn()}function Vr(b){bi.value="",kn.id=b.id,kn.name=b.name,Sn.value=""}function Bs(){kn.id="",Sn.value=""}async function zo(){Sn.value="";const b=kn.name.trim();if(!b)return Sn.value="Enter an organization name.";const{ok:f,body:H}=await jh(kn.id,b);if(!f)return Sn.value=Ni(H);jt("Organization renamed."),Bs(),qn(),Yn()}async function en(b){const{ok:f,body:H}=await Wh(b.id);if(bi.value="",!f)return jt(H.error||"Could not delete organization.");jt("Organization deleted."),qn()}function xi(){const b={_app:"PilotVault",_kind:"settings-export",exportedAt:new Date().toISOString(),email:o.email,prefs:{...Tt},themeMode:qi.value},f=new Blob([JSON.stringify(b,null,2)],{type:"application/json"}),H=URL.createObjectURL(f),k=document.createElement("a");k.href=H,k.download=`pilotvault-settings-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(k),k.click(),k.remove(),URL.revokeObjectURL(H),jt("Settings exported.")}const cs=G("");function Pn(b){const f=b.target.files&&b.target.files[0];if(!f)return;const H=new FileReader;H.onload=()=>{try{const k=JSON.parse(String(H.result)),qt=k.prefs||k;if(!Tc(qt))throw new Error("bad shape");k.themeMode&&lr(k.themeMode),Aa(Tt.fontSize),Ia(Tt.reduceMotion),cs.value="Settings imported and applied."}catch{cs.value="That file is not a valid PilotVault settings export."}},H.readAsText(f),b.target.value=""}const de=xe({understand:!1,typed:"",cooldown:0,armed:!1,msg:""});let cn=null;const Vs=xt(()=>o.email||"DELETE MY ACCOUNT"),Jn=xt(()=>de.understand&&de.typed===Vs.value);function Ao(){Jn.value&&(de.armed=!0,de.cooldown=5,clearInterval(cn),cn=setInterval(()=>{de.cooldown--,de.cooldown<=0&&clearInterval(cn)},1e3))}Qe(Jn,b=>{!b&&de.armed&&(de.armed=!1,de.cooldown=0,clearInterval(cn))});function ds(){if(!(!de.armed||de.cooldown>0)){try{localStorage.removeItem("pv_prefs")}catch{}de.msg="Account deletion requires the account service. Local data was cleared and you were signed out.",setTimeout(()=>a("logout"),900)}}return Yi(()=>{Et=setInterval(()=>Nt.value=Date.now(),1e3),qn(),Yn(),D(),Ms(),As(),Ns()}),vr(()=>{clearInterval(Et),clearInterval(cn),clearTimeout(zi)}),(b,f)=>(g(),x("div",Kp,[u("div",Gp,[f[62]||(f[62]=u("div",null,[u("div",{class:"eyebrow"},"Preferences"),u("h2",{class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},"Settings")],-1)),u("div",qp,[O(Y,{name:"search",size:16,class:"text-ink-muted"}),ot(u("input",{"onUpdate:modelValue":f[0]||(f[0]=H=>U.value=H),placeholder:"Search settings…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[vt,U.value]]),U.value?(g(),x("button",{key:0,class:"text-ink-muted hover:text-ink","aria-label":"Clear search",onClick:f[1]||(f[1]=H=>U.value="")},[O(Y,{name:"x",size:15})])):N("",!0)])]),u("div",Yp,[ot(u("nav",Jp,[(g(!0),x(ct,null,Wt(w.value,H=>(g(),x("button",{key:H.id,class:Ct(["flex items-center gap-2.5 rounded px-3 py-2.5 text-left text-sm transition",[A.value===H.id?H.danger?"bg-danger-soft font-semibold text-danger-fg":"bg-accent-soft font-semibold text-accent-soft-fg":H.danger?"font-medium text-danger-fg hover:bg-danger-soft":"font-medium text-ink-secondary hover:bg-surface-2"]]),onClick:k=>A.value=H.id},[O(Y,{name:H.icon,size:17},null,8,["name"]),u("span",Qp,P(H.label),1)],10,Xp))),128))],512),[[oh,!V.value]]),u("div",tm,[V.value&&!q.value.length?(g(),x("div",em," No settings match “"+P(U.value)+"”. ",1)):N("",!0),(g(!0),x(ct,null,Wt(q.value,H=>(g(),x(ct,{key:H.id},[V.value?(g(),x("div",nm,[O(Y,{name:H.icon,size:14},null,8,["name"]),$(" "+P(H.label),1)])):N("",!0),H.id==="account"?(g(),x("div",im,[O(_t,{title:"Full name",desc:"Shown to your team on flights and audit logs.",keywords:"full name account"},{default:mt(()=>[ot(u("input",{"onUpdate:modelValue":f[2]||(f[2]=k=>$t(Tt).name=k),class:"field w-56",placeholder:"Jane Operator",onBlur:f[3]||(f[3]=k=>jt("Saved."))},null,544),[[vt,$t(Tt).name]])]),_:1}),O(_t,{title:"Username",desc:"Your unique handle within PilotVault.",keywords:"username handle"},{default:mt(()=>[u("div",sm,[f[63]||(f[63]=u("span",{class:"text-sm text-ink-muted"},"@",-1)),ot(u("input",{"onUpdate:modelValue":f[4]||(f[4]=k=>$t(Tt).username=k),class:"field w-48",placeholder:"jane",onBlur:f[5]||(f[5]=k=>jt("Saved."))},null,544),[[vt,$t(Tt).username]])])]),_:1}),O(_t,{title:"Email address",desc:"Used for sign-in and notifications.",keywords:"email verification verify"},{default:mt(()=>[u("div",om,[u("span",rm,P(e.email||"—"),1),u("span",am,[O(Y,{name:"mail",size:12}),f[64]||(f[64]=$(" Unverified ",-1))])])]),_:1}),O(_t,{title:"Role",desc:"Your access level in PilotVault.",keywords:"role admin user superadmin access rights permissions"},{default:mt(()=>[u("span",{class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",y(e.role)])},[O(Y,{name:_(e.role),size:12},null,8,["name"]),$(P(h(e.role)),1)],2)]),_:1}),O(_t,{title:"Organization",desc:"The organization your account belongs to.",keywords:"organization org tenant company"},{default:mt(()=>[u("span",{class:Ct(["text-sm",e.organizationName?"text-ink":"text-ink-muted"])},P(e.organizationName||(l.value?"All organizations":"None")),3)]),_:1}),O(_t,{block:"",title:"Verify email",desc:"Confirm ownership to enable password resets and alerts.",keywords:"verify email resend"},{default:mt(()=>[u("button",{class:"btn-ghost",onClick:So},"Send verification link"),wn.value?(g(),x("p",lm,P(wn.value),1)):N("",!0)]),_:1}),O(_t,{block:"",title:"Change password",desc:"Use at least 8 characters.",keywords:"password change current new"},{default:mt(()=>[u("div",um,[ot(u("input",{"onUpdate:modelValue":f[6]||(f[6]=k=>we.current=k),type:"password",class:"field",placeholder:"Current password"},null,512),[[vt,we.current]]),ot(u("input",{"onUpdate:modelValue":f[7]||(f[7]=k=>we.next=k),type:"password",class:"field",placeholder:"New password"},null,512),[[vt,we.next]]),ot(u("input",{"onUpdate:modelValue":f[8]||(f[8]=k=>we.confirm=k),type:"password",class:"field",placeholder:"Confirm new password"},null,512),[[vt,we.confirm]]),u("div",cm,[u("button",{class:"btn-accent",onClick:Le},"Update password"),zn.value?(g(),x("span",{key:0,class:Ct(["text-xs",vi.value?"text-success-fg":"text-ink-muted"])},P(zn.value),3)):N("",!0)])])]),_:1})])):H.id==="appearance"?(g(),x("div",dm,[O(_t,{title:"Theme",desc:"Light, dark, or follow your system.",keywords:"theme light dark system appearance"},{default:mt(()=>[O(hn,{modelValue:dt.value,"onUpdate:modelValue":f[9]||(f[9]=k=>dt.value=k),options:it},null,8,["modelValue"])]),_:1}),O(_t,{title:"Font size",desc:"Scales the entire interface for readability.",keywords:"font size accessibility text"},{default:mt(()=>[O(hn,{modelValue:$t(Tt).fontSize,"onUpdate:modelValue":f[10]||(f[10]=k=>$t(Tt).fontSize=k),options:ht},null,8,["modelValue"])]),_:1}),O(_t,{title:"Reduce motion",desc:"Minimise animations and transitions.",keywords:"reduce motion accessibility animation"},{default:mt(()=>[O(nn,{modelValue:$t(Tt).reduceMotion,"onUpdate:modelValue":f[11]||(f[11]=k=>$t(Tt).reduceMotion=k)},null,8,["modelValue"])]),_:1}),O(_t,{title:"Language",desc:"Interface language.",keywords:"language locale"},{default:mt(()=>[ot(u("select",{"onUpdate:modelValue":f[12]||(f[12]=k=>$t(Tt).language=k),class:"field w-48"},[(g(),x(ct,null,Wt(he,([k,qt])=>u("option",{key:k,value:k},P(qt),9,fm)),64))],512),[[sn,$t(Tt).language]])]),_:1}),O(_t,{title:"Region",desc:"Affects number, unit and date defaults.",keywords:"region country locale"},{default:mt(()=>[ot(u("select",{"onUpdate:modelValue":f[13]||(f[13]=k=>$t(Tt).region=k),class:"field w-48"},[(g(),x(ct,null,Wt(pe,([k,qt])=>u("option",{key:k,value:k},P(qt),9,hm)),64))],512),[[sn,$t(Tt).region]])]),_:1}),O(_t,{title:"Date format",desc:"How calendar dates are displayed.",keywords:"date format"},{default:mt(()=>[ot(u("select",{"onUpdate:modelValue":f[14]||(f[14]=k=>$t(Tt).dateFormat=k),class:"field w-48"},[(g(),x(ct,null,Wt(St,([k,qt])=>u("option",{key:k,value:k},P(qt),9,pm)),64))],512),[[sn,$t(Tt).dateFormat]])]),_:1}),O(_t,{title:"Time format",desc:"12- or 24-hour clock.",keywords:"time format clock 12 24 hour"},{default:mt(()=>[O(hn,{modelValue:$t(Tt).timeFormat,"onUpdate:modelValue":f[15]||(f[15]=k=>$t(Tt).timeFormat=k),options:Kt},null,8,["modelValue"])]),_:1}),O(_t,{title:"Preview",desc:"How timestamps appear across the app.",keywords:"preview date time"},{default:mt(()=>[u("span",mm,P(nt.value),1)]),_:1}),f[65]||(f[65]=u("p",{class:"mt-3 text-xs text-ink-muted"}," Language & region are stored now; full localisation ships with the account service. ",-1))])):H.id==="integrations"?(g(),x("div",gm,[V.value?N("",!0):(g(),x("div",_m,[(g(),x(ct,null,Wt(un,k=>u("button",{key:k.id,type:"button",class:Ct(["-mb-px inline-flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",te.value===k.id?"border-accent text-ink":"border-transparent text-ink-secondary hover:text-ink"]),onClick:qt=>te.value=k.id},[O(Y,{name:k.icon,size:16},null,8,["name"]),$(P(k.label),1)],10,vm)),64))])),ss("apis-external")?(g(),x("div",ym,[u("div",bm,[u("div",xm,[O(Y,{name:"radio",size:20})]),f[66]||(f[66]=u("div",{class:"min-w-0"},[u("div",{class:"text-sm font-semibold text-ink"},"OpenSky Network"),u("div",{class:"mt-0.5 text-xs text-ink-muted"}," Live ADS-B aircraft data. Configure your own OAuth2 credentials, plan and default bounding box. ")],-1))]),ut.loaded&&!ut.available?(g(),x("div",wm,[O(Y,{name:"lock",size:14,class:"mr-1 inline"}),f[67]||(f[67]=$(" OpenSky is currently disabled by your administrator. Contact them to enable it. ",-1))])):N("",!0),ut.canEditOrg?(g(),x("div",km,[f[68]||(f[68]=u("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),O(hn,{modelValue:zt.value,"onUpdate:modelValue":f[16]||(f[16]=k=>zt.value=k),options:_e},null,8,["modelValue"])])):N("",!0),m.value?(g(),ie(_t,{key:2,title:"Enable OpenSky (organization-wide)",desc:"Turn OpenSky on or off for everyone in your organization.",keywords:"enable disable plugin opensky organization"},{default:mt(()=>[O(nn,{"model-value":ut.orgEnabled,disabled:!ut.available,"onUpdate:modelValue":K},null,8,["model-value","disabled"])]),_:1})):(g(),ie(_t,{key:3,title:"Enable OpenSky",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin opensky"},{default:mt(()=>[O(nn,{"model-value":ut.enabled,disabled:!ut.available||!ut.orgEnabled,"onUpdate:modelValue":K},null,8,["model-value","disabled"])]),_:1})),!m.value&&ut.available&&!ut.orgEnabled?(g(),x("div",Sm,[O(Y,{name:"lock",size:13,class:"mr-1 inline"}),f[70]||(f[70]=$("OpenSky is turned off for your organization",-1)),ut.canEditOrg?(g(),x("span",Pm,[...f[69]||(f[69]=[$(" — switch to ",-1),u("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):N("",!0),f[71]||(f[71]=$(". ",-1))])):N("",!0),m.value?(g(),x("div",Tm,[O(Y,{name:"users",size:13,class:"mr-1 inline"}),f[72]||(f[72]=$("These are organization-wide settings — they apply to everyone in ",-1)),u("span",Lm,P(e.organizationName||"your organization"),1),f[73]||(f[73]=$(". Leave a field blank to let each user choose their own; a value set here overrides the user's. ",-1))])):se.value?(g(),x("div",Cm," As a superadmin you manage the global OpenSky configuration in the API Server panel. The effective configuration is shown below. ")):N("",!0),ut.available&&!m.value?(g(),x("div",Mm,[u("div",Om,[u("div",Em,[O(Y,{name:"signal",size:15}),f[74]||(f[74]=$("Credit usage ",-1))]),pt.value?(g(),x("span",zm,"Checked "+P(Bt()),1)):N("",!0)]),kt.value?(g(),x(ct,{key:0},[kt.value.remaining!=null?(g(),x(ct,{key:0},[u("div",Am,[u("span",Im,P(Jt(kt.value.remaining)),1),u("span",$m,"/ "+P(Jt(kt.value.daily))+" credits left today",1)]),u("div",Dm,[u("div",{class:Ct(["h-full rounded-full transition-all",ae.value]),style:Ss({width:Yt.value+"%"})},null,6)]),u("div",Nm," Used "+P(Jt(kt.value.daily-kt.value.remaining))+" today · "+P(kt.value.probeCost)+" credit"+P(kt.value.probeCost===1?"":"s")+" per query · "+P(kt.value.mode),1)],64)):(g(),x(ct,{key:1},[u("div",Rm,[f[75]||(f[75]=$("Daily allowance: ",-1)),u("span",Fm,P(Jt(kt.value.daily)),1),f[76]||(f[76]=$(" credits",-1))]),u("div",Bm,P(kt.value.probeCost)+" credit"+P(kt.value.probeCost===1?"":"s")+" per query · "+P(kt.value.mode)+". OpenSky only reports live remaining credits for authenticated requests — add OAuth2 credentials below to track usage. ",1)],64))],64)):(g(),x("div",Vm,[...f[77]||(f[77]=[$(" Run ",-1),u("span",{class:"font-semibold text-ink-secondary"},"Test connection",-1),$(" below to fetch your live OpenSky credit balance. ",-1)])]))])):N("",!0),O(_t,{title:"OpenSky plan",desc:"Your account tier — sets the daily credit allowance.",keywords:"plan tier credits"},{default:mt(()=>[F("plan")?(g(),x("span",Zm,[$(P((E.find(k=>k.value===M("plan").effective)||{}).label||M("plan").effective||"—")+" ",1),R("plan")?(g(),x("span",Um,[O(Y,{name:"lock",size:10}),$(P(R("plan")),1)])):N("",!0)])):(g(),ie(hn,{key:1,modelValue:Ft.plan,"onUpdate:modelValue":f[17]||(f[17]=k=>Ft.plan=k),options:E},null,8,["modelValue"]))]),_:1}),O(_t,{title:"Default bounding box",desc:"lamin,lomin,lamax,lomax — used for live queries and the health probe.",keywords:"bounding box bbox area"},{default:mt(()=>[F("bbox")?(g(),x("span",Hm,[$(P(M("bbox").effective||"—")+" ",1),R("bbox")?(g(),x("span",jm,[O(Y,{name:"lock",size:10}),$(P(R("bbox")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[18]||(f[18]=k=>Ft.bbox=k),class:"field w-64 font-mono",placeholder:"50.5,3.2,53.7,7.3"},null,512)),[[vt,Ft.bbox]])]),_:1}),O(_t,{title:"OAuth2 client ID",desc:"Optional — leave blank for anonymous access (lower limits).",keywords:"oauth client id credentials"},{default:mt(()=>[F("clientId")?(g(),x("span",Wm,[$(P(M("clientId").effective||"—")+" ",1),R("clientId")?(g(),x("span",Km,[O(Y,{name:"lock",size:10}),$(P(R("clientId")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[19]||(f[19]=k=>Ft.clientId=k),class:"field w-64",placeholder:"your-api-client"},null,512)),[[vt,Ft.clientId]])]),_:1}),O(_t,{title:"OAuth2 client secret",desc:"Paired with the client ID for authenticated access.",keywords:"oauth client secret credentials password"},{default:mt(()=>[F("clientSecret")?(g(),x("span",Gm,[$(P(M("clientSecret").effective||"—")+" ",1),R("clientSecret")?(g(),x("span",qm,[O(Y,{name:"lock",size:10}),$(P(R("clientSecret")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[20]||(f[20]=k=>Ft.clientSecret=k),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[vt,Ft.clientSecret]])]),_:1}),ut.available&&!ut.allowAnonymous?(g(),x("div",Ym," Anonymous access is disabled by the administrator — OpenSky needs OAuth2 credentials from some layer to work. ")):N("",!0),u("div",Jm,[se.value?N("",!0):(g(),x("button",{key:0,class:"btn-accent",disabled:At.value||!ut.available,onClick:Z},P(At.value?"Saving…":m.value?"Save organization settings":"Save settings"),9,Xm)),m.value?N("",!0):(g(),x("button",{key:1,class:"btn-ghost",disabled:et.value||!ut.available,onClick:yt},P(et.value?"Testing…":"Test connection"),9,Qm)),lt.value?(g(),x("span",tg,P(lt.value),1)):N("",!0),ce.value&&!m.value?(g(),x("span",{key:3,class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",st(ce.value.status)])},[f[78]||(f[78]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P(ce.value.detail||ce.value.status),1)],2)):N("",!0)])])):N("",!0),ss("drives-external")?(g(),x(ct,{key:2},[u("div",eg,[u("div",ng,[u("div",ig,[O(Y,{name:"server",size:20})]),f[79]||(f[79]=u("div",{class:"min-w-0"},[u("div",{class:"text-sm font-semibold text-ink"},"File Transfer (FTP / SFTP)"),u("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to an FTP, FTPS or SFTP server. Configure the connection your account uses for file transfers. ")],-1))]),tt.loaded&&!tt.available?(g(),x("div",sg,[O(Y,{name:"lock",size:14,class:"mr-1 inline"}),f[80]||(f[80]=$(" File transfer is currently disabled by your administrator. Contact them to enable it. ",-1))])):N("",!0),tt.canEditOrg?(g(),x("div",og,[f[81]||(f[81]=u("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),O(hn,{modelValue:bt.value,"onUpdate:modelValue":f[21]||(f[21]=k=>bt.value=k),options:_e},null,8,["modelValue"])])):N("",!0),Be.value?(g(),ie(_t,{key:2,title:"Enable file transfer (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin ftp sftp organization"},{default:mt(()=>[O(nn,{"model-value":tt.orgEnabled,disabled:!tt.available,"onUpdate:modelValue":vo},null,8,["model-value","disabled"])]),_:1})):(g(),ie(_t,{key:3,title:"Enable file transfer",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin ftp sftp"},{default:mt(()=>[O(nn,{"model-value":tt.enabled,disabled:!tt.available||!tt.orgEnabled,"onUpdate:modelValue":vo},null,8,["model-value","disabled"])]),_:1})),!Be.value&&tt.available&&!tt.orgEnabled?(g(),x("div",rg,[O(Y,{name:"lock",size:13,class:"mr-1 inline"}),f[83]||(f[83]=$("File transfer is turned off for your organization",-1)),tt.canEditOrg?(g(),x("span",ag,[...f[82]||(f[82]=[$(" — switch to ",-1),u("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):N("",!0),f[84]||(f[84]=$(". ",-1))])):N("",!0),Be.value?(g(),x("div",lg,[O(Y,{name:"users",size:13,class:"mr-1 inline"}),f[85]||(f[85]=$("These are organization-wide settings — they apply to everyone in ",-1)),u("span",ug,P(e.organizationName||"your organization"),1),f[86]||(f[86]=$(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):ke.value?(g(),x("div",cg," As a superadmin you manage the global file-transfer configuration in the API Server panel. The effective configuration is shown below. ")):N("",!0),O(_t,{title:"Protocol",desc:"SFTP (over SSH), FTPS (FTP over TLS), or plain FTP.",keywords:"protocol sftp ftps ftp"},{default:mt(()=>[Ve("protocol")?(g(),x("span",dg,[$(P(wr(Ee("protocol").effective))+" ",1),ye("protocol")?(g(),x("span",fg,[O(Y,{name:"lock",size:10}),$(P(ye("protocol")),1)])):N("",!0)])):(g(),ie(hn,{key:1,modelValue:gt.protocol,"onUpdate:modelValue":f[22]||(f[22]=k=>gt.protocol=k),options:vn},null,8,["modelValue"]))]),_:1}),O(_t,{title:"Host",desc:"Server hostname or IP address.",keywords:"host server address"},{default:mt(()=>[Ve("host")?(g(),x("span",hg,[$(P(Ee("host").effective||"—")+" ",1),ye("host")?(g(),x("span",pg,[O(Y,{name:"lock",size:10}),$(P(ye("host")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[23]||(f[23]=k=>gt.host=k),class:"field w-64",placeholder:"files.example.com"},null,512)),[[vt,gt.host]])]),_:1}),O(_t,{title:"Port",desc:"Leave blank for the protocol default (22 for SFTP, 21 for FTP/FTPS).",keywords:"port"},{default:mt(()=>[Ve("port")?(g(),x("span",mg,[$(P(Ee("port").effective||"default")+" ",1),ye("port")?(g(),x("span",gg,[O(Y,{name:"lock",size:10}),$(P(ye("port")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[24]||(f[24]=k=>gt.port=k),inputmode:"numeric",class:"field w-24 font-mono",placeholder:"22"},null,512)),[[vt,gt.port]])]),_:1}),O(_t,{title:"Username",desc:"Account used to authenticate.",keywords:"username login account"},{default:mt(()=>[Ve("username")?(g(),x("span",_g,[$(P(Ee("username").effective||"—")+" ",1),ye("username")?(g(),x("span",vg,[O(Y,{name:"lock",size:10}),$(P(ye("username")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[25]||(f[25]=k=>gt.username=k),class:"field w-64",placeholder:"user"},null,512)),[[vt,gt.username]])]),_:1}),O(_t,{title:"Password",desc:"Password auth for FTP/FTPS, or SFTP password login. Leave blank to use a key.",keywords:"password secret credentials"},{default:mt(()=>[Ve("password")?(g(),x("span",yg,[$(P(Ee("password").effective||"—")+" ",1),ye("password")?(g(),x("span",bg,[O(Y,{name:"lock",size:10}),$(P(ye("password")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[26]||(f[26]=k=>gt.password=k),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[vt,gt.password]])]),_:1}),Ji.value==="sftp"?(g(),ie(_t,{key:7,block:"",title:"SSH private key",desc:"PEM key for SFTP key auth — used instead of, or alongside, a password.",keywords:"private key ssh pem identity"},{default:mt(()=>[Ve("privateKey")?(g(),x("span",xg,[$(P(Ee("privateKey").effective||"—")+" ",1),ye("privateKey")?(g(),x("span",wg,[O(Y,{name:"lock",size:10}),$(P(ye("privateKey")),1)])):N("",!0)])):ot((g(),x("textarea",{key:1,"onUpdate:modelValue":f[27]||(f[27]=k=>gt.privateKey=k),rows:"3",class:"field w-full font-mono text-xs",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----"},null,512)),[[vt,gt.privateKey]])]),_:1})):N("",!0),Ji.value==="sftp"?(g(),ie(_t,{key:8,title:"Private key passphrase",desc:"Passphrase protecting the SSH private key, if any.",keywords:"passphrase key secret"},{default:mt(()=>[Ve("keyPassphrase")?(g(),x("span",kg,[$(P(Ee("keyPassphrase").effective||"—")+" ",1),ye("keyPassphrase")?(g(),x("span",Sg,[O(Y,{name:"lock",size:10}),$(P(ye("keyPassphrase")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[28]||(f[28]=k=>gt.keyPassphrase=k),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[vt,gt.keyPassphrase]])]),_:1})):N("",!0),Ji.value==="sftp"?(g(),ie(_t,{key:9,title:"Host key fingerprint",desc:"Optional SHA256:… fingerprint to pin the server's host key. Blank accepts any key.",keywords:"host key fingerprint verify trust"},{default:mt(()=>[Ve("hostKeyFingerprint")?(g(),x("span",Pg,[$(P(Ee("hostKeyFingerprint").effective||"—")+" ",1),ye("hostKeyFingerprint")?(g(),x("span",Tg,[O(Y,{name:"lock",size:10}),$(P(ye("hostKeyFingerprint")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[29]||(f[29]=k=>gt.hostKeyFingerprint=k),class:"field w-full font-mono text-xs",placeholder:"SHA256:…"},null,512)),[[vt,gt.hostKeyFingerprint]])]),_:1})):N("",!0),Ji.value==="ftps"?(g(),ie(_t,{key:10,title:"TLS verification",desc:"Skip only for self-signed test servers.",keywords:"tls certificate verify insecure ftps"},{default:mt(()=>[Ve("insecureSkipVerify")?(g(),x("span",Lg,[$(P(Ee("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),ye("insecureSkipVerify")?(g(),x("span",Cg,[O(Y,{name:"lock",size:10}),$(P(ye("insecureSkipVerify")),1)])):N("",!0)])):(g(),ie(hn,{key:1,modelValue:gt.insecureSkipVerify,"onUpdate:modelValue":f[30]||(f[30]=k=>gt.insecureSkipVerify=k),options:ci},null,8,["modelValue"]))]),_:1})):N("",!0),O(_t,{title:"Base path",desc:"Working directory and health-check target, e.g. /uploads.",keywords:"base path directory folder root"},{default:mt(()=>[Ve("basePath")?(g(),x("span",Mg,[$(P(Ee("basePath").effective||"—")+" ",1),ye("basePath")?(g(),x("span",Og,[O(Y,{name:"lock",size:10}),$(P(ye("basePath")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[31]||(f[31]=k=>gt.basePath=k),class:"field w-64 font-mono",placeholder:"/uploads"},null,512)),[[vt,gt.basePath]])]),_:1}),u("div",Eg,[ke.value?N("",!0):(g(),x("button",{key:0,class:"btn-accent",disabled:le.value||!tt.available,onClick:Tr},P(le.value?"Saving…":Be.value?"Save organization settings":"Save settings"),9,zg)),Be.value?N("",!0):(g(),x("button",{key:1,class:"btn-ghost",disabled:me.value||!tt.available,onClick:Lr},P(me.value?"Testing…":"Test connection"),9,Ag)),Ht.value?(g(),x("span",Ig,P(Ht.value),1)):N("",!0),Te.value&&!Be.value?(g(),x("span",$g,"Checked "+P(kr()),1)):N("",!0),ve.value&&!Be.value?(g(),x("span",{key:4,class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Cr(ve.value.status)])},[f[87]||(f[87]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P(ve.value.detail||ve.value.status),1)],2)):N("",!0)])]),u("div",Dg,[u("div",Ng,[u("div",Rg,[O(Y,{name:"cloud",size:20})]),f[88]||(f[88]=u("div",{class:"min-w-0"},[u("div",{class:"text-sm font-semibold text-ink"},"WebDAV"),u("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to a WebDAV server (Nextcloud, ownCloud, IIS, …). Configure the connection your account uses. ")],-1))]),Vt.loaded&&!Vt.available?(g(),x("div",Fg,[O(Y,{name:"lock",size:14,class:"mr-1 inline"}),f[89]||(f[89]=$(" WebDAV is currently disabled by your administrator. Contact them to enable it. ",-1))])):N("",!0),Vt.canEditOrg?(g(),x("div",Bg,[f[90]||(f[90]=u("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),O(hn,{modelValue:ft.value,"onUpdate:modelValue":f[32]||(f[32]=k=>ft.value=k),options:_e},null,8,["modelValue"])])):N("",!0),an.value?(g(),ie(_t,{key:2,title:"Enable WebDAV (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin webdav organization"},{default:mt(()=>[O(nn,{"model-value":Vt.orgEnabled,disabled:!Vt.available,"onUpdate:modelValue":pi},null,8,["model-value","disabled"])]),_:1})):(g(),ie(_t,{key:3,title:"Enable WebDAV",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin webdav"},{default:mt(()=>[O(nn,{"model-value":Vt.enabled,disabled:!Vt.available||!Vt.orgEnabled,"onUpdate:modelValue":pi},null,8,["model-value","disabled"])]),_:1})),!an.value&&Vt.available&&!Vt.orgEnabled?(g(),x("div",Vg,[O(Y,{name:"lock",size:13,class:"mr-1 inline"}),f[92]||(f[92]=$("WebDAV is turned off for your organization",-1)),Vt.canEditOrg?(g(),x("span",Zg,[...f[91]||(f[91]=[$(" — switch to ",-1),u("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):N("",!0),f[93]||(f[93]=$(". ",-1))])):N("",!0),an.value?(g(),x("div",Ug,[O(Y,{name:"users",size:13,class:"mr-1 inline"}),f[94]||(f[94]=$("These are organization-wide settings — they apply to everyone in ",-1)),u("span",Hg,P(e.organizationName||"your organization"),1),f[95]||(f[95]=$(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):Os.value?(g(),x("div",jg," As a superadmin you manage the global WebDAV configuration in the API Server panel. The effective configuration is shown below. ")):N("",!0),O(_t,{block:"",title:"Server URL",desc:"WebDAV endpoint including scheme, e.g. https://cloud.example.com/remote.php/dav/files/alice/.",keywords:"url server address endpoint webdav host"},{default:mt(()=>[hi("baseURL")?(g(),x("span",Wg,[$(P(yn("baseURL").effective||"—")+" ",1),Ze("baseURL")?(g(),x("span",Kg,[O(Y,{name:"lock",size:10}),$(P(Ze("baseURL")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[33]||(f[33]=k=>ze.baseURL=k),class:"field w-full font-mono text-xs",placeholder:"https://cloud.example.com/remote.php/dav/files/alice/"},null,512)),[[vt,ze.baseURL]])]),_:1}),O(_t,{title:"Username",desc:"Account used to authenticate (leave blank for a public share).",keywords:"username login account"},{default:mt(()=>[hi("username")?(g(),x("span",Gg,[$(P(yn("username").effective||"—")+" ",1),Ze("username")?(g(),x("span",qg,[O(Y,{name:"lock",size:10}),$(P(Ze("username")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[34]||(f[34]=k=>ze.username=k),class:"field w-64",placeholder:"user"},null,512)),[[vt,ze.username]])]),_:1}),O(_t,{title:"Password",desc:"Password or app-specific token for HTTP Basic auth.",keywords:"password secret credentials token"},{default:mt(()=>[hi("password")?(g(),x("span",Yg,[$(P(yn("password").effective||"—")+" ",1),Ze("password")?(g(),x("span",Jg,[O(Y,{name:"lock",size:10}),$(P(Ze("password")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[35]||(f[35]=k=>ze.password=k),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[vt,ze.password]])]),_:1}),O(_t,{title:"TLS verification",desc:"Only affects HTTPS. Skip only for self-signed test servers.",keywords:"tls certificate verify insecure https"},{default:mt(()=>[hi("insecureSkipVerify")?(g(),x("span",Xg,[$(P(yn("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),Ze("insecureSkipVerify")?(g(),x("span",Qg,[O(Y,{name:"lock",size:10}),$(P(Ze("insecureSkipVerify")),1)])):N("",!0)])):(g(),ie(hn,{key:1,modelValue:ze.insecureSkipVerify,"onUpdate:modelValue":f[36]||(f[36]=k=>ze.insecureSkipVerify=k),options:yo},null,8,["modelValue"]))]),_:1}),O(_t,{title:"Base path",desc:"Working directory under the server URL and health-check target, e.g. /Documents.",keywords:"base path directory folder root"},{default:mt(()=>[hi("basePath")?(g(),x("span",t_,[$(P(yn("basePath").effective||"—")+" ",1),Ze("basePath")?(g(),x("span",e_,[O(Y,{name:"lock",size:10}),$(P(Ze("basePath")),1)])):N("",!0)])):ot((g(),x("input",{key:1,"onUpdate:modelValue":f[37]||(f[37]=k=>ze.basePath=k),class:"field w-64 font-mono",placeholder:"/Documents"},null,512)),[[vt,ze.basePath]])]),_:1}),u("div",n_,[Os.value?N("",!0):(g(),x("button",{key:0,class:"btn-accent",disabled:Ci.value||!Vt.available,onClick:xo},P(Ci.value?"Saving…":an.value?"Save organization settings":"Save settings"),9,i_)),an.value?N("",!0):(g(),x("button",{key:1,class:"btn-ghost",disabled:fi.value||!Vt.available,onClick:wo},P(fi.value?"Testing…":"Test connection"),9,s_)),di.value?(g(),x("span",o_,P(di.value),1)):N("",!0),tn.value&&!an.value?(g(),x("span",r_,"Checked "+P(Or()),1)):N("",!0),rn.value&&!an.value?(g(),x("span",{key:4,class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Mi(rn.value.status)])},[f[96]||(f[96]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P(rn.value.detail||rn.value.status),1)],2)):N("",!0)])])],64)):N("",!0),ss("drives-local")?(g(),x("div",a_,[u("div",l_,[u("div",u_,[O(Y,{name:"monitor",size:20})]),f[97]||(f[97]=u("div",{class:"min-w-0"},[u("div",{class:"text-sm font-semibold text-ink"},"Local Storage"),u("div",{class:"mt-0.5 text-xs text-ink-muted"}," A private folder on the server for your files. Each user has their own; members of an organization share one. ")],-1))]),X.loaded&&!X.available?(g(),x("div",c_,[O(Y,{name:"lock",size:14,class:"mr-1 inline"}),f[98]||(f[98]=$(" Local storage is currently disabled by your administrator. Contact them to enable it. ",-1))])):X.loaded&&!X.rootConfigured?(g(),x("div",d_,[O(Y,{name:"alertTriangle",size:14,class:"mr-1 inline"}),f[99]||(f[99]=$(" No storage root has been configured by your administrator yet. ",-1))])):N("",!0),X.canEditOrg?(g(),x("div",f_,[f[100]||(f[100]=u("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),O(hn,{modelValue:Qt.value,"onUpdate:modelValue":f[38]||(f[38]=k=>Qt.value=k),options:_e},null,8,["modelValue"])])):N("",!0),Se.value?(g(),ie(_t,{key:3,title:"Enable local storage (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin local storage folder organization"},{default:mt(()=>[O(nn,{"model-value":X.orgEnabled,disabled:!X.available,"onUpdate:modelValue":ns},null,8,["model-value","disabled"])]),_:1})):(g(),ie(_t,{key:4,title:"Enable local storage",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin local storage folder"},{default:mt(()=>[O(nn,{"model-value":X.enabled,disabled:!X.available||!X.orgEnabled,"onUpdate:modelValue":ns},null,8,["model-value","disabled"])]),_:1})),!Se.value&&X.available&&!X.orgEnabled?(g(),x("div",h_,[O(Y,{name:"lock",size:13,class:"mr-1 inline"}),f[102]||(f[102]=$("Local storage is turned off for your organization",-1)),X.canEditOrg?(g(),x("span",p_,[...f[101]||(f[101]=[$(" — switch to ",-1),u("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):N("",!0),f[103]||(f[103]=$(". ",-1))])):N("",!0),Se.value?(g(),x("div",m_,[O(Y,{name:"users",size:13,class:"mr-1 inline"}),f[104]||(f[104]=$("These are organization-wide settings — they apply to everyone in ",-1)),u("span",g_,P(e.organizationName||"your organization"),1),f[105]||(f[105]=$(", who all share the organization folder. Members can additionally enable a private folder inside it. ",-1))])):$e.value?(g(),x("div",__," As a superadmin you manage the global storage root in the API Server panel. The effective configuration is shown below. ")):N("",!0),Se.value?(g(),ie(_t,{key:8,title:"Private folders",desc:"Let members create a private folder inside the organization folder, reachable only by them.",keywords:"private folder members allow policy organization"},{default:mt(()=>[O(nn,{"model-value":X.allowPrivate,disabled:!X.available,"onUpdate:modelValue":ko},null,8,["model-value","disabled"])]),_:1})):N("",!0),Se.value?N("",!0):(g(),x(ct,{key:9},[O(_t,{block:"",title:"Your folders",desc:"Assigned automatically and isolated — no one else can reach your private folder.",keywords:"folder directory path storage location isolated private shared"},{default:mt(()=>[u("div",v_,[(g(!0),x(ct,null,Wt(X.mounts,k=>(g(),x("div",{key:k.id,class:"flex flex-wrap items-center gap-2"},[u("span",y_,P(k.path),1),k.kind==="shared"?(g(),x("span",b_,[O(Y,{name:"users",size:10}),f[106]||(f[106]=$("Shared with your organization",-1))])):(g(),x("span",x_,[O(Y,{name:"lock",size:10}),f[107]||(f[107]=$("Private to you",-1))])),Wn.value[k.id]?(g(),x("span",{key:2,class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-semibold",It(Wn.value[k.id].status)])},[f[108]||(f[108]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P(Wn.value[k.id].status),1)],2)):N("",!0)]))),128)),X.mounts.length?N("",!0):(g(),x("div",w_,P(X.rootConfigured?"No folder assigned yet.":"Waiting for the administrator to configure a storage root."),1))])]),_:1}),X.isOrgUser&&X.allowPrivate?(g(),ie(_t,{key:0,title:"My private folder",desc:"Add a private folder inside the organization folder, reachable only by you — you keep the shared folder too.",keywords:"private folder personal isolated organization inside"},{default:mt(()=>[O(nn,{"model-value":X.privateFolder,disabled:!X.available||!X.orgEnabled,"onUpdate:modelValue":is},null,8,["model-value","disabled"])]),_:1})):X.isOrgUser&&!X.allowPrivate?(g(),x("div",k_,[O(Y,{name:"lock",size:13,class:"mr-1 inline"}),f[109]||(f[109]=$("Private folders are turned off by your organization. ",-1))])):N("",!0)],64)),O(_t,{title:"Access mode",desc:"Read-only prevents uploads, deletes and folder creation.",keywords:"read only write access mode permission"},{default:mt(()=>[En("readOnly")?(g(),x("span",S_,[$(P(Ei(ge("readOnly").effective))+" ",1),gi("readOnly")?(g(),x("span",P_,[O(Y,{name:"lock",size:10}),$(P(gi("readOnly")),1)])):N("",!0)])):(g(),ie(hn,{key:1,modelValue:jn.value,"onUpdate:modelValue":f[39]||(f[39]=k=>jn.value=k),options:Oi},null,8,["modelValue"]))]),_:1}),u("div",T_,[$e.value?N("",!0):(g(),x("button",{key:0,class:"btn-accent",disabled:bn.value||!X.available,onClick:Rs},P(bn.value?"Saving…":Se.value?"Save organization settings":"Save settings"),9,L_)),Se.value?N("",!0):(g(),x("button",{key:1,class:"btn-ghost",disabled:mi.value||!X.available,onClick:Ar},P(mi.value?"Testing…":"Test folder"),9,C_)),ln.value?(g(),x("span",M_,P(ln.value),1)):N("",!0),oe.value&&!Se.value?(g(),x("span",O_,"Checked "+P($s()),1)):N("",!0),Pt.value&&!Se.value?(g(),x("span",{key:4,class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",It(Pt.value.status)])},[f[110]||(f[110]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P(Pt.value.detail||Pt.value.status),1)],2)):N("",!0)])])):N("",!0)])):H.id==="profile"?(g(),x("div",E_,[O(_t,{block:"",title:"Profile photo",desc:"PNG or JPG, up to ~1.5 MB. Stored on this device.",keywords:"avatar photo picture"},{default:mt(()=>[u("div",z_,[$t(Tt).avatar?(g(),x("img",{key:0,src:$t(Tt).avatar,alt:"Avatar",class:"h-16 w-16 rounded-full object-cover"},null,8,A_)):(g(),x("div",I_,P(To.value),1)),u("div",$_,[u("label",D_,[O(Y,{name:"upload",size:15,class:"mr-1.5 inline"}),f[111]||(f[111]=$("Upload ",-1)),u("input",{type:"file",accept:"image/*",class:"hidden",onChange:Po},null,32)]),$t(Tt).avatar?(g(),x("button",{key:0,class:"btn-ghost",onClick:Ir},"Remove")):N("",!0)])])]),_:1}),O(_t,{title:"Display name",desc:"The name shown on your public profile.",keywords:"display name profile"},{default:mt(()=>[ot(u("input",{"onUpdate:modelValue":f[40]||(f[40]=k=>$t(Tt).displayName=k),class:"field w-56",placeholder:"Jane O.",onBlur:f[41]||(f[41]=k=>jt("Saved."))},null,544),[[vt,$t(Tt).displayName]])]),_:1}),O(_t,{block:"",title:"Bio",desc:"A short description others can see.",keywords:"bio about description"},{default:mt(()=>[ot(u("textarea",{"onUpdate:modelValue":f[42]||(f[42]=k=>$t(Tt).bio=k),rows:"3",maxlength:"240",class:"field w-full resize-none",placeholder:"Flight director, North yard operations…",onBlur:f[43]||(f[43]=k=>jt("Saved."))},null,544),[[vt,$t(Tt).bio]]),u("div",N_,P(($t(Tt).bio||"").length)+"/240",1)]),_:1}),O(_t,{title:"Show email on profile",desc:"Let teammates see your email address.",keywords:"show email public visibility"},{default:mt(()=>[O(nn,{modelValue:$t(Tt).showEmail,"onUpdate:modelValue":f[44]||(f[44]=k=>$t(Tt).showEmail=k)},null,8,["modelValue"])]),_:1})])):H.id==="security"?(g(),x("div",R_,[O(_t,{block:"",title:"Two-factor authentication",desc:"Require a one-time code at sign-in.",keywords:"two factor 2fa authentication security"},{default:mt(()=>[u("div",F_,[u("span",{class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",$t(Tt).twoFactor?"bg-success-soft text-success-fg":"bg-surface-2 text-ink-secondary"])},[f[112]||(f[112]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P($t(Tt).twoFactor?"Enabled":"Disabled"),1)],2),!$t(Tt).twoFactor&&!Kn.value?(g(),x("button",{key:0,class:"btn-accent",onClick:Ii},"Enable 2FA")):$t(Tt).twoFactor?(g(),x("button",{key:1,class:"btn-ghost",onClick:$r},"Disable")):N("",!0)]),Kn.value?(g(),x("div",B_,[u("div",V_,[f[114]||(f[114]=u("div",{class:"grid h-28 w-28 place-items-center rounded bg-white p-2"},[u("svg",{viewBox:"0 0 100 100",class:"h-full w-full"},[u("rect",{width:"100",height:"100",fill:"#fff"}),u("g",{fill:"#0F1E3D"},[u("rect",{x:"6",y:"6",width:"24",height:"24"}),u("rect",{x:"70",y:"6",width:"24",height:"24"}),u("rect",{x:"6",y:"70",width:"24",height:"24"}),u("rect",{x:"12",y:"12",width:"12",height:"12",fill:"#fff"}),u("rect",{x:"76",y:"12",width:"12",height:"12",fill:"#fff"}),u("rect",{x:"12",y:"76",width:"12",height:"12",fill:"#fff"}),u("rect",{x:"40",y:"10",width:"8",height:"8"}),u("rect",{x:"52",y:"20",width:"8",height:"8"}),u("rect",{x:"40",y:"40",width:"8",height:"8"}),u("rect",{x:"60",y:"44",width:"8",height:"8"}),u("rect",{x:"44",y:"60",width:"8",height:"8"}),u("rect",{x:"70",y:"60",width:"8",height:"8"}),u("rect",{x:"80",y:"72",width:"8",height:"8"}),u("rect",{x:"60",y:"80",width:"8",height:"8"})])])],-1)),u("div",Z_,[f[113]||(f[113]=u("div",{class:"text-xs text-ink-secondary"},"Scan with an authenticator app, or enter this secret:",-1)),u("div",U_,P(Lo.value),1),u("div",H_,[ot(u("input",{"onUpdate:modelValue":f[45]||(f[45]=k=>Ai.value=k),inputmode:"numeric",maxlength:"6",class:"field w-28 font-mono tracking-[0.3em]",placeholder:"000000"},null,512),[[vt,Ai.value]]),u("button",{class:"btn-accent",onClick:Co},"Verify & enable")]),Zt.value?(g(),x("p",j_,P(Zt.value),1)):N("",!0)])])])):N("",!0),$t(Tt).twoFactor&&os.value.length?(g(),x("div",W_,[f[115]||(f[115]=u("div",{class:"text-xs font-semibold text-ink"},"Recovery codes",-1)),f[116]||(f[116]=u("div",{class:"mt-0.5 text-xs text-ink-muted"},"Store these somewhere safe — each works once.",-1)),u("div",K_,[(g(!0),x(ct,null,Wt(os.value,k=>(g(),x("span",{key:k,class:"select-all"},P(k),1))),128))])])):N("",!0),f[117]||(f[117]=u("p",{class:"mt-2 text-xs text-ink-muted"},"Prototype — codes are generated locally until the account service verifies them.",-1))]),_:1}),O(_t,{block:"",title:"Active sessions",desc:"Devices currently signed in to your account.",keywords:"sessions devices logout sign out remote"},{default:mt(()=>[u("div",G_,[u("div",q_,[u("div",Y_,[O(Y,{name:"monitor",size:18})]),u("div",J_,[u("div",X_,[$(P(Dr())+" on "+P(Mo())+" ",1),f[118]||(f[118]=u("span",{class:"ml-1 rounded-full bg-success-soft px-2 py-0.5 text-[10px] font-semibold text-success-fg"},"This device",-1))]),u("div",Q_,"Signed in "+P($t(Yl)($t(Nr))),1)]),u("button",{class:"btn-ghost",onClick:f[46]||(f[46]=k=>a("logout"))},"Log out")])]),f[119]||(f[119]=u("button",{class:"btn-ghost mt-2 opacity-60",disabled:"",title:"Requires the account service"}," Log out all other devices ",-1)),f[120]||(f[120]=u("p",{class:"mt-2 text-xs text-ink-muted"}," Only this session is visible from the browser; enumerating and revoking remote sessions needs the account service. ",-1))]),_:1})])):H.id==="team"?(g(),x("div",tv,[Gt.id?(g(),x("div",ev,[O(_t,{block:"",title:`Edit user — ${Gt.email}`,desc:"Update details, change role, reset password, or set verified.",keywords:"edit user update role password verified organization"},{default:mt(()=>[u("div",nv,[u("div",iv,[ot(u("input",{"onUpdate:modelValue":f[47]||(f[47]=k=>Gt.email=k),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[vt,Gt.email]]),ot(u("select",{"onUpdate:modelValue":f[48]||(f[48]=k=>Gt.role=k),class:"field w-32",disabled:ls.value,title:ls.value?"You cannot change your own role":""},[(g(!0),x(ct,null,Wt(Fs.value,k=>(g(),x("option",{key:k.value,value:k.value},P(k.label),9,ov))),128))],8,sv),[[sn,Gt.role]])]),l.value?ot((g(),x("select",{key:0,"onUpdate:modelValue":f[49]||(f[49]=k=>Gt.organization=k),class:"field",title:"Organization"},[(g(!0),x(ct,null,Wt(Oo.value,k=>(g(),x("option",{key:k.value,value:k.value},P(k.label),9,rv))),128))],512)),[[sn,Gt.organization]]):N("",!0),ot(u("input",{"onUpdate:modelValue":f[50]||(f[50]=k=>Gt.password=k),type:"password",class:"field",placeholder:"New password (leave blank to keep current)"},null,512),[[vt,Gt.password]]),u("label",av,[O(nn,{modelValue:Gt.verified,"onUpdate:modelValue":f[51]||(f[51]=k=>Gt.verified=k)},null,8,["modelValue"]),f[121]||(f[121]=$(" Email verified ",-1))]),u("div",lv,[u("button",{class:"btn-accent",disabled:Ri.value,onClick:Br},P(Ri.value?"Saving…":"Save changes"),9,uv),u("button",{class:"btn-ghost",onClick:In},"Cancel"),An.value?(g(),x("span",cv,P(An.value),1)):N("",!0),ls.value?(g(),x("span",dv,"Editing your own account — role locked.")):N("",!0)])])]),_:1},8,["title"])])):(g(),x("div",fv,[O(_t,{block:"",title:"Add user",desc:"Create a new account. Admins add users within their organization; superadmins can target any.",keywords:"add user create account role admin organization"},{default:mt(()=>[u("div",hv,[u("div",pv,[ot(u("input",{"onUpdate:modelValue":f[52]||(f[52]=k=>re.email=k),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[vt,re.email]]),ot(u("select",{"onUpdate:modelValue":f[53]||(f[53]=k=>re.role=k),class:"field w-32"},[(g(!0),x(ct,null,Wt(Fs.value,k=>(g(),x("option",{key:k.value,value:k.value},P(k.label),9,mv))),128))],512),[[sn,re.role]])]),l.value?ot((g(),x("select",{key:0,"onUpdate:modelValue":f[54]||(f[54]=k=>re.organization=k),class:"field",title:"Organization"},[(g(!0),x(ct,null,Wt(Oo.value,k=>(g(),x("option",{key:k.value,value:k.value},P(k.label),9,gv))),128))],512)),[[sn,re.organization]]):(g(),x("div",_v,[f[122]||(f[122]=$(" New users join your organization: ",-1)),u("span",vv,P(e.organizationName||"—"),1)])),ot(u("input",{"onUpdate:modelValue":f[55]||(f[55]=k=>re.password=k),type:"password",class:"field",placeholder:"Temporary password (min 8 chars)"},null,512),[[vt,re.password]]),u("div",yv,[u("button",{class:"btn-accent",disabled:$i.value,onClick:Rr},P($i.value?"Creating…":"Create user"),9,bv),yi.value?(g(),x("span",xv,P(yi.value),1)):N("",!0)])])]),_:1})])),u("div",wv,[u("div",kv,[f[123]||(f[123]=u("div",null,[u("div",{class:"eyebrow"},"Team"),u("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All users")],-1)),u("button",{class:"btn-ghost",disabled:Gn.value,onClick:Yn},P(Gn.value?"Loading…":"Refresh"),9,Sv)]),as.value?(g(),x("div",Pv,P(as.value),1)):!rs.value.length&&!Gn.value?(g(),x("div",Tv,"No users yet.")):(g(),x("div",Lv,[u("table",Cv,[u("thead",null,[u("tr",Mv,[(g(),x(ct,null,Wt(["User","Role","Organization","Status",""],k=>u("th",{key:k,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},P(k),1)),64))])]),u("tbody",null,[(g(!0),x(ct,null,Wt(rs.value,k=>(g(),x("tr",{key:k.id,class:Ct(["border-b border-line last:border-0",Gt.id===k.id?"bg-accent-soft":""])},[u("td",Ov,[u("span",Ev,P(k.email),1),k.email===e.email?(g(),x("span",zv,"(you)")):N("",!0)]),u("td",Av,[u("span",{class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",y(k.role||"user")])},[O(Y,{name:_(k.role||"user"),size:12},null,8,["name"]),$(P(h(k.role||"user")),1)],2)]),u("td",Iv,[u("span",{class:Ct(["text-sm",k.organizationName?"text-ink-secondary":"text-ink-muted"])},P(k.organizationName||"—"),3)]),u("td",$v,[u("span",{class:Ct(["text-xs",k.verified?"text-success-fg":"text-ink-muted"])},P(k.verified?"Verified":"Unverified"),3)]),u("td",Dv,[Ye.value===k.id?(g(),x(ct,{key:0},[f[124]||(f[124]=u("span",{class:"mr-2 text-xs text-ink-muted"},"Remove?",-1)),u("button",{class:"btn-ghost mr-1",onClick:f[56]||(f[56]=qt=>Ye.value="")},"Cancel"),u("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:qt=>Fr(k)}," Remove ",8,Nv)],64)):(g(),x("div",Rv,[u("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:qt=>us(k)},[O(Y,{name:"settings",size:14}),f[125]||(f[125]=$(" Edit ",-1))],8,Fv),k.email!==e.email?(g(),x("button",{key:0,class:"btn-ghost inline-flex items-center gap-1.5",onClick:qt=>Ye.value=k.id},[O(Y,{name:"trash",size:14}),f[126]||(f[126]=$(" Remove ",-1))],8,Bv)):N("",!0)]))])],2))),128))])])]))])])):H.id==="organizations"?(g(),x("div",Vv,[kn.id?(g(),x("div",Zv,[O(_t,{block:"",title:"Rename organization",desc:"Update the organization's display name.",keywords:"rename organization edit"},{default:mt(()=>[u("div",Uv,[ot(u("input",{"onUpdate:modelValue":f[57]||(f[57]=k=>kn.name=k),class:"field",placeholder:"Organization name",onKeyup:Vl(zo,["enter"])},null,544),[[vt,kn.name]]),u("div",Hv,[u("button",{class:"btn-accent",onClick:zo},"Save changes"),u("button",{class:"btn-ghost",onClick:Bs},"Cancel"),Sn.value?(g(),x("span",jv,P(Sn.value),1)):N("",!0)])])]),_:1})])):(g(),x("div",Wv,[O(_t,{block:"",title:"Add organization",desc:"Create a new organization. Assign admins and users to it from User management.",keywords:"add organization create tenant company"},{default:mt(()=>[u("div",Kv,[ot(u("input",{"onUpdate:modelValue":f[58]||(f[58]=k=>$n.name=k),class:"field",placeholder:"e.g. Northwind Aerial",onKeyup:Vl(Eo,["enter"])},null,544),[[vt,$n.name]]),u("div",Gv,[u("button",{class:"btn-accent",disabled:Fi.value,onClick:Eo},P(Fi.value?"Creating…":"Create organization"),9,qv),Ce.value?(g(),x("span",Yv,P(Ce.value),1)):N("",!0)])])]),_:1})])),u("div",Jv,[u("div",{class:"flex items-center justify-between px-5 py-4"},[f[127]||(f[127]=u("div",null,[u("div",{class:"eyebrow"},"Tenancy"),u("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All organizations")],-1)),u("button",{class:"btn-ghost",onClick:qn},"Refresh")]),Di.value.length?(g(),x("div",Qv,[u("table",ty,[u("thead",null,[u("tr",ey,[(g(),x(ct,null,Wt(["Organization","Members",""],k=>u("th",{key:k,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},P(k),1)),64))])]),u("tbody",null,[(g(!0),x(ct,null,Wt(Di.value,k=>(g(),x("tr",{key:k.id,class:Ct(["border-b border-line last:border-0",kn.id===k.id?"bg-accent-soft":""])},[u("td",ny,[u("span",iy,[O(Y,{name:"grid",size:14,class:"text-ink-muted"}),$(P(k.name),1)])]),u("td",sy,P(Bi.value[k.id]||0),1),u("td",oy,[bi.value===k.id?(g(),x(ct,{key:0},[f[128]||(f[128]=u("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),u("button",{class:"btn-ghost mr-1",onClick:f[59]||(f[59]=qt=>bi.value="")},"Cancel"),u("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:qt=>en(k)}," Delete ",8,ry)],64)):(g(),x("div",ay,[u("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:qt=>Vr(k)},[O(Y,{name:"settings",size:14}),f[129]||(f[129]=$(" Rename ",-1))],8,ly),u("button",{class:"btn-ghost inline-flex items-center gap-1.5",disabled:(Bi.value[k.id]||0)>0,title:(Bi.value[k.id]||0)>0?"Reassign or remove members first":"",onClick:qt=>bi.value=k.id},[O(Y,{name:"trash",size:14}),f[130]||(f[130]=$(" Delete ",-1))],8,uy)]))])],2))),128))])])])):(g(),x("div",Xv,"No organizations yet."))])])):H.id==="advanced"?(g(),x("div",cy,[u("div",dy,[O(_t,{title:"Export data",desc:"Download your settings and profile as JSON.",keywords:"export data download backup"},{default:mt(()=>[u("button",{class:"btn-ghost",onClick:xi},[O(Y,{name:"download",size:15,class:"mr-1.5 inline"}),f[131]||(f[131]=$("Export",-1))])]),_:1}),O(_t,{block:"",title:"Import data",desc:"Restore settings from a previous export.",keywords:"import data upload restore"},{default:mt(()=>[u("label",fy,[O(Y,{name:"upload",size:15,class:"mr-1.5 inline"}),f[132]||(f[132]=$("Choose file… ",-1)),u("input",{type:"file",accept:"application/json,.json",class:"hidden",onChange:Pn},null,32)]),cs.value?(g(),x("p",hy,P(cs.value),1)):N("",!0)]),_:1})]),u("div",py,[u("div",my,[O(Y,{name:"alertTriangle",size:18}),f[133]||(f[133]=u("h3",{class:"text-sm font-bold uppercase tracking-caps"},"Danger zone",-1))]),f[138]||(f[138]=u("p",{class:"mt-1 text-xs text-ink-secondary"},"Deleting your account is permanent and cannot be undone.",-1)),u("div",gy,[f[137]||(f[137]=u("div",{class:"text-sm font-semibold text-ink"},"Delete account",-1)),u("label",_y,[ot(u("input",{"onUpdate:modelValue":f[60]||(f[60]=k=>de.understand=k),type:"checkbox",class:"mt-0.5 h-4 w-4 accent-[var(--danger)]"},null,512),[[rr,de.understand]]),f[134]||(f[134]=$(" I understand this permanently deletes my account and all associated data. ",-1))]),u("div",vy,[u("label",yy,[f[135]||(f[135]=$("Type ",-1)),u("span",by,P(Vs.value),1),f[136]||(f[136]=$(" to confirm",-1))]),ot(u("input",{"onUpdate:modelValue":f[61]||(f[61]=k=>de.typed=k),class:"field w-full max-w-[360px] font-mono",placeholder:Vs.value},null,8,xy),[[vt,de.typed]])]),u("div",wy,[de.armed?(g(),x("button",{key:1,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50",disabled:de.cooldown>0,onClick:ds},P(de.cooldown>0?`Confirm in ${de.cooldown}s…`:"Permanently delete account"),9,Sy)):(g(),x("button",{key:0,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-40",disabled:!Jn.value,onClick:Ao}," Delete account… ",8,ky)),de.armed&&de.cooldown>0?(g(),x("span",Py,"Cooling-off period — read once more.")):N("",!0)]),de.msg?(g(),x("p",Ty,P(de.msg),1)):N("",!0)])])])):N("",!0)],64))),128))])]),O(Qf,{name:"fade"},{default:mt(()=>[_i.value?(g(),x("div",Ly,[O(Y,{name:"check",size:16,class:"text-success-fg"}),$(P(_i.value),1)])):N("",!0)]),_:1})]))}},My=Wp(Cy,[["__scopeId","data-v-4fe25eb7"]]),Oy={class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},Ey={class:"flex flex-wrap items-center gap-3"},zy={class:"inline-flex rounded-lg border border-line bg-surface-1 p-0.5"},Ay=["onClick"],Iy={class:"ml-auto flex items-center gap-2"},$y=["href"],Dy={class:"grid grid-cols-4 gap-4 max-[900px]:grid-cols-2"},Ny={class:"eyebrow"},Ry={key:0,class:"panel border-danger/40 p-4 text-sm text-danger-fg"},Fy={key:0,class:"panel p-5"},By={class:"mb-4 flex items-center justify-between"},Vy={class:"eyebrow"},Zy={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},Uy={class:"block"},Hy={class:"block"},jy={class:"block"},Wy={class:"block"},Ky={key:0,value:""},Gy=["value"],qy={class:"block"},Yy={class:"block"},Jy={class:"block"},Xy={class:"block"},Qy={class:"block"},t1=["value"],e1={class:"block"},n1=["value"],i1={class:"block"},s1=["value"],o1={class:"block"},r1={class:"mt-3 block"},a1={key:0,class:"mt-3 grid grid-cols-2 gap-3 max-[760px]:grid-cols-1"},l1={class:"block"},u1={class:"block"},c1={class:"block"},d1={class:"block"},f1={class:"col-span-2 block max-[760px]:col-span-1"},h1={class:"mt-4 flex items-center gap-3"},p1=["disabled"],m1={key:0,class:"text-sm text-danger-fg"},g1={class:"panel overflow-hidden p-0"},_1={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},v1={key:1,class:"grid place-items-center px-5 py-16 text-center"},y1={key:2,class:"overflow-x-auto"},b1={class:"w-full border-collapse text-sm"},x1={class:"text-left"},w1={class:"whitespace-nowrap px-5 py-3 font-mono text-ink"},k1={key:0,class:"text-ink-muted"},S1={class:"px-5 py-3 text-ink-secondary"},P1=["title"],T1={class:"px-5 py-3 font-mono text-ink-secondary"},L1={class:"px-5 py-3 text-ink-secondary"},C1={class:"px-5 py-3"},M1=["onClick"],O1={class:"whitespace-nowrap px-5 py-3 text-right"},E1=["onClick"],z1=["onClick"],A1=["onClick"],I1={key:0,class:"border-b border-line bg-surface-2"},$1={colspan:"7",class:"px-5 py-3"},D1={class:"flex flex-wrap gap-x-8 gap-y-1.5 text-xs"},N1={class:"text-ink-secondary"},R1={class:"text-ink"},F1={class:"text-ink-secondary"},B1={class:"text-ink"},V1={class:"text-ink-secondary"},Z1={class:"font-mono text-ink"},U1={key:0,class:"text-ink-secondary"},H1={class:"text-ink"},j1={key:0,class:"mt-2 space-y-1"},W1={key:1,class:"mt-2 text-xs text-success-fg"},K1={key:0,class:"panel p-5"},G1={class:"mb-4 flex items-center justify-between"},q1={class:"eyebrow"},Y1={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},J1={class:"block"},X1={class:"block"},Q1={class:"block"},tb={class:"block"},eb={class:"block"},nb={class:"block"},ib=["value"],sb={class:"mt-3 flex flex-wrap gap-6"},ob={class:"flex items-center gap-2 text-sm text-ink-secondary"},rb={class:"flex items-center gap-2 text-sm text-ink-secondary"},ab={class:"mt-4 flex items-center gap-3"},lb=["disabled"],ub={key:0,class:"text-sm text-danger-fg"},cb={class:"panel overflow-hidden p-0"},db={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},fb={key:1,class:"grid place-items-center px-5 py-16 text-center"},hb={key:2,class:"overflow-x-auto"},pb={class:"w-full border-collapse text-sm"},mb={class:"text-left"},gb={class:"px-5 py-3 font-semibold text-ink"},_b={class:"px-5 py-3 text-ink-secondary"},vb={class:"px-5 py-3 font-mono text-ink-secondary"},yb={class:"px-5 py-3"},bb={key:1,class:"text-ink-muted"},xb={class:"px-5 py-3"},wb={class:"whitespace-nowrap px-5 py-3 text-right"},kb=["onClick"],Sb=["onClick"],Pb=["onClick"],Tb={__name:"Logbook",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},setup(e){const i=e,o={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},a=G("flights"),l=G([]),d=G([]),h=G(!1),_=G("");async function y(){h.value=!0,_.value="";const[j,C]=await Promise.all([ip(),ap()]);(!j.ok||!C.ok)&&(_.value=j.status===503||C.status===503?"Logbook storage is not configured on the API Server (service account missing).":"Could not load the logbook."),l.value=j.drones,d.value=C.flights,h.value=!1}Yi(y);function T(j){const C=j.compliance||{};return C.exempt?{tone:"neutral",label:"Exempt"}:(C.redFlags||[]).length?{tone:"danger",label:`${C.redFlags.length} issue${C.redFlags.length>1?"s":""}`}:{tone:"success",label:"Compliant"}}const w=G("");function A(j){w.value=w.value===j?"":j}const U=[{value:"open",label:"Open"},{value:"specific",label:"Specific"},{value:"certified",label:"Certified"}],V=[{value:"commercial",label:"Commercial"},{value:"research",label:"Research"},{value:"public",label:"Public-benefit"},{value:"hobby",label:"Private hobby"},{value:"club_area",label:"Model-club area"}],rt=[{value:"",label:"Auto (from drone)"},{value:"manual",label:"Manual"},{value:"automatic",label:"Automatic (FDR)"}];function Q(){var j;return{operationDate:new Date().toISOString().slice(0,10),startTime:"",endTime:"",drone:((j=l.value[0])==null?void 0:j.id)||"",areaRoute:"",maxAltitudeAgl:"",pilotName:i.email,certificateRef:"",category:"open",purpose:"commercial",loggingPath:"",rawFdrLogUrl:"",authorisationRef:"",weather:"",airspaceRef:"",observer:"",incidents:"",notes:""}}const Ot=G(!1),Mt=G(""),q=xe(Q()),dt=G(""),it=G(!1),ht=G(!1);function Kt(){Object.assign(q,Q()),Mt.value="",dt.value="",ht.value=!1,Ot.value=!0}function he(j){Object.assign(q,{operationDate:(j.operationDate||"").slice(0,10),startTime:j.startTime||"",endTime:j.endTime||"",drone:j.drone||"",areaRoute:j.areaRoute||"",maxAltitudeAgl:j.maxAltitudeAgl||"",pilotName:j.pilotName||"",certificateRef:j.certificateRef||"",category:j.category||"open",purpose:j.purpose||"commercial",loggingPath:j.loggingPath||"",rawFdrLogUrl:j.rawFdrLogUrl||"",authorisationRef:j.authorisationRef||"",weather:j.weather||"",airspaceRef:j.airspaceRef||"",observer:j.observer||"",incidents:j.incidents||"",notes:j.notes||""}),Mt.value=j.id,dt.value="",ht.value=!!(j.weather||j.airspaceRef||j.observer||j.incidents||j.notes),Ot.value=!0}function pe(){Ot.value=!1,Mt.value=""}async function St(){var E;if(dt.value="",!q.drone){dt.value="Select a drone first (add one on the Drones tab).";return}it.value=!0;const j={...q,maxAltitudeAgl:Number(q.maxAltitudeAgl)||0},C=Mt.value?await up(Mt.value,j):await lp(j);if(it.value=!1,!C.ok){dt.value=((E=C.body)==null?void 0:E.error)||"Could not save the flight.";return}Ot.value=!1,await y()}const Nt=G("");async function Et(j){const C=await cp(j.id);Nt.value="",C.ok&&await y()}const nt=["","C0","C1","C2","C3","C4","C5","C6"];function ut(){return{name:"",model:"",serial:"",operatorNumber:"",mtomGrams:"",isToy:!1,autologsFlights:!1,cClass:""}}const zt=G(!1),Ft=G(""),lt=xe(ut()),At=G(""),et=G(!1);function ce(){Object.assign(lt,ut()),Ft.value="",At.value="",zt.value=!0}function pt(j){Object.assign(lt,{name:j.name||"",model:j.model||"",serial:j.serial||"",operatorNumber:j.operatorNumber||"",mtomGrams:j.mtomGrams||"",isToy:!!j.isToy,autologsFlights:!!j.autologsFlights,cClass:j.cClass||""}),Ft.value=j.id,At.value="",zt.value=!0}function kt(){zt.value=!1,Ft.value=""}async function Yt(){var E;if(At.value="",!lt.name.trim()){At.value="Give the drone a name.";return}et.value=!0;const j={...lt,mtomGrams:Number(lt.mtomGrams)||0},C=Ft.value?await op(Ft.value,j):await sp(j);if(et.value=!1,!C.ok){At.value=((E=C.body)==null?void 0:E.error)||"Could not save the drone.";return}zt.value=!1,await y()}const ae=G("");async function Jt(j){var E;const C=await rp(j.id);ae.value="",C.ok?await y():At.value=((E=C.body)==null?void 0:E.error)||"Could not delete the drone."}const Bt=xt(()=>{const j=d.value.length,C=d.value.filter(_e=>{var se;return(((se=_e.compliance)==null?void 0:se.redFlags)||[]).length}).length,E=d.value.filter(_e=>{var se;return(se=_e.compliance)==null?void 0:se.required}).length;return{total:j,flagged:C,required:E,fleet:l.value.length}});return(j,C)=>(g(),x("div",Oy,[u("div",Ey,[u("div",zy,[(g(),x(ct,null,Wt([["flights","Flights"],["drones","Drones"]],E=>u("button",{key:E[0],class:Ct(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",a.value===E[0]?"bg-accent-soft text-accent-soft-fg":"text-ink-secondary hover:text-ink"]),onClick:_e=>a.value=E[0]},P(E[1]),11,Ay)),64))]),u("div",Iy,[u("a",{href:$t(dp)(),class:"btn-ghost inline-flex items-center gap-2",title:"Download a compliance CSV (Trafikstyrelsen / police disclosure)"},[O(Y,{name:"download",size:15}),C[29]||(C[29]=$(" Export CSV ",-1))],8,$y),a.value==="flights"?(g(),x("button",{key:0,class:"btn-accent inline-flex items-center gap-2",onClick:Kt},[O(Y,{name:"plus",size:15}),C[30]||(C[30]=$(" Log flight ",-1))])):(g(),x("button",{key:1,class:"btn-accent inline-flex items-center gap-2",onClick:ce},[O(Y,{name:"plus",size:15}),C[31]||(C[31]=$(" Add drone ",-1))]))])]),u("div",Dy,[(g(!0),x(ct,null,Wt([{label:"Flights logged",value:Bt.value.total,tone:"neutral"},{label:"Require logbook",value:Bt.value.required,tone:"neutral"},{label:"Compliance flags",value:Bt.value.flagged,tone:Bt.value.flagged?"danger":"success"},{label:"Registered drones",value:Bt.value.fleet,tone:"neutral"}],E=>(g(),x("div",{key:E.label,class:"panel p-5"},[u("div",Ny,P(E.label),1),u("div",{class:Ct(["mt-2 text-[30px] font-bold leading-none tracking-tightest",E.tone==="danger"?"text-danger-fg":E.tone==="success"?"text-success-fg":"text-ink"])},P(E.value),3)]))),128))]),_.value?(g(),x("div",Ry,P(_.value),1)):N("",!0),a.value==="flights"?(g(),x(ct,{key:1},[Ot.value?(g(),x("div",Fy,[u("div",By,[u("div",null,[u("div",Vy,P(Mt.value?"Edit entry":"New entry"),1),C[32]||(C[32]=u("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Logbook flight (BEK 1649 §5)",-1))]),u("button",{class:"btn-icon",onClick:pe},[O(Y,{name:"x",size:16})])]),u("div",Zy,[u("label",Uy,[C[33]||(C[33]=u("span",{class:"eyebrow mb-1 block"},"Date",-1)),ot(u("input",{"onUpdate:modelValue":C[0]||(C[0]=E=>q.operationDate=E),type:"date",class:"field"},null,512),[[vt,q.operationDate]])]),u("label",Hy,[C[34]||(C[34]=u("span",{class:"eyebrow mb-1 block"},"Start",-1)),ot(u("input",{"onUpdate:modelValue":C[1]||(C[1]=E=>q.startTime=E),type:"time",class:"field"},null,512),[[vt,q.startTime]])]),u("label",jy,[C[35]||(C[35]=u("span",{class:"eyebrow mb-1 block"},"End",-1)),ot(u("input",{"onUpdate:modelValue":C[2]||(C[2]=E=>q.endTime=E),type:"time",class:"field"},null,512),[[vt,q.endTime]])]),u("label",Wy,[C[36]||(C[36]=u("span",{class:"eyebrow mb-1 block"},"Drone",-1)),ot(u("select",{"onUpdate:modelValue":C[3]||(C[3]=E=>q.drone=E),class:"field"},[l.value.length?N("",!0):(g(),x("option",Ky,"— add a drone first —")),(g(!0),x(ct,null,Wt(l.value,E=>(g(),x("option",{key:E.id,value:E.id},P(E.name)+P(E.model?` · ${E.model}`:""),9,Gy))),128))],512),[[sn,q.drone]])]),u("label",qy,[C[37]||(C[37]=u("span",{class:"eyebrow mb-1 block"},"Max altitude (m AGL)",-1)),ot(u("input",{"onUpdate:modelValue":C[4]||(C[4]=E=>q.maxAltitudeAgl=E),type:"number",min:"0",class:"field",placeholder:"120"},null,512),[[vt,q.maxAltitudeAgl]])]),u("label",Yy,[C[38]||(C[38]=u("span",{class:"eyebrow mb-1 block"},"Area / route",-1)),ot(u("input",{"onUpdate:modelValue":C[5]||(C[5]=E=>q.areaRoute=E),class:"field",placeholder:"Field N of Roskilde, grid survey"},null,512),[[vt,q.areaRoute]])]),u("label",Jy,[C[39]||(C[39]=u("span",{class:"eyebrow mb-1 block"},"Remote pilot name",-1)),ot(u("input",{"onUpdate:modelValue":C[6]||(C[6]=E=>q.pilotName=E),class:"field",placeholder:"Full name"},null,512),[[vt,q.pilotName]])]),u("label",Xy,[C[40]||(C[40]=u("span",{class:"eyebrow mb-1 block"},"Certificate ref",-1)),ot(u("input",{"onUpdate:modelValue":C[7]||(C[7]=E=>q.certificateRef=E),class:"field",placeholder:"A2 / STS cert no."},null,512),[[vt,q.certificateRef]])]),u("label",Qy,[C[41]||(C[41]=u("span",{class:"eyebrow mb-1 block"},"Logging path",-1)),ot(u("select",{"onUpdate:modelValue":C[8]||(C[8]=E=>q.loggingPath=E),class:"field"},[(g(),x(ct,null,Wt(rt,E=>u("option",{key:E.value,value:E.value},P(E.label),9,t1)),64))],512),[[sn,q.loggingPath]])]),u("label",e1,[C[42]||(C[42]=u("span",{class:"eyebrow mb-1 block"},"Category",-1)),ot(u("select",{"onUpdate:modelValue":C[9]||(C[9]=E=>q.category=E),class:"field"},[(g(),x(ct,null,Wt(U,E=>u("option",{key:E.value,value:E.value},P(E.label),9,n1)),64))],512),[[sn,q.category]])]),u("label",i1,[C[43]||(C[43]=u("span",{class:"eyebrow mb-1 block"},"Purpose",-1)),ot(u("select",{"onUpdate:modelValue":C[10]||(C[10]=E=>q.purpose=E),class:"field"},[(g(),x(ct,null,Wt(V,E=>u("option",{key:E.value,value:E.value},P(E.label),9,s1)),64))],512),[[sn,q.purpose]])]),u("label",o1,[C[44]||(C[44]=u("span",{class:"eyebrow mb-1 block"},"Authorisation ref",-1)),ot(u("input",{"onUpdate:modelValue":C[11]||(C[11]=E=>q.authorisationRef=E),class:"field",placeholder:"Specific-category ref"},null,512),[[vt,q.authorisationRef]])])]),u("label",r1,[C[45]||(C[45]=u("span",{class:"eyebrow mb-1 block"},"FDR log URL (automatic path)",-1)),ot(u("input",{"onUpdate:modelValue":C[12]||(C[12]=E=>q.rawFdrLogUrl=E),class:"field",placeholder:"Link to the stored flight-data-recorder export"},null,512),[[vt,q.rawFdrLogUrl]])]),u("button",{class:"mt-4 flex items-center gap-1.5 text-sm font-semibold text-accent",onClick:C[13]||(C[13]=E=>ht.value=!ht.value)},[O(Y,{name:ht.value?"x":"plus",size:14},null,8,["name"]),C[46]||(C[46]=$(" Operational details (weather, airspace, incidents) ",-1))]),ht.value?(g(),x("div",a1,[u("label",l1,[C[47]||(C[47]=u("span",{class:"eyebrow mb-1 block"},"Weather / wind",-1)),ot(u("input",{"onUpdate:modelValue":C[14]||(C[14]=E=>q.weather=E),class:"field",placeholder:"6 m/s NW, CAVOK"},null,512),[[vt,q.weather]])]),u("label",u1,[C[48]||(C[48]=u("span",{class:"eyebrow mb-1 block"},"Airspace / NOTAM ref",-1)),ot(u("input",{"onUpdate:modelValue":C[15]||(C[15]=E=>q.airspaceRef=E),class:"field"},null,512),[[vt,q.airspaceRef]])]),u("label",c1,[C[49]||(C[49]=u("span",{class:"eyebrow mb-1 block"},"Observer",-1)),ot(u("input",{"onUpdate:modelValue":C[16]||(C[16]=E=>q.observer=E),class:"field"},null,512),[[vt,q.observer]])]),u("label",d1,[C[50]||(C[50]=u("span",{class:"eyebrow mb-1 block"},"Incidents / anomalies",-1)),ot(u("input",{"onUpdate:modelValue":C[17]||(C[17]=E=>q.incidents=E),class:"field",placeholder:"RTH trigger, GPS dropout…"},null,512),[[vt,q.incidents]])]),u("label",f1,[C[51]||(C[51]=u("span",{class:"eyebrow mb-1 block"},"Notes",-1)),ot(u("textarea",{"onUpdate:modelValue":C[18]||(C[18]=E=>q.notes=E),rows:"2",class:"field"},null,512),[[vt,q.notes]])])])):N("",!0),u("div",h1,[u("button",{class:"btn-accent",disabled:it.value,onClick:St},P(it.value?"Saving…":Mt.value?"Save changes":"Log flight"),9,p1),u("button",{class:"btn-ghost",onClick:pe},"Cancel"),dt.value?(g(),x("span",m1,P(dt.value),1)):N("",!0)])])):N("",!0),u("div",g1,[h.value?(g(),x("div",_1,"Loading…")):d.value.length?(g(),x("div",y1,[u("table",b1,[u("thead",null,[u("tr",x1,[(g(),x(ct,null,Wt(["Date","Drone","Area / route","Alt","Pilot","Compliance",""],E=>u("th",{key:E,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},P(E),1)),64))])]),u("tbody",null,[(g(!0),x(ct,null,Wt(d.value,E=>{var _e,se,Ge,v;return g(),x(ct,{key:E.id},[u("tr",{class:Ct(["border-b border-line last:border-0",Mt.value===E.id?"bg-accent-soft":""])},[u("td",w1,[$(P((E.operationDate||"").slice(0,10))+" ",1),E.startTime?(g(),x("span",k1,P(E.startTime),1)):N("",!0)]),u("td",S1,P(E.droneName||"—"),1),u("td",{class:"max-w-[220px] truncate px-5 py-3 text-ink-secondary",title:E.areaRoute},P(E.areaRoute||"—"),9,P1),u("td",T1,P(E.maxAltitudeAgl?E.maxAltitudeAgl+" m":"—"),1),u("td",L1,P(E.pilotName||"—"),1),u("td",C1,[u("button",{class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",o[T(E).tone]]),onClick:m=>A(E.id)},[T(E).tone==="danger"?(g(),ie(Y,{key:0,name:"alertTriangle",size:12})):T(E).tone==="success"?(g(),ie(Y,{key:1,name:"check",size:12})):N("",!0),$(" "+P(T(E).label),1)],10,M1)]),u("td",O1,[Nt.value===E.id?(g(),x(ct,{key:0},[C[54]||(C[54]=u("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),u("button",{class:"btn-ghost mr-1",onClick:C[19]||(C[19]=m=>Nt.value="")},"Cancel"),u("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:m=>Et(E)},"Delete",8,E1)],64)):(g(),x(ct,{key:1},[u("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:m=>he(E)},[O(Y,{name:"sliders",size:13}),C[55]||(C[55]=$(" Edit",-1))],8,z1),u("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:m=>Nt.value=E.id},[O(Y,{name:"trash",size:13})],8,A1)],64))])],2),w.value===E.id?(g(),x("tr",I1,[u("td",$1,[u("div",D1,[u("span",N1,[C[56]||(C[56]=$("Logging path: ",-1)),u("b",R1,P(((_e=E.compliance)==null?void 0:_e.loggingPath)||"—"),1)]),u("span",F1,[C[57]||(C[57]=$("Category: ",-1)),u("b",B1,P(E.category||"—"),1)]),u("span",V1,[C[58]||(C[58]=$("Retain until: ",-1)),u("b",Z1,P((E.retentionUntil||"").slice(0,10)||"—"),1)]),(se=E.compliance)!=null&&se.exempt?(g(),x("span",U1,[C[59]||(C[59]=$("Exempt: ",-1)),u("b",H1,P(E.compliance.exemptReason),1)])):N("",!0)]),(((Ge=E.compliance)==null?void 0:Ge.redFlags)||[]).length?(g(),x("ul",j1,[(g(!0),x(ct,null,Wt(E.compliance.redFlags,(m,M)=>(g(),x("li",{key:M,class:"flex items-start gap-2 text-xs text-danger-fg"},[O(Y,{name:"alertTriangle",size:13,class:"mt-px shrink-0"}),$(" "+P(m),1)]))),128))])):(v=E.compliance)!=null&&v.exempt?N("",!0):(g(),x("div",W1,"No compliance gaps detected."))])])):N("",!0)],64)}),128))])])])):(g(),x("div",v1,[O(Y,{name:"book",size:26,class:"text-ink-muted"}),C[52]||(C[52]=u("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No flights logged yet",-1)),C[53]||(C[53]=u("div",{class:"mt-1 text-xs text-ink-muted"},"Log your first operation to start the 5-year retention record.",-1))]))])],64)):(g(),x(ct,{key:2},[zt.value?(g(),x("div",K1,[u("div",G1,[u("div",null,[u("div",q1,P(Ft.value?"Edit drone":"New drone"),1),C[60]||(C[60]=u("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft registry",-1))]),u("button",{class:"btn-icon",onClick:kt},[O(Y,{name:"x",size:16})])]),u("div",Y1,[u("label",J1,[C[61]||(C[61]=u("span",{class:"eyebrow mb-1 block"},"Name",-1)),ot(u("input",{"onUpdate:modelValue":C[20]||(C[20]=E=>lt.name=E),class:"field",placeholder:"Mavic-01"},null,512),[[vt,lt.name]])]),u("label",X1,[C[62]||(C[62]=u("span",{class:"eyebrow mb-1 block"},"Model",-1)),ot(u("input",{"onUpdate:modelValue":C[21]||(C[21]=E=>lt.model=E),class:"field",placeholder:"DJI Mavic 3 Enterprise"},null,512),[[vt,lt.model]])]),u("label",Q1,[C[63]||(C[63]=u("span",{class:"eyebrow mb-1 block"},"Serial",-1)),ot(u("input",{"onUpdate:modelValue":C[22]||(C[22]=E=>lt.serial=E),class:"field"},null,512),[[vt,lt.serial]])]),u("label",tb,[C[64]||(C[64]=u("span",{class:"eyebrow mb-1 block"},"Operator no.",-1)),ot(u("input",{"onUpdate:modelValue":C[23]||(C[23]=E=>lt.operatorNumber=E),class:"field",placeholder:"DNK…"},null,512),[[vt,lt.operatorNumber]])]),u("label",eb,[C[65]||(C[65]=u("span",{class:"eyebrow mb-1 block"},"MTOM (grams)",-1)),ot(u("input",{"onUpdate:modelValue":C[24]||(C[24]=E=>lt.mtomGrams=E),type:"number",min:"0",class:"field",placeholder:"920"},null,512),[[vt,lt.mtomGrams]])]),u("label",nb,[C[66]||(C[66]=u("span",{class:"eyebrow mb-1 block"},"C-class",-1)),ot(u("select",{"onUpdate:modelValue":C[25]||(C[25]=E=>lt.cClass=E),class:"field"},[(g(),x(ct,null,Wt(nt,E=>u("option",{key:E,value:E},P(E||"— none —"),9,ib)),64))],512),[[sn,lt.cClass]])])]),u("div",sb,[u("label",ob,[ot(u("input",{"onUpdate:modelValue":C[26]||(C[26]=E=>lt.autologsFlights=E),type:"checkbox",class:"h-4 w-4 accent-[var(--accent)]"},null,512),[[rr,lt.autologsFlights]]),C[67]||(C[67]=$(" Auto-logs flights (onboard FDR) ",-1))]),u("label",rb,[ot(u("input",{"onUpdate:modelValue":C[27]||(C[27]=E=>lt.isToy=E),type:"checkbox",class:"h-4 w-4 accent-[var(--accent)]"},null,512),[[rr,lt.isToy]]),C[68]||(C[68]=$(" Toy drone (logbook-exempt) ",-1))])]),u("div",ab,[u("button",{class:"btn-accent",disabled:et.value,onClick:Yt},P(et.value?"Saving…":Ft.value?"Save changes":"Add drone"),9,lb),u("button",{class:"btn-ghost",onClick:kt},"Cancel"),At.value?(g(),x("span",ub,P(At.value),1)):N("",!0)])])):N("",!0),u("div",cb,[h.value?(g(),x("div",db,"Loading…")):l.value.length?(g(),x("div",hb,[u("table",pb,[u("thead",null,[u("tr",mb,[(g(),x(ct,null,Wt(["Name","Model","MTOM","Class","FDR",""],E=>u("th",{key:E,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},P(E),1)),64))])]),u("tbody",null,[(g(!0),x(ct,null,Wt(l.value,E=>(g(),x("tr",{key:E.id,class:Ct(["border-b border-line last:border-0",Ft.value===E.id?"bg-accent-soft":""])},[u("td",gb,P(E.name),1),u("td",_b,P(E.model||"—"),1),u("td",vb,P(E.mtomGrams?E.mtomGrams+" g":"—"),1),u("td",yb,[E.cClass?(g(),x("span",{key:0,class:Ct(["inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold",o.accent])},P(E.cClass),3)):(g(),x("span",bb,"—")),E.isToy?(g(),x("span",{key:2,class:Ct(["ml-1 inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold",o.neutral])},"toy",2)):N("",!0)]),u("td",xb,[u("span",{class:Ct(["text-xs",E.autologsFlights?"text-success-fg":"text-ink-muted"])},P(E.autologsFlights?"yes":"no"),3)]),u("td",wb,[ae.value===E.id?(g(),x(ct,{key:0},[C[71]||(C[71]=u("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),u("button",{class:"btn-ghost mr-1",onClick:C[28]||(C[28]=_e=>ae.value="")},"Cancel"),u("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:_e=>Jt(E)},"Delete",8,kb)],64)):(g(),x(ct,{key:1},[u("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:_e=>pt(E)},[O(Y,{name:"sliders",size:13}),C[72]||(C[72]=$(" Edit",-1))],8,Sb),u("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:_e=>ae.value=E.id},[O(Y,{name:"trash",size:13})],8,Pb)],64))])],2))),128))])])])):(g(),x("div",fb,[O(Y,{name:"drone",size:26,class:"text-ink-muted"}),C[69]||(C[69]=u("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No drones registered",-1)),C[70]||(C[70]=u("div",{class:"mt-1 text-xs text-ink-muted"},"Register the airframes you fly to log flights against them.",-1))]))])],64))]))}},Lb={class:"grid h-full grid-cols-[248px_1fr] max-[900px]:grid-cols-1"},Cb={class:"flex flex-col border-r border-line bg-surface-1 px-4 py-5 max-[900px]:hidden"},Mb={class:"flex items-center gap-2.5 px-2 pb-5"},Ob={class:"flex flex-col gap-0.5"},Eb=["onClick"],zb={class:"mt-auto flex flex-col gap-2.5"},Ab={class:"rounded-lg bg-surface-2 p-3"},Ib={class:"flex items-center gap-2"},$b={class:"text-xs font-semibold text-ink"},Db={class:"mt-1.5 block font-mono text-[10.5px] text-ink-muted"},Nb={class:"flex items-center gap-2.5 px-2 py-1"},Rb={class:"grid h-8 w-8 place-items-center rounded-full bg-[var(--navy-800)] text-xs font-bold text-white"},Fb={class:"min-w-0 flex-1"},Bb={class:"truncate text-[13px] font-semibold text-ink"},Vb={class:"flex items-center gap-1.5 text-[11px] text-ink-muted"},Zb=["title"],Ub={class:"overflow-y-auto"},Hb={class:"sticky top-0 z-10 flex items-center gap-4 border-b border-line px-7 py-3.5",style:{background:"color-mix(in srgb, var(--bg-app) 82%, transparent)","backdrop-filter":"blur(10px)"}},jb={class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},Wb={class:"ml-auto flex items-center gap-3"},Kb={class:"flex h-10 w-60 items-center gap-2 rounded border border-line-strong bg-surface-1 px-3 max-[1100px]:hidden"},Gb={key:0,class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},qb={class:"grid grid-cols-4 gap-4 max-[1100px]:grid-cols-2 max-[560px]:grid-cols-1"},Yb={class:"flex items-center justify-between"},Jb={class:"eyebrow"},Xb={class:"mt-2.5 text-[34px] font-bold leading-none tracking-tightest text-ink"},Qb={class:"grid grid-cols-[1.6fr_1fr] gap-5 max-[1100px]:grid-cols-1"},tx={class:"panel p-5"},ex={class:"mb-3.5 flex items-center justify-between"},nx={class:"panel p-5"},ix={class:"mb-3.5 flex items-center justify-between"},sx={class:"grid place-items-center py-10 text-center"},ox={class:"panel overflow-hidden p-0"},rx={class:"flex items-center justify-between px-5 py-4"},ax={class:"flex gap-2"},lx={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},ux={key:1,class:"overflow-x-auto"},cx={class:"w-full border-collapse text-sm"},dx={class:"text-left"},fx=["onClick"],hx={class:"px-5 py-3 font-mono font-bold text-ink"},px={class:"px-5 py-3 text-ink-secondary"},mx={class:"px-5 py-3"},gx={class:"px-5 py-3 font-mono text-ink-secondary"},_x={class:"px-5 py-3"},vx={key:0,class:"flex items-center gap-2"},yx={class:"h-1.5 w-12 overflow-hidden rounded bg-surface-2"},bx={class:"font-mono text-xs text-ink-secondary"},xx={key:1,class:"font-mono text-xs text-ink-muted"},wx={class:"px-5 py-3 font-mono text-ink-secondary"},kx={class:"px-5 py-3 text-right"},Sx=["onClick"],Px={key:1,class:"p-7"},Tx={class:"mb-4 flex flex-wrap items-center gap-3"},Lx={class:"font-mono text-mode font-bold text-ink"},Cx={key:0,class:"rounded-full bg-danger-soft px-2.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-caps text-danger-fg"},Mx={key:1,class:"ml-auto flex flex-wrap gap-1.5"},Ox=["onClick"],Ex={key:0,class:"panel grid place-items-center p-16 text-center"},zx={class:"pill"},Ax={class:"pill"},Ix={class:"pill"},$x={class:"mt-1 text-sm font-semibold text-ink"},Dx={class:"pill"},Nx={class:"mt-1 font-mono text-sm font-bold tabular text-ink"},Rx={class:"grid grid-cols-2 gap-4 max-[820px]:grid-cols-1"},Fx={class:"panel p-4"},Bx={class:"flex items-center gap-4"},Vx={class:"h-9 flex-1 overflow-hidden rounded border border-line bg-surface-2"},Zx={class:"readout"},Ux={class:"panel p-4"},Hx={class:"readout"},jx={class:"panel p-4"},Wx={class:"space-y-1.5 text-sm"},Kx={class:"flex justify-between"},Gx={class:"text-ink"},qx={class:"flex justify-between"},Yx={class:"text-ink"},Jx={class:"flex justify-between"},Xx={class:"font-mono tabular text-ink"},Qx={class:"flex justify-between"},t0={class:"font-mono tabular text-ink"},e0={class:"panel p-4"},n0={class:"space-y-1.5 text-sm"},i0={class:"flex justify-between"},s0={class:"font-mono tabular text-ink"},o0={class:"flex justify-between"},r0={class:"font-mono tabular text-ink"},a0={class:"flex justify-between"},l0={class:"font-mono tabular text-ink"},u0={class:"panel col-span-2 p-4 max-[820px]:col-span-1"},c0={class:"panel p-4"},d0={class:"flex flex-wrap gap-2"},f0={class:"mt-2 min-h-[16px] text-xs text-ink-muted"},h0={class:"panel p-4"},p0={class:"h-[180px] overflow-y-auto font-mono text-xs"},m0={class:"text-ink-muted"},g0={class:"font-semibold text-accent"},_0={class:"break-all text-ink"},v0={key:4,class:"p-7"},y0={class:"panel grid place-items-center p-16 text-center"},b0={class:"mt-3 text-sm font-medium text-ink-secondary"},x0={key:0,class:"mt-1 text-xs text-ink-muted"},w0={key:1,class:"mt-1 text-xs text-ink-muted"},k0={__name:"Dashboard",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(e,{emit:i}){const o=e,a=i,l=xe({}),d=xe({}),h=G(null),_=G(!1),y=xe([]),T=G(""),w=G("Overview"),A=[["grid","Overview"],["radio","Live flights"],["route","Routes"],["calendar","Schedule"],["book","Logbook"],["fileText","Documents"],["server","Drives"],["settings","Settings"]],U=xt(()=>(A.find(([,v])=>v===w.value)||["grid"])[0]),V=G(""),rt=G(""),Q=G("");let Ot=null,Mt=null,q=!1;const dt=xt(()=>Object.keys(l).sort((v,m)=>(l[m].online?1:0)-(l[v].online?1:0)||v.localeCompare(m))),it=xt(()=>h.value?l[h.value]:null),ht=xt(()=>it.value&&it.value.telemetry||{}),Kt=xt(()=>!!(it.value&&it.value.online)),he=xt(()=>{const v=ht.value;return typeof v.latitude=="number"&&typeof v.longitude=="number"&&(v.latitude||v.longitude)?{lat:v.latitude,lng:v.longitude}:null}),pe=xt(()=>h.value&&d[h.value]||[]),St=xt(()=>{const v=ht.value;return typeof v.velocityX=="number"&&typeof v.velocityY=="number"?Math.hypot(v.velocityX,v.velocityY):null});function Nt(v){return v.online?v.connected?["In flight","success"]:["Standby","accent"]:["Offline","neutral"]}function Et(v){const m=v&&v.telemetry||{};return typeof m.velocityX=="number"&&typeof m.velocityY=="number"?Math.hypot(m.velocityX,m.velocityY):null}const nt=xt(()=>dt.value.map(v=>{const m=l[v],M=m.telemetry||{},[F,R]=Nt(m);return{id:v,mission:m.model||(m.connected?"Drone linked":m.online?"App online":"No signal"),status:F,tone:R,alt:typeof M.altitude=="number"?M.altitude.toFixed(0)+" m":"—",battery:typeof M.batteryPercent=="number"?M.batteryPercent:null,speed:Et(m)}})),ut=xt(()=>dt.value.filter(v=>l[v].online).length),zt=xt(()=>dt.value.filter(v=>l[v].online&&l[v].connected).length),Ft=xt(()=>dt.value.filter(v=>!l[v].online).length),lt=xt(()=>{const v=dt.value.map(m=>{var M;return(M=l[m].telemetry)==null?void 0:M.batteryPercent}).filter(m=>typeof m=="number");return v.length?Math.round(v.reduce((m,M)=>m+M,0)/v.length):null}),At=xt(()=>[{label:"Active flights",value:String(zt.value),delta:`${ut.value} online`,tone:"success",icon:"radio"},{label:"Avg battery",value:lt.value==null?"—":lt.value+"%",delta:lt.value==null?"no telemetry":lt.value<40?"low — watch":"nominal",tone:lt.value!=null&<.value<40?"danger":"neutral",icon:"battery"},{label:"Fleet size",value:String(dt.value.length),delta:`${zt.value} in flight`,tone:"neutral",icon:"grid"},{label:"Offline",value:String(Ft.value),delta:Ft.value?"needs attention":"all reachable",tone:Ft.value?"warning":"success",icon:"signal"}]),et={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},ce={success:"text-success-fg",danger:"text-danger-fg",warning:"text-amber-fg",neutral:"text-ink-muted",accent:"text-accent-soft-fg"},pt=xt(()=>{var M,F,R;const m=(o.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((M=m[0])==null?void 0:M[0])||"P")+(((F=m[1])==null?void 0:F[0])||((R=m[0])==null?void 0:R[1])||"V")).toUpperCase()}),kt={superadmin:"Superadmin",admin:"Admin",user:"Operator"},Yt=xt(()=>kt[o.role]||"Operator"),ae=xt(()=>o.organizationName||(o.role==="superadmin"?"All organizations":"No organization"));function Jt(v){var M;l[v.deviceId]=v;const m=v.telemetry||{};typeof m.latitude=="number"&&typeof m.longitude=="number"&&(m.latitude||m.longitude)&&(d[v.deviceId]||(d[v.deviceId]=[]),d[v.deviceId].push([m.latitude,m.longitude]),d[v.deviceId].length>1e3&&d[v.deviceId].shift()),(!h.value||v.online&&!((M=l[h.value])!=null&&M.online))&&(h.value=v.deviceId)}function Bt(v){delete l[v],delete d[v],h.value===v&&(h.value=dt.value[0]||null)}function j(v){y.unshift({t:ql(Date.now()),tag:v.type||"?",text:JSON.stringify(C(v))}),y.length>200&&y.pop()}function C(v){const m={...v};return delete m.type,m}function E(){const v=location.protocol==="https:"?"wss":"ws";Ot=new WebSocket(`${v}://${location.host}/bff/ws`),Ot.onopen=()=>_.value=!0,Ot.onclose=()=>{_.value=!1,q||(Mt=setTimeout(E,1500))},Ot.onerror=()=>Ot&&Ot.close(),Ot.onmessage=m=>{let M;try{M=JSON.parse(m.data)}catch{return}M.type==="snapshot"?(M.devices||[]).forEach(Jt):M.type==="update"&&M.device?(Jt(M.device),M.event&&M.device.deviceId===h.value&&j(M.event)):M.type==="removed"&&M.deviceId&&Bt(M.deviceId)}}async function _e(){if(!h.value)return Q.value="No device selected.";if(!V.value.trim())return Q.value="Enter a command name.";let v;if(rt.value.trim())try{v=JSON.parse(rt.value)}catch{return Q.value="Payload is not valid JSON."}const{ok:m,body:M}=await fp(h.value,V.value.trim(),v);Q.value=m?`Sent "${V.value.trim()}".`:`Error: ${M.error||"failed"}`}function se(v,m,M=""){return typeof v=="number"?v.toFixed(m)+M:"—"}function Ge(v){h.value=v,w.value="Live flights"}return Yi(async()=>{(await Rh()).forEach(Jt),E()}),vr(()=>{q=!0,Mt&&clearTimeout(Mt),Ot&&Ot.close()}),(v,m)=>{var M,F,R,B,J;return g(),x("div",Lb,[u("aside",Cb,[u("div",Mb,[O(Cc,{size:26}),m[7]||(m[7]=u("span",{class:"text-[19px] tracking-tightest"},[u("span",{class:"font-medium text-ink-secondary"},"Pilot"),u("span",{class:"font-bold text-ink"},"Vault")],-1))]),u("nav",Ob,[(g(),x(ct,null,Wt(A,([D,K])=>u("button",{key:K,class:Ct(["flex items-center gap-3 rounded px-3 py-2.5 text-left text-sm transition",w.value===K?"bg-accent-soft font-semibold text-accent-soft-fg":"font-medium text-ink-secondary hover:bg-surface-2"]),onClick:Z=>w.value=K},[O(Y,{name:D,size:18,stroke:w.value===K?2.2:1.8},null,8,["name","stroke"]),$(" "+P(K),1)],10,Eb)),64))]),u("div",zb,[u("div",Ab,[u("div",Ib,[u("span",{class:Ct(["h-2 w-2 rounded-full",_.value?"bg-ready":"bg-caution"])},null,2),u("span",$b,P(_.value?"Link healthy":"Reconnecting…"),1)]),u("span",Db,"API gateway · "+P(_.value?"streaming":"retrying"),1)]),u("div",Nb,[u("div",Rb,P(pt.value),1),u("div",Fb,[u("div",Bb,P(e.email||"Operator"),1),u("div",Vb,[O(Y,{name:"grid",size:11,class:"shrink-0"}),u("span",{class:"truncate",title:`${Yt.value} · ${ae.value}`},P(Yt.value)+" · "+P(ae.value),9,Zb)])]),u("button",{class:"text-ink-muted transition hover:text-ink",title:"Log out","aria-label":"Log out",onClick:m[0]||(m[0]=D=>a("logout"))},[O(Y,{name:"logout",size:16})])])])]),u("main",Ub,[u("header",Hb,[u("div",null,[m[8]||(m[8]=u("div",{class:"eyebrow"},"Live operations",-1)),u("h1",jb,P(w.value),1)]),u("div",Wb,[u("div",Kb,[O(Y,{name:"search",size:16,class:"text-ink-muted"}),ot(u("input",{"onUpdate:modelValue":m[1]||(m[1]=D=>T.value=D),placeholder:"Search drones, routes…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[vt,T.value]])]),u("button",{class:"btn-accent flex items-center gap-2",onClick:m[2]||(m[2]=D=>w.value="Live flights")},[O(Y,{name:"radio",size:16}),m[9]||(m[9]=$(" Live flights ",-1))])])]),w.value==="Overview"?(g(),x("div",Gb,[u("div",qb,[(g(!0),x(ct,null,Wt(At.value,D=>(g(),x("div",{key:D.label,class:"panel p-5"},[u("div",Yb,[u("span",Jb,P(D.label),1),O(Y,{name:D.icon,size:16,class:"text-ink-muted"},null,8,["name"])]),u("div",Xb,P(D.value),1),u("span",{class:Ct(["mt-2 block font-mono text-[11px]",ce[D.tone]])},P(D.delta),3)]))),128))]),u("div",Qb,[u("div",tx,[u("div",ex,[m[11]||(m[11]=u("div",null,[u("div",{class:"eyebrow"},"Airspace"),u("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Live map")],-1)),zt.value?(g(),x("span",{key:0,class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",et.success])},[m[10]||(m[10]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P(zt.value)+" airborne ",1)],2)):N("",!0)]),O(Ql,{position:he.value,trail:pe.value},null,8,["position","trail"])]),u("div",nx,[u("div",ix,[m[12]||(m[12]=u("div",null,[u("div",{class:"eyebrow"},"Today"),u("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Schedule")],-1)),O(Y,{name:"clock",size:16,class:"text-ink-muted"})]),u("div",sx,[O(Y,{name:"calendar",size:24,class:"text-ink-muted"}),m[13]||(m[13]=u("div",{class:"mt-2 text-sm font-medium text-ink-secondary"},"No missions scheduled",-1)),m[14]||(m[14]=u("div",{class:"mt-0.5 text-xs text-ink-muted"},"Scheduling is not wired to a backend yet.",-1))])])]),u("div",ox,[u("div",rx,[m[17]||(m[17]=u("div",null,[u("div",{class:"eyebrow"},"Fleet"),u("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft status")],-1)),u("div",ax,[u("span",{class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",et.success])},[m[15]||(m[15]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P(zt.value)+" in flight ",1)],2),Ft.value?(g(),x("span",{key:0,class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",et.warning])},[m[16]||(m[16]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P(Ft.value)+" offline ",1)],2)):N("",!0)])]),nt.value.length?(g(),x("div",ux,[u("table",cx,[u("thead",null,[u("tr",dx,[(g(),x(ct,null,Wt(["Aircraft","Mission","Status","Alt","Battery","Speed",""],D=>u("th",{key:D,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},P(D),1)),64))])]),u("tbody",null,[(g(!0),x(ct,null,Wt(nt.value,(D,K)=>(g(),x("tr",{key:D.id,class:Ct(["cursor-pointer transition hover:bg-surface-2",KGe(D.id)},[u("td",hx,P(D.id),1),u("td",px,P(D.mission),1),u("td",mx,[u("span",{class:Ct(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",et[D.tone]])},[m[18]||(m[18]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(P(D.status),1)],2)]),u("td",gx,P(D.alt),1),u("td",_x,[D.battery!=null?(g(),x("div",vx,[u("div",yx,[u("div",{class:Ct(["h-full",D.battery<40?"bg-caution":"bg-ready"]),style:Ss({width:D.battery+"%"})},null,6)]),u("span",bx,P(D.battery)+"%",1)])):(g(),x("span",xx,"—"))]),u("td",wx,[$(P(D.speed==null?"—":D.speed.toFixed(1))+" ",1),m[19]||(m[19]=u("span",{class:"text-ink-muted"},"m/s",-1))]),u("td",kx,[u("button",{class:"btn-ghost inline-flex items-center gap-1.5 whitespace-nowrap",onClick:yc(Z=>Ge(D.id),["stop"])},[O(Y,{name:"play",size:14}),m[20]||(m[20]=$(" Track ",-1))],8,Sx)])],10,fx))),128))])])])):(g(),x("div",lx," No aircraft connected yet. Devices appear here as they come online. "))])])):w.value==="Live flights"?(g(),x("div",Px,[u("div",Tx,[u("span",Lx,P(h.value||"No device selected"),1),it.value&&!Kt.value?(g(),x("span",Cx,"Offline")):N("",!0),dt.value.length?(g(),x("div",Mx,[(g(!0),x(ct,null,Wt(dt.value,D=>(g(),x("button",{key:D,class:Ct(["flex items-center gap-2 rounded border px-3 py-1.5 font-mono text-xs font-bold transition",D===h.value?"border-accent bg-accent-soft text-accent-soft-fg":"border-line bg-surface-1 text-ink-secondary hover:border-line-strong"]),onClick:K=>h.value=D},[u("span",{class:Ct(["h-2 w-2 rounded-full",l[D].online?"bg-ready":"bg-ink-muted"])},null,2),$(" "+P(D),1)],10,Ox))),128))])):N("",!0)]),dt.value.length?(g(),x(ct,{key:1},[u("div",{class:Ct(["mb-4 grid gap-3",!Kt.value&&it.value?"opacity-60":""]),style:{"grid-template-columns":"repeat(auto-fit, minmax(150px, 1fr))"}},[u("div",zx,[m[23]||(m[23]=u("div",{class:"eyebrow"},"Registration",-1)),u("div",{class:Ct(["mt-1 text-sm font-semibold",Kt.value?((M=it.value)==null?void 0:M.registration)==="success"?"text-success-fg":"text-danger-fg":"text-ink"])},P(Kt.value&&((F=it.value)!=null&&F.registration)?it.value.registration:"—"),3)]),u("div",Ax,[m[24]||(m[24]=u("div",{class:"eyebrow"},"Drone link",-1)),u("div",{class:Ct(["mt-1 text-sm font-semibold",Kt.value?(R=it.value)!=null&&R.connected?"text-success-fg":"text-danger-fg":"text-ink"])},P(it.value?Kt.value?it.value.connected?"connected":"no drone":"app offline":"—"),3)]),u("div",Ix,[m[25]||(m[25]=u("div",{class:"eyebrow"},"Model",-1)),u("div",$x,P(((B=it.value)==null?void 0:B.model)||"—"),1)]),u("div",Dx,[m[26]||(m[26]=u("div",{class:"eyebrow"},"Last update",-1)),u("div",Nx,P((J=it.value)!=null&&J.lastSeenMs?$t(ql)(it.value.lastSeenMs):"—"),1)])],2),u("div",Rx,[u("div",Fx,[m[28]||(m[28]=u("div",{class:"mb-3 eyebrow"},"Battery",-1)),u("div",Bx,[u("div",Vx,[u("div",{class:Ct(["h-full transition-all",typeof ht.value.batteryPercent=="number"?ht.value.batteryPercent<20?"bg-warning":ht.value.batteryPercent<40?"bg-caution":"bg-ready":""]),style:Ss({width:(typeof ht.value.batteryPercent=="number"?ht.value.batteryPercent:0)+"%"})},null,6)]),u("div",Zx,[$(P(typeof ht.value.batteryPercent=="number"?ht.value.batteryPercent:"—"),1),m[27]||(m[27]=u("span",{class:"text-sm text-ink-secondary"},"%",-1))])])]),u("div",Ux,[m[30]||(m[30]=u("div",{class:"mb-3 eyebrow"},"Altitude",-1)),u("div",Hx,[$(P(se(ht.value.altitude,1)),1),m[29]||(m[29]=u("span",{class:"text-sm text-ink-secondary"}," m",-1))])]),u("div",jx,[m[35]||(m[35]=u("div",{class:"mb-3 eyebrow"},"Flight",-1)),u("div",Wx,[u("div",Kx,[m[31]||(m[31]=u("span",{class:"text-ink-secondary"},"Mode",-1)),u("b",Gx,P(ht.value.flightMode||"—"),1)]),u("div",qx,[m[32]||(m[32]=u("span",{class:"text-ink-secondary"},"Flying",-1)),u("b",Yx,P(ht.value.isFlying==null?"—":ht.value.isFlying?"yes":"no"),1)]),u("div",Jx,[m[33]||(m[33]=u("span",{class:"text-ink-secondary"},"GPS sats",-1)),u("b",Xx,P(ht.value.satelliteCount==null?"—":ht.value.satelliteCount),1)]),u("div",Qx,[m[34]||(m[34]=u("span",{class:"text-ink-secondary"},"Speed (H)",-1)),u("b",t0,P(St.value==null?"—":se(St.value,2," m/s")),1)])])]),u("div",e0,[m[39]||(m[39]=u("div",{class:"mb-3 eyebrow"},"Position",-1)),u("div",n0,[u("div",i0,[m[36]||(m[36]=u("span",{class:"text-ink-secondary"},"Latitude",-1)),u("b",s0,P(se(ht.value.latitude,6)),1)]),u("div",o0,[m[37]||(m[37]=u("span",{class:"text-ink-secondary"},"Longitude",-1)),u("b",r0,P(se(ht.value.longitude,6)),1)]),u("div",a0,[m[38]||(m[38]=u("span",{class:"text-ink-secondary"},"Vert. speed",-1)),u("b",l0,P(se(typeof ht.value.velocityZ=="number"?-ht.value.velocityZ:void 0,2," m/s")),1)])])]),u("div",u0,[m[40]||(m[40]=u("div",{class:"mb-3 eyebrow"},"Track",-1)),O(Ql,{position:he.value,trail:pe.value},null,8,["position","trail"])]),u("div",c0,[m[41]||(m[41]=u("div",{class:"mb-3 eyebrow"},"Send command",-1)),u("div",d0,[ot(u("input",{"onUpdate:modelValue":m[3]||(m[3]=D=>V.value=D),class:"field flex-1",placeholder:"command (e.g. startConnection)"},null,512),[[vt,V.value]]),ot(u("input",{"onUpdate:modelValue":m[4]||(m[4]=D=>rt.value=D),class:"field flex-1",placeholder:"payload JSON (optional)"},null,512),[[vt,rt.value]]),u("button",{class:"btn-accent",onClick:_e},"Send")]),u("div",f0,P(Q.value),1)]),u("div",h0,[m[42]||(m[42]=u("div",{class:"mb-3 eyebrow"},"Event log",-1)),u("div",p0,[(g(!0),x(ct,null,Wt(y,(D,K)=>(g(),x("div",{key:K,class:"border-b border-line py-1"},[u("span",m0,P(D.t),1),u("span",g0,P(D.tag),1),u("span",_0,P(D.text),1)]))),128))])])])],64)):(g(),x("div",Ex,[O(Y,{name:"radio",size:28,class:"text-ink-muted"}),m[21]||(m[21]=u("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No aircraft online",-1)),m[22]||(m[22]=u("div",{class:"mt-1 text-xs text-ink-muted"},"Live telemetry appears here once a drone connects.",-1))]))])):w.value==="Logbook"?(g(),ie(Tb,{key:2,email:e.email,role:e.role,organization:e.organization,"organization-name":e.organizationName},null,8,["email","role","organization","organization-name"])):w.value==="Settings"?(g(),ie(My,{key:3,email:e.email,role:e.role,organization:e.organization,"organization-name":e.organizationName,onLogout:m[5]||(m[5]=D=>a("logout"))},null,8,["email","role","organization","organization-name"])):(g(),x("div",v0,[u("div",y0,[O(Y,{name:U.value,size:28,class:"text-ink-muted"},null,8,["name"]),u("div",b0,P(w.value),1),w.value==="Drives"?(g(),x("div",x0,[m[43]||(m[43]=$(" Browse and transfer files here once a drive is connected. Configure drives in ",-1)),u("button",{class:"font-semibold text-accent hover:underline",onClick:m[6]||(m[6]=D=>w.value="Settings")},"Settings → Integrations"),m[44]||(m[44]=$(". ",-1))])):(g(),x("div",w0,"This section is part of the console shell and has no backend yet."))])]))])])}}},S0={key:0,class:"h-full"},P0={key:1,class:"grid h-full place-items-center text-ink-muted text-sm"},T0={__name:"App",setup(e){const i=G(!1),o=G(null),a=G("user"),l=G(""),d=G(""),h=G("");function _(w){a.value=w&&w.role||"user",l.value=w&&w.organization||"",d.value=w&&w.organizationName||""}Yi(async()=>{h.value=(await $h()).apiBase||"";const w=await jl();w&&(o.value=w.email,_(w),await Jl()),i.value=!0});async function y(w){o.value=w,_(await jl()),await Jl()}async function T(){_p(),await Nh(),o.value=null,a.value="user",l.value="",d.value=""}return(w,A)=>i.value?(g(),x("div",S0,[o.value?(g(),ie(k0,{key:0,email:o.value,role:a.value,organization:l.value,"organization-name":d.value,onLogout:T},null,8,["email","role","organization","organization-name"])):(g(),ie(Ip,{key:1,"default-api-base":h.value,onSignedIn:y},null,8,["default-api-base"]))])):(g(),x("div",P0,"Loading…"))}};Eh(T0).mount("#app"); diff --git a/Web App/server/dist/index.html b/Web App/server/dist/index.html index 6f0d199..3b8e629 100644 --- a/Web App/server/dist/index.html +++ b/Web App/server/dist/index.html @@ -35,8 +35,8 @@ })() PilotVault — Control Panel - - + +
diff --git a/Web App/server/main.go b/Web App/server/main.go index a0ef395..5129e18 100644 --- a/Web App/server/main.go +++ b/Web App/server/main.go @@ -72,6 +72,16 @@ func main() { mux.HandleFunc("POST /bff/orgs", app.requireAuth(app.handleCreateOrg)) mux.HandleFunc("PATCH /bff/orgs/{id}", app.requireAuth(app.handleUpdateOrg)) mux.HandleFunc("DELETE /bff/orgs/{id}", app.requireAuth(app.handleDeleteOrg)) + // Logbook — drones, flights, and the compliance CSV export (scoping upstream) + mux.HandleFunc("GET /bff/drones", app.requireAuth(app.handleListDrones)) + mux.HandleFunc("POST /bff/drones", app.requireAuth(app.handleCreateDrone)) + mux.HandleFunc("PATCH /bff/drones/{id}", app.requireAuth(app.handleUpdateDrone)) + mux.HandleFunc("DELETE /bff/drones/{id}", app.requireAuth(app.handleDeleteDrone)) + mux.HandleFunc("GET /bff/flights", app.requireAuth(app.handleListFlights)) + mux.HandleFunc("POST /bff/flights", app.requireAuth(app.handleCreateFlight)) + mux.HandleFunc("PATCH /bff/flights/{id}", app.requireAuth(app.handleUpdateFlight)) + mux.HandleFunc("DELETE /bff/flights/{id}", app.requireAuth(app.handleDeleteFlight)) + mux.HandleFunc("GET /bff/logbook/export", app.requireAuth(app.handleExportLogbook)) mux.HandleFunc("GET /bff/ws", app.handleWS) mux.HandleFunc("GET /healthz", func(w http.ResponseWriter, r *http.Request) { writeJSON(w, http.StatusOK, map[string]any{"status": "ok", "api": app.apiBase}) diff --git a/Web App/web/src/api.js b/Web App/web/src/api.js index f63a067..486046c 100644 --- a/Web App/web/src/api.js +++ b/Web App/web/src/api.js @@ -253,6 +253,83 @@ export async function testWebDav() { return { ok: r.ok, status: r.status, body: await r.json().catch(() => ({})) } } +/* ---------- Logbook: drones ---------- */ + +export async function getDrones() { + try { + const r = await fetch('/bff/drones') + if (!r.ok) return { ok: false, status: r.status, drones: [] } + const d = await r.json() + return { ok: true, status: 200, drones: d.drones || [] } + } catch { + return { ok: false, status: 0, drones: [] } + } +} + +export async function createDrone(drone) { + const r = await fetch('/bff/drones', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(drone), + }) + return { ok: r.ok, status: r.status, body: await r.json().catch(() => ({})) } +} + +export async function updateDrone(id, drone) { + const r = await fetch(`/bff/drones/${encodeURIComponent(id)}`, { + method: 'PATCH', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(drone), + }) + return { ok: r.ok, status: r.status, body: await r.json().catch(() => ({})) } +} + +export async function deleteDrone(id) { + const r = await fetch(`/bff/drones/${encodeURIComponent(id)}`, { method: 'DELETE' }) + return { ok: r.ok, status: r.status, body: await r.json().catch(() => ({})) } +} + +/* ---------- Logbook: flights ---------- */ + +export async function getFlights() { + try { + const r = await fetch('/bff/flights') + if (!r.ok) return { ok: false, status: r.status, flights: [] } + const d = await r.json() + return { ok: true, status: 200, flights: d.flights || [] } + } catch { + return { ok: false, status: 0, flights: [] } + } +} + +export async function createFlight(flight) { + const r = await fetch('/bff/flights', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(flight), + }) + return { ok: r.ok, status: r.status, body: await r.json().catch(() => ({})) } +} + +export async function updateFlight(id, flight) { + const r = await fetch(`/bff/flights/${encodeURIComponent(id)}`, { + method: 'PATCH', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(flight), + }) + return { ok: r.ok, status: r.status, body: await r.json().catch(() => ({})) } +} + +export async function deleteFlight(id) { + const r = await fetch(`/bff/flights/${encodeURIComponent(id)}`, { method: 'DELETE' }) + return { ok: r.ok, status: r.status, body: await r.json().catch(() => ({})) } +} + +// Trigger a browser download of the compliance CSV export. +export function exportLogbookUrl() { + return '/bff/logbook/export' +} + export async function sendCommand(id, command, payload) { const r = await fetch(`/bff/devices/${encodeURIComponent(id)}/command`, { method: 'POST', diff --git a/Web App/web/src/components/Dashboard.vue b/Web App/web/src/components/Dashboard.vue index 9faf718..a551da9 100644 --- a/Web App/web/src/components/Dashboard.vue +++ b/Web App/web/src/components/Dashboard.vue @@ -4,6 +4,7 @@ import DeviceMap from './DeviceMap.vue' import BrandMark from './BrandMark.vue' import Icon from './Icon.vue' import Settings from './Settings.vue' +import Logbook from './Logbook.vue' import { getDevices, sendCommand } from '../api.js' import { formatTime } from '../prefs.js' @@ -627,6 +628,9 @@ onBeforeUnmount(() => { + + + diff --git a/Web App/web/src/components/Logbook.vue b/Web App/web/src/components/Logbook.vue new file mode 100644 index 0000000..212ad60 --- /dev/null +++ b/Web App/web/src/components/Logbook.vue @@ -0,0 +1,551 @@ + + +