From f966d07f04d6948097725bfc4d0b923a5def297f Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 5 Oct 2026 22:08:00 +1100 Subject: [PATCH] feat(org): instance admins manage every org --- internal/contracts/state/v1/state.pb.go | 25 +++++-- internal/domain/access/request.go | 11 +++ internal/domain/org/store.go | 11 ++- internal/infrastructure/postgres/orgs.go | 32 +++++++-- internal/infrastructure/postgres/orgs_test.go | 6 +- internal/infrastructure/staterpc/orgs.go | 52 ++++++++++---- .../infrastructure/staterpc/orgs_client.go | 4 +- internal/infrastructure/staterpc/orgs_test.go | 4 +- internal/webui/api_access_policies.go | 2 +- internal/webui/api_access_policies_test.go | 4 +- internal/webui/api_orgs.go | 56 ++++++++++++--- internal/webui/api_orgs_test.go | 69 +++++++++++++++++++ internal/webui/server.go | 1 + proto/state/v1/state.proto | 3 + ui/dist/assets/index.js | 2 +- ui/src/lib/api.ts | 4 ++ 16 files changed, 240 insertions(+), 46 deletions(-) diff --git a/internal/contracts/state/v1/state.pb.go b/internal/contracts/state/v1/state.pb.go index bc14c3f41..2c197f67a 100644 --- a/internal/contracts/state/v1/state.pb.go +++ b/internal/contracts/state/v1/state.pb.go @@ -14033,12 +14033,15 @@ func (x *GetOrgResponse) GetOrg() *Org { return nil } +// CreateOrgRequest creates an org with its default workspace and its first +// owner. Only an instance admin may. type CreateOrgRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + OwnerIdentityId string `protobuf:"bytes,3,opt,name=owner_identity_id,json=ownerIdentityId,proto3" json:"owner_identity_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateOrgRequest) Reset() { @@ -14085,6 +14088,13 @@ func (x *CreateOrgRequest) GetName() string { return "" } +func (x *CreateOrgRequest) GetOwnerIdentityId() string { + if x != nil { + return x.OwnerIdentityId + } + return "" +} + type CreateOrgResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Org *Org `protobuf:"bytes,1,opt,name=org,proto3" json:"org,omitempty"` @@ -15627,10 +15637,11 @@ const file_state_v1_state_proto_rawDesc = "" + "\rGetOrgRequest\x12\x15\n" + "\x06org_id\x18\x01 \x01(\tR\x05orgId\"1\n" + "\x0eGetOrgResponse\x12\x1f\n" + - "\x03org\x18\x01 \x01(\v2\r.state.v1.OrgR\x03org\"6\n" + + "\x03org\x18\x01 \x01(\v2\r.state.v1.OrgR\x03org\"b\n" + "\x10CreateOrgRequest\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\"4\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12*\n" + + "\x11owner_identity_id\x18\x03 \x01(\tR\x0fownerIdentityId\"4\n" + "\x11CreateOrgResponse\x12\x1f\n" + "\x03org\x18\x01 \x01(\v2\r.state.v1.OrgR\x03org\".\n" + "\x15ListWorkspacesRequest\x12\x15\n" + diff --git a/internal/domain/access/request.go b/internal/domain/access/request.go index 12bb5700e..4cefaeb82 100644 --- a/internal/domain/access/request.go +++ b/internal/domain/access/request.go @@ -73,6 +73,17 @@ func (p Principal) Role(ws org.WorkspaceID) org.Role { return orgRole } +// InstanceAdmin reports whether the principal owns the default org (org-sys): +// its owners administer the whole instance, whichever org they act in. +func (p Principal) InstanceAdmin() bool { + for _, m := range p.Memberships { + if m.OrgID == org.DefaultOrgID && m.WorkspaceID == "" && m.Role == org.RoleOwner { + return true + } + } + return false +} + // Resource is the record acted on: its type, its workspace and org as // parents, its owner and its state. type Resource struct { diff --git a/internal/domain/org/store.go b/internal/domain/org/store.go index e44ff19ad..1a0f753bb 100644 --- a/internal/domain/org/store.go +++ b/internal/domain/org/store.go @@ -12,8 +12,9 @@ import ( // Repository persists the tenant boundary. A store that implements it owns // ID conflict rules (org and workspace IDs are caller-provided and unique). type Repository interface { //nolint:interfacebloat // one tenant-boundary store contract: orgs, workspaces, memberships and agent assignments - // CreateOrg inserts a new org; re-creating an existing ID is an error. - CreateOrg(context.Context, Org) (Org, error) + // CreateOrg inserts a new org with its default workspace and owner; + // re-creating an existing ID is an error. + CreateOrg(context.Context, Org, identity.IdentityID) (Org, error) // GetOrg returns one org by ID, or ErrOrgNotFound. GetOrg(context.Context, OrgID) (Org, error) // ListOrgs returns every org, oldest first. @@ -55,6 +56,12 @@ type API interface { AssignAgent(context.Context, AgentAssignment) error } +// Creator makes an org with its default workspace and first owner, the one +// instance-admin write the dashboard carries. +type Creator interface { + CreateOrg(context.Context, Org, identity.IdentityID) (Org, error) +} + // Upgrader performs the resumable default org/workspace upgrade. // It runs in // the State Store first, then in the event store, each phase resumable from diff --git a/internal/infrastructure/postgres/orgs.go b/internal/infrastructure/postgres/orgs.go index 981c521cd..598fcfd22 100644 --- a/internal/infrastructure/postgres/orgs.go +++ b/internal/infrastructure/postgres/orgs.go @@ -24,20 +24,40 @@ func orgFromRow(o postgresdb.Org) org.Org { return org.Org{ID: org.OrgID(o.ID), Name: o.Name} } -// CreateOrg inserts a new org; re-creating an existing ID is ErrOrgExists. -func (s *Store) CreateOrg(ctx context.Context, value org.Org) (org.Org, error) { +// CreateOrg inserts a new org, its default workspace and its owner in one +// transaction, so an org never exists without someone who can act in it. +// Re-creating an existing ID is ErrOrgExists. +func (s *Store) CreateOrg(ctx context.Context, value org.Org, owner identity.IdentityID) (org.Org, error) { if err := value.Validate(); err != nil { return org.Org{}, err } - if err := s.queries().InsertOrg(ctx, postgresdb.InsertOrgParams{ - ID: string(value.ID), Name: value.Name, - }); err != nil { + membership := org.Membership{IdentityID: owner, OrgID: value.ID, Role: org.RoleOwner} + if err := membership.Validate(); err != nil { + return org.Org{}, err + } + tx, err := s.pool.Begin(ctx) + if err != nil { + return org.Org{}, err + } + defer func() { _ = tx.Rollback(ctx) }() + q := postgresdb.New(tx) + if err := q.InsertOrg(ctx, postgresdb.InsertOrgParams{ID: string(value.ID), Name: value.Name}); err != nil { if isUniqueViolation(err) { return org.Org{}, fmt.Errorf("%w: %s", org.ErrOrgExists, value.ID) } return org.Org{}, err } - return value, nil + if err := q.InsertWorkspace(ctx, postgresdb.InsertWorkspaceParams{ + ID: string(org.DefaultWorkspaceID), OrgID: string(value.ID), Name: "Default", + }); err != nil { + return org.Org{}, err + } + if err := q.EnsureMembership(ctx, postgresdb.EnsureMembershipParams{ + IdentityID: string(owner), OrgID: string(value.ID), Role: string(org.RoleOwner), + }); err != nil { + return org.Org{}, err + } + return value, tx.Commit(ctx) } // GetOrg returns one org by ID, or ErrOrgNotFound. diff --git a/internal/infrastructure/postgres/orgs_test.go b/internal/infrastructure/postgres/orgs_test.go index 846aca305..d304a186f 100644 --- a/internal/infrastructure/postgres/orgs_test.go +++ b/internal/infrastructure/postgres/orgs_test.go @@ -15,9 +15,6 @@ import ( func TestOrgStoreMembers(t *testing.T) { ctx := t.Context() db := pgstore.Open(t) - if _, err := db.CreateOrg(ctx, org.Org{ID: "acme", Name: "Acme"}); err != nil { - t.Fatalf("create org: %v", err) - } for _, id := range []string{"sam", "bot"} { kind := identity.KindUser name := "Sam" @@ -28,6 +25,9 @@ func TestOrgStoreMembers(t *testing.T) { t.Fatalf("create identity %s: %v", id, err) } } + if _, err := db.CreateOrg(ctx, org.Org{ID: "acme", Name: "Acme"}, "sam"); err != nil { + t.Fatalf("create org: %v", err) + } if err := db.EnsureMembership(ctx, org.Membership{IdentityID: "sam", OrgID: "acme", Role: org.RoleDeveloper}); err != nil { t.Fatalf("ensure membership: %v", err) diff --git a/internal/infrastructure/staterpc/orgs.go b/internal/infrastructure/staterpc/orgs.go index f86bf44b8..f14d617ac 100644 --- a/internal/infrastructure/staterpc/orgs.go +++ b/internal/infrastructure/staterpc/orgs.go @@ -3,11 +3,13 @@ package staterpc import ( "context" "errors" + "slices" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" pb "github.com/samcharles93/archie-core/internal/contracts/state/v1" + "github.com/samcharles93/archie-core/internal/domain/access" "github.com/samcharles93/archie-core/internal/domain/identity" "github.com/samcharles93/archie-core/internal/domain/org" ) @@ -69,6 +71,11 @@ func (s *server) ListOrgs(ctx context.Context, _ *pb.ListOrgsRequest) (*pb.ListO if err != nil { return nil, s.orgErr("ListOrgs", err) } + // Only an instance admin sees every org; anyone else sees their own. + if p, ok := access.PrincipalFromContext(ctx); !ok || !p.InstanceAdmin() { + caller := org.OrgFromContext(ctx) + values = slices.DeleteFunc(values, func(o org.Org) bool { return o.ID != caller }) + } out := make([]*pb.Org, len(values)) for i := range values { out[i] = orgProto(values[i]) @@ -78,13 +85,25 @@ func (s *server) ListOrgs(ctx context.Context, _ *pb.ListOrgsRequest) (*pb.ListO // orgInForce is the org a request is served for: the one the caller's // principal carries. A request field cannot choose another tenant. -func orgInForce(ctx context.Context) org.OrgID { return org.OrgFromContext(ctx) } +// orgFor is the org a request acts in: the caller's own, or the one it names +// when the caller is an instance admin. Anyone else naming another org still +// acts in their own, so the contract cannot reach another tenant. +func orgFor(ctx context.Context, requested string) org.OrgID { + caller := org.OrgFromContext(ctx) + if requested == "" || org.OrgID(requested) == caller { + return caller + } + if p, ok := access.PrincipalFromContext(ctx); ok && p.InstanceAdmin() { + return org.OrgID(requested) + } + return caller +} -func (s *server) GetOrg(ctx context.Context, _ *pb.GetOrgRequest) (*pb.GetOrgResponse, error) { +func (s *server) GetOrg(ctx context.Context, r *pb.GetOrgRequest) (*pb.GetOrgResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } - value, err := s.deps.Orgs.GetOrg(ctx, orgInForce(ctx)) + value, err := s.deps.Orgs.GetOrg(ctx, orgFor(ctx, r.GetOrgId())) if err != nil { return nil, s.orgErr("GetOrg", err) } @@ -95,18 +114,27 @@ func (s *server) CreateOrg(ctx context.Context, r *pb.CreateOrgRequest) (*pb.Cre if s.deps.Orgs == nil { return nil, errOrgsUnavailable } - value, err := s.deps.Orgs.CreateOrg(ctx, orgValue(&pb.Org{Id: r.GetId(), Name: r.GetName()})) + if p, ok := access.PrincipalFromContext(ctx); !ok || !p.InstanceAdmin() { + return nil, status.Error(codes.PermissionDenied, "only an instance admin creates orgs") + } + value, err := s.deps.Orgs.CreateOrg(ctx, orgValue(&pb.Org{Id: r.GetId(), Name: r.GetName()}), identity.IdentityID(r.GetOwnerIdentityId())) if err != nil { return nil, s.orgErr("CreateOrg", err) } + // The new org's role policies are what let its owner act in it. + if s.deps.Policies != nil { + if err := s.deps.Policies.EnsureShippedOrgPolicies(ctx, value.ID); err != nil { + return nil, s.logErr("CreateOrg policies", err) + } + } return &pb.CreateOrgResponse{Org: orgProto(value)}, nil } -func (s *server) ListWorkspaces(ctx context.Context, _ *pb.ListWorkspacesRequest) (*pb.ListWorkspacesResponse, error) { +func (s *server) ListWorkspaces(ctx context.Context, r *pb.ListWorkspacesRequest) (*pb.ListWorkspacesResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } - values, err := s.deps.Orgs.ListWorkspaces(ctx, orgInForce(ctx)) + values, err := s.deps.Orgs.ListWorkspaces(ctx, orgFor(ctx, r.GetOrgId())) if err != nil { return nil, s.orgErr("ListWorkspaces", err) } @@ -121,7 +149,7 @@ func (s *server) CreateWorkspace(ctx context.Context, r *pb.CreateWorkspaceReque if s.deps.Orgs == nil { return nil, errOrgsUnavailable } - value := workspaceValue(&pb.Workspace{Id: r.GetId(), OrgId: string(orgInForce(ctx)), Name: r.GetName(), Environment: r.GetEnvironment()}) + value := workspaceValue(&pb.Workspace{Id: r.GetId(), OrgId: string(orgFor(ctx, r.GetOrgId())), Name: r.GetName(), Environment: r.GetEnvironment()}) created, err := s.deps.Orgs.CreateWorkspace(ctx, value) if err != nil { return nil, s.orgErr("CreateWorkspace", err) @@ -129,11 +157,11 @@ func (s *server) CreateWorkspace(ctx context.Context, r *pb.CreateWorkspaceReque return &pb.CreateWorkspaceResponse{Workspace: workspaceProto(created)}, nil } -func (s *server) ListMembers(ctx context.Context, _ *pb.ListMembersRequest) (*pb.ListMembersResponse, error) { +func (s *server) ListMembers(ctx context.Context, r *pb.ListMembersRequest) (*pb.ListMembersResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } - values, err := s.deps.Orgs.ListMembers(ctx, orgInForce(ctx)) + values, err := s.deps.Orgs.ListMembers(ctx, orgFor(ctx, r.GetOrgId())) if err != nil { return nil, s.orgErr("ListMembers", err) } @@ -150,7 +178,7 @@ func (s *server) SetMembership(ctx context.Context, r *pb.SetMembershipRequest) } err := s.deps.Orgs.EnsureMembership(ctx, org.Membership{ IdentityID: identity.IdentityID(r.GetIdentityId()), - OrgID: orgInForce(ctx), + OrgID: orgFor(ctx, r.GetOrgId()), WorkspaceID: org.WorkspaceID(r.GetWorkspaceId()), Role: org.Role(r.GetRole()), }) @@ -166,7 +194,7 @@ func (s *server) RemoveMembership(ctx context.Context, r *pb.RemoveMembershipReq } err := s.deps.Orgs.RemoveMembership(ctx, org.Membership{ IdentityID: identity.IdentityID(r.GetIdentityId()), - OrgID: orgInForce(ctx), + OrgID: orgFor(ctx, r.GetOrgId()), WorkspaceID: org.WorkspaceID(r.GetWorkspaceId()), }) if err != nil { @@ -181,7 +209,7 @@ func (s *server) AssignAgent(ctx context.Context, r *pb.AssignAgentRequest) (*pb } err := s.deps.Orgs.AssignAgent(ctx, org.AgentAssignment{ IdentityID: identity.IdentityID(r.GetIdentityId()), - OrgID: orgInForce(ctx), + OrgID: orgFor(ctx, r.GetOrgId()), }) if err != nil { return nil, s.orgErr("AssignAgent", err) diff --git a/internal/infrastructure/staterpc/orgs_client.go b/internal/infrastructure/staterpc/orgs_client.go index ff75a2faa..2f92d5dd6 100644 --- a/internal/infrastructure/staterpc/orgs_client.go +++ b/internal/infrastructure/staterpc/orgs_client.go @@ -11,8 +11,8 @@ import ( // The Client serves the dashboard's org surface over the contract. var _ org.API = (*Client)(nil) -func (c *Client) CreateOrg(ctx context.Context, value org.Org) (org.Org, error) { - r, err := c.client.CreateOrg(ctx, &pb.CreateOrgRequest{Id: string(value.ID), Name: value.Name}) +func (c *Client) CreateOrg(ctx context.Context, value org.Org, owner identity.IdentityID) (org.Org, error) { + r, err := c.client.CreateOrg(ctx, &pb.CreateOrgRequest{Id: string(value.ID), Name: value.Name, OwnerIdentityId: string(owner)}) if err != nil { return org.Org{}, unmapError(err) } diff --git a/internal/infrastructure/staterpc/orgs_test.go b/internal/infrastructure/staterpc/orgs_test.go index dabb8cf71..45d79a264 100644 --- a/internal/infrastructure/staterpc/orgs_test.go +++ b/internal/infrastructure/staterpc/orgs_test.go @@ -22,7 +22,9 @@ type fakeOrgs struct { agents []org.AgentAssignment } -func (*fakeOrgs) CreateOrg(_ context.Context, value org.Org) (org.Org, error) { return value, nil } +func (*fakeOrgs) CreateOrg(_ context.Context, value org.Org, _ identity.IdentityID) (org.Org, error) { + return value, nil +} func (*fakeOrgs) GetOrg(_ context.Context, id org.OrgID) (org.Org, error) { return org.Org{ID: id, Name: "Acme"}, nil diff --git a/internal/webui/api_access_policies.go b/internal/webui/api_access_policies.go index 0765e2292..f78330489 100644 --- a/internal/webui/api_access_policies.go +++ b/internal/webui/api_access_policies.go @@ -122,5 +122,5 @@ func instanceOwner(r *http.Request) bool { if !ok { principal = access.SharedTokenOwner() } - return principal.Org == org.DefaultOrgID && principal.Role("") == org.RoleOwner + return principal.InstanceAdmin() } diff --git a/internal/webui/api_access_policies_test.go b/internal/webui/api_access_policies_test.go index dfec38608..edb1e3a83 100644 --- a/internal/webui/api_access_policies_test.go +++ b/internal/webui/api_access_policies_test.go @@ -37,13 +37,13 @@ func TestInstanceOwner(t *testing.T) { {"a developer of org-sys is not the instance owner", memberOf("dev", org.DefaultOrgID, org.RoleDeveloper), true, false}, {"an owner of another org is not the instance owner", memberOf("other", "acme", org.RoleOwner), true, false}, { - "an org-sys owner membership while serving another org is not the instance owner", + "an org-sys owner acting in another org is still the instance owner", access.Principal{ IdentityID: "other", Org: "acme", Memberships: []org.Membership{{IdentityID: "other", OrgID: org.DefaultOrgID, Role: org.RoleOwner}}, }, - true, false, + true, true, }, } for _, tt := range tests { diff --git a/internal/webui/api_orgs.go b/internal/webui/api_orgs.go index c602679bb..bedd27685 100644 --- a/internal/webui/api_orgs.go +++ b/internal/webui/api_orgs.go @@ -19,20 +19,19 @@ func (s *Server) orgReady(w http.ResponseWriter) bool { return true } -// orgInPath resolves the route's {id}, requiring it to be the caller's own -// org: the dashboard has no instance-admin view yet, so a path that names -// another tenant reads as not found rather than leaking it. +// orgInPath resolves the route's {id}: the caller's own org, or any org for +// an instance admin. Another tenant reads as not found rather than leaking. func (s *Server) orgInPath(w http.ResponseWriter, r *http.Request) (org.OrgID, bool) { - caller := policyOrg(r) - if r.PathValue("id") != string(caller) { + id := org.OrgID(r.PathValue("id")) + if id != policyOrg(r) && !instanceOwner(r) { http.Error(w, "org not found", http.StatusNotFound) return "", false } - return caller, true + return id, true } -// handleOrgsList lists the caller's org only. The State Store contract lists -// every org; instance-admin widening is a later change. +// handleOrgsList lists every org to an instance admin and the caller's own +// to anyone else. func (s *Server) handleOrgsList(w http.ResponseWriter, r *http.Request) { if !s.orgReady(w) { return @@ -45,13 +44,52 @@ func (s *Server) handleOrgsList(w http.ResponseWriter, r *http.Request) { caller := policyOrg(r) out := []org.Org{} for _, value := range values { - if value.ID == caller { + if value.ID == caller || instanceOwner(r) { out = append(out, value) } } writeJSON(w, map[string]any{"orgs": out}) } +// handleOrgCreate creates an org with its default workspace and first owner. +// Only an instance admin may. +func (s *Server) handleOrgCreate(w http.ResponseWriter, r *http.Request) { + if !s.orgReady(w) { + return + } + if !instanceOwner(r) { + http.Error(w, "only an instance admin creates orgs", http.StatusForbidden) + return + } + creator, ok := s.Orgs.(org.Creator) + if !ok { + http.Error(w, "org creation unavailable", http.StatusServiceUnavailable) + return + } + var request struct { + ID string `json:"id"` + Name string `json:"name"` + OwnerIdentity string `json:"owner_identity"` + } + if err := json.NewDecoder(http.MaxBytesReader(w, r.Body, 16<<10)).Decode(&request); err != nil { + http.Error(w, "invalid org: "+err.Error(), http.StatusBadRequest) + return + } + created, err := creator.CreateOrg(r.Context(), org.Org{ID: org.OrgID(request.ID), Name: request.Name}, identity.IdentityID(request.OwnerIdentity)) + if err != nil { + writeOrgError(w, err) + return + } + // The new org's role policies were seeded; load them so its owner can act. + if s.ReloadAccess != nil { + if err := s.ReloadAccess(r.Context()); err != nil { + s.logf("reload access after org create", "err", err) + } + } + w.WriteHeader(http.StatusCreated) + writeJSON(w, map[string]any{"org": created}) +} + func (s *Server) handleOrgGet(w http.ResponseWriter, r *http.Request) { if !s.orgReady(w) { return diff --git a/internal/webui/api_orgs_test.go b/internal/webui/api_orgs_test.go index df6ac14ec..ee6416fa3 100644 --- a/internal/webui/api_orgs_test.go +++ b/internal/webui/api_orgs_test.go @@ -35,6 +35,15 @@ func newFakeOrgs() *fakeOrgs { func (f *fakeOrgs) ListOrgs(context.Context) ([]org.Org, error) { return f.orgs, nil } +func (f *fakeOrgs) CreateOrg(_ context.Context, value org.Org, owner identity.IdentityID) (org.Org, error) { + if err := value.Validate(); err != nil { + return org.Org{}, err + } + f.orgs = append(f.orgs, value) + f.members[value.ID] = []org.Member{{IdentityID: owner, Role: org.RoleOwner}} + return value, nil +} + func (f *fakeOrgs) GetOrg(_ context.Context, id org.OrgID) (org.Org, error) { for _, o := range f.orgs { if o.ID == id { @@ -97,6 +106,7 @@ func (f *fakeOrgs) AssignAgent(_ context.Context, value org.AgentAssignment) err func orgRoutes(s *Server) http.Handler { mux := http.NewServeMux() mux.HandleFunc("GET /api/orgs", s.handleOrgsList) + mux.HandleFunc("POST /api/orgs", s.handleOrgCreate) mux.HandleFunc("GET /api/orgs/{id}", s.handleOrgGet) mux.HandleFunc("GET /api/orgs/{id}/workspaces", s.handleOrgWorkspacesList) mux.HandleFunc("POST /api/orgs/{id}/workspaces", s.handleOrgWorkspaceCreate) @@ -218,3 +228,62 @@ func TestOrgMembershipNeedsItsRole(t *testing.T) { }) } } + +// TestInstanceAdminOrgs holds the instance-admin boundary: an owner of org-sys +// lists and opens every org and creates one with its owner; an admin of +// org-sys sees only its own org and cannot create one. +func TestInstanceAdminOrgs(t *testing.T) { + engine, err := infraaccess.New(access.ShippedOrgPolicies(org.DefaultOrgID)) + if err != nil { + t.Fatal(err) + } + tests := []struct { + name string + caller string + method string + path string + body string + wantStatus int + wantBody string + }{ + {"an instance admin lists every org", "owner", http.MethodGet, "/api/orgs", "", http.StatusOK, "acme"}, + {"anyone else lists only their own", "admin", http.MethodGet, "/api/orgs", "", http.StatusOK, string(org.DefaultOrgID)}, + {"an instance admin opens another org", "owner", http.MethodGet, "/api/orgs/acme/members", "", http.StatusOK, "boss"}, + {"anyone else does not", "admin", http.MethodGet, "/api/orgs/acme/members", "", http.StatusNotFound, ""}, + {"an instance admin creates an org with its owner", "owner", http.MethodPost, "/api/orgs", `{"id":"beta","name":"Beta","owner_identity":"sam"}`, http.StatusCreated, "beta"}, + {"anyone else cannot", "admin", http.MethodPost, "/api/orgs", `{"id":"beta","name":"Beta","owner_identity":"sam"}`, http.StatusForbidden, ""}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + orgs := newFakeOrgs() + orgs.orgs = append(orgs.orgs, org.Org{ID: "acme", Name: "Acme"}) + orgs.members["acme"] = []org.Member{{IdentityID: "boss", Role: org.RoleOwner}} + s := &Server{ + Access: engine, Principals: rolePrincipals{}, Orgs: orgs, + Authenticate: func(_ context.Context, token string) (identity.Identity, error) { + return identity.Identity{ID: identity.IdentityID(token), Kind: identity.KindUser}, nil + }, + } + var body io.Reader + if tt.body != "" { + body = strings.NewReader(tt.body) + } + req := httptest.NewRequestWithContext(t.Context(), tt.method, tt.path, body) + req.Header.Set("Authorization", "Bearer "+tt.caller) + if tt.body != "" { + req.Header.Set("Content-Type", "application/json") + } + rec := httptest.NewRecorder() + orgRoutes(s).ServeHTTP(rec, req) + if rec.Code != tt.wantStatus { + t.Fatalf("status = %d, want %d, body %s", rec.Code, tt.wantStatus, rec.Body.String()) + } + if tt.wantBody != "" && !strings.Contains(rec.Body.String(), tt.wantBody) { + t.Fatalf("body = %s, want %q", rec.Body.String(), tt.wantBody) + } + if tt.caller == "admin" && tt.path == "/api/orgs" && strings.Contains(rec.Body.String(), "acme") { + t.Fatalf("a non-admin saw another org: %s", rec.Body.String()) + } + }) + } +} diff --git a/internal/webui/server.go b/internal/webui/server.go index 1745a3d61..017c83d1b 100644 --- a/internal/webui/server.go +++ b/internal/webui/server.go @@ -331,6 +331,7 @@ func (s *Server) registerConfigAndLogRoutes(mux *http.ServeMux) { mux.HandleFunc("GET /api/control-plane/audit", s.handleAudit) mux.HandleFunc("GET /api/identities", s.handleIdentitiesList) mux.HandleFunc("GET /api/orgs", s.handleOrgsList) + mux.HandleFunc("POST /api/orgs", s.handleOrgCreate) mux.HandleFunc("GET /api/orgs/{id}", s.handleOrgGet) mux.HandleFunc("GET /api/orgs/{id}/workspaces", s.handleOrgWorkspacesList) mux.HandleFunc("POST /api/orgs/{id}/workspaces", s.handleOrgWorkspaceCreate) diff --git a/proto/state/v1/state.proto b/proto/state/v1/state.proto index 5e4932bd4..c4630d062 100644 --- a/proto/state/v1/state.proto +++ b/proto/state/v1/state.proto @@ -1398,9 +1398,12 @@ message ListOrgsRequest {} message ListOrgsResponse { repeated Org orgs = 1; } message GetOrgRequest { string org_id = 1; } message GetOrgResponse { Org org = 1; } +// CreateOrgRequest creates an org with its default workspace and its first +// owner. Only an instance admin may. message CreateOrgRequest { string id = 1; string name = 2; + string owner_identity_id = 3; } message CreateOrgResponse { Org org = 1; } message ListWorkspacesRequest { string org_id = 1; } diff --git a/ui/dist/assets/index.js b/ui/dist/assets/index.js index faa0807b5..a71ba4532 100644 --- a/ui/dist/assets/index.js +++ b/ui/dist/assets/index.js @@ -3,7 +3,7 @@ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],en `&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,` `)&&(mi(e,0)||ii(),e.textContent=t.children)}if(d){if(_||b||!o||f&48){let t=e.tagName.includes(`-`),i=e.namespaceURI.includes(`svg`)?`svg`:e.namespaceURI.includes(`MathML`)?`mathml`:void 0;for(let a in d)if(_&&(a.endsWith(`value`)||a===`indeterminate`)||s(a)&&!O(a)||a[0]===`.`||t&&!O(a)||u&&u.includes(a)){if(di(e,a,d[a]))continue;r(e,a,null,d[a],i,n)}}else if(d.onClick)r(e,`onClick`,null,d.onClick,void 0,n);else if(f&4&&$t(d.style))for(let e in d.style)d.style[e]}let x;(x=d&&d.onVnodeBeforeMount)&&hs(x,n,t),h&&lr(t,null,n,`beforeMount`),((x=d&&d.onVnodeMounted)||h||l)&&Go(()=>{x&&hs(x,n,t),l&&g.enter(e),h&&lr(t,null,n,`mounted`)},i)}return e.nextSibling},m=(e,t,r,o,s,c,u)=>{u||=!!t.dynamicChildren;let d=t.children,p=d.length,m=!1;for(let t=0;t{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=o(e),f=m(a(e),t,d,n,r,i,s);return f&&ci(f)&&f.data===`]`?a(t.anchor=f):(ii(),l(t.anchor=u(`]`),d,f),f)},g=(e,t,r,i,s,l)=>{if(gi(e,t)||ii(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)c(n);else break}}let u=a(e),d=o(e);return c(e),n(null,t,d,u,r,i,si(d),s),r&&(r.vnode.el=t.el,ro(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&ci(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[d,f]}var ui=new Set([`src`,`srcset`,`href`,`poster`]);function di(e,t,n){return ui.has(t)?e.getAttribute(t)===(n==null?null:`${n}`):!1}var fi=`data-allow-mismatch`,pi={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function mi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(fi);)e=e.parentElement;return hi(e&&e.getAttribute(fi),t)}function hi(e,t){if(e==null)return!1;if(e===``)return!0;{let n=e.split(`,`);return t===0&&n.includes(`children`)?!0:n.includes(pi[t])}}function gi(e,t){return mi(e.parentElement,1)||_i(e)||vi(t)}function _i(e){return e.nodeType===1&&hi(e.getAttribute(fi),1)}function vi({props:e}){let t=e&&e[fi];return typeof t==`string`&&hi(t,1)}var yi=de().requestIdleCallback||(e=>setTimeout(e,1)),bi=de().cancelIdleCallback||(e=>clearTimeout(e)),xi=(e=1e4)=>t=>{let n=yi(t,{timeout:e});return()=>bi(n)};function Si(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t0&&r0&&n0&&i(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(Si(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},wi=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},Ti=(e=[])=>(t,n)=>{y(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function Ei(e,t){if(ci(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(ci(r)){if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++}r=r.nextSibling}}else t(e)}var Di=e=>!!e.type.__asyncLoader;function Oi(e){v(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return L({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=e.isConnected,i=!1;(t.bu||=[]).push(()=>i=!0);let o=()=>{i||!e.parentNode||r&&!e.isConnected||n()},s=a?()=>{let n=a(o,t=>Ei(e,t));n&&(t.bum||=[]).push(n)}:o;u?s():p().then(()=>!t.isUnmounted&&s())},get __asyncResolved(){return u},setup(){let e=ys;if(Zr(e),u)return()=>ki(u,e);let t=t=>{l=null,Rn(t,e,13,!r)};if(s&&e.suspense||Es)return p().then(t=>()=>ki(t,e)).catch(e=>(t(e),()=>r?G(r,{error:e}):null));let a=N(!1),c=N(),d=N(!!i),f,m;return Ki(()=>{f!=null&&clearTimeout(f),m!=null&&clearTimeout(m)}),i&&(m=setTimeout(()=>{e.isUnmounted||(d.value=!1)},i)),o!=null&&(f=setTimeout(()=>{if(!e.isUnmounted&&!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o)),p().then(()=>{e.isUnmounted||(a.value=!0,e.parent&&Ai(e.parent.vnode)&&e.parent.update())}).catch(n=>{if(e.isUnmounted){l=null;return}t(n),c.value=n}),()=>{if(a.value&&u)return ki(u,e);if(c.value&&r)return G(r,{error:c.value});if(n&&!d.value)return ki(n,e)}}})}function ki(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=G(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}var Ai=e=>e.type.__isKeepAlive,ji={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=bs(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&e.length===1?e[0]:e};let i=new Map,a=new Set,o=null,s=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=r,f=d(`div`);r.activate=(e,t,n,r,i)=>{let a=e.component;l(e,t,n,0,s),c(a.vnode,e,t,n,a,s,r,e.slotScopeIds,i),Co(()=>{a.isDeactivated=!1,a.a&&oe(a.a);let t=e.props&&e.props.onVnodeMounted;t&&hs(t,a.parent,e)},s)},r.deactivate=e=>{let t=e.component;No(t.m),No(t.a),l(e,f,null,1,s),Co(()=>{t.da&&oe(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&hs(n,t.parent,e),t.isDeactivated=!0},s)};function p(e){Li(e),u(e,n,s,!0)}function m(e){i.forEach((t,n)=>{let r=Rs(Di(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&h(n)})}function h(e){let t=i.get(e);t&&(!o||!is(t,o))?p(t):o&&Li(o),i.delete(e),a.delete(e)}I(()=>[e.include,e.exclude],([e,t])=>{e&&m(t=>Mi(e,t)),t&&m(e=>!Mi(t,e))},{flush:`post`,deep:!0});let g=null,_=()=>{g!=null&&(Fo(n.subTree.type)?Co(()=>{let e=Ri(n.subTree);e.component&&i.set(g,e)},n.subTree.suspense):i.set(g,Ri(n.subTree)))};return Hi(_),Wi(_),Gi(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=Ri(t);if(e.type===i.type&&e.key===i.key){Li(i);let e=i.component.da;e&&Co(e,r);return}p(e)})}),()=>{if(g=null,!t.default)return o=null;let n=t.default(),r=n[0];if(n.length>1)return o=null,n;if(!rs(r)||!(r.shapeFlag&4)&&!(r.shapeFlag&128))return o=null,r;let s=Ri(r);if(s.type===Yo)return o=null,s;let c=s.type,l=Rs(Di(s)?s.type.__asyncResolved||{}:c),{include:u,exclude:d,max:f}=e;if(u&&(!l||!Mi(u,l))||d&&l&&Mi(d,l))return s.shapeFlag&=-257,o=s,r;let p=s.key==null?c:s.key,m=i.get(p);return s.el&&(s=us(s),r.shapeFlag&128&&(r.ssContent=s)),g=p,m?(s.el=m.el,s.component=m.component,s.transition&&Jr(s,s.transition),s.shapeFlag|=512,a.delete(p),a.add(p)):(a.add(p),f&&a.size>parseInt(f,10)&&h(a.values().next().value)),s.shapeFlag|=256,o=s,Fo(r.type)?r:s}}};function Mi(e,t){return p(e)?e.some(e=>Mi(e,t)):y(e)?e.split(`,`).includes(t):_(e)?(e.lastIndex=0,e.test(t)):!1}function Ni(e,t){Fi(e,`a`,t)}function Pi(e,t){Fi(e,`da`,t)}function Fi(e,t,n=ys){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(zi(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Ai(e.parent.vnode)&&Ii(r,t,n,e),e=e.parent}}function Ii(e,t,n,r){let i=zi(t,e,r,!0);Ki(()=>{u(r[t],i)},n)}function Li(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Ri(e){return e.shapeFlag&128?e.ssContent:e}function zi(e,t,n=ys,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{et();let i=Cs(n),a=Ln(t,n,e,r);return i(),tt(),a};return r?i.unshift(a):i.push(a),a}}var Bi=e=>(t,n=ys)=>{(!Es||e===`sp`)&&zi(e,(...e)=>t(...e),n)},Vi=Bi(`bm`),Hi=Bi(`m`),Ui=Bi(`bu`),Wi=Bi(`u`),Gi=Bi(`bum`),Ki=Bi(`um`),qi=Bi(`sp`),Ji=Bi(`rtg`),Yi=Bi(`rtc`);function Xi(e,t=ys){zi(`ec`,e,t)}var Zi=`components`,Qi=`directives`;function $i(e,t){return ra(Zi,e,!0,t)||e}var ea=Symbol.for(`v-ndc`);function ta(e){return y(e)?ra(Zi,e,!1)||e:e||ea}function na(e){return ra(Qi,e)}function ra(e,t,n=!0,r=!1){let i=ar||ys;if(i){let n=i.type;if(e===Zi){let e=Rs(n,!1);if(e&&(e===t||e===k(t)||e===ie(k(t))))return n}let a=ia(i[e]||n[e],t)||ia(i.appContext[e],t);return!a&&r?n:a}}function ia(e,t){return e&&(e[t]||e[k(t)]||e[ie(k(t))])}function R(e,t,n,r){let i,a=n&&n[r],o=p(e);if(o||y(e)){let n=o&&$t(e),r=!1,s=!1;n&&(r=!tn(e),s=en(e),e=ht(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function z(e,t,n,r,i,a){if(n??={},ar.ce||ar.parent&&Di(ar.parent)&&ar.parent.ce){let e=a!=null&&n.key==null?l({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),V(),U(B,null,[G(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=Zo.length;V();let c;try{let i=o&&aa(o(n)),s=n.key||a||i&&i.key;c=U(B,{key:(s&&!b(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Zo.length;e>s;e--)$o();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),c}function aa(e){return e.some(e=>!rs(e)||!(e.type===Yo||e.type===B&&!aa(e.children)))?e:null}function oa(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:ae(r)]=e[r];return n}var sa=e=>e?Ts(e)?Ls(e):sa(e.parent):null,ca=l(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=>sa(e.parent),$root:e=>sa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Aa(e),$forceUpdate:e=>e.f||=()=>{Yn(e.update)},$nextTick:e=>e.n||=qn.bind(e.proxy),$watch:e=>yr.bind(e)}),la=(e,t)=>e!==r&&!e.__isScriptSetup&&f(e,t),ua={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else if(la(i,t))return s[t]=1,i[t];else if(a!==r&&f(a,t))return s[t]=2,a[t];else if(f(o,t))return s[t]=3,o[t];else if(n!==r&&f(n,t))return s[t]=4,n[t];else Ta&&(s[t]=0)}let u=ca[t],d,p;if(u)return t===`$attrs`&&dt(e.attrs,`get`,``),u(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==r&&f(n,t))return s[t]=4,n[t];if(p=l.config.globalProperties,f(p,t))return p[t]},set({_:e},t,n){let{data:i,setupState:a,ctx:o}=e;return la(a,t)?(a[t]=n,!0):i!==r&&f(i,t)?(i[t]=n,!0):f(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(n[c]||e!==r&&c[0]!==`$`&&f(e,c)||la(t,c)||f(o,c)||f(i,c)||f(ca,c)||f(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?f(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}},dee=l({},ua,{get(e,t){if(t!==Symbol.unscopables)return ua.get(e,t,e)},has(e,t){return t[0]!==`_`&&!fe(t)}});function fee(){return null}function da(){return null}function fa(e){}function pa(e){}function ma(){return null}function ha(){}function ga(e,t){return null}function _a(){return ya(`useSlots`).slots}function va(){return ya(`useAttrs`).attrs}function ya(e){let t=bs();return t.setupContext||=Is(t)}function ba(e){return p(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function xa(e,t){let n=ba(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?p(r)||v(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function Sa(e,t){return!e||!t?e||t:p(e)&&p(t)?e.concat(t):l({},ba(e),ba(t))}function Ca(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function wa(e){let t=bs(),n=Es,r=e();ws(),n&&Ss(!1);let i=()=>{Cs(t),n&&Ss(!0)},a=()=>{bs()!==t&&t.scope.off(),ws(),n&&Ss(!1)};return S(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(a)),e})),[r,()=>{i(),Promise.resolve().then(a)}]}var Ta=!0;function Ea(e){let t=Aa(e),n=e.proxy,r=e.ctx;Ta=!1,t.beforeCreate&&Oa(t.beforeCreate,e,`bc`);let{data:i,computed:o,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:f,mounted:m,beforeUpdate:h,updated:g,activated:_,deactivated:y,beforeDestroy:b,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:ee,expose:te,inheritAttrs:k,components:ne,directives:re,filters:ie}=t;if(u&&Da(u,r,null),s)for(let e in s){let t=s[e];v(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);x(t)&&(e.data=Jt(t))}if(Ta=!0,o)for(let e in o){let t=o[e],i=Y({get:v(t)?t.bind(n,n):v(t.get)?t.get.bind(n,n):a,set:!v(t)&&v(t.set)?t.set.bind(n):a});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(c)for(let e in c)ka(c[e],r,n,e);if(l){let e=v(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{ur(t,e[t])})}d&&Oa(d,e,`c`);function ae(e,t){p(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(ae(Vi,f),ae(Hi,m),ae(Ui,h),ae(Wi,g),ae(Ni,_),ae(Pi,y),ae(Xi,O),ae(Yi,E),ae(Ji,D),ae(Gi,S),ae(Ki,w),ae(qi,ee),p(te)){if(te.length){let t=e.exposed||={};te.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}T&&e.render===a&&(e.render=T),k!=null&&(e.inheritAttrs=k),ne&&(e.components=ne),re&&(e.directives=re),ee&&Zr(e)}function Da(e,t,n=a){p(e)&&(e=Fa(e));for(let n in e){let r=e[n],i;i=x(r)?`default`in r?dr(r.from||n,r.default,!0):dr(r.from||n):dr(r),cn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Oa(e,t,n){Ln(p(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function ka(e,t,n,r){let i=r.includes(`.`)?br(n,r):()=>n[r];if(y(e)){let n=t[e];v(n)&&I(i,n)}else if(v(e))I(i,e.bind(n));else if(x(e)){if(p(e))e.forEach(e=>ka(e,t,n,r));else{let r=v(e.handler)?e.handler.bind(n):t[e.handler];v(r)&&I(i,r,e)}}}function Aa(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>ja(c,e,o,!0)),ja(c,t,o)),x(t)&&a.set(t,c),c}function ja(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ja(e,a,n,!0),i&&i.forEach(t=>ja(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Ma[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Ma={data:Na,props:Ra,emits:Ra,methods:La,computed:La,beforeCreate:Ia,created:Ia,beforeMount:Ia,mounted:Ia,beforeUpdate:Ia,updated:Ia,beforeDestroy:Ia,beforeUnmount:Ia,destroyed:Ia,unmounted:Ia,activated:Ia,deactivated:Ia,errorCaptured:Ia,serverPrefetch:Ia,components:La,directives:La,watch:za,provide:Na,inject:Pa};function Na(e,t){return t?e?function(){return l(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function Pa(e,t){return La(Fa(e),Fa(t))}function Fa(e){if(p(e)){let t={};for(let n=0;n{let l,u=r,d;return _r(()=>{let t=e[a];A(l,t)&&(l=t,c())}),{get(){return s(),n.get?n.get(l):l},set(e){let s=n.set?n.set(e):e;if(!A(s,l)&&!(u!==r&&A(e,u)))return;let f=i.vnode.props,p=!!(f&&(t in f||a in f||o in f)&&(`onUpdate:${t}`in f||`onUpdate:${a}`in f||`onUpdate:${o}`in f));p||(l=e,c()),i.emit(`update:${t}`,s),A(e,u)&&(A(e,s)&&!A(s,d)||p&&u!==r&&!A(s,l))&&c(),u=e,d=s}}});return c[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?s||r:c,done:!1}:{done:!0}}}},c}var Ga=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${k(t)}Modifiers`]||e[`${re(t)}Modifiers`];function Ka(e,t,...n){if(e.isUnmounted)return;let i=e.vnode.props||r,a=n,o=t.startsWith(`update:`),s=o&&Ga(i,t.slice(7));s&&(s.trim&&(a=n.map(e=>y(e)?e.trim():e)),s.number&&(a=a.map(ce)));let c,l=i[c=ae(t)]||i[c=ae(k(t))];!l&&o&&(l=i[c=ae(re(t))]),l&&Ln(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Ln(u,e,6,a)}}var qa=new WeakMap;function Ja(e,t,n=!1){let r=n?qa:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!v(e)){let r=e=>{let n=Ja(e,t,!0);n&&(s=!0,l(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(x(e)&&r.set(e,null),null):(p(a)?a.forEach(e=>o[e]=null):l(o,a),x(e)&&r.set(e,o),o)}function Ya(e,t){return!e||!s(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),f(e,t[0].toLowerCase()+t.slice(1))||f(e,re(t))||f(e,t))}function Xa(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=sr(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=fs(u.call(t,e,d,f,m,p,h)),y=s}else{let e=t;v=fs(e.length>1?e(f,{attrs:s,slots:o,emit:l}):e(f,null)),y=t.props?s:Qa(s)}}catch(t){Zo.length=0,Rn(t,e,1),v=G(Yo)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(c)&&(y=$a(y,a)),b=us(b,y,!1,!0))}return n.dirs&&(b=us(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Jr(Cr(b.type)&&qr(b)||b,n.transition),v=b,sr(_),v}function Za(e,t=!0){let n;for(let t=0;t{let t;for(let n in e)(n===`class`||n===`style`||s(n))&&((t||={})[n]=e[n]);return t},$a=(e,t)=>{let n={};for(let r in e)(!c(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function eo(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?to(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(io),oo=e=>Object.getPrototypeOf(e)===io;function so(e,t,n,r=!1){let i={},a=ao();e.propsDefaults=Object.create(null),lo(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Yt(i):e.type.props?i:a,e.attrs=a}function co(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=rn(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{d=!0;let[n,r]=po(e,t,!0);l(c,n),r&&u.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!s&&!d)return x(e)&&a.set(e,i),i;if(p(s))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,go=e=>p(e)?e.map(fs):[fs(e)],_o=(e,t,n)=>{if(t._n)return t;let r=F((...e)=>go(t(...e)),n);return r._c=!1,r},vo=(e,t,n)=>{let r=e._ctx;for(let n in e){if(ho(n))continue;let i=e[n];if(v(i))t[n]=_o(n,i,r);else if(i!=null){let e=go(i);t[n]=()=>e}}},yo=(e,t)=>{let n=go(t);e.slots.default=()=>n},bo=(e,t,n)=>{for(let r in t)(n||!ho(r))&&(e[r]=t[r])},xo=(e,t,n)=>{let r=e.slots=ao();if(e.vnode.shapeFlag&32){let e=t._;e?(bo(r,t,n),n&&se(r,`_`,e,!0)):vo(t,r)}else t&&yo(e,t)},So=(e,t,n)=>{let{vnode:i,slots:a}=e,o=!0,s=r;if(i.shapeFlag&32){let e=t._;e?n&&e===1?o=!1:bo(a,t,n):(o=!t.$stable,vo(t,a)),s=t}else t&&(yo(e,t),s={default:1});if(o)for(let e in a)!ho(e)&&s[e]==null&&delete a[e]},Co=Go;function wo(e){return Eo(e)}function To(e){return Eo(e,li)}function Eo(e,t){let n=de();n.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=a,insertStaticContent:_}=e,v=(e,t,n,r=null,a=null,o=null,s=void 0,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!is(e,t)&&(r=j(e),pe(e,a,o,!0),e=null),t.patchFlag===-2&&(l=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===i&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:u,ref:d,shapeFlag:f}=t;switch(u){case Jo:y(e,t,n,r);break;case Yo:b(e,t,n,r);break;case Xo:e??x(t,n,r,s);break;case B:ne(e,t,n,r,a,o,s,c,l);break;default:f&1?w(e,t,n,r,a,o,s,c,l):f&6?re(e,t,n,r,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,n,r,a,o,s,c,l,be)}d!=null&&a?ti(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&ti(e.ref,null,o,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ee(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&D(e.children,d,null,r,i,Do(e,a),s,u),_&&lr(e,null,r,`created`),E(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!O(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&hs(f,r,e)}_&&lr(e,null,r,`beforeMount`);let v=ko(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&Co(()=>{try{f&&hs(f,r,e),v&&g.enter(d),_&&lr(e,null,r,`mounted`)}finally{}},i)},E=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||r,h=t.props||r,g;if(n&&Oo(n,!1),(g=h.onVnodeBeforeUpdate)&&hs(g,n,t,e),f&&lr(t,e,n,`beforeUpdate`),n&&Oo(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?te(e.dynamicChildren,d,l,n,i,Do(t,a),o):s||ce(e,t,l,null,n,i,Do(t,a),o,!1),u>0){if(u&16)k(l,m,h,n,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t{g&&hs(g,n,t,e),f&&lr(t,e,n,`updated`)},i)},te=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==r)for(let r in t)!O(r)&&!(r in n)&&c(e,r,t[r],null,a,i);for(let r in n){if(O(r))continue;let o=n[r],s=t[r];o!==s&&r!==`value`&&c(e,r,s,o,a,i)}`value`in n&&c(e,`value`,t.value,n.value,a)}},ne=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),D(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(te(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Ao(e,t,!0)):ce(e,t,n,f,i,a,s,c,l)},re=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ie(t,n,r,i,a,o,c):ae(e,t,c)},ie=(e,t,n,r,i,a,o)=>{let s=e.component=vs(e,r,i);if(Ai(e)&&(s.ctx.renderer=be),Ds(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,A,o),!e.el){let r=s.subTree=G(Yo);b(null,r,t,n),e.placeholder=r.el}}else A(s,e,t,n,i,a,o)},ae=(e,t,n)=>{let r=t.component=e.component;if(eo(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,se(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},A=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Mo(e);if(n){t&&(t.el=c.el,se(e,t,o)),n.asyncDep.then(()=>{Co(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Oo(e,!1),t?(t.el=c.el,se(e,t,o)):t=c,n&&oe(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&hs(d,s,t,c),Oo(e,!0);let f=Xa(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),j(p),e,i,a),t.el=f.el,u===null&&ro(e,f.el),r&&Co(r,i),(d=t.props&&t.props.onVnodeUpdated)&&Co(()=>hs(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Di(t);if(Oo(e,!1),l&&oe(l),!m&&(o=c&&c.onVnodeBeforeMount)&&hs(o,d,t),Oo(e,!0),s&&Se){let t=()=>{e.subTree=Xa(e),Se(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Xa(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Co(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Co(()=>hs(o,d,e),i)}(t.shapeFlag&256||d&&Di(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Co(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ze(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Yn(u),Oo(e,!0),l()},se=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,co(e,t.props,r,n),So(e,t.children,n),et(),Qn(e),tt()},ce=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ue(l,d,n,r,i,a,o,s,c);return}if(f&256){le(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&_e(l,i,a),d!==l&&p(n,d)):u&16?m&16?ue(l,d,n,r,i,a,o,s,c):_e(l,i,a,!0):(u&8&&p(n,``),m&16&&D(d,n,r,i,a,o,s,c))},le=(e,t,n,r,a,o,s,c,l)=>{e||=i,t||=i;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;pd?_e(e,a,o,!0,!1,f):D(t,n,r,a,o,s,c,l,f)},ue=(e,t,n,r,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?ps(t[u]):fs(t[u]);if(is(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?ps(t[p]):fs(t[p]);if(is(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,i=ep)for(;u<=f;)pe(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?ps(t[u]):fs(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){pe(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&is(r,t[_])){i=_;break}i===void 0?pe(r,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let w=x?jo(C):i;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,i=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){fe(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,be);return}if(c===B){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Fr];a._isLeaving&&a[Fr](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},pe=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(et(),ti(s,null,n,e,!0),tt()),p!=null&&(!e.ctx||e.ctx===t)&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Di(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&hs(_,t,e),u&6)ge(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&lr(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,be,r):l&&!l.hasOnce&&(a!==B||d>0&&d&64)?_e(l,t,n,!1,!0):(a===B&&d&384||!i&&u&16)&&_e(c,t,n),r&&me(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Co(()=>{_&&hs(_,t,e),h&&lr(e,null,t,`unmounted`),v&&(e.el=null)},n)},me=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===B){he(n,r);return}if(t===Xo){C(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},he=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},ge=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;No(c),No(l),r&&oe(r),i.stop(),a?(a.flags|=8,pe(o,e,t,n)):e.vnode.el&&o&&(o.transition=e.vnode.transition,pe(o,e,t,n)),s&&Co(s,t),Co(()=>{e.isUnmounted=!0},t)},_e=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return j(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Sr];return n?h(n):t},ve=!1,ye=(e,t,n)=>{let r;e==null?t._vnode&&(pe(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ve||=(ve=!0,Qn(r),$n(),!1)},be={p:v,um:pe,m:fe,r:me,mt:ie,mc:D,pc:ce,pbc:te,n:j,o:e},xe,Se;return t&&([xe,Se]=t(be)),{render:ye,hydrate:xe,createApp:Ha(ye,xe)}}function Do({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Oo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ko(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ao(e,t,n=!1){let r=e.children,i=t.children;if(p(r)&&p(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Mo(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Mo(t)}function No(e){if(e)for(let t=0;te.__isSuspense,Io=0,Lo={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)zo(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback&&!a.isHydrating){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Bo(e,t,n,r,i,o,s,c,l)}},hydrate:Ho,normalize:Uo};function Ro(e,t){let n=e.props&&e.props[t];v(n)&&n()}function zo(e,t,n,r,i,a,o,s,c){let{p:l,o:{createElement:u}}=c,d=u(`div`),f=e.suspense=Vo(e,i,r,t,d,n,a,o,s,c);l(null,f.pendingBranch=e.ssContent,d,null,r,f,a,o),f.deps>0?(Ro(e,`onPending`),Ro(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),Ko(f,e.ssFallback)):f.resolve(!1,!0)}function Bo(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,is(h,f)?(d.deps++,c(h,f,_?n:d.hiddenContainer,null,i,d,a,o,s),d.deps--,d.deps<=0?d.resolve():g&&!_&&!d.isFallbackMountPending&&(c(m,p,n,r,i,null,a,o,s),Ko(d,p))):(d.pendingId=Io++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():d.isFallbackMountPending||(c(m,p,n,r,i,null,a,o,s),Ko(d,p))):m&&is(m,f)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&is(m,f))c(m,f,n,r,i,d,a,o,s),Ko(d,f);else if(Ro(t,`onPending`),d.pendingBranch=f,d.pendingId=f.shapeFlag&512?f.component.suspenseId:Io++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function Vo(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=qo(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?le(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:Io++,timeout:typeof y==`number`?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u,isInFallback:d}=x,g=!1;if(x.isHydrating)x.isHydrating=!1;else if(!e){g=i&&o.transition&&o.transition.mode===`out-in`;let e=!1;g&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b&&!e?m(i):a,0),Zn(c),d&&r.ssFallback&&(r.ssFallback.el=null))}),i&&!x.isFallbackMountPending&&(h(i.el)===u&&(a=m(i),e=!0),p(i,l,x,!0),!g&&d&&r.ssFallback&&Co(()=>r.ssFallback.el=null,x)),g||f(o,u,a,0)}x.isFallbackMountPending=!1,Ko(x,o),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,S=!1;for(;y;){if(y.pendingBranch){for(let e=0;e{if(x.isFallbackMountPending=!1,!x.isInFallback)return;let e=x.vnode.ssFallback;d(null,e,i,o,r,null,a,s,c),Ko(x,e)},u=e.transition&&e.transition.mode===`out-in`;u&&(x.isFallbackMountPending=!0,n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{Rn(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;if(ws(),i&&!e.scope.active){r&&--x.deps===0&&x.resolve();return}e.asyncResolved=!0;let{vnode:s}=e;ks(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&(s.placeholder=null,g(c)),ro(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function Ho(e,t,n,r,i,a,o,s,c){let l=t.suspense=Vo(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function Uo(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Wo(r?n.default:n),e.ssFallback=r?Wo(n.fallback):G(Yo)}function Wo(e){let t;if(v(e)){let n=es&&e._c;n&&(e._d=!1,V()),e=e(),n&&(e._d=!0,t=Qo,$o())}return p(e)&&(e=Za(e)),e=fs(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function Go(e,t){t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):Zn(e)}function Ko(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,ro(r,i))}function qo(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var B=Symbol.for(`v-fgt`),Jo=Symbol.for(`v-txt`),Yo=Symbol.for(`v-cmt`),Xo=Symbol.for(`v-stc`),Zo=[],Qo=null;function V(e=!1){Zo.push(Qo=e?null:[])}function $o(){Zo.pop(),Qo=Zo[Zo.length-1]||null}var es=1;function ts(e,t=!1){es+=e,e<0&&Qo&&t&&(Qo.hasOnce=!0)}function ns(e){return e.dynamicChildren=es>0?Qo||i:null,$o(),es>0&&Qo&&Qo.push(e),e}function H(e,t,n,r,i,a){return ns(W(e,t,n,r,i,a,!0))}function U(e,t,n,r,i){return ns(G(e,t,n,r,i,!0))}function rs(e){return e?e.__v_isVNode===!0:!1}function is(e,t){return e.type===t.type&&e.key===t.key}function as(e){}var os=({key:e})=>e??null,ss=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:y(e)||cn(e)||v(e)?{i:ar,r:e,k:t,f:!!n}:e);function W(e,t=null,n=null,r=0,i=null,a=e===B?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&os(t),ref:t&&ss(t),scopeId:or,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ar};return s?(ms(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=y(n)?8:16),es>0&&!o&&Qo&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Qo.push(c),c}var G=cs;function cs(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===ea)&&(e=Yo),rs(e)){let r=us(e,t,!0);return n&&ms(r,n),es>0&&!a&&Qo&&(r.shapeFlag&6?Qo[Qo.indexOf(e)]=r:Qo.push(r)),r.patchFlag=-2,r}if(zs(e)&&(e=e.__vccOpts),t){t=ls(t);let{class:e,style:n}=t;e&&!y(e)&&(t.class=j(e)),x(n)&&(nn(n)&&!p(n)&&(n=l({},n)),t.style=pe(n))}let o=y(e)?1:Fo(e)?128:Cr(e)?64:x(e)?4:v(e)?2:0;return W(e,t,n,r,i,o,a,!0)}function ls(e){return e?nn(e)||oo(e)?l({},e):e:null}function us(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?J(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&os(l),ref:t&&t.ref?n&&a?p(a)?a.concat(ss(t)):[a,ss(t)]:ss(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==B?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&us(e.ssContent),ssFallback:e.ssFallback&&us(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&Jr(u,c.clone(u)),u}function K(e=` `,t=0){return G(Jo,null,e,t)}function ds(e,t){let n=G(Xo,null,e);return n.staticCount=t,n}function q(e=``,t=!1){return t?(V(),U(Yo,null,e)):G(Yo,null,e)}function fs(e){return e==null||typeof e==`boolean`?G(Yo):p(e)?G(B,null,e.slice()):rs(e)?ps(e):G(Jo,null,String(e))}function ps(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:us(e)}function ms(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(p(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),ms(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!oo(t)?t._ctx=ar:r===3&&ar&&(ar.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(v(t)){if(r&65){ms(e,{default:t});return}t={default:t,_ctx:ar},n=32}else t=String(t),r&64?(n=16,t=[K(t)]):n=8;e.children=t,e.shapeFlag|=n}function J(...e){let t={};for(let n=0;nys||ar,xs,Ss;{let e=de(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};xs=t(`__VUE_INSTANCE_SETTERS__`,e=>ys=e),Ss=t(`__VUE_SSR_SETTERS__`,e=>Es=e)}var Cs=e=>{let t=ys;return xs(e),e.scope.on(),()=>{e.scope.off(),xs(t)}},ws=()=>{ys&&ys.scope.off(),xs(null)};function Ts(e){return e.vnode.shapeFlag&4}var Es=!1;function Ds(e,t=!1,n=!1){t&&Ss(t);let{props:r,children:i}=e.vnode,a=Ts(e);so(e,r,a,t),xo(e,i,n||t);let o=a?Os(e,t):void 0;return t&&Ss(!1),o}function Os(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ua);let{setup:r}=n;if(r){et();let n=e.setupContext=r.length>1?Is(e):null,i=Cs(e),a=In(r,e,0,[e.props,n]),o=S(a);if(tt(),i(),(o||e.sp)&&!Di(e)&&Zr(e),o){if(a.then(ws,ws),t)return a.then(n=>{Ss(!0);try{ks(e,n,t)}finally{Ss(!1)}}).catch(t=>{Rn(t,e,0)});e.asyncDep=a}else ks(e,a,t)}else Ps(e,t)}function ks(e,t,n){v(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:x(t)&&(e.setupState=hn(t)),Ps(e,n)}var As,js;function Ms(e){As=e,js=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,dee))}}var Ns=()=>!As;function Ps(e,t,n){let r=e.type;if(!e.render){if(!t&&As&&!r.render){let t=r.template||Aa(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=l(l({isCustomElement:n,delimiters:a},i),o);r.render=As(t,s)}}e.render=r.render||a,js&&js(e)}{let t=Cs(e);et();try{Ea(e)}finally{tt(),t()}}}var Fs={get(e,t){return dt(e,`get`,``),e[t]}};function Is(e){return{attrs:new Proxy(e.attrs,Fs),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ls(e){return e.exposed?e.exposeProxy||=new Proxy(hn(an(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ca)return ca[n](e)},has(e,t){return t in e||t in ca}}):e.proxy}function Rs(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}function zs(e){return v(e)&&`__vccOpts`in e}var Y=(e,t)=>iee(e,t,Es);function Bs(e,t,n){try{ts(-1);let r=arguments.length;return r===2?x(t)&&!p(t)?rs(t)?G(e,null,[t]):G(e,t):G(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&rs(n)&&(n=[n]),G(e,t,n))}finally{ts(1)}}function Vs(){}function Hs(e,t,n,r){let i=n[r];if(i&&Us(i,e))return i;let a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function Us(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&Qo&&Qo.push(e),!0}var Ws=`3.5.43`,Gs=a,Ks=Fn,qs=nr,Js=ir,Ys={createComponentInstance:vs,setupComponent:Ds,renderComponentRoot:Xa,setCurrentRenderingInstance:sr,isVNode:rs,normalizeVNode:fs,getComponentPublicInstance:Ls,ensureValidVNode:aa,pushWarningContext:jn,popWarningContext:Mn},Xs=void 0,Zs=typeof window<`u`&&window.trustedTypes;if(Zs)try{Xs=Zs.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Qs=Xs?e=>Xs.createHTML(e):e=>e,$s=`http://www.w3.org/2000/svg`,ec=`http://www.w3.org/1998/Math/MathML`,tc=typeof document<`u`?document:null,nc=tc&&tc.createElement(`template`),rc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?tc.createElementNS($s,e):t===`mathml`?tc.createElementNS(ec,e):n?tc.createElement(e,{is:n}):tc.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>tc.createTextNode(e),createComment:e=>tc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>tc.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{nc.innerHTML=Qs(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=nc.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ic=`transition`,ac=`animation`,oc=Symbol(`_vtc`),sc={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},cc=l({},zr,sc),lc=(e=>(e.displayName=`Transition`,e.props=cc,e))((e,{slots:t})=>Bs(Ur,fc(e),t)),uc=(e,t=[])=>{p(e)?e.forEach(e=>e(...t)):e&&e(...t)},dc=e=>e?p(e)?e.some(e=>e.length>1):e.length>1:!1;function fc(e){let t={};for(let n in e)n in sc||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:u=o,appearToClass:d=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=pc(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,gc(e,t?d:s),gc(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,gc(e,f),gc(e,m),gc(e,p),t&&t()},O=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);uc(i,[t,o]),_c(()=>{gc(t,e?c:a),hc(t,e?d:s),dc(i)||yc(t,r,g,o)})};return l(t,{onBeforeEnter(e){uc(v,[e]),hc(e,a),hc(e,o)},onBeforeAppear(e){uc(C,[e]),hc(e,c),hc(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);hc(e,f),e._enterCancelled?(hc(e,p),Cc(e)):(Cc(e),hc(e,p)),_c(()=>{e._isLeaving&&(gc(e,f),hc(e,m),dc(x)||yc(e,r,_,n))}),uc(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),uc(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),uc(T,[e])},onLeaveCancelled(e){D(e),uc(S,[e])}})}function pc(e){if(e==null)return null;if(x(e))return[mc(e.enter),mc(e.leave)];{let t=mc(e);return[t,t]}}function mc(e){return le(e)}function hc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[oc]||(e[oc]=new Set)).add(t)}function gc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[oc];n&&(n.delete(t),n.size||(e[oc]=void 0))}function _c(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var vc=0;function yc(e,t,n,r){let i=e._endId=++vc,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=bc(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${ic}Delay`),a=r(`${ic}Duration`),o=xc(i,a),s=r(`${ac}Delay`),c=r(`${ac}Duration`),l=xc(s,c),u=null,d=0,f=0;t===ic?o>0&&(u=ic,d=o,f=a.length):t===ac?l>0&&(u=ac,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?ic:ac:null,f=u?u===ic?a.length:c.length:0);let p=u===ic&&/\b(?:transform|all)(?:,|$)/.test(r(`${ic}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function xc(e,t){for(;e.lengthSc(t)+Sc(e[n])))}function Sc(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Cc(e){return(e?e.ownerDocument:document).body.offsetHeight}function wc(e,t,n){let r=e[oc];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Tc=Symbol(`_vod`),Ec=Symbol(`_vsh`),Dc={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Tc]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Oc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Oc(e,!0),r.enter(e)):r.leave(e,()=>{Oc(e,!1)}):Oc(e,t))},beforeUnmount(e,{value:t}){Oc(e,t)}};function Oc(e,t){e.style.display=t?e[Tc]:`none`,e[Ec]=!t}function kc(){Dc.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}var Ac=Symbol(``);function jc(e){let t=bs();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>Nc(e,n))},r=()=>{let r=e(t.proxy);t.ce?Nc(t.ce,r):Mc(t.subTree,r),n(r)};Ui(()=>{Zn(r)}),Hi(()=>{I(r,a,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),Ki(()=>e.disconnect())})}function Mc(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Mc(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Nc(e.el,t);else if(e.type===B)e.children.forEach(e=>Mc(e,t));else if(e.type===Xo){let{el:n,anchor:r}=e;for(;n&&(Nc(n,t),n!==r);)n=n.nextSibling}}function Nc(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=je(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[Ac]=r}}var Pc=/(?:^|;)\s*display\s*:/;function Fc(e,t,n){let r=e.style,i=y(n),a=!1;if(n&&!i){if(t){if(y(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Lc(r,t,``)}else for(let e in t)n[e]??Lc(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Lc(r,i,``):Bc(e,i,!y(t)&&t?t[i]:void 0,o)||Lc(r,i,o)}}else if(i){if(t!==n){let e=r[Ac];e&&(n+=`;`+e),r.cssText=n,a=Pc.test(n)}}else t&&e.removeAttribute(`style`);Tc in e&&(e[Tc]=a?r.display:``,e[Ec]&&(r.display=`none`))}var Ic=/\s*!important$/;function Lc(e,t,n){if(p(n))n.forEach(n=>Lc(e,t,n));else if(n??=``,t.startsWith(`--`))Ic.test(n)?e.setProperty(t,n.replace(Ic,``),`important`):e.setProperty(t,n);else{let r=pee(e,t);Ic.test(n)?e.setProperty(re(r),n.replace(Ic,``),`important`):e[r]=n}}var Rc=[`Webkit`,`Moz`,`ms`],zc={};function pee(e,t){let n=zc[t];if(n)return n;let r=k(t);if(r!==`filter`&&r in e)return zc[t]=r;r=ie(r);for(let n=0;nZc||=(Qc.then(()=>Zc=0),Date.now());function el(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(p(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,nl=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?wc(e,r,o):t===`style`?Fc(e,n,r):s(t)?c(t)||qc(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):rl(e,t,r,o))?(Uc(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Hc(e,t,r,o,a,t!==`value`)):e._isVueCE&&(il(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!y(r)))?Uc(e,k(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Hc(e,t,r,o))};function rl(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&tl(t)&&v(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return tl(t)&&y(n)?!1:t in e}function il(e,t){let n=e._def.props;if(!n)return!1;let r=k(t);return Array.isArray(n)?n.some(e=>k(e)===r):Object.keys(n).some(e=>k(e)===r)}var al={};function ol(e,t,n){let r=L(e,t);E(r)&&(r=l({},r,t));class i extends ll{constructor(e){super(r,e,n)}}return i.def=r,i}var sl=((e,t)=>ol(e,t,Xl)),cl=typeof HTMLElement<`u`?HTMLElement:class{},ll=class e extends cl{constructor(e,t={},n=Yl){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Yl?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(l({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,qn(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let e=0;e{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!p(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=le(this._props[e])),(i||=Object.create(null))[k(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;if(t)return this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}),this._pendingResolve;e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)f(this,e)||Object.defineProperty(this,e,{get:()=>P(t[e])})}_resolveProps(e){let{props:t}=e,n=p(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(k))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):al,r=k(e);t&&this._numberProps&&this._numberProps[r]&&(n=le(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===al?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(re(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(re(e),t+``):t||this.removeAttribute(re(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),ql(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=G(this._def,l(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,E(t[0])?l({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),re(e)!==e&&t(re(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t(delete e.props.mode,e))({name:`TransitionGroup`,props:l({},cc,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=bs(),r=Lr(),i,a;return Wi(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!Sl(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(vl),i.forEach(yl);let r=i.filter(bl);Cc(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;hc(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[hl]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[hl]=null,gc(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=rn(e),s=fc(o),c=o.tag||B;if(i=[],a)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=bc(r);return a.removeChild(r),o}var Cl=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return p(t)?e=>oe(t,e):t};function wl(e){e.target.composing=!0}function Tl(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var El=Symbol(`_assign`),Dl=Symbol(`_initialValue`);function Ol(e,t,n){return t&&(e=e.trim()),n&&(e=ce(e)),e}var kl={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[Dl]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[Dl]=e.defaultValue.replace(/\r\n?/g,` `))),e[El]=Cl(i);let a=r||i.props&&i.props.type===`number`;Wc(e,t?`change`:`input`,t=>{t.target.composing||e[El](Ol(e.value,n,a))}),(n||a)&&Wc(e,`change`,()=>{e.value=Ol(e.value,n,a)}),t||(Wc(e,`compositionstart`,wl),Wc(e,`compositionend`,Tl),Wc(e,`change`,Tl))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[Dl];delete e[Dl],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[El](Ol(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[El]=Cl(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?ce(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Al={deep:!0,created(e,t,n){e[El]=Cl(n),Wc(e,`change`,()=>{let t=e._modelValue,n=Fl(e),r=e.checked,i=e[El];if(p(t)){let e=De(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(h(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Il(e,r))})},mounted:jl,beforeUpdate(e,t,n){e[El]=Cl(n),jl(e,t,n)}};function jl(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(p(t))i=De(t,r.props.value)>-1;else if(h(t))i=t.has(r.props.value);else{if(t===n)return;i=Ee(t,Il(e,!0))}e.checked!==i&&(e.checked=i)}var Ml={created(e,{value:t},n){e.checked=Ee(t,n.props.value),e[El]=Cl(n),Wc(e,`change`,()=>{e[El](Fl(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[El]=Cl(r),t!==n&&(e.checked=Ee(t,r.props.value))}},Nl={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Wc(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?ce(Fl(e)):Fl(e)),r=e.multiple,i=r?h(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?p(i)?t.slice():t:i];try{e[El](i)}finally{qn(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[El]=Cl(r)},mounted(e,{value:t}){Pl(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[El]=Cl(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!mee(t,n[1],n[0]))&&Pl(e,t)}};function mee(e,t,n){if(!n||p(e))return Ee(e,t);if(h(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function Pl(e,t){let n=e.multiple,r=p(t);if(!n||r||h(t)){for(let i=0,a=e.options.length;iString(e)===String(o)):De(t,o)>-1}else a.selected=t.has(o)}else if(Ee(Fl(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Fl(e){return`_value`in e?e._value:e.value}function Il(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Ll={created(e,t,n){zl(e,t,n,null,`created`)},mounted(e,t,n){zl(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){zl(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){zl(e,t,n,r,`updated`)}};function Rl(e,t){switch(e){case`SELECT`:return Nl;case`TEXTAREA`:return kl;default:switch(t){case`checkbox`:return Al;case`radio`:return Ml;default:return kl}}}function zl(e,t,n,r,i){let a=Rl(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function hee(){kl.getSSRProps=({value:e})=>({value:e}),Ml.getSSRProps=({value:e},t)=>{if(t.props&&Ee(t.props.value,e))return{checked:!0}},Al.getSSRProps=({value:e},t)=>{if(p(e)){if(t.props&&De(e,t.props.value)>-1)return{checked:!0}}else if(h(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Ll.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=Rl(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var gee=[`ctrl`,`shift`,`alt`,`meta`],_ee={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,t)=>gee.some(n=>e[`${n}Key`]&&!t.includes(n))},Bl=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=re(n.key);if(t.some(e=>e===r||vee[e]===r))return e(n)}))},Hl=l({patchProp:nl},rc),Ul,Wl=!1;function Gl(){return Ul||=wo(Hl)}function Kl(){return Ul=Wl?Ul:To(Hl),Wl=!0,Ul}var ql=((...e)=>{Gl().render(...e)}),Jl=((...e)=>{Kl().hydrate(...e)}),Yl=((...e)=>{let t=Gl().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Ql(e);if(!r)return;let i=t._component;!v(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Zl(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),Xl=((...e)=>{let t=Kl().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=Ql(e);if(t)return n(t,!0,Zl(t))},t});function Zl(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Ql(e){return y(e)?document.querySelector(e):e}var $l=!1,eu=()=>{$l||($l=!0,hee(),kc())},tu=t({BaseTransition:()=>Ur,BaseTransitionPropsValidators:()=>zr,Comment:()=>Yo,DeprecationTypes:()=>null,EffectScope:()=>Ne,ErrorCodes:()=>Pn,ErrorTypeStrings:()=>Ks,Fragment:()=>B,KeepAlive:()=>ji,ReactiveEffect:()=>ze,Static:()=>Xo,Suspense:()=>Lo,Teleport:()=>Mr,Text:()=>Jo,TrackOpTypes:()=>aee,Transition:()=>lc,TransitionGroup:()=>_l,TriggerOpTypes:()=>oee,VueElement:()=>ll,assertNumber:()=>Nn,callWithAsyncErrorHandling:()=>Ln,callWithErrorHandling:()=>In,camelize:()=>k,capitalize:()=>ie,cloneVNode:()=>us,compatUtils:()=>null,compile:()=>nu,computed:()=>Y,createApp:()=>Yl,createBlock:()=>U,createCommentVNode:()=>q,createElementBlock:()=>H,createElementVNode:()=>W,createHydrationRenderer:()=>To,createPropsRestProxy:()=>Ca,createRenderer:()=>wo,createSSRApp:()=>Xl,createSlots:()=>uee,createStaticVNode:()=>ds,createTextVNode:()=>K,createVNode:()=>G,customRef:()=>_n,defineAsyncComponent:()=>Oi,defineComponent:()=>L,defineCustomElement:()=>ol,defineEmits:()=>da,defineExpose:()=>fa,defineModel:()=>ha,defineOptions:()=>pa,defineProps:()=>fee,defineSSRCustomElement:()=>sl,defineSlots:()=>ma,devtools:()=>qs,effect:()=>tee,effectScope:()=>Pe,getCurrentInstance:()=>bs,getCurrentScope:()=>Fe,getCurrentWatcher:()=>En,getTransitionRawChildren:()=>Yr,guardReactiveProps:()=>ls,h:()=>Bs,handleError:()=>Rn,hasInjectionContext:()=>fr,hydrate:()=>Jl,hydrateOnIdle:()=>xi,hydrateOnInteraction:()=>Ti,hydrateOnMediaQuery:()=>wi,hydrateOnVisible:()=>Ci,initCustomFormatter:()=>Vs,initDirectivesForSSR:()=>eu,inject:()=>dr,isMemoSame:()=>Us,isProxy:()=>nn,isReactive:()=>$t,isReadonly:()=>en,isRef:()=>cn,isRuntimeOnly:()=>Ns,isShallow:()=>tn,isVNode:()=>rs,markRaw:()=>an,mergeDefaults:()=>xa,mergeModels:()=>Sa,mergeProps:()=>J,nextTick:()=>qn,nodeOps:()=>rc,normalizeClass:()=>j,normalizeProps:()=>ve,normalizeStyle:()=>pe,onActivated:()=>Ni,onBeforeMount:()=>Vi,onBeforeUnmount:()=>Gi,onBeforeUpdate:()=>Ui,onDeactivated:()=>Pi,onErrorCaptured:()=>Xi,onMounted:()=>Hi,onRenderTracked:()=>Yi,onRenderTriggered:()=>Ji,onScopeDispose:()=>Ie,onServerPrefetch:()=>qi,onUnmounted:()=>Ki,onUpdated:()=>Wi,onWatcherCleanup:()=>Dn,openBlock:()=>V,patchProp:()=>nl,popScopeId:()=>cee,provide:()=>ur,proxyRefs:()=>hn,pushScopeId:()=>see,queuePostFlushCb:()=>Zn,reactive:()=>Jt,readonly:()=>Xt,ref:()=>N,registerRuntimeCompiler:()=>Ms,render:()=>ql,renderList:()=>R,renderSlot:()=>z,resolveComponent:()=>$i,resolveDirective:()=>na,resolveDynamicComponent:()=>ta,resolveFilter:()=>null,resolveTransitionHooks:()=>Gr,setBlockTracking:()=>ts,setDevtoolsHook:()=>Js,setTransitionHooks:()=>Jr,shallowReactive:()=>Yt,shallowReadonly:()=>Zt,shallowRef:()=>ln,ssrContextKey:()=>pr,ssrUtils:()=>Ys,stop:()=>Ze,toDisplayString:()=>M,toHandlerKey:()=>ae,toHandlers:()=>oa,toRaw:()=>rn,toRef:()=>xn,toRefs:()=>vn,toValue:()=>pn,transformVNodeArgs:()=>as,triggerRef:()=>fn,unref:()=>P,useAttrs:()=>va,useCssModule:()=>fl,useCssVars:()=>jc,useHost:()=>ul,useId:()=>Xr,useModel:()=>Wa,useSSRContext:()=>mr,useShadowRoot:()=>dl,useSlots:()=>_a,useTemplateRef:()=>Qr,useTransitionState:()=>Lr,vModelCheckbox:()=>Al,vModelDynamic:()=>Ll,vModelRadio:()=>Ml,vModelSelect:()=>Nl,vModelText:()=>kl,vShow:()=>Dc,version:()=>Ws,warn:()=>Gs,watch:()=>I,watchEffect:()=>hr,watchPostEffect:()=>gr,watchSyncEffect:()=>_r,withAsyncContext:()=>wa,withCtx:()=>F,withDefaults:()=>ga,withDirectives:()=>cr,withKeys:()=>Vl,withMemo:()=>Hs,withModifiers:()=>Bl,withScopeId:()=>lee}),nu=()=>{},ru=typeof window<`u`,iu,au=e=>iu=e,ou=Symbol();function su(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var cu=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function lu(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function uu(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){hu(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function du(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function fu(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var pu=typeof navigator==`object`?navigator:{userAgent:``},mu=/Macintosh/.test(pu.userAgent)&&/AppleWebKit/.test(pu.userAgent)&&!/Safari/.test(pu.userAgent),hu=ru?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!mu?gu:`msSaveOrOpenBlob`in pu?_u:vu:()=>{};function gu(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?fu(r):du(r.href)?uu(e,t,n):(r.target=`_blank`,fu(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){fu(r)},0))}function _u(e,t=`download`,n){if(typeof e==`string`){if(du(e))uu(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){fu(t)})}}else navigator.msSaveOrOpenBlob(lu(e,n),t)}function vu(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return uu(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(cu.HTMLElement))||`safari`in cu,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||mu)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:yee}=Object;function yu(){let e=Pe(!0),t=e.run(()=>N({})),n=[],r=[],i=an({install(e){au(i),i._a=e,e.provide(ou,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var bu=()=>{};function xu(e,t,n,r=bu){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&Fe()&&Ie(i),i}function Su(e,...t){e.forEach(e=>{e(...t)})}var Cu=e=>e(),wu=Symbol(),Tu=Symbol();function Eu(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!Object.hasOwn(t,n))continue;let r=t[n],i=e[n];e[n]=su(i)&&su(r)&&Object.hasOwn(e,n)&&!cn(r)&&!$t(r)?Eu(i,r):r}return e}var Du=Symbol();function Ou(e){return!e||typeof e!=`object`||!Object.hasOwn(e,Du)}var{assign:ku}=Object;function Au(e){return!!(cn(e)&&e.effect)}function ju(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),ku(vn(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=an(Y(()=>{au(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=Mu(e,l,t,n,r,!0),c}function Mu(e,t,n={},r,i,a){let o,s=ku({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p,m=r.state.value[e];!a&&!m&&(r.state.value[e]={});let h;function g(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:`patch function`,storeId:e,events:p}):(Eu(r.state.value[e],t),n={type:`patch object`,payload:t,storeId:e,events:p});let i=h=Symbol();qn().then(()=>{h===i&&(l=!0)}),u=!0,Su(d,n,r.state.value[e])}let _=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{ku(e,t)})}:bu;function v(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let y=(t,n=``)=>{if(wu in t)return t[Tu]=n,t;let i=function(){au(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}Su(f,{args:n,name:i[Tu],store:b,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:b,n)}catch(e){throw Su(o,e),e}return l instanceof Promise?l.then(e=>(Su(a,e),e)).catch(e=>(Su(o,e),Promise.reject(e))):(Su(a,l),l)};return i[wu]=!0,i[Tu]=n,i},b=Jt({_p:r,$id:e,$onAction:xu.bind(null,f),$patch:g,$reset:_,$subscribe(t,n={}){if(d.has(t))return bu;let i=xu(d,t,n.detached,()=>a()),a=o.run(()=>I(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:`direct`,events:p},r)},ku({},c,n)));return i},$dispose:v});r._s.set(e,b);let x=(r._a&&r._a.runWithContext||Cu)(()=>r._e.run(()=>(o=Pe()).run(()=>t({action:y}))));for(let t in x){let n=x[t];cn(n)&&!Au(n)||$t(n)?a||(m&&Ou(n)&&(cn(n)?n.value=m[t]:((n instanceof Set||n instanceof Map)&&n.clear(),Eu(n,m[t]))),r.state.value[e][t]=n):typeof n==`function`&&(x[t]=y(n,t),s.actions[t]=n)}return ku(b,x),ku(rn(b),x),Object.defineProperty(b,"$state",{get:()=>r.state.value[e],set:e=>{g(t=>{ku(t,e)})}}),r._p.forEach(e=>{let t=o.run(()=>e({store:b,app:r._a,pinia:r,options:s}));ku(b,t)}),m&&a&&n.hydrate&&n.hydrate(b.$state,m),l=!0,u=!0,b}function Nu(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=fr();return n||=o?dr(ou,null):null,n&&au(n),n=iu,n._s.has(e)||(i?Mu(e,t,r,n):ju(e,r,n)),n._s.get(e)}return a.$id=e,a}function Pu(e){let t=rn(e),n={};for(let r in t){let i=t[r];i?.effect?n[r]=Y({get:()=>e[r],set(t){e[r]=t}}):(cn(i)||$t(i))&&(n[r]=xn(e,r))}return n}var Fu={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Iu=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim();function Lu(e){return e!=null}function Ru(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Fu.width,a=e.size??e.height??Fu.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Iu(...c):Iu(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Fu[`stroke-width`])*Number(e.size??e.width??Fu.width)/Number(t.size??t.width??Fu.width):t.strokeWidth??Fu[`stroke-width`];return[`svg`,{...Object.entries(Fu).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Lu(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Lu(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Lu(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var zu=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Bu=e=>e===``,Vu=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Hu=Symbol(`lucide-icons`);function Uu(){return dr(Hu,{})}var Wu=({name:e,iconNode:t,"icon-node":n,icon:r={name:e&&Vu(e),node:t??n??[],size:24,aliases:[]},absoluteStrokeWidth:i,"absolute-stroke-width":a,nonScalingStroke:o,"non-scaling-stroke":s,strokeWidth:c,"stroke-width":l,size:u,width:d=u,height:f=u,color:p,...m},{slots:h})=>{let{size:g,color:_,strokeWidth:v=2,absoluteStrokeWidth:y=!1,nonScalingStroke:b=!1,class:x=``}=Uu(),S=Bu(i)||Bu(a)||i===!0||a===!0||y===!0,C=Bu(o)||Bu(s)||o===!0||s===!0||b===!0;delete m.class;let w=h.default?.(),[,T,E=[]]=Ru(r,{color:p??_,width:d??u??g,height:f??u??g,strokeWidth:c??l??v,absoluteStrokeWidth:S,nonScalingStroke:C,className:x,hasA11yProp:w!=null&&w.length>0||zu(m),attributes:m});return Bs(`svg`,T,[...E.map(([e,t])=>Bs(e,t)),...w??[]])};function Gu(e,t=[]){let n=typeof e==`string`?{name:e,node:t}:e;return(e,{slots:t})=>Bs(Wu,{...e,icon:n},t.default?{default:t.default}:void 0)}var Ku=Gu({name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]}),qu=Gu({name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]}),Ju=Gu({name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]}),Yu=Gu({name:`arrow-up-right`,size:24,node:[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]}),Xu=Gu({name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]}),Zu=Gu({name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]}),Qu=Gu({name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]}),$u=Gu({name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]}),ed=Gu({name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]}),td=Gu({name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]}),nd=Gu({name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]}),rd=Gu({name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]}),id=Gu({name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]}),ad=Gu({name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]}),od=Gu({name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]}),sd=Gu({name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]}),cd=Gu({name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]}),ld=Gu({name:`clipboard-paste`,size:24,node:[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]}),ud=Gu({name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]}),dd=Gu({name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]}),fd=Gu({name:`file-search`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]}),pd=Gu({name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]}),md=Gu({name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]}),hd=Gu({name:`inbox`,size:24,node:[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]}),gd=Gu({name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]}),_d=Gu({name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]}),vd=Gu({name:`lock-open`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]],aliases:[`unlock`]}),yd=Gu({name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]}),bd=Gu({name:`message-circle-plus`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]}),xd=Gu({name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]}),Sd=Gu({name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]}),Cd=Gu({name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]}),wd=Gu({name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]}),Td=Gu({name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]}),Ed=Gu({name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]}),Dd=Gu({name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]}),Od=Gu({name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]}),kd=Gu({name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]}),Ad=Gu({name:`repeat`,size:24,node:[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]}),jd=Gu({name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]}),Md=Gu({name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]}),Nd=Gu({name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]}),Pd=Gu({name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]}),Fd=Gu({name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]}),Id=Gu({name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]}),Ld=Gu({name:`skip-forward`,size:24,node:[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]}),Rd=Gu({name:`tag`,size:24,node:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]}),zd=Gu({name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]}),Bd=Gu({name:`text-align-start`,size:24,node:[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]],aliases:[`text`,`align-left`]}),Vd=Gu({name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]}),Hd=Gu({name:`trending-down`,size:24,node:[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]}),Ud=Gu({name:`trending-up`,size:24,node:[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]}),Wd=Gu({name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]}),Gd=Gu({name:`type`,size:24,node:[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]}),Kd=Gu({name:`user-check`,size:24,node:[[`path`,{d:`m16 11 2 2 4-4`,key:`9rsbq5`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]}),qd=Gu({name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]}),Jd=Gu({name:`webhook`,size:24,node:[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`,key:`q3hayz`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`,key:`1go1hn`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`,key:`qlwsc0`}]]}),Yd=Gu({name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]}),Xd=Gu({name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]}),Zd=Gu({name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]});function Qd(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{let n=Array(e.length+t.length);for(let t=0;t({classGroupId:e,validator:t}),nf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),rf=`-`,af=[],of=`arbitrary..`,sf=e=>{let t=uf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return lf(e);let n=e.split(rf);return cf(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ef(i,t):t:i||af}return n[e]||af}}},cf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=cf(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(rf):e.slice(t).join(rf),s=a.length;for(let e=0;ee.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?of+r:void 0})(),uf=e=>{let{theme:t,classGroups:n}=e;return df(n,t)},df=(e,t)=>{let n=nf();for(let r in e){let i=e[r];ff(i,n,r,t)}return n},ff=(e,t,n,r)=>{let i=e.length;for(let a=0;a{if(typeof e==`string`){mf(e,t,n);return}if(typeof e==`function`){hf(e,t,n,r);return}gf(e,t,n,r)},mf=(e,t,n)=>{let r=e===``?t:_f(t,e);r.classGroupId=n},hf=(e,t,n,r)=>{if(vf(e)){ff(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(tf(n,e))},gf=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e{let n=e,r=t.split(rf),i=r.length;for(let e=0;e`isThemeGetter`in e&&e.isThemeGetter===!0,yf=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},bf=`!`,xf=`:`,Sf=[],Cf=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),wf=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;si?a-i:void 0;return Cf(t,l,c,u)};if(t){let e=t+xf,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Cf(Sf,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Tf=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ef=e=>({cache:yf(e.cacheSize),parseClassName:wf(e),sortModifiers:Tf(e),postfixLookupClassGroupIds:Df(e),...sf(e)}),Df=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Of),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+bf:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e0?` `+l:l)}return l},Af=(...e)=>{let t=0,n,r,i=``;for(;t{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r{let n,r,i,a,o=o=>(n=Ef(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=kf(e,n);return i(e,a),a};return a=o,(...e)=>a(Af(...e))},Nf=[],Pf=e=>{let t=t=>t[e]||Nf;return t.isThemeGetter=!0,t.themeKey=e,t},Ff=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,If=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Lf=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Rf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Vf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Uf=e=>Lf.test(e),Wf=e=>!!e&&!Number.isNaN(Number(e)),Gf=e=>!!e&&Number.isInteger(Number(e)),Kf=e=>e.endsWith(`%`)&&Wf(e.slice(0,-1)),qf=e=>Rf.test(e),Jf=()=>!0,Yf=e=>zf.test(e)&&!Bf.test(e),Xf=()=>!1,Zf=e=>Vf.test(e),Qf=e=>Hf.test(e),$f=e=>!np(e)&&!up(e),ep=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),tp=e=>vp(e,Sp,Xf),np=e=>Ff.test(e),rp=e=>vp(e,Cp,Yf),ip=e=>vp(e,wp,Wf),ap=e=>vp(e,Ep,Jf),op=e=>vp(e,Tp,Xf),sp=e=>vp(e,bp,Xf),cp=e=>vp(e,xp,Qf),lp=e=>vp(e,Dp,Zf),up=e=>If.test(e),dp=e=>yp(e,Cp),fp=e=>yp(e,Tp),pp=e=>yp(e,bp),mp=e=>yp(e,Sp),hp=e=>yp(e,xp),gp=e=>yp(e,Dp,!0),_p=e=>yp(e,Ep,!0),vp=(e,t,n)=>{let r=Ff.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},yp=(e,t,n=!1)=>{let r=If.exec(e);return r?r[1]?t(r[1]):n:!1},bp=e=>e===`position`||e===`percentage`,xp=e=>e===`image`||e===`url`,Sp=e=>e===`length`||e===`size`||e===`bg-size`,Cp=e=>e===`length`,wp=e=>e===`number`,Tp=e=>e===`family-name`,Ep=e=>e===`number`||e===`weight`,Dp=e=>e===`shadow`,Op=Mf(()=>{let e=Pf(`color`),t=Pf(`font`),n=Pf(`text`),r=Pf(`font-weight`),i=Pf(`tracking`),a=Pf(`leading`),o=Pf(`breakpoint`),s=Pf(`container`),c=Pf(`spacing`),l=Pf(`radius`),u=Pf(`shadow`),d=Pf(`inset-shadow`),f=Pf(`text-shadow`),p=Pf(`drop-shadow`),m=Pf(`blur`),h=Pf(`perspective`),g=Pf(`aspect`),_=Pf(`ease`),v=Pf(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),up,np],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[up,np,c],T=()=>[Uf,`full`,`auto`,...w()],E=()=>[Gf,`none`,`subgrid`,up,np],D=()=>[`auto`,{span:[`full`,Gf,up,np]},Gf,up,np],O=()=>[Gf,`auto`,up,np],ee=()=>[`auto`,`min`,`max`,`fr`,up,np],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ne=()=>[`auto`,...w()],re=()=>[Uf,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ie=()=>[s,Uf,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ae=()=>[Uf,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,up,np],oe=()=>[...b(),pp,sp,{position:[up,np]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,mp,tp,{size:[up,np]}],le=()=>[Kf,dp,rp],ue=()=>[``,`none`,`full`,l,up,np],de=()=>[``,Wf,dp,rp],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[Wf,Kf,pp,sp],he=()=>[``,`none`,m,up,np],ge=()=>[`none`,Wf,up,np],_e=()=>[`none`,Wf,up,np],j=()=>[Wf,up,np],ve=()=>[Uf,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[qf],breakpoint:[qf],color:[Jf],container:[qf],"drop-shadow":[qf],ease:[`in`,`out`,`in-out`],font:[$f],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[qf],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[qf],shadow:[qf],spacing:[`px`,Wf],text:[qf],"text-shadow":[qf],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Uf,np,up,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,up,np]}],"container-named":[ep],columns:[{columns:[Wf,`auto`,np,up,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Gf,`auto`,up,np]}],basis:[{basis:[Uf,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Wf,Uf,`auto`,`initial`,`none`,np]}],grow:[{grow:[``,Wf,up,np]}],shrink:[{shrink:[``,Wf,up,np]}],order:[{order:[Gf,`first`,`last`,`none`,up,np]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ne()}],mx:[{mx:ne()}],my:[{my:ne()}],ms:[{ms:ne()}],me:[{me:ne()}],mbs:[{mbs:ne()}],mbe:[{mbe:ne()}],mt:[{mt:ne()}],mr:[{mr:ne()}],mb:[{mb:ne()}],ml:[{ml:ne()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:re()}],"inline-size":[{inline:[`auto`,...ie()]}],"min-inline-size":[{"min-inline":[`auto`,...ie()]}],"max-inline-size":[{"max-inline":[`none`,...ie()]}],"block-size":[{block:[`auto`,...ae()]}],"min-block-size":[{"min-block":[`auto`,...ae()]}],"max-block-size":[{"max-block":[`none`,...ae()]}],w:[{w:[s,`screen`,...re()]}],"min-w":[{"min-w":[s,`screen`,`none`,...re()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...re()]}],h:[{h:[`screen`,`lh`,...re()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...re()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...re()]}],"font-size":[{text:[`base`,n,dp,rp]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,_p,ap]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Kf,np]}],"font-family":[{font:[fp,op,t]}],"font-features":[{"font-features":[np]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,up,np]}],"line-clamp":[{"line-clamp":[Wf,`none`,up,ip]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,up,np]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,up,np]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Wf,`from-font`,`auto`,up,rp]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Wf,`auto`,up,np]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Gf,up,np]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,up,np]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,up,np]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Gf,up,np],radial:[``,up,np],conic:[``,Gf,up,np]},hp,cp]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Wf,up,np]}],"outline-w":[{outline:[``,Wf,dp,rp]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`inner`,`none`,u,gp,lp]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,gp,lp]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Wf,rp]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,gp,lp]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Wf,up,np]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Wf]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[up,np]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Wf]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,up,np]}],filter:[{filter:[``,`none`,up,np]}],blur:[{blur:he()}],brightness:[{brightness:[Wf,up,np]}],contrast:[{contrast:[Wf,up,np]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,gp,lp]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,Wf,up,np]}],"hue-rotate":[{"hue-rotate":[Wf,up,np]}],invert:[{invert:[``,Wf,up,np]}],saturate:[{saturate:[Wf,up,np]}],sepia:[{sepia:[``,Wf,up,np]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,up,np]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[Wf,up,np]}],"backdrop-contrast":[{"backdrop-contrast":[Wf,up,np]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Wf,up,np]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Wf,up,np]}],"backdrop-invert":[{"backdrop-invert":[``,Wf,up,np]}],"backdrop-opacity":[{"backdrop-opacity":[Wf,up,np]}],"backdrop-saturate":[{"backdrop-saturate":[Wf,up,np]}],"backdrop-sepia":[{"backdrop-sepia":[``,Wf,up,np]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,up,np]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Wf,`initial`,up,np]}],ease:[{ease:[`linear`,`initial`,_,up,np]}],delay:[{delay:[Wf,up,np]}],animate:[{animate:[`none`,v,up,np]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,up,np]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:j()}],"skew-x":[{"skew-x":j()}],"skew-y":[{"skew-y":j()}],transform:[{transform:[up,np,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ve()}],"translate-x":[{"translate-x":ve()}],"translate-y":[{"translate-y":ve()}],"translate-z":[{"translate-z":ve()}],"translate-none":[`translate-none`],zoom:[{zoom:[Gf,up,np]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,up,np]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,up,np]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[Wf,dp,rp,ip]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function X(...e){return Op($d(e))}function kp(e){return e===0?`reconnecting`:e===1?`live`:`unavailable`}function Ap(e){return Math.min(1e3*2**e,3e4)}function jp(e,t){let n=new URLSearchParams;return e&&n.set(`since`,e),t&&n.set(`topics`,`logs`),`/api/stream${n.size?`?${n}`:``}`}function Mp(e=globalThis.crypto){if(typeof e?.randomUUID==`function`)return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues==`function`)e.getRandomValues(t);else for(let e=0;ee.toString(16).padStart(2,`0`));return`${n.slice(0,4).join(``)}-${n.slice(4,6).join(``)}-${n.slice(6,8).join(``)}-${n.slice(8,10).join(``)}-${n.slice(10).join(``)}`}var Np=15e3;function Pp(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e||{}))r!==``&&r!=null&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}async function Fp(e){try{let t=(await e.text()).trim();if(t)return t.split(` -`)[0].slice(0,200)}catch{}return`${e.status} ${e.statusText}`}var Ip;function Lp(e){Ip=e}var Rp=class extends Error{status;constructor(e,t){super(e),this.name=`ApiError`,this.status=t}};function zp(e){let t=e instanceof Rp?e.status:void 0,n=e instanceof Error&&e.message?e.message:`Action failed`;return t===401?{kind:`session-expired`,message:n}:t!==void 0&&t>=400&&t<500?{kind:`refused`,message:n}:{kind:`broken`,message:n}}async function Bp(e,t){let n=await fetch(e,t);if(Ip?.(n.status===401),!n.ok)throw new Rp(await Fp(n),n.status);return n}async function Vp(e,t={}){let{method:n=`GET`,body:r,timeoutMs:i=Np,parse:a=!0}=t,o={Accept:`application/json`},s={method:n,headers:o,signal:AbortSignal.timeout(i)};n!==`GET`&&(o[`Content-Type`]=`application/json`,o[`X-Archie-CSRF`]=`1`),r!==void 0&&(s.body=JSON.stringify(r));let c=await Bp(e,s);return a?await c.json():void 0}var Z={health:()=>Vp(`/health/detailed`),services:()=>Vp(`/api/services`),policies:()=>Vp(`/api/access/policies`),putPolicy:e=>Vp(`/api/access/policies`,{method:`PUT`,body:e}),deletePolicy:e=>Vp(`/api/access/policies`,{method:`DELETE`,body:e,parse:!1}),orgs:()=>Vp(`/api/orgs`),org:e=>Vp(`/api/orgs/${encodeURIComponent(e)}`),orgWorkspaces:e=>Vp(`/api/orgs/${encodeURIComponent(e)}/workspaces`),createOrgWorkspace:(e,t)=>Vp(`/api/orgs/${encodeURIComponent(e)}/workspaces`,{method:`POST`,body:t}),orgMembers:e=>Vp(`/api/orgs/${encodeURIComponent(e)}/members`),setOrgMember:(e,t,n)=>Vp(`/api/orgs/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`,{method:`PUT`,body:n}),removeOrgMember:(e,t,n)=>Vp(`/api/orgs/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`+Pp({workspace:n}),{method:`DELETE`,parse:!1}),assignOrgAgent:(e,t)=>Vp(`/api/orgs/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}`,{method:`PUT`}),summary:()=>Vp(`/api/summary`),tasks:()=>Vp(`/api/tasks`),taskPage:async e=>{let t=await Bp(`/api/tasks`+Pp(e),{headers:{Accept:`application/json`},signal:AbortSignal.timeout(Np)});return{tasks:await t.json(),next:t.headers.get(`X-Next-Cursor`)}},taskMeta:()=>Vp(`/api/task-meta`),task:e=>Vp(`/api/tasks/${encodeURIComponent(e)}`),taskAttempts:e=>Vp(`/api/tasks/${encodeURIComponent(e)}/attempts`),taskChanges:(e,t)=>Vp(`/api/tasks/${encodeURIComponent(e)}/changes`+Pp(t)),taskDebug:(e,t)=>Vp(`/api/tasks/${encodeURIComponent(e)}/debug`+Pp(t)),taskAction:(e,t,n)=>Vp(`/api/tasks/${encodeURIComponent(e)}/action`,{method:`POST`,body:{action:t,...n}}),setup:()=>Vp(`/api/setup`),capabilities:()=>Vp(`/api/capabilities`),workflows:()=>Vp(`/api/workflows`),workflowEnabled:(e,t)=>Vp(`/api/workflows/${encodeURIComponent(e)}/enabled`,{method:`PUT`,body:{enabled:t},parse:!1}),workRequest:e=>Vp(`/api/work-requests`,{method:`POST`,body:e}),skills:()=>Vp(`/api/skills`),channels:()=>Vp(`/api/channels`),curators:()=>Vp(`/api/curators`),channelReload:e=>Vp(`/api/channels/${encodeURIComponent(e)}/reload`,{method:`POST`,body:{}}),config:()=>Vp(`/api/config`),logs:e=>Vp(`/api/logs`+Pp(e)),taskLogs:(e,t)=>Vp(`/api/tasks/${encodeURIComponent(e)}/logs`+Pp(t)),taskLogDownloadURL:(e,t)=>`/api/tasks/${encodeURIComponent(e)}/logs/download`+(t==null?``:`?attempt=${t}`),version:()=>Vp(`/api/version`),updateSnapshot:()=>Vp(`/api/chat/update`),updateInstall:e=>Vp(`/api/chat/update/install`,{method:`POST`,body:{snapshot:e},timeoutMs:9e5}),captures:e=>Vp(`/api/captures`+Pp({limit:e})),eventTypes:()=>Vp(`/api/event-types`),eventTypeCreate:e=>Vp(`/api/event-types`,{method:`POST`,body:e}),eventTypeUpdate:(e,t)=>Vp(`/api/event-types/${encodeURIComponent(e)}`,{method:`PUT`,body:t}),eventTypeDelete:e=>Vp(`/api/event-types/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),mappings:()=>Vp(`/api/mappings`),mappingCreate:e=>Vp(`/api/mappings`,{method:`POST`,body:e}),mappingUpdate:(e,t)=>Vp(`/api/mappings/${encodeURIComponent(e)}`,{method:`PATCH`,body:t}),mappingDelete:e=>Vp(`/api/mappings/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),mappingPreview:(e,t)=>Vp(`/api/mappings/preview`,{method:`POST`,body:{capture_id:e,fields:t}}),bindings:()=>Vp(`/api/bindings`),dispatches:(e,t)=>Vp(`/api/${e}/${encodeURIComponent(t)}/dispatches`),bindingCreate:e=>Vp(`/api/bindings`,{method:`POST`,body:e}),bindingUpdate:(e,t)=>Vp(`/api/bindings/${encodeURIComponent(e)}`,{method:`PATCH`,body:t}),bindingDelete:e=>Vp(`/api/bindings/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),bindingApprove:e=>Vp(`/api/bindings/${encodeURIComponent(e)}/approve`,{method:`POST`}),bindingPause:e=>Vp(`/api/bindings/${encodeURIComponent(e)}/pause`,{method:`POST`}),bindingResume:e=>Vp(`/api/bindings/${encodeURIComponent(e)}/resume`,{method:`POST`}),harnessBindings:()=>Vp(`/api/harness/bindings`),sources:()=>Vp(`/api/sources`),sourceCreate:e=>Vp(`/api/sources`,{method:`POST`,body:{path:e}}),sourceSigning:(e,t)=>Vp(`/api/sources/${encodeURIComponent(e)}/signing`,{method:`POST`,body:{signed:t}}),sourceApproveUnsigned:e=>Vp(`/api/sources/${encodeURIComponent(e)}/approve-unsigned`,{method:`POST`}),sourceName:(e,t)=>Vp(`/api/sources/${encodeURIComponent(e)}/name`,{method:`PUT`,body:{name:t}}),sourceDelete:e=>Vp(`/api/sources/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),sourceSecret:e=>Vp(`/api/sources/${encodeURIComponent(e)}/secret`,{method:`POST`}),chatSessions:()=>Vp(`/api/chat/sessions`),chatMessages:e=>Vp(`/api/chat/sessions/${encodeURIComponent(e)}/messages`),chatTurns:e=>Vp(`/api/chat/sessions/${encodeURIComponent(e)}/turns`),chatCancel:e=>Vp(`/api/chat/cancel`,{method:`POST`,body:{session_id:e}}),chatMessage:(e,t)=>Vp(`/api/chat/message`,{method:`POST`,body:{channel_id:e,source_id:Mp(),text:t,page:location.pathname+location.search||`/`}}),chatPersona:(e,t)=>Vp(`/api/chat/persona`,{method:`POST`,body:{session_id:e,name:t}}),chatDangerous:()=>Vp(`/api/chat/dangerous`),chatDangerousRequest:(e,t)=>Vp(`/api/chat/dangerous/${encodeURIComponent(e)}`,{method:`POST`,body:{spec:t}}),chatDangerousDecision:(e,t)=>Vp(`/api/chat/dangerous/${encodeURIComponent(e)}/decision`,{method:`POST`,body:{decision:t}}),chatStream:(e,t={})=>Bp(`/api/chat/stream`,{method:`POST`,headers:{Accept:`text/event-stream`,"Content-Type":`application/json`,"X-Archie-CSRF":`1`},body:JSON.stringify(e),signal:t.signal})};function Hp(e,t,n=``,r=!1){let i=new EventSource(jp(n,r));return i.onopen=()=>t(`live`),i.onerror=()=>t(kp(i.readyState)),i.onmessage=t=>{try{e(JSON.parse(t.data),t.lastEventId)}catch{}},()=>i.close()}var Up=`archie.web.chat.channel`;function Wp(){let e=localStorage.getItem(Up);return e||(e=Mp(),localStorage.setItem(Up,e)),e}var Gp=/(?:^|\s)\/([^\s]*)$/,Kp=/(?:^|\s)\/[^\s]*$/,qp=8;function Jp(e,t,n){let r=t.slice(0,n).match(Gp);if(!r)return[];let i=r[1].toLowerCase();return e.filter(e=>`${e.command} ${e.description??``}`.toLowerCase().includes(i)).slice(0,qp)}function Yp(e,t,n){let r=e.slice(0,t),i=e.slice(t),a=r.search(Kp),o=a<0?r.length:a+ +(r[a]===` `);return{text:`${r.slice(0,o)}${n} ${i}`,cursor:o+n.length+1}}function Xp(e,t){let n=t.trim();return e.some(e=>e.command===n)}function Zp(e){return{text:e,sourceID:Mp()}}function Qp(e){return{...e}}function $p(e,t){let n=!!(e&&typeof e==`object`&&e.turn&&typeof e.turn.text==`string`),r=n?e.turn.text:t.trim();return{text:r,turn:n?Qp(e.turn):Zp(r),isRetry:n}}var em=`chat-panel`,tm=12e4,nm=N([]),rm=N(``),im=N([]),am=N(``),om=N(`Ready`),sm=N(!1),cm=N(null),lm=N({}),um=N(``),dm=N(``),fm=N(``),pm=N([]),mm=N([]),hm=N(0),gm=N(!1),_m=Y(()=>{let e=lm.value.models_by_provider||{},t=dm.value;return t&&e[t]?e[t]:lm.value.models||[]}),vm=N(0);function ym(e){I(e,e=>{vm.value+=e?1:-1}),Ki(()=>{e.value&&--vm.value})}function bm(){return vm.value>0}var xm=null;function Sm(){xm?.abort()}async function Cm(){let e=await Z.chatSessions(),t=e.sessions||[];nm.value=t,lm.value=e,um.value=e.active_persona||``;let n=e.providers||[];dm.value=e.active_provider||n[0]||``,fm.value=e.active_model||``,pm.value=(e.commands||[]).map(e=>typeof e==`string`?{command:e,usage:e,description:``}:e),!rm.value&&t[0]&&await wm(t[0].session_id)}async function wm(e){if(!e)return;let t=lm.value;rm.value=e,im.value=[],cm.value=null,um.value=t.active_personas?.[e]||t.active_persona||``;try{await Z.chatMessage(Wp(),`/resume ${e}`);let[t,n]=await Promise.all([Z.chatMessages(e),Z.chatTurns(e)]),r=new Map;for(let e of n||[]){let t=e.assistant_message_id||e.AssistantMessageID;t&&r.set(t,e)}im.value=(t||[]).map(e=>{let t=e.message_id||e.MessageID,n=t?r.get(t):void 0;return n?{...e,tool_calls:n.tool_calls||n.ToolCalls||[]}:e})}catch(e){om.value=e.message||`Could not load session messages`}}async function Tm(e){if(rm.value)try{om.value=`Working…`;let t=await Z.chatMessage(Wp(),e);t.session_id&&(rm.value=t.session_id),om.value=t.reply||`Session updated`,await Cm(),(t.session_id||rm.value)&&await wm(t.session_id||rm.value)}catch(e){om.value=e.message||`Session action failed`}}function bee(e,t){let n=window.prompt(t);n?.trim()&&Tm(`${e} ${n.trim()}`)}function xee(e){um.value=e;let t=rm.value;t&&e&&Z.chatPersona(t,e).then(()=>{let n=lm.value;lm.value={...n,active_personas:{...n.active_personas||{},[t]:e}},om.value=`Personality: ${e}`}).catch(e=>{om.value=e.message||`Failed to set personality`})}async function See(e){if(dm.value=e,e)try{om.value=(await Z.chatMessage(Wp(),`/model --provider ${e}`)).reply||`Provider updated`,await Cm()}catch(e){om.value=`Provider update failed: ${e.message||e}`}}async function Cee(e){if(fm.value=e,e)try{om.value=(await Z.chatMessage(Wp(),`/model ${e}`)).reply||`Model updated`,await Cm()}catch(e){om.value=`Model update failed: ${e.message||e}`}}function wee(){am.value=`/new`,Om({textOverride:`/new`})}function Tee(e,t){let n=Jp(pm.value,e,t);if(n.length){mm.value=n,hm.value=0,gm.value=!0;return}gm.value=!1,mm.value=[]}function Em(){gm.value=!1}function Dm(e){let t=mm.value.length;t&&(hm.value=(hm.value+e+t)%t)}function Eee(){return location.pathname+location.search||`/`}async function Om(e){let t=e?.textOverride,{text:n,turn:r,isRetry:i}=$p(e,t===void 0?am.value:t);if(!n||sm.value)return;Em(),sm.value=!0,om.value=i?`Retrying…`:`Thinking…`,i||(im.value=[...im.value,{from:`web`,text:n}],am.value=``);let a=[];cm.value={text:``,tools:[],isError:!1,turn:r,isRetry:i};let o=``,s=!1,c=!1,l;try{let e=new AbortController;xm=e,l=setTimeout(()=>{c=!0,e.abort()},tm);let t=(await Z.chatStream({channel_id:Wp(),source_id:r.sourceID,text:r.text,page:Eee()},{signal:e.signal})).body;if(!t)throw Error(`the chat stream returned no body`);let n=t.getReader(),i=new TextDecoder,u=``;for(;;){let{value:e,done:t}=await n.read();u+=i.decode(e||new Uint8Array,{stream:!t});let r=u.split(` +`)[0].slice(0,200)}catch{}return`${e.status} ${e.statusText}`}var Ip;function Lp(e){Ip=e}var Rp=class extends Error{status;constructor(e,t){super(e),this.name=`ApiError`,this.status=t}};function zp(e){let t=e instanceof Rp?e.status:void 0,n=e instanceof Error&&e.message?e.message:`Action failed`;return t===401?{kind:`session-expired`,message:n}:t!==void 0&&t>=400&&t<500?{kind:`refused`,message:n}:{kind:`broken`,message:n}}async function Bp(e,t){let n=await fetch(e,t);if(Ip?.(n.status===401),!n.ok)throw new Rp(await Fp(n),n.status);return n}async function Vp(e,t={}){let{method:n=`GET`,body:r,timeoutMs:i=Np,parse:a=!0}=t,o={Accept:`application/json`},s={method:n,headers:o,signal:AbortSignal.timeout(i)};n!==`GET`&&(o[`Content-Type`]=`application/json`,o[`X-Archie-CSRF`]=`1`),r!==void 0&&(s.body=JSON.stringify(r));let c=await Bp(e,s);return a?await c.json():void 0}var Z={health:()=>Vp(`/health/detailed`),services:()=>Vp(`/api/services`),policies:()=>Vp(`/api/access/policies`),putPolicy:e=>Vp(`/api/access/policies`,{method:`PUT`,body:e}),deletePolicy:e=>Vp(`/api/access/policies`,{method:`DELETE`,body:e,parse:!1}),orgs:()=>Vp(`/api/orgs`),orgCreate:e=>Vp(`/api/orgs`,{method:`POST`,body:e}),org:e=>Vp(`/api/orgs/${encodeURIComponent(e)}`),orgWorkspaces:e=>Vp(`/api/orgs/${encodeURIComponent(e)}/workspaces`),createOrgWorkspace:(e,t)=>Vp(`/api/orgs/${encodeURIComponent(e)}/workspaces`,{method:`POST`,body:t}),orgMembers:e=>Vp(`/api/orgs/${encodeURIComponent(e)}/members`),setOrgMember:(e,t,n)=>Vp(`/api/orgs/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`,{method:`PUT`,body:n}),removeOrgMember:(e,t,n)=>Vp(`/api/orgs/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`+Pp({workspace:n}),{method:`DELETE`,parse:!1}),assignOrgAgent:(e,t)=>Vp(`/api/orgs/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}`,{method:`PUT`}),summary:()=>Vp(`/api/summary`),tasks:()=>Vp(`/api/tasks`),taskPage:async e=>{let t=await Bp(`/api/tasks`+Pp(e),{headers:{Accept:`application/json`},signal:AbortSignal.timeout(Np)});return{tasks:await t.json(),next:t.headers.get(`X-Next-Cursor`)}},taskMeta:()=>Vp(`/api/task-meta`),task:e=>Vp(`/api/tasks/${encodeURIComponent(e)}`),taskAttempts:e=>Vp(`/api/tasks/${encodeURIComponent(e)}/attempts`),taskChanges:(e,t)=>Vp(`/api/tasks/${encodeURIComponent(e)}/changes`+Pp(t)),taskDebug:(e,t)=>Vp(`/api/tasks/${encodeURIComponent(e)}/debug`+Pp(t)),taskAction:(e,t,n)=>Vp(`/api/tasks/${encodeURIComponent(e)}/action`,{method:`POST`,body:{action:t,...n}}),setup:()=>Vp(`/api/setup`),capabilities:()=>Vp(`/api/capabilities`),workflows:()=>Vp(`/api/workflows`),workflowEnabled:(e,t)=>Vp(`/api/workflows/${encodeURIComponent(e)}/enabled`,{method:`PUT`,body:{enabled:t},parse:!1}),workRequest:e=>Vp(`/api/work-requests`,{method:`POST`,body:e}),skills:()=>Vp(`/api/skills`),channels:()=>Vp(`/api/channels`),curators:()=>Vp(`/api/curators`),channelReload:e=>Vp(`/api/channels/${encodeURIComponent(e)}/reload`,{method:`POST`,body:{}}),config:()=>Vp(`/api/config`),logs:e=>Vp(`/api/logs`+Pp(e)),taskLogs:(e,t)=>Vp(`/api/tasks/${encodeURIComponent(e)}/logs`+Pp(t)),taskLogDownloadURL:(e,t)=>`/api/tasks/${encodeURIComponent(e)}/logs/download`+(t==null?``:`?attempt=${t}`),version:()=>Vp(`/api/version`),updateSnapshot:()=>Vp(`/api/chat/update`),updateInstall:e=>Vp(`/api/chat/update/install`,{method:`POST`,body:{snapshot:e},timeoutMs:9e5}),captures:e=>Vp(`/api/captures`+Pp({limit:e})),eventTypes:()=>Vp(`/api/event-types`),eventTypeCreate:e=>Vp(`/api/event-types`,{method:`POST`,body:e}),eventTypeUpdate:(e,t)=>Vp(`/api/event-types/${encodeURIComponent(e)}`,{method:`PUT`,body:t}),eventTypeDelete:e=>Vp(`/api/event-types/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),mappings:()=>Vp(`/api/mappings`),mappingCreate:e=>Vp(`/api/mappings`,{method:`POST`,body:e}),mappingUpdate:(e,t)=>Vp(`/api/mappings/${encodeURIComponent(e)}`,{method:`PATCH`,body:t}),mappingDelete:e=>Vp(`/api/mappings/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),mappingPreview:(e,t)=>Vp(`/api/mappings/preview`,{method:`POST`,body:{capture_id:e,fields:t}}),bindings:()=>Vp(`/api/bindings`),dispatches:(e,t)=>Vp(`/api/${e}/${encodeURIComponent(t)}/dispatches`),bindingCreate:e=>Vp(`/api/bindings`,{method:`POST`,body:e}),bindingUpdate:(e,t)=>Vp(`/api/bindings/${encodeURIComponent(e)}`,{method:`PATCH`,body:t}),bindingDelete:e=>Vp(`/api/bindings/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),bindingApprove:e=>Vp(`/api/bindings/${encodeURIComponent(e)}/approve`,{method:`POST`}),bindingPause:e=>Vp(`/api/bindings/${encodeURIComponent(e)}/pause`,{method:`POST`}),bindingResume:e=>Vp(`/api/bindings/${encodeURIComponent(e)}/resume`,{method:`POST`}),harnessBindings:()=>Vp(`/api/harness/bindings`),sources:()=>Vp(`/api/sources`),sourceCreate:e=>Vp(`/api/sources`,{method:`POST`,body:{path:e}}),sourceSigning:(e,t)=>Vp(`/api/sources/${encodeURIComponent(e)}/signing`,{method:`POST`,body:{signed:t}}),sourceApproveUnsigned:e=>Vp(`/api/sources/${encodeURIComponent(e)}/approve-unsigned`,{method:`POST`}),sourceName:(e,t)=>Vp(`/api/sources/${encodeURIComponent(e)}/name`,{method:`PUT`,body:{name:t}}),sourceDelete:e=>Vp(`/api/sources/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),sourceSecret:e=>Vp(`/api/sources/${encodeURIComponent(e)}/secret`,{method:`POST`}),chatSessions:()=>Vp(`/api/chat/sessions`),chatMessages:e=>Vp(`/api/chat/sessions/${encodeURIComponent(e)}/messages`),chatTurns:e=>Vp(`/api/chat/sessions/${encodeURIComponent(e)}/turns`),chatCancel:e=>Vp(`/api/chat/cancel`,{method:`POST`,body:{session_id:e}}),chatMessage:(e,t)=>Vp(`/api/chat/message`,{method:`POST`,body:{channel_id:e,source_id:Mp(),text:t,page:location.pathname+location.search||`/`}}),chatPersona:(e,t)=>Vp(`/api/chat/persona`,{method:`POST`,body:{session_id:e,name:t}}),chatDangerous:()=>Vp(`/api/chat/dangerous`),chatDangerousRequest:(e,t)=>Vp(`/api/chat/dangerous/${encodeURIComponent(e)}`,{method:`POST`,body:{spec:t}}),chatDangerousDecision:(e,t)=>Vp(`/api/chat/dangerous/${encodeURIComponent(e)}/decision`,{method:`POST`,body:{decision:t}}),chatStream:(e,t={})=>Bp(`/api/chat/stream`,{method:`POST`,headers:{Accept:`text/event-stream`,"Content-Type":`application/json`,"X-Archie-CSRF":`1`},body:JSON.stringify(e),signal:t.signal})};function Hp(e,t,n=``,r=!1){let i=new EventSource(jp(n,r));return i.onopen=()=>t(`live`),i.onerror=()=>t(kp(i.readyState)),i.onmessage=t=>{try{e(JSON.parse(t.data),t.lastEventId)}catch{}},()=>i.close()}var Up=`archie.web.chat.channel`;function Wp(){let e=localStorage.getItem(Up);return e||(e=Mp(),localStorage.setItem(Up,e)),e}var Gp=/(?:^|\s)\/([^\s]*)$/,Kp=/(?:^|\s)\/[^\s]*$/,qp=8;function Jp(e,t,n){let r=t.slice(0,n).match(Gp);if(!r)return[];let i=r[1].toLowerCase();return e.filter(e=>`${e.command} ${e.description??``}`.toLowerCase().includes(i)).slice(0,qp)}function Yp(e,t,n){let r=e.slice(0,t),i=e.slice(t),a=r.search(Kp),o=a<0?r.length:a+ +(r[a]===` `);return{text:`${r.slice(0,o)}${n} ${i}`,cursor:o+n.length+1}}function Xp(e,t){let n=t.trim();return e.some(e=>e.command===n)}function Zp(e){return{text:e,sourceID:Mp()}}function Qp(e){return{...e}}function $p(e,t){let n=!!(e&&typeof e==`object`&&e.turn&&typeof e.turn.text==`string`),r=n?e.turn.text:t.trim();return{text:r,turn:n?Qp(e.turn):Zp(r),isRetry:n}}var em=`chat-panel`,tm=12e4,nm=N([]),rm=N(``),im=N([]),am=N(``),om=N(`Ready`),sm=N(!1),cm=N(null),lm=N({}),um=N(``),dm=N(``),fm=N(``),pm=N([]),mm=N([]),hm=N(0),gm=N(!1),_m=Y(()=>{let e=lm.value.models_by_provider||{},t=dm.value;return t&&e[t]?e[t]:lm.value.models||[]}),vm=N(0);function ym(e){I(e,e=>{vm.value+=e?1:-1}),Ki(()=>{e.value&&--vm.value})}function bm(){return vm.value>0}var xm=null;function Sm(){xm?.abort()}async function Cm(){let e=await Z.chatSessions(),t=e.sessions||[];nm.value=t,lm.value=e,um.value=e.active_persona||``;let n=e.providers||[];dm.value=e.active_provider||n[0]||``,fm.value=e.active_model||``,pm.value=(e.commands||[]).map(e=>typeof e==`string`?{command:e,usage:e,description:``}:e),!rm.value&&t[0]&&await wm(t[0].session_id)}async function wm(e){if(!e)return;let t=lm.value;rm.value=e,im.value=[],cm.value=null,um.value=t.active_personas?.[e]||t.active_persona||``;try{await Z.chatMessage(Wp(),`/resume ${e}`);let[t,n]=await Promise.all([Z.chatMessages(e),Z.chatTurns(e)]),r=new Map;for(let e of n||[]){let t=e.assistant_message_id||e.AssistantMessageID;t&&r.set(t,e)}im.value=(t||[]).map(e=>{let t=e.message_id||e.MessageID,n=t?r.get(t):void 0;return n?{...e,tool_calls:n.tool_calls||n.ToolCalls||[]}:e})}catch(e){om.value=e.message||`Could not load session messages`}}async function Tm(e){if(rm.value)try{om.value=`Working…`;let t=await Z.chatMessage(Wp(),e);t.session_id&&(rm.value=t.session_id),om.value=t.reply||`Session updated`,await Cm(),(t.session_id||rm.value)&&await wm(t.session_id||rm.value)}catch(e){om.value=e.message||`Session action failed`}}function bee(e,t){let n=window.prompt(t);n?.trim()&&Tm(`${e} ${n.trim()}`)}function xee(e){um.value=e;let t=rm.value;t&&e&&Z.chatPersona(t,e).then(()=>{let n=lm.value;lm.value={...n,active_personas:{...n.active_personas||{},[t]:e}},om.value=`Personality: ${e}`}).catch(e=>{om.value=e.message||`Failed to set personality`})}async function See(e){if(dm.value=e,e)try{om.value=(await Z.chatMessage(Wp(),`/model --provider ${e}`)).reply||`Provider updated`,await Cm()}catch(e){om.value=`Provider update failed: ${e.message||e}`}}async function Cee(e){if(fm.value=e,e)try{om.value=(await Z.chatMessage(Wp(),`/model ${e}`)).reply||`Model updated`,await Cm()}catch(e){om.value=`Model update failed: ${e.message||e}`}}function wee(){am.value=`/new`,Om({textOverride:`/new`})}function Tee(e,t){let n=Jp(pm.value,e,t);if(n.length){mm.value=n,hm.value=0,gm.value=!0;return}gm.value=!1,mm.value=[]}function Em(){gm.value=!1}function Dm(e){let t=mm.value.length;t&&(hm.value=(hm.value+e+t)%t)}function Eee(){return location.pathname+location.search||`/`}async function Om(e){let t=e?.textOverride,{text:n,turn:r,isRetry:i}=$p(e,t===void 0?am.value:t);if(!n||sm.value)return;Em(),sm.value=!0,om.value=i?`Retrying…`:`Thinking…`,i||(im.value=[...im.value,{from:`web`,text:n}],am.value=``);let a=[];cm.value={text:``,tools:[],isError:!1,turn:r,isRetry:i};let o=``,s=!1,c=!1,l;try{let e=new AbortController;xm=e,l=setTimeout(()=>{c=!0,e.abort()},tm);let t=(await Z.chatStream({channel_id:Wp(),source_id:r.sourceID,text:r.text,page:Eee()},{signal:e.signal})).body;if(!t)throw Error(`the chat stream returned no body`);let n=t.getReader(),i=new TextDecoder,u=``;for(;;){let{value:e,done:t}=await n.read();u+=i.decode(e||new Uint8Array,{stream:!t});let r=u.split(` `);u=r.pop()||``;for(let e of r){let t=e.split(` `).find(e=>e.startsWith(`data: `));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.session_id&&(rm.value=n.session_id),n.type===`delta`&&(o+=n.text,cm.value=cm.value?{...cm.value,text:o}:null),(n.type===`tool`||n.type===`navigate`)&&(a=[...a,n],cm.value=cm.value?{...cm.value,tools:a}:null),n.type===`done`&&(s=!0,o||=n.text||``),n.type===`error`)throw Error(n.text)}if(t)break}if(!s)throw Error(`chat stream ended before completion`);im.value=[...im.value,{from:`assistant`,text:o,tool_calls:a}],cm.value=null,om.value=`Ready`,await Cm()}catch(e){let t=e;t.name===`AbortError`&&!c?(cm.value={text:`Turn stopped.`,tools:a,isError:!1,turn:r,isRetry:i},om.value=`Stopped`):(cm.value={text:`Unable to complete that turn: ${t.message||t}`,tools:a,isError:!0,turn:r?Qp(r):void 0,isRetry:i},om.value=`Error — retry available`)}finally{clearTimeout(l),xm=null,sm.value=!1}}function Dee(){om.value=`Stopping…`,rm.value&&Z.chatCancel(rm.value).catch(()=>{}),Sm()}function Oee(){Hi(()=>{Cm().catch(e=>{om.value=e.message||`Chat unavailable`})}),Ki(()=>{Sm()})}var kee=[`aria-label`,`title`,`aria-expanded`,`aria-controls`],Aee=L({__name:`ChatFab`,props:{open:{type:Boolean}},emits:[`toggle`],setup(e,{emit:t}){let n=t;function r(e){return X(`col-start-1 row-start-1 grid place-items-center transition-[opacity,transform] duration-[140ms]`,e?`opacity-100`:`-rotate-45 scale-[0.7] opacity-0`)}return(t,i)=>(V(),H(`button`,{type:`button`,class:`relative z-10 grid size-14 cursor-pointer place-items-center rounded-full border border-border-strong bg-secondary text-primary shadow-[var(--shadow-md)] transition-transform duration-[140ms] hover:-translate-y-px focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary active:translate-y-0`,"aria-label":e.open?`Close chat`:`Chat with Archie`,title:e.open?`Close chat`:`Chat with Archie`,"aria-expanded":e.open,"aria-controls":P(em),onClick:i[0]||=e=>n(`toggle`)},[W(`span`,{"aria-hidden":`true`,class:j(r(!e.open))},[G(P(xd),{size:22})],2),W(`span`,{"aria-hidden":`true`,class:j(r(e.open))},[G(P(Zd),{size:22})],2)],8,kee))}});function km(e){return typeof e==`string`?`'${e}'`:new Mee().serialize(e)}var jee=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Am=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[jee.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function jm(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;ia?-1:1)}return e.length===t.length?r:e.lengththis.compare(e[0],t[0])),r=`${e}{`;for(let e=0;ethis.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})();function Mm(e,t){return e===t||km(e)===km(t)}function Nm(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function Pm(e,t){let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=10**a;n=Math.round(n*e)/e}return n}function Fm(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(Number.isNaN(t)?0:t))%r,a=Pm(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return Number.isNaN(t)?!Number.isNaN(n)&&a>n&&(a=Math.floor(Pm(n/r,r))*r):an&&(a=t+Math.floor(Pm((n-t)/r,r))*r),a=Pm(a,r),a}function Im(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n);return[t=>{let n=dr(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(ur(r,e),e)]}function Lm(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Rm(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function zm(e){return e==null}function Bm(e,t){return zm(e)?!1:Array.isArray(e)?e.some(e=>Mm(e,t)):Mm(e,t)}function Vm(e,t){return Fe()?(Ie(e,t),!0):!1}function Hm(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return Vm(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}function Nee(e){let t=!1,n,r=Pe(!0);return((...i)=>(t||=(n=r.run(()=>e(...i)),!0),n))}var Um=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Pee=e=>e!==void 0,Fee=e=>e!=null,Iee=Object.prototype.toString,Lee=e=>Iee.call(e)===`[object Object]`,Wm=()=>{},Gm=Km();function Km(){var e,t;return Um&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function qm(e){return Array.isArray(e)?e:[e]}function Jm(e){return e||bs()}function Ym(e){if(!Um)return e;let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return((...a)=>(t+=1,r||(r=Pe(!0),n=r.run(()=>e(...a))),Vm(i),n))}function Xm(e){return Jt(cn(e)?new Proxy({},{get(t,n,r){return P(Reflect.get(e.value,n,r))},set(t,n,r){return cn(e.value[n])&&!cn(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function Zm(e){return Xm(Y(e))}function Qm(e,...t){let n=t.flat(),r=n[0];return Zm(()=>Object.fromEntries(typeof r==`function`?Object.entries(vn(e)).filter(([e,t])=>!r(pn(t),e)):Object.entries(vn(e)).filter(e=>!n.includes(e[0]))))}function $m(e,t=1e4){return _n((n,r)=>{let i=pn(e),a,o=()=>setTimeout(()=>{i=pn(e),r()},pn(t));return Vm(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function eh(e,t){Jm(t)&&Gi(e,t)}function th(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=ln(!1),o;function s(){o&&=(clearTimeout(o),void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},pn(t))}return r&&(a.value=!0,Um&&l()),Vm(c),{isPending:Zt(a),start:l,stop:c}}function nh(e,t,n){return I(e,t,{...n,immediate:!0})}var rh=Um?window:void 0;Um&&window.document,Um&&window.navigator,Um&&window.location;function ih(e){let t=pn(e);return t?.$el??t}function ah(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=Y(()=>{let t=qm(pn(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return nh(()=>[n.value?.map(e=>ih(e))??[rh].filter(e=>e!=null),qm(pn(n.value?e[1]:e[0])),qm(P(n.value?e[2]:e[1])),pn(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=Lee(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function oh(){let e=ln(!1),t=bs();return t&&Hi(()=>{e.value=!0},t),e}function sh(e){let t=oh();return Y(()=>(t.value,!!e()))}function ch(e,t,n={}){let{window:r=rh,...i}=n,a,o=sh(()=>r&&`MutationObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=I(Y(()=>{let t=qm(pn(e)).map(ih).filter(Fee);return new Set(t)}),e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),l=()=>a?.takeRecords(),u=()=>{c(),s()};return Vm(u),{isSupported:o,stop:u,takeRecords:l}}function lh(e,t,n={}){let{window:r=rh,document:i=r?.document,flush:a=`sync`}=n;if(!r||!i)return Wm;let o,s=e=>{o?.(),o=e},c=hr(()=>{let n=ih(e);if(n){let{stop:e}=ch(i,e=>{e.map(e=>[...e.removedNodes]).flat().some(e=>e===n||e.contains(n))&&t(e)},{window:r,childList:!0,subtree:!0});s(e)}},{flush:a}),l=()=>{c(),s()};return Vm(l),l}function uh(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function dh(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=rh,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=uh(t);return ah(i,a,e=>{e.repeat&&pn(s)||c(e)&&n(e)},o)}function fh(e={}){let{window:t=rh,deep:n=!0,triggerOnRemoval:r=!1}=e,i=e.document??t?.document,a=()=>{let e=i?.activeElement;if(n)for(var t;e?.shadowRoot;)e=e==null||(t=e.shadowRoot)==null?void 0:t.activeElement;return e},o=ln(),s=()=>{o.value=a()};if(t){let e={capture:!0,passive:!0};ah(t,`blur`,e=>{e.relatedTarget===null&&s()},e),ah(t,`focus`,s,e)}return r&&lh(o,s,{document:i}),s(),o}function ph(e){return JSON.parse(JSON.stringify(e))}function mh(e,t,n={}){let{window:r=rh,...i}=n,a,o=sh(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=I(Y(()=>{let t=pn(e);return Array.isArray(t)?t.map(e=>ih(e)):[ih(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return Vm(l),{isSupported:o,stop:l}}var hh=`focusin`,gh=`focusout`,_h=`:focus-within`;function vh(e,t={}){let{window:n=rh}=t,r=Y(()=>ih(e)),i=ln(!1),a=Y(()=>i.value),o=fh(t);if(!n||!o.value)return{focused:a};let s={passive:!0};return ah(r,hh,()=>i.value=!0,s),ah(r,gh,()=>{var e,t;return i.value=((e=r.value)==null||(t=e.matches)==null?void 0:t.call(e,_h))??!1},s),{focused:a}}function yh(e,t,n,r={}){var i,a;let{clone:o=!1,passive:s=!1,eventName:c,deep:l=!1,defaultValue:u,shouldEmit:d}=r,f=bs(),p=n||f?.emit||(f==null||(i=f.$emit)==null?void 0:i.bind(f))||(f==null||(a=f.proxy)==null||(a=a.$emit)==null?void 0:a.bind(f?.proxy)),m=c;t||=`modelValue`,m||=`update:${t.toString()}`;let h=e=>o?typeof o==`function`?o(e):ph(e):e,g=()=>Pee(e[t])?h(e[t]):u,_=e=>{d?d(e)&&p(m,e):p(m,e)};if(s){let n=N(g()),r=!1;return I(()=>e[t],e=>{r||(r=!0,n.value=h(e),qn(()=>r=!1))}),I(n,n=>{!r&&(n!==e[t]||l)&&_(n)},{deep:l}),n}return Y({get(){return g()},set(e){_(e)}})}function bh(e){return e?e.flatMap(e=>e.type===B?bh(e.children):[e]):[]}var xh=[`INPUT`,`TEXTAREA`];function Sh(e,t,n,r={}){if(!t||r.enableIgnoredElement&&xh.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-reka-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=Ch(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function Ch(e,t,n,r=e.includes(t)?e.length:e.length+1){if(--r===0)return null;let i=e.indexOf(t),a;if(a=i===-1?n.goForward?0:e.length-1:n.goForward?i+1:i-1,!n.loop&&(a<0||a>=e.length))return null;let o=e[(a+e.length)%e.length];return o?o.hasAttribute(`disabled`)&&o.getAttribute(`disabled`)!==`false`?Ch(e,o,n,r):o:null}var[wh,Ree]=Im(`ConfigProvider`),Th=Jt({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});function Eh(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Dh(e,t,n=`.`,r){if(!Eh(t))return Dh(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:Eh(a)&&Eh(i[t])?Dh(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function Oh(e){return(...t)=>t.reduce((t,n)=>Dh(t,n,``,e),{})}var kh=Oh(),Ah=Ym(()=>{let e=N(new Map),t=N(),n=Y(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=wh({scrollBody:N(!0)}),i=null,a=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,Th.layersWithOutsidePointerEventsDisabled.size===0&&(document.body.style.pointerEvents=``),document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,Gm&&i?.(),t.value=void 0};return I(n,(e,o)=>{if(!Um)return;if(!e){o&&a();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=r.scrollBody?.value?typeof r.scrollBody.value==`object`?kh({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),Gm&&(i=ah(document,`touchmove`,e=>Nh(e),{passive:!1})),qn(()=>{n.value&&(document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`)})},{immediate:!0,flush:`sync`}),e});function jh(e){let t=Math.random().toString(36).substring(2,7),n=Ah();n.value.set(t,e??!1);let r=Y({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return eh(()=>{n.value.delete(t)}),r}function Mh(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth1||(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}var Ph=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Bopomofo}]/u,Fh=/android/i;function Ih(){return typeof navigator<`u`&&Fh.test(navigator.userAgent)}function Lh(e){let t=N(!1),n=N(!0),r=N(!1),i=Y(()=>t.value&&n.value);function a(){t.value=!0,n.value=!0,r.value=!1}function o(e){e.data&&(Ph.test(e.data)?(n.value=!0,r.value=!0):Ih()&&!r.value&&(n.value=!1))}function s(n){qn(()=>{t.value=!1,e?.(n)})}return{isComposing:t,shouldDeferInput:i,handleCompositionStart:a,handleCompositionUpdate:o,handleCompositionEnd:s}}function Rh(e){let t=wh({dir:N(`ltr`)});return Y(()=>e?.value||t.dir?.value||`ltr`)}function zh(e){let t=bs(),n=t?.type.emits,r={};return n?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{r[ae(k(t))]=(...n)=>e(t,...n)}),r}var Bh=0;function Vh(){hr(e=>{if(!Um)return;let t=document.querySelectorAll(`[data-reka-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??Hh()),document.body.insertAdjacentElement(`beforeend`,t[1]??Hh()),Bh++,e(()=>{Bh===1&&document.querySelectorAll(`[data-reka-focus-guard]`).forEach(e=>e.remove()),Bh--})})}function Hh(){let e=document.createElement(`span`);return e.setAttribute(`data-reka-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function Uh(e){return Y(()=>!pn(e)||!!ih(e)?.closest(`form`))}function Q(){let e=bs(),t=N(),n=Y(()=>r());Wi(()=>{n.value!==r()&&fn(t)});function r(){return t.value&&`$el`in t.value&&[`#text`,`#comment`].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:ih(t)}let i=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(i).length>0)for(let e in i)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>i[e]});Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){if(t.value=n,n&&(Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),!(n instanceof Element)&&!Object.hasOwn(n,`$el`))){let t=n.$.exposed,r=Object.assign({},a);for(let e in t)Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>t[e]});e.exposed=r}}return{forwardRef:o,currentRef:t,currentElement:n}}function Wh(e){let t=bs(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),r=xn(e);return Y(()=>{let e={},i=t?.vnode.props??{};return Object.keys(i).forEach(t=>{e[k(t)]=i[t]}),Object.keys({...n,...e}).reduce((e,t)=>(r.value[t]!==void 0&&(e[t]=r.value[t]),e),{})})}function Gh(e,t){let n=Wh(e),r=t?zh(t):{};return Y(()=>({...n.value,...r}))}function Kh(){let e=bs()?.vnode?.scopeId;return e?{[e]:``}:{}}function qh(e,t){let n=$m(!1,300);Vm(()=>{n.value=!1});let r=N(null),i=Hm();function a(){r.value=null,n.value=!1}function o(e,t){if(!t)return;let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=Yh(a,Jh(a,i.getBoundingClientRect()),1),s=Xh(t.getBoundingClientRect()),c=Qh([...o,...s]);r.value=c,n.value=!0}return hr(n=>{if(e.value&&t.value){let r=e.value,i=t.value,a=e=>o(e,i),s=e=>o(e,r);r.addEventListener(`pointerleave`,a),i.addEventListener(`pointerleave`,s),n(()=>{r.removeEventListener(`pointerleave`,a),i.removeEventListener(`pointerleave`,s)})}}),hr(n=>{if(r.value){let o=n=>{if(!r.value||!(n.target instanceof Element))return;let o=n.target,s={x:n.clientX,y:n.clientY},c=e.value?.contains(o)||t.value?.contains(o),l=!Zh(s,r.value),u=!!o.closest(`[data-grace-area-trigger]`);c?a():(l||u)&&(a(),i.trigger())},s=e.value?.ownerDocument;s?.addEventListener(`pointermove`,o),n(()=>s?.removeEventListener(`pointermove`,o))}}),{isPointerInTransit:n,onPointerExit:i.on}}function Jh(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Yh(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function Xh(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Zh(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;er!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function Qh(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y)),$h(t)}function $h(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t.at(-1),n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n.at(-1),t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var eg=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},tg=new WeakMap,ng=new WeakMap,rg={},ig=0,ag=function(e){return e&&(e.host||ag(e.parentNode))},og=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=ag(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},sg=function(e,t,n,r){var i=og(t,Array.isArray(e)?e:[e]);rg[n]||(rg[n]=new WeakMap);var a=rg[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(tg.get(e)||0)+1,l=(a.get(e)||0)+1;tg.set(e,c),a.set(e,l),o.push(e),c===1&&i&&ng.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),ig++,function(){o.forEach(function(e){var t=tg.get(e)-1,i=a.get(e)-1;tg.set(e,t),a.set(e,i),t||(ng.has(e)||e.removeAttribute(r),ng.delete(e)),i||e.removeAttribute(n)}),ig--,ig||(tg=new WeakMap,tg=new WeakMap,ng=new WeakMap,rg={})}},cg=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||eg(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),sg(r,i,n,`aria-hidden`)):function(){return null}};function lg(e){let t;I(()=>ih(e),e=>{let n=!1;try{n=!!e?.closest(`[popover]:not(:popover-open)`)}catch{}e&&!n?t=cg(e):t&&t()}),Ki(()=>{t&&t()})}var ug=0;function dg(e,t=`reka`){if(e)return e;let n,r=wh({useId:void 0});return n=r.useId?r.useId():`useId`in tu?Xr?.():`${++ug}`,t?`${t}-${n}`:n}function fg(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}function pg(e){let t=wh({locale:N(`en`)});return Y(()=>e?.value||t.locale?.value||`en`)}function mg(e){let t=N(),n=Y(()=>t.value?.width??0),r=Y(()=>t.value?.height??0),i;return Hi(()=>{let n=ih(e);n?(t.value={width:n.offsetWidth,height:n.offsetHeight},i=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}}),i.observe(n,{box:`border-box`})):t.value=void 0}),Ki(()=>{i?.disconnect(),i=void 0}),{width:n,height:r}}function hg(e,t){let n=N(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}function gg(e){let t=$m(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(t.value+=n,e)e(n);else{let e=Lm(),n=r.map(e=>({...e,textValue:e.value?.textValue??e.ref.textContent?.trim()??``})),i=n.find(t=>t.ref===e),a=vg(n.map(e=>e.textValue),t.value,i?.textValue),o=n.find(e=>e.textValue===a);return o&&o.ref.focus(),o?.ref}},resetTypeahead:()=>{t.value=``}}}function _g(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function vg(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=_g(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function yg(e,t){let n=N({}),r=N(`none`),i=N(e),a=e.value?`mounted`:`unmounted`,o,s=t.value?.ownerDocument.defaultView??rh,{state:c,dispatch:l}=hg(a,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),u=e=>{if(Um){let n=new CustomEvent(e,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(n)}};I(e,async(e,i)=>{let a=i!==e;if(await qn(),a){let a=r.value,o=bg(t.value);e?(l(`MOUNT`),u(`enter`),o===`none`&&u(`after-enter`)):o===`none`||o===`undefined`||n.value?.display===`none`?(l(`UNMOUNT`),u(`leave`),u(`after-leave`)):i&&a!==o?(l(`ANIMATION_OUT`),u(`leave`)):(l(`UNMOUNT`),u(`after-leave`))}},{immediate:!0});let d=e=>{if(e.target!==t.value)return;let n=bg(t.value),r=n.includes(CSS.escape(e.animationName)),a=c.value===`mounted`?`enter`:`leave`;if(r&&(u(`after-${a}`),l(`ANIMATION_END`),!i.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,o=s?.setTimeout(()=>{t.value?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}n===`none`&&l(`ANIMATION_END`)},f=e=>{e.target===t.value&&(r.value=bg(t.value))},p=I(t,(e,t)=>{e?(n.value=getComputedStyle(e),e.addEventListener(`animationstart`,f),e.addEventListener(`animationcancel`,d),e.addEventListener(`animationend`,d)):(l(`ANIMATION_END`),o!==void 0&&s?.clearTimeout(o),t?.removeEventListener(`animationstart`,f),t?.removeEventListener(`animationcancel`,d),t?.removeEventListener(`animationend`,d))},{immediate:!0}),m=I(c,()=>{let e=bg(t.value);r.value=c.value===`mounted`?e:`none`});return Ki(()=>{p(),m(),t.value&&(t.value.removeEventListener(`animationstart`,f),t.value.removeEventListener(`animationcancel`,d),t.value.removeEventListener(`animationend`,d)),o!==void 0&&s?.clearTimeout(o)}),{isPresent:Y(()=>[`mounted`,`unmountSuspended`].includes(c.value))}}function bg(e){return e&&getComputedStyle(e).animationName||`none`}var xg=L({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){let{present:r,forceMount:i}=vn(e),a=N(),{isPresent:o}=yg(r,a);n({present:o});let s=t.default({present:o.value});s=bh(s||[]);let c=bs();if(s&&s?.length>1){let e=c?.parent?.type.name?`<${c.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` for \`Presence\` component.`,``,"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",`You can apply a few solutions:`,["Provide a single child element so that `presence` directive attach correctly.",`Ensure the first child is an actual element instead of a raw text node or comment node.`].map(e=>` - ${e}`).join(` diff --git a/ui/src/lib/api.ts b/ui/src/lib/api.ts index 2f6d02cce..9c5a2c328 100644 --- a/ui/src/lib/api.ts +++ b/ui/src/lib/api.ts @@ -146,6 +146,10 @@ export const api = { deletePolicy: (policy: unknown) => request("/api/access/policies", { method: "DELETE", body: policy, parse: false }), orgs: () => request("/api/orgs"), + // orgCreate makes an org with its default workspace and first owner; only + // an instance admin may. + orgCreate: (org: { id: string; name: string; owner_identity: string }) => + request("/api/orgs", { method: "POST", body: org }), org: (id: string) => request(`/api/orgs/${encodeURIComponent(id)}`), orgWorkspaces: (id: string) => request(`/api/orgs/${encodeURIComponent(id)}/workspaces`),