From 166a6923ec1ae83ab5fe8ceafda191e8949adf84 Mon Sep 17 00:00:00 2001 From: robb Date: Wed, 3 Sep 2025 14:30:30 +0800 Subject: [PATCH 01/40] feat: informer general framework and engine/discovery interface definition (#1314) * feat: informer general framework and engine/discovery interface definition --- app/dubbo-admin/dubbo-admin.yaml | 6 +- pkg/config/app/admin.go | 16 +- pkg/config/discovery/config.go | 19 +- pkg/config/engine/config.go | 34 ++- pkg/console/component.go | 4 - pkg/core/bootstrap/bootstrap.go | 12 + pkg/core/controller/informer.go | 231 ++++++++++++++++++ pkg/core/controller/listwatcher.go | 28 +++ pkg/core/discovery/base.go | 7 - pkg/core/discovery/component.go | 116 ++++++++- .../interfaces.go => discovery/discovery.go} | 67 +---- pkg/core/discovery/factory.go | 81 ++++++ pkg/core/engine/base.go | 6 - pkg/core/engine/component.go | 100 ++++++-- pkg/core/engine/engine.go | 21 ++ pkg/core/engine/factory.go | 80 ++++++ pkg/core/events/component.go | 123 ++++++++++ pkg/core/events/enventbus_test.go | 79 ------ pkg/core/events/eventbus.go | 98 +++----- .../apis/mesh/v1alpha1/affinityroute_types.go | 45 +++- .../apis/mesh/v1alpha1/application_types.go | 45 +++- .../mesh/v1alpha1/conditionroute_types.go | 45 +++- .../apis/mesh/v1alpha1/dynamicconfig_types.go | 45 +++- .../apis/mesh/v1alpha1/instance_types.go | 45 +++- .../apis/mesh/v1alpha1/mapping_types.go | 45 +++- .../apis/mesh/v1alpha1/service_types.go | 45 +++- .../apis/mesh/v1alpha1/tagroute_types.go | 45 +++- .../apis/system/v1alpha1/config_types.go | 39 ++- .../apis/system/v1alpha1/datasource_types.go | 39 ++- .../apis/system/v1alpha1/secret_types.go | 39 ++- .../apis/system/v1alpha1/zone_types.go | 39 ++- .../apis/system/v1alpha1/zoneinsight_types.go | 39 ++- pkg/core/resource/model/registry.go | 66 +++-- pkg/core/resource/model/resource.go | 2 + pkg/core/runtime/component.go | 1 + pkg/core/runtime/registry.go | 5 + pkg/core/store/component.go | 24 +- pkg/core/store/factory.go | 19 +- pkg/core/store/{indexer.go => index.go} | 17 ++ tools/resourcegen/main.go | 63 ++++- 40 files changed, 1530 insertions(+), 350 deletions(-) create mode 100644 pkg/core/controller/informer.go create mode 100644 pkg/core/controller/listwatcher.go delete mode 100644 pkg/core/discovery/base.go rename pkg/core/{events/interfaces.go => discovery/discovery.go} (50%) create mode 100644 pkg/core/discovery/factory.go delete mode 100644 pkg/core/engine/base.go create mode 100644 pkg/core/engine/engine.go create mode 100644 pkg/core/engine/factory.go create mode 100644 pkg/core/events/component.go delete mode 100644 pkg/core/events/enventbus_test.go rename pkg/core/store/{indexer.go => index.go} (62%) diff --git a/app/dubbo-admin/dubbo-admin.yaml b/app/dubbo-admin/dubbo-admin.yaml index 5cd21bce6..c58aa5e4b 100644 --- a/app/dubbo-admin/dubbo-admin.yaml +++ b/app/dubbo-admin/dubbo-admin.yaml @@ -48,5 +48,9 @@ discovery: metadataReport: nacos://47.76.94.134:8848?username=nacos&password=nacos - type: istio engine: - type: k8s + name: k8s1.28.6 + type: kubernetes + properties: + apiServerAddress: https://192.168.1.1:6443 + kubeConfig: /etc/kubernetes/admin.conf controlPlane: \ No newline at end of file diff --git a/pkg/config/app/admin.go b/pkg/config/app/admin.go index 3d4722ed2..3ca53182b 100644 --- a/pkg/config/app/admin.go +++ b/pkg/config/app/admin.go @@ -41,7 +41,7 @@ type AdminConfig struct { // Store configuration Store *store.Config `json:"store"` // Discovery configuration - Discovery *discovery.Config `json:"discovery"` + Discovery []*discovery.Config `json:"discovery"` // Engine configuration Engine *engine.Config `json:"engine"` } @@ -50,16 +50,26 @@ var _ = &AdminConfig{} func (c *AdminConfig) Sanitize() { c.Engine.Sanitize() - c.Discovery.Sanitize() + for _, d := range c.Discovery { + d.Sanitize() + } c.Store.Sanitize() c.Console.Sanitize() c.Diagnostics.Sanitize() } func (c *AdminConfig) PostProcess() error { + discoveryPostProcess := func() error { + for _, d := range c.Discovery { + if err := d.PostProcess(); err != nil { + return err + } + } + return nil + } return multierr.Combine( c.Engine.PostProcess(), - c.Discovery.PostProcess(), + discoveryPostProcess(), c.Store.PostProcess(), c.Console.PostProcess(), c.Diagnostics.PostProcess(), diff --git a/pkg/config/discovery/config.go b/pkg/config/discovery/config.go index b65d54d26..e748ff235 100644 --- a/pkg/config/discovery/config.go +++ b/pkg/config/discovery/config.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package discovery import "github.com/apache/dubbo-admin/pkg/config" @@ -9,7 +26,7 @@ const ( nacos Type = "nacos" ) -// Config defines Discovery Engine configuration +// Config defines Discovery configuration type Config struct { config.BaseConfig Name string `json:"name"` diff --git a/pkg/config/engine/config.go b/pkg/config/engine/config.go index f68f76b0d..706404f32 100644 --- a/pkg/config/engine/config.go +++ b/pkg/config/engine/config.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package engine import "github.com/apache/dubbo-admin/pkg/config" @@ -11,20 +28,15 @@ const ( type Config struct { config.BaseConfig - Name string `json:"name"` - Type Type `json:"type"` -} - -// AddressConfig defines Discovery Engine address -type AddressConfig struct { - Registry string `json:"registry"` - ConfigCenter string `json:"configCenter"` - MetadataReport string `json:"metadataReport"` + Name string `json:"name"` + Type Type `json:"type"` + Properties map[string]string `json:"properties"` } func DefaultResourceEngineConfig() *Config { return &Config{ - Name: "default", - Type: VM, + Name: "default", + Type: VM, + Properties: map[string]string{}, } } diff --git a/pkg/console/component.go b/pkg/console/component.go index cd9769d9f..fd4f94db8 100644 --- a/pkg/console/component.go +++ b/pkg/console/component.go @@ -52,10 +52,6 @@ func (c *consoleWebServer) Type() runtime.ComponentType { return runtime.Console } -func (c *consoleWebServer) SubType() runtime.ComponentSubType { - return runtime.DefaultComponentSubType -} - func (c *consoleWebServer) Order() int { return math.MaxInt } diff --git a/pkg/core/bootstrap/bootstrap.go b/pkg/core/bootstrap/bootstrap.go index 1c8cd63bc..80183b663 100644 --- a/pkg/core/bootstrap/bootstrap.go +++ b/pkg/core/bootstrap/bootstrap.go @@ -33,6 +33,10 @@ func Bootstrap(appCtx context.Context, cfg app.AdminConfig) (runtime.Runtime, er if err != nil { return nil, err } + // 0. initialize event bus + if err := initEventBus(builder); err != nil { + return nil, err + } // 1. initialize resource store if err := initResourceStore(cfg, builder); err != nil { return nil, err @@ -64,6 +68,14 @@ func Bootstrap(appCtx context.Context, cfg app.AdminConfig) (runtime.Runtime, er return rt, nil } +func initEventBus(builder *runtime.Builder) error { + comp, err := runtime.ComponentRegistry().EventBus() + if err != nil { + return err + } + return initAndActivateComponent(builder, comp) +} + func initResourceStore(cfg app.AdminConfig, builder *runtime.Builder) error { comp, err := runtime.ComponentRegistry().ResourceStore() if err != nil { diff --git a/pkg/core/controller/informer.go b/pkg/core/controller/informer.go new file mode 100644 index 000000000..b00fb94e4 --- /dev/null +++ b/pkg/core/controller/informer.go @@ -0,0 +1,231 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package controller + +import ( + "errors" + "fmt" + "sync" + "time" + + "github.com/apache/dubbo-admin/pkg/core/events" + "github.com/apache/dubbo-admin/pkg/core/logger" + "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/store" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/tools/cache" + "k8s.io/klog/v2" +) + +// Informer is transferred from cache.SharedInformer, and modified to support event distribution in events.EventBus +type Informer interface { + // Run starts and runs the shared informer, returning after it stops. + // The informer will be stopped when stopCh is closed. + Run(stopCh <-chan struct{}) + // IsStopped reports whether the informer has already been stopped. + // Adding event handlers to already stopped informers is not possible. + // An informer already stopped will never be started again. + IsStopped() bool +} + +// Options configures an informer. +type Options struct { + // ResyncPeriod is the default event handler resync period and resync check + // period. If unset/unspecified, these are defaulted to 0 (do not resync). + ResyncPeriod time.Duration +} + +// informer implements Informer and has three +// main components. One is the cache.Indexer which provides curd operations for objects. +// The second main component is a cache.Controller that pulls +// objects/notifications using the ListerWatcher and pushes them into +// a cache.DeltaFIFO --- whose knownObjects is the informer's indexer +// --- while concurrently Popping Deltas values from that fifo and +// processing them with informer.HandleDeltas. Each +// invocation of HandleDeltas, which is done with the fifo's lock +// held, processes each Delta in turn. For each cache.Delta this both +// updates the store and emit the event to the events.EventBus +// The third main component is emitter, which is responsible for +// event distribution +type informer struct { + // see store.ResourceStore + indexer cache.Indexer + // controller is the underlying cache.Controller that pop cache.Delta from the fifo queue + controller cache.Controller + // listerWatcher is where we got our initial list of objects and where we perform a watch from. + listerWatcher cache.ListerWatcher + // emitter is used to emit events to events.EventBus + emitter events.Emitter + // objectType is an example object of the type this informer is expected to handle. If set, an event + // with an object with a mismatching type is dropped instead of being delivered to listeners. + objectType runtime.Object + // resyncCheckPeriod is how often we want the reflector's resync timer to fire so it can call + // ShouldResync to check if any of our listeners need a resync. + resyncCheckPeriod time.Duration + + started, stopped bool + startedLock sync.Mutex + // blockDeltas gives a way to stop all event distribution so that a late event handler + // can safely join the shared informer. + blockDeltas sync.Mutex + // Called whenever the ListAndWatch drops the connection with an error. + watchErrorHandler cache.WatchErrorHandler + // transform is an optional function that is called on each object before it is pushed into the queue. + transform cache.TransformFunc +} + +func NewInformerWithOptions(lw cache.ListerWatcher, emitter events.Emitter, store store.ResourceStore, + exampleObject runtime.Object, options Options) Informer { + return &informer{ + indexer: store, + listerWatcher: lw, + emitter: emitter, + objectType: exampleObject, + resyncCheckPeriod: options.ResyncPeriod, + } +} + +func (s *informer) SetWatchErrorHandler(handler cache.WatchErrorHandler) error { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.started { + return fmt.Errorf("informer has already started") + } + + s.watchErrorHandler = handler + return nil +} + +func (s *informer) SetTransform(handler cache.TransformFunc) error { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.started { + return fmt.Errorf("informer has already started") + } + + s.transform = handler + return nil +} + +func (s *informer) Run(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + defer func() { + s.startedLock.Lock() + defer s.startedLock.Unlock() + s.stopped = true // Don't want any new listeners + }() + + if s.HasStarted() { + klog.Warningf("The informer has started, run more than once is not allowed") + return + } + + func() { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + fifo := cache.NewDeltaFIFOWithOptions(cache.DeltaFIFOOptions{ + KnownObjects: s.indexer, + EmitDeltaTypeReplaced: true, + Transformer: s.transform, + }) + + // We turn off the resync mechanism because we don't want to re-list all objects. + cfg := &cache.Config{ + Queue: fifo, + ListerWatcher: s.listerWatcher, + ObjectType: s.objectType, + FullResyncPeriod: s.resyncCheckPeriod, + ShouldResync: s.ShouldResync, + Process: s.HandleDeltas, + WatchErrorHandler: s.watchErrorHandler, + } + + s.controller = cache.New(cfg) + s.started = true + }() + + s.controller.Run(stopCh) +} + +func (s *informer) HasStarted() bool { + s.startedLock.Lock() + defer s.startedLock.Unlock() + return s.started +} + +// ShouldResync if the informer's resyncPeriod is non-zero, resync will be periodically triggered. +func (s *informer) ShouldResync() bool { + return s.resyncCheckPeriod != 0 +} + +// HandleDeltas is called for each delta when pop out from queue. +func (s *informer) HandleDeltas(obj interface{}, _ bool) error { + s.blockDeltas.Lock() + defer s.blockDeltas.Unlock() + + deltas, ok := obj.(cache.Deltas) + if !ok { + return errors.New("object given as Process argument is not Deltas") + } + // from oldest to newest + for _, d := range deltas { + obj := d.Object + resource, ok := obj.(model.Resource) + if !ok { + logger.Errorf("object from ListWatcher is not conformed to Resource, obj: %v", obj) + return errors.New("object from ListWatcher is not conformed to Resource") + } + switch d.Type { + case cache.Sync, cache.Replaced, cache.Added, cache.Updated: + if old, exists, err := s.indexer.Get(resource); err == nil && exists { + if err := s.indexer.Update(resource); err != nil { + return err + } + s.EmitEvent(d.Type, old.(model.Resource), resource) + } else { + if err := s.indexer.Add(obj); err != nil { + return err + } + s.EmitEvent(d.Type, nil, resource) + } + case cache.Deleted: + if err := s.indexer.Delete(obj); err != nil { + return err + } + s.EmitEvent(d.Type, resource, nil) + } + } + return nil +} + +// EmitEvent emits an event to the event bus. +func (s *informer) EmitEvent(typ cache.DeltaType, oldObj model.Resource, newObj model.Resource) { + event := events.NewResourceChangedEvent(typ, oldObj, newObj) + s.emitter.Send(event) +} + +// IsStopped reports whether the informer has already been stopped. +func (s *informer) IsStopped() bool { + s.startedLock.Lock() + defer s.startedLock.Unlock() + return s.stopped +} diff --git a/pkg/core/controller/listwatcher.go b/pkg/core/controller/listwatcher.go new file mode 100644 index 000000000..fd5530e3b --- /dev/null +++ b/pkg/core/controller/listwatcher.go @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package controller + +import ( + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "k8s.io/client-go/tools/cache" +) + +type ResourceListerWatcher interface { + ResourceKind() coremodel.ResourceKind + cache.ListerWatcher +} diff --git a/pkg/core/discovery/base.go b/pkg/core/discovery/base.go deleted file mode 100644 index f3ef5329e..000000000 --- a/pkg/core/discovery/base.go +++ /dev/null @@ -1,7 +0,0 @@ -package discovery - -// ResourceDiscovery is the component which discovers the rpc services and convert them to Application, Instance, Service -// resources etc. -// TODO need to define the interface and implement it -type ResourceDiscovery interface { -} diff --git a/pkg/core/discovery/component.go b/pkg/core/discovery/component.go index 28542dc7c..8751bfb1a 100644 --- a/pkg/core/discovery/component.go +++ b/pkg/core/discovery/component.go @@ -1,36 +1,130 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package discovery import ( "math" + "github.com/apache/dubbo-admin/pkg/config/discovery" + "github.com/apache/dubbo-admin/pkg/core/controller" + "github.com/apache/dubbo-admin/pkg/core/events" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "github.com/apache/dubbo-admin/pkg/core/runtime" + "github.com/apache/dubbo-admin/pkg/core/store" ) +func init() { + runtime.RegisterComponent(newDiscoveryComponent()) +} + type Component interface { runtime.Component - ResourceDiscovery() ResourceDiscovery + ResourceDiscovery } -var _ Component = &BaseResourceDiscoveryComponent{} +var _ Component = &discoveryComponent{} + +type Informers []controller.Informer -type BaseResourceDiscoveryComponent struct{} +type discoveryComponent struct { + discoveryInformers map[string]Informers +} + +func newDiscoveryComponent() Component { + return &discoveryComponent{ + discoveryInformers: make(map[string]Informers), + } +} -func (b *BaseResourceDiscoveryComponent) Type() runtime.ComponentType { +func (d *discoveryComponent) Type() runtime.ComponentType { return runtime.ResourceDiscovery } -func (b *BaseResourceDiscoveryComponent) Order() int { +func (d *discoveryComponent) Order() int { return math.MaxInt } -func (b *BaseResourceDiscoveryComponent) Init(_ runtime.BuilderContext) error { - panic("Init() must be implemented by concrete BaseResourceDiscoveryComponent") +func (d *discoveryComponent) Init(ctx runtime.BuilderContext) error { + configs := ctx.Config().Discovery + for _, cfg := range configs { + informers, err := d.newInformers(cfg, ctx) + if err != nil { + return err + } + d.discoveryInformers[cfg.Name] = informers + } + return nil +} + +func (d *discoveryComponent) Start(_ runtime.Runtime, ch <-chan struct{}) error { + for name, informers := range d.discoveryInformers { + for _, informer := range informers { + go informer.Run(ch) + } + logger.Infof("resource discvoery %s has started succesfully", name) + } + return nil +} + +func (d *discoveryComponent) Add(resource coremodel.Resource) error { + //TODO implement me + panic("implement me") +} + +func (d *discoveryComponent) Update(resource coremodel.Resource) error { + //TODO implement me + panic("implement me") } -func (b *BaseResourceDiscoveryComponent) Start(_ runtime.Runtime, _ <-chan struct{}) error { - panic("Start() must be implemented by concrete BaseResourceDiscoveryComponent") +func (d *discoveryComponent) Delete(resource coremodel.Resource) error { + //TODO implement me + panic("implement me") } -func (b *BaseResourceDiscoveryComponent) ResourceDiscovery() ResourceDiscovery { - panic("Discovery() must be implemented by concrete BaseResourceDiscoveryComponent") +func (d *discoveryComponent) newInformers(cfg *discovery.Config, ctx runtime.BuilderContext) (Informers, error) { + factory, err := ListWatcherFactoryRegistry().GetListWatcherFactory(cfg.Type) + if err != nil { + return nil, err + } + lwList, err := factory.NewListWatchers(cfg) + if err != nil { + return nil, err + } + eventBusComponent, err := ctx.GetActivatedComponent(runtime.EventBus) + if err != nil { + return nil, err + } + emitter := eventBusComponent.(events.Emitter) + storeComponent, err := ctx.GetActivatedComponent(runtime.ResourceStore) + if err != nil { + return nil, err + } + resourceStore := storeComponent.(store.ResourceStore) + var informers Informers + for _, lw := range lwList { + rk := lw.ResourceKind() + newFunc, err := coremodel.ResourceSchemaRegistry().NewResourceFunc(rk) + if err != nil { + return nil, err + } + informer := controller.NewInformerWithOptions(lw, emitter, resourceStore, newFunc(), controller.Options{ResyncPeriod: 0}) + informers = append(informers, informer) + } + return informers, nil } diff --git a/pkg/core/events/interfaces.go b/pkg/core/discovery/discovery.go similarity index 50% rename from pkg/core/events/interfaces.go rename to pkg/core/discovery/discovery.go index 4dc549e52..172b27d87 100644 --- a/pkg/core/events/interfaces.go +++ b/pkg/core/discovery/discovery.go @@ -15,64 +15,23 @@ * limitations under the License. */ -package events +package discovery import ( - "github.com/pkg/errors" + "github.com/apache/dubbo-admin/pkg/core/resource/model" ) -type Event interface{} - -type Op int - -const ( - Create Op = iota - Update - Delete -) - -type ResourceChangedEvent struct { - Operation Op - Kind string - Key string - TenantID string -} - -type TriggerInsightsComputationEvent struct { - TenantID string -} - -var ListenerStoppedErr = errors.New("listener closed") - -type Listener interface { - Recv() <-chan Event - Close() -} - -func NewNeverListener() Listener { - return &neverRecvListener{} -} - -type neverRecvListener struct{} - -func (*neverRecvListener) Recv() <-chan Event { - return nil -} - -func (*neverRecvListener) Close() { -} - -type Predicate = func(event Event) bool - -type Emitter interface { - Send(Event) -} - -type ListenerFactory interface { - Subscribe(...Predicate) Listener +// Operations are the operations which can be called by other components` +type Operations interface { + // Add adds a resource to the registry + Add(model.Resource) error + // Update updates a resource in the registry + Update(model.Resource) error + // Delete deletes a resource from the registry + Delete(model.Resource) error } -type EventBus interface { - Emitter - ListenerFactory +// ResourceDiscovery is the component which discovers the rpc services and save them into store.ResourceStore +type ResourceDiscovery interface { + Operations } diff --git a/pkg/core/discovery/factory.go b/pkg/core/discovery/factory.go new file mode 100644 index 000000000..ef6a11707 --- /dev/null +++ b/pkg/core/discovery/factory.go @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package discovery + +import ( + "fmt" + + "github.com/apache/dubbo-admin/pkg/config/discovery" + "github.com/apache/dubbo-admin/pkg/core/controller" +) + +var registry = newDiscoveryFactoryRegistry() + +func RegisterListWatcherFactory(f Factory) { + registry.Register(f) +} + +func ListWatcherFactoryRegistry() Registry { + return registry +} + +// Factory creates informers for the given type +type Factory interface { + // Support returns true if the factory can create ListWatchers for the given discovery type + Support(discovery.Type) bool + // NewListWatchers creates series of list watchers for the given discovery type + NewListWatchers(config *discovery.Config) ([]controller.ResourceListerWatcher, error) +} + +type Registry interface { + GetListWatcherFactory(discovery.Type) (Factory, error) +} + +type RegistryMutator interface { + Register(Factory) +} + +type MutableRegistry interface { + Registry + RegistryMutator +} + +var _ MutableRegistry = &discoveryRegistry{} + +type discoveryRegistry struct { + factories []Factory +} + +func newDiscoveryFactoryRegistry() MutableRegistry { + return &discoveryRegistry{ + factories: make([]Factory, 0), + } +} + +func (d *discoveryRegistry) GetListWatcherFactory(t discovery.Type) (Factory, error) { + for _, factory := range d.factories { + if factory.Support(t) { + return factory, nil + } + } + return nil, fmt.Errorf("discovery type %s not supported", t) +} + +func (d *discoveryRegistry) Register(factory Factory) { + d.factories = append(d.factories, factory) +} diff --git a/pkg/core/engine/base.go b/pkg/core/engine/base.go deleted file mode 100644 index 380e8310e..000000000 --- a/pkg/core/engine/base.go +++ /dev/null @@ -1,6 +0,0 @@ -package engine - -// ResourceEngine is the component which list and watch the runtime infrastructure of resources, like kubernetes, docker etc. -// TODO need to define the interface and implement it -type ResourceEngine interface { -} diff --git a/pkg/core/engine/component.go b/pkg/core/engine/component.go index 5a4f0c953..6aa5fa744 100644 --- a/pkg/core/engine/component.go +++ b/pkg/core/engine/component.go @@ -1,38 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package engine import ( + "fmt" "math" + "github.com/apache/dubbo-admin/pkg/core/controller" + "github.com/apache/dubbo-admin/pkg/core/events" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "github.com/apache/dubbo-admin/pkg/core/runtime" + "github.com/apache/dubbo-admin/pkg/core/store" ) +func init() { + runtime.RegisterComponent(newEngineComponent()) +} + type Component interface { runtime.Component - ResourceEngine() ResourceEngine + ResourceEngine } -var _ Component = &BaseResourceEngineComponent{} +var _ Component = &engineComponent{} -type BaseResourceEngineComponent struct{} +type engineComponent struct { + name string + informers []controller.Informer +} -func (b BaseResourceEngineComponent) Type() runtime.ComponentType { +func newEngineComponent() Component { + return &engineComponent{ + informers: make([]controller.Informer, 0), + } +} +func (b *engineComponent) Type() runtime.ComponentType { return runtime.ResourceEngine } -func (b BaseResourceEngineComponent) Order() int { +func (b *engineComponent) Order() int { return math.MaxInt } -func (b BaseResourceEngineComponent) Init(runtime.BuilderContext) error { - panic("Init() must be implemented by concrete BaseResourceEngineComponent") - -} - -func (b BaseResourceEngineComponent) Start(runtime.Runtime, <-chan struct{}) error { - panic("Start() must be implemented by concrete BaseResourceEngineComponent") +func (b *engineComponent) Init(ctx runtime.BuilderContext) error { + cfg := ctx.Config().Engine + factory, err := FactoryRegistry().GetListWatcherFactory(cfg.Type) + if err != nil { + return err + } + lwList, err := factory.NewListWatchers(cfg) + if err != nil { + return err + } + for _, lw := range lwList { + eventBusComponent, err := ctx.GetActivatedComponent(runtime.EventBus) + if err != nil { + return err + } + emitter, ok := eventBusComponent.(events.Emitter) + if !ok { + return fmt.Errorf("type assertion failed, event bus component in runtime is not an Emitter") + } + storeComponent, err := ctx.GetActivatedComponent(runtime.ResourceStore) + if err != nil { + return err + } + resourceStore, ok := storeComponent.(store.ResourceStore) + if !ok { + return fmt.Errorf("type assertion failed, resource store component in runtime is not a ResourceStore") + } + rk := lw.ResourceKind() + newFunc, err := coremodel.ResourceSchemaRegistry().NewResourceFunc(rk) + if err != nil { + return err + } + informer := controller.NewInformerWithOptions(lw, emitter, resourceStore, + newFunc(), controller.Options{ResyncPeriod: 0}) + b.informers = append(b.informers, informer) + } + b.name = cfg.Name + logger.Infof("resource engine %s has been inited successfully", b.name) + return nil } -func (b BaseResourceEngineComponent) ResourceEngine() ResourceEngine { - panic("Discovery() must be implemented by concrete BaseResourceEngineComponent") - +func (b *engineComponent) Start(_ runtime.Runtime, ch <-chan struct{}) error { + for _, informer := range b.informers { + go informer.Run(ch) + } + logger.Infof("resource engine %s has started successfully", b.name) + return nil } diff --git a/pkg/core/engine/engine.go b/pkg/core/engine/engine.go new file mode 100644 index 000000000..06cb57d14 --- /dev/null +++ b/pkg/core/engine/engine.go @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package engine + +// ResourceEngine is the component which list and watch the runtime infrastructure of resources, like kubernetes, docker etc. +type ResourceEngine interface{} diff --git a/pkg/core/engine/factory.go b/pkg/core/engine/factory.go new file mode 100644 index 000000000..4b86df96f --- /dev/null +++ b/pkg/core/engine/factory.go @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package engine + +import ( + "fmt" + + "github.com/apache/dubbo-admin/pkg/config/engine" + "github.com/apache/dubbo-admin/pkg/core/controller" +) + +var factoryRegistry = newListWatchFactoryRegistry() + +func RegisterFactory(f Factory) { + factoryRegistry.Register(f) +} + +func FactoryRegistry() Registry { + return factoryRegistry +} + +// Factory defines if a specific engine type is supported and how to create ListWatchers +type Factory interface { + Support(engine.Type) bool + NewListWatchers(*engine.Config) ([]controller.ResourceListerWatcher, error) +} + +type Registry interface { + GetListWatcherFactory(engine.Type) (Factory, error) +} + +type RegistryMutator interface { + // Register a new engine factory + Register(Factory) +} + +type MutableRegistry interface { + Registry + RegistryMutator +} + +var _ MutableRegistry = &listWatchFactoryRegistry{} + +type listWatchFactoryRegistry struct { + factories []Factory +} + +func newListWatchFactoryRegistry() MutableRegistry { + return &listWatchFactoryRegistry{ + factories: make([]Factory, 0), + } +} + +func (e *listWatchFactoryRegistry) Register(factory Factory) { + e.factories = append(e.factories, factory) +} + +func (e *listWatchFactoryRegistry) GetListWatcherFactory(t engine.Type) (Factory, error) { + for _, factory := range e.factories { + if factory.Support(t) { + return factory, nil + } + } + return nil, fmt.Errorf("engine type %s not supported", t) +} diff --git a/pkg/core/events/component.go b/pkg/core/events/component.go new file mode 100644 index 000000000..1c4dcb827 --- /dev/null +++ b/pkg/core/events/component.go @@ -0,0 +1,123 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package events + +import ( + "fmt" + "math" + "sync" + + "github.com/apache/dubbo-admin/pkg/core/logger" + "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/runtime" +) + +func init() { + runtime.RegisterComponent(&eventBus{}) +} + +type subscriber struct { + name string + resourceKind model.ResourceKind + processFunc ProcessEventFunc +} +type subscribers []subscriber + +type EventBusComponent interface { + EventBus + runtime.Component +} + +var _ EventBusComponent = &eventBus{} + +type eventBus struct { + rwMutex sync.RWMutex + subscriberDir map[model.ResourceKind]subscribers +} + +func (b *eventBus) Type() runtime.ComponentType { + return runtime.EventBus +} + +func (b *eventBus) Order() int { + return math.MaxInt +} + +func (b *eventBus) Init(_ runtime.BuilderContext) error { + b.subscriberDir = make(map[model.ResourceKind]subscribers) + return nil +} + +func (b *eventBus) Start(_ runtime.Runtime, _ <-chan struct{}) error { + return nil +} + +// Subscribe subscribes to a resource kind, ProcessEventFunc is synchronous which is used to avoid event loss +func (b *eventBus) Subscribe(rk model.ResourceKind, name string, process ProcessEventFunc) error { + b.rwMutex.Lock() + defer b.rwMutex.Unlock() + subs, exists := b.subscriberDir[rk] + if !exists { + subs = make(subscribers, 0) + } + // check name if is unique + for _, sub := range subs { + if sub.name == name { + return fmt.Errorf("duplicated subscriber name %s, skipped subscribing", name) + } + } + b.subscriberDir[rk] = append(subs, subscriber{ + name: name, + resourceKind: rk, + processFunc: process, + }) + return nil +} + +func (b *eventBus) Unsubscribe(rk model.ResourceKind, name string) error { + b.rwMutex.Lock() + defer b.rwMutex.Unlock() + subs, exists := b.subscriberDir[rk] + if !exists { + return fmt.Errorf("no subscriber for resource %s, skipped unsubscribing", rk) + } + for i, sub := range subs { + if sub.name == name { + b.subscriberDir[rk] = append(subs[:i], subs[i+1:]...) + return nil + } + } + return fmt.Errorf("no subscriber named %s for resource %s, skipped unsubscribing", name, rk) +} + +func (b *eventBus) Send(event Event) { + b.rwMutex.RLock() + defer b.rwMutex.RUnlock() + rk := event.OldObj().ResourceKind() + subs, exists := b.subscriberDir[rk] + if !exists { + logger.Warnf("no subscriber for resource %s, skipped sending event%v", rk, event) + return + } + for _, sub := range subs { + // TODO Do we need to support reprocess + if err := sub.processFunc(event); err != nil { + logger.Errorf("failed to process event in %s , skipped, event: %v", sub.name, event) + } + } +} diff --git a/pkg/core/events/enventbus_test.go b/pkg/core/events/enventbus_test.go deleted file mode 100644 index 9146d6f0b..000000000 --- a/pkg/core/events/enventbus_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package events_test - -import ( - . "github.com/onsi/ginkgo/v2" - - . "github.com/onsi/gomega" - - "github.com/apache/dubbo-admin/pkg/core/events" -) - -var _ = Describe("EventBus", func() { - chHadEvent := func(ch <-chan events.Event) bool { - select { - case <-ch: - return true - default: - return false - } - } - - It("should not block on Send", func() { - // given - eventBus, err := events.NewEventBus(1) - Expect(err).ToNot(HaveOccurred()) - listener := eventBus.Subscribe() - event1 := events.ResourceChangedEvent{TenantID: "1"} - event2 := events.ResourceChangedEvent{TenantID: "2"} - - // when - eventBus.Send(event1) - eventBus.Send(event2) - - // then - event := <-listener.Recv() - Expect(event).To(Equal(event1)) - - // and second event was ignored because buffer was full - Expect(chHadEvent(listener.Recv())).To(BeFalse()) - }) - - It("should only send events matched predicate", func() { - // given - eventBus, err := events.NewEventBus(10) - Expect(err).ToNot(HaveOccurred()) - listener := eventBus.Subscribe(func(event events.Event) bool { - return event.(events.ResourceChangedEvent).TenantID == "1" - }) - event1 := events.ResourceChangedEvent{TenantID: "1"} - event2 := events.ResourceChangedEvent{TenantID: "2"} - - // when - eventBus.Send(event1) - eventBus.Send(event2) - - // then - event := <-listener.Recv() - Expect(event).To(Equal(event1)) - - // and second event was ignored, because it did not match predicate - Expect(chHadEvent(listener.Recv())).To(BeFalse()) - }) -}) diff --git a/pkg/core/events/eventbus.go b/pkg/core/events/eventbus.go index 7111f5352..7fbe14b39 100644 --- a/pkg/core/events/eventbus.go +++ b/pkg/core/events/eventbus.go @@ -18,86 +18,54 @@ package events import ( - "sync" - - "github.com/apache/dubbo-admin/pkg/core" + "github.com/apache/dubbo-admin/pkg/core/resource/model" + "k8s.io/client-go/tools/cache" ) -var log = core.Log.WithName("eventbus") - -type subscriber struct { - ch chan Event - predicates []Predicate +type Event interface { + Type() cache.DeltaType + OldObj() model.Resource + NewObj() model.Resource } -func NewEventBus(bufferSize uint) (EventBus, error) { - return &eventBus{ - subscribers: map[string]subscriber{}, - bufferSize: bufferSize, - }, nil +type ProcessEventFunc func(event Event) error + +type ResourceChangedEvent struct { + typ cache.DeltaType + oldObj model.Resource + newObj model.Resource } -type eventBus struct { - mtx sync.RWMutex - subscribers map[string]subscriber - bufferSize uint +func NewResourceChangedEvent(typ cache.DeltaType, oldObj model.Resource, newObj model.Resource) *ResourceChangedEvent { + return &ResourceChangedEvent{ + typ: typ, + oldObj: oldObj, + newObj: newObj, + } } -// Subscribe subscribes to a stream of events given Predicates -// Predicate should not block on I/O, otherwise the whole event bus can block. -// All predicates must pass for the event to enqueued. -func (b *eventBus) Subscribe(predicates ...Predicate) Listener { - id := core.NewUUID() - b.mtx.Lock() - defer b.mtx.Unlock() +func (e *ResourceChangedEvent) Type() cache.DeltaType { + return e.typ +} - events := make(chan Event, b.bufferSize) - b.subscribers[id] = subscriber{ - ch: events, - predicates: predicates, - } - return &reader{ - events: events, - close: func() { - b.mtx.Lock() - defer b.mtx.Unlock() - delete(b.subscribers, id) - }, - } +func (e *ResourceChangedEvent) OldObj() model.Resource { + return e.oldObj } -func (b *eventBus) Send(event Event) { - b.mtx.RLock() - defer b.mtx.RUnlock() - for _, sub := range b.subscribers { - matched := true - for _, predicate := range sub.predicates { - if !predicate(event) { - matched = false - } - } - if matched { - select { - case sub.ch <- event: - default: - log.Info("[WARNING] event is not sent because the channel is full. Ignoring event. Consider increasing buffer size using dubbo_EVENT_BUS_BUFFER_SIZE", - "bufferSize", b.bufferSize, - "event", event, - ) - } - } - } +func (e *ResourceChangedEvent) NewObj() model.Resource { + return e.newObj } -type reader struct { - events chan Event - close func() +type Emitter interface { + Send(event Event) } -func (k *reader) Recv() <-chan Event { - return k.events +type SubscriptionManager interface { + Subscribe(rk model.ResourceKind, name string, process ProcessEventFunc) error + Unsubscribe(rk model.ResourceKind, name string) error } -func (k *reader) Close() { - k.close() +type EventBus interface { + Emitter + SubscriptionManager } diff --git a/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go b/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go index 7a932c6af..fa4cf9e30 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go @@ -21,10 +21,12 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +35,7 @@ import ( const AffinityRouteKind coremodel.ResourceKind = "AffinityRoute" func init() { - coremodel.RegisterResourceKind(AffinityRouteKind) + coremodel.RegisterResourceSchema(AffinityRouteKind, NewAffinityRouteResource) } type AffinityRouteResource struct { @@ -83,12 +85,36 @@ func (r *AffinityRouteResource) ResourceMeta() metav1.ObjectMeta { func (r *AffinityRouteResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *AffinityRouteResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &AffinityRouteResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.AffinityRoute) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} -func NewAffinityRouteResource(name string, mesh string, apiVersion string) *AffinityRouteResource { +func NewAffinityRouteResourceWithAttributes(name string, mesh string) *AffinityRouteResource { return &AffinityRouteResource{ TypeMeta: metav1.TypeMeta{ Kind: string(AffinityRouteKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +123,12 @@ func NewAffinityRouteResource(name string, mesh string, apiVersion string) *Affi Mesh: mesh, } } + +func NewAffinityRouteResource() coremodel.Resource { + return &AffinityRouteResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(AffinityRouteKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/application_types.go b/pkg/core/resource/apis/mesh/v1alpha1/application_types.go index 0a2b03ecc..4bf29dc6a 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/application_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/application_types.go @@ -21,10 +21,12 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +35,7 @@ import ( const ApplicationKind coremodel.ResourceKind = "Application" func init() { - coremodel.RegisterResourceKind(ApplicationKind) + coremodel.RegisterResourceSchema(ApplicationKind, NewApplicationResource) } type ApplicationResource struct { @@ -83,12 +85,36 @@ func (r *ApplicationResource) ResourceMeta() metav1.ObjectMeta { func (r *ApplicationResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *ApplicationResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &ApplicationResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.Application) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} -func NewApplicationResource(name string, mesh string, apiVersion string) *ApplicationResource { +func NewApplicationResourceWithAttributes(name string, mesh string) *ApplicationResource { return &ApplicationResource{ TypeMeta: metav1.TypeMeta{ Kind: string(ApplicationKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +123,12 @@ func NewApplicationResource(name string, mesh string, apiVersion string) *Applic Mesh: mesh, } } + +func NewApplicationResource() coremodel.Resource { + return &ApplicationResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ApplicationKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go b/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go index c118cd50c..d2617bbcb 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go @@ -21,10 +21,12 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +35,7 @@ import ( const ConditionRouteKind coremodel.ResourceKind = "ConditionRoute" func init() { - coremodel.RegisterResourceKind(ConditionRouteKind) + coremodel.RegisterResourceSchema(ConditionRouteKind, NewConditionRouteResource) } type ConditionRouteResource struct { @@ -83,12 +85,36 @@ func (r *ConditionRouteResource) ResourceMeta() metav1.ObjectMeta { func (r *ConditionRouteResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *ConditionRouteResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &ConditionRouteResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.ConditionRoute) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} -func NewConditionRouteResource(name string, mesh string, apiVersion string) *ConditionRouteResource { +func NewConditionRouteResourceWithAttributes(name string, mesh string) *ConditionRouteResource { return &ConditionRouteResource{ TypeMeta: metav1.TypeMeta{ Kind: string(ConditionRouteKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +123,12 @@ func NewConditionRouteResource(name string, mesh string, apiVersion string) *Con Mesh: mesh, } } + +func NewConditionRouteResource() coremodel.Resource { + return &ConditionRouteResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ConditionRouteKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go b/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go index 9838fdc8b..83e9b6893 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go @@ -21,10 +21,12 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +35,7 @@ import ( const DynamicConfigKind coremodel.ResourceKind = "DynamicConfig" func init() { - coremodel.RegisterResourceKind(DynamicConfigKind) + coremodel.RegisterResourceSchema(DynamicConfigKind, NewDynamicConfigResource) } type DynamicConfigResource struct { @@ -83,12 +85,36 @@ func (r *DynamicConfigResource) ResourceMeta() metav1.ObjectMeta { func (r *DynamicConfigResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *DynamicConfigResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &DynamicConfigResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.DynamicConfig) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} -func NewDynamicConfigResource(name string, mesh string, apiVersion string) *DynamicConfigResource { +func NewDynamicConfigResourceWithAttributes(name string, mesh string) *DynamicConfigResource { return &DynamicConfigResource{ TypeMeta: metav1.TypeMeta{ Kind: string(DynamicConfigKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +123,12 @@ func NewDynamicConfigResource(name string, mesh string, apiVersion string) *Dyna Mesh: mesh, } } + +func NewDynamicConfigResource() coremodel.Resource { + return &DynamicConfigResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(DynamicConfigKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go b/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go index a71b253b1..f47dbc935 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go @@ -21,10 +21,12 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +35,7 @@ import ( const InstanceKind coremodel.ResourceKind = "Instance" func init() { - coremodel.RegisterResourceKind(InstanceKind) + coremodel.RegisterResourceSchema(InstanceKind, NewInstanceResource) } type InstanceResource struct { @@ -83,12 +85,36 @@ func (r *InstanceResource) ResourceMeta() metav1.ObjectMeta { func (r *InstanceResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *InstanceResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &InstanceResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.Instance) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} -func NewInstanceResource(name string, mesh string, apiVersion string) *InstanceResource { +func NewInstanceResourceWithAttributes(name string, mesh string) *InstanceResource { return &InstanceResource{ TypeMeta: metav1.TypeMeta{ Kind: string(InstanceKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +123,12 @@ func NewInstanceResource(name string, mesh string, apiVersion string) *InstanceR Mesh: mesh, } } + +func NewInstanceResource() coremodel.Resource { + return &InstanceResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(InstanceKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/mapping_types.go b/pkg/core/resource/apis/mesh/v1alpha1/mapping_types.go index bf194f274..de28f228f 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/mapping_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/mapping_types.go @@ -21,10 +21,12 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +35,7 @@ import ( const MappingKind coremodel.ResourceKind = "Mapping" func init() { - coremodel.RegisterResourceKind(MappingKind) + coremodel.RegisterResourceSchema(MappingKind, NewMappingResource) } type MappingResource struct { @@ -83,12 +85,36 @@ func (r *MappingResource) ResourceMeta() metav1.ObjectMeta { func (r *MappingResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *MappingResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &MappingResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.Mapping) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} -func NewMappingResource(name string, mesh string, apiVersion string) *MappingResource { +func NewMappingResourceWithAttributes(name string, mesh string) *MappingResource { return &MappingResource{ TypeMeta: metav1.TypeMeta{ Kind: string(MappingKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +123,12 @@ func NewMappingResource(name string, mesh string, apiVersion string) *MappingRes Mesh: mesh, } } + +func NewMappingResource() coremodel.Resource { + return &MappingResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(MappingKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/service_types.go b/pkg/core/resource/apis/mesh/v1alpha1/service_types.go index f3abeb289..6e26394d9 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/service_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/service_types.go @@ -21,10 +21,12 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +35,7 @@ import ( const ServiceKind coremodel.ResourceKind = "Service" func init() { - coremodel.RegisterResourceKind(ServiceKind) + coremodel.RegisterResourceSchema(ServiceKind, NewServiceResource) } type ServiceResource struct { @@ -83,12 +85,36 @@ func (r *ServiceResource) ResourceMeta() metav1.ObjectMeta { func (r *ServiceResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *ServiceResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &ServiceResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.Service) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} -func NewServiceResource(name string, mesh string, apiVersion string) *ServiceResource { +func NewServiceResourceWithAttributes(name string, mesh string) *ServiceResource { return &ServiceResource{ TypeMeta: metav1.TypeMeta{ Kind: string(ServiceKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +123,12 @@ func NewServiceResource(name string, mesh string, apiVersion string) *ServiceRes Mesh: mesh, } } + +func NewServiceResource() coremodel.Resource { + return &ServiceResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ServiceKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go b/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go index 516c16430..1e3d0d230 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go @@ -21,10 +21,12 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +35,7 @@ import ( const TagRouteKind coremodel.ResourceKind = "TagRoute" func init() { - coremodel.RegisterResourceKind(TagRouteKind) + coremodel.RegisterResourceSchema(TagRouteKind, NewTagRouteResource) } type TagRouteResource struct { @@ -83,12 +85,36 @@ func (r *TagRouteResource) ResourceMeta() metav1.ObjectMeta { func (r *TagRouteResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *TagRouteResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &TagRouteResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.TagRoute) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} -func NewTagRouteResource(name string, mesh string, apiVersion string) *TagRouteResource { +func NewTagRouteResourceWithAttributes(name string, mesh string) *TagRouteResource { return &TagRouteResource{ TypeMeta: metav1.TypeMeta{ Kind: string(TagRouteKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +123,12 @@ func NewTagRouteResource(name string, mesh string, apiVersion string) *TagRouteR Mesh: mesh, } } + +func NewTagRouteResource() coremodel.Resource { + return &TagRouteResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(TagRouteKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/system/v1alpha1/config_types.go b/pkg/core/resource/apis/system/v1alpha1/config_types.go index 2d6f2328e..029287553 100644 --- a/pkg/core/resource/apis/system/v1alpha1/config_types.go +++ b/pkg/core/resource/apis/system/v1alpha1/config_types.go @@ -21,10 +21,11 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +34,7 @@ import ( const ConfigKind coremodel.ResourceKind = "Config" func init() { - coremodel.RegisterResourceKind(ConfigKind) + coremodel.RegisterResourceSchema(ConfigKind, NewConfigResource) } type ConfigResource struct { @@ -83,12 +84,31 @@ func (r *ConfigResource) ResourceMeta() metav1.ObjectMeta { func (r *ConfigResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *ConfigResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &ConfigResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + out.Spec = proto.Clone(r.Spec).(*systemproto.Config) + } + + return out +} -func NewConfigResource(name string, mesh string, apiVersion string) *ConfigResource { +func NewConfigResourceWithAttributes(name string, mesh string) *ConfigResource { return &ConfigResource{ TypeMeta: metav1.TypeMeta{ Kind: string(ConfigKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +117,12 @@ func NewConfigResource(name string, mesh string, apiVersion string) *ConfigResou Mesh: mesh, } } + +func NewConfigResource() coremodel.Resource { + return &ConfigResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ConfigKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/system/v1alpha1/datasource_types.go b/pkg/core/resource/apis/system/v1alpha1/datasource_types.go index 5788de8b3..297340c83 100644 --- a/pkg/core/resource/apis/system/v1alpha1/datasource_types.go +++ b/pkg/core/resource/apis/system/v1alpha1/datasource_types.go @@ -21,10 +21,11 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +34,7 @@ import ( const DataSourceKind coremodel.ResourceKind = "DataSource" func init() { - coremodel.RegisterResourceKind(DataSourceKind) + coremodel.RegisterResourceSchema(DataSourceKind, NewDataSourceResource) } type DataSourceResource struct { @@ -83,12 +84,31 @@ func (r *DataSourceResource) ResourceMeta() metav1.ObjectMeta { func (r *DataSourceResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *DataSourceResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &DataSourceResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + out.Spec = proto.Clone(r.Spec).(*systemproto.DataSource) + } + + return out +} -func NewDataSourceResource(name string, mesh string, apiVersion string) *DataSourceResource { +func NewDataSourceResourceWithAttributes(name string, mesh string) *DataSourceResource { return &DataSourceResource{ TypeMeta: metav1.TypeMeta{ Kind: string(DataSourceKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +117,12 @@ func NewDataSourceResource(name string, mesh string, apiVersion string) *DataSou Mesh: mesh, } } + +func NewDataSourceResource() coremodel.Resource { + return &DataSourceResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(DataSourceKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/system/v1alpha1/secret_types.go b/pkg/core/resource/apis/system/v1alpha1/secret_types.go index fc356a8fb..568d7e105 100644 --- a/pkg/core/resource/apis/system/v1alpha1/secret_types.go +++ b/pkg/core/resource/apis/system/v1alpha1/secret_types.go @@ -21,10 +21,11 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +34,7 @@ import ( const SecretKind coremodel.ResourceKind = "Secret" func init() { - coremodel.RegisterResourceKind(SecretKind) + coremodel.RegisterResourceSchema(SecretKind, NewSecretResource) } type SecretResource struct { @@ -83,12 +84,31 @@ func (r *SecretResource) ResourceMeta() metav1.ObjectMeta { func (r *SecretResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *SecretResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &SecretResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + out.Spec = proto.Clone(r.Spec).(*systemproto.Secret) + } + + return out +} -func NewSecretResource(name string, mesh string, apiVersion string) *SecretResource { +func NewSecretResourceWithAttributes(name string, mesh string) *SecretResource { return &SecretResource{ TypeMeta: metav1.TypeMeta{ Kind: string(SecretKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +117,12 @@ func NewSecretResource(name string, mesh string, apiVersion string) *SecretResou Mesh: mesh, } } + +func NewSecretResource() coremodel.Resource { + return &SecretResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(SecretKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/system/v1alpha1/zone_types.go b/pkg/core/resource/apis/system/v1alpha1/zone_types.go index d57d38f93..ed44be0d4 100644 --- a/pkg/core/resource/apis/system/v1alpha1/zone_types.go +++ b/pkg/core/resource/apis/system/v1alpha1/zone_types.go @@ -21,10 +21,11 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +34,7 @@ import ( const ZoneKind coremodel.ResourceKind = "Zone" func init() { - coremodel.RegisterResourceKind(ZoneKind) + coremodel.RegisterResourceSchema(ZoneKind, NewZoneResource) } type ZoneResource struct { @@ -83,12 +84,31 @@ func (r *ZoneResource) ResourceMeta() metav1.ObjectMeta { func (r *ZoneResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *ZoneResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &ZoneResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + out.Spec = proto.Clone(r.Spec).(*systemproto.Zone) + } + + return out +} -func NewZoneResource(name string, mesh string, apiVersion string) *ZoneResource { +func NewZoneResourceWithAttributes(name string, mesh string) *ZoneResource { return &ZoneResource{ TypeMeta: metav1.TypeMeta{ Kind: string(ZoneKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +117,12 @@ func NewZoneResource(name string, mesh string, apiVersion string) *ZoneResource Mesh: mesh, } } + +func NewZoneResource() coremodel.Resource { + return &ZoneResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ZoneKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/system/v1alpha1/zoneinsight_types.go b/pkg/core/resource/apis/system/v1alpha1/zoneinsight_types.go index 6b21872a9..51c539308 100644 --- a/pkg/core/resource/apis/system/v1alpha1/zoneinsight_types.go +++ b/pkg/core/resource/apis/system/v1alpha1/zoneinsight_types.go @@ -21,10 +21,11 @@ package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) // +kubebuilder:object:root=true @@ -33,7 +34,7 @@ import ( const ZoneInsightKind coremodel.ResourceKind = "ZoneInsight" func init() { - coremodel.RegisterResourceKind(ZoneInsightKind) + coremodel.RegisterResourceSchema(ZoneInsightKind, NewZoneInsightResource) } type ZoneInsightResource struct { @@ -83,12 +84,31 @@ func (r *ZoneInsightResource) ResourceMeta() metav1.ObjectMeta { func (r *ZoneInsightResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *ZoneInsightResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &ZoneInsightResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + out.Spec = proto.Clone(r.Spec).(*systemproto.ZoneInsight) + } + + return out +} -func NewZoneInsightResource(name string, mesh string, apiVersion string) *ZoneInsightResource { +func NewZoneInsightResourceWithAttributes(name string, mesh string) *ZoneInsightResource { return &ZoneInsightResource{ TypeMeta: metav1.TypeMeta{ Kind: string(ZoneInsightKind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -97,3 +117,12 @@ func NewZoneInsightResource(name string, mesh string, apiVersion string) *ZoneIn Mesh: mesh, } } + +func NewZoneInsightResource() coremodel.Resource { + return &ZoneInsightResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ZoneInsightKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/model/registry.go b/pkg/core/resource/model/registry.go index 8ed401c29..bb651c29b 100644 --- a/pkg/core/resource/model/registry.go +++ b/pkg/core/resource/model/registry.go @@ -1,25 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package model -import ds "github.com/duke-git/lancet/v2/datastructure/set" +import ( + "fmt" + + "github.com/duke-git/lancet/v2/maputil" +) -var global = newRegistry() +var registry = newRegistry() -func ResourceKindRegistry() Registry { - return global +func ResourceSchemaRegistry() Registry { + return registry } -func RegisterResourceKind(kind ResourceKind) { - global.Register(kind) +func RegisterResourceSchema(kind ResourceKind, newFunc NewResourceFunc) { + registry.Register(kind, newFunc) } +type NewResourceFunc func() Resource + type Registry interface { - // AllResourceKinds returns all registered resource kinds + // AllResourceKinds returns all registered resource resourceDir AllResourceKinds() []ResourceKind + // NewResourceFunc returns the new resource function for a resource kind + NewResourceFunc(kind ResourceKind) (NewResourceFunc, error) } type RegistryMutator interface { // Register registers a resource kind, if a resource kind has been registered before, it will be ignored - Register(kind ResourceKind) + Register(kind ResourceKind, newFunc NewResourceFunc) } type MutableRegistry interface { @@ -27,22 +52,29 @@ type MutableRegistry interface { RegistryMutator } -var _ MutableRegistry = &resourceKindRegistry{} +var _ MutableRegistry = &resourceSchemaRegistry{} func newRegistry() MutableRegistry { - return &resourceKindRegistry{ - kinds: ds.New[ResourceKind](), + return &resourceSchemaRegistry{ + resourceDir: make(map[ResourceKind]NewResourceFunc), } } -type resourceKindRegistry struct { - kinds ds.Set[ResourceKind] +type resourceSchemaRegistry struct { + resourceDir map[ResourceKind]NewResourceFunc } -func (r *resourceKindRegistry) AllResourceKinds() []ResourceKind { - return r.kinds.ToSlice() +func (r *resourceSchemaRegistry) AllResourceKinds() []ResourceKind { + return maputil.Keys(r.resourceDir) } -func (r *resourceKindRegistry) Register(kind ResourceKind) { - r.kinds.Add(kind) +func (r *resourceSchemaRegistry) Register(kind ResourceKind, newFunc NewResourceFunc) { + r.resourceDir[kind] = newFunc +} + +func (r *resourceSchemaRegistry) NewResourceFunc(kind ResourceKind) (NewResourceFunc, error) { + if newFunc, exists := r.resourceDir[kind]; exists { + return newFunc, nil + } + return nil, fmt.Errorf("there is no new resource func for %s", kind) } diff --git a/pkg/core/resource/model/resource.go b/pkg/core/resource/model/resource.go index 8b47d7cde..c4b538df4 100644 --- a/pkg/core/resource/model/resource.go +++ b/pkg/core/resource/model/resource.go @@ -22,6 +22,7 @@ import ( "reflect" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) const ( @@ -53,6 +54,7 @@ func (rk ResourceKind) ToString() string { } type Resource interface { + k8sruntime.Object // ResourceKind returns the resource type, e.g. Application, Service etc. ResourceKind() ResourceKind // ResourceKey returns the unique resource key diff --git a/pkg/core/runtime/component.go b/pkg/core/runtime/component.go index 29f3ece39..88dcd3fe7 100644 --- a/pkg/core/runtime/component.go +++ b/pkg/core/runtime/component.go @@ -25,6 +25,7 @@ const ( ResourceStore ComponentType = "resource store" ResourceEngine ComponentType = "resource engine" ResourceDiscovery ComponentType = "resource discovery" + EventBus ComponentType = "event bus" ) var CoreComponentTypes = []ComponentType{Console, ResourceManager, ResourceStore, ResourceEngine, ResourceDiscovery} diff --git a/pkg/core/runtime/registry.go b/pkg/core/runtime/registry.go index 28e2196f3..d79ebae31 100644 --- a/pkg/core/runtime/registry.go +++ b/pkg/core/runtime/registry.go @@ -35,6 +35,7 @@ func RegisterComponent(component Component) { type Registry interface { Get(typ ComponentType) (Component, error) + EventBus() (Component, error) Console() (Component, error) ResourceStore() (Component, error) ResourceManager() (Component, error) @@ -63,6 +64,10 @@ type componentRegistry struct { directory map[ComponentType]Component } +func (r *componentRegistry) EventBus() (Component, error) { + return r.Get(EventBus) +} + func (r *componentRegistry) Console() (Component, error) { return r.Get(Console) } diff --git a/pkg/core/store/component.go b/pkg/core/store/component.go index 7bbfdff1e..13584127c 100644 --- a/pkg/core/store/component.go +++ b/pkg/core/store/component.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package store import ( @@ -43,7 +60,7 @@ func (sc *storeComponent) Init(ctx runtime.BuilderContext) error { return err } // 2. create store for each resource kind - for _, kind := range coremodel.ResourceKindRegistry().AllResourceKinds() { + for _, kind := range coremodel.ResourceSchemaRegistry().AllResourceKinds() { store, err := factory.New(kind, cfg) if err != nil { return err @@ -76,10 +93,7 @@ func (sc *storeComponent) Start(rt runtime.Runtime, ch <-chan struct{}) error { } func (sc *storeComponent) ResourceRoute(r coremodel.Resource) (ResourceStore, error) { - if store, exists := sc.stores[r.ResourceKind()]; exists { - return store, nil - } - return nil, fmt.Errorf("%s is not supported by store yet", r.ResourceKind()) + return sc.ResourceKindRoute(r.ResourceKind()) } func (sc *storeComponent) ResourceKindRoute(k coremodel.ResourceKind) (ResourceStore, error) { diff --git a/pkg/core/store/factory.go b/pkg/core/store/factory.go index 7e5aaad65..09202b23a 100644 --- a/pkg/core/store/factory.go +++ b/pkg/core/store/factory.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package store import ( @@ -30,7 +47,7 @@ type Registry interface { } type RegistryMutator interface { - // RegisterFactory registers a resource store type and a func to new it + // Register registers a new factory Register(Factory) } type MutableRegistry interface { diff --git a/pkg/core/store/indexer.go b/pkg/core/store/index.go similarity index 62% rename from pkg/core/store/indexer.go rename to pkg/core/store/index.go index 4aeb65fe4..e0b1ffd2b 100644 --- a/pkg/core/store/indexer.go +++ b/pkg/core/store/index.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package store import ( diff --git a/tools/resourcegen/main.go b/tools/resourcegen/main.go index 25915da37..23c193b1a 100644 --- a/tools/resourcegen/main.go +++ b/tools/resourcegen/main.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package main import ( @@ -49,10 +66,12 @@ var resourceTemplate = template.Must(template.New("dubbo-resource").Parse(` package v1alpha1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - {{ $pkg }} "github.com/apache/dubbo-admin/api/{{ .Package }}/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" ) {{range .Resources}} @@ -70,7 +89,7 @@ import ( const {{.ResourceType}}Kind coremodel.ResourceKind = "{{.ResourceType}}" func init() { - coremodel.RegisterResourceKind({{.ResourceType}}Kind) + coremodel.RegisterResourceSchema({{.ResourceType}}Kind, New{{.ResourceType}}Resource) } type {{.ResourceType}}Resource struct { @@ -131,12 +150,36 @@ func (r *{{.ResourceType}}Resource) ResourceMeta() metav1.ObjectMeta { func (r *{{.ResourceType}}Resource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } +func (r *{{.ResourceType}}Resource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &{{.ResourceType}}Resource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*{{ $pkg }}.{{.ResourceType}}) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} -func New{{.ResourceType}}Resource(name string, mesh string, apiVersion string) *{{.ResourceType}}Resource{ +func New{{.ResourceType}}ResourceWithAttributes(name string, mesh string) *{{.ResourceType}}Resource{ return &{{.ResourceType}}Resource{ TypeMeta: metav1.TypeMeta{ Kind: string({{.ResourceType}}Kind), - APIVersion: apiVersion, + APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -146,6 +189,16 @@ func New{{.ResourceType}}Resource(name string, mesh string, apiVersion string) * } } +func New{{.ResourceType}}Resource() coremodel.Resource { + return &{{.ResourceType}}Resource{ + TypeMeta: metav1.TypeMeta{ + Kind: string({{.ResourceType}}Kind), + APIVersion: "v1alpha1", + }, + } +} + + {{- end }} {{/* Resources */}} `)) From 0b13d901e59307c9c5f5034dc5e62e4eda37a691 Mon Sep 17 00:00:00 2001 From: robb Date: Sat, 6 Sep 2025 16:07:03 +0800 Subject: [PATCH 02/40] fix: ci problem; directory and dependency tidy (#1320) * fix: ci probelm; diretory and dependency tidy * fix: lack license header * rm: remove redundant file --- .github/PULL_REQUEST_TEMPLATE.md | 5 +- .github/workflows/ci.yml | 4 +- CONTRIBUTING.md | 2 +- DISCLAIMER | 1 - Makefile | 4 +- README.md | 10 +- {hack => docs}/swagger/README.md | 0 {hack => docs}/swagger/swagger.json | 0 go.mod | 162 +----- go.sum | 445 --------------- hack/boilerplate.go.txt | 14 - pkg/common/log/logger.go | 1 - pkg/common/util/envoy/raw.go | 55 -- pkg/common/validators/messages.go | 118 ++-- pkg/common/validators/types.go | 428 +++++++-------- pkg/config/schema/gvk/resources.gen.go | 86 --- pkg/config/schema/gvr/resource.gen.go | 20 - pkg/console/context/context.go | 25 +- pkg/console/model/application.go | 2 +- pkg/console/service/application.go | 3 - pkg/core/manager/component.go | 17 + pkg/core/resource/model/page.go | 17 + pkg/core/store/options.go | 508 ------------------ pkg/diagnostics/server.go | 4 - pkg/store/db/mysql.go | 17 + pkg/store/memory/memory.go | 17 + .../main.go => scripts/resourcegen/gen.go | 12 +- .../util => scripts/resourcegen}/util.go | 19 +- 28 files changed, 401 insertions(+), 1595 deletions(-) delete mode 100644 DISCLAIMER rename {hack => docs}/swagger/README.md (100%) rename {hack => docs}/swagger/swagger.json (100%) delete mode 100644 hack/boilerplate.go.txt delete mode 100644 pkg/common/util/envoy/raw.go delete mode 100644 pkg/config/schema/gvk/resources.gen.go delete mode 100644 pkg/config/schema/gvr/resource.gen.go delete mode 100644 pkg/core/store/options.go rename tools/resourcegen/main.go => scripts/resourcegen/gen.go (96%) rename {tools/resourcegen/util => scripts/resourcegen}/util.go (84%) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d28ce592e..a63ffe385 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,6 @@ **Please provide a description of this PR:** + **To help us figure out who should review this PR, please put an X in all the areas that this PR affects.** - [ ] Docs @@ -7,6 +8,8 @@ - [ ] User Experience - [ ] Dubboctl - [ ] Console -- +- [ ] Core Component + + **Please check any characteristics that apply to this pull request.** diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a4c10aa6..f8f4af5b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,10 @@ name: Continues Integration on: push: branches: - - master + - develop pull_request: branches: - - master + - develop jobs: unit-test: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b138c44e3..d66c819ee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,4 +14,4 @@ The mailing list is the recommended way of pursuing a discussion on almost anyth ## Reporting issue -Please create an issue [here](https://github.com/apache/dubbo-kubernetes) \ No newline at end of file +Please create an issue [here](https://github.com/apache/dubbo-admin) \ No newline at end of file diff --git a/DISCLAIMER b/DISCLAIMER deleted file mode 100644 index e69787d3b..000000000 --- a/DISCLAIMER +++ /dev/null @@ -1 +0,0 @@ -Apache Dubbo Admin is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. diff --git a/Makefile b/Makefile index 0086a92e6..63c2127e5 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ SHELL := /usr/bin/env bash .PHONY: build-dubbo-admin -build-dubbo-cp: +build-dubbo-admin: CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build \ -ldflags "-X github.com/apache/dubbo-admin/pkg/version.gitTag=$(GIT_VERSION)" \ - -o bin/dubbo-cp app/dubbo-main/main.go && cp app/dubbo-admin/dubbo-admin.yaml bin/ \ No newline at end of file + -o bin/dubbo-admin app/dubbo-main/main.go && cp app/dubbo-admin/dubbo-admin.yaml bin/ \ No newline at end of file diff --git a/README.md b/README.md index 3b7ed2de3..236414659 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ Dubbo Admin -[![Build](https://github.com/apache/dubbo-kubernetes/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/dubbo-kubernetes/actions/workflows/ci.yml) -[![codecov](https://codecov.io/gh/apache/dubbo-kubernetes/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/dubbo-kubernetes) +[![Build](https://github.com/apache/dubbo-admin/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/dubbo-admin/actions/workflows/ci.yml/badge.svg) +[![codecov](https://codecov.io/gh/apache/dubbo-admin/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/dubbo-admin) ![license](https://img.shields.io/badge/license-Apache--2.0-green.svg) -Dubbo Admin is the console designed for better visualization of Dubbo services. +Dubbo Admin is the console designed for better visualization of Dubbo applications. ## Repositories The main code repositories of Dubbo Admin include: @@ -33,7 +33,7 @@ Please refer to [RoadMap](https://github.com/apache/dubbo-admin/discussions/1300 - [docs/server-develop](https://github.com/apache/dubbo-admin/docs/server-develop/README.md) for more detail ### Other Information -Refer to [CONTRIBUTING.md](https://github.com/apache/dubbo-kubernetes/blob/master/CONTRIBUTING.md) +Refer to [CONTRIBUTING.md](https://github.com/apache/dubbo-admin/blob/develop/CONTRIBUTING.md) ## License -Apache License 2.0, see [LICENSE](https://github.com/apache/dubbo-kubernetes/blob/master/LICENSE). \ No newline at end of file +Apache License 2.0, see [LICENSE](https://github.com/apache/dubbo-admin/blob/develop/LICENSE). \ No newline at end of file diff --git a/hack/swagger/README.md b/docs/swagger/README.md similarity index 100% rename from hack/swagger/README.md rename to docs/swagger/README.md diff --git a/hack/swagger/swagger.json b/docs/swagger/swagger.json similarity index 100% rename from hack/swagger/swagger.json rename to docs/swagger/swagger.json diff --git a/go.mod b/go.mod index 4d300bc63..8a40b1e07 100644 --- a/go.mod +++ b/go.mod @@ -19,266 +19,114 @@ go 1.23.0 require ( dubbo.apache.org/dubbo-go/v3 v3.3.0 - github.com/AlecAivazis/survey/v2 v2.3.7 github.com/Masterminds/semver/v3 v3.2.1 - github.com/Microsoft/go-winio v0.6.2 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 github.com/bakito/go-log-logr-adapter v0.0.2 - github.com/buildpacks/pack v0.30.0 - github.com/cheggaaa/pb/v3 v3.1.5 - github.com/containers/image/v5 v5.34.0 - github.com/containers/storage v1.57.1 - github.com/docker/cli v27.5.1+incompatible - github.com/docker/docker v27.5.1+incompatible - github.com/docker/docker-credential-helpers v0.8.2 - github.com/docker/go-connections v0.5.0 github.com/dubbogo/gost v1.14.0 github.com/duke-git/lancet/v2 v2.3.6 github.com/emicklei/go-restful/v3 v3.11.0 github.com/envoyproxy/go-control-plane v0.13.4 github.com/envoyproxy/go-control-plane/envoy v1.32.4 - github.com/fatih/color v1.18.0 github.com/fullstorydev/grpcurl v1.9.1 github.com/gin-contrib/sessions v1.0.4 github.com/gin-gonic/gin v1.10.1 - github.com/go-git/go-billy/v5 v5.6.2 - github.com/go-git/go-git/v5 v5.13.1 github.com/go-logr/logr v1.4.2 github.com/go-logr/zapr v1.3.0 github.com/goburrow/cache v0.1.4 github.com/golang/protobuf v1.5.4 github.com/google/go-cmp v0.7.0 - github.com/google/go-containerregistry v0.20.2 github.com/google/uuid v1.6.0 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 - github.com/hashicorp/go-multierror v1.1.1 - github.com/heroku/color v0.0.6 github.com/hoisie/mustache v0.0.0-20160804235033-6375acf62c69 github.com/jhump/protoreflect v1.16.0 github.com/kelseyhightower/envconfig v1.4.0 github.com/mitchellh/mapstructure v1.5.0 - github.com/moby/term v0.5.0 github.com/onsi/ginkgo/v2 v2.22.1 github.com/onsi/gomega v1.36.2 - github.com/ory/viper v1.7.5 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.5 github.com/slok/go-http-metrics v0.11.0 github.com/spf13/cobra v1.8.1 - github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.10.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.37.0 golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 golang.org/x/sys v0.32.0 - golang.org/x/term v0.31.0 golang.org/x/text v0.24.0 google.golang.org/grpc v1.73.0 google.golang.org/protobuf v1.36.6 gopkg.in/natefinch/lumberjack.v2 v2.2.1 - gopkg.in/yaml.v3 v3.0.1 - helm.sh/helm/v3 v3.12.3 - k8s.io/api v0.32.0 - k8s.io/apiextensions-apiserver v0.32.0 k8s.io/apimachinery v0.32.0 k8s.io/client-go v0.32.0 - k8s.io/kubectl v0.27.3 + k8s.io/klog/v2 v2.130.1 sigs.k8s.io/controller-runtime v0.19.4 - sigs.k8s.io/controller-tools v0.17.0 sigs.k8s.io/yaml v1.4.0 ) require ( cel.dev/expr v0.23.0 // indirect - dario.cat/mergo v1.0.1 // indirect - github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect - github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.29 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect - github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 // indirect - github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/BurntSushi/toml v1.4.0 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver v1.5.0 // indirect - github.com/Masterminds/sprig/v3 v3.2.3 // indirect - github.com/ProtonMail/go-crypto v1.1.3 // indirect - github.com/VividCortex/ewma v1.2.0 // indirect - github.com/agext/levenshtein v1.2.3 // indirect - github.com/apex/log v1.9.0 // indirect - github.com/aws/aws-sdk-go-v2 v1.18.1 // indirect - github.com/aws/aws-sdk-go-v2/config v1.18.27 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.26 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.35 // indirect - github.com/aws/aws-sdk-go-v2/service/ecr v1.18.11 // indirect - github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.12.12 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.12 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.19.2 // indirect - github.com/aws/smithy-go v1.13.5 // indirect - github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230522190001-adf1bafd791a // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/blang/semver/v4 v4.0.0 // indirect github.com/bufbuild/protocompile v0.10.0 // indirect - github.com/buildpacks/imgutil v0.0.0-20230626185301-726f02e4225c // indirect - github.com/buildpacks/lifecycle v0.17.0 // indirect github.com/bytedance/sonic v1.13.2 // indirect github.com/bytedance/sonic/loader v0.2.4 // indirect - github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect - github.com/cloudflare/circl v1.3.7 // indirect github.com/cloudwego/base64x v0.1.5 // indirect github.com/cncf/xds/go v0.0.0-20250326154945-ae57f3c0d45f // indirect - github.com/containerd/containerd v1.7.2 // indirect - github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect - github.com/containerd/typeurl v1.0.2 // indirect - github.com/cyphar/filepath-securejoin v0.3.6 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/dgraph-io/ristretto v0.0.1 // indirect - github.com/dimchansky/utfbom v1.1.1 // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/go-units v0.5.0 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/emirpasic/gods v1.18.1 // indirect github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.8 // indirect - github.com/gdamore/encoding v1.0.0 // indirect - github.com/gdamore/tcell/v2 v2.6.0 // indirect github.com/gin-contrib/sse v1.0.0 // indirect - github.com/go-errors/errors v1.4.2 // indirect - github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-jose/go-jose/v4 v4.0.5 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect - github.com/go-openapi/swag v0.23.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.26.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect - github.com/gobuffalo/flect v1.0.3 // indirect - github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.5 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/google/btree v1.0.1 // indirect github.com/google/gnostic-models v0.6.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/context v1.1.2 // indirect github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/sessions v1.4.0 // indirect - github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/huandu/xstrings v1.4.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.18.0 // indirect github.com/klauspost/cpuid/v2 v2.2.10 // indirect - github.com/klauspost/pgzip v1.2.6 // indirect github.com/leodido/go-urn v1.4.0 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.16 // indirect - github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/moby/buildkit v0.11.6 // indirect - github.com/moby/patternmatcher v0.5.0 // indirect - github.com/moby/sys/capability v0.4.0 // indirect - github.com/moby/sys/mountinfo v0.7.2 // indirect - github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/sys/user v0.3.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect - github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/opencontainers/runc v1.1.7 // indirect - github.com/opencontainers/runtime-spec v1.2.0 // indirect - github.com/opencontainers/selinux v1.11.1 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect - github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.57.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8 // indirect - github.com/rivo/uniseg v0.4.7 // indirect - github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect - github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect - github.com/shopspring/decimal v1.3.1 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/skeema/knownhosts v1.3.0 // indirect - github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect - github.com/subosito/gotenv v1.6.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect - github.com/ulikunitz/xz v0.5.12 // indirect - github.com/vbatts/tar-split v0.11.7 // indirect github.com/x448/float16 v0.8.4 // indirect - github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect - github.com/xlab/treeprint v1.2.0 // indirect github.com/zeebo/errs v1.4.0 // indirect - go.opentelemetry.io/otel v1.35.0 // indirect - go.opentelemetry.io/otel/trace v1.35.0 // indirect golang.org/x/arch v0.16.0 // indirect - golang.org/x/mod v0.22.0 // indirect + golang.org/x/crypto v0.37.0 // indirect golang.org/x/net v0.38.0 // indirect golang.org/x/oauth2 v0.28.0 // indirect golang.org/x/sync v0.13.0 // indirect + golang.org/x/term v0.31.0 // indirect golang.org/x/time v0.7.0 // indirect golang.org/x/tools v0.28.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/cli-runtime v0.32.0 // indirect - k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect - sigs.k8s.io/kustomize/api v0.18.0 // indirect - sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect ) diff --git a/go.sum b/go.sum index 57a3b22a1..2b456b47c 100644 --- a/go.sum +++ b/go.sum @@ -33,137 +33,26 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= -dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dubbo.apache.org/dubbo-go/v3 v3.3.0 h1:jhwK4nQ1DsKQ6H9p7icZx0jg9ulF1vpAA/c0Ly8Et4w= dubbo.apache.org/dubbo-go/v3 v3.3.0/go.mod h1:zu2m9tUGaZYfuaMX82pLlwmq7Vl4s5eenZNBGdfAagc= -github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= -github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= -github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= -github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.24/go.mod h1:G6kyRlFnTuSbEYkQGawPfsCswgme4iYf6rfSKUDzbCc= -github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= -github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= -github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= -github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 h1:wkAZRgT/pn8HhFyzfe9UnqOjJYqlembgCTi72Bm/xKk= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.12/go.mod h1:84w/uV8E37feW2NCJ08uT9VBfjfUHpgLVnG2InYD6cg= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.5/go.mod h1:ADQAXrkgm7acgWVUNamOgh8YNrv4p27l3Wc55oVfpzg= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 h1:w77/uPk80ZET2F+AfQExZyEWtn+0Rk/uw17m9fv5Ajc= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.6/go.mod h1:piCfgPho7BiIDdEQ1+g4VmKyD5y+p/XtSNqE6Hc4QD0= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= -github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= -github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/Microsoft/hcsshim v0.12.9 h1:2zJy5KA+l0loz1HzEGqyNnjd3fyZA31ZBCGKacp6lLg= -github.com/Microsoft/hcsshim v0.12.9/go.mod h1:fJ0gkFAna6ukt0bLdKB8djt4XIJhF/vEPuoIWYVvZ8Y= -github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= -github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= -github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= -github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= -github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= -github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= -github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704/go.mod h1:RcDobYh8k5VP6TNybz9m++gL3ijVI5wueVr0EM10VsU= -github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= -github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/dubbo-kubernetes v0.1.4 h1:IL7JVyv4RuGsXC9/aaSkJkf+sRt6k7lHWTYbbdHQ6DU= -github.com/apache/dubbo-kubernetes v0.1.4/go.mod h1:tsb03OXdfHDJrQLcqrvgbMMUMWGw07skKoUjRv+ssHg= -github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0= -github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA= -github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= -github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= -github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2 v1.18.1 h1:+tefE750oAb7ZQGzla6bLkOwfcQCEtC5y2RqoqCeqKo= -github.com/aws/aws-sdk-go-v2 v1.18.1/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2/config v1.18.22/go.mod h1:mN7Li1wxaPxSSy4Xkr6stFuinJGf3VZW3ZSNvO0q6sI= -github.com/aws/aws-sdk-go-v2/config v1.18.27 h1:Az9uLwmssTE6OGTpsFqOnaGpLnKDqNYOJzWuC6UAYzA= -github.com/aws/aws-sdk-go-v2/config v1.18.27/go.mod h1:0My+YgmkGxeqjXZb5BYme5pc4drjTnM+x1GJ3zv42Nw= -github.com/aws/aws-sdk-go-v2/credentials v1.13.21/go.mod h1:90Dk1lJoMyspa/EDUrldTxsPns0wn6+KpRKpdAWc0uA= -github.com/aws/aws-sdk-go-v2/credentials v1.13.26 h1:qmU+yhKmOCyujmuPY7tf5MxR/RKyZrOPO3V4DobiTUk= -github.com/aws/aws-sdk-go-v2/credentials v1.13.26/go.mod h1:GoXt2YC8jHUBbA4jr+W3JiemnIbkXOfxSXcisUsZ3os= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.4 h1:LxK/bitrAr4lnh9LnIS6i7zWbCOdMsfzKFBI6LUCS0I= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.4/go.mod h1:E1hLXN/BL2e6YizK1zFlYd8vsfi2GTjbjBazinMmeaM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34 h1:A5UqQEmPaCFpedKouS4v+dHCTUo2sKqhoKO9U5kxyWo= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34/go.mod h1:wZpTEecJe0Btj3IYnDx/VlUzor9wm3fJHyvLpQF0VwY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28 h1:srIVS45eQuewqz6fKKu6ZGXaq6FuFg5NzgQBAM6g8Y4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28/go.mod h1:7VRpKQQedkfIEXb4k52I7swUnZP0wohVajJMRn3vsUw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.35 h1:LWA+3kDM8ly001vJ1X1waCuLJdtTl48gwkPKWy9sosI= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.35/go.mod h1:0Eg1YjxE0Bhn56lx+SHJwCzhW+2JGtizsrx+lCqrfm0= -github.com/aws/aws-sdk-go-v2/service/ecr v1.18.10/go.mod h1:Ce1q2jlNm8BVpjLaOnwnm5v2RClAbK6txwPljFzyW6c= -github.com/aws/aws-sdk-go-v2/service/ecr v1.18.11 h1:wlTgmb/sCmVRJrN5De3CiHj4v/bTCgL5+qpdEd0CPtw= -github.com/aws/aws-sdk-go-v2/service/ecr v1.18.11/go.mod h1:Ce1q2jlNm8BVpjLaOnwnm5v2RClAbK6txwPljFzyW6c= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.1/go.mod h1:uHtRE7aqXNmpeYL+7Ec7LacH5zC9+w2T5MBOeEKDdu0= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.2 h1:yflJrGmi1pXtP9lOpOeaNZyc0vXnJTuP2sor3nJcGGo= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.16.2/go.mod h1:uHtRE7aqXNmpeYL+7Ec7LacH5zC9+w2T5MBOeEKDdu0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28 h1:bkRyG4a929RCnpVSTvLM2j/T4ls015ZhhYApbmYs15s= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28/go.mod h1:jj7znCIg05jXlaGBlFMGP8+7UN3VtCkRBG2spnmRQkU= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.9/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.12 h1:nneMBM2p79PGWBQovYO/6Xnc2ryRMw3InnDJq1FHkSY= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.12/go.mod h1:HuCOxYsF21eKrerARYO6HapNeh9GBNq7fius2AcwodY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.9/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.12 h1:2qTR7IFk7/0IN/adSFhYu9Xthr0zVFTgBrmPldILn80= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.12/go.mod h1:E4VrHCPzmVB/KFXtqBGKb3c8zpbNBgKe3fisDNLAW5w= -github.com/aws/aws-sdk-go-v2/service/sts v1.18.10/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.2 h1:XFJ2Z6sNUUcAz9poj+245DMkrHE4h2j5I9/xD50RHfE= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.2/go.mod h1:dp0yLPsLBOi++WTxzCjA/oZqi6NPIhoR+uF7GeMU9eg= -github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= -github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230522190001-adf1bafd791a h1:rW+dV12c0WD3+O4Zs8Qt4+oqnr8ecXeyg8g3yB73ZKA= -github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230522190001-adf1bafd791a/go.mod h1:1mvdZLjy932pV2fhj1jjwUSHaF5Ogq2gk5bvi/6ngEU= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/bakito/go-log-logr-adapter v0.0.2 h1:epK+VaMPkK7dK+Vs78xo0BABqN1lIXD3IXX1VUj4PcM= github.com/bakito/go-log-logr-adapter v0.0.2/go.mod h1:B2tvB31L1Sxpkfhpj13QkJEisDNNKcC9FoYU8KL87AA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -173,17 +62,9 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bufbuild/protocompile v0.10.0 h1:+jW/wnLMLxaCEG8AX9lD0bQ5v9h1RUiMKOBOT5ll9dM= github.com/bufbuild/protocompile v0.10.0/go.mod h1:G9qQIQo0xZ6Uyj6CMNz0saGmx2so+KONo8/KrELABiY= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/buildpacks/imgutil v0.0.0-20230626185301-726f02e4225c h1:HlRuSz+JGAzudNtNCfHIzXe0AEuHX6Vx8uZgmjvX02o= -github.com/buildpacks/imgutil v0.0.0-20230626185301-726f02e4225c/go.mod h1:mBG5M3GJW5nknCEOOqtmMHyPYnSpw/5GEiciuYU/COw= -github.com/buildpacks/lifecycle v0.17.0 h1:vX/kpQfuh4LZvsIhi1wNkx/zahvwiF72bgc46rQ+3z0= -github.com/buildpacks/lifecycle v0.17.0/go.mod h1:WFzcNp1WG4bwgHuXtKxMg4tdU3AguL44ZlP3knANeVs= -github.com/buildpacks/pack v0.30.0 h1:1beK8QAp7By4K40QigYl9JG/Os4nA93dQxYR/GMMbTo= -github.com/buildpacks/pack v0.30.0/go.mod h1:ZtkyUJKcTdWgEDFi0KOmtHQAOkeQeOeJ2wre1+0ipnA= github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ= github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= @@ -191,22 +72,15 @@ github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCN github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheggaaa/pb/v3 v3.1.5 h1:QuuUzeM2WsAqG2gMqtzaWithDJv0i+i6UlnwSCI4QLk= -github.com/cheggaaa/pb/v3 v3.1.5/go.mod h1:CrxkeghYTXi1lQBEI7jSn+3svI3cuc19haAj6jM60XI= -github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 h1:krfRl01rzPzxSxyLyrChD+U+MzsBXbm0OwYYB67uF+4= -github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589/go.mod h1:OuDyvmLnMCwa2ep4Jkm6nyA0ocJuZlGyk2gGseVzERM= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= -github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= @@ -221,18 +95,6 @@ github.com/cncf/xds/go v0.0.0-20250326154945-ae57f3c0d45f/go.mod h1:W+zGtBO5Y1Ig github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo= -github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI= -github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU= -github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= -github.com/containerd/stargz-snapshotter/estargz v0.16.3 h1:7evrXtoh1mSbGj/pfRccTampEyKpjpOnS3CyiV1Ebr8= -github.com/containerd/stargz-snapshotter/estargz v0.16.3/go.mod h1:uyr4BfYfOj3G9WBVE8cOlQmXAbPN9VEQpBBeJIuOipU= -github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/containers/image/v5 v5.34.0 h1:HPqQaDUsox/3mC1pbOyLAIQEp0JhQqiUZ+6JiFIZLDI= -github.com/containers/image/v5 v5.34.0/go.mod h1:/WnvUSEfdqC/ahMRd4YJDBLrpYWkGl018rB77iB3FDo= -github.com/containers/storage v1.57.1 h1:hKPoFsuBcB3qTzBxa4IFpZMRzUuL5Xhv/BE44W0XHx8= -github.com/containers/storage v1.57.1/go.mod h1:i/Hb4lu7YgFr9G0K6BMjqW0BLJO1sFsnWQwj2UoWCUM= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -243,55 +105,20 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.3.6 h1:4d9N5ykBnSp5Xn2JkhocYDkOpURL/18CYMpo6xB9uWM= -github.com/cyphar/filepath-securejoin v0.3.6/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgraph-io/ristretto v0.0.1 h1:cJwdnj42uV8Jg4+KLrYovLiCgIfz9wtWm6E6KA+1tLs= -github.com/dgraph-io/ristretto v0.0.1/go.mod h1:T40EBc7CJke8TkpiYfGGKAeFjSaxuFXhuXRyumBd6RE= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= -github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v23.0.1+incompatible h1:LRyWITpGzl2C9e9uGxzisptnxAn1zfZKXy13Ul2Q5oM= -github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= -github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= -github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= -github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= -github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= -github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c= github.com/dubbogo/gost v1.14.0 h1:yc5YfozvUBAChAox8H7CkmHb6/TvF6cKdqZNJNv2jdE= github.com/dubbogo/gost v1.14.0/go.mod h1:YP28JweR+hhJdikP3bZ3bVKUWWI313xX1rgLaEE0FvQ= github.com/duke-git/lancet/v2 v2.3.6 h1:NKxSSh+dlgp37funvxLCf3xLBeUYa7VW1thYQP6j3Y8= github.com/duke-git/lancet/v2 v2.3.6/go.mod h1:zGa2R4xswg6EG9I6WnyubDbFO/+A/RROxIbXcwryTsc= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/elazarl/goproxy v1.2.3 h1:xwIyKHbaP5yfT6O9KIeYJR5549MXRQkoQMRXGztz8YQ= -github.com/elazarl/goproxy v1.2.3/go.mod h1:YfEbZtqP4AetfO6d40vWchF3znWX7C7Vd6ZMfdL8z64= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= -github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -307,26 +134,14 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= -github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fullstorydev/grpcurl v1.9.1 h1:YxX1aCcCc4SDBQfj9uoWcTLe8t4NWrZe1y+mk83BQgo= github.com/fullstorydev/grpcurl v1.9.1/go.mod h1:i8gKLIC6s93WdU3LSmkE5vtsCxyRmihUj5FK1cNW5EM= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM= github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8= -github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= -github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= -github.com/gdamore/tcell/v2 v2.4.1-0.20210905002822-f057f0a857a1/go.mod h1:Az6Jt+M5idSED2YPGtwnfJV0kXohgdCBPmHGSYc1r04= -github.com/gdamore/tcell/v2 v2.6.0 h1:OKbluoP9VYmJwZwq/iLb4BxwKcwGthaa1YNBJIyCySg= -github.com/gdamore/tcell/v2 v2.6.0/go.mod h1:be9omFATkdr0D9qewWW3d+MEvl5dha+Etb5y65J2H8Y= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sessions v1.0.4 h1:ha6CNdpYiTOK/hTp05miJLbpTSNfOnFg5Jm2kbcqy8U= @@ -335,18 +150,6 @@ github.com/gin-contrib/sse v1.0.0 h1:y3bT1mUWUxDpW4JLQg/HnTqV4rozuW4tC9eFKTxYI9E github.com/gin-contrib/sse v1.0.0/go.mod h1:zNuFdwarAygJBht0NTKiSi3jRf6RbqeILZ9Sp6Slhe0= github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= -github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= -github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= -github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= -github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= -github.com/go-git/go-git/v5 v5.13.1 h1:DAQ9APonnlvSWpvolXWIuV6Q6zXy2wHbN4cVlNR5Q+M= -github.com/go-git/go-git/v5 v5.13.1/go.mod h1:qryJB4cSBoq3FRoBRf5A77joojuBcmPJ0qu3XXXVixc= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -382,12 +185,8 @@ github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAu github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4= -github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/goburrow/cache v0.1.4 h1:As4KzO3hgmzPlnaMniZU9+VmoNYseUhuELbxy9mRBfw= github.com/goburrow/cache v0.1.4/go.mod h1:cDFesZDnIlrHoNlMYqqMpCRawuXulgx+y7mXU8HZ+/c= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -397,17 +196,11 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -415,7 +208,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -437,8 +229,6 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -452,12 +242,9 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-containerregistry v0.20.2 h1:B1wPJ1SN/S7pB+ZAimcciVD+r+yV/l/DSArMxlbwseo= -github.com/google/go-containerregistry v0.20.2/go.mod h1:z38EKdKh4h7IP2gSfUUqEvalZBqs6AoLeWfUy34nQC8= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -473,9 +260,6 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -484,15 +268,11 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.2 h1:WRkNAv2uoa03QNIc1A6u4O7DAGMUVoopZhkiXWA2V1o= github.com/gorilla/context v1.1.2/go.mod h1:KDPwT9i/MeWHiLl90fuTgrt4/wPcv75vFAZLaOOcbxM= -github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= -github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA= github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= github.com/gorilla/sessions v1.4.0 h1:kpIYOp/oi6MG/p5PgxApU8srsSw9tuFbt46Lt7auzqQ= github.com/gorilla/sessions v1.4.0/go.mod h1:FLWm50oby91+hl7p/wRxDth9bWSuk0qVL2emc7lT5ik= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= @@ -504,14 +284,10 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= @@ -520,43 +296,24 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/heroku/color v0.0.6 h1:UTFFMrmMLFcL3OweqP1lAdp8i1y/9oHqkeHjQ/b/Ny0= -github.com/heroku/color v0.0.6/go.mod h1:ZBvOcx7cTF2QKOv4LbmoBtNl5uB17qWxGuzZrsi1wLU= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hoisie/mustache v0.0.0-20160804235033-6375acf62c69 h1:umaj0TCQ9lWUUKy2DxAhEzPbwd0jnxiw1EI2z3FiILM= github.com/hoisie/mustache v0.0.0-20160804235033-6375acf62c69/go.mod h1:zdLK9ilQRSMjSeLKoZ4BqUfBT7jswTGF8zRlKEsiRXA= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= -github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jhump/protoreflect v1.16.0 h1:54fZg+49widqXYQ0b+usAFHbMkBGR4PpXrsHc8+TBDg= github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -572,12 +329,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= -github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -587,14 +340,11 @@ github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYW github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= -github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -604,67 +354,27 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= -github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= -github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e h1:Qa6dnn8DlasdXRnacluu8HzPts0S1I9zvvUPDbBnXFI= -github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e/go.mod h1:waEya8ee1Ro/lgxpVhkJI4BVASzkm3UZqkx/cFJiYHM= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/buildkit v0.11.6 h1:VYNdoKk5TVxN7k4RvZgdeM4GOyRvIi4Z8MXOY7xvyUs= -github.com/moby/buildkit v0.11.6/go.mod h1:GCqKfHhz+pddzfgaR7WmHVEE3nKKZMMDPpK8mh3ZLv4= -github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= -github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/sys/capability v0.4.0 h1:4D4mI6KlNtWMCM1Z/K0i7RV1FkX+DBDHKVJpCndZoHk= -github.com/moby/sys/capability v0.4.0/go.mod h1:4g9IK291rVkms3LKCDOoYlnV8xKwoDTpIrNEE35Wq0I= -github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg= -github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4= -github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= -github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo= -github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -672,50 +382,22 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= -github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nacos-group/nacos-sdk-go/v2 v2.2.2/go.mod h1:ys/1adWeKXXzbNWfRNbaFlX/t6HVLWdpsNDvmoWTw0g= github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM= github.com/onsi/ginkgo/v2 v2.22.1/go.mod h1:S6aTpoRsSq2cZOd+pssHAlKW/Q/jZt6cPrPlnj4a1xM= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= -github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/opencontainers/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk= -github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= -github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= -github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jDMcgULaH8= -github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/ory/viper v1.7.5 h1:+xVdq7SU3e1vNaCsk/ixsfxE4zylk1TJUiJrY647jUE= -github.com/ory/viper v1.7.5/go.mod h1:ypOuyJmEUb3oENywQZRgeAMwqgOyDqwboO1tj3DjTaM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= -github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= -github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -762,14 +444,7 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8 h1:xe+mmCnDN82KhC010l3NfYlA8ZbOuzbXAzSYBa6wbMc= -github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8/go.mod h1:WIfMkQNY+oq/mWwtsjOYHIZBuwthioY2srOmljJkTnk= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= -github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= @@ -777,53 +452,26 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= -github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= -github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= -github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skeema/knownhosts v1.3.0 h1:AM+y0rI04VksttfwjkSTNQorvGqmwATnvnAHpSgc0LY= -github.com/skeema/knownhosts v1.3.0/go.mod h1:sPINvnADmT/qYH1kfv+ePMmOBTH6Tbl7b5LvTDjFK7M= github.com/slok/go-http-metrics v0.11.0 h1:ABJUpekCZSkQT1wQrFvS4kGbhea/w6ndFJaWJeh3zL0= github.com/slok/go-http-metrics v0.11.0/go.mod h1:ZGKeYG1ET6TEJpQx18BqAJAvxw9jBAZXCHU7bWQqqAc= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5-0.20210205191134-5ec6847320e5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= -github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -840,25 +488,14 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= -github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= -github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= -github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= -github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc= -github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= -github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= -github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= @@ -869,30 +506,14 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= -github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/vbatts/tar-split v0.11.7 h1:ixZ93pO/GmvaZw4Vq9OwmfZK/kc2zKdPfu0B+gYqs3U= -github.com/vbatts/tar-split v0.11.7/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= -github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= -github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= @@ -945,19 +566,11 @@ golang.org/x/arch v0.16.0/go.mod h1:JmwW7aLIoRUKgaTzhkiEFxvcEiQGyOg9BMonBJUS7EE= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -994,12 +607,8 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1033,13 +642,8 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1067,12 +671,10 @@ golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1083,14 +685,12 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1111,35 +711,19 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1148,9 +732,6 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1211,7 +792,6 @@ golang.org/x/tools v0.0.0-20201014170642-d1624618ad65/go.mod h1:z6u4i615ZeAfBE4X golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1317,21 +897,14 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1343,15 +916,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -helm.sh/helm/v3 v3.12.3 h1:5y1+Sbty12t48T/t/CGNYUIME5BJ0WKfmW/sobYqkFg= -helm.sh/helm/v3 v3.12.3/go.mod h1:KPKQiX9IP5HX7o5YnnhViMnNuKiL/lJBVQ47GHe1R0k= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1361,20 +928,14 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.32.0 h1:OL9JpbvAU5ny9ga2fb24X8H6xQlVp+aJMFlgtQjR9CE= k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0= -k8s.io/apiextensions-apiserver v0.32.0 h1:S0Xlqt51qzzqjKPxfgX1xh4HBZE+p8KKBq+k2SWNOE0= -k8s.io/apiextensions-apiserver v0.32.0/go.mod h1:86hblMvN5yxMvZrZFX2OhIHAuFIMJIZ19bTvzkP+Fmw= k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/cli-runtime v0.32.0 h1:dP+OZqs7zHPpGQMCGAhectbHU2SNCuZtIimRKTv2T1c= -k8s.io/cli-runtime v0.32.0/go.mod h1:Mai8ht2+esoDRK5hr861KRy6z0zHsSTYttNVJXgP3YQ= k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= -k8s.io/kubectl v0.27.3 h1:HyC4o+8rCYheGDWrkcOQHGwDmyLKR5bxXFgpvF82BOw= -k8s.io/kubectl v0.27.3/go.mod h1:g9OQNCC2zxT+LT3FS09ZYqnDhlvsKAfFq76oyarBcq4= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= @@ -1383,14 +944,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.19.4 h1:SUmheabttt0nx8uJtoII4oIP27BVVvAKFvdvGFwV/Qo= sigs.k8s.io/controller-runtime v0.19.4/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= -sigs.k8s.io/controller-tools v0.17.0 h1:KaEQZbhrdY6J3zLBHplt+0aKUp8PeIttlhtF2UDo6bI= -sigs.k8s.io/controller-tools v0.17.0/go.mod h1:SKoWY8rwGWDzHtfnhmOwljn6fViG0JF7/xmnxpklgjo= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/kustomize/api v0.18.0 h1:hTzp67k+3NEVInwz5BHyzc9rGxIauoXferXyjv5lWPo= -sigs.k8s.io/kustomize/api v0.18.0/go.mod h1:f8isXnX+8b+SGLHQ6yO4JG1rdkZlvhaCf/uZbLVMb0U= -sigs.k8s.io/kustomize/kyaml v0.18.1 h1:WvBo56Wzw3fjS+7vBjN6TeivvpbW9GmRaWZ9CIVmt4E= -sigs.k8s.io/kustomize/kyaml v0.18.1/go.mod h1:C3L2BFVU1jgcddNBE1TxuVLgS46TjObMwW5FT9FcjYo= sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/hack/boilerplate.go.txt b/hack/boilerplate.go.txt deleted file mode 100644 index bd96df21d..000000000 --- a/hack/boilerplate.go.txt +++ /dev/null @@ -1,14 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. \ No newline at end of file diff --git a/pkg/common/log/logger.go b/pkg/common/log/logger.go index 8e020d651..167ebeed4 100644 --- a/pkg/common/log/logger.go +++ b/pkg/common/log/logger.go @@ -28,7 +28,6 @@ import ( "go.uber.org/zap/zapcore" "gopkg.in/natefinch/lumberjack.v2" kubelogzap "sigs.k8s.io/controller-runtime/pkg/log/zap" - ) type LogLevel int diff --git a/pkg/common/util/envoy/raw.go b/pkg/common/util/envoy/raw.go deleted file mode 100644 index 79e79e7da..000000000 --- a/pkg/common/util/envoy/raw.go +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package envoy - -import ( - "errors" - - envoy_types "github.com/envoyproxy/go-control-plane/pkg/cache/types" - "github.com/golang/protobuf/ptypes/any" - "google.golang.org/protobuf/proto" - "sigs.k8s.io/yaml" - - util_proto "github.com/apache/dubbo-admin/pkg/common/util/proto" -) - -func ResourceFromYaml(resYaml string) (proto.Message, error) { - json, err := yaml.YAMLToJSON([]byte(resYaml)) - if err != nil { - json = []byte(resYaml) - } - - var anything any.Any - if err := util_proto.FromJSON(json, &anything); err != nil { - return nil, err - } - msg, err := anything.UnmarshalNew() - if err != nil { - return nil, err - } - p, ok := msg.(envoy_types.Resource) - if !ok { - return nil, errors.New("xDS resource doesn't implement all required interfaces") - } - if v, ok := p.(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return nil, err - } - } - return p, nil -} diff --git a/pkg/common/validators/messages.go b/pkg/common/validators/messages.go index e8c96d9a6..79f1fc494 100644 --- a/pkg/common/validators/messages.go +++ b/pkg/common/validators/messages.go @@ -1,59 +1,59 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package validators - -import ( - "fmt" - "strings" -) - -const ( - HasToBeGreaterThan = "must be greater than" - HasToBeLessThan = "must be less than" - HasToBeGreaterOrEqualThen = "must be greater or equal then" - HasToBeGreaterThanZero = "must be greater than 0" - MustNotBeEmpty = "must not be empty" - MustBeDefined = "must be defined" - MustBeSet = "must be set" - MustNotBeSet = "must not be set" - MustNotBeDefined = "must not be defined" - MustBeDefinedAndGreaterThanZero = "must be defined and greater than zero" - WhenDefinedHasToBeNonNegative = "must not be negative when defined" - WhenDefinedHasToBeGreaterThanZero = "must be greater than zero when defined" - HasToBeInRangeFormat = "must be in inclusive range [%v, %v]" - WhenDefinedHasToBeValidPath = "must be a valid path when defined" - StringHasToBeValidNumber = "string must be a valid number" - MustHaveBPSUnit = "must be in kbps/Mbps/Gbps units" -) - -var ( - HasToBeInPercentageRange = fmt.Sprintf(HasToBeInRangeFormat, "0.0", "100.0") - HasToBeInUintPercentageRange = fmt.Sprintf(HasToBeInRangeFormat, 0, 100) -) - -func MustHaveOnlyOne(entity string, allowedValues ...string) string { - return fmt.Sprintf(`%s must have only one type defined: %s`, entity, strings.Join(allowedValues, ", ")) -} - -func MustHaveExactlyOneOf(entity string, allowedValues ...string) string { - return fmt.Sprintf(`%s must have exactly one defined: %s`, entity, strings.Join(allowedValues, ", ")) -} - -func MustHaveAtLeastOne(allowedValues ...string) string { - return fmt.Sprintf(`must have at least one defined: %s`, strings.Join(allowedValues, ", ")) -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package validators + +import ( + "fmt" + "strings" +) + +const ( + HasToBeGreaterThan = "must be greater than" + HasToBeLessThan = "must be less than" + HasToBeGreaterOrEqualThen = "must be greater or equal then" + HasToBeGreaterThanZero = "must be greater than 0" + MustNotBeEmpty = "must not be empty" + MustBeDefined = "must be defined" + MustBeSet = "must be set" + MustNotBeSet = "must not be set" + MustNotBeDefined = "must not be defined" + MustBeDefinedAndGreaterThanZero = "must be defined and greater than zero" + WhenDefinedHasToBeNonNegative = "must not be negative when defined" + WhenDefinedHasToBeGreaterThanZero = "must be greater than zero when defined" + HasToBeInRangeFormat = "must be in inclusive range [%v, %v]" + WhenDefinedHasToBeValidPath = "must be a valid path when defined" + StringHasToBeValidNumber = "string must be a valid number" + MustHaveBPSUnit = "must be in kbps/Mbps/Gbps units" +) + +var ( + HasToBeInPercentageRange = fmt.Sprintf(HasToBeInRangeFormat, "0.0", "100.0") + HasToBeInUintPercentageRange = fmt.Sprintf(HasToBeInRangeFormat, 0, 100) +) + +func MustHaveOnlyOne(entity string, allowedValues ...string) string { + return fmt.Sprintf(`%s must have only one type defined: %s`, entity, strings.Join(allowedValues, ", ")) +} + +func MustHaveExactlyOneOf(entity string, allowedValues ...string) string { + return fmt.Sprintf(`%s must have exactly one defined: %s`, entity, strings.Join(allowedValues, ", ")) +} + +func MustHaveAtLeastOne(allowedValues ...string) string { + return fmt.Sprintf(`must have at least one defined: %s`, strings.Join(allowedValues, ", ")) +} diff --git a/pkg/common/validators/types.go b/pkg/common/validators/types.go index 6ca9c729d..9ca82ac2e 100644 --- a/pkg/common/validators/types.go +++ b/pkg/common/validators/types.go @@ -1,214 +1,214 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package validators - -import ( - "fmt" - "strings" -) - -type ValidationError struct { - Violations []Violation `json:"violations"` -} - -type Violation struct { - Field string `json:"field"` - Message string `json:"message"` -} - -// OK returns and empty validation error (i.e. success). -func OK() ValidationError { - return ValidationError{} -} - -func (v *ValidationError) Error() string { - msg := "" - for _, violation := range v.Violations { - if msg != "" { - msg = fmt.Sprintf("%s; %s: %s", msg, violation.Field, violation.Message) - } else { - msg += fmt.Sprintf("%s: %s", violation.Field, violation.Message) - } - } - return msg -} - -func (v *ValidationError) HasViolations() bool { - return len(v.Violations) > 0 -} - -func (v *ValidationError) OrNil() error { - if v.HasViolations() { - return v - } - return nil -} - -func (v *ValidationError) AddViolationAt(path PathBuilder, message string) { - v.AddViolation(path.String(), message) -} - -func (v *ValidationError) AddViolation(field string, message string) { - violation := Violation{ - Field: field, - Message: message, - } - v.Violations = append(v.Violations, violation) -} - -func (v *ValidationError) AddErrorAt(path PathBuilder, validationErr ValidationError) { - for _, violation := range validationErr.Violations { - field := Root() - if violation.Field != "" { - field = RootedAt(violation.Field) - } - newViolation := Violation{ - Field: path.concat(field).String(), - Message: violation.Message, - } - v.Violations = append(v.Violations, newViolation) - } -} - -func (v *ValidationError) Add(err ValidationError) { - v.AddErrorAt(Root(), err) -} - -func (v *ValidationError) AddError(rootField string, validationErr ValidationError) { - root := Root() - if rootField != "" { - root = RootedAt(rootField) - } - v.AddErrorAt(root, validationErr) -} - -// Transform returns a new ValidationError with every violation -// transformed by a given transformFunc. -func (v *ValidationError) Transform(transformFunc func(Violation) Violation) *ValidationError { - if v == nil { - return nil - } - if transformFunc == nil || len(v.Violations) == 0 { - rv := *v - return &rv - } - result := ValidationError{ - Violations: make([]Violation, len(v.Violations)), - } - for i := range v.Violations { - result.Violations[i] = transformFunc(v.Violations[i]) - } - return &result -} - -func MakeUnimplementedFieldErr(path PathBuilder) ValidationError { - var err ValidationError - err.AddViolationAt(path, "field is not implemented") - return err -} - -func MakeRequiredFieldErr(path PathBuilder) ValidationError { - var err ValidationError - err.AddViolationAt(path, "cannot be empty") - return err -} - -func MakeOneOfErr(fieldA, fieldB, msg string, oneOf []string) ValidationError { - var err ValidationError - var quoted []string - - for _, value := range oneOf { - quoted = append(quoted, fmt.Sprintf("%q", value)) - } - - message := fmt.Sprintf( - "%q %s one of [%s]", - fieldA, - msg, - strings.Join(quoted, ", "), - ) - - if fieldB != "" { - message = fmt.Sprintf( - "%q %s when %q is one of [%s]", - fieldA, - msg, - fieldB, - strings.Join(quoted, ", "), - ) - } - - err.AddViolationAt(Root(), message) - - return err -} - -func MakeFieldMustBeOneOfErr(field string, allowed ...string) ValidationError { - return MakeOneOfErr(field, "", "must be", allowed) -} - -func IsValidationError(err error) bool { - _, ok := err.(*ValidationError) - return ok -} - -type PathBuilder []string - -func RootedAt(name string) PathBuilder { - return PathBuilder{name} -} - -func Root() PathBuilder { - return PathBuilder{} -} - -func (p PathBuilder) Field(name string) PathBuilder { - element := name - if len(p) > 0 { - element = fmt.Sprintf(".%s", element) - } - return append(p, element) -} - -func (p PathBuilder) Index(index int) PathBuilder { - return append(p, fmt.Sprintf("[%d]", index)) -} - -func (p PathBuilder) Key(key string) PathBuilder { - return append(p, fmt.Sprintf("[%q]", key)) -} - -func (p PathBuilder) String() string { - return strings.Join(p, "") -} - -func (p PathBuilder) concat(other PathBuilder) PathBuilder { - if len(other) == 0 { - return p - } - if len(p) == 0 { - return other - } - - firstOther := other[0] - if !strings.HasPrefix(firstOther, "[") { - firstOther = "." + firstOther - } - - return append(append(p, firstOther), other[1:]...) -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package validators + +import ( + "fmt" + "strings" +) + +type ValidationError struct { + Violations []Violation `json:"violations"` +} + +type Violation struct { + Field string `json:"field"` + Message string `json:"message"` +} + +// OK returns and empty validation error (i.e. success). +func OK() ValidationError { + return ValidationError{} +} + +func (v *ValidationError) Error() string { + msg := "" + for _, violation := range v.Violations { + if msg != "" { + msg = fmt.Sprintf("%s; %s: %s", msg, violation.Field, violation.Message) + } else { + msg += fmt.Sprintf("%s: %s", violation.Field, violation.Message) + } + } + return msg +} + +func (v *ValidationError) HasViolations() bool { + return len(v.Violations) > 0 +} + +func (v *ValidationError) OrNil() error { + if v.HasViolations() { + return v + } + return nil +} + +func (v *ValidationError) AddViolationAt(path PathBuilder, message string) { + v.AddViolation(path.String(), message) +} + +func (v *ValidationError) AddViolation(field string, message string) { + violation := Violation{ + Field: field, + Message: message, + } + v.Violations = append(v.Violations, violation) +} + +func (v *ValidationError) AddErrorAt(path PathBuilder, validationErr ValidationError) { + for _, violation := range validationErr.Violations { + field := Root() + if violation.Field != "" { + field = RootedAt(violation.Field) + } + newViolation := Violation{ + Field: path.concat(field).String(), + Message: violation.Message, + } + v.Violations = append(v.Violations, newViolation) + } +} + +func (v *ValidationError) Add(err ValidationError) { + v.AddErrorAt(Root(), err) +} + +func (v *ValidationError) AddError(rootField string, validationErr ValidationError) { + root := Root() + if rootField != "" { + root = RootedAt(rootField) + } + v.AddErrorAt(root, validationErr) +} + +// Transform returns a new ValidationError with every violation +// transformed by a given transformFunc. +func (v *ValidationError) Transform(transformFunc func(Violation) Violation) *ValidationError { + if v == nil { + return nil + } + if transformFunc == nil || len(v.Violations) == 0 { + rv := *v + return &rv + } + result := ValidationError{ + Violations: make([]Violation, len(v.Violations)), + } + for i := range v.Violations { + result.Violations[i] = transformFunc(v.Violations[i]) + } + return &result +} + +func MakeUnimplementedFieldErr(path PathBuilder) ValidationError { + var err ValidationError + err.AddViolationAt(path, "field is not implemented") + return err +} + +func MakeRequiredFieldErr(path PathBuilder) ValidationError { + var err ValidationError + err.AddViolationAt(path, "cannot be empty") + return err +} + +func MakeOneOfErr(fieldA, fieldB, msg string, oneOf []string) ValidationError { + var err ValidationError + var quoted []string + + for _, value := range oneOf { + quoted = append(quoted, fmt.Sprintf("%q", value)) + } + + message := fmt.Sprintf( + "%q %s one of [%s]", + fieldA, + msg, + strings.Join(quoted, ", "), + ) + + if fieldB != "" { + message = fmt.Sprintf( + "%q %s when %q is one of [%s]", + fieldA, + msg, + fieldB, + strings.Join(quoted, ", "), + ) + } + + err.AddViolationAt(Root(), message) + + return err +} + +func MakeFieldMustBeOneOfErr(field string, allowed ...string) ValidationError { + return MakeOneOfErr(field, "", "must be", allowed) +} + +func IsValidationError(err error) bool { + _, ok := err.(*ValidationError) + return ok +} + +type PathBuilder []string + +func RootedAt(name string) PathBuilder { + return PathBuilder{name} +} + +func Root() PathBuilder { + return PathBuilder{} +} + +func (p PathBuilder) Field(name string) PathBuilder { + element := name + if len(p) > 0 { + element = fmt.Sprintf(".%s", element) + } + return append(p, element) +} + +func (p PathBuilder) Index(index int) PathBuilder { + return append(p, fmt.Sprintf("[%d]", index)) +} + +func (p PathBuilder) Key(key string) PathBuilder { + return append(p, fmt.Sprintf("[%q]", key)) +} + +func (p PathBuilder) String() string { + return strings.Join(p, "") +} + +func (p PathBuilder) concat(other PathBuilder) PathBuilder { + if len(other) == 0 { + return p + } + if len(p) == 0 { + return other + } + + firstOther := other[0] + if !strings.HasPrefix(firstOther, "[") { + firstOther = "." + firstOther + } + + return append(append(p, firstOther), other[1:]...) +} diff --git a/pkg/config/schema/gvk/resources.gen.go b/pkg/config/schema/gvk/resources.gen.go deleted file mode 100644 index c7027edd7..000000000 --- a/pkg/config/schema/gvk/resources.gen.go +++ /dev/null @@ -1,86 +0,0 @@ -package gvk - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/apache/dubbo-admin/operator/pkg/config" - "github.com/apache/dubbo-admin/pkg/config/schema/gvr" -) - -var ( - Namespace = config.GroupVersionKind{Group: "", Version: "v1", Kind: "Namespace"} - CustomResourceDefinition = config.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinition"} - MutatingWebhookConfiguration = config.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "MutatingWebhookConfiguration"} - ValidatingWebhookConfiguration = config.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingWebhookConfiguration"} - Deployment = config.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"} - StatefulSet = config.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"} - DaemonSet = config.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"} - Job = config.GroupVersionKind{Group: "batch", Version: "v1", Kind: "Job"} - ConfigMap = config.GroupVersionKind{Group: "", Version: "v1", Kind: "ConfigMap"} - Secret = config.GroupVersionKind{Group: "", Version: "v1", Kind: "Secret"} - Service = config.GroupVersionKind{Group: "", Version: "v1", Kind: "Service"} - ServiceAccount = config.GroupVersionKind{Group: "", Version: "v1", Kind: "ServiceAccount"} -) - -func ToGVR(g config.GroupVersionKind) (schema.GroupVersionResource, bool) { - switch g { - case CustomResourceDefinition: - return gvr.CustomResourceDefinition, true - case MutatingWebhookConfiguration: - return gvr.MutatingWebhookConfiguration, true - case ValidatingWebhookConfiguration: - return gvr.ValidatingWebhookConfiguration, true - case Deployment: - return gvr.Deployment, true - case StatefulSet: - return gvr.StatefulSet, true - case DaemonSet: - return gvr.DaemonSet, true - case ConfigMap: - return gvr.ConfigMap, true - case Secret: - return gvr.Secret, true - case Service: - return gvr.Service, true - case ServiceAccount: - return gvr.ServiceAccount, true - case Namespace: - return gvr.Namespace, true - case Job: - return gvr.Job, true - } - return schema.GroupVersionResource{}, false -} -func MustToGVR(g config.GroupVersionKind) schema.GroupVersionResource { - r, ok := ToGVR(g) - if !ok { - panic("unknown kind: " + g.String()) - } - return r -} - -func FromGVR(g schema.GroupVersionResource) (config.GroupVersionKind, bool) { - switch g { - case gvr.CustomResourceDefinition: - return CustomResourceDefinition, true - case gvr.Namespace: - return Namespace, true - case gvr.Deployment: - return Deployment, true - case gvr.StatefulSet: - return StatefulSet, true - case gvr.DaemonSet: - return DaemonSet, true - case gvr.Job: - return Job, true - } - return config.GroupVersionKind{}, false -} - -func MustFromGVR(g schema.GroupVersionResource) config.GroupVersionKind { - r, ok := FromGVR(g) - if !ok { - panic("unknown kind: " + g.String()) - } - return r -} diff --git a/pkg/config/schema/gvr/resource.gen.go b/pkg/config/schema/gvr/resource.gen.go deleted file mode 100644 index f5f1bbaf2..000000000 --- a/pkg/config/schema/gvr/resource.gen.go +++ /dev/null @@ -1,20 +0,0 @@ -package gvr - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - CustomResourceDefinition = schema.GroupVersionResource{Group: "apiextensions.k8s.io", Version: "v1", Resource: "customresourcedefinitions"} - MutatingWebhookConfiguration = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1", Resource: "MutatingWebhookConfiguration"} - ValidatingWebhookConfiguration = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1", Resource: "ValidatingWebhookConfiguration"} - Deployment = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"} - StatefulSet = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "statefulsets"} - DaemonSet = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "daemonsets"} - Job = schema.GroupVersionResource{Group: "batch", Version: "v1", Resource: "jobs"} - Namespace = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "namespaces"} - ConfigMap = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "configmaps"} - Secret = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "secrets"} - Service = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "services"} - ServiceAccount = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "serviceaccounts"} -) diff --git a/pkg/console/context/context.go b/pkg/console/context/context.go index e4a5f3c0b..f423ca092 100644 --- a/pkg/console/context/context.go +++ b/pkg/console/context/context.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package context import ( @@ -6,14 +23,11 @@ import ( "github.com/apache/dubbo-admin/pkg/config/app" "github.com/apache/dubbo-admin/pkg/core/manager" "github.com/apache/dubbo-admin/pkg/core/runtime" - "github.com/apache/dubbo-admin/pkg/core/store" ) type Context interface { ResourceManager() manager.ResourceManager - ResourceStore() store.ResourceStore - Config() app.AdminConfig AppContext() ctx.Context @@ -43,8 +57,3 @@ func (c *context) ResourceManager() manager.ResourceManager { rmc, _ := c.coreRt.GetComponent(runtime.ResourceManager) return rmc.(manager.ResourceManagerComponent).ResourceManager() } - -func (c *context) ResourceStore() store.ResourceStore { - rsc, _ := c.coreRt.GetComponent(runtime.ResourceStore) - return rsc.(store.BaseResourceStoreComponent).ResourceStore() -} diff --git a/pkg/console/model/application.go b/pkg/console/model/application.go index d7e503751..2db69fe25 100644 --- a/pkg/console/model/application.go +++ b/pkg/console/model/application.go @@ -23,7 +23,7 @@ import ( "regexp" "strconv" - "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + mesh "github.com/apache/dubbo-admin/api/mesh/v1alpha1" "github.com/apache/dubbo-admin/pkg/console/constants" consolectx "github.com/apache/dubbo-admin/pkg/console/context" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" diff --git a/pkg/console/service/application.go b/pkg/console/service/application.go index d8e0c138b..f2d3054fa 100644 --- a/pkg/console/service/application.go +++ b/pkg/console/service/application.go @@ -28,15 +28,12 @@ import ( "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" "github.com/apache/dubbo-admin/pkg/core/store" - - "github.com/apache/dubbo-kubernetes/pkg/core/resources/apis/mesh" ) func GetApplicationDetail(ctx context.Context, req *model.ApplicationDetailReq) (*model.ApplicationDetailResp, error) { manager := ctx.ResourceManager() instanceList := &mesh.DataplaneResourceList{} - manager.ListPageByKey() if err := manager.List(ctx.AppContext(), instanceList, store.ListByApplication(req.AppName)); err != nil { return nil, err } diff --git a/pkg/core/manager/component.go b/pkg/core/manager/component.go index 8a0eb0e34..e18344280 100644 --- a/pkg/core/manager/component.go +++ b/pkg/core/manager/component.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package manager import ( diff --git a/pkg/core/resource/model/page.go b/pkg/core/resource/model/page.go index f91ad797e..e83784e83 100644 --- a/pkg/core/resource/model/page.go +++ b/pkg/core/resource/model/page.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package model type PageQuery struct { diff --git a/pkg/core/store/options.go b/pkg/core/store/options.go deleted file mode 100644 index 684853d83..000000000 --- a/pkg/core/store/options.go +++ /dev/null @@ -1,508 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package store - -import ( - "fmt" - "strings" - "time" - - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" -) - -const ( - PathLabel = "dubbo.io/path" -) - -type CreateOptions struct { - Name string - Mesh string - CreationTime time.Time - Owner coremodel.Resource - Labels map[string]string -} - -type CreateOptionsFunc func(*CreateOptions) - -func NewCreateOptions(fs ...CreateOptionsFunc) *CreateOptions { - opts := &CreateOptions{ - Labels: map[string]string{}, - } - for _, f := range fs { - f(opts) - } - return opts -} - -func CreateByApplication(app string) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.Labels[meshproto.ApplicationLabel] = app - } -} - -func CreateByService(service string) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.Labels[meshproto.ServiceLabel] = service - } -} - -func CreateByID(id string) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.Labels[meshproto.IDLabel] = id - } -} - -func CreateByServiceVersion(serviceVersion string) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.Labels[meshproto.ServiceVersionLabel] = serviceVersion - } -} - -func CreateByServiceGroup(serviceGroup string) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.Labels[meshproto.ServiceGroupLabel] = serviceGroup - } -} - -func CreateByPath(path string) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.Labels[PathLabel] = path - } -} - -func CreateByKey(name, mesh string) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.Name = name - opts.Mesh = mesh - } -} - -func CreatedAt(creationTime time.Time) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.CreationTime = creationTime - } -} - -func CreateWithOwner(owner coremodel.Resource) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.Owner = owner - } -} - -func CreateWithLabels(labels map[string]string) CreateOptionsFunc { - return func(opts *CreateOptions) { - opts.Labels = labels - } -} - -type UpdateOptions struct { - Name string - Mesh string - ModificationTime time.Time - Labels map[string]string -} - -func ModifiedAt(modificationTime time.Time) UpdateOptionsFunc { - return func(opts *UpdateOptions) { - opts.ModificationTime = modificationTime - } -} - -func UpdateByApplication(app string) UpdateOptionsFunc { - return func(opts *UpdateOptions) { - opts.Labels[meshproto.ApplicationLabel] = app - } -} - -func UpdateByService(service string) UpdateOptionsFunc { - return func(opts *UpdateOptions) { - opts.Labels[meshproto.ServiceLabel] = service - } -} - -func UpdateByID(id string) UpdateOptionsFunc { - return func(opts *UpdateOptions) { - opts.Labels[meshproto.IDLabel] = id - } -} - -func UpdateByServiceVersion(serviceVersion string) UpdateOptionsFunc { - return func(opts *UpdateOptions) { - opts.Labels[meshproto.ServiceVersionLabel] = serviceVersion - } -} - -func UpdateByServiceGroup(serviceGroup string) UpdateOptionsFunc { - return func(opts *UpdateOptions) { - opts.Labels[meshproto.ServiceGroupLabel] = serviceGroup - } -} - -func UpdateByKey(name, mesh string) UpdateOptionsFunc { - return func(opts *UpdateOptions) { - opts.Name = name - opts.Mesh = mesh - } -} - -func UpdateWithPath(path string) UpdateOptionsFunc { - return func(opts *UpdateOptions) { - opts.Labels[PathLabel] = path - } -} - -func UpdateWithLabels(labels map[string]string) UpdateOptionsFunc { - return func(opts *UpdateOptions) { - opts.Labels = labels - } -} - -type UpdateOptionsFunc func(*UpdateOptions) - -func NewUpdateOptions(fs ...UpdateOptionsFunc) *UpdateOptions { - opts := &UpdateOptions{ - Labels: map[string]string{}, - } - for _, f := range fs { - f(opts) - } - return opts -} - -type DeleteOptions struct { - Name string - Mesh string - Labels map[string]string -} - -type DeleteOptionsFunc func(*DeleteOptions) - -func NewDeleteOptions(fs ...DeleteOptionsFunc) *DeleteOptions { - opts := &DeleteOptions{ - Labels: map[string]string{}, - } - for _, f := range fs { - f(opts) - } - return opts -} - -func DeleteByPath(path string) DeleteOptionsFunc { - return func(opts *DeleteOptions) { - opts.Labels[PathLabel] = path - } -} - -func DeleteByApplication(app string) DeleteOptionsFunc { - return func(opts *DeleteOptions) { - opts.Labels[meshproto.ApplicationLabel] = app - } -} - -func DeleteByService(service string) DeleteOptionsFunc { - return func(opts *DeleteOptions) { - opts.Labels[meshproto.ServiceLabel] = service - } -} - -func DeleteByID(id string) DeleteOptionsFunc { - return func(opts *DeleteOptions) { - opts.Labels[meshproto.IDLabel] = id - } -} - -func DeleteByServiceVersion(serviceVersion string) DeleteOptionsFunc { - return func(opts *DeleteOptions) { - opts.Labels[meshproto.ServiceVersionLabel] = serviceVersion - } -} - -func DeleteByServiceGroup(serviceGroup string) DeleteOptionsFunc { - return func(opts *DeleteOptions) { - opts.Labels[meshproto.ServiceGroupLabel] = serviceGroup - } -} - -func DeleteByKey(name, mesh string) DeleteOptionsFunc { - return func(opts *DeleteOptions) { - opts.Name = name - opts.Mesh = mesh - } -} - -type DeleteAllOptions struct { - Mesh string -} - -type DeleteAllOptionsFunc func(*DeleteAllOptions) - -func DeleteAllByMesh(mesh string) DeleteAllOptionsFunc { - return func(opts *DeleteAllOptions) { - opts.Mesh = mesh - } -} - -func NewDeleteAllOptions(fs ...DeleteAllOptionsFunc) *DeleteAllOptions { - opts := &DeleteAllOptions{} - for _, f := range fs { - f(opts) - } - return opts -} - -type GetOptions struct { - Name string - Mesh string - Version string - Type string - Consistent bool - Labels map[string]string -} - -type GetOptionsFunc func(*GetOptions) - -func NewGetOptions(fs ...GetOptionsFunc) *GetOptions { - opts := &GetOptions{ - Labels: map[string]string{}, - } - for _, f := range fs { - f(opts) - } - return opts -} - -func (g *GetOptions) HashCode() string { - return fmt.Sprintf("%s:%s", g.Name, g.Mesh) -} - -func GetByPath(path string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Labels[PathLabel] = path - } -} - -func GetByRevision(revision string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Labels[meshproto.RevisionLabel] = revision - } -} - -func GetByType(t string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Type = t - } -} - -func GetByApplication(app string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Labels[meshproto.ApplicationLabel] = app - } -} - -func GetByService(service string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Labels[meshproto.ServiceLabel] = service - } -} - -func GetByID(id string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Labels[meshproto.IDLabel] = id - } -} - -func GetByServiceVersion(serviceVersion string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Labels[meshproto.ServiceVersionLabel] = serviceVersion - } -} - -func GetByServiceGroup(serviceGroup string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Labels[meshproto.ServiceGroupLabel] = serviceGroup - } -} -func GetByKey(name, mesh string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Name = name - opts.Mesh = mesh - } -} - -func GetByVersion(version string) GetOptionsFunc { - return func(opts *GetOptions) { - opts.Version = version - } -} - -// GetConsistent forces consistency if storage provides eventual consistency like read replica for Postgres. -func GetConsistent() GetOptionsFunc { - return func(opts *GetOptions) { - opts.Consistent = true - } -} - -func (l *GetOptions) Predicate(r coremodel.Resource) bool { - if l.Mesh != "" && r.Mesh() != l.Mesh { - return false - } - - if l.Version != "" && r.Meta().ResourceVersion != l.Version { - return false - } - - if len(l.Labels) > 0 { - for k, v := range l.Labels { - if r.Meta().Labels[k] != v { - return false - } - } - } - - return true -} - -type ( - ListFilterFunc func(rs coremodel.Resource) bool -) - -type ListOptions struct { - Mesh string - Labels map[string]string - PageSize int - PageOffset string - FilterFunc ListFilterFunc - NameContains string - NameEquals string - ApplicationContains string - Ordered bool - ResourceKeys map[string]struct{} -} - -type ListOptionsFunc func(*ListOptions) - -func NewListOptions(fs ...ListOptionsFunc) *ListOptions { - opts := &ListOptions{ - Labels: map[string]string{}, - ResourceKeys: map[string]struct{}{}, - } - for _, f := range fs { - f(opts) - } - return opts -} - -// Filter returns true if the item passes the filtering criteria -func (l *ListOptions) Filter(rs coremodel.Resource) bool { - if l.FilterFunc == nil { - return true - } - - return l.FilterFunc(rs) -} - -func ListByPath(path string) ListOptionsFunc { - return func(opts *ListOptions) { - opts.Labels[PathLabel] = path - } -} - -func ListByApplicationContains(app string) ListOptionsFunc { - return func(opts *ListOptions) { - opts.ApplicationContains = app - } -} - -func ListByApplication(app string) ListOptionsFunc { - return func(opts *ListOptions) { - opts.Labels[meshproto.ApplicationLabel] = app - } -} - -func ListByNameContains(name string) ListOptionsFunc { - return func(opts *ListOptions) { - opts.NameContains = name - } -} - -func ListByNameEquals(name string) ListOptionsFunc { - return func(opts *ListOptions) { - opts.NameEquals = name - } -} - -func ListByMesh(mesh string) ListOptionsFunc { - return func(opts *ListOptions) { - opts.Mesh = mesh - } -} - -func ListByPage(size int, offset string) ListOptionsFunc { - return func(opts *ListOptions) { - opts.PageSize = size - opts.PageOffset = offset - } -} - -func ListByFilterFunc(filterFunc ListFilterFunc) ListOptionsFunc { - return func(opts *ListOptions) { - opts.FilterFunc = filterFunc - } -} - -func ListOrdered() ListOptionsFunc { - return func(opts *ListOptions) { - opts.Ordered = true - } -} - -func (l *ListOptions) IsCacheable() bool { - return l.FilterFunc == nil -} - -func (l *ListOptions) HashCode() string { - return fmt.Sprintf("%s:%t:%s:%d:%s", l.Mesh, l.Ordered, l.NameContains, l.PageSize, l.PageOffset) -} - -func (l *ListOptions) Predicate(r coremodel.Resource) bool { - if l.Mesh != "" && r.Mesh() != l.Mesh { - return false - } - if l.NameEquals != "" && r.Meta().Name != l.NameEquals { - return false - } - - if l.NameContains != "" && !strings.Contains(r.Meta().Name, l.NameContains) { - return false - } - - if l.ApplicationContains != "" && !strings.Contains(r.Meta().Labels[meshproto.ApplicationLabel], l.ApplicationContains) { - return false - } - - if len(l.Labels) > 0 { - for k, v := range l.Labels { - if r.Meta().Labels[k] != v { - return false - } - } - } - - return l.Filter(r) -} diff --git a/pkg/diagnostics/server.go b/pkg/diagnostics/server.go index 16d163f43..a14fcfd8c 100644 --- a/pkg/diagnostics/server.go +++ b/pkg/diagnostics/server.go @@ -52,10 +52,6 @@ func (s *diagnosticsServer) Type() runtime.ComponentType { return DiagnosticsServer } -func (s *diagnosticsServer) SubType() runtime.ComponentType { - return runtime.DefaultComponentSubType -} - func (s *diagnosticsServer) Order() int { return math.MaxInt } diff --git a/pkg/store/db/mysql.go b/pkg/store/db/mysql.go index 4a3d25601..43e59a333 100644 --- a/pkg/store/db/mysql.go +++ b/pkg/store/db/mysql.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package db // TODO implement memory resource store, refer to GORM https://gorm.io/docs/ diff --git a/pkg/store/memory/memory.go b/pkg/store/memory/memory.go index cff9dd2cf..80a2c7cda 100644 --- a/pkg/store/memory/memory.go +++ b/pkg/store/memory/memory.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package memory import _ "k8s.io/client-go/tools/cache" diff --git a/tools/resourcegen/main.go b/scripts/resourcegen/gen.go similarity index 96% rename from tools/resourcegen/main.go rename to scripts/resourcegen/gen.go index 23c193b1a..1cc214c22 100644 --- a/tools/resourcegen/main.go +++ b/scripts/resourcegen/gen.go @@ -34,8 +34,6 @@ import ( _ "github.com/apache/dubbo-admin/api/mesh/v1alpha1" _ "github.com/apache/dubbo-admin/api/system/v1alpha1" - - util "github.com/apache/dubbo-admin/tools/resourcegen/util" ) // resourceTemplate for creating a Dubbo Resource. @@ -208,7 +206,7 @@ type ProtoMessageFunc func(protoreflect.MessageType) bool // OnDubboResourceMessage ... func OnDubboResourceMessage(pkg string, f ProtoMessageFunc) ProtoMessageFunc { return func(m protoreflect.MessageType) bool { - r := util.DubboResourceForMessage(m.Descriptor()) + r := DubboResourceForMessage(m.Descriptor()) if r == nil { return true } @@ -256,9 +254,9 @@ func main() { return types[i].Descriptor().FullName() < types[j].Descriptor().FullName() }) - var resources []util.ResourceInfo + var resources []ResourceInfo for _, t := range types { - resourceInfo := util.ToResourceInfo(t.Descriptor()) + resourceInfo := ToResourceInfo(t.Descriptor()) resources = append(resources, resourceInfo) } @@ -267,10 +265,10 @@ func main() { var buf bytes.Buffer if err := resourceTemplate.Execute(&buf, struct { Package string - Resources []util.ResourceInfo + Resources []ResourceInfo }{ Package: pkg, - Resources: []util.ResourceInfo{resource}, // 只放一个资源 + Resources: []ResourceInfo{resource}, // 只放一个资源 }); err != nil { log.Fatalf("template error for %s: %s", resource.ResourceType, err) } diff --git a/tools/resourcegen/util/util.go b/scripts/resourcegen/util.go similarity index 84% rename from tools/resourcegen/util/util.go rename to scripts/resourcegen/util.go index 397229ac4..6ab4acce0 100644 --- a/tools/resourcegen/util/util.go +++ b/scripts/resourcegen/util.go @@ -1,4 +1,21 @@ -package util +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main import ( "fmt" From 5e5230df6b29486997bd6be0413e05677fccfa31 Mon Sep 17 00:00:00 2001 From: marsevilspirit Date: Sun, 14 Sep 2025 19:52:21 +0800 Subject: [PATCH 03/40] ci(makefile): add makefile for ci (#1322) * ci(makefile): add makefile for ci * style(ci): rename dubbo-admin ci --- .github/workflows/ci.yml | 89 +++++++++++++++++++++------------------- Makefile | 40 +++++++++++++++--- 2 files changed, 80 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8f4af5b7..d735411cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Continues Integration +name: dubbo-admin ci on: push: @@ -24,59 +24,62 @@ on: - develop jobs: - unit-test: - name: Go Test - runs-on: ubuntu-latest - if: github.repository == 'apache/dubbo-admin' - steps: - - uses: actions/checkout@v4 - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Download dependencies - run: | - go mod download - - name: Go Test - run: | - go test ./... -gcflags=-l -coverprofile=coverage.txt -covermode=atomic - - name: "Upload test result" - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-coverage - path: "**/coverage.txt" - - name: Coverage - run: bash <(curl -s https://codecov.io/bash) - license-check: - name: License Check - Go + name: License Check runs-on: ubuntu-latest if: github.repository == 'apache/dubbo-admin' steps: - uses: actions/checkout@v4 - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Check License Header uses: apache/skywalking-eyes/header@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + config: .licenserc.yaml + mode: check - go-fmt: - name: Go fmt - runs-on: ubuntu-latest + CI: + name: CI (${{ matrix.os }} - Go ${{ matrix.go_version }}) + runs-on: ${{ matrix.os }} + strategy: + # If you want to matrix build , you can append the following list. + matrix: + go_version: + - "1.24" + - "1.23" + os: + - ubuntu-latest if: github.repository == 'apache/dubbo-admin' steps: - uses: actions/checkout@v4 - - name: Set up Go 1.x + - name: Setup Go ${{ matrix.go_version }} uses: actions/setup-go@v5 with: go-version-file: go.mod - - name: Download dependencies - run: | - go mod download - - name: Go Fmt - run: | - go fmt ./... && git status && [[ -z `git status -s` ]] - # diff -u <(echo -n) <(gofmt -d -s .) + - name: Cache dependencies + # ref: https://github.com/actions/cache/blob/main/examples.md#go---module + uses: actions/cache@v4 + with: + # Cache, works only on Linux + path: | + ~/.cache/go-build + ~/go/pkg/mod + # Cache key + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + # An ordered list of keys to use for restoring the cache if no cache hit occurred for key + restore-keys: | + ${{ runner.os }}-go- + - name: Check Code Format + run: make fmt && git status && [[ -z `git status -s` ]] + - name: Run Unit Test + run: make test + # TODO(marsevilspirit): add lint + - name: Upload test result + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-coverage + path: "**/coverage.txt" + - name: Coverage + # TODO(marsevilspirit): fix coverage + run: bash <(curl -s https://codecov.io/bash) diff --git a/Makefile b/Makefile index 63c2127e5..7db582a09 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,38 @@ # See the License for the specific language governing permissions and # limitations under the License. -SHELL := /usr/bin/env bash +SHELL := bash +.DELETE_ON_ERROR: +.DEFAULT_GOAL := help +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS += --warn-undefined-variables +MAKEFLAGS += --no-builtin-rules +MAKEFLAGS += --no-print-directory -.PHONY: build-dubbo-admin -build-dubbo-admin: - CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build \ - -ldflags "-X github.com/apache/dubbo-admin/pkg/version.gitTag=$(GIT_VERSION)" \ - -o bin/dubbo-admin app/dubbo-main/main.go && cp app/dubbo-admin/dubbo-admin.yaml bin/ \ No newline at end of file +.PHONY: help test fmt clean lint + +help: + @echo "Available commands:" + @echo " test - Run unit tests" + @echo " clean - Clean test generate files" + @echo " fmt - Format code" + @echo " lint - Run golangci-lint" + +# Run unit tests +test: clean + go test ./... -gcflags=-l -coverprofile=coverage.txt -covermode=atomic + +fmt: + go fmt ./... + +# Clean test generate files +clean: + rm -rf coverage.txt + +# Run golangci-lint +lint: install-golangci-lint + go vet ./... + golangci-lint run ./... --timeout=10m + +install-golangci-lint: + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0 From 55e683ad78a90cfee4f4ceb376dfe035bd1196f2 Mon Sep 17 00:00:00 2001 From: marsevilspirit Date: Sun, 21 Sep 2025 09:55:51 +0800 Subject: [PATCH 04/40] delete unused ci (#1326) --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d735411cc..467757ff5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,12 +74,6 @@ jobs: - name: Run Unit Test run: make test # TODO(marsevilspirit): add lint - - name: Upload test result - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-coverage - path: "**/coverage.txt" - name: Coverage # TODO(marsevilspirit): fix coverage run: bash <(curl -s https://codecov.io/bash) From 9729ec775598eaea8be60c9abd24b958f3d1c67c Mon Sep 17 00:00:00 2001 From: robb Date: Sun, 21 Sep 2025 17:54:39 +0800 Subject: [PATCH 05/40] fix: refractor web handler and service to fix compile error; (#1325) * fix: refractor web handler and service to fix compile error; --- api/mesh/options.pb.go | 519 ++------------ api/mesh/options.proto | 74 +- api/mesh/v1alpha1/affinity_route.pb.go | 41 +- api/mesh/v1alpha1/affinity_route.proto | 15 +- api/mesh/v1alpha1/application.pb.go | 58 +- api/mesh/v1alpha1/application.proto | 12 +- api/mesh/v1alpha1/condition_route.pb.go | 13 +- api/mesh/v1alpha1/condition_route.proto | 9 +- api/mesh/v1alpha1/dynamic_config.pb.go | 141 ++-- api/mesh/v1alpha1/dynamic_config.proto | 9 +- api/mesh/v1alpha1/instance.pb.go | 280 ++++++-- api/mesh/v1alpha1/instance.proto | 63 +- api/mesh/v1alpha1/known_backends.go | 11 - api/mesh/v1alpha1/mapping.pb.go | 158 ----- api/mesh/v1alpha1/mapping.proto | 23 - api/mesh/v1alpha1/rpc_instance.pb.go | 185 +++++ api/mesh/v1alpha1/rpc_instance.proto | 28 + api/mesh/v1alpha1/rpc_instance_metadata.pb.go | 284 ++++++++ api/mesh/v1alpha1/rpc_instance_metadata.proto | 29 + api/mesh/v1alpha1/runtime_instance.pb.go | 215 ++++++ api/mesh/v1alpha1/runtime_instance.proto | 33 + api/mesh/v1alpha1/service.pb.go | 10 +- api/mesh/v1alpha1/service.proto | 10 +- .../v1alpha1/service_consumer_metadata.pb.go | 169 +++++ .../v1alpha1/service_consumer_metadata.proto | 24 + .../v1alpha1/service_provider_mapping.pb.go | 149 ++++ .../v1alpha1/service_provider_mapping.proto | 17 + .../v1alpha1/service_provider_metadata.pb.go | 169 +++++ .../v1alpha1/service_provider_metadata.proto | 23 + api/mesh/v1alpha1/tag_route.pb.go | 68 +- api/mesh/v1alpha1/tag_route.proto | 10 +- api/mesh/v1alpha1/traffic_helper.go | 1 - api/system/v1alpha1/config.pb.go | 138 ---- api/system/v1alpha1/config.proto | 22 - api/system/v1alpha1/datasource.pb.go | 224 ------ api/system/v1alpha1/datasource.proto | 30 - api/system/v1alpha1/inter_cp_ping.pb.go | 218 ------ api/system/v1alpha1/inter_cp_ping.proto | 16 - api/system/v1alpha1/inter_cp_ping_grpc.pb.go | 121 ---- api/system/v1alpha1/secret.pb.go | 144 ---- api/system/v1alpha1/secret.proto | 22 - api/system/v1alpha1/zone.pb.go | 146 ---- api/system/v1alpha1/zone.proto | 24 - api/system/v1alpha1/zone_insight.pb.go | 635 ------------------ api/system/v1alpha1/zone_insight.proto | 108 --- app/dubbo-admin/dubbo-admin.yaml | 6 +- go.mod | 1 - go.sum | 2 - .../common/errors/error.go | 40 +- pkg/config/app/admin.go | 2 +- pkg/console/handler/application.go | 201 +++--- pkg/console/handler/condition_rule.go | 39 +- pkg/console/handler/configurator_rule.go | 91 +-- pkg/console/handler/instance.go | 52 +- pkg/console/handler/observability.go | 2 + pkg/console/handler/overview.go | 163 +---- pkg/console/handler/prometheus.go | 2 + pkg/console/handler/search.go | 8 +- pkg/console/handler/service.go | 128 ++-- pkg/console/handler/tag_rule.go | 86 +-- pkg/console/handler/traffic_affinity_rule.go | 71 -- pkg/console/model/application.go | 241 +------ pkg/console/model/common.go | 44 +- pkg/console/model/condition_rule.go | 10 +- pkg/console/model/configurator_rule.go | 7 +- pkg/console/model/instance.go | 255 ++----- pkg/console/model/observability.go | 1 + pkg/console/model/service.go | 72 +- pkg/console/model/tag_rule.go | 6 +- pkg/console/service/affinity_rule.go | 63 ++ pkg/console/service/application.go | 345 +++++----- pkg/console/service/condition_rule.go | 65 +- pkg/console/service/configurator_rule.go | 37 +- pkg/console/service/instance.go | 181 ++--- pkg/console/service/service.go | 198 +++--- pkg/console/service/tag_rule.go | 39 +- pkg/core/bootstrap/bootstrap.go | 10 +- pkg/core/consts/const.go | 5 + pkg/core/controller/informer.go | 9 +- pkg/core/controller/listwatcher.go | 3 +- pkg/core/events/eventbus.go | 3 +- pkg/core/manager/manager.go | 101 +-- pkg/core/manager/manager_helper.go | 121 ++++ .../apis/mesh/v1alpha1/affinityroute_types.go | 20 +- .../apis/mesh/v1alpha1/application_types.go | 20 +- .../mesh/v1alpha1/conditionroute_types.go | 20 +- .../apis/mesh/v1alpha1/dynamicconfig_types.go | 20 +- .../apis/mesh/v1alpha1/instance_index.go | 25 - .../apis/mesh/v1alpha1/instance_types.go | 20 +- ...{mapping_types.go => rpcinstance_types.go} | 70 +- .../v1alpha1/rpcinstancemetadata_types.go} | 74 +- .../v1alpha1/runtimeinstance_types.go} | 74 +- .../apis/mesh/v1alpha1/service_helper.go | 7 + .../apis/mesh/v1alpha1/service_types.go | 20 +- .../v1alpha1/serviceconsumermetadata_types.go | 130 ++++ .../v1alpha1/serviceprovidermapping_types.go} | 74 +- .../v1alpha1/serviceprovidermetadata_types.go | 130 ++++ .../apis/mesh/v1alpha1/tagroute_types.go | 20 +- .../apis/system/v1alpha1/datasource_types.go | 128 ---- .../apis/system/v1alpha1/zone_types.go | 128 ---- pkg/core/resource/model/page.go | 51 +- pkg/core/resource/model/resource.go | 2 +- pkg/core/runtime/builder.go | 1 + pkg/core/runtime/registry.go | 6 +- pkg/core/runtime/runtime.go | 1 - pkg/core/store/component.go | 13 +- .../core/store/index/common.go | 34 +- pkg/core/store/index/instance.go | 61 ++ .../store/{index.go => index/registry.go} | 5 +- .../store/index/service_consumer_metadata.go | 53 +- .../store/index/service_provider_metadata.go | 32 +- pkg/core/store/store.go | 37 +- scripts/resourcegen/gen.go | 94 +-- scripts/resourcegen/util.go | 86 +-- 114 files changed, 3706 insertions(+), 5158 deletions(-) delete mode 100644 api/mesh/v1alpha1/known_backends.go delete mode 100644 api/mesh/v1alpha1/mapping.pb.go delete mode 100644 api/mesh/v1alpha1/mapping.proto create mode 100644 api/mesh/v1alpha1/rpc_instance.pb.go create mode 100644 api/mesh/v1alpha1/rpc_instance.proto create mode 100644 api/mesh/v1alpha1/rpc_instance_metadata.pb.go create mode 100644 api/mesh/v1alpha1/rpc_instance_metadata.proto create mode 100644 api/mesh/v1alpha1/runtime_instance.pb.go create mode 100644 api/mesh/v1alpha1/runtime_instance.proto create mode 100644 api/mesh/v1alpha1/service_consumer_metadata.pb.go create mode 100644 api/mesh/v1alpha1/service_consumer_metadata.proto create mode 100644 api/mesh/v1alpha1/service_provider_mapping.pb.go create mode 100644 api/mesh/v1alpha1/service_provider_mapping.proto create mode 100644 api/mesh/v1alpha1/service_provider_metadata.pb.go create mode 100644 api/mesh/v1alpha1/service_provider_metadata.proto delete mode 100644 api/system/v1alpha1/config.pb.go delete mode 100644 api/system/v1alpha1/config.proto delete mode 100644 api/system/v1alpha1/datasource.pb.go delete mode 100644 api/system/v1alpha1/datasource.proto delete mode 100644 api/system/v1alpha1/inter_cp_ping.pb.go delete mode 100644 api/system/v1alpha1/inter_cp_ping.proto delete mode 100644 api/system/v1alpha1/inter_cp_ping_grpc.pb.go delete mode 100644 api/system/v1alpha1/secret.pb.go delete mode 100644 api/system/v1alpha1/secret.proto delete mode 100644 api/system/v1alpha1/zone.pb.go delete mode 100644 api/system/v1alpha1/zone.proto delete mode 100644 api/system/v1alpha1/zone_insight.pb.go delete mode 100644 api/system/v1alpha1/zone_insight.proto rename api/system/v1alpha1/zone_helpers.go => pkg/common/errors/error.go (53%) delete mode 100644 pkg/console/handler/traffic_affinity_rule.go create mode 100644 pkg/console/service/affinity_rule.go create mode 100644 pkg/core/manager/manager_helper.go delete mode 100644 pkg/core/resource/apis/mesh/v1alpha1/instance_index.go rename pkg/core/resource/apis/mesh/v1alpha1/{mapping_types.go => rpcinstance_types.go} (60%) rename pkg/core/resource/apis/{system/v1alpha1/zoneinsight_types.go => mesh/v1alpha1/rpcinstancemetadata_types.go} (52%) rename pkg/core/resource/apis/{system/v1alpha1/config_types.go => mesh/v1alpha1/runtimeinstance_types.go} (54%) create mode 100644 pkg/core/resource/apis/mesh/v1alpha1/service_helper.go create mode 100644 pkg/core/resource/apis/mesh/v1alpha1/serviceconsumermetadata_types.go rename pkg/core/resource/apis/{system/v1alpha1/secret_types.go => mesh/v1alpha1/serviceprovidermapping_types.go} (51%) create mode 100644 pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermetadata_types.go delete mode 100644 pkg/core/resource/apis/system/v1alpha1/datasource_types.go delete mode 100644 pkg/core/resource/apis/system/v1alpha1/zone_types.go rename api/system/v1alpha1/zone_insight_helpers.go => pkg/core/store/index/common.go (53%) create mode 100644 pkg/core/store/index/instance.go rename pkg/core/store/{index.go => index/registry.go} (99%) rename api/generic/insights.go => pkg/core/store/index/service_consumer_metadata.go (51%) rename api/mesh/v1alpha1/mapping_helper.go => pkg/core/store/index/service_provider_metadata.go (50%) diff --git a/api/mesh/options.pb.go b/api/mesh/options.pb.go index da895ec26..13d9ed064 100644 --- a/api/mesh/options.pb.go +++ b/api/mesh/options.pb.go @@ -1,22 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.20.0 +// protoc-gen-go v1.35.1 +// protoc v3.12.4 // source: api/mesh/options.proto package mesh import ( - reflect "reflect" - sync "sync" -) - -import ( + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" ) const ( @@ -31,46 +26,21 @@ type DubboResourceOptions struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name of the Dubbo resource struct. + // Name and type of the dubbo resource struct. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Name and value of the modelResourceType constant. - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // True if this resource has global scope. Otherwise it will be mesh scope. - Global bool `protobuf:"varint,3,opt,name=global,proto3" json:"global,omitempty"` + // The name of the resource showed as plural + PluralName string `protobuf:"bytes,2,opt,name=plural_name,json=pluralName,proto3" json:"plural_name,omitempty"` // Name of the resource's Go package. - Package string `protobuf:"bytes,4,opt,name=package,proto3" json:"package,omitempty"` - // Whether to skip type registration for this resource. - SkipRegistration bool `protobuf:"varint,6,opt,name=skip_registration,json=skipRegistration,proto3" json:"skip_registration,omitempty"` - Dds *DubboDdsOptions `protobuf:"bytes,10,opt,name=dds,proto3" json:"dds,omitempty"` - Ws *DubboWsOptions `protobuf:"bytes,7,opt,name=ws,proto3" json:"ws,omitempty"` - // Whether scope is "Namespace"; Otherwise to "Cluster". - ScopeNamespace bool `protobuf:"varint,11,opt,name=scope_namespace,json=scopeNamespace,proto3" json:"scope_namespace,omitempty"` - // Whether to skip generation of native API helper functions. - SkipKubernetesWrappers bool `protobuf:"varint,12,opt,name=skip_kubernetes_wrappers,json=skipKubernetesWrappers,proto3" json:"skip_kubernetes_wrappers,omitempty"` - // Whether to generate Inspect API endpoint - AllowToInspect bool `protobuf:"varint,13,opt,name=allow_to_inspect,json=allowToInspect,proto3" json:"allow_to_inspect,omitempty"` - // If resource has more than one version, then the flag defines which version - // is used in the storage. All other versions must be convertible to it. - StorageVersion bool `protobuf:"varint,14,opt,name=storage_version,json=storageVersion,proto3" json:"storage_version,omitempty"` - // The name of the policy showed as plural to be displayed in the UI and maybe - // CLI - PluralDisplayName string `protobuf:"bytes,15,opt,name=plural_display_name,json=pluralDisplayName,proto3" json:"plural_display_name,omitempty"` - // Is Experimental indicates if a policy is in experimental state (might not - // be production ready). - IsExperimental bool `protobuf:"varint,16,opt,name=is_experimental,json=isExperimental,proto3" json:"is_experimental,omitempty"` - // Columns to set using `+kubebuilder::printcolumns` - AdditionalPrinterColumns []string `protobuf:"bytes,17,rep,name=additional_printer_columns,json=additionalPrinterColumns,proto3" json:"additional_printer_columns,omitempty"` - // Whether the resource has a matching insight type - HasInsights bool `protobuf:"varint,18,opt,name=has_insights,json=hasInsights,proto3" json:"has_insights,omitempty"` + Package string `protobuf:"bytes,3,opt,name=package,proto3" json:"package,omitempty"` + // Is Experimental indicates if a resource is in experimental state. + IsExperimental bool `protobuf:"varint,4,opt,name=is_experimental,json=isExperimental,proto3" json:"is_experimental,omitempty"` } func (x *DubboResourceOptions) Reset() { *x = DubboResourceOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_api_mesh_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_api_mesh_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DubboResourceOptions) String() string { @@ -81,7 +51,7 @@ func (*DubboResourceOptions) ProtoMessage() {} func (x *DubboResourceOptions) ProtoReflect() protoreflect.Message { mi := &file_api_mesh_options_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103,20 +73,13 @@ func (x *DubboResourceOptions) GetName() string { return "" } -func (x *DubboResourceOptions) GetType() string { +func (x *DubboResourceOptions) GetPluralName() string { if x != nil { - return x.Type + return x.PluralName } return "" } -func (x *DubboResourceOptions) GetGlobal() bool { - if x != nil { - return x.Global - } - return false -} - func (x *DubboResourceOptions) GetPackage() string { if x != nil { return x.Package @@ -124,62 +87,6 @@ func (x *DubboResourceOptions) GetPackage() string { return "" } -func (x *DubboResourceOptions) GetSkipRegistration() bool { - if x != nil { - return x.SkipRegistration - } - return false -} - -func (x *DubboResourceOptions) GetDds() *DubboDdsOptions { - if x != nil { - return x.Dds - } - return nil -} - -func (x *DubboResourceOptions) GetWs() *DubboWsOptions { - if x != nil { - return x.Ws - } - return nil -} - -func (x *DubboResourceOptions) GetScopeNamespace() bool { - if x != nil { - return x.ScopeNamespace - } - return false -} - -func (x *DubboResourceOptions) GetSkipKubernetesWrappers() bool { - if x != nil { - return x.SkipKubernetesWrappers - } - return false -} - -func (x *DubboResourceOptions) GetAllowToInspect() bool { - if x != nil { - return x.AllowToInspect - } - return false -} - -func (x *DubboResourceOptions) GetStorageVersion() bool { - if x != nil { - return x.StorageVersion - } - return false -} - -func (x *DubboResourceOptions) GetPluralDisplayName() string { - if x != nil { - return x.PluralDisplayName - } - return "" -} - func (x *DubboResourceOptions) GetIsExperimental() bool { if x != nil { return x.IsExperimental @@ -187,237 +94,21 @@ func (x *DubboResourceOptions) GetIsExperimental() bool { return false } -func (x *DubboResourceOptions) GetAdditionalPrinterColumns() []string { - if x != nil { - return x.AdditionalPrinterColumns - } - return nil -} - -func (x *DubboResourceOptions) GetHasInsights() bool { - if x != nil { - return x.HasInsights - } - return false -} - -type DubboWsOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name is the name of the policy for resource name usage in path. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Plural is only to be set if the plural of the resource is irregular (not - // just adding a 's' at the end). - Plural string `protobuf:"bytes,2,opt,name=plural,proto3" json:"plural,omitempty"` - // ReadOnly if the resource is read only. - ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` - // AdminOnly whether this entity requires admin auth to access these - // endpoints. - AdminOnly bool `protobuf:"varint,4,opt,name=admin_only,json=adminOnly,proto3" json:"admin_only,omitempty"` -} - -func (x *DubboWsOptions) Reset() { - *x = DubboWsOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_api_mesh_options_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DubboWsOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DubboWsOptions) ProtoMessage() {} - -func (x *DubboWsOptions) ProtoReflect() protoreflect.Message { - mi := &file_api_mesh_options_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DubboWsOptions.ProtoReflect.Descriptor instead. -func (*DubboWsOptions) Descriptor() ([]byte, []int) { - return file_api_mesh_options_proto_rawDescGZIP(), []int{1} -} - -func (x *DubboWsOptions) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DubboWsOptions) GetPlural() string { - if x != nil { - return x.Plural - } - return "" -} - -func (x *DubboWsOptions) GetReadOnly() bool { - if x != nil { - return x.ReadOnly - } - return false -} - -func (x *DubboWsOptions) GetAdminOnly() bool { - if x != nil { - return x.AdminOnly - } - return false -} - -type DubboDdsOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // SendToGlobal whether this entity will be sent from zone cp to global cp - SendToGlobal bool `protobuf:"varint,1,opt,name=send_to_global,json=sendToGlobal,proto3" json:"send_to_global,omitempty"` - // SendToZone whether this entity will be sent from global cp to zone cp - SendToZone bool `protobuf:"varint,2,opt,name=send_to_zone,json=sendToZone,proto3" json:"send_to_zone,omitempty"` -} - -func (x *DubboDdsOptions) Reset() { - *x = DubboDdsOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_api_mesh_options_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DubboDdsOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DubboDdsOptions) ProtoMessage() {} - -func (x *DubboDdsOptions) ProtoReflect() protoreflect.Message { - mi := &file_api_mesh_options_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DubboDdsOptions.ProtoReflect.Descriptor instead. -func (*DubboDdsOptions) Descriptor() ([]byte, []int) { - return file_api_mesh_options_proto_rawDescGZIP(), []int{2} -} - -func (x *DubboDdsOptions) GetSendToGlobal() bool { - if x != nil { - return x.SendToGlobal - } - return false -} - -func (x *DubboDdsOptions) GetSendToZone() bool { - if x != nil { - return x.SendToZone - } - return false -} - -type DubboPolicyOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Whether to skip type registration for this resource. - SkipRegistration bool `protobuf:"varint,1,opt,name=skip_registration,json=skipRegistration,proto3" json:"skip_registration,omitempty"` - // An optional alternative plural form if this is unset default to a standard - // derivation of the name - Plural string `protobuf:"bytes,2,opt,name=plural,proto3" json:"plural,omitempty"` -} - -func (x *DubboPolicyOptions) Reset() { - *x = DubboPolicyOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_api_mesh_options_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DubboPolicyOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DubboPolicyOptions) ProtoMessage() {} - -func (x *DubboPolicyOptions) ProtoReflect() protoreflect.Message { - mi := &file_api_mesh_options_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DubboPolicyOptions.ProtoReflect.Descriptor instead. -func (*DubboPolicyOptions) Descriptor() ([]byte, []int) { - return file_api_mesh_options_proto_rawDescGZIP(), []int{3} -} - -func (x *DubboPolicyOptions) GetSkipRegistration() bool { - if x != nil { - return x.SkipRegistration - } - return false -} - -func (x *DubboPolicyOptions) GetPlural() string { - if x != nil { - return x.Plural - } - return "" -} - var file_api_mesh_options_proto_extTypes = []protoimpl.ExtensionInfo{ { - ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*DubboResourceOptions)(nil), Field: 43534533, Name: "dubbo.mesh.resource", Tag: "bytes,43534533,opt,name=resource", Filename: "api/mesh/options.proto", }, - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*DubboPolicyOptions)(nil), - Field: 43534534, - Name: "dubbo.mesh.policy", - Tag: "bytes,43534534,opt,name=policy", - Filename: "api/mesh/options.proto", - }, } -// Extension fields to descriptorpb.MessageOptions. +// Extension fields to descriptor.MessageOptions. var ( // optional dubbo.mesh.DubboResourceOptions resource = 43534533; E_Resource = &file_api_mesh_options_proto_extTypes[0] // 'dubbo' - // optional dubbo.mesh.DubboPolicyOptions policy = 43534534; - E_Policy = &file_api_mesh_options_proto_extTypes[1] // 'dubbo' ) var File_api_mesh_options_proto protoreflect.FileDescriptor @@ -427,80 +118,25 @@ var file_api_mesh_options_proto_rawDesc = []byte{ 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x04, 0x0a, 0x14, 0x44, 0x75, 0x62, 0x62, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x6c, 0x6f, 0x62, 0x61, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, - 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x6b, 0x69, - 0x70, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x03, 0x64, 0x64, 0x73, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x44, 0x64, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x03, 0x64, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x02, 0x77, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x44, - 0x75, 0x62, 0x62, 0x6f, 0x57, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x02, 0x77, - 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x73, 0x6b, - 0x69, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x77, 0x72, - 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x73, 0x6b, - 0x69, 0x70, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x57, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x6f, - 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x6f, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x27, - 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x6c, 0x75, 0x72, 0x61, - 0x6c, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x6c, 0x75, 0x72, 0x61, 0x6c, 0x44, 0x69, 0x73, 0x70, - 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x65, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0e, 0x69, 0x73, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, - 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, - 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x11, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x18, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x50, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, - 0x73, 0x22, 0x78, 0x0a, 0x0e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x57, 0x73, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x72, 0x61, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x72, 0x61, 0x6c, 0x12, - 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x59, 0x0a, 0x0f, 0x44, - 0x75, 0x62, 0x62, 0x6f, 0x44, 0x64, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, - 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x47, 0x6c, - 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, - 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, - 0x54, 0x6f, 0x5a, 0x6f, 0x6e, 0x65, 0x22, 0x59, 0x0a, 0x12, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x11, - 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, - 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x72, 0x61, - 0x6c, 0x3a, 0x60, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc5, - 0x91, 0xe1, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x3a, 0x5a, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1f, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc6, - 0x91, 0xe1, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, - 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, - 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x6b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x72, 0x61, 0x6c, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x72, 0x61, 0x6c, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x27, + 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x45, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x3a, 0x60, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc5, 0x91, 0xe1, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, + 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, + 0x65, 0x73, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -515,26 +151,19 @@ func file_api_mesh_options_proto_rawDescGZIP() []byte { return file_api_mesh_options_proto_rawDescData } -var file_api_mesh_options_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_api_mesh_options_proto_goTypes = []interface{}{ - (*DubboResourceOptions)(nil), // 0: dubbo.mesh.DubboResourceOptions - (*DubboWsOptions)(nil), // 1: dubbo.mesh.DubboWsOptions - (*DubboDdsOptions)(nil), // 2: dubbo.mesh.DubboDdsOptions - (*DubboPolicyOptions)(nil), // 3: dubbo.mesh.DubboPolicyOptions - (*descriptorpb.MessageOptions)(nil), // 4: google.protobuf.MessageOptions +var file_api_mesh_options_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_api_mesh_options_proto_goTypes = []any{ + (*DubboResourceOptions)(nil), // 0: dubbo.mesh.DubboResourceOptions + (*descriptor.MessageOptions)(nil), // 1: google.protobuf.MessageOptions } var file_api_mesh_options_proto_depIdxs = []int32{ - 2, // 0: dubbo.mesh.DubboResourceOptions.dds:type_name -> dubbo.mesh.DubboDdsOptions - 1, // 1: dubbo.mesh.DubboResourceOptions.ws:type_name -> dubbo.mesh.DubboWsOptions - 4, // 2: dubbo.mesh.resource:extendee -> google.protobuf.MessageOptions - 4, // 3: dubbo.mesh.policy:extendee -> google.protobuf.MessageOptions - 0, // 4: dubbo.mesh.resource:type_name -> dubbo.mesh.DubboResourceOptions - 3, // 5: dubbo.mesh.policy:type_name -> dubbo.mesh.DubboPolicyOptions - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 4, // [4:6] is the sub-list for extension type_name - 2, // [2:4] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 1, // 0: dubbo.mesh.resource:extendee -> google.protobuf.MessageOptions + 0, // 1: dubbo.mesh.resource:type_name -> dubbo.mesh.DubboResourceOptions + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 1, // [1:2] is the sub-list for extension type_name + 0, // [0:1] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_api_mesh_options_proto_init() } @@ -542,64 +171,14 @@ func file_api_mesh_options_proto_init() { if File_api_mesh_options_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_api_mesh_options_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DubboResourceOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_mesh_options_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DubboWsOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_mesh_options_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DubboDdsOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_mesh_options_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DubboPolicyOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_mesh_options_proto_rawDesc, NumEnums: 0, - NumMessages: 4, - NumExtensions: 2, + NumMessages: 1, + NumExtensions: 1, NumServices: 0, }, GoTypes: file_api_mesh_options_proto_goTypes, diff --git a/api/mesh/options.proto b/api/mesh/options.proto index 02dfe2f8e..840b36a70 100644 --- a/api/mesh/options.proto +++ b/api/mesh/options.proto @@ -7,81 +7,19 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh"; import "google/protobuf/descriptor.proto"; message DubboResourceOptions { - // Name of the Dubbo resource struct. + // Name and type of the dubbo resource struct. string name = 1; - // Name and value of the modelResourceType constant. - string type = 2; - - // True if this resource has global scope. Otherwise it will be mesh scope. - bool global = 3; + // The name of the resource showed as plural + string plural_name = 2; // Name of the resource's Go package. - string package = 4; - - // Whether to skip type registration for this resource. - bool skip_registration = 6; - - DubboDdsOptions dds = 10; - DubboWsOptions ws = 7; - - // Whether scope is "Namespace"; Otherwise to "Cluster". - bool scope_namespace = 11; - - // Whether to skip generation of native API helper functions. - bool skip_kubernetes_wrappers = 12; - - // Whether to generate Inspect API endpoint - bool allow_to_inspect = 13; - - // If resource has more than one version, then the flag defines which version - // is used in the storage. All other versions must be convertible to it. - bool storage_version = 14; - - // The name of the policy showed as plural to be displayed in the UI and maybe - // CLI - string plural_display_name = 15; - - // Is Experimental indicates if a policy is in experimental state (might not - // be production ready). - bool is_experimental = 16; - - // Columns to set using `+kubebuilder::printcolumns` - repeated string additional_printer_columns = 17; - - // Whether the resource has a matching insight type - bool has_insights = 18; -} - -message DubboWsOptions { - // Name is the name of the policy for resource name usage in path. - string name = 1; - // Plural is only to be set if the plural of the resource is irregular (not - // just adding a 's' at the end). - string plural = 2; - // ReadOnly if the resource is read only. - bool read_only = 3; - // AdminOnly whether this entity requires admin auth to access these - // endpoints. - bool admin_only = 4; -} - -message DubboDdsOptions { - // SendToGlobal whether this entity will be sent from zone cp to global cp - bool send_to_global = 1; - // SendToZone whether this entity will be sent from global cp to zone cp - bool send_to_zone = 2; -} + string package = 3; -message DubboPolicyOptions { - // Whether to skip type registration for this resource. - bool skip_registration = 1; - // An optional alternative plural form if this is unset default to a standard - // derivation of the name - string plural = 2; + // Is Experimental indicates if a resource is in experimental state. + bool is_experimental = 4; } extend google.protobuf.MessageOptions { DubboResourceOptions resource = 43534533; // 'dubbo' - DubboPolicyOptions policy = 43534534; // 'dubbo' } diff --git a/api/mesh/v1alpha1/affinity_route.pb.go b/api/mesh/v1alpha1/affinity_route.pb.go index 0fcda9c5e..f02703e36 100644 --- a/api/mesh/v1alpha1/affinity_route.pb.go +++ b/api/mesh/v1alpha1/affinity_route.pb.go @@ -26,12 +26,14 @@ type AffinityRoute struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ConfigVersion string `protobuf:"bytes,1,opt,name=configVersion,proto3" json:"configVersion,omitempty"` - Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` // must be chosen from `service` and `application` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // specifies which service or application the rule body acts on - Runtime bool `protobuf:"varint,4,opt,name=runtime,proto3" json:"runtime,omitempty"` - Enabled bool `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled,omitempty"` - Affinity *AffinityAware `protobuf:"bytes,6,opt,name=affinity,proto3" json:"affinity,omitempty"` + ConfigVersion string `protobuf:"bytes,1,opt,name=configVersion,proto3" json:"configVersion,omitempty"` + // scope must be chosen from `service` and `application` + Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` + // key specifies which service or application the rule body acts on + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Runtime bool `protobuf:"varint,4,opt,name=runtime,proto3" json:"runtime,omitempty"` + Enabled bool `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled,omitempty"` + Affinity *AffinityAware `protobuf:"bytes,6,opt,name=affinity,proto3" json:"affinity,omitempty"` } func (x *AffinityRoute) Reset() { @@ -167,7 +169,7 @@ var file_api_mesh_v1alpha1_affinity_route_proto_rawDesc = []byte{ 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x02, 0x0a, 0x0d, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x01, 0x0a, 0x0d, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, @@ -180,20 +182,17 @@ var file_api_mesh_v1alpha1_affinity_route_proto_rawDesc = []byte{ 0x69, 0x6e, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x41, 0x77, 0x61, 0x72, 0x65, 0x52, - 0x08, 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x3a, 0x59, 0xaa, 0x8c, 0x89, 0xa6, 0x01, - 0x53, 0x0a, 0x15, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0d, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x1f, 0x0a, - 0x0d, 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x0e, - 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x02, - 0x10, 0x01, 0x68, 0x01, 0x22, 0x37, 0x0a, 0x0d, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, - 0x41, 0x77, 0x61, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x42, 0x31, 0x5a, - 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, - 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x08, 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x3a, 0x2b, 0xaa, 0x8c, 0x89, 0xa6, 0x01, + 0x25, 0x0a, 0x0d, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x12, 0x0e, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x22, 0x37, 0x0a, 0x0d, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x79, 0x41, 0x77, 0x61, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x42, + 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, + 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/affinity_route.proto b/api/mesh/v1alpha1/affinity_route.proto index 7bc699867..96751ff78 100644 --- a/api/mesh/v1alpha1/affinity_route.proto +++ b/api/mesh/v1alpha1/affinity_route.proto @@ -7,17 +7,16 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; import "api/mesh/options.proto"; message AffinityRoute { - option (dubbo.mesh.resource).name = "AffinityRouteResource"; - option (dubbo.mesh.resource).type = "AffinityRoute"; + option (dubbo.mesh.resource).name = "AffinityRoute"; + option (dubbo.mesh.resource).plural_name = "AffinityRoutes"; option (dubbo.mesh.resource).package = "mesh"; - option (dubbo.mesh.resource).dds.send_to_zone = true; - option (dubbo.mesh.resource).ws.name = "affinityroute"; - option (dubbo.mesh.resource).ws.plural = "affinityroutes"; - option (dubbo.mesh.resource).allow_to_inspect = true; + option (dubbo.mesh.resource).is_experimental = false; string configVersion = 1; - string scope = 2; // must be chosen from `service` and `application` - string key = 3; // specifies which service or application the rule body acts on + // scope must be chosen from `service` and `application` + string scope = 2; + // key specifies which service or application the rule body acts on + string key = 3; bool runtime = 4; bool enabled = 5; AffinityAware affinity = 6; diff --git a/api/mesh/v1alpha1/application.pb.go b/api/mesh/v1alpha1/application.pb.go index 59777adb3..2a3b74858 100644 --- a/api/mesh/v1alpha1/application.pb.go +++ b/api/mesh/v1alpha1/application.pb.go @@ -26,8 +26,8 @@ type Application struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Features map[string]string `protobuf:"bytes,99,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + InstanceCount int64 `protobuf:"varint,2,opt,name=instanceCount,proto3" json:"instanceCount,omitempty"` } func (x *Application) Reset() { @@ -67,11 +67,11 @@ func (x *Application) GetName() string { return "" } -func (x *Application) GetFeatures() map[string]string { +func (x *Application) GetInstanceCount() int64 { if x != nil { - return x.Features + return x.InstanceCount } - return nil + return 0 } var File_api_mesh_v1alpha1_application_proto protoreflect.FileDescriptor @@ -82,26 +82,18 @@ var file_api_mesh_v1alpha1_application_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xfd, 0x01, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x63, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, - 0x51, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x4b, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x41, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x3a, - 0x1d, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0c, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x58, 0x01, - 0x68, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x29, 0xaa, 0x8c, 0x89, + 0xa6, 0x01, 0x23, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x04, + 0x6d, 0x65, 0x73, 0x68, 0x20, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, + 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -116,18 +108,16 @@ func file_api_mesh_v1alpha1_application_proto_rawDescGZIP() []byte { return file_api_mesh_v1alpha1_application_proto_rawDescData } -var file_api_mesh_v1alpha1_application_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_api_mesh_v1alpha1_application_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_api_mesh_v1alpha1_application_proto_goTypes = []any{ (*Application)(nil), // 0: dubbo.mesh.v1alpha1.Application - nil, // 1: dubbo.mesh.v1alpha1.Application.FeaturesEntry } var file_api_mesh_v1alpha1_application_proto_depIdxs = []int32{ - 1, // 0: dubbo.mesh.v1alpha1.Application.features:type_name -> dubbo.mesh.v1alpha1.Application.FeaturesEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_api_mesh_v1alpha1_application_proto_init() } @@ -141,7 +131,7 @@ func file_api_mesh_v1alpha1_application_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_mesh_v1alpha1_application_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/api/mesh/v1alpha1/application.proto b/api/mesh/v1alpha1/application.proto index 325054d5e..f56b41873 100644 --- a/api/mesh/v1alpha1/application.proto +++ b/api/mesh/v1alpha1/application.proto @@ -8,17 +8,13 @@ import "api/mesh/options.proto"; message Application { - option (dubbo.mesh.resource).name = "ApplicationResource"; - option (dubbo.mesh.resource).type = "Application"; + option (dubbo.mesh.resource).name = "Application"; + option (dubbo.mesh.resource).plural_name = "Applications"; option (dubbo.mesh.resource).package = "mesh"; - option (dubbo.mesh.resource).ws.name = "application"; - option (dubbo.mesh.resource).ws.plural = "applications"; - option (dubbo.mesh.resource).ws.read_only = true; - option (dubbo.mesh.resource).scope_namespace = true; - option (dubbo.mesh.resource).allow_to_inspect = true; + option (dubbo.mesh.resource).is_experimental = true; string name = 1; - map features = 99; + int64 instanceCount = 2; } \ No newline at end of file diff --git a/api/mesh/v1alpha1/condition_route.pb.go b/api/mesh/v1alpha1/condition_route.pb.go index d935c579f..5501eaf51 100644 --- a/api/mesh/v1alpha1/condition_route.pb.go +++ b/api/mesh/v1alpha1/condition_route.pb.go @@ -453,7 +453,7 @@ var file_api_mesh_v1alpha1_condition_route_proto_rawDesc = []byte{ 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x05, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x05, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x33, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, @@ -492,13 +492,10 @@ var file_api_mesh_v1alpha1_condition_route_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x5d, 0xaa, 0x8c, 0x89, - 0xa6, 0x01, 0x57, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x04, 0x6d, 0x65, 0x73, - 0x68, 0x3a, 0x21, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x0f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x52, 0x02, 0x10, 0x01, 0x68, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x6f, + 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2d, 0xaa, 0x8c, 0x89, + 0xa6, 0x01, 0x27, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x0f, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, diff --git a/api/mesh/v1alpha1/condition_route.proto b/api/mesh/v1alpha1/condition_route.proto index 797d94707..6eeddd59a 100644 --- a/api/mesh/v1alpha1/condition_route.proto +++ b/api/mesh/v1alpha1/condition_route.proto @@ -7,13 +7,10 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; import "api/mesh/options.proto"; message ConditionRoute { - option (dubbo.mesh.resource).name = "ConditionRouteResource"; - option (dubbo.mesh.resource).type = "ConditionRoute"; + option (dubbo.mesh.resource).name = "ConditionRoute"; + option (dubbo.mesh.resource).plural_name = "ConditionRoutes"; option (dubbo.mesh.resource).package = "mesh"; - option (dubbo.mesh.resource).dds.send_to_zone = true; - option (dubbo.mesh.resource).ws.name = "conditionroute"; - option (dubbo.mesh.resource).ws.plural = "conditionroutes"; - option (dubbo.mesh.resource).allow_to_inspect = true; + option (dubbo.mesh.resource).is_experimental = false; message v3 { string configVersion = 1; diff --git a/api/mesh/v1alpha1/dynamic_config.pb.go b/api/mesh/v1alpha1/dynamic_config.pb.go index 0d7e04e91..a5bbf5d18 100644 --- a/api/mesh/v1alpha1/dynamic_config.pb.go +++ b/api/mesh/v1alpha1/dynamic_config.pb.go @@ -409,7 +409,7 @@ var file_api_mesh_v1alpha1_dynamic_config_proto_rawDesc = []byte{ 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x5f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, 0x02, 0x0a, 0x0d, 0x44, 0x79, 0x6e, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x01, 0x0a, 0x0d, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, @@ -421,77 +421,74 @@ var file_api_mesh_v1alpha1_dynamic_config_proto_rawDesc = []byte{ 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x73, 0x3a, 0x59, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x53, 0x0a, 0x15, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x0d, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0x04, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x1f, 0x0a, 0x0d, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x02, 0x10, 0x01, 0x68, 0x01, 0x22, 0xd5, 0x03, 0x0a, - 0x0e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, - 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, - 0x53, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, - 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x39, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, - 0x10, 0x5f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x5f, 0x63, - 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x42, 0x79, 0x43, 0x70, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd9, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x0b, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x22, 0x54, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x63, 0x69, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x72, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x22, 0x49, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x36, 0x0a, 0x05, 0x6f, 0x6e, 0x65, - 0x6f, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, - 0x66, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x3a, 0x2b, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x25, 0x0a, 0x0d, 0x44, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x22, 0xd5, + 0x03, 0x0a, 0x0e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x73, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x12, 0x53, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x26, 0x0a, 0x10, 0x5f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x79, + 0x5f, 0x63, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x42, 0x79, 0x43, 0x70, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd9, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x75, 0x62, + 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x0b, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x75, 0x62, + 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x22, 0x54, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x69, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, + 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x22, 0x49, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x36, 0x0a, 0x05, 0x6f, + 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x75, 0x62, + 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6f, 0x6e, + 0x65, 0x6f, 0x66, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/dynamic_config.proto b/api/mesh/v1alpha1/dynamic_config.proto index 7ebd20909..427f7e6c2 100644 --- a/api/mesh/v1alpha1/dynamic_config.proto +++ b/api/mesh/v1alpha1/dynamic_config.proto @@ -8,13 +8,10 @@ import "api/mesh/options.proto"; import "api/mesh/v1alpha1/tag_route.proto"; message DynamicConfig { - option (dubbo.mesh.resource).name = "DynamicConfigResource"; - option (dubbo.mesh.resource).type = "DynamicConfig"; + option (dubbo.mesh.resource).name = "DynamicConfig"; + option (dubbo.mesh.resource).plural_name = "DynamicConfigs"; option (dubbo.mesh.resource).package = "mesh"; - option (dubbo.mesh.resource).dds.send_to_zone = true; - option (dubbo.mesh.resource).ws.name = "dynamicconfig"; - option (dubbo.mesh.resource).ws.plural = "dynamicconfigs"; - option (dubbo.mesh.resource).allow_to_inspect = true; + option (dubbo.mesh.resource).is_experimental = false; string key = 1; string scope = 2; diff --git a/api/mesh/v1alpha1/instance.pb.go b/api/mesh/v1alpha1/instance.pb.go index 38ab8a4a0..fea32bda2 100644 --- a/api/mesh/v1alpha1/instance.pb.go +++ b/api/mesh/v1alpha1/instance.pb.go @@ -21,21 +21,32 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Instance is merged from RuntimeInstance and RPCInstance, indicates a runtime entity of a specific dubbo application type Instance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` - Port string `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"` - Image string `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"` - AppName string `protobuf:"bytes,5,opt,name=appName,proto3" json:"appName,omitempty"` - CreateTime string `protobuf:"bytes,6,opt,name=createTime,proto3" json:"createTime,omitempty"` - StartTime string `protobuf:"bytes,7,opt,name=startTime,proto3" json:"startTime,omitempty"` - ReadyTime string `protobuf:"bytes,8,opt,name=readyTime,proto3" json:"readyTime,omitempty"` - RegisterTime string `protobuf:"bytes,9,opt,name=registerTime,proto3" json:"registerTime,omitempty"` - Features map[string]string `protobuf:"bytes,99,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` + RpcPort int32 `protobuf:"varint,3,opt,name=rpcPort,proto3" json:"rpcPort,omitempty"` + QosPort int32 `protobuf:"varint,4,opt,name=qosPort,proto3" json:"qosPort,omitempty"` + AppName string `protobuf:"bytes,5,opt,name=appName,proto3" json:"appName,omitempty"` + ReleaseVersion string `protobuf:"bytes,6,opt,name=releaseVersion,proto3" json:"releaseVersion,omitempty"` + RegisterTime string `protobuf:"bytes,7,opt,name=registerTime,proto3" json:"registerTime,omitempty"` + UnregisterTime string `protobuf:"bytes,8,opt,name=unregisterTime,proto3" json:"unregisterTime,omitempty"` + Protocol string `protobuf:"bytes,9,opt,name=protocol,proto3" json:"protocol,omitempty"` + Serialization string `protobuf:"bytes,10,opt,name=serialization,proto3" json:"serialization,omitempty"` + Tags map[string]string `protobuf:"bytes,50,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Image string `protobuf:"bytes,51,opt,name=image,proto3" json:"image,omitempty"` + CreateTime string `protobuf:"bytes,52,opt,name=createTime,proto3" json:"createTime,omitempty"` + StartTime string `protobuf:"bytes,53,opt,name=startTime,proto3" json:"startTime,omitempty"` + ReadyTime string `protobuf:"bytes,54,opt,name=readyTime,proto3" json:"readyTime,omitempty"` + DeployState string `protobuf:"bytes,55,opt,name=deployState,proto3" json:"deployState,omitempty"` + WorkloadType string `protobuf:"bytes,56,opt,name=workloadType,proto3" json:"workloadType,omitempty"` + WorkloadName string `protobuf:"bytes,57,opt,name=workloadName,proto3" json:"workloadName,omitempty"` + Node string `protobuf:"bytes,58,opt,name=node,proto3" json:"node,omitempty"` + Probes []*Instance_Probe `protobuf:"bytes,59,rep,name=probes,proto3" json:"probes,omitempty"` } func (x *Instance) Reset() { @@ -82,18 +93,18 @@ func (x *Instance) GetIp() string { return "" } -func (x *Instance) GetPort() string { +func (x *Instance) GetRpcPort() int32 { if x != nil { - return x.Port + return x.RpcPort } - return "" + return 0 } -func (x *Instance) GetImage() string { +func (x *Instance) GetQosPort() int32 { if x != nil { - return x.Image + return x.QosPort } - return "" + return 0 } func (x *Instance) GetAppName() string { @@ -103,6 +114,55 @@ func (x *Instance) GetAppName() string { return "" } +func (x *Instance) GetReleaseVersion() string { + if x != nil { + return x.ReleaseVersion + } + return "" +} + +func (x *Instance) GetRegisterTime() string { + if x != nil { + return x.RegisterTime + } + return "" +} + +func (x *Instance) GetUnregisterTime() string { + if x != nil { + return x.UnregisterTime + } + return "" +} + +func (x *Instance) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +func (x *Instance) GetSerialization() string { + if x != nil { + return x.Serialization + } + return "" +} + +func (x *Instance) GetTags() map[string]string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Instance) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + func (x *Instance) GetCreateTime() string { if x != nil { return x.CreateTime @@ -124,20 +184,94 @@ func (x *Instance) GetReadyTime() string { return "" } -func (x *Instance) GetRegisterTime() string { +func (x *Instance) GetDeployState() string { if x != nil { - return x.RegisterTime + return x.DeployState } return "" } -func (x *Instance) GetFeatures() map[string]string { +func (x *Instance) GetWorkloadType() string { if x != nil { - return x.Features + return x.WorkloadType + } + return "" +} + +func (x *Instance) GetWorkloadName() string { + if x != nil { + return x.WorkloadName + } + return "" +} + +func (x *Instance) GetNode() string { + if x != nil { + return x.Node + } + return "" +} + +func (x *Instance) GetProbes() []*Instance_Probe { + if x != nil { + return x.Probes } return nil } +type Instance_Probe struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` +} + +func (x *Instance_Probe) Reset() { + *x = Instance_Probe{} + mi := &file_api_mesh_v1alpha1_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Instance_Probe) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Instance_Probe) ProtoMessage() {} + +func (x *Instance_Probe) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_instance_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Instance_Probe.ProtoReflect.Descriptor instead. +func (*Instance_Probe) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_instance_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Instance_Probe) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Instance_Probe) GetPort() int32 { + if x != nil { + return x.Port + } + return 0 +} + var File_api_mesh_v1alpha1_instance_proto protoreflect.FileDescriptor var file_api_mesh_v1alpha1_instance_proto_rawDesc = []byte{ @@ -146,38 +280,62 @@ var file_api_mesh_v1alpha1_instance_proto_rawDesc = []byte{ 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xbf, 0x03, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0xb7, 0x06, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, - 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x18, 0x63, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, 0x3b, 0x0a, - 0x0d, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x45, 0xaa, 0x8c, 0x89, 0xa6, - 0x01, 0x3f, 0x0a, 0x10, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x04, - 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x17, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x58, 0x01, 0x68, - 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x18, 0x0a, 0x07, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x6f, + 0x73, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x6f, 0x73, + 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, + 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x6e, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x24, + 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x32, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x33, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x34, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x18, 0x35, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x36, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x37, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x38, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x39, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x3a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x3b, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x1a, 0x2f, + 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, + 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x23, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x1d, + 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x09, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x20, 0x01, 0x4a, 0x04, 0x08, + 0x0b, 0x10, 0x32, 0x4a, 0x04, 0x08, 0x3c, 0x10, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, + 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, + 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -192,18 +350,20 @@ func file_api_mesh_v1alpha1_instance_proto_rawDescGZIP() []byte { return file_api_mesh_v1alpha1_instance_proto_rawDescData } -var file_api_mesh_v1alpha1_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_api_mesh_v1alpha1_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_api_mesh_v1alpha1_instance_proto_goTypes = []any{ - (*Instance)(nil), // 0: dubbo.mesh.v1alpha1.Instance - nil, // 1: dubbo.mesh.v1alpha1.Instance.FeaturesEntry + (*Instance)(nil), // 0: dubbo.mesh.v1alpha1.Instance + (*Instance_Probe)(nil), // 1: dubbo.mesh.v1alpha1.Instance.Probe + nil, // 2: dubbo.mesh.v1alpha1.Instance.TagsEntry } var file_api_mesh_v1alpha1_instance_proto_depIdxs = []int32{ - 1, // 0: dubbo.mesh.v1alpha1.Instance.features:type_name -> dubbo.mesh.v1alpha1.Instance.FeaturesEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 0: dubbo.mesh.v1alpha1.Instance.tags:type_name -> dubbo.mesh.v1alpha1.Instance.TagsEntry + 1, // 1: dubbo.mesh.v1alpha1.Instance.probes:type_name -> dubbo.mesh.v1alpha1.Instance.Probe + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_api_mesh_v1alpha1_instance_proto_init() } @@ -217,7 +377,7 @@ func file_api_mesh_v1alpha1_instance_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_mesh_v1alpha1_instance_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/api/mesh/v1alpha1/instance.proto b/api/mesh/v1alpha1/instance.proto index 02f5acf91..33ec87196 100644 --- a/api/mesh/v1alpha1/instance.proto +++ b/api/mesh/v1alpha1/instance.proto @@ -6,34 +6,67 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; import "api/mesh/options.proto"; - +// Instance is merged from RuntimeInstance and RPCInstance, indicates a runtime entity of a specific dubbo application message Instance { - option (dubbo.mesh.resource).name = "InstanceResource"; - option (dubbo.mesh.resource).type = "Instance"; + option (dubbo.mesh.resource).name = "Instance"; + option (dubbo.mesh.resource).plural_name = "Instances"; option (dubbo.mesh.resource).package = "mesh"; - option (dubbo.mesh.resource).ws.name = "instance"; - option (dubbo.mesh.resource).ws.plural = "instances"; - option (dubbo.mesh.resource).ws.read_only = true; - option (dubbo.mesh.resource).scope_namespace = true; - option (dubbo.mesh.resource).allow_to_inspect = true; + option (dubbo.mesh.resource).is_experimental = true; + + message Probe { + string type = 1; + int32 port = 2; + } + + /* + FROM RPCInstance + */ string name = 1; string ip = 2; - string port = 3; + int32 rpcPort = 3; - string image = 4; + int32 qosPort = 4; string appName = 5; - string createTime = 6; + string releaseVersion = 6; + + string registerTime = 7; + + string unregisterTime = 8; + + string protocol = 9; + + string serialization = 10; + + map tags = 50; + + reserved 11 to 49; + + /* + FROM RuntimeInstance + */ + + string image = 51; + + string createTime = 52; + + string startTime = 53; + + string readyTime = 54; + + string deployState = 55; + + string workloadType = 56; - string startTime = 7; + string workloadName = 57; - string readyTime = 8; + string node = 58; - string registerTime = 9; + repeated Probe probes = 59; - map features = 99; + reserved 60 to 100; } \ No newline at end of file diff --git a/api/mesh/v1alpha1/known_backends.go b/api/mesh/v1alpha1/known_backends.go deleted file mode 100644 index 54cd87ecc..000000000 --- a/api/mesh/v1alpha1/known_backends.go +++ /dev/null @@ -1,11 +0,0 @@ -package v1alpha1 - -const ( - LoggingTcpType = "tcp" - LoggingFileType = "file" - - TracingZipkinType = "zipkin" - TracingDatadogType = "datadog" - - MetricsPrometheusType = "prometheus" -) diff --git a/api/mesh/v1alpha1/mapping.pb.go b/api/mesh/v1alpha1/mapping.pb.go deleted file mode 100644 index 45cc9eb3e..000000000 --- a/api/mesh/v1alpha1/mapping.pb.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.1 -// protoc v3.12.4 -// source: api/mesh/v1alpha1/mapping.proto - -package v1alpha1 - -import ( - _ "github.com/apache/dubbo-admin/api/mesh" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Mapping struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty"` - InterfaceName string `protobuf:"bytes,2,opt,name=interfaceName,proto3" json:"interfaceName,omitempty"` - ApplicationNames []string `protobuf:"bytes,3,rep,name=applicationNames,proto3" json:"applicationNames,omitempty"` -} - -func (x *Mapping) Reset() { - *x = Mapping{} - mi := &file_api_mesh_v1alpha1_mapping_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Mapping) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Mapping) ProtoMessage() {} - -func (x *Mapping) ProtoReflect() protoreflect.Message { - mi := &file_api_mesh_v1alpha1_mapping_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Mapping.ProtoReflect.Descriptor instead. -func (*Mapping) Descriptor() ([]byte, []int) { - return file_api_mesh_v1alpha1_mapping_proto_rawDescGZIP(), []int{0} -} - -func (x *Mapping) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *Mapping) GetInterfaceName() string { - if x != nil { - return x.InterfaceName - } - return "" -} - -func (x *Mapping) GetApplicationNames() []string { - if x != nil { - return x.ApplicationNames - } - return nil -} - -var File_api_mesh_v1alpha1_mapping_proto protoreflect.FileDescriptor - -var file_api_mesh_v1alpha1_mapping_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, - 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, - 0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, - 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x24, - 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x3a, 0x45, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x3f, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x07, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x22, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x13, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x12, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x04, 0x08, - 0x01, 0x10, 0x01, 0x58, 0x01, 0x68, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, - 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_api_mesh_v1alpha1_mapping_proto_rawDescOnce sync.Once - file_api_mesh_v1alpha1_mapping_proto_rawDescData = file_api_mesh_v1alpha1_mapping_proto_rawDesc -) - -func file_api_mesh_v1alpha1_mapping_proto_rawDescGZIP() []byte { - file_api_mesh_v1alpha1_mapping_proto_rawDescOnce.Do(func() { - file_api_mesh_v1alpha1_mapping_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_mapping_proto_rawDescData) - }) - return file_api_mesh_v1alpha1_mapping_proto_rawDescData -} - -var file_api_mesh_v1alpha1_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_api_mesh_v1alpha1_mapping_proto_goTypes = []any{ - (*Mapping)(nil), // 0: dubbo.mesh.v1alpha1.Mapping -} -var file_api_mesh_v1alpha1_mapping_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_api_mesh_v1alpha1_mapping_proto_init() } -func file_api_mesh_v1alpha1_mapping_proto_init() { - if File_api_mesh_v1alpha1_mapping_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_mesh_v1alpha1_mapping_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_api_mesh_v1alpha1_mapping_proto_goTypes, - DependencyIndexes: file_api_mesh_v1alpha1_mapping_proto_depIdxs, - MessageInfos: file_api_mesh_v1alpha1_mapping_proto_msgTypes, - }.Build() - File_api_mesh_v1alpha1_mapping_proto = out.File - file_api_mesh_v1alpha1_mapping_proto_rawDesc = nil - file_api_mesh_v1alpha1_mapping_proto_goTypes = nil - file_api_mesh_v1alpha1_mapping_proto_depIdxs = nil -} diff --git a/api/mesh/v1alpha1/mapping.proto b/api/mesh/v1alpha1/mapping.proto deleted file mode 100644 index 6c617b556..000000000 --- a/api/mesh/v1alpha1/mapping.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package dubbo.mesh.v1alpha1; - -option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; - -import "api/mesh/options.proto"; - -message Mapping { - option (dubbo.mesh.resource).name = "MappingResource"; - option (dubbo.mesh.resource).type = "Mapping"; - option (dubbo.mesh.resource).package = "mesh"; - option (dubbo.mesh.resource).dds.send_to_global = true; - option (dubbo.mesh.resource).dds.send_to_zone = true; - option (dubbo.mesh.resource).ws.name = "mapping"; - option (dubbo.mesh.resource).ws.plural = "mappings"; - option (dubbo.mesh.resource).scope_namespace = true; - option (dubbo.mesh.resource).allow_to_inspect = true; - - string zone = 1; - string interfaceName = 2; - repeated string applicationNames = 3; -} diff --git a/api/mesh/v1alpha1/rpc_instance.pb.go b/api/mesh/v1alpha1/rpc_instance.pb.go new file mode 100644 index 000000000..58672d779 --- /dev/null +++ b/api/mesh/v1alpha1/rpc_instance.pb.go @@ -0,0 +1,185 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc v3.12.4 +// source: api/mesh/v1alpha1/rpc_instance.proto + +package v1alpha1 + +import ( + _ "github.com/apache/dubbo-admin/api/mesh" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// RPCInstance is retrieved from Discovery, defines the attributes of instance during service discovery and rpc call +type RPCInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` + Port string `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"` + AppName string `protobuf:"bytes,5,opt,name=appName,proto3" json:"appName,omitempty"` + RegisterTime string `protobuf:"bytes,9,opt,name=registerTime,proto3" json:"registerTime,omitempty"` + UnregisterTime string `protobuf:"bytes,10,opt,name=unregisterTime,proto3" json:"unregisterTime,omitempty"` +} + +func (x *RPCInstance) Reset() { + *x = RPCInstance{} + mi := &file_api_mesh_v1alpha1_rpc_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RPCInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPCInstance) ProtoMessage() {} + +func (x *RPCInstance) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_rpc_instance_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RPCInstance.ProtoReflect.Descriptor instead. +func (*RPCInstance) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_rpc_instance_proto_rawDescGZIP(), []int{0} +} + +func (x *RPCInstance) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RPCInstance) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +func (x *RPCInstance) GetPort() string { + if x != nil { + return x.Port + } + return "" +} + +func (x *RPCInstance) GetAppName() string { + if x != nil { + return x.AppName + } + return "" +} + +func (x *RPCInstance) GetRegisterTime() string { + if x != nil { + return x.RegisterTime + } + return "" +} + +func (x *RPCInstance) GetUnregisterTime() string { + if x != nil { + return x.UnregisterTime + } + return "" +} + +var File_api_mesh_v1alpha1_rpc_instance_proto protoreflect.FileDescriptor + +var file_api_mesh_v1alpha1_rpc_instance_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, + 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x0a, 0x0b, 0x52, 0x50, 0x43, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, + 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x6e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, + 0x65, 0x3a, 0x29, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x23, 0x0a, 0x0b, 0x52, 0x50, 0x43, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0c, 0x52, 0x50, 0x43, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x20, 0x01, 0x42, 0x31, 0x5a, 0x2f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, + 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_mesh_v1alpha1_rpc_instance_proto_rawDescOnce sync.Once + file_api_mesh_v1alpha1_rpc_instance_proto_rawDescData = file_api_mesh_v1alpha1_rpc_instance_proto_rawDesc +) + +func file_api_mesh_v1alpha1_rpc_instance_proto_rawDescGZIP() []byte { + file_api_mesh_v1alpha1_rpc_instance_proto_rawDescOnce.Do(func() { + file_api_mesh_v1alpha1_rpc_instance_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_rpc_instance_proto_rawDescData) + }) + return file_api_mesh_v1alpha1_rpc_instance_proto_rawDescData +} + +var file_api_mesh_v1alpha1_rpc_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_api_mesh_v1alpha1_rpc_instance_proto_goTypes = []any{ + (*RPCInstance)(nil), // 0: dubbo.mesh.v1alpha1.RPCInstance +} +var file_api_mesh_v1alpha1_rpc_instance_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_api_mesh_v1alpha1_rpc_instance_proto_init() } +func file_api_mesh_v1alpha1_rpc_instance_proto_init() { + if File_api_mesh_v1alpha1_rpc_instance_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_mesh_v1alpha1_rpc_instance_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_api_mesh_v1alpha1_rpc_instance_proto_goTypes, + DependencyIndexes: file_api_mesh_v1alpha1_rpc_instance_proto_depIdxs, + MessageInfos: file_api_mesh_v1alpha1_rpc_instance_proto_msgTypes, + }.Build() + File_api_mesh_v1alpha1_rpc_instance_proto = out.File + file_api_mesh_v1alpha1_rpc_instance_proto_rawDesc = nil + file_api_mesh_v1alpha1_rpc_instance_proto_goTypes = nil + file_api_mesh_v1alpha1_rpc_instance_proto_depIdxs = nil +} diff --git a/api/mesh/v1alpha1/rpc_instance.proto b/api/mesh/v1alpha1/rpc_instance.proto new file mode 100644 index 000000000..b3fe877df --- /dev/null +++ b/api/mesh/v1alpha1/rpc_instance.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package dubbo.mesh.v1alpha1; + +option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; + +import "api/mesh/options.proto"; + +// RPCInstance is retrieved from Discovery, defines the attributes of instance during service discovery and rpc call +message RPCInstance { + option (dubbo.mesh.resource).name = "RPCInstance"; + option (dubbo.mesh.resource).plural_name = "RPCInstances"; + option (dubbo.mesh.resource).package = "mesh"; + option (dubbo.mesh.resource).is_experimental = true; + + string name = 1; + + string ip = 2; + + string port = 3; + + string appName = 5; + + string registerTime = 9; + + string unregisterTime = 10; + +} \ No newline at end of file diff --git a/api/mesh/v1alpha1/rpc_instance_metadata.pb.go b/api/mesh/v1alpha1/rpc_instance_metadata.pb.go new file mode 100644 index 000000000..313601553 --- /dev/null +++ b/api/mesh/v1alpha1/rpc_instance_metadata.pb.go @@ -0,0 +1,284 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc v3.12.4 +// source: api/mesh/v1alpha1/rpc_instance_metadata.proto + +package v1alpha1 + +import ( + _ "github.com/apache/dubbo-admin/api/mesh" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RPCInstanceMetaData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"` + Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"` + // key format is '{group}/{interface name}:{version}:{protocol}' + Services map[string]*ServiceInfo `protobuf:"bytes,4,rep,name=services,proto3" json:"services,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *RPCInstanceMetaData) Reset() { + *x = RPCInstanceMetaData{} + mi := &file_api_mesh_v1alpha1_rpc_instance_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RPCInstanceMetaData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPCInstanceMetaData) ProtoMessage() {} + +func (x *RPCInstanceMetaData) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_rpc_instance_metadata_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RPCInstanceMetaData.ProtoReflect.Descriptor instead. +func (*RPCInstanceMetaData) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *RPCInstanceMetaData) GetApp() string { + if x != nil { + return x.App + } + return "" +} + +func (x *RPCInstanceMetaData) GetRevision() string { + if x != nil { + return x.Revision + } + return "" +} + +func (x *RPCInstanceMetaData) GetServices() map[string]*ServiceInfo { + if x != nil { + return x.Services + } + return nil +} + +type ServiceInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` + Port int64 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"` + Path string `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"` + Params map[string]string `protobuf:"bytes,7,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ServiceInfo) Reset() { + *x = ServiceInfo{} + mi := &file_api_mesh_v1alpha1_rpc_instance_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServiceInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceInfo) ProtoMessage() {} + +func (x *ServiceInfo) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_rpc_instance_metadata_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead. +func (*ServiceInfo) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescGZIP(), []int{1} +} + +func (x *ServiceInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ServiceInfo) GetGroup() string { + if x != nil { + return x.Group + } + return "" +} + +func (x *ServiceInfo) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ServiceInfo) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +func (x *ServiceInfo) GetPort() int64 { + if x != nil { + return x.Port + } + return 0 +} + +func (x *ServiceInfo) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *ServiceInfo) GetParams() map[string]string { + if x != nil { + return x.Params + } + return nil +} + +var File_api_mesh_v1alpha1_rpc_instance_metadata_proto protoreflect.FileDescriptor + +var file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x02, 0x0a, + 0x13, 0x52, 0x50, 0x43, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x50, 0x43, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x37, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x31, 0x0a, 0x13, 0x52, + 0x70, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x14, 0x52, 0x70, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x22, 0x96, + 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x6f, + 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x39, 0x0a, 0x0b, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, + 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, + 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescOnce sync.Once + file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescData = file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDesc +) + +func file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescGZIP() []byte { + file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescOnce.Do(func() { + file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescData) + }) + return file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescData +} + +var file_api_mesh_v1alpha1_rpc_instance_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_api_mesh_v1alpha1_rpc_instance_metadata_proto_goTypes = []any{ + (*RPCInstanceMetaData)(nil), // 0: dubbo.mesh.v1alpha1.RPCInstanceMetaData + (*ServiceInfo)(nil), // 1: dubbo.mesh.v1alpha1.ServiceInfo + nil, // 2: dubbo.mesh.v1alpha1.RPCInstanceMetaData.ServicesEntry + nil, // 3: dubbo.mesh.v1alpha1.ServiceInfo.ParamsEntry +} +var file_api_mesh_v1alpha1_rpc_instance_metadata_proto_depIdxs = []int32{ + 2, // 0: dubbo.mesh.v1alpha1.RPCInstanceMetaData.services:type_name -> dubbo.mesh.v1alpha1.RPCInstanceMetaData.ServicesEntry + 3, // 1: dubbo.mesh.v1alpha1.ServiceInfo.params:type_name -> dubbo.mesh.v1alpha1.ServiceInfo.ParamsEntry + 1, // 2: dubbo.mesh.v1alpha1.RPCInstanceMetaData.ServicesEntry.value:type_name -> dubbo.mesh.v1alpha1.ServiceInfo + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_api_mesh_v1alpha1_rpc_instance_metadata_proto_init() } +func file_api_mesh_v1alpha1_rpc_instance_metadata_proto_init() { + if File_api_mesh_v1alpha1_rpc_instance_metadata_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_api_mesh_v1alpha1_rpc_instance_metadata_proto_goTypes, + DependencyIndexes: file_api_mesh_v1alpha1_rpc_instance_metadata_proto_depIdxs, + MessageInfos: file_api_mesh_v1alpha1_rpc_instance_metadata_proto_msgTypes, + }.Build() + File_api_mesh_v1alpha1_rpc_instance_metadata_proto = out.File + file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDesc = nil + file_api_mesh_v1alpha1_rpc_instance_metadata_proto_goTypes = nil + file_api_mesh_v1alpha1_rpc_instance_metadata_proto_depIdxs = nil +} diff --git a/api/mesh/v1alpha1/rpc_instance_metadata.proto b/api/mesh/v1alpha1/rpc_instance_metadata.proto new file mode 100644 index 000000000..ecccdd2f1 --- /dev/null +++ b/api/mesh/v1alpha1/rpc_instance_metadata.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package dubbo.mesh.v1alpha1; + +option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; + +import "api/mesh/options.proto"; + +message RPCInstanceMetaData { + option (dubbo.mesh.resource).name = "RpcInstanceMetadata"; + option (dubbo.mesh.resource).plural_name = "RpcInstanceMetaDatas"; + option (dubbo.mesh.resource).package = "mesh"; + option (dubbo.mesh.resource).is_experimental = false; + + string app = 1; + string revision = 2; + // key format is '{group}/{interface name}:{version}:{protocol}' + map services = 4; +} + +message ServiceInfo { + string name = 1; + string group = 2; + string version = 3; + string protocol = 4; + int64 port = 5; + string path = 6; + map params = 7; +} \ No newline at end of file diff --git a/api/mesh/v1alpha1/runtime_instance.pb.go b/api/mesh/v1alpha1/runtime_instance.pb.go new file mode 100644 index 000000000..97e5effc6 --- /dev/null +++ b/api/mesh/v1alpha1/runtime_instance.pb.go @@ -0,0 +1,215 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc v3.12.4 +// source: api/mesh/v1alpha1/runtime_instance.proto + +package v1alpha1 + +import ( + _ "github.com/apache/dubbo-admin/api/mesh" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// RuntimeInstance is retrieved from Engine, defines the attributes of instance in runtime environments +type RuntimeInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` + Port string `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"` + Image string `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"` + AppName string `protobuf:"bytes,5,opt,name=appName,proto3" json:"appName,omitempty"` + CreateTime string `protobuf:"bytes,6,opt,name=createTime,proto3" json:"createTime,omitempty"` + StartTime string `protobuf:"bytes,7,opt,name=startTime,proto3" json:"startTime,omitempty"` + ReadyTime string `protobuf:"bytes,8,opt,name=readyTime,proto3" json:"readyTime,omitempty"` + RegisterTime string `protobuf:"bytes,9,opt,name=registerTime,proto3" json:"registerTime,omitempty"` +} + +func (x *RuntimeInstance) Reset() { + *x = RuntimeInstance{} + mi := &file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RuntimeInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RuntimeInstance) ProtoMessage() {} + +func (x *RuntimeInstance) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RuntimeInstance.ProtoReflect.Descriptor instead. +func (*RuntimeInstance) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_runtime_instance_proto_rawDescGZIP(), []int{0} +} + +func (x *RuntimeInstance) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RuntimeInstance) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +func (x *RuntimeInstance) GetPort() string { + if x != nil { + return x.Port + } + return "" +} + +func (x *RuntimeInstance) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *RuntimeInstance) GetAppName() string { + if x != nil { + return x.AppName + } + return "" +} + +func (x *RuntimeInstance) GetCreateTime() string { + if x != nil { + return x.CreateTime + } + return "" +} + +func (x *RuntimeInstance) GetStartTime() string { + if x != nil { + return x.StartTime + } + return "" +} + +func (x *RuntimeInstance) GetReadyTime() string { + if x != nil { + return x.ReadyTime + } + return "" +} + +func (x *RuntimeInstance) GetRegisterTime() string { + if x != nil { + return x.RegisterTime + } + return "" +} + +var File_api_mesh_v1alpha1_runtime_instance_proto protoreflect.FileDescriptor + +var file_api_mesh_v1alpha1_runtime_instance_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, + 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, + 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x02, 0x0a, 0x0f, 0x52, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, + 0x69, 0x6d, 0x65, 0x3a, 0x31, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x2b, 0x0a, 0x0f, 0x52, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x10, 0x52, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x04, + 0x6d, 0x65, 0x73, 0x68, 0x20, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, + 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_api_mesh_v1alpha1_runtime_instance_proto_rawDescOnce sync.Once + file_api_mesh_v1alpha1_runtime_instance_proto_rawDescData = file_api_mesh_v1alpha1_runtime_instance_proto_rawDesc +) + +func file_api_mesh_v1alpha1_runtime_instance_proto_rawDescGZIP() []byte { + file_api_mesh_v1alpha1_runtime_instance_proto_rawDescOnce.Do(func() { + file_api_mesh_v1alpha1_runtime_instance_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_runtime_instance_proto_rawDescData) + }) + return file_api_mesh_v1alpha1_runtime_instance_proto_rawDescData +} + +var file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_api_mesh_v1alpha1_runtime_instance_proto_goTypes = []any{ + (*RuntimeInstance)(nil), // 0: dubbo.mesh.v1alpha1.RuntimeInstance +} +var file_api_mesh_v1alpha1_runtime_instance_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_api_mesh_v1alpha1_runtime_instance_proto_init() } +func file_api_mesh_v1alpha1_runtime_instance_proto_init() { + if File_api_mesh_v1alpha1_runtime_instance_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_mesh_v1alpha1_runtime_instance_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_api_mesh_v1alpha1_runtime_instance_proto_goTypes, + DependencyIndexes: file_api_mesh_v1alpha1_runtime_instance_proto_depIdxs, + MessageInfos: file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes, + }.Build() + File_api_mesh_v1alpha1_runtime_instance_proto = out.File + file_api_mesh_v1alpha1_runtime_instance_proto_rawDesc = nil + file_api_mesh_v1alpha1_runtime_instance_proto_goTypes = nil + file_api_mesh_v1alpha1_runtime_instance_proto_depIdxs = nil +} diff --git a/api/mesh/v1alpha1/runtime_instance.proto b/api/mesh/v1alpha1/runtime_instance.proto new file mode 100644 index 000000000..9e4d08dea --- /dev/null +++ b/api/mesh/v1alpha1/runtime_instance.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package dubbo.mesh.v1alpha1; + +option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; + +import "api/mesh/options.proto"; + +// RuntimeInstance is retrieved from Engine, defines the attributes of instance in runtime environments +message RuntimeInstance { + option (dubbo.mesh.resource).name = "RuntimeInstance"; + option (dubbo.mesh.resource).plural_name = "RuntimeInstances"; + option (dubbo.mesh.resource).package = "mesh"; + option (dubbo.mesh.resource).is_experimental = true; + + string name = 1; + + string ip = 2; + + string port = 3; + + string image = 4; + + string appName = 5; + + string createTime = 6; + + string startTime = 7; + + string readyTime = 8; + + +} \ No newline at end of file diff --git a/api/mesh/v1alpha1/service.pb.go b/api/mesh/v1alpha1/service.pb.go index 6d7b92611..6160f20d0 100644 --- a/api/mesh/v1alpha1/service.pb.go +++ b/api/mesh/v1alpha1/service.pb.go @@ -121,7 +121,7 @@ var file_api_mesh_v1alpha1_service_proto_rawDesc = []byte{ 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, - 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, + 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, @@ -140,11 +140,9 @@ var file_api_mesh_v1alpha1_service_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x41, 0xaa, 0x8c, 0x89, - 0xa6, 0x01, 0x3b, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x04, 0x6d, - 0x65, 0x73, 0x68, 0x3a, 0x15, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x08, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x58, 0x01, 0x68, 0x01, 0x42, 0x31, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x21, 0xaa, 0x8c, 0x89, + 0xa6, 0x01, 0x1b, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x08, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x20, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, diff --git a/api/mesh/v1alpha1/service.proto b/api/mesh/v1alpha1/service.proto index 010821f9d..cf8b29e80 100644 --- a/api/mesh/v1alpha1/service.proto +++ b/api/mesh/v1alpha1/service.proto @@ -8,14 +8,10 @@ import "api/mesh/options.proto"; message Service{ - option (dubbo.mesh.resource).name = "ServiceResource"; - option (dubbo.mesh.resource).type = "Service"; + option (dubbo.mesh.resource).name = "Service"; + option (dubbo.mesh.resource).plural_name = "Services"; option (dubbo.mesh.resource).package = "mesh"; - option (dubbo.mesh.resource).ws.name = "service"; - option (dubbo.mesh.resource).ws.plural = "services"; - option (dubbo.mesh.resource).ws.read_only = true; - option (dubbo.mesh.resource).scope_namespace = true; - option (dubbo.mesh.resource).allow_to_inspect = true; + option (dubbo.mesh.resource).is_experimental = true; string name = 1; diff --git a/api/mesh/v1alpha1/service_consumer_metadata.pb.go b/api/mesh/v1alpha1/service_consumer_metadata.pb.go new file mode 100644 index 000000000..8689a9932 --- /dev/null +++ b/api/mesh/v1alpha1/service_consumer_metadata.pb.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc v3.12.4 +// source: api/mesh/v1alpha1/service_consumer_metadata.proto + +package v1alpha1 + +import ( + _ "github.com/apache/dubbo-admin/api/mesh" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ServiceConsumerMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"` + ConsumerAppName string `protobuf:"bytes,2,opt,name=consumerAppName,proto3" json:"consumerAppName,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Group string `protobuf:"bytes,4,opt,name=group,proto3" json:"group,omitempty"` // TODO add more fields +} + +func (x *ServiceConsumerMetadata) Reset() { + *x = ServiceConsumerMetadata{} + mi := &file_api_mesh_v1alpha1_service_consumer_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServiceConsumerMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceConsumerMetadata) ProtoMessage() {} + +func (x *ServiceConsumerMetadata) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_service_consumer_metadata_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceConsumerMetadata.ProtoReflect.Descriptor instead. +func (*ServiceConsumerMetadata) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *ServiceConsumerMetadata) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *ServiceConsumerMetadata) GetConsumerAppName() string { + if x != nil { + return x.ConsumerAppName + } + return "" +} + +func (x *ServiceConsumerMetadata) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ServiceConsumerMetadata) GetGroup() string { + if x != nil { + return x.Group + } + return "" +} + +var File_api_mesh_v1alpha1_service_consumer_metadata_proto protoreflect.FileDescriptor + +var file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, + 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xd6, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, + 0x75, 0x6d, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, + 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x41, 0x70, 0x70, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x72, 0x41, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3f, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x39, + 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, + 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, + 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDescOnce sync.Once + file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDescData = file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDesc +) + +func file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDescGZIP() []byte { + file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDescOnce.Do(func() { + file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDescData) + }) + return file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDescData +} + +var file_api_mesh_v1alpha1_service_consumer_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_api_mesh_v1alpha1_service_consumer_metadata_proto_goTypes = []any{ + (*ServiceConsumerMetadata)(nil), // 0: dubbo.mesh.v1alpha1.ServiceConsumerMetadata +} +var file_api_mesh_v1alpha1_service_consumer_metadata_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_api_mesh_v1alpha1_service_consumer_metadata_proto_init() } +func file_api_mesh_v1alpha1_service_consumer_metadata_proto_init() { + if File_api_mesh_v1alpha1_service_consumer_metadata_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_api_mesh_v1alpha1_service_consumer_metadata_proto_goTypes, + DependencyIndexes: file_api_mesh_v1alpha1_service_consumer_metadata_proto_depIdxs, + MessageInfos: file_api_mesh_v1alpha1_service_consumer_metadata_proto_msgTypes, + }.Build() + File_api_mesh_v1alpha1_service_consumer_metadata_proto = out.File + file_api_mesh_v1alpha1_service_consumer_metadata_proto_rawDesc = nil + file_api_mesh_v1alpha1_service_consumer_metadata_proto_goTypes = nil + file_api_mesh_v1alpha1_service_consumer_metadata_proto_depIdxs = nil +} diff --git a/api/mesh/v1alpha1/service_consumer_metadata.proto b/api/mesh/v1alpha1/service_consumer_metadata.proto new file mode 100644 index 000000000..95728d042 --- /dev/null +++ b/api/mesh/v1alpha1/service_consumer_metadata.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package dubbo.mesh.v1alpha1; + +option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; + +import "api/mesh/options.proto"; + +message ServiceConsumerMetadata { + option (dubbo.mesh.resource).name = "ServiceConsumerMetadata"; + option (dubbo.mesh.resource).plural_name = "ServiceConsumerMetaDatas"; + option (dubbo.mesh.resource).package = "mesh"; + option (dubbo.mesh.resource).is_experimental = false; + + string serviceName = 1; + + string consumerAppName = 2; + + string version = 3; + + string group = 4; + // TODO add more fields +} + diff --git a/api/mesh/v1alpha1/service_provider_mapping.pb.go b/api/mesh/v1alpha1/service_provider_mapping.pb.go new file mode 100644 index 000000000..44ce1cf14 --- /dev/null +++ b/api/mesh/v1alpha1/service_provider_mapping.pb.go @@ -0,0 +1,149 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc v3.12.4 +// source: api/mesh/v1alpha1/service_provider_mapping.proto + +package v1alpha1 + +import ( + _ "github.com/apache/dubbo-admin/api/mesh" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ServiceProviderMapping struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"` + AppNames []string `protobuf:"bytes,2,rep,name=appNames,proto3" json:"appNames,omitempty"` +} + +func (x *ServiceProviderMapping) Reset() { + *x = ServiceProviderMapping{} + mi := &file_api_mesh_v1alpha1_service_provider_mapping_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServiceProviderMapping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceProviderMapping) ProtoMessage() {} + +func (x *ServiceProviderMapping) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_service_provider_mapping_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceProviderMapping.ProtoReflect.Descriptor instead. +func (*ServiceProviderMapping) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDescGZIP(), []int{0} +} + +func (x *ServiceProviderMapping) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *ServiceProviderMapping) GetAppNames() []string { + if x != nil { + return x.AppNames + } + return nil +} + +var File_api_mesh_v1alpha1_service_provider_mapping_proto protoreflect.FileDescriptor + +var file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, + 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x95, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x3a, 0x3d, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x37, + 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, + 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, + 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDescOnce sync.Once + file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDescData = file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDesc +) + +func file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDescGZIP() []byte { + file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDescOnce.Do(func() { + file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDescData) + }) + return file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDescData +} + +var file_api_mesh_v1alpha1_service_provider_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_api_mesh_v1alpha1_service_provider_mapping_proto_goTypes = []any{ + (*ServiceProviderMapping)(nil), // 0: dubbo.mesh.v1alpha1.ServiceProviderMapping +} +var file_api_mesh_v1alpha1_service_provider_mapping_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_api_mesh_v1alpha1_service_provider_mapping_proto_init() } +func file_api_mesh_v1alpha1_service_provider_mapping_proto_init() { + if File_api_mesh_v1alpha1_service_provider_mapping_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_api_mesh_v1alpha1_service_provider_mapping_proto_goTypes, + DependencyIndexes: file_api_mesh_v1alpha1_service_provider_mapping_proto_depIdxs, + MessageInfos: file_api_mesh_v1alpha1_service_provider_mapping_proto_msgTypes, + }.Build() + File_api_mesh_v1alpha1_service_provider_mapping_proto = out.File + file_api_mesh_v1alpha1_service_provider_mapping_proto_rawDesc = nil + file_api_mesh_v1alpha1_service_provider_mapping_proto_goTypes = nil + file_api_mesh_v1alpha1_service_provider_mapping_proto_depIdxs = nil +} diff --git a/api/mesh/v1alpha1/service_provider_mapping.proto b/api/mesh/v1alpha1/service_provider_mapping.proto new file mode 100644 index 000000000..c96e5fcaa --- /dev/null +++ b/api/mesh/v1alpha1/service_provider_mapping.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package dubbo.mesh.v1alpha1; + +option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; + +import "api/mesh/options.proto"; + +message ServiceProviderMapping { + option (dubbo.mesh.resource).name = "ServiceProviderMapping"; + option (dubbo.mesh.resource).plural_name = "ServiceProviderMappings"; + option (dubbo.mesh.resource).package = "mesh"; + option (dubbo.mesh.resource).is_experimental = false; + + string serviceName = 1; + repeated string appNames = 2; +} diff --git a/api/mesh/v1alpha1/service_provider_metadata.pb.go b/api/mesh/v1alpha1/service_provider_metadata.pb.go new file mode 100644 index 000000000..f81530b0b --- /dev/null +++ b/api/mesh/v1alpha1/service_provider_metadata.pb.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc v3.12.4 +// source: api/mesh/v1alpha1/service_provider_metadata.proto + +package v1alpha1 + +import ( + _ "github.com/apache/dubbo-admin/api/mesh" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ServiceProviderMetaData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"` + ProviderAppName string `protobuf:"bytes,2,opt,name=providerAppName,proto3" json:"providerAppName,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Group string `protobuf:"bytes,4,opt,name=group,proto3" json:"group,omitempty"` // TODO add more fields +} + +func (x *ServiceProviderMetaData) Reset() { + *x = ServiceProviderMetaData{} + mi := &file_api_mesh_v1alpha1_service_provider_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServiceProviderMetaData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceProviderMetaData) ProtoMessage() {} + +func (x *ServiceProviderMetaData) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_service_provider_metadata_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceProviderMetaData.ProtoReflect.Descriptor instead. +func (*ServiceProviderMetaData) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *ServiceProviderMetaData) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *ServiceProviderMetaData) GetProviderAppName() string { + if x != nil { + return x.ProviderAppName + } + return "" +} + +func (x *ServiceProviderMetaData) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ServiceProviderMetaData) GetGroup() string { + if x != nil { + return x.Group + } + return "" +} + +var File_api_mesh_v1alpha1_service_provider_metadata_proto protoreflect.FileDescriptor + +var file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, + 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xd6, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, + 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x70, 0x70, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x41, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x3a, 0x3f, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x39, + 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, + 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, + 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescOnce sync.Once + file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescData = file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDesc +) + +func file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescGZIP() []byte { + file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescOnce.Do(func() { + file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescData) + }) + return file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescData +} + +var file_api_mesh_v1alpha1_service_provider_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_api_mesh_v1alpha1_service_provider_metadata_proto_goTypes = []any{ + (*ServiceProviderMetaData)(nil), // 0: dubbo.mesh.v1alpha1.ServiceProviderMetaData +} +var file_api_mesh_v1alpha1_service_provider_metadata_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_api_mesh_v1alpha1_service_provider_metadata_proto_init() } +func file_api_mesh_v1alpha1_service_provider_metadata_proto_init() { + if File_api_mesh_v1alpha1_service_provider_metadata_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_api_mesh_v1alpha1_service_provider_metadata_proto_goTypes, + DependencyIndexes: file_api_mesh_v1alpha1_service_provider_metadata_proto_depIdxs, + MessageInfos: file_api_mesh_v1alpha1_service_provider_metadata_proto_msgTypes, + }.Build() + File_api_mesh_v1alpha1_service_provider_metadata_proto = out.File + file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDesc = nil + file_api_mesh_v1alpha1_service_provider_metadata_proto_goTypes = nil + file_api_mesh_v1alpha1_service_provider_metadata_proto_depIdxs = nil +} diff --git a/api/mesh/v1alpha1/service_provider_metadata.proto b/api/mesh/v1alpha1/service_provider_metadata.proto new file mode 100644 index 000000000..df402ff06 --- /dev/null +++ b/api/mesh/v1alpha1/service_provider_metadata.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package dubbo.mesh.v1alpha1; + +option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; + +import "api/mesh/options.proto"; + +message ServiceProviderMetaData { + option (dubbo.mesh.resource).name = "ServiceProviderMetadata"; + option (dubbo.mesh.resource).plural_name = "ServiceProviderMetaDatas"; + option (dubbo.mesh.resource).package = "mesh"; + option (dubbo.mesh.resource).is_experimental = false; + + string serviceName = 1; + + string providerAppName = 2; + + string version = 3; + + string group = 4; + // TODO add more fields +} \ No newline at end of file diff --git a/api/mesh/v1alpha1/tag_route.pb.go b/api/mesh/v1alpha1/tag_route.pb.go index ef472b5fb..37b6b8f74 100644 --- a/api/mesh/v1alpha1/tag_route.pb.go +++ b/api/mesh/v1alpha1/tag_route.pb.go @@ -330,7 +330,7 @@ var file_api_mesh_v1alpha1_tag_route_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x9d, 0x02, 0x0a, 0x08, 0x54, 0x61, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1a, 0x0a, + 0x22, 0xf9, 0x01, 0x0a, 0x08, 0x54, 0x61, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, @@ -343,40 +343,38 @@ var file_api_mesh_v1alpha1_tag_route_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x45, 0xaa, 0x8c, 0x89, 0xa6, 0x01, - 0x3f, 0x0a, 0x10, 0x54, 0x61, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x08, 0x54, 0x61, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x04, 0x6d, - 0x65, 0x73, 0x68, 0x3a, 0x15, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, - 0x09, 0x74, 0x61, 0x67, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x02, 0x10, 0x01, 0x68, 0x01, - 0x22, 0x96, 0x01, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x75, 0x62, 0x62, - 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x26, 0x0a, 0x10, 0x5f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, - 0x62, 0x79, 0x5f, 0x63, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x42, 0x79, 0x43, 0x70, 0x22, 0x9d, 0x01, 0x0a, 0x0b, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x61, - 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x18, 0x0a, - 0x07, 0x6e, 0x6f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6e, 0x6f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x1a, 0x0a, - 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0x56, 0x0a, 0x0a, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, - 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x21, 0xaa, 0x8c, 0x89, 0xa6, 0x01, + 0x1b, 0x0a, 0x08, 0x54, 0x61, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x09, 0x54, 0x61, 0x67, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x22, 0x96, 0x01, 0x0a, + 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, + 0x10, 0x5f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x5f, 0x63, + 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x42, 0x79, 0x43, 0x70, 0x22, 0x9d, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x6c, + 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x69, 0x6c, + 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0x56, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x31, 0x5a, + 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, + 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/mesh/v1alpha1/tag_route.proto b/api/mesh/v1alpha1/tag_route.proto index eef63c818..0edcf9858 100644 --- a/api/mesh/v1alpha1/tag_route.proto +++ b/api/mesh/v1alpha1/tag_route.proto @@ -7,13 +7,11 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; import "api/mesh/options.proto"; message TagRoute { - option (dubbo.mesh.resource).name = "TagRouteResource"; - option (dubbo.mesh.resource).type = "TagRoute"; + option (dubbo.mesh.resource).name = "TagRoute"; + option (dubbo.mesh.resource).plural_name = "TagRoutes"; option (dubbo.mesh.resource).package = "mesh"; - option (dubbo.mesh.resource).dds.send_to_zone = true; - option (dubbo.mesh.resource).ws.name = "tagroute"; - option (dubbo.mesh.resource).ws.plural = "tagroutes"; - option (dubbo.mesh.resource).allow_to_inspect = true; + option (dubbo.mesh.resource).is_experimental = false; + int32 priority = 1; bool enabled = 2; diff --git a/api/mesh/v1alpha1/traffic_helper.go b/api/mesh/v1alpha1/traffic_helper.go index 903b6671f..b62317f9f 100644 --- a/api/mesh/v1alpha1/traffic_helper.go +++ b/api/mesh/v1alpha1/traffic_helper.go @@ -24,7 +24,6 @@ import ( "github.com/dubbogo/gost/encoding/yaml" ) -// Application 流量管控相关的基础label const ( ApplicationLabel = "dubbo.io/application" ServiceLabel = "dubbo.io/service" diff --git a/api/system/v1alpha1/config.pb.go b/api/system/v1alpha1/config.pb.go deleted file mode 100644 index d1af2c7fb..000000000 --- a/api/system/v1alpha1/config.pb.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.1 -// protoc v3.12.4 -// source: api/system/v1alpha1/config.proto - -package v1alpha1 - -import ( - _ "github.com/apache/dubbo-admin/api/mesh" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Config is a entity that represents dynamic configuration that is stored in -// underlying storage. For now it's used only for internal mechanisms. -type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // configuration that is stored (ex. in JSON) - Config string `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *Config) Reset() { - *x = Config{} - mi := &file_api_system_v1alpha1_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Config) ProtoMessage() {} - -func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_config_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Config.ProtoReflect.Descriptor instead. -func (*Config) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_config_proto_rawDescGZIP(), []int{0} -} - -func (x *Config) GetConfig() string { - if x != nil { - return x.Config - } - return "" -} - -var File_api_system_v1alpha1_config_proto protoreflect.FileDescriptor - -var file_api_system_v1alpha1_config_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x15, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, - 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x50, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x3a, 0x2e, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x28, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x06, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x22, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x02, 0x10, - 0x01, 0x60, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_api_system_v1alpha1_config_proto_rawDescOnce sync.Once - file_api_system_v1alpha1_config_proto_rawDescData = file_api_system_v1alpha1_config_proto_rawDesc -) - -func file_api_system_v1alpha1_config_proto_rawDescGZIP() []byte { - file_api_system_v1alpha1_config_proto_rawDescOnce.Do(func() { - file_api_system_v1alpha1_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_system_v1alpha1_config_proto_rawDescData) - }) - return file_api_system_v1alpha1_config_proto_rawDescData -} - -var file_api_system_v1alpha1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_api_system_v1alpha1_config_proto_goTypes = []any{ - (*Config)(nil), // 0: dubbo.system.v1alpha1.Config -} -var file_api_system_v1alpha1_config_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_api_system_v1alpha1_config_proto_init() } -func file_api_system_v1alpha1_config_proto_init() { - if File_api_system_v1alpha1_config_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_system_v1alpha1_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_api_system_v1alpha1_config_proto_goTypes, - DependencyIndexes: file_api_system_v1alpha1_config_proto_depIdxs, - MessageInfos: file_api_system_v1alpha1_config_proto_msgTypes, - }.Build() - File_api_system_v1alpha1_config_proto = out.File - file_api_system_v1alpha1_config_proto_rawDesc = nil - file_api_system_v1alpha1_config_proto_goTypes = nil - file_api_system_v1alpha1_config_proto_depIdxs = nil -} diff --git a/api/system/v1alpha1/config.proto b/api/system/v1alpha1/config.proto deleted file mode 100644 index b631b18dd..000000000 --- a/api/system/v1alpha1/config.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package dubbo.system.v1alpha1; - -option go_package = "github.com/apache/dubbo-admin/api/system/v1alpha1"; - -import "api/mesh/options.proto"; - -// Config is a entity that represents dynamic configuration that is stored in -// underlying storage. For now it's used only for internal mechanisms. -message Config { - - option (dubbo.mesh.resource).name = "ConfigResource"; - option (dubbo.mesh.resource).type = "Config"; - option (dubbo.mesh.resource).package = "system"; - option (dubbo.mesh.resource).global = true; - option (dubbo.mesh.resource).skip_kubernetes_wrappers = true; - option (dubbo.mesh.resource).dds.send_to_zone = true; - - // configuration that is stored (ex. in JSON) - string config = 1; -} diff --git a/api/system/v1alpha1/datasource.pb.go b/api/system/v1alpha1/datasource.pb.go deleted file mode 100644 index d40e44848..000000000 --- a/api/system/v1alpha1/datasource.pb.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.1 -// protoc v3.12.4 -// source: api/system/v1alpha1/datasource.proto - -package v1alpha1 - -import ( - _ "github.com/apache/dubbo-admin/api/mesh" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// DataSource defines the source of bytes to use. -type DataSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: - // - // *DataSource_Secret - // *DataSource_File - // *DataSource_Inline - // *DataSource_InlineString - Type isDataSource_Type `protobuf_oneof:"type"` -} - -func (x *DataSource) Reset() { - *x = DataSource{} - mi := &file_api_system_v1alpha1_datasource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DataSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DataSource) ProtoMessage() {} - -func (x *DataSource) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_datasource_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DataSource.ProtoReflect.Descriptor instead. -func (*DataSource) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_datasource_proto_rawDescGZIP(), []int{0} -} - -func (m *DataSource) GetType() isDataSource_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *DataSource) GetSecret() string { - if x, ok := x.GetType().(*DataSource_Secret); ok { - return x.Secret - } - return "" -} - -func (x *DataSource) GetFile() string { - if x, ok := x.GetType().(*DataSource_File); ok { - return x.File - } - return "" -} - -func (x *DataSource) GetInline() *wrappers.BytesValue { - if x, ok := x.GetType().(*DataSource_Inline); ok { - return x.Inline - } - return nil -} - -func (x *DataSource) GetInlineString() string { - if x, ok := x.GetType().(*DataSource_InlineString); ok { - return x.InlineString - } - return "" -} - -type isDataSource_Type interface { - isDataSource_Type() -} - -type DataSource_Secret struct { - // Data source is a secret with given Secret key. - Secret string `protobuf:"bytes,1,opt,name=secret,proto3,oneof"` -} - -type DataSource_File struct { - // Data source is a path to a file. - // Deprecated, use other sources of a data. - File string `protobuf:"bytes,2,opt,name=file,proto3,oneof"` -} - -type DataSource_Inline struct { - // Data source is inline bytes. - Inline *wrappers.BytesValue `protobuf:"bytes,3,opt,name=inline,proto3,oneof"` -} - -type DataSource_InlineString struct { - // Data source is inline string - InlineString string `protobuf:"bytes,4,opt,name=inlineString,proto3,oneof"` -} - -func (*DataSource_Secret) isDataSource_Type() {} - -func (*DataSource_File) isDataSource_Type() {} - -func (*DataSource_Inline) isDataSource_Type() {} - -func (*DataSource_InlineString) isDataSource_Type() {} - -var File_api_system_v1alpha1_datasource_proto protoreflect.FileDescriptor - -var file_api_system_v1alpha1_datasource_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, - 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x01, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x14, - 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x66, 0x69, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x48, 0x00, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x24, 0x0a, 0x0c, 0x69, - 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x3a, 0x41, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x3b, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0a, 0x44, - 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x22, 0x06, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x3a, 0x0c, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x90, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x33, 0x5a, 0x31, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, - 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_api_system_v1alpha1_datasource_proto_rawDescOnce sync.Once - file_api_system_v1alpha1_datasource_proto_rawDescData = file_api_system_v1alpha1_datasource_proto_rawDesc -) - -func file_api_system_v1alpha1_datasource_proto_rawDescGZIP() []byte { - file_api_system_v1alpha1_datasource_proto_rawDescOnce.Do(func() { - file_api_system_v1alpha1_datasource_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_system_v1alpha1_datasource_proto_rawDescData) - }) - return file_api_system_v1alpha1_datasource_proto_rawDescData -} - -var file_api_system_v1alpha1_datasource_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_api_system_v1alpha1_datasource_proto_goTypes = []any{ - (*DataSource)(nil), // 0: dubbo.system.v1alpha1.DataSource - (*wrappers.BytesValue)(nil), // 1: google.protobuf.BytesValue -} -var file_api_system_v1alpha1_datasource_proto_depIdxs = []int32{ - 1, // 0: dubbo.system.v1alpha1.DataSource.inline:type_name -> google.protobuf.BytesValue - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_api_system_v1alpha1_datasource_proto_init() } -func file_api_system_v1alpha1_datasource_proto_init() { - if File_api_system_v1alpha1_datasource_proto != nil { - return - } - file_api_system_v1alpha1_datasource_proto_msgTypes[0].OneofWrappers = []any{ - (*DataSource_Secret)(nil), - (*DataSource_File)(nil), - (*DataSource_Inline)(nil), - (*DataSource_InlineString)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_system_v1alpha1_datasource_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_api_system_v1alpha1_datasource_proto_goTypes, - DependencyIndexes: file_api_system_v1alpha1_datasource_proto_depIdxs, - MessageInfos: file_api_system_v1alpha1_datasource_proto_msgTypes, - }.Build() - File_api_system_v1alpha1_datasource_proto = out.File - file_api_system_v1alpha1_datasource_proto_rawDesc = nil - file_api_system_v1alpha1_datasource_proto_goTypes = nil - file_api_system_v1alpha1_datasource_proto_depIdxs = nil -} diff --git a/api/system/v1alpha1/datasource.proto b/api/system/v1alpha1/datasource.proto deleted file mode 100644 index 76917988a..000000000 --- a/api/system/v1alpha1/datasource.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package dubbo.system.v1alpha1; - -option go_package = "github.com/apache/dubbo-admin/api/system/v1alpha1"; - -import "api/mesh/options.proto"; -import "google/protobuf/wrappers.proto"; - -// DataSource defines the source of bytes to use. -message DataSource { - option (dubbo.mesh.resource).name = "DataSourceResource"; - option (dubbo.mesh.resource).type = "DataSource"; - option (dubbo.mesh.resource).package = "system"; - option (dubbo.mesh.resource).global = true; - option (dubbo.mesh.resource).ws.name = "datasource"; - option (dubbo.mesh.resource).has_insights = true; - - oneof type { - // Data source is a secret with given Secret key. - string secret = 1; - // Data source is a path to a file. - // Deprecated, use other sources of a data. - string file = 2; - // Data source is inline bytes. - google.protobuf.BytesValue inline = 3; - // Data source is inline string - string inlineString = 4; - } -} diff --git a/api/system/v1alpha1/inter_cp_ping.pb.go b/api/system/v1alpha1/inter_cp_ping.pb.go deleted file mode 100644 index 3a2017b61..000000000 --- a/api/system/v1alpha1/inter_cp_ping.pb.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.1 -// protoc v3.12.4 -// source: api/system/v1alpha1/inter_cp_ping.proto - -package v1alpha1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - InterCpPort uint32 `protobuf:"varint,3,opt,name=inter_cp_port,json=interCpPort,proto3" json:"inter_cp_port,omitempty"` - Ready bool `protobuf:"varint,4,opt,name=ready,proto3" json:"ready,omitempty"` -} - -func (x *PingRequest) Reset() { - *x = PingRequest{} - mi := &file_api_system_v1alpha1_inter_cp_ping_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingRequest) ProtoMessage() {} - -func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_inter_cp_ping_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. -func (*PingRequest) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_inter_cp_ping_proto_rawDescGZIP(), []int{0} -} - -func (x *PingRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *PingRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *PingRequest) GetInterCpPort() uint32 { - if x != nil { - return x.InterCpPort - } - return 0 -} - -func (x *PingRequest) GetReady() bool { - if x != nil { - return x.Ready - } - return false -} - -type PingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Leader bool `protobuf:"varint,1,opt,name=leader,proto3" json:"leader,omitempty"` -} - -func (x *PingResponse) Reset() { - *x = PingResponse{} - mi := &file_api_system_v1alpha1_inter_cp_ping_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingResponse) ProtoMessage() {} - -func (x *PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_inter_cp_ping_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. -func (*PingResponse) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_inter_cp_ping_proto_rawDescGZIP(), []int{1} -} - -func (x *PingResponse) GetLeader() bool { - if x != nil { - return x.Leader - } - return false -} - -var File_api_system_v1alpha1_inter_cp_ping_proto protoreflect.FileDescriptor - -var file_api_system_v1alpha1_inter_cp_ping_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x70, 0x5f, 0x70, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x64, 0x75, 0x62, 0x62, 0x6f, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, - 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x26, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x32, 0x65, 0x0a, - 0x12, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x70, 0x50, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x2e, 0x64, 0x75, - 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x23, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_api_system_v1alpha1_inter_cp_ping_proto_rawDescOnce sync.Once - file_api_system_v1alpha1_inter_cp_ping_proto_rawDescData = file_api_system_v1alpha1_inter_cp_ping_proto_rawDesc -) - -func file_api_system_v1alpha1_inter_cp_ping_proto_rawDescGZIP() []byte { - file_api_system_v1alpha1_inter_cp_ping_proto_rawDescOnce.Do(func() { - file_api_system_v1alpha1_inter_cp_ping_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_system_v1alpha1_inter_cp_ping_proto_rawDescData) - }) - return file_api_system_v1alpha1_inter_cp_ping_proto_rawDescData -} - -var file_api_system_v1alpha1_inter_cp_ping_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_api_system_v1alpha1_inter_cp_ping_proto_goTypes = []any{ - (*PingRequest)(nil), // 0: dubbo.system.v1alpha1.PingRequest - (*PingResponse)(nil), // 1: dubbo.system.v1alpha1.PingResponse -} -var file_api_system_v1alpha1_inter_cp_ping_proto_depIdxs = []int32{ - 0, // 0: dubbo.system.v1alpha1.InterCpPingService.Ping:input_type -> dubbo.system.v1alpha1.PingRequest - 1, // 1: dubbo.system.v1alpha1.InterCpPingService.Ping:output_type -> dubbo.system.v1alpha1.PingResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_api_system_v1alpha1_inter_cp_ping_proto_init() } -func file_api_system_v1alpha1_inter_cp_ping_proto_init() { - if File_api_system_v1alpha1_inter_cp_ping_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_system_v1alpha1_inter_cp_ping_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_api_system_v1alpha1_inter_cp_ping_proto_goTypes, - DependencyIndexes: file_api_system_v1alpha1_inter_cp_ping_proto_depIdxs, - MessageInfos: file_api_system_v1alpha1_inter_cp_ping_proto_msgTypes, - }.Build() - File_api_system_v1alpha1_inter_cp_ping_proto = out.File - file_api_system_v1alpha1_inter_cp_ping_proto_rawDesc = nil - file_api_system_v1alpha1_inter_cp_ping_proto_goTypes = nil - file_api_system_v1alpha1_inter_cp_ping_proto_depIdxs = nil -} diff --git a/api/system/v1alpha1/inter_cp_ping.proto b/api/system/v1alpha1/inter_cp_ping.proto deleted file mode 100644 index 9c9ae4f32..000000000 --- a/api/system/v1alpha1/inter_cp_ping.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -package dubbo.system.v1alpha1; - -option go_package = "github.com/apache/dubbo-admin/api/system/v1alpha1"; - -message PingRequest { - string instance_id = 1; - string address = 2; - uint32 inter_cp_port = 3; - bool ready = 4; -} - -message PingResponse { bool leader = 1; } - -service InterCpPingService { rpc Ping(PingRequest) returns (PingResponse); } diff --git a/api/system/v1alpha1/inter_cp_ping_grpc.pb.go b/api/system/v1alpha1/inter_cp_ping_grpc.pb.go deleted file mode 100644 index c671e1f8d..000000000 --- a/api/system/v1alpha1/inter_cp_ping_grpc.pb.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v3.12.4 -// source: api/system/v1alpha1/inter_cp_ping.proto - -package v1alpha1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - InterCpPingService_Ping_FullMethodName = "/dubbo.system.v1alpha1.InterCpPingService/Ping" -) - -// InterCpPingServiceClient is the client API for InterCpPingService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type InterCpPingServiceClient interface { - Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) -} - -type interCpPingServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewInterCpPingServiceClient(cc grpc.ClientConnInterface) InterCpPingServiceClient { - return &interCpPingServiceClient{cc} -} - -func (c *interCpPingServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PingResponse) - err := c.cc.Invoke(ctx, InterCpPingService_Ping_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// InterCpPingServiceServer is the server API for InterCpPingService service. -// All implementations must embed UnimplementedInterCpPingServiceServer -// for forward compatibility. -type InterCpPingServiceServer interface { - Ping(context.Context, *PingRequest) (*PingResponse, error) - mustEmbedUnimplementedInterCpPingServiceServer() -} - -// UnimplementedInterCpPingServiceServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedInterCpPingServiceServer struct{} - -func (UnimplementedInterCpPingServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") -} -func (UnimplementedInterCpPingServiceServer) mustEmbedUnimplementedInterCpPingServiceServer() {} -func (UnimplementedInterCpPingServiceServer) testEmbeddedByValue() {} - -// UnsafeInterCpPingServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to InterCpPingServiceServer will -// result in compilation errors. -type UnsafeInterCpPingServiceServer interface { - mustEmbedUnimplementedInterCpPingServiceServer() -} - -func RegisterInterCpPingServiceServer(s grpc.ServiceRegistrar, srv InterCpPingServiceServer) { - // If the following call pancis, it indicates UnimplementedInterCpPingServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&InterCpPingService_ServiceDesc, srv) -} - -func _InterCpPingService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(InterCpPingServiceServer).Ping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: InterCpPingService_Ping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InterCpPingServiceServer).Ping(ctx, req.(*PingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// InterCpPingService_ServiceDesc is the grpc.ServiceDesc for InterCpPingService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var InterCpPingService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "dubbo.system.v1alpha1.InterCpPingService", - HandlerType: (*InterCpPingServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Ping", - Handler: _InterCpPingService_Ping_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api/system/v1alpha1/inter_cp_ping.proto", -} diff --git a/api/system/v1alpha1/secret.pb.go b/api/system/v1alpha1/secret.pb.go deleted file mode 100644 index 0cebf9d78..000000000 --- a/api/system/v1alpha1/secret.pb.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.1 -// protoc v3.12.4 -// source: api/system/v1alpha1/secret.proto - -package v1alpha1 - -import ( - _ "github.com/apache/dubbo-admin/api/mesh" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Secret defines an encrypted value in Dubbo. -type Secret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Value of the secret - Data *wrappers.BytesValue `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *Secret) Reset() { - *x = Secret{} - mi := &file_api_system_v1alpha1_secret_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Secret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Secret) ProtoMessage() {} - -func (x *Secret) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_secret_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_secret_proto_rawDescGZIP(), []int{0} -} - -func (x *Secret) GetData() *wrappers.BytesValue { - if x != nil { - return x.Data - } - return nil -} - -var File_api_system_v1alpha1_secret_proto protoreflect.FileDescriptor - -var file_api_system_v1alpha1_secret_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x15, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, - 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x70, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x35, 0xaa, 0x8c, - 0x89, 0xa6, 0x01, 0x2f, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x22, 0x06, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3a, 0x08, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x90, 0x01, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_api_system_v1alpha1_secret_proto_rawDescOnce sync.Once - file_api_system_v1alpha1_secret_proto_rawDescData = file_api_system_v1alpha1_secret_proto_rawDesc -) - -func file_api_system_v1alpha1_secret_proto_rawDescGZIP() []byte { - file_api_system_v1alpha1_secret_proto_rawDescOnce.Do(func() { - file_api_system_v1alpha1_secret_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_system_v1alpha1_secret_proto_rawDescData) - }) - return file_api_system_v1alpha1_secret_proto_rawDescData -} - -var file_api_system_v1alpha1_secret_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_api_system_v1alpha1_secret_proto_goTypes = []any{ - (*Secret)(nil), // 0: dubbo.system.v1alpha1.Secret - (*wrappers.BytesValue)(nil), // 1: google.protobuf.BytesValue -} -var file_api_system_v1alpha1_secret_proto_depIdxs = []int32{ - 1, // 0: dubbo.system.v1alpha1.Secret.data:type_name -> google.protobuf.BytesValue - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_api_system_v1alpha1_secret_proto_init() } -func file_api_system_v1alpha1_secret_proto_init() { - if File_api_system_v1alpha1_secret_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_system_v1alpha1_secret_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_api_system_v1alpha1_secret_proto_goTypes, - DependencyIndexes: file_api_system_v1alpha1_secret_proto_depIdxs, - MessageInfos: file_api_system_v1alpha1_secret_proto_msgTypes, - }.Build() - File_api_system_v1alpha1_secret_proto = out.File - file_api_system_v1alpha1_secret_proto_rawDesc = nil - file_api_system_v1alpha1_secret_proto_goTypes = nil - file_api_system_v1alpha1_secret_proto_depIdxs = nil -} diff --git a/api/system/v1alpha1/secret.proto b/api/system/v1alpha1/secret.proto deleted file mode 100644 index 9cd67da78..000000000 --- a/api/system/v1alpha1/secret.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package dubbo.system.v1alpha1; - -option go_package = "github.com/apache/dubbo-admin/api/system/v1alpha1"; - -import "api/mesh/options.proto"; -import "google/protobuf/wrappers.proto"; - -// Secret defines an encrypted value in Dubbo. -message Secret { - - option (dubbo.mesh.resource).name = "SecretResource"; - option (dubbo.mesh.resource).type = "Secret"; - option (dubbo.mesh.resource).package = "system"; - option (dubbo.mesh.resource).global = true; - option (dubbo.mesh.resource).ws.name = "secret"; - option (dubbo.mesh.resource).has_insights = true; - - // Value of the secret - google.protobuf.BytesValue data = 1; -} diff --git a/api/system/v1alpha1/zone.pb.go b/api/system/v1alpha1/zone.pb.go deleted file mode 100644 index e12f50a51..000000000 --- a/api/system/v1alpha1/zone.pb.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.1 -// protoc v3.12.4 -// source: api/system/v1alpha1/zone.proto - -package v1alpha1 - -import ( - _ "github.com/apache/dubbo-admin/api/mesh" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Zone defines the Zone configuration used at the Global Control Plane -// within a distributed deployment -type Zone struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // enable allows to turn the zone on/off and exclude the whole zone from - // balancing traffic on it - Enabled *wrappers.BoolValue `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"` -} - -func (x *Zone) Reset() { - *x = Zone{} - mi := &file_api_system_v1alpha1_zone_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Zone) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Zone) ProtoMessage() {} - -func (x *Zone) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_zone_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Zone.ProtoReflect.Descriptor instead. -func (*Zone) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_zone_proto_rawDescGZIP(), []int{0} -} - -func (x *Zone) GetEnabled() *wrappers.BoolValue { - if x != nil { - return x.Enabled - } - return nil -} - -var File_api_system_v1alpha1_zone_proto protoreflect.FileDescriptor - -var file_api_system_v1alpha1_zone_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7a, 0x6f, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x15, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x6d, 0x0a, 0x04, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x2f, 0xaa, - 0x8c, 0x89, 0xa6, 0x01, 0x29, 0x0a, 0x0c, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x04, 0x5a, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x22, 0x06, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x3a, 0x06, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x90, 0x01, 0x01, 0x42, 0x33, - 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, - 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_api_system_v1alpha1_zone_proto_rawDescOnce sync.Once - file_api_system_v1alpha1_zone_proto_rawDescData = file_api_system_v1alpha1_zone_proto_rawDesc -) - -func file_api_system_v1alpha1_zone_proto_rawDescGZIP() []byte { - file_api_system_v1alpha1_zone_proto_rawDescOnce.Do(func() { - file_api_system_v1alpha1_zone_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_system_v1alpha1_zone_proto_rawDescData) - }) - return file_api_system_v1alpha1_zone_proto_rawDescData -} - -var file_api_system_v1alpha1_zone_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_api_system_v1alpha1_zone_proto_goTypes = []any{ - (*Zone)(nil), // 0: dubbo.system.v1alpha1.Zone - (*wrappers.BoolValue)(nil), // 1: google.protobuf.BoolValue -} -var file_api_system_v1alpha1_zone_proto_depIdxs = []int32{ - 1, // 0: dubbo.system.v1alpha1.Zone.enabled:type_name -> google.protobuf.BoolValue - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_api_system_v1alpha1_zone_proto_init() } -func file_api_system_v1alpha1_zone_proto_init() { - if File_api_system_v1alpha1_zone_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_system_v1alpha1_zone_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_api_system_v1alpha1_zone_proto_goTypes, - DependencyIndexes: file_api_system_v1alpha1_zone_proto_depIdxs, - MessageInfos: file_api_system_v1alpha1_zone_proto_msgTypes, - }.Build() - File_api_system_v1alpha1_zone_proto = out.File - file_api_system_v1alpha1_zone_proto_rawDesc = nil - file_api_system_v1alpha1_zone_proto_goTypes = nil - file_api_system_v1alpha1_zone_proto_depIdxs = nil -} diff --git a/api/system/v1alpha1/zone.proto b/api/system/v1alpha1/zone.proto deleted file mode 100644 index 618bc9d04..000000000 --- a/api/system/v1alpha1/zone.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package dubbo.system.v1alpha1; - -option go_package = "github.com/apache/dubbo-admin/api/system/v1alpha1"; - -import "api/mesh/options.proto"; -import "google/protobuf/wrappers.proto"; - -// Zone defines the Zone configuration used at the Global Control Plane -// within a distributed deployment -message Zone { - - option (dubbo.mesh.resource).name = "ZoneResource"; - option (dubbo.mesh.resource).type = "Zone"; - option (dubbo.mesh.resource).package = "system"; - option (dubbo.mesh.resource).global = true; - option (dubbo.mesh.resource).ws.name = "zone"; - option (dubbo.mesh.resource).has_insights = true; - - // enable allows to turn the zone on/off and exclude the whole zone from - // balancing traffic on it - google.protobuf.BoolValue enabled = 1; -} diff --git a/api/system/v1alpha1/zone_insight.pb.go b/api/system/v1alpha1/zone_insight.pb.go deleted file mode 100644 index 889811115..000000000 --- a/api/system/v1alpha1/zone_insight.pb.go +++ /dev/null @@ -1,635 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.1 -// protoc v3.12.4 -// source: api/system/v1alpha1/zone_insight.proto - -package v1alpha1 - -import ( - _ "github.com/apache/dubbo-admin/api/mesh" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ZoneInsight struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of DDS subscriptions created by a given Zone Dubbo CP. - Subscriptions []*DDSSubscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` - // Statistics about Envoy Admin Streams - EnvoyAdminStreams *EnvoyAdminStreams `protobuf:"bytes,2,opt,name=envoy_admin_streams,json=envoyAdminStreams,proto3" json:"envoy_admin_streams,omitempty"` - HealthCheck *HealthCheck `protobuf:"bytes,3,opt,name=health_check,json=healthCheck,proto3" json:"health_check,omitempty"` -} - -func (x *ZoneInsight) Reset() { - *x = ZoneInsight{} - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ZoneInsight) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ZoneInsight) ProtoMessage() {} - -func (x *ZoneInsight) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ZoneInsight.ProtoReflect.Descriptor instead. -func (*ZoneInsight) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_zone_insight_proto_rawDescGZIP(), []int{0} -} - -func (x *ZoneInsight) GetSubscriptions() []*DDSSubscription { - if x != nil { - return x.Subscriptions - } - return nil -} - -func (x *ZoneInsight) GetEnvoyAdminStreams() *EnvoyAdminStreams { - if x != nil { - return x.EnvoyAdminStreams - } - return nil -} - -func (x *ZoneInsight) GetHealthCheck() *HealthCheck { - if x != nil { - return x.HealthCheck - } - return nil -} - -type EnvoyAdminStreams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Global instance ID that handles XDS Config Dump streams. - ConfigDumpGlobalInstanceId string `protobuf:"bytes,1,opt,name=config_dump_global_instance_id,json=configDumpGlobalInstanceId,proto3" json:"config_dump_global_instance_id,omitempty"` - // Global instance ID that handles Stats streams. - StatsGlobalInstanceId string `protobuf:"bytes,2,opt,name=stats_global_instance_id,json=statsGlobalInstanceId,proto3" json:"stats_global_instance_id,omitempty"` - // Global instance ID that handles Clusters streams. - ClustersGlobalInstanceId string `protobuf:"bytes,3,opt,name=clusters_global_instance_id,json=clustersGlobalInstanceId,proto3" json:"clusters_global_instance_id,omitempty"` -} - -func (x *EnvoyAdminStreams) Reset() { - *x = EnvoyAdminStreams{} - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnvoyAdminStreams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnvoyAdminStreams) ProtoMessage() {} - -func (x *EnvoyAdminStreams) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnvoyAdminStreams.ProtoReflect.Descriptor instead. -func (*EnvoyAdminStreams) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_zone_insight_proto_rawDescGZIP(), []int{1} -} - -func (x *EnvoyAdminStreams) GetConfigDumpGlobalInstanceId() string { - if x != nil { - return x.ConfigDumpGlobalInstanceId - } - return "" -} - -func (x *EnvoyAdminStreams) GetStatsGlobalInstanceId() string { - if x != nil { - return x.StatsGlobalInstanceId - } - return "" -} - -func (x *EnvoyAdminStreams) GetClustersGlobalInstanceId() string { - if x != nil { - return x.ClustersGlobalInstanceId - } - return "" -} - -// DDSSubscription describes a single DDS subscription -// created by a Zone to the Global. -// Ideally, there should be only one such subscription per Zone lifecycle. -// Presence of multiple subscriptions might indicate one of the following -// events: -// - transient loss of network connection between Zone and Global Control -// Planes -// - Zone Dubbo CP restarts (i.e. hot restart or crash) -// - Global Dubbo CP restarts (i.e. rolling update or crash) -// - etc -type DDSSubscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Unique id per DDS subscription. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Global CP instance that handled given subscription. - GlobalInstanceId string `protobuf:"bytes,2,opt,name=global_instance_id,json=globalInstanceId,proto3" json:"global_instance_id,omitempty"` - // Time when a given Zone connected to the Global. - ConnectTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=connect_time,json=connectTime,proto3" json:"connect_time,omitempty"` - // Time when a given Zone disconnected from the Global. - DisconnectTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=disconnect_time,json=disconnectTime,proto3" json:"disconnect_time,omitempty"` - // Status of the DDS subscription. - Status *DDSSubscriptionStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` - // Generation is an integer number which is periodically increased by the - // status sink - Generation uint32 `protobuf:"varint,7,opt,name=generation,proto3" json:"generation,omitempty"` - // Config of Zone Dubbo CP - Config string `protobuf:"bytes,8,opt,name=config,proto3" json:"config,omitempty"` - // Indicates if subscription provided auth token - AuthTokenProvided bool `protobuf:"varint,9,opt,name=auth_token_provided,json=authTokenProvided,proto3" json:"auth_token_provided,omitempty"` - // Zone CP instance that handled the given subscription (This is the leader at - // time of connection). - ZoneInstanceId string `protobuf:"bytes,10,opt,name=zone_instance_id,json=zoneInstanceId,proto3" json:"zone_instance_id,omitempty"` -} - -func (x *DDSSubscription) Reset() { - *x = DDSSubscription{} - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DDSSubscription) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DDSSubscription) ProtoMessage() {} - -func (x *DDSSubscription) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DDSSubscription.ProtoReflect.Descriptor instead. -func (*DDSSubscription) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_zone_insight_proto_rawDescGZIP(), []int{2} -} - -func (x *DDSSubscription) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *DDSSubscription) GetGlobalInstanceId() string { - if x != nil { - return x.GlobalInstanceId - } - return "" -} - -func (x *DDSSubscription) GetConnectTime() *timestamp.Timestamp { - if x != nil { - return x.ConnectTime - } - return nil -} - -func (x *DDSSubscription) GetDisconnectTime() *timestamp.Timestamp { - if x != nil { - return x.DisconnectTime - } - return nil -} - -func (x *DDSSubscription) GetStatus() *DDSSubscriptionStatus { - if x != nil { - return x.Status - } - return nil -} - -func (x *DDSSubscription) GetGeneration() uint32 { - if x != nil { - return x.Generation - } - return 0 -} - -func (x *DDSSubscription) GetConfig() string { - if x != nil { - return x.Config - } - return "" -} - -func (x *DDSSubscription) GetAuthTokenProvided() bool { - if x != nil { - return x.AuthTokenProvided - } - return false -} - -func (x *DDSSubscription) GetZoneInstanceId() string { - if x != nil { - return x.ZoneInstanceId - } - return "" -} - -// DDSSubscriptionStatus defines status of an DDS subscription. -type DDSSubscriptionStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Time when status of a given DDS subscription was most recently updated. - LastUpdateTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"` - // Total defines an aggregate over individual DDS stats. - Total *DDSServiceStats `protobuf:"bytes,2,opt,name=total,proto3" json:"total,omitempty"` - Stat map[string]*DDSServiceStats `protobuf:"bytes,3,rep,name=stat,proto3" json:"stat,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *DDSSubscriptionStatus) Reset() { - *x = DDSSubscriptionStatus{} - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DDSSubscriptionStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DDSSubscriptionStatus) ProtoMessage() {} - -func (x *DDSSubscriptionStatus) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DDSSubscriptionStatus.ProtoReflect.Descriptor instead. -func (*DDSSubscriptionStatus) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_zone_insight_proto_rawDescGZIP(), []int{3} -} - -func (x *DDSSubscriptionStatus) GetLastUpdateTime() *timestamp.Timestamp { - if x != nil { - return x.LastUpdateTime - } - return nil -} - -func (x *DDSSubscriptionStatus) GetTotal() *DDSServiceStats { - if x != nil { - return x.Total - } - return nil -} - -func (x *DDSSubscriptionStatus) GetStat() map[string]*DDSServiceStats { - if x != nil { - return x.Stat - } - return nil -} - -// DiscoveryServiceStats defines all stats over a single xDS service. -type DDSServiceStats struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Number of xDS responses sent to the Dataplane. - ResponsesSent uint64 `protobuf:"varint,1,opt,name=responses_sent,json=responsesSent,proto3" json:"responses_sent,omitempty"` - // Number of xDS responses ACKed by the Dataplane. - ResponsesAcknowledged uint64 `protobuf:"varint,2,opt,name=responses_acknowledged,json=responsesAcknowledged,proto3" json:"responses_acknowledged,omitempty"` - // Number of xDS responses NACKed by the Dataplane. - ResponsesRejected uint64 `protobuf:"varint,3,opt,name=responses_rejected,json=responsesRejected,proto3" json:"responses_rejected,omitempty"` -} - -func (x *DDSServiceStats) Reset() { - *x = DDSServiceStats{} - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DDSServiceStats) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DDSServiceStats) ProtoMessage() {} - -func (x *DDSServiceStats) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DDSServiceStats.ProtoReflect.Descriptor instead. -func (*DDSServiceStats) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_zone_insight_proto_rawDescGZIP(), []int{4} -} - -func (x *DDSServiceStats) GetResponsesSent() uint64 { - if x != nil { - return x.ResponsesSent - } - return 0 -} - -func (x *DDSServiceStats) GetResponsesAcknowledged() uint64 { - if x != nil { - return x.ResponsesAcknowledged - } - return 0 -} - -func (x *DDSServiceStats) GetResponsesRejected() uint64 { - if x != nil { - return x.ResponsesRejected - } - return 0 -} - -// HealthCheck holds information about the received zone health check -type HealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Time last health check received - Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` -} - -func (x *HealthCheck) Reset() { - *x = HealthCheck{} - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *HealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck) ProtoMessage() {} - -func (x *HealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_api_system_v1alpha1_zone_insight_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck) Descriptor() ([]byte, []int) { - return file_api_system_v1alpha1_zone_insight_proto_rawDescGZIP(), []int{5} -} - -func (x *HealthCheck) GetTime() *timestamp.Timestamp { - if x != nil { - return x.Time - } - return nil -} - -var File_api_system_v1alpha1_zone_insight_proto protoreflect.FileDescriptor - -var file_api_system_v1alpha1_zone_insight_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x69, 0x67, - 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, - 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x02, 0x0a, 0x0b, 0x5a, 0x6f, 0x6e, - 0x65, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4c, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x44, 0x53, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x11, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, - 0x12, 0x45, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x3a, 0x44, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x3e, 0x0a, - 0x13, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x73, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x01, 0x22, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3a, 0x10, 0x0a, 0x0c, 0x7a, - 0x6f, 0x6e, 0x65, 0x2d, 0x69, 0x6e, 0x73, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x22, 0xcf, 0x01, - 0x0a, 0x11, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x73, 0x12, 0x42, 0x0a, 0x1e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x75, - 0x6d, 0x70, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, - 0x12, 0x3d, 0x0a, 0x1b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x67, 0x6c, 0x6f, - 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x47, - 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, - 0xab, 0x03, 0x0a, 0x0f, 0x44, 0x44, 0x53, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, - 0x64, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x43, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x44, - 0x53, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x11, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x7a, - 0x6f, 0x6e, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0xc8, 0x02, - 0x0a, 0x15, 0x44, 0x44, 0x53, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x44, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x6c, - 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, - 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x44, 0x53, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x4a, 0x0a, 0x04, 0x73, - 0x74, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x75, 0x62, 0x62, - 0x6f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x44, 0x44, 0x53, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x04, 0x73, 0x74, 0x61, 0x74, 0x1a, 0x5f, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x44, - 0x53, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0f, 0x44, 0x44, 0x53, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x53, - 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x5f, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x15, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x41, 0x63, - 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x3d, 0x0a, 0x0b, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, - 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_api_system_v1alpha1_zone_insight_proto_rawDescOnce sync.Once - file_api_system_v1alpha1_zone_insight_proto_rawDescData = file_api_system_v1alpha1_zone_insight_proto_rawDesc -) - -func file_api_system_v1alpha1_zone_insight_proto_rawDescGZIP() []byte { - file_api_system_v1alpha1_zone_insight_proto_rawDescOnce.Do(func() { - file_api_system_v1alpha1_zone_insight_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_system_v1alpha1_zone_insight_proto_rawDescData) - }) - return file_api_system_v1alpha1_zone_insight_proto_rawDescData -} - -var file_api_system_v1alpha1_zone_insight_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_api_system_v1alpha1_zone_insight_proto_goTypes = []any{ - (*ZoneInsight)(nil), // 0: dubbo.system.v1alpha1.ZoneInsight - (*EnvoyAdminStreams)(nil), // 1: dubbo.system.v1alpha1.EnvoyAdminStreams - (*DDSSubscription)(nil), // 2: dubbo.system.v1alpha1.DDSSubscription - (*DDSSubscriptionStatus)(nil), // 3: dubbo.system.v1alpha1.DDSSubscriptionStatus - (*DDSServiceStats)(nil), // 4: dubbo.system.v1alpha1.DDSServiceStats - (*HealthCheck)(nil), // 5: dubbo.system.v1alpha1.HealthCheck - nil, // 6: dubbo.system.v1alpha1.DDSSubscriptionStatus.StatEntry - (*timestamp.Timestamp)(nil), // 7: google.protobuf.Timestamp -} -var file_api_system_v1alpha1_zone_insight_proto_depIdxs = []int32{ - 2, // 0: dubbo.system.v1alpha1.ZoneInsight.subscriptions:type_name -> dubbo.system.v1alpha1.DDSSubscription - 1, // 1: dubbo.system.v1alpha1.ZoneInsight.envoy_admin_streams:type_name -> dubbo.system.v1alpha1.EnvoyAdminStreams - 5, // 2: dubbo.system.v1alpha1.ZoneInsight.health_check:type_name -> dubbo.system.v1alpha1.HealthCheck - 7, // 3: dubbo.system.v1alpha1.DDSSubscription.connect_time:type_name -> google.protobuf.Timestamp - 7, // 4: dubbo.system.v1alpha1.DDSSubscription.disconnect_time:type_name -> google.protobuf.Timestamp - 3, // 5: dubbo.system.v1alpha1.DDSSubscription.status:type_name -> dubbo.system.v1alpha1.DDSSubscriptionStatus - 7, // 6: dubbo.system.v1alpha1.DDSSubscriptionStatus.last_update_time:type_name -> google.protobuf.Timestamp - 4, // 7: dubbo.system.v1alpha1.DDSSubscriptionStatus.total:type_name -> dubbo.system.v1alpha1.DDSServiceStats - 6, // 8: dubbo.system.v1alpha1.DDSSubscriptionStatus.stat:type_name -> dubbo.system.v1alpha1.DDSSubscriptionStatus.StatEntry - 7, // 9: dubbo.system.v1alpha1.HealthCheck.time:type_name -> google.protobuf.Timestamp - 4, // 10: dubbo.system.v1alpha1.DDSSubscriptionStatus.StatEntry.value:type_name -> dubbo.system.v1alpha1.DDSServiceStats - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_api_system_v1alpha1_zone_insight_proto_init() } -func file_api_system_v1alpha1_zone_insight_proto_init() { - if File_api_system_v1alpha1_zone_insight_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_system_v1alpha1_zone_insight_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_api_system_v1alpha1_zone_insight_proto_goTypes, - DependencyIndexes: file_api_system_v1alpha1_zone_insight_proto_depIdxs, - MessageInfos: file_api_system_v1alpha1_zone_insight_proto_msgTypes, - }.Build() - File_api_system_v1alpha1_zone_insight_proto = out.File - file_api_system_v1alpha1_zone_insight_proto_rawDesc = nil - file_api_system_v1alpha1_zone_insight_proto_goTypes = nil - file_api_system_v1alpha1_zone_insight_proto_depIdxs = nil -} diff --git a/api/system/v1alpha1/zone_insight.proto b/api/system/v1alpha1/zone_insight.proto deleted file mode 100644 index 3c4e7d998..000000000 --- a/api/system/v1alpha1/zone_insight.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package dubbo.system.v1alpha1; - -option go_package = "github.com/apache/dubbo-admin/api/system/v1alpha1"; - -import "api/mesh/options.proto"; -import "google/protobuf/timestamp.proto"; - -message ZoneInsight { - - option (dubbo.mesh.resource).name = "ZoneInsightResource"; - option (dubbo.mesh.resource).type = "ZoneInsight"; - option (dubbo.mesh.resource).package = "system"; - option (dubbo.mesh.resource).global = true; - option (dubbo.mesh.resource).ws.name = "zone-insight"; - option (dubbo.mesh.resource).ws.read_only = true; - - // List of DDS subscriptions created by a given Zone Dubbo CP. - repeated DDSSubscription subscriptions = 1; - - // Statistics about Envoy Admin Streams - EnvoyAdminStreams envoy_admin_streams = 2; - - HealthCheck health_check = 3; -} - -message EnvoyAdminStreams { - // Global instance ID that handles XDS Config Dump streams. - string config_dump_global_instance_id = 1; - // Global instance ID that handles Stats streams. - string stats_global_instance_id = 2; - // Global instance ID that handles Clusters streams. - string clusters_global_instance_id = 3; -} - -// DDSSubscription describes a single DDS subscription -// created by a Zone to the Global. -// Ideally, there should be only one such subscription per Zone lifecycle. -// Presence of multiple subscriptions might indicate one of the following -// events: -// - transient loss of network connection between Zone and Global Control -// Planes -// - Zone Dubbo CP restarts (i.e. hot restart or crash) -// - Global Dubbo CP restarts (i.e. rolling update or crash) -// - etc -message DDSSubscription { - - // Unique id per DDS subscription. - string id = 1; - - // Global CP instance that handled given subscription. - string global_instance_id = 2; - - // Time when a given Zone connected to the Global. - google.protobuf.Timestamp connect_time = 3; - - // Time when a given Zone disconnected from the Global. - google.protobuf.Timestamp disconnect_time = 4; - - // Status of the DDS subscription. - DDSSubscriptionStatus status = 5; - - // Generation is an integer number which is periodically increased by the - // status sink - uint32 generation = 7; - - // Config of Zone Dubbo CP - string config = 8; - - // Indicates if subscription provided auth token - bool auth_token_provided = 9; - - // Zone CP instance that handled the given subscription (This is the leader at - // time of connection). - string zone_instance_id = 10; -} - -// DDSSubscriptionStatus defines status of an DDS subscription. -message DDSSubscriptionStatus { - - // Time when status of a given DDS subscription was most recently updated. - google.protobuf.Timestamp last_update_time = 1; - - // Total defines an aggregate over individual DDS stats. - DDSServiceStats total = 2; - - map stat = 3; -} - -// DiscoveryServiceStats defines all stats over a single xDS service. -message DDSServiceStats { - - // Number of xDS responses sent to the Dataplane. - uint64 responses_sent = 1; - - // Number of xDS responses ACKed by the Dataplane. - uint64 responses_acknowledged = 2; - - // Number of xDS responses NACKed by the Dataplane. - uint64 responses_rejected = 3; -} - -// HealthCheck holds information about the received zone health check -message HealthCheck { - // Time last health check received - google.protobuf.Timestamp time = 1; -} diff --git a/app/dubbo-admin/dubbo-admin.yaml b/app/dubbo-admin/dubbo-admin.yaml index c58aa5e4b..8f105ffac 100644 --- a/app/dubbo-admin/dubbo-admin.yaml +++ b/app/dubbo-admin/dubbo-admin.yaml @@ -33,9 +33,9 @@ console: instance: xx service: xx auth: - type: oath2 - oauth2: - clientId: xx + user: admin + password: dubbo@2025 + expirationTime: 3600 store: type: mysql address: xx diff --git a/go.mod b/go.mod index 8a40b1e07..049253545 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,6 @@ module github.com/apache/dubbo-admin go 1.23.0 require ( - dubbo.apache.org/dubbo-go/v3 v3.3.0 github.com/Masterminds/semver/v3 v3.2.1 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 github.com/bakito/go-log-logr-adapter v0.0.2 diff --git a/go.sum b/go.sum index 2b456b47c..74ff327fb 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -dubbo.apache.org/dubbo-go/v3 v3.3.0 h1:jhwK4nQ1DsKQ6H9p7icZx0jg9ulF1vpAA/c0Ly8Et4w= -dubbo.apache.org/dubbo-go/v3 v3.3.0/go.mod h1:zu2m9tUGaZYfuaMX82pLlwmq7Vl4s5eenZNBGdfAagc= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= diff --git a/api/system/v1alpha1/zone_helpers.go b/pkg/common/errors/error.go similarity index 53% rename from api/system/v1alpha1/zone_helpers.go rename to pkg/common/errors/error.go index a673e2981..196386012 100644 --- a/api/system/v1alpha1/zone_helpers.go +++ b/pkg/common/errors/error.go @@ -15,11 +15,41 @@ * limitations under the License. */ -package v1alpha1 +package errors -func (x *Zone) IsEnabled() bool { - if x.Enabled == nil { - return true +import ( + "errors" + "fmt" +) + +type AssertionError struct { + msg string +} + +func NewAssertionError(expected, actual interface{}) error { + return &AssertionError{ + msg: fmt.Sprintf("type assertion error, expected:%v, actual:%v", expected, actual), } - return x.Enabled.GetValue() +} + +func (e *AssertionError) Error() string { + return e.msg +} + +type MeshNotFoundError struct { + Mesh string +} + +func (m *MeshNotFoundError) Error() string { + return fmt.Sprintf("mesh of name %s is not found", m.Mesh) +} + +func MeshNotFound(meshName string) error { + return &MeshNotFoundError{meshName} +} + +func IsMeshNotFound(err error) bool { + var meshNotFoundError *MeshNotFoundError + ok := errors.As(err, &meshNotFoundError) + return ok } diff --git a/pkg/config/app/admin.go b/pkg/config/app/admin.go index 3ca53182b..62072b8b4 100644 --- a/pkg/config/app/admin.go +++ b/pkg/config/app/admin.go @@ -37,7 +37,7 @@ type AdminConfig struct { // Diagnostics configuration Diagnostics *diagnostics.Config `json:"diagnostics,omitempty"` // Console configuration - Console *console.Config `json:"admin"` + Console *console.Config `json:"console"` // Store configuration Store *store.Config `json:"store"` // Discovery configuration diff --git a/pkg/console/handler/application.go b/pkg/console/handler/application.go index af6b49fdc..1eedc9069 100644 --- a/pkg/console/handler/application.go +++ b/pkg/console/handler/application.go @@ -21,6 +21,7 @@ import ( "net/http" "strconv" + "github.com/duke-git/lancet/v2/strutil" "github.com/gin-gonic/gin" meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" @@ -29,7 +30,7 @@ import ( "github.com/apache/dubbo-admin/pkg/console/service" "github.com/apache/dubbo-admin/pkg/core/consts" "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" corestore "github.com/apache/dubbo-admin/pkg/core/store" ) @@ -57,7 +58,7 @@ func GetApplicationTabInstanceInfo(ctx consolectx.Context) gin.HandlerFunc { return } - resp, err := service.GetApplicationTabInstanceInfo(ctx, req) + resp, err := service.GetAppInstanceInfo(ctx, req) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return @@ -74,7 +75,7 @@ func GetApplicationServiceForm(ctx consolectx.Context) gin.HandlerFunc { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - resp, err := service.GetApplicationServiceFormInfo(ctx, req) + resp, err := service.GetAppServiceInfo(ctx, req) if err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return @@ -91,7 +92,7 @@ func ApplicationSearch(ctx consolectx.Context) gin.HandlerFunc { return } - resp, err := service.GetApplicationSearchInfo(ctx, req) + resp, err := service.SearchApplications(ctx, req) if err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return @@ -115,42 +116,39 @@ func isAppOperatorLogOpened(conf *meshproto.OverrideConfig, appName string) bool return true } -func generateDefaultConfigurator(name string, scope string, version string, enabled bool) *coremodel.DynamicConfigResource { - return &coremodel.DynamicConfigResource{ - Meta: nil, - Spec: &meshproto.DynamicConfig{ - Key: name, - Scope: scope, - ConfigVersion: version, - Enabled: enabled, - Configs: make([]*meshproto.OverrideConfig, 0), - }, - } -} - func ApplicationConfigOperatorLogPut(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var ( - ApplicationName string - OperatorLog bool + appName string + operatorLogOpen bool isNotExist = false + mesh string ) - ApplicationName = c.Query("appName") - OperatorLog, err := strconv.ParseBool(c.Query("operatorLog")) + appName = c.Query("appName") + mesh = c.Query("mesh") + operatorLogOpen, err := strconv.ParseBool(c.Query("operatorLog")) if err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - res, err := service.GetConfigurator(ctx, ApplicationName) + appConfiguratorName := appName + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) if err != nil { if corestore.IsResourceNotFound(err) { - // for check app exist - data, err := service.GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: ApplicationName}) + // check app exists + data, err := service.GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: appName}) if err != nil || data == nil { c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) return } - res = generateDefaultConfigurator(ApplicationName, consts.ScopeApplication, consts.ConfiguratorVersionV3, true) + res = meshresource.NewDynamicConfigResourceWithAttributes(appConfiguratorName, mesh) + res.Spec = &meshproto.DynamicConfig{ + Key: appName, + Scope: consts.ScopeApplication, + ConfigVersion: consts.ConfiguratorVersionV3, + Enabled: true, + Configs: make([]*meshproto.OverrideConfig, 0), + } isNotExist = true } else { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) @@ -158,11 +156,11 @@ func ApplicationConfigOperatorLogPut(ctx consolectx.Context) gin.HandlerFunc { } } // append or remove - if OperatorLog { + if operatorLogOpen { // check is already exist alreadyExist := false res.Spec.RangeConfig(func(conf *meshproto.OverrideConfig) (isStop bool) { - alreadyExist = isAppOperatorLogOpened(conf, ApplicationName) + alreadyExist = isAppOperatorLogOpened(conf, appName) return alreadyExist }) if alreadyExist { @@ -173,10 +171,16 @@ func ApplicationConfigOperatorLogPut(ctx consolectx.Context) gin.HandlerFunc { res.Spec.Configs = make([]*meshproto.OverrideConfig, 0) } res.Spec.Configs = append(res.Spec.Configs, &meshproto.OverrideConfig{ - Side: consts.SideProvider, - Parameters: map[string]string{`accesslog`: `true`}, - Enabled: true, - Match: &meshproto.ConditionMatch{Application: &meshproto.ListStringMatch{Oneof: []*meshproto.StringMatch{{Exact: ApplicationName}}}}, + Side: consts.SideProvider, + Parameters: map[string]string{`accesslog`: `true`}, + Enabled: true, + Match: &meshproto.ConditionMatch{ + Application: &meshproto.ListStringMatch{ + Oneof: []*meshproto.StringMatch{ + { + Exact: appName, + }, + }}}, XGenerateByCp: true, }) } else { @@ -184,18 +188,18 @@ func ApplicationConfigOperatorLogPut(ctx consolectx.Context) gin.HandlerFunc { if conf == nil { return true } - return isAppOperatorLogOpened(conf, ApplicationName) + return isAppOperatorLogOpened(conf, appName) }) } // restore if isNotExist { - err = service.CreateConfigurator(ctx, ApplicationName, res) + err = service.CreateConfigurator(ctx, appName, res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } } else { - err = service.UpdateConfigurator(ctx, ApplicationName, res) + err = service.UpdateConfigurator(ctx, appName, res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return @@ -207,12 +211,18 @@ func ApplicationConfigOperatorLogPut(ctx consolectx.Context) gin.HandlerFunc { func ApplicationConfigOperatorLogGet(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - ApplicationName := c.Query("appName") - if ApplicationName == "" { + appName := c.Query("appName") + if appName == "" { c.JSON(http.StatusBadRequest, model.NewErrorResp("appName is required")) return } - res, err := service.GetConfigurator(ctx, ApplicationName) + mesh := c.Query("mesh") + if strutil.IsBlank(mesh) { + c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is required")) + return + } + appConfiguratorName := appName + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) if err != nil { if corestore.IsResourceNotFound(err) { c.JSON(http.StatusOK, model.NewSuccessResp(map[string]interface{}{"operatorLog": false})) @@ -223,7 +233,7 @@ func ApplicationConfigOperatorLogGet(ctx consolectx.Context) gin.HandlerFunc { } isExist := false res.Spec.RangeConfig(func(conf *meshproto.OverrideConfig) (isStop bool) { - if isExist = isAppOperatorLogOpened(conf, ApplicationName); isExist { + if isExist = isAppOperatorLogOpened(conf, appName); isExist { return true } return false @@ -235,20 +245,22 @@ func ApplicationConfigOperatorLogGet(ctx consolectx.Context) gin.HandlerFunc { func ApplicationConfigFlowWeightGET(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var ( - ApplicationName string - resp = struct { + appName string + mesh string + resp = struct { FlowWeightSets []model.FlowWeightSet `json:"flowWeightSets"` }{} ) - ApplicationName = c.Query("appName") - if ApplicationName == "" { + appName = c.Query("appName") + mesh = c.Query("mesh") + if appName == "" { c.JSON(http.StatusBadRequest, model.NewErrorResp("appName is required")) return } resp.FlowWeightSets = make([]model.FlowWeightSet, 0) - - res, err := service.GetConfigurator(ctx, ApplicationName) + appConfiguratorName := appName + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) if err != nil { if corestore.IsResourceNotFound(err) { c.JSON(http.StatusOK, model.NewSuccessResp(resp)) @@ -304,26 +316,33 @@ func isFlowWeight(conf *meshproto.OverrideConfig) bool { func ApplicationConfigFlowWeightPUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var ( - ApplicationName = "" - body = struct { + appName string + mesh string + body = struct { FlowWeightSets []model.FlowWeightSet `json:"flowWeightSets"` }{} ) - ApplicationName = c.Query("appName") - if ApplicationName == "" { + appName = c.Query("appName") + mesh = c.Query("mesh") + if strutil.IsBlank(appName) { c.JSON(http.StatusBadRequest, model.NewErrorResp("application name is required")) } + if strutil.IsBlank(mesh) { + c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is required")) + return + } if err := c.Bind(&body); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } // get from store, or generate default resource isNotExist := false - res, err := service.GetConfigurator(ctx, ApplicationName) + appConfiguratorName := appName + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) if err != nil { if corestore.IsResourceNotFound(err) { // for check app exist - data, err := service.GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: ApplicationName}) + data, err := service.GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: appName}) if err != nil { c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) return @@ -331,7 +350,14 @@ func ApplicationConfigFlowWeightPUT(ctx consolectx.Context) gin.HandlerFunc { c.JSON(http.StatusNotFound, model.NewErrorResp("application not found")) return } - res = generateDefaultConfigurator(ApplicationName, consts.ScopeApplication, consts.ConfiguratorVersionV3, true) + res = meshresource.NewDynamicConfigResourceWithAttributes(appConfiguratorName, mesh) + res.Spec = &meshproto.DynamicConfig{ + Key: appName, + Scope: consts.ScopeApplication, + ConfigVersion: consts.ConfiguratorVersionV3, + Enabled: true, + Configs: make([]*meshproto.OverrideConfig, 0), + } isNotExist = true } else { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) @@ -363,13 +389,13 @@ func ApplicationConfigFlowWeightPUT(ctx consolectx.Context) gin.HandlerFunc { } // restore if isNotExist { - err = service.CreateConfigurator(ctx, ApplicationName, res) + err = service.CreateConfigurator(ctx, appName, res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } } else { - err = service.UpdateConfigurator(ctx, ApplicationName, res) + err = service.UpdateConfigurator(ctx, appName, res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return @@ -382,18 +408,24 @@ func ApplicationConfigFlowWeightPUT(ctx consolectx.Context) gin.HandlerFunc { func ApplicationConfigGrayGET(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var ( - ApplicationName = "" - resp = struct { + appName string + mesh string + resp = struct { GraySets []model.GraySet `json:"graySets"` }{} ) - ApplicationName = c.Query("appName") - if ApplicationName == "" { + appName = c.Query("appName") + mesh = c.Query("mesh") + if strutil.IsBlank(appName) { c.JSON(http.StatusBadRequest, model.NewErrorResp("appName is required")) return } - - res, err := service.GetTagRule(ctx, ApplicationName) + if strutil.IsBlank(mesh) { + c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is required")) + return + } + serviceTagRuleName := appName + consts.TagRuleSuffix + res, err := service.GetTagRule(ctx, serviceTagRuleName, mesh) if err != nil { if corestore.IsResourceNotFound(err) { resp.GraySets = make([]model.GraySet, 0) @@ -429,24 +461,34 @@ func ApplicationConfigGrayGET(ctx consolectx.Context) gin.HandlerFunc { func ApplicationConfigGrayPUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var ( - ApplicationName = "" - body = struct { + appName string + mesh string + body = struct { GraySets []model.GraySet `json:"graySets"` }{} ) - ApplicationName = c.Query("appName") - if ApplicationName == "" { + appName = c.Query("appName") + mesh = c.Query("mesh") + if strutil.IsBlank(appName) { c.JSON(http.StatusBadRequest, model.NewErrorResp("application name is required")) return } + if strutil.IsBlank(mesh) { + c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is required")) + return + } if err := c.Bind(&body); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) } isNotExist := false - res, err := service.GetTagRule(ctx, ApplicationName) - if corestore.IsResourceNotFound(err) { - data, err := service.GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: ApplicationName}) + serviceTagRuleName := appName + consts.TagRuleSuffix + res, err := service.GetTagRule(ctx, serviceTagRuleName, mesh) + if err != nil { + c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) + } + if res == nil { + data, err := service.GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: appName, Mesh: mesh}) if err != nil { c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) return @@ -454,7 +496,15 @@ func ApplicationConfigGrayPUT(ctx consolectx.Context) gin.HandlerFunc { c.JSON(http.StatusNotFound, model.NewErrorResp("application not found")) return } - res = generateDefaultTagRule(ApplicationName, consts.ConfiguratorVersionV3, true, false) + + res = meshresource.NewTagRouteResourceWithAttributes(serviceTagRuleName, mesh) + res.Spec = &meshproto.TagRoute{ + Enabled: true, + Key: appName, + ConfigVersion: consts.ConfiguratorVersionV3, + Force: false, + Tags: make([]*meshproto.Tag, 0), + } isNotExist = true } @@ -481,13 +531,13 @@ func ApplicationConfigGrayPUT(ctx consolectx.Context) gin.HandlerFunc { // restore if isNotExist { - err = service.CreateTagRule(ctx, ApplicationName, res) + err = service.CreateTagRule(ctx, res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } } else { - err = service.UpdateTagRule(ctx, ApplicationName, res) + err = service.UpdateTagRule(ctx, res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return @@ -503,16 +553,3 @@ func isGrayTag(tag *meshproto.Tag) bool { } return true } - -func generateDefaultTagRule(name string, version string, enable, force bool) *coremodel.TagRouteResource { - return &coremodel.TagRouteResource{ - Meta: nil, - Spec: &meshproto.TagRoute{ - Enabled: enable, - Key: name, - ConfigVersion: version, - Force: force, - Tags: make([]*meshproto.Tag, 0), - }, - } -} diff --git a/pkg/console/handler/condition_rule.go b/pkg/console/handler/condition_rule.go index d39bfca6b..6e8eb44a1 100644 --- a/pkg/console/handler/condition_rule.go +++ b/pkg/console/handler/condition_rule.go @@ -32,6 +32,7 @@ import ( "github.com/apache/dubbo-admin/pkg/console/model" "github.com/apache/dubbo-admin/pkg/console/service" "github.com/apache/dubbo-admin/pkg/core/consts" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" ) func ConditionRuleSearch(cs consolectx.Context) gin.HandlerFunc { @@ -54,13 +55,14 @@ func GetConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.ConditionRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.ConditionRuleSuffix)] } else { c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.ConditionRuleSuffix))) return } - if res, err := service.GetConditionRule(cs, name); err != nil { + if res, err := service.GetConditionRule(cs, name, mesh); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } else { @@ -95,6 +97,7 @@ func PutConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.ConditionRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.ConditionRuleSuffix)] } else { @@ -107,7 +110,7 @@ func PutConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { return } - res := &mesh.ConditionRouteResource{} + res := meshresource.NewConditionRouteResourceWithAttributes(ruleName, mesh) if version := _map[consts.ConfigVersionKey]; version == consts.ConfiguratorVersionV3 { v3 := new(meshproto.ConditionRouteV3) err = mapToStructure(_map, &v3) @@ -115,11 +118,7 @@ func PutConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } - err = res.SetSpec(v3.ToConditionRoute()) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } + res.Spec = v3.ToConditionRoute() } else if version == consts.ConfiguratorVersionV3x1 { v3x1 := new(meshproto.ConditionRouteV3X1) err = mapToStructure(_map, &v3x1) @@ -128,11 +127,7 @@ func PutConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { return } - err = res.SetSpec(v3x1.ToConditionRoute()) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } + res.Spec = v3x1.ToConditionRoute() } else { c.JSON(http.StatusBadRequest, model.NewErrorResp("invalid request body")) return @@ -151,6 +146,7 @@ func PostConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.ConditionRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.ConditionRuleSuffix)] } else { @@ -163,7 +159,8 @@ func PostConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { return } - res := &mesh.ConditionRouteResource{} + res := &meshresource.ConditionRouteResource{} + res = meshresource.NewConditionRouteResourceWithAttributes(ruleName, mesh) if version := _map[consts.ConfigVersionKey]; version == consts.ConfiguratorVersionV3 { v3 := new(meshproto.ConditionRouteV3) err = mapToStructure(_map, &v3) @@ -171,11 +168,7 @@ func PostConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } - err = res.SetSpec(v3.ToConditionRoute()) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } + res.Spec = v3.ToConditionRoute() } else if version == consts.ConfiguratorVersionV3x1 { v3x1 := new(meshproto.ConditionRouteV3X1) err = mapToStructure(_map, &v3x1) @@ -183,11 +176,7 @@ func PostConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } - err = res.SetSpec(v3x1.ToConditionRoute()) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } + res.Spec = v3x1.ToConditionRoute() } else { c.JSON(http.StatusBadRequest, model.NewErrorResp("invalid request body")) return @@ -206,14 +195,14 @@ func DeleteConditionRuleWithRuleName(cs consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") - res := &mesh.ConditionRouteResource{Spec: &meshproto.ConditionRoute{}} + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.ConditionRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.ConditionRuleSuffix)] } else { c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.ConditionRuleSuffix))) return } - if err := service.DeleteConditionRule(cs, name, res); err != nil { + if err := service.DeleteConditionRule(cs, name, mesh); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } diff --git a/pkg/console/handler/configurator_rule.go b/pkg/console/handler/configurator_rule.go index 1851a9da9..37ed7f803 100644 --- a/pkg/console/handler/configurator_rule.go +++ b/pkg/console/handler/configurator_rule.go @@ -20,17 +20,19 @@ package handler import ( "fmt" "net/http" - "strconv" "strings" + "github.com/duke-git/lancet/v2/strutil" "github.com/gin-gonic/gin" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" "github.com/apache/dubbo-admin/pkg/console/service" "github.com/apache/dubbo-admin/pkg/core/consts" - "github.com/apache/dubbo-admin/pkg/core/store" + "github.com/apache/dubbo-admin/pkg/core/manager" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/store/index" ) func ConfiguratorSearch(ctx consolectx.Context) gin.HandlerFunc { @@ -40,45 +42,62 @@ func ConfiguratorSearch(ctx consolectx.Context) gin.HandlerFunc { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - ruleList := &mesh.DynamicConfigResourceList{} - var respList []model.ConfiguratorSearchResp - if req.Keywords == "" { - if err := ctx.ResourceManager().List(ctx.AppContext(), ruleList, store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) - return - } + var pageData *coremodel.PageData[*meshresource.DynamicConfigResource] + var err error + if strutil.IsBlank(req.Keywords) { + pageData, err = manager.PageListByIndexes[*meshresource.DynamicConfigResource]( + ctx.ResourceManager(), + meshresource.DynamicConfigKind, + map[string]interface{}{ + index.ByMeshIndex: req.Mesh, + }, + req.PageReq, + ) + } else { - if err := ctx.ResourceManager().List(ctx.AppContext(), ruleList, store.ListByNameContains(req.Keywords), store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) - return - } + pageData, err = manager.PageSearchResourceByConditions[*meshresource.DynamicConfigResource]( + ctx.ResourceManager(), + meshresource.DynamicConfigKind, + []string{"name=" + req.Keywords}, + req.PageReq, + ) + } - for _, item := range ruleList.Items { + if err != nil { + c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) + return + } + var respList []model.ConfiguratorSearchResp + for _, res := range pageData.Data { + configurator := res.Spec respList = append(respList, model.ConfiguratorSearchResp{ - RuleName: item.Meta.GetName(), - Scope: item.Spec.GetScope(), - CreateTime: item.Meta.GetCreationTime().String(), - Enabled: item.Spec.GetEnabled(), + RuleName: configurator.Key, + Scope: configurator.Scope, + CreateTime: "", + Enabled: configurator.Enabled, }) } - result := model.NewSearchPaginationResult() - result.List = respList - result.PageInfo = &ruleList.Pagination + result := model.SearchPaginationResult{ + List: respList, + PageInfo: pageData.Pagination, + } c.JSON(http.StatusOK, model.NewSuccessResp(result)) } } func GetConfiguratorWithRuleName(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - var name string ruleName := c.Param("ruleName") - if strings.HasSuffix(ruleName, consts.ConfiguratorRuleSuffix) { - name = ruleName[:len(ruleName)-len(consts.ConfiguratorRuleSuffix)] - } else { - c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.ConfiguratorRuleSuffix))) + mesh := c.Param("mesh") + if strutil.IsBlank(ruleName) { + c.JSON(http.StatusBadRequest, model.NewErrorResp("ruleName cannot be empty")) return } - res, err := service.GetConfigurator(ctx, name) + if strutil.IsBlank(mesh) { + c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh cannot be empty")) + return + } + res, err := service.GetConfigurator(ctx, ruleName, mesh) if err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return @@ -91,16 +110,14 @@ func PutConfiguratorWithRuleName(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.ConfiguratorRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.ConfiguratorRuleSuffix)] } else { c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.ConfiguratorRuleSuffix))) return } - res := &mesh.DynamicConfigResource{ - Meta: nil, - Spec: &meshproto.DynamicConfig{}, - } + res := meshresource.NewDynamicConfigResourceWithAttributes(name, mesh) err := c.Bind(res.Spec) if err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -119,16 +136,14 @@ func PostConfiguratorWithRuleName(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.ConfiguratorRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.ConfiguratorRuleSuffix)] } else { c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.ConfiguratorRuleSuffix))) return } - res := &mesh.DynamicConfigResource{ - Meta: nil, - Spec: &meshproto.DynamicConfig{}, - } + res := meshresource.NewDynamicConfigResourceWithAttributes(name, mesh) err := c.Bind(res.Spec) if err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -147,14 +162,14 @@ func DeleteConfiguratorWithRuleName(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") - res := &mesh.DynamicConfigResource{Spec: &meshproto.DynamicConfig{}} + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.ConfiguratorRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.ConfiguratorRuleSuffix)] } else { c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.ConfiguratorRuleSuffix))) return } - if err := service.DeleteConfigurator(ctx, name, res); err != nil { + if err := service.DeleteConfigurator(ctx, name, mesh); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } diff --git a/pkg/console/handler/instance.go b/pkg/console/handler/instance.go index 91aead806..28c31b423 100644 --- a/pkg/console/handler/instance.go +++ b/pkg/console/handler/instance.go @@ -22,6 +22,7 @@ import ( "strconv" "strings" + "github.com/duke-git/lancet/v2/strutil" "github.com/gin-gonic/gin" "github.com/pkg/errors" @@ -30,6 +31,7 @@ import ( "github.com/apache/dubbo-admin/pkg/console/model" "github.com/apache/dubbo-admin/pkg/console/service" "github.com/apache/dubbo-admin/pkg/core/consts" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" corestore "github.com/apache/dubbo-admin/pkg/core/store" ) @@ -47,11 +49,11 @@ func GetInstanceDetail(ctx consolectx.Context) gin.HandlerFunc { return } - if len(resp) == 0 { + if resp == nil { c.JSON(http.StatusNotFound, model.NewErrorResp("instance not exist")) return } - c.JSON(http.StatusOK, model.NewSuccessResp(resp[0])) + c.JSON(http.StatusOK, model.NewSuccessResp(resp)) } } @@ -79,6 +81,7 @@ func InstanceConfigTrafficDisableGET(ctx consolectx.Context) gin.HandlerFunc { TrafficDisable bool `json:"trafficDisable"` }{false} applicationName := c.Query("appName") + mesh := c.Query("mesh") if applicationName == "" { c.JSON(http.StatusBadRequest, model.NewErrorResp("application name is empty")) return @@ -89,7 +92,7 @@ func InstanceConfigTrafficDisableGET(ctx consolectx.Context) gin.HandlerFunc { return } - res, err := service.GetConditionRule(ctx, applicationName) + res, err := service.GetConditionRule(ctx, applicationName, mesh) if err != nil { if corestore.IsResourceNotFound(err) { c.JSON(http.StatusOK, model.NewSuccessResp(resp)) @@ -166,6 +169,7 @@ func isTrafficDisabledV3(condition string, targetIP string) (exist bool, disable func InstanceConfigTrafficDisablePUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { appName := strings.TrimSpace(c.Query("appName")) + mesh := c.Query("mesh") if appName == "" { c.JSON(http.StatusBadRequest, model.NewErrorResp("application name is empty")) return @@ -182,7 +186,7 @@ func InstanceConfigTrafficDisablePUT(ctx consolectx.Context) gin.HandlerFunc { } existRule := true - rawRes, err := service.GetConditionRule(ctx, appName) + rawRes, err := service.GetConditionRule(ctx, appName, mesh) var res *meshproto.ConditionRouteV3 if err != nil { if !corestore.IsResourceNotFound(err) { @@ -194,7 +198,8 @@ func InstanceConfigTrafficDisablePUT(ctx consolectx.Context) gin.HandlerFunc { } existRule = false res = generateDefaultConditionV3(true, true, true, appName, consts.ScopeApplication) - rawRes = &mesh.ConditionRouteResource{Spec: res.ToConditionRoute()} + rawRes = meshresource.NewConditionRouteResourceWithAttributes(appName, mesh) + rawRes.Spec = res.ToConditionRoute() } else if res = rawRes.Spec.ToConditionRouteV3(); res == nil { c.JSON(http.StatusServiceUnavailable, model.NewErrorResp("this config only serve condition-route.configVersion == v3.1, got v3.0 config ")) return @@ -237,7 +242,7 @@ func InstanceConfigTrafficDisablePUT(ctx consolectx.Context) gin.HandlerFunc { func disableExpression(instanceIP string) string { return "=>host!=" + instanceIP } -func updateORCreateConditionRule(ctx consolectx.Context, existRule bool, appName string, rawRes *mesh.ConditionRouteResource) error { +func updateORCreateConditionRule(ctx consolectx.Context, existRule bool, appName string, rawRes *meshresource.ConditionRouteResource) error { if !existRule { return service.CreateConditionRule(ctx, appName, rawRes) } else { @@ -287,17 +292,22 @@ func InstanceConfigOperatorLogGET(ctx consolectx.Context) gin.HandlerFunc { OperatorLog bool `json:"operatorLog"` }{false} applicationName := c.Query(`appName`) - if applicationName == "" { + if strutil.IsBlank(applicationName) { c.JSON(http.StatusBadRequest, model.NewErrorResp("application name is empty")) return } instanceIP := c.Query(`instanceIP`) - if instanceIP == "" { + if strutil.IsBlank(instanceIP) { c.JSON(http.StatusBadRequest, model.NewErrorResp("instanceIP is empty")) return } - - res, err := service.GetConfigurator(ctx, applicationName) + mesh := c.Query(`mesh`) + if strutil.IsBlank(mesh) { + c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is empty")) + return + } + appConfiguratorName := applicationName + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) if err != nil { if corestore.IsResourceNotFound(err) { c.JSON(http.StatusOK, model.NewSuccessResp(resp)) @@ -334,12 +344,12 @@ func isInstanceOperatorLogOpen(conf *meshproto.OverrideConfig, IP string) bool { func InstanceConfigOperatorLogPUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { applicationName := c.Query(`appName`) - if applicationName == "" { + if strutil.IsBlank(applicationName) { c.JSON(http.StatusBadRequest, model.NewErrorResp("application name is empty")) return } instanceIP := c.Query(`instanceIP`) - if instanceIP == "" { + if strutil.IsBlank(instanceIP) { c.JSON(http.StatusBadRequest, model.NewErrorResp("instanceIP is empty")) return } @@ -348,15 +358,27 @@ func InstanceConfigOperatorLogPUT(ctx consolectx.Context) gin.HandlerFunc { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - - res, err := service.GetConfigurator(ctx, applicationName) + mesh := c.Query("mesh") + if strutil.IsBlank(mesh) { + c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is empty")) + return + } + appConfiguratorName := applicationName + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) notExist := false if err != nil { if !corestore.IsResourceNotFound(err) { c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) return } - res = generateDefaultConfigurator(applicationName, consts.ScopeApplication, consts.ConfiguratorVersionV3, true) + res = meshresource.NewDynamicConfigResourceWithAttributes(appConfiguratorName, mesh) + res.Spec = &meshproto.DynamicConfig{ + Key: applicationName, + Scope: consts.ScopeApplication, + ConfigVersion: consts.ConfiguratorVersionV3, + Enabled: true, + Configs: make([]*meshproto.OverrideConfig, 0), + } notExist = true } diff --git a/pkg/console/handler/observability.go b/pkg/console/handler/observability.go index 6a59e3e24..79f3b0a43 100644 --- a/pkg/console/handler/observability.go +++ b/pkg/console/handler/observability.go @@ -100,6 +100,8 @@ func GetMetricsList(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { req := &model.MetricsReq{} if err := c.ShouldBindQuery(req); err != nil { + c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + return } resp, err := service.GetInstanceMetrics(ctx, req) if err != nil { diff --git a/pkg/console/handler/overview.go b/pkg/console/handler/overview.go index 28ebd64d0..ae1a1e6d6 100644 --- a/pkg/console/handler/overview.go +++ b/pkg/console/handler/overview.go @@ -20,58 +20,12 @@ package handler import ( "net/http" - gxset "github.com/dubbogo/gost/container/set" "github.com/gin-gonic/gin" - "github.com/apache/dubbo-admin/api/mesh/v1alpha1" consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" - coremanager "github.com/apache/dubbo-admin/pkg/core/manager" - "github.com/apache/dubbo-admin/pkg/core/store" ) -func GetInstances(ctx consolectx.Context) gin.HandlerFunc { - return func(c *gin.Context) { - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} - if err := manager.List(ctx.AppContext(), dataplaneList); err != nil { - c.JSON(http.StatusInternalServerError, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(http.StatusOK, model.NewSuccessResp(dataplaneList)) - } -} - -func GetMetas(ctx consolectx.Context) gin.HandlerFunc { - return func(c *gin.Context) { - manager := ctx.ResourceManager() - metadataList := &mesh.MetaDataResourceList{} - if err := manager.List(ctx.AppContext(), metadataList); err != nil { - c.JSON(http.StatusInternalServerError, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(http.StatusOK, model.NewSuccessResp(metadataList)) - } -} - -func GetMappings(ctx consolectx.Context) gin.HandlerFunc { - return func(c *gin.Context) { - manager := ctx.ResourceManager() - mappingList := &mesh.MappingResourceList{} - if err := manager.List(ctx.AppContext(), mappingList); err != nil { - c.JSON(http.StatusInternalServerError, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(http.StatusOK, model.NewSuccessResp(mappingList)) - } -} - func AdminMetadata(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { res := model.NewAdminMetadata() @@ -80,122 +34,11 @@ func AdminMetadata(ctx consolectx.Context) gin.HandlerFunc { } } +// ClusterOverview TODO implement func ClusterOverview(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - res := model.NewOverviewResp() - - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} - if err := manager.List(ctx.AppContext(), dataplaneList); err != nil { - c.JSON(http.StatusInternalServerError, gin.H{ - "error": err.Error(), - }) - return - } - - calAppCount(res, dataplaneList) - err := calServiceInfo(res, dataplaneList, ctx, manager) - if err != nil { - return - } - res.InsCount = len(dataplaneList.Items) - - c.JSON(http.StatusOK, model.NewSuccessResp(res)) - } -} + resp := model.NewOverviewResp() -func calAppCount(res *model.OverviewResp, list *mesh.DataplaneResourceList) { - set := gxset.NewSet() - for _, ins := range list.Items { - set.Add(ins.Spec.GetExtensions()[v1alpha1.Application]) + c.JSON(http.StatusOK, model.NewSuccessResp(resp)) } - - res.AppCount = set.Size() -} - -func calServiceInfo(res *model.OverviewResp, list *mesh.DataplaneResourceList, ctx consolectx.Context, manager coremanager.ResourceManager) error { - revisions := make(map[string]*mesh.MetaDataResource, 0) - protocols := make(map[string]*gxset.HashSet) - releases := make(map[string]string) - services := make(map[string]string) - discoveries := make(map[string]*gxset.HashSet) - - for _, ins := range list.Items { - app := ins.Spec.GetExtensions()[v1alpha1.Application] - - t := ins.Spec.GetExtensions()["registry-type"] - if t == "" { - t = "instance" - } - if set, ok := discoveries[t]; ok { - set.Add(app) - } else { - newSet := gxset.NewSet() - newSet.Add(app) - discoveries[t] = newSet - } - - rev, exists := ins.Spec.GetExtensions()[v1alpha1.RevisionLabel] - if exists { - metadata, cached := revisions[rev] - if !cached { - metadata = &mesh.MetaDataResource{ - Spec: &v1alpha1.MetaData{}, - } - if err := manager.Get(ctx.AppContext(), metadata, store.GetByRevision(rev), store.GetByType(ins.Spec.GetExtensions()["registry-type"])); err != nil { - return err - } - revisions[rev] = metadata - - for _, serviceInfo := range metadata.Spec.Services { - // proKey := serviceInfo.Protocol + strconv.Itoa(int(serviceInfo.Port)) - proKey := serviceInfo.Protocol - if extProtocols, ok := serviceInfo.GetParams()["ext.protocol"]; ok { - proKey = proKey + extProtocols - } - if set, ok := protocols[proKey]; ok { - set.Add(serviceInfo.Name) - } else { - newSet := gxset.NewSet() - protocols[proKey] = newSet - newSet.Add(serviceInfo.Name) - } - - if _, ok := releases[app]; !ok { - releases[app] = serviceInfo.Params["release"] - } - - if _, ok := services[serviceInfo.Name]; !ok { - services[serviceInfo.Name] = serviceInfo.Name - } - } - } - } - } - - releaseCount := make(map[string]int) - for _, ver := range releases { - if n, ok := releaseCount[ver]; ok { - releaseCount[ver] = n + 1 - } else { - releaseCount[ver] = 1 - } - } - - protocolCount := make(map[string]int) - for p, set := range protocols { - protocolCount[p] = set.Size() - } - - discoveryCount := make(map[string]int) - for d, set := range discoveries { - discoveryCount[d] = set.Size() - } - - res.ServiceCount = len(services) - res.Releases = releaseCount - res.Protocols = protocolCount - res.Discoveries = discoveryCount - - return nil } diff --git a/pkg/console/handler/prometheus.go b/pkg/console/handler/prometheus.go index fdf92b4bb..89b33f61c 100644 --- a/pkg/console/handler/prometheus.go +++ b/pkg/console/handler/prometheus.go @@ -25,6 +25,8 @@ import ( "net/url" "github.com/gin-gonic/gin" + + consolectx "github.com/apache/dubbo-admin/pkg/console/context" ) func PromQL(ctx consolectx.Context) gin.HandlerFunc { diff --git a/pkg/console/handler/search.go b/pkg/console/handler/search.go index ad62cc81b..65eadcfc5 100644 --- a/pkg/console/handler/search.go +++ b/pkg/console/handler/search.go @@ -25,19 +25,17 @@ import ( consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" "github.com/apache/dubbo-admin/pkg/console/service" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) func BannerGlobalSearch(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - // 参考 API 定义 request 参数 req := model.NewSearchReq() if err := c.ShouldBindQuery(req); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - // 根据 request 分流调用,如服务未实现继续实现 - var res *model.SearchRes switch req.SearchType { case "ip": @@ -61,8 +59,8 @@ func BannerGlobalSearch(ctx consolectx.Context) gin.HandlerFunc { c.JSON(http.StatusBadRequest, model.NewErrorResp("invalid search type")) return } - - c.JSON(http.StatusOK, model.NewSuccessResp(model.NewPageData().WithData(res).WithTotal(len(res.Candidates)).WithPageSize(req.PageSize).WithCurPage(req.PageOffset))) + pageResult := coremodel.NewPageData[string](len(res.Candidates), req.PageOffset, req.PageSize, res.Candidates) + c.JSON(http.StatusOK, model.NewSuccessResp(pageResult)) } } diff --git a/pkg/console/handler/service.go b/pkg/console/handler/service.go index 7ff37e2ec..5f19f183e 100644 --- a/pkg/console/handler/service.go +++ b/pkg/console/handler/service.go @@ -18,7 +18,6 @@ package handler import ( - "errors" "net/http" "strconv" @@ -29,6 +28,7 @@ import ( "github.com/apache/dubbo-admin/pkg/console/model" "github.com/apache/dubbo-admin/pkg/console/service" "github.com/apache/dubbo-admin/pkg/core/consts" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" corestore "github.com/apache/dubbo-admin/pkg/core/store" ) @@ -45,7 +45,7 @@ func SearchServices(ctx consolectx.Context) gin.HandlerFunc { return } - resp, err := service.GetSearchServices(ctx, req) + resp, err := service.SearchServices(ctx, req) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return @@ -55,7 +55,6 @@ func SearchServices(ctx consolectx.Context) gin.HandlerFunc { } } -// service distribution func GetServiceTabDistribution(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { req := &model.ServiceTabDistributionReq{} @@ -98,41 +97,18 @@ func GetServiceInterfaces(ctx consolectx.Context) gin.HandlerFunc { } } -type baseService struct { - Service string `json:"serviceName"` - Group string `json:"group"` - Version string `json:"version"` -} - -func (s *baseService) serviceName() string { - return s.Service -} - -func (s *baseService) query(c *gin.Context) error { - s.Service = c.Query("serviceName") - if s.Service == "" { - return errors.New("service name is empty") - } - s.Group = c.Query("group") - s.Version = c.Query("version") - return nil -} - -func (s *baseService) toInterface() string { - return s.Service + consts.Colon + s.Group + consts.Colon + s.Version -} - func ServiceConfigTimeoutGET(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - param := baseService{} + param := model.BaseServiceReq{} resp := struct { Timeout int32 `json:"timeout"` }{DefaultTimeout} - if err := param.query(c); err != nil { + if err := param.Query(c); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - res, err := service.GetConfigurator(ctx, param.toInterface()) + serviceConfiguratorName := param.ServiceKey() + consts.PunctuationPoint + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, serviceConfiguratorName, param.Mesh) if err != nil { if !corestore.IsResourceNotFound(err) { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -166,7 +142,7 @@ func getServiceTimeout(conf *meshproto.OverrideConfig) (int32, bool) { func ServiceConfigTimeoutPUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { param := struct { - baseService + model.BaseServiceReq Timeout int32 `json:"timeout"` }{} if err := c.Bind(¶m); err != nil { @@ -175,7 +151,8 @@ func ServiceConfigTimeoutPUT(ctx consolectx.Context) gin.HandlerFunc { } isExist := true - res, err := service.GetConfigurator(ctx, param.toInterface()) + serviceConfiguratorName := param.ServiceKey() + consts.PunctuationPoint + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, serviceConfiguratorName, param.Mesh) if err != nil { if !corestore.IsResourceNotFound(err) { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -183,7 +160,14 @@ func ServiceConfigTimeoutPUT(ctx consolectx.Context) gin.HandlerFunc { } else if false { // TODO(YarBor) : to check service exist or not } - res = generateDefaultConfigurator(param.serviceName(), consts.ScopeService, consts.ConfiguratorVersionV3, true) + res = meshresource.NewDynamicConfigResourceWithAttributes(serviceConfiguratorName, param.Mesh) + res.Spec = &meshproto.DynamicConfig{ + Key: param.ServiceName, + Scope: consts.ScopeService, + ConfigVersion: consts.ConfiguratorVersionV3, + Enabled: true, + Configs: make([]*meshproto.OverrideConfig, 0), + } isExist = false } else { res.Spec.RangeConfig(func(conf *meshproto.OverrideConfig) (isStop bool) { @@ -201,13 +185,13 @@ func ServiceConfigTimeoutPUT(ctx consolectx.Context) gin.HandlerFunc { Parameters: map[string]string{`timeout`: strconv.Itoa(int(param.Timeout))}, XGenerateByCp: true, }) - err = service.CreateConfigurator(ctx, param.toInterface(), res) + err = service.CreateConfigurator(ctx, param.ServiceKey(), res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } } else { - err = service.UpdateConfigurator(ctx, param.toInterface(), res) + err = service.UpdateConfigurator(ctx, param.ServiceKey(), res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return @@ -219,15 +203,16 @@ func ServiceConfigTimeoutPUT(ctx consolectx.Context) gin.HandlerFunc { func ServiceConfigRetryGET(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - param := baseService{} + param := model.BaseServiceReq{} resp := struct { RetryTimes int32 `json:"retryTimes"` }{DefaultRetries} - if err := param.query(c); err != nil { + if err := param.Query(c); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - res, err := service.GetConfigurator(ctx, param.toInterface()) + serviceConfiguratorName := param.ServiceKey() + consts.PunctuationPoint + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, serviceConfiguratorName, param.Mesh) if err != nil { if !corestore.IsResourceNotFound(err) { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -261,7 +246,7 @@ func getServiceRetryTimes(conf *meshproto.OverrideConfig) (int32, bool) { func ServiceConfigRetryPUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { param := struct { - baseService + model.BaseServiceReq RetryTimes int32 `json:"retryTimes"` }{} if err := c.Bind(¶m); err != nil { @@ -270,7 +255,8 @@ func ServiceConfigRetryPUT(ctx consolectx.Context) gin.HandlerFunc { } isExist := true - res, err := service.GetConfigurator(ctx, param.toInterface()) + serviceConfiguratorName := param.ServiceKey() + consts.PunctuationPoint + consts.ConfiguratorRuleSuffix + res, err := service.GetConfigurator(ctx, serviceConfiguratorName, param.Mesh) if err != nil { if !corestore.IsResourceNotFound(err) { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -278,7 +264,14 @@ func ServiceConfigRetryPUT(ctx consolectx.Context) gin.HandlerFunc { } else if false { // TODO(YarBor) : to check service exist or not } - res = generateDefaultConfigurator(param.serviceName(), consts.ScopeService, consts.ConfiguratorVersionV3, true) + res = meshresource.NewDynamicConfigResourceWithAttributes(serviceConfiguratorName, param.Mesh) + res.Spec = &meshproto.DynamicConfig{ + Key: param.ServiceName, + Scope: consts.ScopeService, + ConfigVersion: consts.ConfiguratorVersionV3, + Enabled: true, + Configs: make([]*meshproto.OverrideConfig, 0), + } isExist = false } @@ -294,13 +287,13 @@ func ServiceConfigRetryPUT(ctx consolectx.Context) gin.HandlerFunc { }) if !isExist { - err = service.CreateConfigurator(ctx, param.toInterface(), res) + err = service.CreateConfigurator(ctx, param.ServiceKey(), res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } } else { - err = service.UpdateConfigurator(ctx, param.toInterface(), res) + err = service.UpdateConfigurator(ctx, param.ServiceKey(), res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return @@ -312,18 +305,18 @@ func ServiceConfigRetryPUT(ctx consolectx.Context) gin.HandlerFunc { func ServiceConfigRegionPriorityGET(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - param := baseService{} + param := model.BaseServiceReq{} resp := struct { Enabled bool `json:"enabled"` Key string `json:"key"` Ratio int `json:"ratio"` }{false, "", 0} - if err := param.query(c); err != nil { + if err := param.Query(c); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - - res, err := getAffinityRule(ctx, param.toInterface()) + serviceAffinityRouteName := param.ServiceKey() + consts.PunctuationPoint + consts.AffinityRuleSuffix + res, err := service.GetAffinityRule(ctx, serviceAffinityRouteName, param.Mesh) if err != nil { if !corestore.IsResourceNotFound(err) { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -346,7 +339,7 @@ func ServiceConfigRegionPriorityGET(ctx consolectx.Context) gin.HandlerFunc { func ServiceConfigRegionPriorityPUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { param := struct { - baseService + model.BaseServiceReq Enabled bool `json:"enabled"` Key string `json:"key"` Ratio int `json:"ratio"` @@ -357,7 +350,8 @@ func ServiceConfigRegionPriorityPUT(ctx consolectx.Context) gin.HandlerFunc { } isExist := true - res, err := getAffinityRule(ctx, param.toInterface()) + serviceAffinityRouteName := param.ServiceKey() + consts.PunctuationPoint + consts.AffinityRuleSuffix + res, err := service.GetAffinityRule(ctx, serviceAffinityRouteName, param.Mesh) if err != nil { if !corestore.IsResourceNotFound(err) { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -365,10 +359,10 @@ func ServiceConfigRegionPriorityPUT(ctx consolectx.Context) gin.HandlerFunc { } else if false { // TODO(YarBor) : to check service exist or not } else { - res = new(mesh.AffinityRouteResource) + res = meshresource.NewAffinityRouteResourceWithAttributes(serviceAffinityRouteName, param.Mesh) res.Spec = generateDefaultAffinityRule( "service", - param.serviceName(), + param.ServiceName, param.Key, false, true, @@ -383,13 +377,13 @@ func ServiceConfigRegionPriorityPUT(ctx consolectx.Context) gin.HandlerFunc { } if !isExist { - err = createAffinityRule(ctx, param.toInterface(), res) + err = service.CreateAffinityRule(ctx, res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } } else { - err = updateAffinityRule(ctx, param.toInterface(), res) + err = service.UpdateAffinityRule(ctx, res) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return @@ -417,15 +411,15 @@ func generateDefaultAffinityRule(scope, key, focusKey string, runtime, enabled b func ServiceConfigArgumentRouteGET(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { param := struct { - baseService + model.BaseServiceReq }{} resp := model.ServiceArgumentRoute{Routes: make([]model.ServiceArgument, 0)} - if err := param.query(c); err != nil { + if err := param.Query(c); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - - rawRes, err := service.GetConditionRule(ctx, param.toInterface()) + serviceConditionRuleName := param.ServiceKey() + consts.PunctuationPoint + consts.ConditionRuleSuffix + rawRes, err := service.GetConditionRule(ctx, serviceConditionRuleName, param.Mesh) if err != nil { if !corestore.IsResourceNotFound(err) { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -442,7 +436,7 @@ func ServiceConfigArgumentRouteGET(ctx consolectx.Context) gin.HandlerFunc { } else { res := rawRes.Spec.ToConditionRouteV3x1() - res.RangeConditionsToRemove(func(r *meshproto.ConditionRule) (isRemove bool) { // 去除非方法匹配项 + res.RangeConditionsToRemove(func(r *meshproto.ConditionRule) (isRemove bool) { _, ok := r.IsMatchMethod() return !ok }) @@ -455,7 +449,7 @@ func ServiceConfigArgumentRouteGET(ctx consolectx.Context) gin.HandlerFunc { func ServiceConfigArgumentRoutePUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { param := struct { - baseService + model.BaseServiceReq model.ServiceArgumentRoute }{} if err := c.Bind(¶m); err != nil { @@ -464,7 +458,8 @@ func ServiceConfigArgumentRoutePUT(ctx consolectx.Context) gin.HandlerFunc { } isExist := true - rawRes, err := service.GetConditionRule(ctx, param.toInterface()) + serviceConditionRuleName := param.ServiceKey() + consts.PunctuationPoint + consts.ConditionRuleSuffix + rawRes, err := service.GetConditionRule(ctx, serviceConditionRuleName, param.Mesh) if err != nil { if !corestore.IsResourceNotFound(err) { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) @@ -472,8 +467,13 @@ func ServiceConfigArgumentRoutePUT(ctx consolectx.Context) gin.HandlerFunc { } else if false { // TODO(YarBor) : to check service exist or not } - rawRes = new(mesh.ConditionRouteResource) - rawRes.Spec = generateDefaultConditionV3x1(true, false, true, param.serviceName(), consts.ScopeService).ToConditionRoute() + rawRes = meshresource.NewConditionRouteResourceWithAttributes(serviceConditionRuleName, param.Mesh) + rawRes.Spec = generateDefaultConditionV3x1( + true, + false, + true, + param.ServiceName, + consts.ScopeService).ToConditionRoute() isExist = false } @@ -494,13 +494,13 @@ func ServiceConfigArgumentRoutePUT(ctx consolectx.Context) gin.HandlerFunc { rawRes.Spec = res.ToConditionRoute() if isExist { - err = service.UpdateConditionRule(ctx, param.toInterface(), rawRes) + err = service.UpdateConditionRule(ctx, serviceConditionRuleName, rawRes) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return } } else { - err = service.CreateConditionRule(ctx, param.toInterface(), rawRes) + err = service.CreateConditionRule(ctx, serviceConditionRuleName, rawRes) if err != nil { c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) return diff --git a/pkg/console/handler/tag_rule.go b/pkg/console/handler/tag_rule.go index 03a3b0e1f..6bc1ab89f 100644 --- a/pkg/console/handler/tag_rule.go +++ b/pkg/console/handler/tag_rule.go @@ -20,52 +20,65 @@ package handler import ( "fmt" "net/http" - "strconv" "strings" + "github.com/duke-git/lancet/v2/strutil" "github.com/gin-gonic/gin" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" "github.com/apache/dubbo-admin/pkg/console/service" "github.com/apache/dubbo-admin/pkg/core/consts" - "github.com/apache/dubbo-admin/pkg/core/store" + "github.com/apache/dubbo-admin/pkg/core/manager" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/store/index" ) func TagRuleSearch(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { + req := model.NewSearchReq() if err := c.ShouldBindQuery(req); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - resList := &mesh.TagRouteResourceList{} - if req.Keywords == "" { - if err := ctx.ResourceManager().List(ctx.AppContext(), resList, store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) - return - } + var pageData *coremodel.PageData[*meshresource.TagRouteResource] + var err error + if strutil.IsBlank(req.Keywords) { + pageData, err = manager.PageListByIndexes[*meshresource.TagRouteResource]( + ctx.ResourceManager(), + meshresource.TagRouteKind, + map[string]interface{}{ + index.ByMeshIndex: req.Mesh, + }, + req.PageReq) + } else { - if err := ctx.ResourceManager().List(ctx.AppContext(), resList, store.ListByNameContains(req.Keywords), store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) - return - } + pageData, err = manager.PageSearchResourceByConditions[*meshresource.TagRouteResource]( + ctx.ResourceManager(), + meshresource.TagRouteKind, + []string{"name=" + req.Keywords}, + req.PageReq, + ) + + } + if err != nil { + c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) + return } - var respList []model.TagRuleSearchResp - for _, item := range resList.Items { - time := item.Meta.GetCreationTime().String() - name := item.Meta.GetName() - respList = append(respList, model.TagRuleSearchResp{ - CreateTime: &time, - Enabled: &item.Spec.Enabled, - RuleName: &name, + resp := model.NewSearchPaginationResult() + var list []*model.TagRuleSearchResp + for _, item := range pageData.Data { + list = append(list, &model.TagRuleSearchResp{ + CreateTime: "", + Enabled: item.Spec.Enabled, + RuleName: item.Name, }) } - result := model.NewSearchPaginationResult() - result.List = respList - result.PageInfo = &resList.Pagination - c.JSON(http.StatusOK, model.NewSuccessResp(result)) + resp.List = list + resp.PageInfo = pageData.Pagination + c.JSON(http.StatusOK, model.NewSuccessResp(resp)) } } @@ -73,13 +86,14 @@ func GetTagRuleWithRuleName(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.TagRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.TagRuleSuffix)] } else { c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.TagRuleSuffix))) return } - if res, err := service.GetTagRule(ctx, name); err != nil { + if res, err := service.GetTagRule(ctx, name, mesh); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } else { @@ -92,22 +106,20 @@ func PutTagRuleWithRuleName(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.TagRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.TagRuleSuffix)] } else { c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.TagRuleSuffix))) return } - res := &mesh.TagRouteResource{ - Meta: nil, - Spec: &meshproto.TagRoute{}, - } + res := meshresource.NewTagRouteResourceWithAttributes(name, mesh) err := c.Bind(res.Spec) if err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - if err = service.UpdateTagRule(ctx, name, res); err != nil { + if err = service.UpdateTagRule(ctx, res); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } else { @@ -120,22 +132,20 @@ func PostTagRuleWithRuleName(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.TagRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.TagRuleSuffix)] } else { c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.TagRuleSuffix))) return } - res := &mesh.TagRouteResource{ - Meta: nil, - Spec: &meshproto.TagRoute{}, - } + res := meshresource.NewTagRouteResourceWithAttributes(name, mesh) err := c.Bind(res.Spec) if err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } - if err = service.CreateTagRule(ctx, name, res); err != nil { + if err = service.CreateTagRule(ctx, res); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } else { @@ -148,14 +158,14 @@ func DeleteTagRuleWithRuleName(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { var name string ruleName := c.Param("ruleName") + mesh := c.Param("mesh") if strings.HasSuffix(ruleName, consts.TagRuleSuffix) { name = ruleName[:len(ruleName)-len(consts.TagRuleSuffix)] } else { c.JSON(http.StatusBadRequest, model.NewErrorResp(fmt.Sprintf("ruleName must end with %s", consts.TagRuleSuffix))) return } - res := &mesh.TagRouteResource{Spec: &meshproto.TagRoute{}} - if err := service.DeleteTagRule(ctx, name, res); err != nil { + if err := service.DeleteTagRule(ctx, name, mesh); err != nil { c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) return } diff --git a/pkg/console/handler/traffic_affinity_rule.go b/pkg/console/handler/traffic_affinity_rule.go deleted file mode 100644 index 8fbf4511d..000000000 --- a/pkg/console/handler/traffic_affinity_rule.go +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package handler - -import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - consolectx "github.com/apache/dubbo-admin/pkg/console/context" - "github.com/apache/dubbo-admin/pkg/core/consts" - "github.com/apache/dubbo-admin/pkg/core/logger" - "github.com/apache/dubbo-admin/pkg/core/store" -) - -func getAffinityRule(ctx consolectx.Context, name string) (*mesh.AffinityRouteResource, error) { - res := &mesh.AffinityRouteResource{Spec: &meshproto.AffinityRoute{}} - err := ctx.ResourceManager().Get(ctx.AppContext(), res, - // here `name` may be service name or app name, set *ByApplication(`name`) is ok. - store.GetByApplication(name), store.GetByKey(name+consts.AffinityRuleSuffix, resmodel.DefaultMesh)) - if err != nil { - logger.Warnf("get tag rule %s error: %v", name, err) - return nil, err - } - return res, nil -} - -func updateAffinityRule(ctx consolectx.Context, name string, res *mesh.AffinityRouteResource) error { - err := ctx.ResourceManager().Update(ctx.AppContext(), res, - // here `name` may be service name or app name, set *ByApplication(`name`) is ok. - store.UpdateByApplication(name), store.UpdateByKey(name+consts.AffinityRuleSuffix, resmodel.DefaultMesh)) - if err != nil { - logger.Warnf("update tag rule %s error: %v", name, err) - return err - } - return nil -} - -func createAffinityRule(ctx consolectx.Context, name string, res *mesh.AffinityRouteResource) error { - err := ctx.ResourceManager().Create(ctx.AppContext(), res, - // here `name` may be service name or app name, set *ByApplication(`name`) is ok. - store.CreateByApplication(name), store.CreateByKey(name+consts.AffinityRuleSuffix, resmodel.DefaultMesh)) - if err != nil { - logger.Warnf("create tag rule %s error: %v", name, err) - return err - } - return nil -} - -func deleteAffinityRule(ctx consolectx.Context, name string, res *mesh.AffinityRouteResource) error { - err := ctx.ResourceManager().Delete(ctx.AppContext(), res, - // here `name` may be service name or app name, set *ByApplication(`name`) is ok. - store.DeleteByApplication(name), store.DeleteByKey(name+consts.AffinityRuleSuffix, resmodel.DefaultMesh)) - if err != nil { - logger.Warnf("delete tag rule %s error: %v", name, err) - return err - } - return nil -} diff --git a/pkg/console/model/application.go b/pkg/console/model/application.go index 2db69fe25..3720de368 100644 --- a/pkg/console/model/application.go +++ b/pkg/console/model/application.go @@ -18,19 +18,15 @@ package model import ( - "encoding/json" - "fmt" - "regexp" - "strconv" - - mesh "github.com/apache/dubbo-admin/api/mesh/v1alpha1" "github.com/apache/dubbo-admin/pkg/console/constants" - consolectx "github.com/apache/dubbo-admin/pkg/console/context" + "github.com/apache/dubbo-admin/pkg/core/consts" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) type ApplicationDetailReq struct { AppName string `form:"appName"` + Mesh string `form:"mesh"` } type ApplicationDetailResp struct { @@ -88,68 +84,40 @@ func NewApplicationDetail() *ApplicationDetail { Workloads: NewSet(), } } - -func (a *ApplicationDetail) MergeMetaData(metadata *mesh.MetaDataResource) { - a.mergeServiceInfo(metadata) -} - -func (a *ApplicationDetail) mergeServiceInfo(metadata *mesh.MetaDataResource) { - for _, serviceInfo := range metadata.Spec.Services { - a.DubboVersions.Add(fmt.Sprintf("dubbo %s", serviceInfo.Params[constants.ReleaseKey])) - a.RPCProtocols.Add(serviceInfo.Protocol) - a.SerialProtocols.Add(serviceInfo.Params[constants.SerializationKey]) - - } -} - -func (a *ApplicationDetail) MergeDataplane(dataplane *mesh.DataplaneResource) { - if work, ok := dataplane.Spec.Extensions[constants.WorkLoadKey]; ok && - regexp.MustCompile(`^.*-\d+$`).MatchString(work) { +func (a *ApplicationDetail) MergeInstance(instanceRes *meshresource.InstanceResource) { + instance := instanceRes.Spec + if instance.WorkloadType == consts.StatefulSet { a.AppTypes.Add(constants.Stateful) } else { a.AppTypes.Add(constants.Stateless) } - - inbounds := dataplane.Spec.Networking.Inbound - for _, inbound := range inbounds { - a.mergeInbound(inbound) - } - extensions := dataplane.Spec.Extensions - a.mergeExtensions(extensions) + a.DubboPorts.Add(string(instance.RpcPort)) + a.DubboVersions.Add(instance.ReleaseVersion) + a.Images.Add(instance.Image) + a.RegisterClusters.Add(instanceRes.Mesh) + a.RegisterModes.Add(consts.Application) + a.RPCProtocols.Add(instance.Protocol) + a.SerialProtocols.Add(instance.Serialization) + a.Workloads.Add(instance.WorkloadName) } -func (a *ApplicationDetail) mergeInbound(inbound *legacy.Dataplane_Networking_Inbound) { - a.DubboPorts.Add(strconv.Itoa(int(inbound.Port))) - a.DeployClusters.Add(inbound.Tags[legacy.ZoneTag]) -} - -func (a *ApplicationDetail) mergeExtensions(extensions map[string]string) { - a.Images.Add(extensions[coremodel.ExtensionsImageKey]) - a.Workloads.Add(extensions[coremodel.ExtensionsWorkLoadKey]) -} - -func (a *ApplicationDetail) GetRegistry(ctx consolectx.Context) { - // TODO - -} - -// todo Application instance info - type ApplicationTabInstanceInfoReq struct { + coremodel.PageReq + AppName string `form:"appName"` - PageReq + Mesh string `form:"mesh"` } func NewApplicationTabInstanceInfoReq() *ApplicationTabInstanceInfoReq { return &ApplicationTabInstanceInfoReq{ - PageReq: PageReq{ + PageReq: coremodel.PageReq{ PageOffset: 0, PageSize: 15, }, } } -type ApplicationTabInstanceInfoResp struct { +type AppInstanceInfoResp struct { AppName string `json:"appName"` CreateTime string `json:"createTime"` DeployState string `json:"deployState"` @@ -163,52 +131,6 @@ type ApplicationTabInstanceInfoResp struct { WorkloadName string `json:"workloadName"` } -type ByApplicationInstanceName []*ApplicationTabInstanceInfoResp - -func (a ByApplicationInstanceName) Len() int { return len(a) } - -func (a ByApplicationInstanceName) Less(i, j int) bool { - return a[i].Name < a[j].Name -} - -func (a ByApplicationInstanceName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } - -func (a *ApplicationTabInstanceInfoResp) FromDataplaneResource(dataplane *mesh.DataplaneResource) *ApplicationTabInstanceInfoResp { - // TODO: support more fields - extensions := dataplane.Spec.Extensions - a.mergeExtension(extensions) - a.mergeMainDataplane(dataplane) - return a -} - -// nolint -func (a *ApplicationTabInstanceInfoResp) mergeMainDataplane(dataplane *mesh.DataplaneResource) { - a.AppName = dataplane.GetMeta().GetLabels()[v1alpha1.Application] - a.CreateTime = dataplane.Meta.GetCreationTime().String() - a.IP = dataplane.Spec.Networking.Address - a.DeployClusters = dataplane.Spec.Networking.Inbound[0].Tags[legacy.ZoneTag] - a.Labels = dataplane.GetMeta().GetLabels() - a.Name = dataplane.Meta.GetName() - a.RegisterTime = a.CreateTime - if a.RegisterTime != "" { - a.RegisterState = "Registed" - } else { - a.RegisterState = "UnRegisted" - } -} - -func (a *ApplicationTabInstanceInfoResp) mergeExtension(extensions map[string]string) { - a.WorkloadName = extensions[coremodel.ExtensionsWorkLoadKey] - a.DeployState = extensions[coremodel.ExtensionsPodPhaseKey] -} - -func (a *ApplicationTabInstanceInfoResp) GetRegistry(ctx consolectx.Context) { - // TODO - -} - -// Todo Application Service - type ApplicationServiceReq struct { AppName string `json:"appName"` } @@ -219,14 +141,16 @@ type ApplicationServiceResp struct { } type ApplicationServiceFormReq struct { + coremodel.PageReq + AppName string `form:"appName"` Side string `form:"side"` - PageReq + Mesh string `form:"mesh"` } func NewApplicationServiceFormReq() *ApplicationServiceFormReq { return &ApplicationServiceFormReq{ - PageReq: PageReq{ + PageReq: coremodel.PageReq{ PageOffset: 0, PageSize: 15, }, @@ -235,79 +159,20 @@ func NewApplicationServiceFormReq() *ApplicationServiceFormReq { type ApplicationServiceFormResp struct { ServiceName string `json:"serviceName"` - VersionGroups []versionGroup `json:"versionGroups"` -} - -type ByAppServiceFormName []*ApplicationServiceFormResp - -func (a ByAppServiceFormName) Len() int { return len(a) } - -func (a ByAppServiceFormName) Less(i, j int) bool { - return a[i].ServiceName < a[j].ServiceName -} - -func (a ByAppServiceFormName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } - -type versionGroup struct { - Group string `json:"group"` - Version string `json:"version"` -} - -func NewApplicationServiceFormResp() *ApplicationServiceFormResp { - return &ApplicationServiceFormResp{ - ServiceName: "", - VersionGroups: nil, - } -} - -func (a *ApplicationServiceFormResp) FromApplicationServiceForm(form *ApplicationServiceForm) error { - a.ServiceName = form.ServiceName - versionGroupList := make([]versionGroup, 0) - for _, gv := range form.VersionGroups.Values() { - var versionGroupInfo versionGroup - if err := json.Unmarshal([]byte(gv), &versionGroupInfo); err != nil { - return err - } - versionGroupList = append(versionGroupList, versionGroupInfo) - } - a.VersionGroups = versionGroupList - return nil -} - -type ApplicationServiceForm struct { - ServiceName string - VersionGroups Set -} - -func NewApplicationServiceForm(serviceName string) *ApplicationServiceForm { - return &ApplicationServiceForm{ - ServiceName: serviceName, - VersionGroups: NewSet(), - } -} - -func (a *ApplicationServiceForm) FromServiceInfo(serviceInfo *v1alpha1.ServiceInfo) error { - versionGroupInfo := versionGroup{ - Group: serviceInfo.Group, - Version: serviceInfo.Version, - } - bytes, err := json.Marshal(versionGroupInfo) - if err != nil { - return err - } - a.VersionGroups.Add(string(bytes)) - return nil + VersionGroups []VersionGroup `json:"versionGroups"` } type ApplicationSearchReq struct { + coremodel.PageReq + AppName string `form:"appName" json:"appName"` Keywords string `form:"keywords" json:"keywords"` - PageReq + Mesh string `form:"mesh" json:"mesh"` } func NewApplicationSearchReq() *ApplicationSearchReq { return &ApplicationSearchReq{ - PageReq: PageReq{ + PageReq: coremodel.PageReq{ PageOffset: 0, PageSize: 15, }, @@ -321,56 +186,6 @@ type ApplicationSearchResp struct { RegistryClusters []string `json:"registryClusters"` } -func (a *ApplicationSearchResp) FromApplicationSearch(applicationSearch *ApplicationSearch) *ApplicationSearchResp { - a.RegistryClusters = applicationSearch.RegistryClusters.Values() - a.InstanceCount = applicationSearch.InstanceCount - a.DeployClusters = applicationSearch.DeployClusters.Values() - return a -} - -type ByAppName []*ApplicationSearchResp - -func (a ByAppName) Len() int { return len(a) } - -func (a ByAppName) Less(i, j int) bool { - return a[i].AppName < a[j].AppName -} - -func (a ByAppName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } - -// Todo Application Search - -type ApplicationSearch struct { - AppName string - DeployClusters Set - InstanceCount int64 - RegistryClusters Set -} - -func NewApplicationSearch(appName string) *ApplicationSearch { - return &ApplicationSearch{ - AppName: appName, - DeployClusters: NewSet(), - InstanceCount: 0, - RegistryClusters: NewSet(), - } -} - -func (a *ApplicationSearch) MergeDataplane(dataplane *mesh.DataplaneResource) { - a.InstanceCount++ - - // merge inbounds - inbounds := dataplane.Spec.Networking.Inbound - for _, inbound := range inbounds { - a.DeployClusters.Add(inbound.Tags[legacy.ZoneTag]) - } -} - -func (a *ApplicationSearch) GetRegistry(ctx consolectx.Context) { - - // TODO -} - type FlowWeightSet struct { Weight int32 `json:"weight"` Scope []ParamMatch `json:"scope,omitempty"` diff --git a/pkg/console/model/common.go b/pkg/console/model/common.go index aacf6e706..7a11ea86f 100644 --- a/pkg/console/model/common.go +++ b/pkg/console/model/common.go @@ -17,6 +17,8 @@ package model +import coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + const ( successCode = 200 unauthorizedCode = 401 @@ -68,51 +70,17 @@ func NewErrorResp(msg string) *CommonResp { } } -type PageData struct { - Total int `json:"total"` - CurPage int `json:"curPage"` - PageSize int `json:"pageSize"` - Data any `json:"data"` -} - -func NewPageData() *PageData { - return &PageData{} -} - -func (pd *PageData) WithTotal(total int) *PageData { - pd.Total = total - return pd -} - -func (pd *PageData) WithCurPage(curPage int) *PageData { - pd.CurPage = curPage - return pd -} - -func (pd *PageData) WithPageSize(pageSize int) *PageData { - pd.PageSize = pageSize - return pd -} - -func (pd *PageData) WithData(data any) *PageData { - pd.Data = data - return pd -} - -type PageReq struct { - PageOffset int `form:"pageOffset" json:"pageOffset"` - PageSize int `form:"pageSize" json:"pageSize"` -} - type SearchReq struct { + coremodel.PageReq + SearchType string `form:"searchType"` Keywords string `form:"keywords"` - PageReq + Mesh string `form:"mesh"` } func NewSearchReq() *SearchReq { return &SearchReq{ - PageReq: PageReq{PageSize: 15}, + PageReq: coremodel.PageReq{PageSize: 15}, } } diff --git a/pkg/console/model/condition_rule.go b/pkg/console/model/condition_rule.go index 912d6a114..e13d7e2ce 100644 --- a/pkg/console/model/condition_rule.go +++ b/pkg/console/model/condition_rule.go @@ -23,16 +23,22 @@ import ( meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" "github.com/apache/dubbo-admin/pkg/core/consts" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) type SearchConditionRuleReq struct { + coremodel.PageReq + Keywords string `json:"keywords"` - PageReq +} + +func (s *SearchConditionRuleReq) PageRequest() coremodel.PageReq { + return s.PageReq } func NewSearchConditionRuleReq() *SearchConditionRuleReq { return &SearchConditionRuleReq{ - PageReq: PageReq{PageSize: 15}, + PageReq: coremodel.PageReq{PageSize: 15}, } } diff --git a/pkg/console/model/configurator_rule.go b/pkg/console/model/configurator_rule.go index 897a34999..facced62a 100644 --- a/pkg/console/model/configurator_rule.go +++ b/pkg/console/model/configurator_rule.go @@ -21,16 +21,19 @@ import ( "net/http" meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) type SearchConfiguratorReq struct { + coremodel.PageReq + Keywords string `json:"keywords"` - PageReq + Mesh string `json:"mesh"` } func NewSearchConfiguratorReq() *SearchConfiguratorReq { return &SearchConfiguratorReq{ - PageReq: PageReq{ + PageReq: coremodel.PageReq{ PageSize: 15, PageOffset: 0, }, diff --git a/pkg/console/model/instance.go b/pkg/console/model/instance.go index 8c0a6c95f..1ceecc681 100644 --- a/pkg/console/model/instance.go +++ b/pkg/console/model/instance.go @@ -19,30 +19,34 @@ package model import ( gxset "github.com/dubbogo/gost/container/set" + "github.com/duke-git/lancet/v2/strutil" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) type SearchInstanceReq struct { + coremodel.PageReq + AppName string `form:"appName"` Keywords string `form:"keywords"` - PageReq + Mesh string `form:"mesh"` } func NewSearchInstanceReq() *SearchInstanceReq { return &SearchInstanceReq{ - PageReq: PageReq{PageSize: 15}, + PageReq: coremodel.PageReq{PageSize: 15}, } } type InstanceDetailReq struct { InstanceName string `form:"instanceName"` + Mesh string `form:"mesh"` } type SearchPaginationResult struct { - List any `json:"list"` - PageInfo *coremodel.Pagination `json:"pageInfo"` + List any `json:"list"` + PageInfo coremodel.Pagination `json:"pageInfo"` } func NewSearchPaginationResult() *SearchPaginationResult { @@ -71,46 +75,26 @@ func NewSearchInstanceResp() *SearchInstanceResp { } } -func (r *SearchInstanceResp) FromDataplaneResource(dr *mesh.DataplaneResource) *SearchInstanceResp { - // TODO: support more fields - r.Ip = dr.GetIP() - meta := dr.GetMeta() - r.Name = meta.GetName() - r.CreateTime = meta.GetCreationTime().String() - r.RegisterTime = r.CreateTime // TODO: separate createTime and RegisterTime - cluster := dr.Spec.Networking.Inbound[0].Tags[legacy.ZoneTag] +func (r *SearchInstanceResp) FromInstanceResource(instanceResource *meshresource.InstanceResource) *SearchInstanceResp { + instance := instanceResource.Spec + r.Ip = instance.Ip + r.Name = instance.Name + r.CreateTime = instance.CreateTime + r.RegisterTime = instance.RegisterTime + cluster := instanceResource.Mesh r.RegisterClustersSet.Add(cluster) for _, c := range r.RegisterClustersSet.Values() { r.RegisterClusters = append(r.RegisterClusters, c.(string)) } - r.DeployCluster = cluster if r.RegisterTime != "" { r.RegisterState = "Registed" } else { r.RegisterState = "UnRegisted" } - // label conversion - r.Labels = meta.GetLabels() - // spec conversion - spec := dr.Spec - { - statusValue := spec.Extensions[coremodel.ExtensionsPodPhaseKey] - if v, ok := spec.Extensions[coremodel.ExtensionsPodStatusKey]; ok { - statusValue = v - } - if v, ok := spec.Extensions[coremodel.ExtensionsContainerStatusReasonKey]; ok { - statusValue = v - } - r.DeployState = statusValue - r.WorkloadName = spec.Extensions[coremodel.ExtensionsWorkLoadKey] - // name field source is different between universal and k8s mode - r.AppName = spec.Extensions[meshproto.Application] - if r.AppName == "" { - for _, inbound := range spec.Networking.Inbound { - r.AppName = inbound.Tags[legacy.AppTag] - } - } - } + r.Labels = instance.Tags + r.DeployState = instance.DeployState + r.WorkloadName = instance.WorkloadName + r.AppName = instance.AppName return r } @@ -122,7 +106,7 @@ type State struct { } type InstanceDetailResp struct { - RpcPort int `json:"rpcPort"` + RpcPort int32 `json:"rpcPort"` Ip string `json:"ip"` AppName string `json:"appName"` WorkloadName string `json:"workloadName"` @@ -140,160 +124,67 @@ type InstanceDetailResp struct { Tags map[string]string `json:"tags"` } +const ( + StartupProbeType = "startup" + ReadinessProbeType = "readiness" + LivenessProbeType = "liveness" +) + type ProbeStruct struct { - StartupProbe StartupProbe `json:"startupProbe"` - ReadinessProbe ReadinessProbe `json:"readinessProbe"` - LivenessProbe LivenessProbe `json:"livenessProbe"` + StartupProbe Probe `json:"startupProbe"` + ReadinessProbe Probe `json:"readinessProbe"` + LivenessProbe Probe `json:"livenessProbe"` } -type StartupProbe struct { - Type string `json:"type"` - Port int `json:"port"` - Open bool `json:"open"` -} -type ReadinessProbe struct { +type Probe struct { Type string `json:"type"` - Port int `json:"port"` + Port int32 `json:"port"` Open bool `json:"open"` } -type LivenessProbe struct { - Type string `json:"type"` - Port int `json:"port"` - Open bool `json:"open"` -} - -func (r *InstanceDetailResp) FromInstanceDetail(id *InstanceDetail) *InstanceDetailResp { - r.AppName = id.AppName - r.RpcPort = id.RpcPort - r.Ip = id.Ip - r.WorkloadName = id.WorkloadName - r.Labels = id.Labels - r.CreateTime = id.CreateTime - r.ReadyTime = id.ReadyTime - r.RegisterTime = id.RegisterTime - r.RegisterClusters = id.RegisterClusters.Values() - r.DeployCluster = id.DeployCluster - r.DeployCluster = id.DeployCluster - r.DeployState = id.DeployState - r.Node = id.Node - r.Image = id.Image - r.Tags = id.Tags - r.RegisterState = id.RegisterState - r.Probes = id.Probes - return r -} - -type InstanceDetail struct { - RpcPort int - Ip string - AppName string - WorkloadName string - Labels map[string]string - CreateTime string - ReadyTime string - RegisterTime string - RegisterState string - RegisterClusters Set - DeployCluster string - DeployState string - Node string - Image string - Tags map[string]string - Probes ProbeStruct -} -func NewInstanceDetail() *InstanceDetail { - return &InstanceDetail{ - RpcPort: -1, - Ip: "", - AppName: "", - WorkloadName: "", - Labels: nil, - CreateTime: "", - ReadyTime: "", - RegisterTime: "", - RegisterClusters: NewSet(), - DeployCluster: "", - Node: "", - Image: "", - } -} - -func (a *InstanceDetail) Merge(dataplane *mesh.DataplaneResource) { - // TODO: support more fields - inbounds := dataplane.Spec.Networking.Inbound - for _, inbound := range inbounds { - a.mergeInbound(inbound) - } - meta := dataplane.Meta - a.mergeMeta(meta) - extensions := dataplane.Spec.Extensions - a.mergeExtensions(extensions) - probes := dataplane.Spec.Probes - a.mergeProbes(probes) - - a.Ip = dataplane.GetIP() - if a.RegisterTime != "" { - a.RegisterState = "Registed" +func FromInstanceResource(res *meshresource.InstanceResource) *InstanceDetailResp { + r := &InstanceDetailResp{} + instance := res.Spec + r.RpcPort = instance.RpcPort + r.Ip = instance.Ip + r.AppName = instance.AppName + r.WorkloadName = instance.WorkloadName + r.Labels = instance.Tags + r.CreateTime = instance.CreateTime + r.ReadyTime = instance.ReadyTime + r.RegisterTime = instance.RegisterTime + r.RegisterClusters = []string{res.Mesh} + r.DeployState = instance.DeployState + if strutil.IsBlank(r.RegisterTime) { + r.RegisterState = "UnRegistered" } else { - a.RegisterState = "UnRegisted" - } -} - -func (a *InstanceDetail) mergeInbound(inbound *legacy.Dataplane_Networking_Inbound) { - a.RpcPort = int(inbound.Port) - a.RegisterClusters.Add(inbound.Tags[legacy.ZoneTag]) - for _, deployCluster := range a.RegisterClusters.Values() { - a.DeployCluster = deployCluster // TODO: separate deployCluster and registerCluster - } - a.Tags = inbound.Tags - if a.AppName == "" { - a.AppName = inbound.Tags[legacy.AppTag] - } -} - -func (a *InstanceDetail) mergeExtensions(extensions map[string]string) { - image := extensions[coremodel.ExtensionsImageKey] - a.Image = image - if a.AppName == "" { - a.AppName = extensions[meshproto.Application] + r.RegisterState = "Registered" } - a.WorkloadName = extensions[coremodel.ExtensionsWorkLoadKey] - a.DeployState = extensions[coremodel.ExtensionsPodPhaseKey] - a.Node = extensions[coremodel.ExtensionsNodeNameKey] -} - -func (a *InstanceDetail) mergeMeta(meta coremodel.ResourceMeta) { - a.CreateTime = meta.GetCreationTime().String() - a.RegisterTime = meta.GetModificationTime().String() // Not sure if it's the right field - a.ReadyTime = a.RegisterTime - // TODO: separate createTime , RegisterTime and ReadyTime - a.Labels = meta.GetLabels() -} - -func (a *InstanceDetail) mergeProbes(probes *legacy.Dataplane_Probes) { - if probes == nil { - return - } - portStartup := probes.Endpoints[0].InboundPort - portReadiness := probes.Endpoints[1].InboundPort - portLiveness := probes.Endpoints[2].InboundPort - a.Probes = ProbeStruct{ - StartupProbe: StartupProbe{ - Type: "HTTP", // TODO: support more scheme + r.Node = instance.Node + r.Image = instance.Image + r.Probes = ProbeStruct{} + for _, p := range instance.Probes { + switch p.Type { + case StartupProbeType: + r.Probes.StartupProbe = Probe{ + Type: StartupProbeType, + Port: p.Port, + Open: true, + } + case ReadinessProbeType: + r.Probes.ReadinessProbe = Probe{ + Type: ReadinessProbeType, + Port: p.Port, + Open: true, + } + case LivenessProbeType: + r.Probes.LivenessProbe = Probe{ + Type: LivenessProbeType, + Port: p.Port, + Open: true, + } + } - Port: int(portStartup), - Open: true, - }, - ReadinessProbe: ReadinessProbe{ - Type: "HTTP", // TODO: support more scheme - Port: int(portReadiness), - Open: true, - }, - LivenessProbe: LivenessProbe{ - Type: "HTTP", // TODO: support more scheme - Port: int(portLiveness), - Open: true, - }, } + return r } diff --git a/pkg/console/model/observability.go b/pkg/console/model/observability.go index 967a30b7b..b52e20afb 100644 --- a/pkg/console/model/observability.go +++ b/pkg/console/model/observability.go @@ -59,6 +59,7 @@ type Metric struct { type MetricsReq struct { InstanceName string `form:"instanceName"` + Mesh string `form:"mesh"` } type MetricsResp struct { diff --git a/pkg/console/model/service.go b/pkg/console/model/service.go index a0ffddb98..ceb431b41 100644 --- a/pkg/console/model/service.go +++ b/pkg/console/model/service.go @@ -18,22 +18,27 @@ package model import ( - "strconv" + "fmt" "strings" + "github.com/gin-gonic/gin" + "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/console/constants" + "github.com/apache/dubbo-admin/pkg/core/consts" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) type ServiceSearchReq struct { + coremodel.PageReq + ServiceName string `form:"serviceName" json:"serviceName"` Keywords string `form:"keywords" json:"keywords"` - PageReq + Mesh string `form:"mesh" json:"mesh"` } func NewServiceSearchReq() *ServiceSearchReq { return &ServiceSearchReq{ - PageReq: PageReq{ + PageReq: coremodel.PageReq{ PageOffset: 0, PageSize: 15, }, @@ -103,7 +108,8 @@ type ServiceTabDistributionReq struct { Version string `json:"version" form:"version"` Group string `json:"group" form:"group"` Side string `json:"side" form:"side" binding:"required"` - PageReq + Mesh string `json:"mesh" form:"mesh" binding:"required"` + coremodel.PageReq } type ServiceTabDistributionResp struct { @@ -143,50 +149,28 @@ func NewServiceDistribution() *ServiceTabDistribution { } } -func (r *ServiceTabDistributionResp) FromServiceDataplaneResource(dataplane *coremesh.DataplaneResource, metadata *coremesh.MetaDataResource, name string, req *ServiceTabDistributionReq) *ServiceTabDistributionResp { - r.AppName = name - inbounds := dataplane.Spec.Networking.Inbound - ip := dataplane.GetIP() - for _, inbound := range inbounds { - r.mergeInbound(inbound, ip) - } - meta := dataplane.GetMeta() - r.InstanceName = meta.GetName() - r.mergeMetaData(metadata, req) - - return r -} - -func (r *ServiceTabDistributionResp) mergeInbound(inbound *legacy.Dataplane_Networking_Inbound, ip string) { - r.Endpoint = ip + ":" + strconv.Itoa(int(inbound.Port)) +type VersionGroup struct { + Version string `json:"version"` + Group string `json:"group"` } -func (r *ServiceTabDistributionResp) FromServiceDistribution(distribution *ServiceTabDistribution) *ServiceTabDistributionResp { - r.AppName = distribution.AppName - r.InstanceName = distribution.InstanceName - r.Endpoint = distribution.Endpoint - r.TimeOut = distribution.TimeOut - r.Retries = distribution.Retries - return r +type BaseServiceReq struct { + ServiceName string `json:"serviceName"` + Group string `json:"group"` + Version string `json:"version"` + Mesh string `json:"mesh"` } -func (r *ServiceTabDistributionResp) mergeMetaData(metadata *coremesh.MetaDataResource, req *ServiceTabDistributionReq) { - // key format is '{group}/{interface name}:{version}:{protocol}' - serviceinfos := metadata.Spec.Services - - for _, serviceinfo := range serviceinfos { - if serviceinfo.Name == req.ServiceName && - serviceinfo.Group == req.Group && - serviceinfo.Version == req.Version && - req.Side == serviceinfo.GetParams()[constants.ServiceInfoSide] { - r.Retries = serviceinfo.Params[constants.RetriesKey] - r.TimeOut = serviceinfo.Params[constants.TimeoutKey] - r.Params = serviceinfo.Params - } +func (s *BaseServiceReq) Query(c *gin.Context) error { + s.ServiceName = c.Query("serviceName") + if s.ServiceName == "" { + return fmt.Errorf("service name is empty") } + s.Group = c.Query("group") + s.Version = c.Query("version") + return nil } -type VersionGroup struct { - Version string `json:"version"` - Group string `json:"group"` +func (s *BaseServiceReq) ServiceKey() string { + return s.ServiceName + consts.Colon + s.Group + consts.Colon + s.Version } diff --git a/pkg/console/model/tag_rule.go b/pkg/console/model/tag_rule.go index 78335e39f..7bdf1ecde 100644 --- a/pkg/console/model/tag_rule.go +++ b/pkg/console/model/tag_rule.go @@ -25,9 +25,9 @@ import ( ) type TagRuleSearchResp struct { - CreateTime *string `json:"createTime,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - RuleName *string `json:"ruleName,omitempty"` + CreateTime string `json:"createTime,omitempty"` + Enabled bool `json:"enabled,omitempty"` + RuleName string `json:"ruleName,omitempty"` } type TagRuleResp struct { diff --git a/pkg/console/service/affinity_rule.go b/pkg/console/service/affinity_rule.go new file mode 100644 index 000000000..3c98d7b90 --- /dev/null +++ b/pkg/console/service/affinity_rule.go @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package service + +import ( + consolectx "github.com/apache/dubbo-admin/pkg/console/context" + "github.com/apache/dubbo-admin/pkg/core/logger" + "github.com/apache/dubbo-admin/pkg/core/manager" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) + +func GetAffinityRule(ctx consolectx.Context, name string, mesh string) (*meshresource.AffinityRouteResource, error) { + res, _, err := manager.GetByKey[*meshresource.AffinityRouteResource]( + ctx.ResourceManager(), + meshresource.AffinityRouteKind, + coremodel.BuildResourceKey(mesh, name)) + if err != nil { + logger.Warnf("get affinity rule %s error: %v", name, err) + return nil, err + } + return res, nil +} + +func UpdateAffinityRule(ctx consolectx.Context, res *meshresource.AffinityRouteResource) error { + if err := ctx.ResourceManager().Update(res); err != nil { + logger.Warnf("update %s affinity rule failed with error: %s", res.Name, err.Error()) + return err + } + return nil +} + +func CreateAffinityRule(ctx consolectx.Context, res *meshresource.AffinityRouteResource) error { + if err := ctx.ResourceManager().Add(res); err != nil { + logger.Warnf("create %s condition failed with error: %s", res.Name, err.Error()) + return err + } + return nil +} + +func DeleteAffinityRule(ctx consolectx.Context, name string, mesh string) error { + if err := ctx.ResourceManager().DeleteByKey( + meshresource.AffinityRouteKind, + coremodel.BuildResourceKey(mesh, name)); err != nil { + return err + } + return nil +} diff --git a/pkg/console/service/application.go b/pkg/console/service/application.go index f2d3054fa..ff7f3500f 100644 --- a/pkg/console/service/application.go +++ b/pkg/console/service/application.go @@ -18,47 +18,35 @@ package service import ( - "strconv" - "strings" + "github.com/duke-git/lancet/v2/maputil" + "github.com/duke-git/lancet/v2/slice" + "github.com/duke-git/lancet/v2/strutil" - "dubbo.apache.org/dubbo-go/v3/common/constant" - - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/console/constants" - "github.com/apache/dubbo-admin/pkg/console/context" + consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" - "github.com/apache/dubbo-admin/pkg/core/store" + "github.com/apache/dubbo-admin/pkg/core/consts" + "github.com/apache/dubbo-admin/pkg/core/manager" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/store/index" ) -func GetApplicationDetail(ctx context.Context, req *model.ApplicationDetailReq) (*model.ApplicationDetailResp, error) { - manager := ctx.ResourceManager() - instanceList := &mesh.DataplaneResourceList{} - - if err := manager.List(ctx.AppContext(), instanceList, store.ListByApplication(req.AppName)); err != nil { +func GetApplicationDetail(ctx consolectx.Context, req *model.ApplicationDetailReq) (*model.ApplicationDetailResp, error) { + instanceResources, err := manager.ListByIndexes[*meshresource.InstanceResource]( + ctx.ResourceManager(), + meshresource.InstanceKind, + map[string]interface{}{ + index.ByMeshIndex: req.Mesh, + index.ByInstanceAppNameIndex: req.AppName, + }, + ) + if err != nil { return nil, err } - revisions := make(map[string]*mesh.MetaDataResource, 0) applicationDetail := model.NewApplicationDetail() - for _, dataplane := range instanceList.Items { - if strings.Split(dataplane.GetMeta().GetName(), constant.KeySeparator)[1] == "0" { - continue - } - rev, ok := dataplane.Spec.GetExtensions()[meshproto.RevisionLabel] - if ok { - if metadata, cached := revisions[rev]; !cached { - metadata = &mesh.MetaDataResource{ - Spec: &meshproto.MetaData{}, - } - if err := manager.Get(ctx.AppContext(), metadata, store.GetByRevision(rev), store.GetByType(dataplane.Spec.GetExtensions()["registry-type"])); err != nil { - return nil, err - } - revisions[rev] = metadata - applicationDetail.MergeMetaData(metadata) - } - } - applicationDetail.MergeDataplane(dataplane) - applicationDetail.GetRegistry(ctx) + for _, instanceRes := range instanceResources { + applicationDetail.MergeInstance(instanceRes) } respItem := &model.ApplicationDetailResp{ @@ -69,156 +57,213 @@ func GetApplicationDetail(ctx context.Context, req *model.ApplicationDetailReq) return respItem, nil } -func GetApplicationTabInstanceInfo(ctx context.Context, req *model.ApplicationTabInstanceInfoReq) (*model.SearchPaginationResult, error) { - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} - - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByApplication(req.AppName), store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { +func GetAppInstanceInfo(ctx consolectx.Context, req *model.ApplicationTabInstanceInfoReq) (*model.SearchPaginationResult, error) { + pageData, err := manager.PageListByIndexes[*meshresource.InstanceResource]( + ctx.ResourceManager(), + meshresource.InstanceKind, + map[string]interface{}{ + index.ByMeshIndex: req.Mesh, + index.ByInstanceAppNameIndex: req.AppName, + }, + req.PageReq, + ) + if err != nil { return nil, err } - res := model.NewSearchPaginationResult() - list := make([]*model.ApplicationTabInstanceInfoResp, 0, len(dataplaneList.Items)) - for _, dataplane := range dataplaneList.Items { - if strings.Split(dataplane.Meta.GetName(), constant.KeySeparator)[1] == "0" { - continue - } - resItem := &model.ApplicationTabInstanceInfoResp{} - resItem.FromDataplaneResource(dataplane) - resItem.GetRegistry(ctx) - list = append(list, resItem) + list := slice.Map[*meshresource.InstanceResource, *model.AppInstanceInfoResp](pageData.Data, + func(_ int, item *meshresource.InstanceResource) *model.AppInstanceInfoResp { + return buildAppInstanceInfoResp(item) + }) + searchResult := &model.SearchPaginationResult{ + List: list, + PageInfo: pageData.Pagination, + } + return searchResult, nil +} + +func buildAppInstanceInfoResp(instanceRes *meshresource.InstanceResource) *model.AppInstanceInfoResp { + instance := instanceRes.Spec + resp := &model.AppInstanceInfoResp{} + resp.Name = instance.Name + resp.AppName = instance.AppName + resp.CreateTime = instance.CreateTime + resp.DeployState = instance.DeployState + resp.DeployClusters = "" + resp.IP = instance.Ip + resp.Labels = instance.Tags + resp.RegisterCluster = instanceRes.Mesh + if instance.RegisterTime == "" { + resp.RegisterState = "Registered" + } else { + resp.RegisterState = "UnRegistered" } + resp.RegisterTime = instance.RegisterTime + resp.WorkloadName = instance.WorkloadName + return resp +} - res.List = list - res.PageInfo = &dataplaneList.Pagination +func GetAppServiceInfo(ctx consolectx.Context, req *model.ApplicationServiceFormReq) (*model.SearchPaginationResult, error) { + if req.Side == consts.ConsumerSide { + return getAppProvideServiceInfo(ctx, req) + } else { + return getAppConsumeServiceInfo(ctx, req) + } - return res, nil } -func GetApplicationServiceFormInfo(ctx context.Context, req *model.ApplicationServiceFormReq) (*model.SearchPaginationResult, error) { - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} +func getAppProvideServiceInfo(ctx consolectx.Context, req *model.ApplicationServiceFormReq) (*model.SearchPaginationResult, error) { - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByApplication(req.AppName)); err != nil { + pageData, err := manager.PageListByIndexes[*meshresource.ServiceProviderMetadataResource]( + ctx.ResourceManager(), + meshresource.ServiceProviderMetadataKind, + map[string]interface{}{ + index.ByMeshIndex: req.Mesh, + index.ByServiceProviderAppName: req.AppName, + }, + req.PageReq, + ) + if err != nil { return nil, err } - res := make([]*model.ApplicationServiceFormResp, 0) - serviceMap := make(map[string]*model.ApplicationServiceForm) - revisions := make(map[string]*mesh.MetaDataResource, 0) - for _, dataplane := range dataplaneList.Items { - rev, ok := dataplane.Spec.GetExtensions()[meshproto.RevisionLabel] - if !ok { - continue - } - - metadata, cached := revisions[rev] - if !cached { - metadata = &mesh.MetaDataResource{ - Spec: &meshproto.MetaData{}, - } - if err := manager.Get(ctx.AppContext(), metadata, store.GetByRevision(rev), store.GetByType(dataplane.Spec.GetExtensions()["registry-type"])); err != nil { - return nil, err - } - revisions[rev] = metadata - } - - for _, serviceInfo := range metadata.Spec.Services { - if serviceInfo.Params[constants.ServiceInfoSide] != req.Side { - continue - } - applicationServiceForm := model.NewApplicationServiceForm(serviceInfo.Name) - if _, ok := serviceMap[serviceInfo.Name]; !ok { - serviceMap[serviceInfo.Name] = applicationServiceForm - } + serviceMap := make(map[string]*model.ApplicationServiceFormResp) + for _, res := range pageData.Data { + providerMetaData := res.Spec - if err := applicationServiceForm.FromServiceInfo(serviceInfo); err != nil { - return nil, err + if resp, exists := serviceMap[providerMetaData.ServiceName]; exists { + resp.VersionGroups = append(resp.VersionGroups, model.VersionGroup{ + Version: providerMetaData.Version, + Group: providerMetaData.Group, + }) + } else { + serviceMap[providerMetaData.ServiceName] = &model.ApplicationServiceFormResp{ + ServiceName: providerMetaData.ServiceName, + VersionGroups: []model.VersionGroup{ + { + Version: providerMetaData.Version, + Group: providerMetaData.Group, + }, + }, } } } - for _, applicationServiceForm := range serviceMap { - applicationServiceFormResp := model.NewApplicationServiceFormResp() - if err := applicationServiceFormResp.FromApplicationServiceForm(applicationServiceForm); err != nil { - return nil, err - } - res = append(res, applicationServiceFormResp) + pageResult := &model.SearchPaginationResult{ + List: maputil.Values(serviceMap), + PageInfo: pageData.Pagination, } - - pagedRes := ToSearchPaginationResult(res, model.ByAppServiceFormName(res), req.PageReq) - - return pagedRes, nil + return pageResult, nil } -func GetApplicationSearchInfo(ctx context.Context, req *model.ApplicationSearchReq) (*model.SearchPaginationResult, error) { - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} +func getAppConsumeServiceInfo(ctx consolectx.Context, req *model.ApplicationServiceFormReq) (*model.SearchPaginationResult, error) { + pageData, err := manager.PageListByIndexes[*meshresource.ServiceConsumerMetadataResource]( + ctx.ResourceManager(), + meshresource.ServiceConsumerMetadataKind, + map[string]interface{}{ + index.ByMeshIndex: req.Mesh, + index.ByServiceConsumerAppName: req.AppName, + }, + req.PageReq, + ) + if err != nil { + return nil, err + } + + serviceMap := make(map[string]*model.ApplicationServiceFormResp) + for _, res := range pageData.Data { + consumerMetadata := res.Spec - if req.Keywords != "" { - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByApplicationContains(req.Keywords)); err != nil { - return nil, err - } - } else { - if err := manager.List(ctx.AppContext(), dataplaneList); err != nil { - return nil, err + if resp, exists := serviceMap[consumerMetadata.ServiceName]; exists { + resp.VersionGroups = append(resp.VersionGroups, model.VersionGroup{ + Version: consumerMetadata.Version, + Group: consumerMetadata.Group, + }) + } else { + serviceMap[consumerMetadata.ServiceName] = &model.ApplicationServiceFormResp{ + ServiceName: consumerMetadata.ServiceName, + VersionGroups: []model.VersionGroup{ + { + Version: consumerMetadata.Version, + Group: consumerMetadata.Group, + }, + }, + } } } - res := make([]*model.ApplicationSearchResp, 0) - appMap := make(map[string]*model.ApplicationSearch) - for _, dataplane := range dataplaneList.Items { - if strings.Split(dataplane.GetMeta().GetName(), constant.KeySeparator)[1] == "0" { - continue - } - appName := dataplane.Spec.GetExtensions()[meshproto.Application] - if _, ok := appMap[appName]; !ok { - appMap[appName] = model.NewApplicationSearch(appName) - } - appMap[appName].MergeDataplane(dataplane) - appMap[appName].GetRegistry(ctx) + pageResult := &model.SearchPaginationResult{ + List: maputil.Values(serviceMap), + PageInfo: pageData.Pagination, } + return pageResult, nil +} - for appName, search := range appMap { - applicationSearchResp := &model.ApplicationSearchResp{ - AppName: appName, - } - res = append(res, applicationSearchResp.FromApplicationSearch(search)) +func SearchApplications(ctx consolectx.Context, req *model.ApplicationSearchReq) (*model.SearchPaginationResult, error) { + pageData, err := searchApplications(ctx, req.AppName, req.Mesh, req.PageReq) + if err != nil { + return nil, err } + respList := slice.Map[*meshresource.ApplicationResource, *model.ApplicationSearchResp](pageData.Data, + func(_ int, item *meshresource.ApplicationResource) *model.ApplicationSearchResp { + return buildApplicationSearchResp(item, req.Mesh) + }) + searchResult := &model.SearchPaginationResult{ + List: respList, + PageInfo: pageData.Pagination, + } + return searchResult, nil +} - pagedRes := ToSearchPaginationResult(res, model.ByAppName(res), req.PageReq) - return pagedRes, nil +func BannerSearchApplications(ctx consolectx.Context, req *model.SearchReq) ([]*model.ApplicationSearchResp, error) { + pageData, err := searchApplications(ctx, req.Keywords, req.Mesh, req.PageReq) + if err != nil { + return nil, err + } + respList := slice.Map[*meshresource.ApplicationResource, *model.ApplicationSearchResp](pageData.Data, + func(_ int, item *meshresource.ApplicationResource) *model.ApplicationSearchResp { + return buildApplicationSearchResp(item, req.Mesh) + }) + return respList, nil } -func BannerSearchApplications(ctx context.Context, req *model.SearchReq) ([]*model.ApplicationSearchResp, error) { - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} - if req.Keywords != "" { - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByApplicationContains(req.Keywords)); err != nil { - return nil, err - } +func searchApplications( + ctx consolectx.Context, + keywords string, + mesh string, + pageReq coremodel.PageReq) (*coremodel.PageData[*meshresource.ApplicationResource], error) { + + var pageData *coremodel.PageData[*meshresource.ApplicationResource] + var err error + if strutil.IsBlank(keywords) { + pageData, err = manager.PageListByIndexes[*meshresource.ApplicationResource]( + ctx.ResourceManager(), + meshresource.ApplicationKind, + map[string]interface{}{ + index.ByMeshIndex: mesh, + }, + pageReq, + ) } else { - if err := manager.List(ctx.AppContext(), dataplaneList); err != nil { - return nil, err - } + pageData, err = manager.PageSearchResourceByConditions[*meshresource.ApplicationResource]( + ctx.ResourceManager(), + meshresource.ApplicationKind, + []string{"name=" + keywords}, + pageReq, + ) } - - res := make([]*model.ApplicationSearchResp, 0) - appMap := make(map[string]*model.ApplicationSearch) - for _, dataplane := range dataplaneList.Items { - appName := dataplane.Spec.GetExtensions()[meshproto.Application] - if _, ok := appMap[appName]; !ok { - appMap[appName] = model.NewApplicationSearch(appName) - } - appMap[appName].MergeDataplane(dataplane) - appMap[appName].GetRegistry(ctx) + if err != nil { + return nil, err } + return pageData, nil +} - for appName, search := range appMap { - applicationSearchResp := &model.ApplicationSearchResp{ - AppName: appName, - } - res = append(res, applicationSearchResp.FromApplicationSearch(search)) +func buildApplicationSearchResp(appResource *meshresource.ApplicationResource, mesh string) *model.ApplicationSearchResp { + application := appResource.Spec + return &model.ApplicationSearchResp{ + AppName: application.Name, + DeployClusters: []string{""}, + InstanceCount: application.InstanceCount, + RegistryClusters: []string{mesh}, } - return res, nil } diff --git a/pkg/console/service/condition_rule.go b/pkg/console/service/condition_rule.go index 193b6f49b..d7890cd6d 100644 --- a/pkg/console/service/condition_rule.go +++ b/pkg/console/service/condition_rule.go @@ -18,43 +18,38 @@ package service import ( - "strconv" - - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" - "github.com/apache/dubbo-admin/pkg/core/consts" "github.com/apache/dubbo-admin/pkg/core/logger" + "github.com/apache/dubbo-admin/pkg/core/manager" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" - "github.com/apache/dubbo-admin/pkg/core/store" ) func SearchConditionRules(ctx context.Context, req *model.SearchConditionRuleReq) (*model.SearchPaginationResult, error) { - ruleList := &mesh.ConditionRouteResourceList{} - if req.Keywords == "" { - if err := ctx.ResourceManager().List(ctx.AppContext(), ruleList, store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { - return nil, err - } - } else { - if err := ctx.ResourceManager().List(ctx.AppContext(), ruleList, store.ListByNameContains(req.Keywords), store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { - return nil, err - } + pageData, err := manager.PageSearchResourceByConditions[*meshresource.ConditionRouteResource]( + ctx.ResourceManager(), + meshresource.ConditionRouteKind, + []string{"name=" + req.Keywords}, + req.PageRequest()) + if err != nil { + return nil, err } var respList []model.ConditionRuleSearchResp - for _, item := range ruleList.Items { + for _, item := range pageData.Data { if v3 := item.Spec.ToConditionRouteV3(); v3 != nil { respList = append(respList, model.ConditionRuleSearchResp{ - RuleName: item.Meta.GetName(), + RuleName: item.Name, Scope: v3.GetScope(), - CreateTime: item.Meta.GetCreationTime().String(), + CreateTime: item.CreationTimestamp.String(), Enabled: v3.GetEnabled(), }) } else if v3x1 := item.Spec.ToConditionRouteV3x1(); v3x1 != nil { respList = append(respList, model.ConditionRuleSearchResp{ - RuleName: item.Meta.GetName(), + RuleName: item.Name, Scope: v3x1.GetScope(), - CreateTime: item.Meta.GetCreationTime().String(), + CreateTime: item.CreationTimestamp.String(), Enabled: v3x1.GetEnabled(), }) } else { @@ -63,46 +58,38 @@ func SearchConditionRules(ctx context.Context, req *model.SearchConditionRuleReq } result := model.NewSearchPaginationResult() result.List = respList - result.PageInfo = &ruleList.Pagination + result.PageInfo = pageData.Pagination return result, nil } -func GetConditionRule(cs context.Context, name string) (*mesh.ConditionRouteResource, error) { - res := &mesh.ConditionRouteResource{Spec: &meshproto.ConditionRoute{}} - if err := cs.ResourceManager().Get(cs.AppContext(), res, - // here `name` may be service-name or app-name, set *ByApplication(`name`) is ok. - store.GetByApplication(name), store.GetByKey(name+consts.ConditionRuleSuffix, coremodel.DefaultMesh)); err != nil { - logger.Warnf("get %s condition failed with error: %s", name, err.Error()) +func GetConditionRule(ctx context.Context, name string, mesh string) (*meshresource.ConditionRouteResource, error) { + res, _, err := manager.GetByKey[*meshresource.ConditionRouteResource]( + ctx.ResourceManager(), meshresource.ConditionRouteKind, coremodel.BuildResourceKey(mesh, name)) + if err != nil { + logger.Warnf("get condition route %s error: %v", name, err) return nil, err } return res, nil } -func UpdateConditionRule(cs context.Context, name string, res *mesh.ConditionRouteResource) error { - if err := cs.ResourceManager().Update(cs.AppContext(), res, - // here `name` may be service-name or app-name, set *ByApplication(`name`) is ok. - store.UpdateByApplication(name), store.UpdateByKey(name+consts.ConditionRuleSuffix, coremodel.DefaultMesh)); err != nil { +func UpdateConditionRule(ctx context.Context, name string, res *meshresource.ConditionRouteResource) error { + if err := ctx.ResourceManager().Update(res); err != nil { logger.Warnf("update %s condition failed with error: %s", name, err.Error()) return err } return nil } -func CreateConditionRule(cs context.Context, name string, res *mesh.ConditionRouteResource) error { - if err := cs.ResourceManager().Create(cs.AppContext(), res, - // here `name` may be service-name or app-name, set *ByApplication(`name`) is ok. - store.CreateByApplication(name), store.CreateByKey(name+consts.ConditionRuleSuffix, coremodel.DefaultMesh)); err != nil { +func CreateConditionRule(ctx context.Context, name string, res *meshresource.ConditionRouteResource) error { + if err := ctx.ResourceManager().Add(res); err != nil { logger.Warnf("create %s condition failed with error: %s", name, err.Error()) return err } return nil } -func DeleteConditionRule(cs context.Context, name string, res *mesh.ConditionRouteResource) error { - if err := cs.ResourceManager().Delete(cs.AppContext(), res, - // here `name` may be service-name or app-name, set *ByApplication(`name`) is ok. - store.DeleteByApplication(name), store.DeleteByKey(name+consts.ConditionRuleSuffix, coremodel.DefaultMesh)); err != nil { - logger.Warnf("delete %s condition failed with error: %s", name, err.Error()) +func DeleteConditionRule(ctx context.Context, name string, mesh string) error { + if err := ctx.ResourceManager().DeleteByKey(meshresource.ConditionRouteKind, coremodel.BuildResourceKey(mesh, name)); err != nil { return err } return nil diff --git a/pkg/console/service/configurator_rule.go b/pkg/console/service/configurator_rule.go index 49338d4c0..1e7b033a9 100644 --- a/pkg/console/service/configurator_rule.go +++ b/pkg/console/service/configurator_rule.go @@ -18,50 +18,43 @@ package service import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" consolectx "github.com/apache/dubbo-admin/pkg/console/context" - "github.com/apache/dubbo-admin/pkg/core/consts" "github.com/apache/dubbo-admin/pkg/core/logger" - coreresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/manager" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" - "github.com/apache/dubbo-admin/pkg/core/store" ) -func GetConfigurator(ctx consolectx.Context, name string) (*meshproto.DynamicConfig, error) { - res := &coreresource.DynamicConfig{Spec: &meshproto.DynamicConfig{}} - if err := ctx.ResourceManager().Get(ctx.AppContext(), res, - // here `name` may be service-name or app-name, set *ByApplication(`name`) is ok. - store.GetByApplication(name), store.GetByKey(name+consts.ConfiguratorRuleSuffix, coremodel.DefaultMesh)); err != nil { - logger.Warnf("get %s configurator failed with error: %s", name, err.Error()) +func GetConfigurator(ctx consolectx.Context, name string, mesh string) (*meshresource.DynamicConfigResource, error) { + res, _, err := manager.GetByKey[*meshresource.DynamicConfigResource]( + ctx.ResourceManager(), + meshresource.DynamicConfigKind, + coremodel.BuildResourceKey(mesh, name), + ) + if err != nil { return nil, err } return res, nil } -func UpdateConfigurator(ctx consolectx.Context, name string, res *mesh.DynamicConfigResource) error { - if err := ctx.ResourceManager().Update(ctx.AppContext(), res, - // here `name` may be service-name or app-name, set *ByApplication(`name`) is ok. - store.UpdateByApplication(name), store.UpdateByKey(name+consts.ConfiguratorRuleSuffix, coremodel.DefaultMesh)); err != nil { +func UpdateConfigurator(ctx consolectx.Context, name string, res *meshresource.DynamicConfigResource) error { + if err := ctx.ResourceManager().Update(res); err != nil { logger.Warnf("update %s configurator failed with error: %s", name, err.Error()) return err } return nil } -func CreateConfigurator(ctx consolectx.Context, name string, res *mesh.DynamicConfigResource) error { - if err := ctx.ResourceManager().Create(ctx.AppContext(), res, - // here `name` may be service-name or app-name, set *ByApplication(`name`) is ok. - store.CreateByApplication(name), store.CreateByKey(name+consts.ConfiguratorRuleSuffix, coremodel.DefaultMesh)); err != nil { +func CreateConfigurator(ctx consolectx.Context, name string, res *meshresource.DynamicConfigResource) error { + if err := ctx.ResourceManager().Add(res); err != nil { logger.Warnf("create %s configurator failed with error: %s", name, err.Error()) return err } return nil } -func DeleteConfigurator(ctx consolectx.Context, name string, res *mesh.DynamicConfigResource) error { - if err := ctx.ResourceManager().Delete(ctx.AppContext(), res, - // here `name` may be service-name or app-name, set *ByApplication(`name`) is ok. - store.DeleteByApplication(name), store.DeleteByKey(name+consts.ConfiguratorRuleSuffix, coremodel.DefaultMesh)); err != nil { +func DeleteConfigurator(ctx consolectx.Context, name string, mesh string) error { + if err := ctx.ResourceManager().DeleteByKey(meshresource.DynamicConfigKind, coremodel.BuildResourceKey(mesh, name)); err != nil { logger.Warnf("delete %s configurator failed with error: %s", name, err.Error()) return err } diff --git a/pkg/console/service/instance.go b/pkg/console/service/instance.go index 47909edff..111a82645 100644 --- a/pkg/console/service/instance.go +++ b/pkg/console/service/instance.go @@ -21,164 +21,105 @@ import ( "fmt" "io" "net/http" - "strconv" "strings" - "dubbo.apache.org/dubbo-go/v3/common/constant" + "github.com/duke-git/lancet/v2/strutil" consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" - corers "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/manager" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" - "github.com/apache/dubbo-admin/pkg/core/store" + "github.com/apache/dubbo-admin/pkg/core/store/index" ) +// BannerSearchIp +// TODO: implement me func BannerSearchIp(ctx consolectx.Context, req *model.SearchReq) (*model.SearchPaginationResult, error) { - manager := ctx.ResourceManager() - dataplaneList := &corers.DataplaneResourceList{} - - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByFilterFunc(searchByIp(req.Keywords)), store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { - return nil, err - } - - res := model.NewSearchPaginationResult() - list := make([]*model.SearchInstanceResp, len(dataplaneList.Items)) - for i, item := range dataplaneList.Items { - list[i] = model.NewSearchInstanceResp() - list[i] = list[i].FromDataplaneResource(item) - } - - res.List = list - res.PageInfo = &dataplaneList.Pagination - - return res, nil -} - -func searchByIp(ip string) store.ListFilterFunc { - return func(rs coremodel.Resource) bool { - // make sure that the resource is of type mesh.DataplaneResource - if dp, ok := rs.(*mesh.DataplaneResource); ok { - return dp.GetIP() == ip - } - return false - } + return nil, nil } +// BannerSearchInstances +// TODO: implement me func BannerSearchInstances(ctx consolectx.Context, req *model.SearchReq) (*model.SearchPaginationResult, error) { - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} - - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByNameContains(req.Keywords), store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { - return nil, err - } - - res := model.NewSearchPaginationResult() - list := make([]*model.SearchInstanceResp, len(dataplaneList.Items)) - for i, item := range dataplaneList.Items { - list[i] = model.NewSearchInstanceResp() - list[i] = list[i].FromDataplaneResource(item) - } - - res.List = list - res.PageInfo = &dataplaneList.Pagination - - return res, nil + // TODO: implement me + return nil, nil } func SearchInstances(ctx consolectx.Context, req *model.SearchInstanceReq) (*model.SearchPaginationResult, error) { - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} - - if req.Keywords == "" { - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { + var pageData *coremodel.PageData[*meshresource.InstanceResource] + var err error + if strutil.IsBlank(req.Keywords) { + pageData, err = manager.PageListByIndexes[*meshresource.InstanceResource]( + ctx.ResourceManager(), + meshresource.InstanceKind, + map[string]interface{}{ + index.ByMeshIndex: req.Mesh, + }, + req.PageReq) + if err != nil { return nil, err } } else { - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByNameContains(req.Keywords), store.ListByPage(req.PageSize, strconv.Itoa(req.PageOffset))); err != nil { + pageData, err = manager.PageSearchResourceByConditions[*meshresource.InstanceResource]( + ctx.ResourceManager(), + meshresource.InstanceKind, + []string{"ip=" + req.Keywords}, + req.PageReq, + ) + if err != nil { return nil, err } } - res := model.NewSearchPaginationResult() + resp := model.NewSearchPaginationResult() var list []*model.SearchInstanceResp - for _, item := range dataplaneList.Items { - if strings.Split(item.Meta.GetName(), constant.KeySeparator)[1] == "0" { - continue - } - list = append(list, model.NewSearchInstanceResp().FromDataplaneResource(item)) + for _, item := range pageData.Data { + list = append(list, model.NewSearchInstanceResp().FromInstanceResource(item)) } - - res.List = list - res.PageInfo = &dataplaneList.Pagination - - return res, nil + resp.List = list + resp.PageInfo = pageData.Pagination + return resp, nil } -func GetInstanceDetail(ctx consolectx.Context, req *model.InstanceDetailReq) ([]*model.InstanceDetailResp, error) { - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} - - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByNameContains(req.InstanceName)); err != nil { +func GetInstanceDetail(ctx consolectx.Context, req *model.InstanceDetailReq) (*model.InstanceDetailResp, error) { + res, _, err := manager.GetByKey[*meshresource.InstanceResource]( + ctx.ResourceManager(), + meshresource.InstanceKind, + coremodel.BuildResourceKey(req.Mesh, req.InstanceName), + ) + if err != nil { return nil, err } - instMap := make(map[string]*model.InstanceDetail) - for _, dataplane := range dataplaneList.Items { - - // instName := dataplane.Meta.GetLabels()[mesh_proto.InstanceTag]//This tag is "" in universal mode - instName := dataplane.Meta.GetName() - var instanceDetail *model.InstanceDetail - if _, ok := instMap[instName]; ok { - // found previously recorded instance detail in instMap - // the detail should be merged with the new instance detail - instanceDetail = instMap[instName] - } else { - // the instance information appears for the 1st time - instanceDetail = model.NewInstanceDetail() - } - instanceDetail.Merge(dataplane) // convert dataplane info to instance detail - instMap[instName] = instanceDetail - } - - resp := make([]*model.InstanceDetailResp, 0, len(instMap)) - for _, instDetail := range instMap { - respItem := &model.InstanceDetailResp{} - resp = append(resp, respItem.FromInstanceDetail(instDetail)) - } + resp := model.FromInstanceResource(res) return resp, nil } func GetInstanceMetrics(ctx consolectx.Context, req *model.MetricsReq) ([]*model.MetricsResp, error) { - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByNameContains(req.InstanceName)); err != nil { + res, _, err := manager.GetByKey[*meshresource.InstanceResource]( + ctx.ResourceManager(), + meshresource.InstanceKind, + coremodel.BuildResourceKey(req.Mesh, req.InstanceName), + ) + if err != nil { return nil, err } - instMap := make(map[string]*model.InstanceDetail) - resp := make([]*model.MetricsResp, 0) - for _, dataplane := range dataplaneList.Items { - instName := dataplane.Meta.GetName() - var instanceDetail *model.InstanceDetail - if detail, ok := instMap[instName]; ok { - instanceDetail = detail - } else { - instanceDetail = model.NewInstanceDetail() - } - instanceDetail.Merge(dataplane) - metrics, err := fetchMetricsData(dataplane.GetIP(), 22222) - if err != nil { - continue - } - metricsResp := &model.MetricsResp{ - InstanceName: instName, - Metrics: metrics, - } - resp = append(resp, metricsResp) + instance := res.Spec + metricsData, err := fetchMetricsData(instance.Ip, instance.QosPort) + if err != nil { + return nil, err } - return resp, nil + + metricsResp := &model.MetricsResp{ + InstanceName: instance.Name, + Metrics: metricsData, + } + + return []*model.MetricsResp{metricsResp}, nil } -func fetchMetricsData(ip string, port int) ([]model.Metric, error) { +func fetchMetricsData(ip string, port int32) ([]model.Metric, error) { url := fmt.Sprintf("http://%s:%d/metrics", ip, port) response, err := http.Get(url) if err != nil { diff --git a/pkg/console/service/service.go b/pkg/console/service/service.go index e46ac6e5c..73f079e65 100644 --- a/pkg/console/service/service.go +++ b/pkg/console/service/service.go @@ -19,146 +19,107 @@ package service import ( "sort" - "strconv" - "dubbo.apache.org/dubbo-go/v3/common/constant" + "github.com/duke-git/lancet/v2/maputil" + "github.com/duke-git/lancet/v2/slice" + "github.com/duke-git/lancet/v2/strutil" - "github.com/apache/dubbo-admin/api/mesh/v1alpha1" consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" + "github.com/apache/dubbo-admin/pkg/core/manager" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" - "github.com/apache/dubbo-admin/pkg/core/store" + "github.com/apache/dubbo-admin/pkg/core/store/index" ) +// GetServiceTabDistribution TODO implement func GetServiceTabDistribution(ctx consolectx.Context, req *model.ServiceTabDistributionReq) (*model.SearchPaginationResult, error) { - manager := ctx.ResourceManager() - mappingList := &mesh.MappingResourceList{} - - serviceName := req.ServiceName - - if err := manager.List(ctx.AppContext(), mappingList); err != nil { - return nil, err - } - - res := make([]*model.ServiceTabDistributionResp, 0) - - for _, mapping := range mappingList.Items { - // 找到对应serviceName的appNames - if mapping.Spec.InterfaceName == serviceName { - for _, appName := range mapping.Spec.ApplicationNames { - dataplaneList := &mesh.DataplaneResourceList{} - // 每拿到一个appName,都将对应的实例数据填充进dataplaneList, 再通过dataplane拿到这个appName对应的所有实例 - if err := manager.List(ctx.AppContext(), dataplaneList, store.ListByApplication(appName)); err != nil { - return nil, err - } - - // 拿到了appName,接下来从dataplane取实例信息 - for _, dataplane := range dataplaneList.Items { - metadata := &mesh.MetaDataResource{ - Spec: &v1alpha1.MetaData{}, - } - if err := manager.Get(ctx.AppContext(), metadata, store.GetByRevision(dataplane.Spec.GetExtensions()[v1alpha1.RevisionLabel]), store.GetByType(dataplane.Spec.GetExtensions()["registry-type"])); err != nil { - return nil, err - } - respItem := &model.ServiceTabDistributionResp{} - - serviceInfos := metadata.GetSpec().(*v1alpha1.MetaData).Services - var sideServiceInfos []*v1alpha1.ServiceInfo - for _, serviceInfo := range serviceInfos { - if serviceInfo.GetParams()[constant.SideKey] == req.Side && - serviceInfo.Name == req.ServiceName { - sideServiceInfos = append(sideServiceInfos, serviceInfo) - } - } - if len(sideServiceInfos) > 0 { - res = append(res, respItem.FromServiceDataplaneResource(dataplane, metadata, appName, req)) - } - } - } - } - } - - pagedRes := ToSearchPaginationResult(res, model.ByServiceInstanceName(res), req.PageReq) - - return pagedRes, nil + return nil, nil } -func GetSearchServices(ctx consolectx.Context, req *model.ServiceSearchReq) (*model.SearchPaginationResult, error) { +func SearchServices(ctx consolectx.Context, req *model.ServiceSearchReq) (*model.SearchPaginationResult, error) { if req.Keywords != "" { return BannerSearchServices(ctx, req) } - - res := make([]*model.ServiceSearchResp, 0) - serviceMap := make(map[string]*model.ServiceSearch) - manager := ctx.ResourceManager() - dataplaneList := &mesh.DataplaneResourceList{} - - if err := manager.List(ctx.AppContext(), dataplaneList); err != nil { - return nil, err - } - // 通过dataplane extension字段获取所有revision - revisions := make(map[string]string, 0) - for _, dataplane := range dataplaneList.Items { - rev, ok := dataplane.Spec.GetExtensions()[v1alpha1.RevisionLabel] - if ok { - revisions[rev] = dataplane.Spec.GetExtensions()["registry-type"] - } - } - - // 遍历 revisions - for rev, t := range revisions { - metadata := &mesh.MetaDataResource{ - Spec: &v1alpha1.MetaData{}, - } - err := manager.Get(ctx.AppContext(), metadata, store.GetByRevision(rev), store.GetByType(t)) + var pageData *coremodel.PageData[*meshresource.ServiceResource] + var err error + if strutil.IsBlank(req.Keywords) { + pageData, err = manager.PageListByIndexes[*meshresource.ServiceResource]( + ctx.ResourceManager(), + meshresource.ServiceKind, + map[string]interface{}{ + index.ByMeshIndex: req.Mesh, + }, + req.PageReq, + ) if err != nil { return nil, err } - for _, serviceInfo := range metadata.Spec.Services { - if _, ok := serviceMap[serviceInfo.Name]; ok { - serviceMap[serviceInfo.Name].FromServiceInfo(serviceInfo) - } else { - serviceSearch := model.NewServiceSearch(serviceInfo.Name) - serviceSearch.FromServiceInfo(serviceInfo) - serviceMap[serviceInfo.Name] = serviceSearch - } + } else { + pageData, err = manager.PageSearchResourceByConditions[*meshresource.ServiceResource]( + ctx.ResourceManager(), + meshresource.ServiceKind, + []string{"serviceName=" + req.Keywords}, + req.PageReq, + ) + if err != nil { + return nil, err } } - for _, serviceSearch := range serviceMap { - serviceSearchResp := model.NewServiceSearchResp() - serviceSearchResp.FromServiceSearch(serviceSearch) - res = append(res, serviceSearchResp) + serviceMap := make(map[string]*model.ServiceSearchResp) + for _, serviceRes := range pageData.Data { + service := serviceRes.Spec + if _, exists := serviceMap[service.Name]; !exists { + serviceMap[service.Name] = toServiceSearchResp(serviceRes) + } else { + vgs := serviceMap[service.Name].VersionGroups + serviceMap[service.Name].VersionGroups = append(vgs, model.VersionGroup{ + Version: service.Version, + Group: service.Group, + }) + } } - - pagedRes := ToSearchPaginationResult(res, model.ByServiceName(res), req.PageReq) - return pagedRes, nil + return &model.SearchPaginationResult{ + List: maputil.Values(serviceMap), + PageInfo: pageData.Pagination, + }, nil } func BannerSearchServices(ctx consolectx.Context, req *model.ServiceSearchReq) (*model.SearchPaginationResult, error) { - res := make([]*model.ServiceSearchResp, 0) - - manager := ctx.ResourceManager() - mappingList := &mesh.MappingResourceList{} - - if req.Keywords != "" { - if err := manager.List(ctx.AppContext(), mappingList, store.ListByNameContains(req.Keywords)); err != nil { - return nil, err - } - - for _, mapping := range mappingList.Items { - serviceSearchResp := model.NewServiceSearchResp() - serviceSearchResp.ServiceName = mapping.GetMeta().GetName() - res = append(res, serviceSearchResp) - } + pageData, err := manager.PageSearchResourceByConditions[*meshresource.ServiceResource]( + ctx.ResourceManager(), + meshresource.ServiceKind, + []string{"serviceName=" + req.Keywords}, + req.PageReq, + ) + if err != nil { + return nil, err } + searchRespList := slice.Map[*meshresource.ServiceResource, *model.ServiceSearchResp](pageData.Data, + func(_ int, item *meshresource.ServiceResource) *model.ServiceSearchResp { + return toServiceSearchResp(item) + }) + return &model.SearchPaginationResult{ + List: searchRespList, + PageInfo: pageData.Pagination, + }, nil +} - pagedRes := ToSearchPaginationResult(res, model.ByServiceName(res), req.PageReq) +func toServiceSearchResp(res *meshresource.ServiceResource) *model.ServiceSearchResp { + service := res.Spec + return &model.ServiceSearchResp{ + ServiceName: service.Name, + VersionGroups: []model.VersionGroup{ + { + Version: service.Version, + Group: service.Group, + }, + }, + } - return pagedRes, nil } - -func ToSearchPaginationResult[T any](services []T, data sort.Interface, req model.PageReq) *model.SearchPaginationResult { +func ToSearchPaginationResult[T any](services []T, data sort.Interface, req coremodel.PageReq) *model.SearchPaginationResult { res := model.NewSearchPaginationResult() list := make([]T, 0) @@ -177,17 +138,18 @@ func ToSearchPaginationResult[T any](services []T, data sort.Interface, req mode list = append(list, services[i]) } - nextOffset := "" + nextOffset := 0 if paginationEnabled { if offset+pageSize < lenFilteredItems { // set new offset only if we did not reach the end of the collection - nextOffset = strconv.Itoa(offset + req.PageSize) + nextOffset = offset + req.PageSize } } res.List = list - res.PageInfo = &coremodel.Pagination{ - Total: uint32(lenFilteredItems), - NextOffset: nextOffset, + res.PageInfo = coremodel.Pagination{ + Total: lenFilteredItems, + PageSize: req.PageSize, + PageOffset: nextOffset, } return res diff --git a/pkg/console/service/tag_rule.go b/pkg/console/service/tag_rule.go index 77ae1fa5d..7c4048feb 100644 --- a/pkg/console/service/tag_rule.go +++ b/pkg/console/service/tag_rule.go @@ -18,52 +18,45 @@ package service import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" consolectx "github.com/apache/dubbo-admin/pkg/console/context" - "github.com/apache/dubbo-admin/pkg/core/consts" "github.com/apache/dubbo-admin/pkg/core/logger" + "github.com/apache/dubbo-admin/pkg/core/manager" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" - "github.com/apache/dubbo-admin/pkg/core/store" ) -func GetTagRule(ctx consolectx.Context, name string) (*mesh.TagRouteResource, error) { - res := &mesh.TagRouteResource{Spec: &meshproto.TagRoute{}} - err := ctx.ResourceManager().Get(ctx.AppContext(), res, - // here `name` may be service name or app name, set *ByApplication(`name`) is ok. - store.GetByApplication(name), store.GetByKey(name+consts.TagRuleSuffix, coremodel.DefaultMesh)) +func GetTagRule(ctx consolectx.Context, name string, mesh string) (*meshresource.TagRouteResource, error) { + res, _, err := manager.GetByKey[*meshresource.TagRouteResource]( + ctx.ResourceManager(), + meshresource.TagRouteKind, + coremodel.BuildResourceKey(mesh, name), + ) if err != nil { - logger.Warnf("get tag rule %s error: %v", name, err) return nil, err } return res, nil } -func UpdateTagRule(ctx consolectx.Context, name string, res *mesh.TagRouteResource) error { - err := ctx.ResourceManager().Update(ctx.AppContext(), res, - // here `name` may be service name or app name, set *ByApplication(`name`) is ok. - store.UpdateByApplication(name), store.UpdateByKey(name+consts.TagRuleSuffix, coremodel.DefaultMesh)) +func UpdateTagRule(ctx consolectx.Context, res *meshresource.TagRouteResource) error { + err := ctx.ResourceManager().Update(res) if err != nil { - logger.Warnf("update tag rule %s error: %v", name, err) + logger.Warnf("update tag rule %s error: %v", res.Name, err) return err } return nil } -func CreateTagRule(ctx consolectx.Context, name string, res *mesh.TagRouteResource) error { - err := ctx.ResourceManager().Create(ctx.AppContext(), res, - // here `name` may be service name or app name, set *ByApplication(`name`) is ok. - store.CreateByApplication(name), store.CreateByKey(name+consts.TagRuleSuffix, coremodel.DefaultMesh)) +func CreateTagRule(ctx consolectx.Context, res *meshresource.TagRouteResource) error { + err := ctx.ResourceManager().Add(res) if err != nil { - logger.Warnf("create tag rule %s error: %v", name, err) + logger.Warnf("create tag rule %s error: %v", res.Name, err) return err } return nil } -func DeleteTagRule(ctx consolectx.Context, name string, res *mesh.TagRouteResource) error { - err := ctx.ResourceManager().Delete(ctx.AppContext(), res, - // here `name` may be service name or app name, set *ByApplication(`name`) is ok. - store.DeleteByApplication(name), store.DeleteByKey(name+consts.TagRuleSuffix, coremodel.DefaultMesh)) +func DeleteTagRule(ctx consolectx.Context, name string, mesh string) error { + err := ctx.ResourceManager().DeleteByKey(meshresource.TagRouteKind, coremodel.BuildResourceKey(mesh, name)) if err != nil { logger.Warnf("delete tag rule %s error: %v", name, err) return err diff --git a/pkg/core/bootstrap/bootstrap.go b/pkg/core/bootstrap/bootstrap.go index 80183b663..0b8329f23 100644 --- a/pkg/core/bootstrap/bootstrap.go +++ b/pkg/core/bootstrap/bootstrap.go @@ -23,8 +23,14 @@ import ( "github.com/pkg/errors" "github.com/apache/dubbo-admin/pkg/config/app" + _ "github.com/apache/dubbo-admin/pkg/console" + _ "github.com/apache/dubbo-admin/pkg/core/discovery" + _ "github.com/apache/dubbo-admin/pkg/core/engine" + _ "github.com/apache/dubbo-admin/pkg/core/events" "github.com/apache/dubbo-admin/pkg/core/logger" + _ "github.com/apache/dubbo-admin/pkg/core/manager" "github.com/apache/dubbo-admin/pkg/core/runtime" + _ "github.com/apache/dubbo-admin/pkg/core/store" "github.com/apache/dubbo-admin/pkg/diagnostics" ) @@ -41,11 +47,11 @@ func Bootstrap(appCtx context.Context, cfg app.AdminConfig) (runtime.Runtime, er if err := initResourceStore(cfg, builder); err != nil { return nil, err } - // 2. initialize discovery engine + // 2. initialize discovery if err := initializeResourceDiscovery(builder); err != nil { return nil, err } - // 3. initialize runtime engine + // 3. initialize engine if err := initializeResourceEngine(builder); err != nil { return nil, err } diff --git a/pkg/core/consts/const.go b/pkg/core/consts/const.go index 4ca45a460..785c84f4a 100644 --- a/pkg/core/consts/const.go +++ b/pkg/core/consts/const.go @@ -92,6 +92,11 @@ const ( SideConsumer = `consumer` ) +const ( + StatefulSet = "StatefulSet" + Deployment = "Deployment" +) + const ( NotEqual = "!=" Equal = "=" diff --git a/pkg/core/controller/informer.go b/pkg/core/controller/informer.go index b00fb94e4..28cf884bf 100644 --- a/pkg/core/controller/informer.go +++ b/pkg/core/controller/informer.go @@ -23,14 +23,15 @@ import ( "sync" "time" - "github.com/apache/dubbo-admin/pkg/core/events" - "github.com/apache/dubbo-admin/pkg/core/logger" - "github.com/apache/dubbo-admin/pkg/core/resource/model" - "github.com/apache/dubbo-admin/pkg/core/store" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" + + "github.com/apache/dubbo-admin/pkg/core/events" + "github.com/apache/dubbo-admin/pkg/core/logger" + "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/store" ) // Informer is transferred from cache.SharedInformer, and modified to support event distribution in events.EventBus diff --git a/pkg/core/controller/listwatcher.go b/pkg/core/controller/listwatcher.go index fd5530e3b..f15006b72 100644 --- a/pkg/core/controller/listwatcher.go +++ b/pkg/core/controller/listwatcher.go @@ -18,8 +18,9 @@ package controller import ( - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "k8s.io/client-go/tools/cache" + + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) type ResourceListerWatcher interface { diff --git a/pkg/core/events/eventbus.go b/pkg/core/events/eventbus.go index 7fbe14b39..c9956e3fc 100644 --- a/pkg/core/events/eventbus.go +++ b/pkg/core/events/eventbus.go @@ -18,8 +18,9 @@ package events import ( - "github.com/apache/dubbo-admin/pkg/core/resource/model" "k8s.io/client-go/tools/cache" + + "github.com/apache/dubbo-admin/pkg/core/resource/model" ) type Event interface { diff --git a/pkg/core/manager/manager.go b/pkg/core/manager/manager.go index e56c9b6ed..3cf8685e7 100644 --- a/pkg/core/manager/manager.go +++ b/pkg/core/manager/manager.go @@ -18,23 +18,22 @@ package manager import ( - "errors" "fmt" - "time" "github.com/apache/dubbo-admin/pkg/core/resource/model" "github.com/apache/dubbo-admin/pkg/core/store" - "github.com/duke-git/lancet/v2/slice" ) type ReadOnlyResourceManager interface { // GetByKey returns the resource with the given resource key GetByKey(rk model.ResourceKind, key string) (r model.Resource, exist bool, err error) - // ListByIndex returns the resource with the given index name - ListByIndex(rk model.ResourceKind, indexName string, indexKey interface{}) ([]model.Resource, error) - // ListPageByIndex page list the resources with the given index - ListPageByIndex(rk model.ResourceKind, indexName string, - indexValue interface{}, pq model.PageQuery) ([]model.Resource, model.Pagination, error) + // ListByIndexes returns the resources with the given indexes, indexes is a map of index name and index value + ListByIndexes(rk model.ResourceKind, indexes map[string]interface{}) ([]model.Resource, error) + // PageListByIndexes page list the resources with the given indexes, indexes is a map of index name and index value + PageListByIndexes(rk model.ResourceKind, indexes map[string]interface{}, pr model.PageReq) (*model.PageData[model.Resource], error) + // PageSearchResourceByConditions page fuzzy search resource by conditions, conditions cannot be empty + // TODO support multiple conditions + PageSearchResourceByConditions(rk model.ResourceKind, conditions []string, pr model.PageReq) (*model.PageData[model.Resource], error) } type WriteOnlyResourceManager interface { @@ -75,38 +74,37 @@ func (rm *resourcesManager) GetByKey(rk model.ResourceKind, key string) (r model return item.(model.Resource), exist, err } -func (rm *resourcesManager) ListByIndex(rk model.ResourceKind, indexName string, indexKey interface{}) ([]model.Resource, error) { +func (rm *resourcesManager) ListByIndexes(rk model.ResourceKind, indexes map[string]interface{}) ([]model.Resource, error) { rs, err := rm.StoreRouter.ResourceKindRoute(rk) if err != nil { return nil, err } - objList, err := rs.Index(indexName, indexKey) + resources, err := rs.ListByIndexes(indexes) if err != nil { return nil, err } - resources := slice.Map(objList, func(_ int, item interface{}) model.Resource { - return item.(model.Resource) - }) return resources, nil } -func (rm *resourcesManager) ListPageByIndex( +func (rm *resourcesManager) PageListByIndexes( rk model.ResourceKind, - indexName string, - indexValue interface{}, - pageQuery model.PageQuery) ([]model.Resource, model.Pagination, error) { + indexes map[string]interface{}, + pr model.PageReq) (*model.PageData[model.Resource], error) { + rs, err := rm.StoreRouter.ResourceKindRoute(rk) if err != nil { - return nil, model.Pagination{}, err + return nil, err } - items, p, err := rs.ListPageByIndex(indexName, indexValue, pageQuery) + pageData, err := rs.PageListByIndexes(indexes, pr) if err != nil { - return nil, p, err + return nil, err } - rsList := slice.Map(items, func(_ int, item interface{}) model.Resource { - return item.(model.Resource) - }) - return rsList, p, nil + return pageData, nil +} + +func (rm *resourcesManager) PageSearchResourceByConditions(rk model.ResourceKind, conditions []string, pr model.PageReq) (*model.PageData[model.Resource], error) { + //TODO implement me + panic("implement me") } func (rm *resourcesManager) Add(r model.Resource) error { @@ -147,58 +145,3 @@ func (rm *resourcesManager) DeleteByKey(rk model.ResourceKind, key string) error } return rs.Delete(r) } - -type ConflictRetry struct { - BaseBackoff time.Duration - MaxTimes uint - JitterPercent uint -} - -type UpsertOpts struct { - ConflictRetry ConflictRetry - Transactions store.Transactions -} - -type UpsertFunc func(opts *UpsertOpts) - -func WithConflictRetry(baseBackoff time.Duration, maxTimes uint, jitterPercent uint) UpsertFunc { - return func(opts *UpsertOpts) { - opts.ConflictRetry.BaseBackoff = baseBackoff - opts.ConflictRetry.MaxTimes = maxTimes - opts.ConflictRetry.JitterPercent = jitterPercent - } -} - -func WithTransactions(transactions store.Transactions) UpsertFunc { - return func(opts *UpsertOpts) { - opts.Transactions = transactions - } -} - -func NewUpsertOpts(fs ...UpsertFunc) UpsertOpts { - opts := UpsertOpts{ - Transactions: store.NoTransactions{}, - } - for _, f := range fs { - f(&opts) - } - return opts -} - -type MeshNotFoundError struct { - Mesh string -} - -func (m *MeshNotFoundError) Error() string { - return fmt.Sprintf("mesh of name %s is not found", m.Mesh) -} - -func MeshNotFound(meshName string) error { - return &MeshNotFoundError{meshName} -} - -func IsMeshNotFound(err error) bool { - var meshNotFoundError *MeshNotFoundError - ok := errors.As(err, &meshNotFoundError) - return ok -} diff --git a/pkg/core/manager/manager_helper.go b/pkg/core/manager/manager_helper.go new file mode 100644 index 000000000..7429477f0 --- /dev/null +++ b/pkg/core/manager/manager_helper.go @@ -0,0 +1,121 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package manager + +import ( + "reflect" + + "github.com/apache/dubbo-admin/pkg/common/errors" + "github.com/apache/dubbo-admin/pkg/core/resource/model" +) + +// GetByKey is a helper function of ResourceManager.GeyByKey +func GetByKey[T model.Resource](rm ReadOnlyResourceManager, rk model.ResourceKind, key string) (r T, exist bool, err error) { + resource, exist, err := rm.GetByKey(rk, key) + if err != nil || !exist { + var zero T + return zero, exist, err + } + + typedResource, ok := resource.(T) + if !ok { + var zero T + return zero, false, errors.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) + } + return typedResource, true, nil +} + +// ListByIndexes is a helper function of ResourceManager.ListByIndexes +func ListByIndexes[T model.Resource](rm ReadOnlyResourceManager, rk model.ResourceKind, indexes map[string]interface{}) ([]T, error) { + resources, err := rm.ListByIndexes(rk, indexes) + if err != nil { + return nil, err + } + + typedResources := make([]T, len(resources)) + for i, resource := range resources { + typedResource, ok := resource.(T) + if !ok { + return nil, errors.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) + } + typedResources[i] = typedResource + } + + return typedResources, nil +} + +// PageListByIndexes is a helper function of ResourceManager.PageListByIndexes +func PageListByIndexes[T model.Resource]( + rm ReadOnlyResourceManager, + rk model.ResourceKind, + indexes map[string]interface{}, + pr model.PageReq) (*model.PageData[T], error) { + + pageData, err := rm.PageListByIndexes(rk, indexes, pr) + if err != nil { + return nil, err + } + + typedResources := make([]T, len(pageData.Data)) + for i, resource := range pageData.Data { + typedResource, ok := resource.(T) + if !ok { + return nil, errors.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) + } + typedResources[i] = typedResource + } + newPageData := &model.PageData[T]{ + Pagination: model.Pagination{ + Total: pageData.Total, + PageOffset: pageData.PageOffset, + PageSize: pageData.PageSize, + }, + Data: typedResources, + } + return newPageData, nil +} + +// PageSearchResourceByConditions is a helper function of ResourceManager.PageSearchResourceByConditions +func PageSearchResourceByConditions[T model.Resource]( + rm ReadOnlyResourceManager, + rk model.ResourceKind, + conditions []string, + pr model.PageReq) (*model.PageData[T], error) { + pageData, err := rm.PageSearchResourceByConditions(rk, conditions, pr) + if err != nil { + return nil, err + } + + typedResources := make([]T, len(pageData.Data)) + for i, resource := range pageData.Data { + typedResource, ok := resource.(T) + if !ok { + return nil, errors.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) + } + typedResources[i] = typedResource + } + newPageData := &model.PageData[T]{ + Pagination: model.Pagination{ + Total: pageData.Total, + PageOffset: pageData.PageOffset, + PageSize: pageData.PageSize, + }, + Data: typedResources, + } + return newPageData, nil +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go b/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go index fa4cf9e30..ff9f2f28a 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go @@ -21,16 +21,14 @@ package v1alpha1 import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Cluster + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) const AffinityRouteKind coremodel.ResourceKind = "AffinityRoute" @@ -39,17 +37,17 @@ func init() { } type AffinityRouteResource struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` + // Spec is the specification of the Dubbo AffinityRoute resource. - // +kubebuilder:validation:Optional Spec *meshproto.AffinityRoute `json:"spec,omitempty"` + // Status is the status of the Dubbo AffinityRoute resource. Status AffinityRouteResourceStatus `json:"status,omitempty"` } @@ -58,8 +56,6 @@ type AffinityRouteResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Namespaced type AffinityRouteResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/pkg/core/resource/apis/mesh/v1alpha1/application_types.go b/pkg/core/resource/apis/mesh/v1alpha1/application_types.go index 4bf29dc6a..6aef4ccc3 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/application_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/application_types.go @@ -21,16 +21,14 @@ package v1alpha1 import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Namespaced + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) const ApplicationKind coremodel.ResourceKind = "Application" @@ -39,17 +37,17 @@ func init() { } type ApplicationResource struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` + // Spec is the specification of the Dubbo Application resource. - // +kubebuilder:validation:Optional Spec *meshproto.Application `json:"spec,omitempty"` + // Status is the status of the Dubbo Application resource. Status ApplicationResourceStatus `json:"status,omitempty"` } @@ -58,8 +56,6 @@ type ApplicationResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Cluster type ApplicationResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go b/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go index d2617bbcb..83b6b8c39 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go @@ -21,16 +21,14 @@ package v1alpha1 import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Cluster + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) const ConditionRouteKind coremodel.ResourceKind = "ConditionRoute" @@ -39,17 +37,17 @@ func init() { } type ConditionRouteResource struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` + // Spec is the specification of the Dubbo ConditionRoute resource. - // +kubebuilder:validation:Optional Spec *meshproto.ConditionRoute `json:"spec,omitempty"` + // Status is the status of the Dubbo ConditionRoute resource. Status ConditionRouteResourceStatus `json:"status,omitempty"` } @@ -58,8 +56,6 @@ type ConditionRouteResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Namespaced type ConditionRouteResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go b/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go index 83e9b6893..e2fa03fd2 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go @@ -21,16 +21,14 @@ package v1alpha1 import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Cluster + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) const DynamicConfigKind coremodel.ResourceKind = "DynamicConfig" @@ -39,17 +37,17 @@ func init() { } type DynamicConfigResource struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` + // Spec is the specification of the Dubbo DynamicConfig resource. - // +kubebuilder:validation:Optional Spec *meshproto.DynamicConfig `json:"spec,omitempty"` + // Status is the status of the Dubbo DynamicConfig resource. Status DynamicConfigResourceStatus `json:"status,omitempty"` } @@ -58,8 +56,6 @@ type DynamicConfigResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Namespaced type DynamicConfigResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/pkg/core/resource/apis/mesh/v1alpha1/instance_index.go b/pkg/core/resource/apis/mesh/v1alpha1/instance_index.go deleted file mode 100644 index 32240c19b..000000000 --- a/pkg/core/resource/apis/mesh/v1alpha1/instance_index.go +++ /dev/null @@ -1,25 +0,0 @@ -package v1alpha1 - -import ( - "fmt" - - "github.com/apache/dubbo-admin/pkg/core/store" - "k8s.io/client-go/tools/cache" -) - -func init() { - store.RegisterIndexers(InstanceKind, map[string]cache.IndexFunc{ - "AppName": byAppName, - }) -} - -func byAppName(obj interface{}) ([]string, error) { - instance, ok := obj.(InstanceResource) - if !ok { - return nil, fmt.Errorf("invalid object type, required %s, got %v", InstanceKind, obj) - } - if instance.Spec == nil { - return []string{}, nil - } - return []string{instance.Spec.AppName}, nil -} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go b/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go index f47dbc935..17f92e2e3 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go @@ -21,16 +21,14 @@ package v1alpha1 import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Namespaced + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) const InstanceKind coremodel.ResourceKind = "Instance" @@ -39,17 +37,17 @@ func init() { } type InstanceResource struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` + // Spec is the specification of the Dubbo Instance resource. - // +kubebuilder:validation:Optional Spec *meshproto.Instance `json:"spec,omitempty"` + // Status is the status of the Dubbo Instance resource. Status InstanceResourceStatus `json:"status,omitempty"` } @@ -58,8 +56,6 @@ type InstanceResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Cluster type InstanceResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/pkg/core/resource/apis/mesh/v1alpha1/mapping_types.go b/pkg/core/resource/apis/mesh/v1alpha1/rpcinstance_types.go similarity index 60% rename from pkg/core/resource/apis/mesh/v1alpha1/mapping_types.go rename to pkg/core/resource/apis/mesh/v1alpha1/rpcinstance_types.go index de28f228f..0c5d18edf 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/mapping_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/rpcinstance_types.go @@ -21,76 +21,72 @@ package v1alpha1 import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Namespaced + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) -const MappingKind coremodel.ResourceKind = "Mapping" +const RPCInstanceKind coremodel.ResourceKind = "RPCInstance" func init() { - coremodel.RegisterResourceSchema(MappingKind, NewMappingResource) + coremodel.RegisterResourceSchema(RPCInstanceKind, NewRPCInstanceResource) } -type MappingResource struct { - metav1.TypeMeta `json:",inline"` +type RPCInstanceResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` - // Spec is the specification of the Dubbo Mapping resource. - // +kubebuilder:validation:Optional - Spec *meshproto.Mapping `json:"spec,omitempty"` - // Status is the status of the Dubbo Mapping resource. - Status MappingResourceStatus `json:"status,omitempty"` + + // Spec is the specification of the Dubbo RPCInstance resource. + Spec *meshproto.RPCInstance `json:"spec,omitempty"` + + // Status is the status of the Dubbo RPCInstance resource. + Status RPCInstanceResourceStatus `json:"status,omitempty"` } -type MappingResourceStatus struct { +type RPCInstanceResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Cluster -type MappingResourceList struct { +type RPCInstanceResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []MappingResource `json:"items"` + Items []RPCInstanceResource `json:"items"` } -func (r *MappingResource) ResourceKind() coremodel.ResourceKind { - return MappingKind +func (r *RPCInstanceResource) ResourceKind() coremodel.ResourceKind { + return RPCInstanceKind } -func (r *MappingResource) MeshName() string { +func (r *RPCInstanceResource) MeshName() string { return r.Mesh } -func (r *MappingResource) ResourceKey() string { +func (r *RPCInstanceResource) ResourceKey() string { return coremodel.BuildResourceKey(r.Mesh, r.Name) } -func (r *MappingResource) ResourceMeta() metav1.ObjectMeta { +func (r *RPCInstanceResource) ResourceMeta() metav1.ObjectMeta { return r.ObjectMeta } -func (r *MappingResource) ResourceSpec() coremodel.ResourceSpec { +func (r *RPCInstanceResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } -func (r *MappingResource) DeepCopyObject() k8sruntime.Object { +func (r *RPCInstanceResource) DeepCopyObject() k8sruntime.Object { if r == nil { return nil } - out := &MappingResource{ + out := &RPCInstanceResource{ TypeMeta: r.TypeMeta, Mesh: r.Mesh, Status: r.Status, @@ -99,7 +95,7 @@ func (r *MappingResource) DeepCopyObject() k8sruntime.Object { r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if r.Spec != nil { - spec, ok := proto.Clone(r.Spec).(*meshproto.Mapping) + spec, ok := proto.Clone(r.Spec).(*meshproto.RPCInstance) if !ok { logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) return out @@ -110,10 +106,10 @@ func (r *MappingResource) DeepCopyObject() k8sruntime.Object { return out } -func NewMappingResourceWithAttributes(name string, mesh string) *MappingResource { - return &MappingResource{ +func NewRPCInstanceResourceWithAttributes(name string, mesh string) *RPCInstanceResource { + return &RPCInstanceResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(MappingKind), + Kind: string(RPCInstanceKind), APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ @@ -124,10 +120,10 @@ func NewMappingResourceWithAttributes(name string, mesh string) *MappingResource } } -func NewMappingResource() coremodel.Resource { - return &MappingResource{ +func NewRPCInstanceResource() coremodel.Resource { + return &RPCInstanceResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(MappingKind), + Kind: string(RPCInstanceKind), APIVersion: "v1alpha1", }, } diff --git a/pkg/core/resource/apis/system/v1alpha1/zoneinsight_types.go b/pkg/core/resource/apis/mesh/v1alpha1/rpcinstancemetadata_types.go similarity index 52% rename from pkg/core/resource/apis/system/v1alpha1/zoneinsight_types.go rename to pkg/core/resource/apis/mesh/v1alpha1/rpcinstancemetadata_types.go index 51c539308..b51fc2686 100644 --- a/pkg/core/resource/apis/system/v1alpha1/zoneinsight_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/rpcinstancemetadata_types.go @@ -21,75 +21,72 @@ package v1alpha1 import ( - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Cluster + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) -const ZoneInsightKind coremodel.ResourceKind = "ZoneInsight" +const RpcInstanceMetadataKind coremodel.ResourceKind = "RpcInstanceMetadata" func init() { - coremodel.RegisterResourceSchema(ZoneInsightKind, NewZoneInsightResource) + coremodel.RegisterResourceSchema(RpcInstanceMetadataKind, NewRpcInstanceMetadataResource) } -type ZoneInsightResource struct { - metav1.TypeMeta `json:",inline"` +type RpcInstanceMetadataResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` - // Spec is the specification of the Dubbo ZoneInsight resource. - // +kubebuilder:validation:Optional - Spec *systemproto.ZoneInsight `json:"spec,omitempty"` - // Status is the status of the Dubbo ZoneInsight resource. - Status ZoneInsightResourceStatus `json:"status,omitempty"` + + // Spec is the specification of the Dubbo RPCInstanceMetaData resource. + Spec *meshproto.RPCInstanceMetaData `json:"spec,omitempty"` + + // Status is the status of the Dubbo RpcInstanceMetadata resource. + Status RpcInstanceMetadataResourceStatus `json:"status,omitempty"` } -type ZoneInsightResourceStatus struct { +type RpcInstanceMetadataResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Namespaced -type ZoneInsightResourceList struct { +type RpcInstanceMetadataResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ZoneInsightResource `json:"items"` + Items []RpcInstanceMetadataResource `json:"items"` } -func (r *ZoneInsightResource) ResourceKind() coremodel.ResourceKind { - return ZoneInsightKind +func (r *RpcInstanceMetadataResource) ResourceKind() coremodel.ResourceKind { + return RpcInstanceMetadataKind } -func (r *ZoneInsightResource) MeshName() string { +func (r *RpcInstanceMetadataResource) MeshName() string { return r.Mesh } -func (r *ZoneInsightResource) ResourceKey() string { +func (r *RpcInstanceMetadataResource) ResourceKey() string { return coremodel.BuildResourceKey(r.Mesh, r.Name) } -func (r *ZoneInsightResource) ResourceMeta() metav1.ObjectMeta { +func (r *RpcInstanceMetadataResource) ResourceMeta() metav1.ObjectMeta { return r.ObjectMeta } -func (r *ZoneInsightResource) ResourceSpec() coremodel.ResourceSpec { +func (r *RpcInstanceMetadataResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } -func (r *ZoneInsightResource) DeepCopyObject() k8sruntime.Object { +func (r *RpcInstanceMetadataResource) DeepCopyObject() k8sruntime.Object { if r == nil { return nil } - out := &ZoneInsightResource{ + out := &RpcInstanceMetadataResource{ TypeMeta: r.TypeMeta, Mesh: r.Mesh, Status: r.Status, @@ -98,16 +95,21 @@ func (r *ZoneInsightResource) DeepCopyObject() k8sruntime.Object { r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if r.Spec != nil { - out.Spec = proto.Clone(r.Spec).(*systemproto.ZoneInsight) + spec, ok := proto.Clone(r.Spec).(*meshproto.RPCInstanceMetaData) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec } return out } -func NewZoneInsightResourceWithAttributes(name string, mesh string) *ZoneInsightResource { - return &ZoneInsightResource{ +func NewRpcInstanceMetadataResourceWithAttributes(name string, mesh string) *RpcInstanceMetadataResource { + return &RpcInstanceMetadataResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(ZoneInsightKind), + Kind: string(RpcInstanceMetadataKind), APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ @@ -118,10 +120,10 @@ func NewZoneInsightResourceWithAttributes(name string, mesh string) *ZoneInsight } } -func NewZoneInsightResource() coremodel.Resource { - return &ZoneInsightResource{ +func NewRpcInstanceMetadataResource() coremodel.Resource { + return &RpcInstanceMetadataResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(ZoneInsightKind), + Kind: string(RpcInstanceMetadataKind), APIVersion: "v1alpha1", }, } diff --git a/pkg/core/resource/apis/system/v1alpha1/config_types.go b/pkg/core/resource/apis/mesh/v1alpha1/runtimeinstance_types.go similarity index 54% rename from pkg/core/resource/apis/system/v1alpha1/config_types.go rename to pkg/core/resource/apis/mesh/v1alpha1/runtimeinstance_types.go index 029287553..03e6cb53c 100644 --- a/pkg/core/resource/apis/system/v1alpha1/config_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/runtimeinstance_types.go @@ -21,75 +21,72 @@ package v1alpha1 import ( - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Cluster + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) -const ConfigKind coremodel.ResourceKind = "Config" +const RuntimeInstanceKind coremodel.ResourceKind = "RuntimeInstance" func init() { - coremodel.RegisterResourceSchema(ConfigKind, NewConfigResource) + coremodel.RegisterResourceSchema(RuntimeInstanceKind, NewRuntimeInstanceResource) } -type ConfigResource struct { - metav1.TypeMeta `json:",inline"` +type RuntimeInstanceResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` - // Spec is the specification of the Dubbo Config resource. - // +kubebuilder:validation:Optional - Spec *systemproto.Config `json:"spec,omitempty"` - // Status is the status of the Dubbo Config resource. - Status ConfigResourceStatus `json:"status,omitempty"` + + // Spec is the specification of the Dubbo RuntimeInstance resource. + Spec *meshproto.RuntimeInstance `json:"spec,omitempty"` + + // Status is the status of the Dubbo RuntimeInstance resource. + Status RuntimeInstanceResourceStatus `json:"status,omitempty"` } -type ConfigResourceStatus struct { +type RuntimeInstanceResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Namespaced -type ConfigResourceList struct { +type RuntimeInstanceResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ConfigResource `json:"items"` + Items []RuntimeInstanceResource `json:"items"` } -func (r *ConfigResource) ResourceKind() coremodel.ResourceKind { - return ConfigKind +func (r *RuntimeInstanceResource) ResourceKind() coremodel.ResourceKind { + return RuntimeInstanceKind } -func (r *ConfigResource) MeshName() string { +func (r *RuntimeInstanceResource) MeshName() string { return r.Mesh } -func (r *ConfigResource) ResourceKey() string { +func (r *RuntimeInstanceResource) ResourceKey() string { return coremodel.BuildResourceKey(r.Mesh, r.Name) } -func (r *ConfigResource) ResourceMeta() metav1.ObjectMeta { +func (r *RuntimeInstanceResource) ResourceMeta() metav1.ObjectMeta { return r.ObjectMeta } -func (r *ConfigResource) ResourceSpec() coremodel.ResourceSpec { +func (r *RuntimeInstanceResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } -func (r *ConfigResource) DeepCopyObject() k8sruntime.Object { +func (r *RuntimeInstanceResource) DeepCopyObject() k8sruntime.Object { if r == nil { return nil } - out := &ConfigResource{ + out := &RuntimeInstanceResource{ TypeMeta: r.TypeMeta, Mesh: r.Mesh, Status: r.Status, @@ -98,16 +95,21 @@ func (r *ConfigResource) DeepCopyObject() k8sruntime.Object { r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if r.Spec != nil { - out.Spec = proto.Clone(r.Spec).(*systemproto.Config) + spec, ok := proto.Clone(r.Spec).(*meshproto.RuntimeInstance) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec } return out } -func NewConfigResourceWithAttributes(name string, mesh string) *ConfigResource { - return &ConfigResource{ +func NewRuntimeInstanceResourceWithAttributes(name string, mesh string) *RuntimeInstanceResource { + return &RuntimeInstanceResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(ConfigKind), + Kind: string(RuntimeInstanceKind), APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ @@ -118,10 +120,10 @@ func NewConfigResourceWithAttributes(name string, mesh string) *ConfigResource { } } -func NewConfigResource() coremodel.Resource { - return &ConfigResource{ +func NewRuntimeInstanceResource() coremodel.Resource { + return &RuntimeInstanceResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(ConfigKind), + Kind: string(RuntimeInstanceKind), APIVersion: "v1alpha1", }, } diff --git a/pkg/core/resource/apis/mesh/v1alpha1/service_helper.go b/pkg/core/resource/apis/mesh/v1alpha1/service_helper.go new file mode 100644 index 000000000..1594c23ca --- /dev/null +++ b/pkg/core/resource/apis/mesh/v1alpha1/service_helper.go @@ -0,0 +1,7 @@ +package v1alpha1 + +import "github.com/apache/dubbo-admin/pkg/core/consts" + +func BuildServiceKey(serviceName, version, group string) string { + return serviceName + consts.Colon + version + consts.Colon + group +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/service_types.go b/pkg/core/resource/apis/mesh/v1alpha1/service_types.go index 6e26394d9..364ffed82 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/service_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/service_types.go @@ -21,16 +21,14 @@ package v1alpha1 import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Namespaced + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) const ServiceKind coremodel.ResourceKind = "Service" @@ -39,17 +37,17 @@ func init() { } type ServiceResource struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` + // Spec is the specification of the Dubbo Service resource. - // +kubebuilder:validation:Optional Spec *meshproto.Service `json:"spec,omitempty"` + // Status is the status of the Dubbo Service resource. Status ServiceResourceStatus `json:"status,omitempty"` } @@ -58,8 +56,6 @@ type ServiceResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Cluster type ServiceResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/pkg/core/resource/apis/mesh/v1alpha1/serviceconsumermetadata_types.go b/pkg/core/resource/apis/mesh/v1alpha1/serviceconsumermetadata_types.go new file mode 100644 index 000000000..82a6bf091 --- /dev/null +++ b/pkg/core/resource/apis/mesh/v1alpha1/serviceconsumermetadata_types.go @@ -0,0 +1,130 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by tools/resourcegen +// Run "make generate" to update this file. + +// nolint:whitespace +package v1alpha1 + +import ( + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) + +const ServiceConsumerMetadataKind coremodel.ResourceKind = "ServiceConsumerMetadata" + +func init() { + coremodel.RegisterResourceSchema(ServiceConsumerMetadataKind, NewServiceConsumerMetadataResource) +} + +type ServiceConsumerMetadataResource struct { + metav1.TypeMeta `json:",inline"` + + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Mesh is the name of the dubbo mesh this resource belongs to. + // It may be omitted for cluster-scoped resources. + Mesh string `json:"mesh,omitempty"` + + // Spec is the specification of the Dubbo ServiceConsumerMetadata resource. + Spec *meshproto.ServiceConsumerMetadata `json:"spec,omitempty"` + + // Status is the status of the Dubbo ServiceConsumerMetadata resource. + Status ServiceConsumerMetadataResourceStatus `json:"status,omitempty"` +} + +type ServiceConsumerMetadataResourceStatus struct { + // define resource-specific status here +} + +type ServiceConsumerMetadataResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ServiceConsumerMetadataResource `json:"items"` +} + +func (r *ServiceConsumerMetadataResource) ResourceKind() coremodel.ResourceKind { + return ServiceConsumerMetadataKind +} + +func (r *ServiceConsumerMetadataResource) MeshName() string { + return r.Mesh +} + +func (r *ServiceConsumerMetadataResource) ResourceKey() string { + return coremodel.BuildResourceKey(r.Mesh, r.Name) +} + +func (r *ServiceConsumerMetadataResource) ResourceMeta() metav1.ObjectMeta { + return r.ObjectMeta +} + +func (r *ServiceConsumerMetadataResource) ResourceSpec() coremodel.ResourceSpec { + return r.Spec +} +func (r *ServiceConsumerMetadataResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &ServiceConsumerMetadataResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.ServiceConsumerMetadata) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} + +func NewServiceConsumerMetadataResourceWithAttributes(name string, mesh string) *ServiceConsumerMetadataResource { + return &ServiceConsumerMetadataResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ServiceConsumerMetadataKind), + APIVersion: "v1alpha1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Labels: map[string]string{}, + }, + Mesh: mesh, + } +} + +func NewServiceConsumerMetadataResource() coremodel.Resource { + return &ServiceConsumerMetadataResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ServiceConsumerMetadataKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/system/v1alpha1/secret_types.go b/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermapping_types.go similarity index 51% rename from pkg/core/resource/apis/system/v1alpha1/secret_types.go rename to pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermapping_types.go index 568d7e105..23365fce0 100644 --- a/pkg/core/resource/apis/system/v1alpha1/secret_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermapping_types.go @@ -21,75 +21,72 @@ package v1alpha1 import ( - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Cluster + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) -const SecretKind coremodel.ResourceKind = "Secret" +const ServiceProviderMappingKind coremodel.ResourceKind = "ServiceProviderMapping" func init() { - coremodel.RegisterResourceSchema(SecretKind, NewSecretResource) + coremodel.RegisterResourceSchema(ServiceProviderMappingKind, NewServiceProviderMappingResource) } -type SecretResource struct { - metav1.TypeMeta `json:",inline"` +type ServiceProviderMappingResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` - // Spec is the specification of the Dubbo Secret resource. - // +kubebuilder:validation:Optional - Spec *systemproto.Secret `json:"spec,omitempty"` - // Status is the status of the Dubbo Secret resource. - Status SecretResourceStatus `json:"status,omitempty"` + + // Spec is the specification of the Dubbo ServiceProviderMapping resource. + Spec *meshproto.ServiceProviderMapping `json:"spec,omitempty"` + + // Status is the status of the Dubbo ServiceProviderMapping resource. + Status ServiceProviderMappingResourceStatus `json:"status,omitempty"` } -type SecretResourceStatus struct { +type ServiceProviderMappingResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Namespaced -type SecretResourceList struct { +type ServiceProviderMappingResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []SecretResource `json:"items"` + Items []ServiceProviderMappingResource `json:"items"` } -func (r *SecretResource) ResourceKind() coremodel.ResourceKind { - return SecretKind +func (r *ServiceProviderMappingResource) ResourceKind() coremodel.ResourceKind { + return ServiceProviderMappingKind } -func (r *SecretResource) MeshName() string { +func (r *ServiceProviderMappingResource) MeshName() string { return r.Mesh } -func (r *SecretResource) ResourceKey() string { +func (r *ServiceProviderMappingResource) ResourceKey() string { return coremodel.BuildResourceKey(r.Mesh, r.Name) } -func (r *SecretResource) ResourceMeta() metav1.ObjectMeta { +func (r *ServiceProviderMappingResource) ResourceMeta() metav1.ObjectMeta { return r.ObjectMeta } -func (r *SecretResource) ResourceSpec() coremodel.ResourceSpec { +func (r *ServiceProviderMappingResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } -func (r *SecretResource) DeepCopyObject() k8sruntime.Object { +func (r *ServiceProviderMappingResource) DeepCopyObject() k8sruntime.Object { if r == nil { return nil } - out := &SecretResource{ + out := &ServiceProviderMappingResource{ TypeMeta: r.TypeMeta, Mesh: r.Mesh, Status: r.Status, @@ -98,16 +95,21 @@ func (r *SecretResource) DeepCopyObject() k8sruntime.Object { r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if r.Spec != nil { - out.Spec = proto.Clone(r.Spec).(*systemproto.Secret) + spec, ok := proto.Clone(r.Spec).(*meshproto.ServiceProviderMapping) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec } return out } -func NewSecretResourceWithAttributes(name string, mesh string) *SecretResource { - return &SecretResource{ +func NewServiceProviderMappingResourceWithAttributes(name string, mesh string) *ServiceProviderMappingResource { + return &ServiceProviderMappingResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(SecretKind), + Kind: string(ServiceProviderMappingKind), APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ @@ -118,10 +120,10 @@ func NewSecretResourceWithAttributes(name string, mesh string) *SecretResource { } } -func NewSecretResource() coremodel.Resource { - return &SecretResource{ +func NewServiceProviderMappingResource() coremodel.Resource { + return &ServiceProviderMappingResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(SecretKind), + Kind: string(ServiceProviderMappingKind), APIVersion: "v1alpha1", }, } diff --git a/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermetadata_types.go b/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermetadata_types.go new file mode 100644 index 000000000..ab03f233a --- /dev/null +++ b/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermetadata_types.go @@ -0,0 +1,130 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by tools/resourcegen +// Run "make generate" to update this file. + +// nolint:whitespace +package v1alpha1 + +import ( + "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) + +const ServiceProviderMetadataKind coremodel.ResourceKind = "ServiceProviderMetadata" + +func init() { + coremodel.RegisterResourceSchema(ServiceProviderMetadataKind, NewServiceProviderMetadataResource) +} + +type ServiceProviderMetadataResource struct { + metav1.TypeMeta `json:",inline"` + + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Mesh is the name of the dubbo mesh this resource belongs to. + // It may be omitted for cluster-scoped resources. + Mesh string `json:"mesh,omitempty"` + + // Spec is the specification of the Dubbo ServiceProviderMetaData resource. + Spec *meshproto.ServiceProviderMetaData `json:"spec,omitempty"` + + // Status is the status of the Dubbo ServiceProviderMetadata resource. + Status ServiceProviderMetadataResourceStatus `json:"status,omitempty"` +} + +type ServiceProviderMetadataResourceStatus struct { + // define resource-specific status here +} + +type ServiceProviderMetadataResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ServiceProviderMetadataResource `json:"items"` +} + +func (r *ServiceProviderMetadataResource) ResourceKind() coremodel.ResourceKind { + return ServiceProviderMetadataKind +} + +func (r *ServiceProviderMetadataResource) MeshName() string { + return r.Mesh +} + +func (r *ServiceProviderMetadataResource) ResourceKey() string { + return coremodel.BuildResourceKey(r.Mesh, r.Name) +} + +func (r *ServiceProviderMetadataResource) ResourceMeta() metav1.ObjectMeta { + return r.ObjectMeta +} + +func (r *ServiceProviderMetadataResource) ResourceSpec() coremodel.ResourceSpec { + return r.Spec +} +func (r *ServiceProviderMetadataResource) DeepCopyObject() k8sruntime.Object { + if r == nil { + return nil + } + + out := &ServiceProviderMetadataResource{ + TypeMeta: r.TypeMeta, + Mesh: r.Mesh, + Status: r.Status, + } + + r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + + if r.Spec != nil { + spec, ok := proto.Clone(r.Spec).(*meshproto.ServiceProviderMetaData) + if !ok { + logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) + return out + } + out.Spec = spec + } + + return out +} + +func NewServiceProviderMetadataResourceWithAttributes(name string, mesh string) *ServiceProviderMetadataResource { + return &ServiceProviderMetadataResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ServiceProviderMetadataKind), + APIVersion: "v1alpha1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Labels: map[string]string{}, + }, + Mesh: mesh, + } +} + +func NewServiceProviderMetadataResource() coremodel.Resource { + return &ServiceProviderMetadataResource{ + TypeMeta: metav1.TypeMeta{ + Kind: string(ServiceProviderMetadataKind), + APIVersion: "v1alpha1", + }, + } +} diff --git a/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go b/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go index 1e3d0d230..ab97c424b 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go @@ -21,16 +21,14 @@ package v1alpha1 import ( - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Cluster + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) const TagRouteKind coremodel.ResourceKind = "TagRoute" @@ -39,17 +37,17 @@ func init() { } type TagRouteResource struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string `json:"mesh,omitempty"` + // Spec is the specification of the Dubbo TagRoute resource. - // +kubebuilder:validation:Optional Spec *meshproto.TagRoute `json:"spec,omitempty"` + // Status is the status of the Dubbo TagRoute resource. Status TagRouteResourceStatus `json:"status,omitempty"` } @@ -58,8 +56,6 @@ type TagRouteResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Namespaced type TagRouteResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/pkg/core/resource/apis/system/v1alpha1/datasource_types.go b/pkg/core/resource/apis/system/v1alpha1/datasource_types.go deleted file mode 100644 index 297340c83..000000000 --- a/pkg/core/resource/apis/system/v1alpha1/datasource_types.go +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by tools/resourcegen -// Run "make generate" to update this file. - -// nolint:whitespace -package v1alpha1 - -import ( - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" - "google.golang.org/protobuf/proto" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - k8sruntime "k8s.io/apimachinery/pkg/runtime" -) - -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Cluster - -const DataSourceKind coremodel.ResourceKind = "DataSource" - -func init() { - coremodel.RegisterResourceSchema(DataSourceKind, NewDataSourceResource) -} - -type DataSourceResource struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Mesh is the name of the dubbo mesh this resource belongs to. - // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional - Mesh string `json:"mesh,omitempty"` - // Spec is the specification of the Dubbo DataSource resource. - // +kubebuilder:validation:Optional - Spec *systemproto.DataSource `json:"spec,omitempty"` - // Status is the status of the Dubbo DataSource resource. - Status DataSourceResourceStatus `json:"status,omitempty"` -} - -type DataSourceResourceStatus struct { - // define resource-specific status here -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Namespaced -type DataSourceResourceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []DataSourceResource `json:"items"` -} - -func (r *DataSourceResource) ResourceKind() coremodel.ResourceKind { - return DataSourceKind -} - -func (r *DataSourceResource) MeshName() string { - return r.Mesh -} - -func (r *DataSourceResource) ResourceKey() string { - return coremodel.BuildResourceKey(r.Mesh, r.Name) -} - -func (r *DataSourceResource) ResourceMeta() metav1.ObjectMeta { - return r.ObjectMeta -} - -func (r *DataSourceResource) ResourceSpec() coremodel.ResourceSpec { - return r.Spec -} -func (r *DataSourceResource) DeepCopyObject() k8sruntime.Object { - if r == nil { - return nil - } - - out := &DataSourceResource{ - TypeMeta: r.TypeMeta, - Mesh: r.Mesh, - Status: r.Status, - } - - r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - - if r.Spec != nil { - out.Spec = proto.Clone(r.Spec).(*systemproto.DataSource) - } - - return out -} - -func NewDataSourceResourceWithAttributes(name string, mesh string) *DataSourceResource { - return &DataSourceResource{ - TypeMeta: metav1.TypeMeta{ - Kind: string(DataSourceKind), - APIVersion: "v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Labels: map[string]string{}, - }, - Mesh: mesh, - } -} - -func NewDataSourceResource() coremodel.Resource { - return &DataSourceResource{ - TypeMeta: metav1.TypeMeta{ - Kind: string(DataSourceKind), - APIVersion: "v1alpha1", - }, - } -} diff --git a/pkg/core/resource/apis/system/v1alpha1/zone_types.go b/pkg/core/resource/apis/system/v1alpha1/zone_types.go deleted file mode 100644 index ed44be0d4..000000000 --- a/pkg/core/resource/apis/system/v1alpha1/zone_types.go +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by tools/resourcegen -// Run "make generate" to update this file. - -// nolint:whitespace -package v1alpha1 - -import ( - systemproto "github.com/apache/dubbo-admin/api/system/v1alpha1" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" - "google.golang.org/protobuf/proto" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - k8sruntime "k8s.io/apimachinery/pkg/runtime" -) - -// +kubebuilder:object:root=true -// +kubebuilder:resource:categories=dubbo,scope=Cluster - -const ZoneKind coremodel.ResourceKind = "Zone" - -func init() { - coremodel.RegisterResourceSchema(ZoneKind, NewZoneResource) -} - -type ZoneResource struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Mesh is the name of the dubbo mesh this resource belongs to. - // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional - Mesh string `json:"mesh,omitempty"` - // Spec is the specification of the Dubbo Zone resource. - // +kubebuilder:validation:Optional - Spec *systemproto.Zone `json:"spec,omitempty"` - // Status is the status of the Dubbo Zone resource. - Status ZoneResourceStatus `json:"status,omitempty"` -} - -type ZoneResourceStatus struct { - // define resource-specific status here -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:scope=Namespaced -type ZoneResourceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []ZoneResource `json:"items"` -} - -func (r *ZoneResource) ResourceKind() coremodel.ResourceKind { - return ZoneKind -} - -func (r *ZoneResource) MeshName() string { - return r.Mesh -} - -func (r *ZoneResource) ResourceKey() string { - return coremodel.BuildResourceKey(r.Mesh, r.Name) -} - -func (r *ZoneResource) ResourceMeta() metav1.ObjectMeta { - return r.ObjectMeta -} - -func (r *ZoneResource) ResourceSpec() coremodel.ResourceSpec { - return r.Spec -} -func (r *ZoneResource) DeepCopyObject() k8sruntime.Object { - if r == nil { - return nil - } - - out := &ZoneResource{ - TypeMeta: r.TypeMeta, - Mesh: r.Mesh, - Status: r.Status, - } - - r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - - if r.Spec != nil { - out.Spec = proto.Clone(r.Spec).(*systemproto.Zone) - } - - return out -} - -func NewZoneResourceWithAttributes(name string, mesh string) *ZoneResource { - return &ZoneResource{ - TypeMeta: metav1.TypeMeta{ - Kind: string(ZoneKind), - APIVersion: "v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Labels: map[string]string{}, - }, - Mesh: mesh, - } -} - -func NewZoneResource() coremodel.Resource { - return &ZoneResource{ - TypeMeta: metav1.TypeMeta{ - Kind: string(ZoneKind), - APIVersion: "v1alpha1", - }, - } -} diff --git a/pkg/core/resource/model/page.go b/pkg/core/resource/model/page.go index e83784e83..3b195ce86 100644 --- a/pkg/core/resource/model/page.go +++ b/pkg/core/resource/model/page.go @@ -17,16 +17,49 @@ package model -type PageQuery struct { - PageSize uint32 - CurrentPage uint32 - Page bool +type PageReq struct { + PageOffset int `form:"pageOffset" json:"pageOffset"` + PageSize int `form:"pageSize" json:"pageSize"` } type Pagination struct { - PageSize uint32 - CurrentPage uint32 - Total uint32 - Page bool - NextOffset string + Total int `json:"total"` + PageSize int `json:"pageSize"` + PageOffset int `json:"pageOffset"` +} + +type PageData[T any] struct { + Pagination + Data []T `json:"data"` +} + +func NewPageData[T any](total, pageOffset, pageSize int, data []T) *PageData[T] { + return &PageData[T]{ + Pagination: Pagination{ + Total: total, + PageSize: pageSize, + PageOffset: pageOffset, + }, + Data: data, + } +} + +func (pd *PageData[T]) WithTotal(total int) *PageData[T] { + pd.Total = total + return pd +} + +func (pd *PageData[T]) WithCurPage(curPage int) *PageData[T] { + pd.PageOffset = curPage + return pd +} + +func (pd *PageData[T]) WithPageSize(pageSize int) *PageData[T] { + pd.PageSize = pageSize + return pd +} + +func (pd *PageData[T]) WithData(data []T) *PageData[T] { + pd.Data = data + return pd } diff --git a/pkg/core/resource/model/resource.go b/pkg/core/resource/model/resource.go index c4b538df4..9b1ad52d1 100644 --- a/pkg/core/resource/model/resource.go +++ b/pkg/core/resource/model/resource.go @@ -67,7 +67,7 @@ type Resource interface { ResourceSpec() ResourceSpec } -// BuildResourceKey build a unique identifier for a resource, usually is `mesh/kind/name` +// BuildResourceKey build a unique identifier for a resource, usually is `mesh/name` func BuildResourceKey(mesh string, name string) string { return mesh + separator + name } diff --git a/pkg/core/runtime/builder.go b/pkg/core/runtime/builder.go index a4b6bbb04..68228d3be 100644 --- a/pkg/core/runtime/builder.go +++ b/pkg/core/runtime/builder.go @@ -69,6 +69,7 @@ func BuilderFor(appCtx context.Context, cfg app.AdminConfig) (*Builder, error) { startTime: time.Now(), mode: cfg.Mode, }, + components: make(map[ComponentType]Component), }, nil } diff --git a/pkg/core/runtime/registry.go b/pkg/core/runtime/registry.go index d79ebae31..c5c058e4e 100644 --- a/pkg/core/runtime/registry.go +++ b/pkg/core/runtime/registry.go @@ -21,14 +21,14 @@ import ( "github.com/pkg/errors" ) -var global = NewRegistry() +var registry = NewRegistry() func ComponentRegistry() Registry { - return global + return registry } func RegisterComponent(component Component) { - if err := global.Register(component); err != nil { + if err := registry.Register(component); err != nil { panic(err) } } diff --git a/pkg/core/runtime/runtime.go b/pkg/core/runtime/runtime.go index 8f0acfb21..bf5c865ee 100644 --- a/pkg/core/runtime/runtime.go +++ b/pkg/core/runtime/runtime.go @@ -78,7 +78,6 @@ func (i *runtimeInfo) GetMode() mode.Mode { var _ RuntimeContext = &runtimeContext{} -// TODO add console type runtimeContext struct { cfg app.AdminConfig components map[ComponentType]Component diff --git a/pkg/core/store/component.go b/pkg/core/store/component.go index 13584127c..5f09e8db0 100644 --- a/pkg/core/store/component.go +++ b/pkg/core/store/component.go @@ -23,8 +23,13 @@ import ( coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "github.com/apache/dubbo-admin/pkg/core/runtime" + "github.com/apache/dubbo-admin/pkg/core/store/index" ) +func init() { + runtime.RegisterComponent(newStoreComponent()) +} + type Router interface { ResourceRoute(coremodel.Resource) (ResourceStore, error) ResourceKindRoute(k coremodel.ResourceKind) (ResourceStore, error) @@ -44,6 +49,12 @@ type storeComponent struct { stores map[coremodel.ResourceKind]ManagedResourceStore } +func newStoreComponent() *storeComponent { + return &storeComponent{ + stores: make(map[coremodel.ResourceKind]ManagedResourceStore), + } +} + func (sc *storeComponent) Type() runtime.ComponentType { return runtime.ResourceStore } @@ -72,7 +83,7 @@ func (sc *storeComponent) Init(ctx runtime.BuilderContext) error { } // 3. add indexers for each kind of store for kind, store := range sc.stores { - indexers := IndexersRegistry().Indexers(kind) + indexers := index.IndexersRegistry().Indexers(kind) if indexers == nil { continue } diff --git a/api/system/v1alpha1/zone_insight_helpers.go b/pkg/core/store/index/common.go similarity index 53% rename from api/system/v1alpha1/zone_insight_helpers.go rename to pkg/core/store/index/common.go index 9aa529bee..240bb1e9c 100644 --- a/api/system/v1alpha1/zone_insight_helpers.go +++ b/pkg/core/store/index/common.go @@ -15,13 +15,33 @@ * limitations under the License. */ -package v1alpha1 +package index -func (x *ZoneInsight) IsOnline() bool { - for _, s := range x.GetSubscriptions() { - if s.ConnectTime != nil && s.DisconnectTime == nil { - return true - } +import ( + "reflect" + + "github.com/duke-git/lancet/v2/slice" + "k8s.io/client-go/tools/cache" + + "github.com/apache/dubbo-admin/pkg/common/errors" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) + +const ByMeshIndex = "idx_mesh" + +func init() { + rks := coremodel.ResourceSchemaRegistry().AllResourceKinds() + slice.ForEach(rks, func(_ int, rk coremodel.ResourceKind) { + RegisterIndexers(rk, map[string]cache.IndexFunc{ + ByMeshIndex: ByMesh, + }) + }) +} + +func ByMesh(obj interface{}) ([]string, error) { + r, ok := obj.(coremodel.Resource) + if !ok { + return nil, errors.NewAssertionError("Resource", reflect.TypeOf(obj).Name()) } - return false + return []string{r.MeshName()}, nil } diff --git a/pkg/core/store/index/instance.go b/pkg/core/store/index/instance.go new file mode 100644 index 000000000..e2d4c86fa --- /dev/null +++ b/pkg/core/store/index/instance.go @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package index + +import ( + "reflect" + + "k8s.io/client-go/tools/cache" + + "github.com/apache/dubbo-admin/pkg/common/errors" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" +) + +const ( + ByInstanceAppNameIndex = "idx_instance_app_name" + ByInstanceIpIndex = "idx_instance_ip" +) + +func init() { + RegisterIndexers(meshresource.InstanceKind, map[string]cache.IndexFunc{ + ByInstanceAppNameIndex: byInstanceAppName, + ByInstanceIpIndex: byIp, + }) +} + +func byInstanceAppName(obj interface{}) ([]string, error) { + instance, ok := obj.(*meshresource.InstanceResource) + if !ok { + return nil, errors.NewAssertionError(meshresource.InstanceKind, reflect.TypeOf(obj).Name()) + } + if instance.Spec == nil { + return []string{}, nil + } + return []string{instance.Spec.AppName}, nil +} + +func byIp(obj interface{}) ([]string, error) { + instance, ok := obj.(*meshresource.InstanceResource) + if !ok { + return nil, errors.NewAssertionError(meshresource.InstanceKind, reflect.TypeOf(obj).Name()) + } + if instance.Spec == nil { + return []string{}, nil + } + return []string{instance.Spec.Ip}, nil +} diff --git a/pkg/core/store/index.go b/pkg/core/store/index/registry.go similarity index 99% rename from pkg/core/store/index.go rename to pkg/core/store/index/registry.go index e0b1ffd2b..98f13de6c 100644 --- a/pkg/core/store/index.go +++ b/pkg/core/store/index/registry.go @@ -15,11 +15,12 @@ * limitations under the License. */ -package store +package index import ( - "github.com/apache/dubbo-admin/pkg/core/resource/model" "k8s.io/client-go/tools/cache" + + "github.com/apache/dubbo-admin/pkg/core/resource/model" ) var indexRegistry = newIndexRegistry() diff --git a/api/generic/insights.go b/pkg/core/store/index/service_consumer_metadata.go similarity index 51% rename from api/generic/insights.go rename to pkg/core/store/index/service_consumer_metadata.go index f0f4609ff..a5ce6eed8 100644 --- a/api/generic/insights.go +++ b/pkg/core/store/index/service_consumer_metadata.go @@ -15,43 +15,34 @@ * limitations under the License. */ -package generic +package index import ( - "time" + "reflect" - "google.golang.org/protobuf/proto" -) + "k8s.io/client-go/tools/cache" -func AllSubscriptions[S Subscription, T interface{ GetSubscriptions() []S }](t T) []Subscription { - var subs []Subscription - for _, s := range t.GetSubscriptions() { - subs = append(subs, s) - } - return subs -} + "github.com/apache/dubbo-admin/pkg/common/errors" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" +) -func GetSubscription[S Subscription, T interface{ GetSubscriptions() []S }](t T, id string) Subscription { - for _, s := range t.GetSubscriptions() { - if s.GetId() == id { - return s - } - } - return nil -} +const ( + ByServiceConsumerAppName = "idx_service_consumer_app_name" +) -type Insight interface { - proto.Message - IsOnline() bool - GetSubscription(id string) Subscription - AllSubscriptions() []Subscription - UpdateSubscription(Subscription) error +func init() { + RegisterIndexers(meshresource.ServiceConsumerMetadataKind, map[string]cache.IndexFunc{ + ByServiceConsumerAppName: byServiceConsumerAppName, + }) } -type Subscription interface { - proto.Message - GetId() string - GetGeneration() uint32 - IsOnline() bool - SetDisconnectTime(time time.Time) +func byServiceConsumerAppName(obj interface{}) ([]string, error) { + metadata, ok := obj.(*meshresource.ServiceConsumerMetadataResource) + if !ok { + return nil, errors.NewAssertionError(meshresource.ServiceConsumerMetadataKind, reflect.TypeOf(obj).Name()) + } + if metadata == nil { + return []string{}, nil + } + return []string{metadata.Spec.ConsumerAppName}, nil } diff --git a/api/mesh/v1alpha1/mapping_helper.go b/pkg/core/store/index/service_provider_metadata.go similarity index 50% rename from api/mesh/v1alpha1/mapping_helper.go rename to pkg/core/store/index/service_provider_metadata.go index 8e8e2e7c5..5975150f6 100644 --- a/api/mesh/v1alpha1/mapping_helper.go +++ b/pkg/core/store/index/service_provider_metadata.go @@ -15,4 +15,34 @@ * limitations under the License. */ -package v1alpha1 +package index + +import ( + "reflect" + + "k8s.io/client-go/tools/cache" + + "github.com/apache/dubbo-admin/pkg/common/errors" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" +) + +const ( + ByServiceProviderAppName = "idx_service_provider_app_name" +) + +func init() { + RegisterIndexers(meshresource.ServiceProviderMetadataKind, map[string]cache.IndexFunc{ + ByServiceProviderAppName: byServiceProviderAppName, + }) +} + +func byServiceProviderAppName(obj interface{}) ([]string, error) { + metadata, ok := obj.(*meshresource.ServiceProviderMetadataResource) + if !ok { + return nil, errors.NewAssertionError(meshresource.ServiceProviderMetadataKind, reflect.TypeOf(obj)) + } + if metadata.Spec == nil { + return []string{}, nil + } + return []string{metadata.Spec.ProviderAppName}, nil +} diff --git a/pkg/core/store/store.go b/pkg/core/store/store.go index dd3103cf7..04fc8cf90 100644 --- a/pkg/core/store/store.go +++ b/pkg/core/store/store.go @@ -23,17 +23,19 @@ import ( "reflect" "strings" - "github.com/apache/dubbo-admin/pkg/core/runtime" . "k8s.io/client-go/tools/cache" "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/runtime" ) // ResourceStore defines the interface for the persistance of a resource // ResourceStore expanded the interface of cache.Indexer and cache.Store type ResourceStore interface { Indexer - ListPageByIndex(indexName string, indexValue interface{}, pq model.PageQuery) ([]interface{}, model.Pagination, error) + ListByIndexes(indexes map[string]interface{}) ([]model.Resource, error) + // PageListByIndexes list resources by indexes pageable, indexes is map of index name and index value + PageListByIndexes(indexes map[string]interface{}, pq model.PageReq) (*model.PageData[model.Resource], error) } // ManagedResourceStore includes both functional interfaces and lifecycle interfaces @@ -76,37 +78,6 @@ func IsResourceNotFound(err error) bool { return err != nil && strings.HasPrefix(err.Error(), "Resource not found") } -// AssertionError -type AssertionError struct { - msg string - err error -} - -func ErrorResourceAssertion(msg, rt, name, mesh string) error { - return &AssertionError{ - msg: fmt.Sprintf("%s: type=%q name=%q mesh=%q", msg, rt, name, mesh), - } -} - -func (e *AssertionError) Unwrap() error { - return e.err -} - -func (e *AssertionError) Error() string { - msg := "store assertion failed" - if e.msg != "" { - msg += " " + e.msg - } - if e.err != nil { - msg += fmt.Sprintf("error: %s", e.err) - } - return msg -} - -func (e *AssertionError) Is(err error) bool { - return reflect.TypeOf(e) == reflect.TypeOf(err) -} - type PreconditionError struct { Reason string } diff --git a/scripts/resourcegen/gen.go b/scripts/resourcegen/gen.go index 1cc214c22..3b9b5851d 100644 --- a/scripts/resourcegen/gen.go +++ b/scripts/resourcegen/gen.go @@ -33,7 +33,6 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" _ "github.com/apache/dubbo-admin/api/mesh/v1alpha1" - _ "github.com/apache/dubbo-admin/api/system/v1alpha1" ) // resourceTemplate for creating a Dubbo Resource. @@ -64,96 +63,74 @@ var resourceTemplate = template.Must(template.New("dubbo-resource").Parse(` package v1alpha1 import ( - {{ $pkg }} "github.com/apache/dubbo-admin/api/{{ .Package }}/v1alpha1" - "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" -) + {{ $pkg }} "github.com/apache/dubbo-admin/api/{{ .Package }}/v1alpha1" + "github.com/apache/dubbo-admin/pkg/core/logger" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) {{range .Resources}} -// +kubebuilder:object:root=true -{{- if .ScopeNamespace }} -// +kubebuilder:resource:categories=dubbo,scope=Namespaced -{{- else }} -// +kubebuilder:resource:categories=dubbo,scope=Cluster -{{- end}} -{{- range .AdditionalPrinterColumns }} -// +kubebuilder:printcolumn:{{ . }} -{{- end}} - -const {{.ResourceType}}Kind coremodel.ResourceKind = "{{.ResourceType}}" +const {{.Name}}Kind coremodel.ResourceKind = "{{.Name}}" func init() { - coremodel.RegisterResourceSchema({{.ResourceType}}Kind, New{{.ResourceType}}Resource) + coremodel.RegisterResourceSchema({{.Name}}Kind, New{{.Name}}Resource) } -type {{.ResourceType}}Resource struct { +type {{.Name}}Resource struct { + metav1.TypeMeta {{ $tk }}json:",inline"{{ $tk }} + metav1.ObjectMeta {{ $tk }}json:"metadata,omitempty"{{ $tk }} // Mesh is the name of the dubbo mesh this resource belongs to. // It may be omitted for cluster-scoped resources. - // - // +kubebuilder:validation:Optional Mesh string {{ $tk }}json:"mesh,omitempty"{{ $tk }} -{{- if eq .ResourceType "DataplaneInsight" }} - // Status is the status the dubbo resource. - // +kubebuilder:validation:Optional - Status *apiextensionsv1.JSON {{ $tk }}json:"status,omitempty"{{ $tk }} -{{- else}} // Spec is the specification of the Dubbo {{ .ProtoType }} resource. - // +kubebuilder:validation:Optional - Spec *{{$pkg}}.{{.ResourceType}} {{ $tk }}json:"spec,omitempty"{{ $tk }} -{{- end}} - // Status is the status of the Dubbo {{.ResourceType}} resource. - Status {{.ResourceType}}ResourceStatus {{ $tk }}json:"status,omitempty"{{ $tk }} + Spec *{{$pkg}}.{{.Name}} {{ $tk }}json:"spec,omitempty"{{ $tk }} + + // Status is the status of the Dubbo {{.Name}} resource. + Status {{.Name}}ResourceStatus {{ $tk }}json:"status,omitempty"{{ $tk }} } -type {{.ResourceType}}ResourceStatus struct { +type {{.Name}}ResourceStatus struct { // define resource-specific status here } -// +kubebuilder:object:root=true -{{- if .ScopeNamespace }} -// +kubebuilder:resource:scope=Cluster -{{- else }} -// +kubebuilder:resource:scope=Namespaced -{{- end}} -type {{.ResourceType}}ResourceList struct { +type {{.Name}}ResourceList struct { metav1.TypeMeta {{ $tk }}json:",inline"{{ $tk }} metav1.ListMeta {{ $tk }}json:"metadata,omitempty"{{ $tk }} - Items []{{.ResourceType}}Resource {{ $tk }}json:"items"{{ $tk }} + Items []{{.Name}}Resource {{ $tk }}json:"items"{{ $tk }} } -func (r *{{.ResourceType}}Resource) ResourceKind() coremodel.ResourceKind { - return {{.ResourceType}}Kind +func (r *{{.Name}}Resource) ResourceKind() coremodel.ResourceKind { + return {{.Name}}Kind } -func (r *{{.ResourceType}}Resource) MeshName() string { +func (r *{{.Name}}Resource) MeshName() string { return r.Mesh } -func (r *{{.ResourceType}}Resource) ResourceKey() string { +func (r *{{.Name}}Resource) ResourceKey() string { return coremodel.BuildResourceKey(r.Mesh, r.Name) } -func (r *{{.ResourceType}}Resource) ResourceMeta() metav1.ObjectMeta { +func (r *{{.Name}}Resource) ResourceMeta() metav1.ObjectMeta { return r.ObjectMeta } -func (r *{{.ResourceType}}Resource) ResourceSpec() coremodel.ResourceSpec { +func (r *{{.Name}}Resource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } -func (r *{{.ResourceType}}Resource) DeepCopyObject() k8sruntime.Object { +func (r *{{.Name}}Resource) DeepCopyObject() k8sruntime.Object { if r == nil { return nil } - out := &{{.ResourceType}}Resource{ + out := &{{.Name}}Resource{ TypeMeta: r.TypeMeta, Mesh: r.Mesh, Status: r.Status, @@ -162,7 +139,7 @@ func (r *{{.ResourceType}}Resource) DeepCopyObject() k8sruntime.Object { r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if r.Spec != nil { - spec, ok := proto.Clone(r.Spec).(*{{ $pkg }}.{{.ResourceType}}) + spec, ok := proto.Clone(r.Spec).(*{{ $pkg }}.{{.Name}}) if !ok { logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) return out @@ -173,10 +150,10 @@ func (r *{{.ResourceType}}Resource) DeepCopyObject() k8sruntime.Object { return out } -func New{{.ResourceType}}ResourceWithAttributes(name string, mesh string) *{{.ResourceType}}Resource{ - return &{{.ResourceType}}Resource{ +func New{{.Name}}ResourceWithAttributes(name string, mesh string) *{{.Name}}Resource{ + return &{{.Name}}Resource{ TypeMeta: metav1.TypeMeta{ - Kind: string({{.ResourceType}}Kind), + Kind: string({{.Name}}Kind), APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ @@ -187,10 +164,10 @@ func New{{.ResourceType}}ResourceWithAttributes(name string, mesh string) *{{.Re } } -func New{{.ResourceType}}Resource() coremodel.Resource { - return &{{.ResourceType}}Resource{ +func New{{.Name}}Resource() coremodel.Resource { + return &{{.Name}}Resource{ TypeMeta: metav1.TypeMeta{ - Kind: string({{.ResourceType}}Kind), + Kind: string({{.Name}}Kind), APIVersion: "v1alpha1", }, } @@ -261,24 +238,23 @@ func main() { } for _, resource := range resources { - // 每次只传一个资源到模板中 var buf bytes.Buffer if err := resourceTemplate.Execute(&buf, struct { Package string Resources []ResourceInfo }{ Package: pkg, - Resources: []ResourceInfo{resource}, // 只放一个资源 + Resources: []ResourceInfo{resource}, }); err != nil { - log.Fatalf("template error for %s: %s", resource.ResourceType, err) + log.Fatalf("template error for %s: %s", resource.Name, err) } out, err := format.Source(buf.Bytes()) if err != nil { - log.Fatalf("format error for %s: %s", resource.ResourceType, err) + log.Fatalf("format error for %s: %s", resource.Name, err) } - filename := filepath.Join(outputDir, fmt.Sprintf("%s_types.go", strings.ToLower(resource.ResourceType))) + filename := filepath.Join(outputDir, fmt.Sprintf("%s_types.go", strings.ToLower(resource.Name))) if err := os.WriteFile(filename, out, 0644); err != nil { log.Fatalf("write file error for %s: %s", filename, err) } diff --git a/scripts/resourcegen/util.go b/scripts/resourcegen/util.go index 6ab4acce0..d1fe6f25e 100644 --- a/scripts/resourcegen/util.go +++ b/scripts/resourcegen/util.go @@ -26,7 +26,6 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" "github.com/apache/dubbo-admin/api/mesh" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) // DubboResourceForMessage fetches the Dubbo resource option out of a message. @@ -60,87 +59,22 @@ func SelectorsForMessage(m protoreflect.MessageDescriptor) []string { } type ResourceInfo struct { - ResourceName string - ResourceType string - ProtoType string - Selectors []string - SkipRegistration bool - SkipKubernetesWrappers bool - ScopeNamespace bool - Global bool - DubboctlSingular string - DubboctlPlural string - WsReadOnly bool - WsAdminOnly bool - WsPath string - DdsDirection string - AllowToInspect bool - StorageVersion bool - IsPolicy bool - SingularDisplayName string - PluralDisplayName string - IsExperimental bool - AdditionalPrinterColumns []string - HasInsights bool + Name string + PluralName string + ProtoType string + Selectors []string + IsExperimental bool } func ToResourceInfo(desc protoreflect.MessageDescriptor) ResourceInfo { r := DubboResourceForMessage(desc) out := ResourceInfo{ - ResourceType: r.Type, - ResourceName: r.Name, - ProtoType: string(desc.Name()), - Selectors: SelectorsForMessage(desc), - SkipRegistration: r.SkipRegistration, - SkipKubernetesWrappers: r.SkipKubernetesWrappers, - Global: r.Global, - ScopeNamespace: r.ScopeNamespace, - AllowToInspect: r.AllowToInspect, - StorageVersion: r.StorageVersion, - SingularDisplayName: coremodel.DisplayName(r.Type), - PluralDisplayName: r.PluralDisplayName, - IsExperimental: r.IsExperimental, - AdditionalPrinterColumns: r.AdditionalPrinterColumns, - HasInsights: r.HasInsights, - } - if r.Ws != nil { - pluralResourceName := r.Ws.Plural - if pluralResourceName == "" { - pluralResourceName = r.Ws.Name + "s" - } - out.WsReadOnly = r.Ws.ReadOnly - out.WsAdminOnly = r.Ws.AdminOnly - out.WsPath = pluralResourceName - if !r.Ws.ReadOnly { - out.DubboctlSingular = r.Ws.Name - out.DubboctlPlural = pluralResourceName - // Keep the typo to preserve backward compatibility - if out.DubboctlSingular == "health-check" { - out.DubboctlSingular = "healthcheck" - out.DubboctlPlural = "healthchecks" - } - } - } - if out.PluralDisplayName == "" { - out.PluralDisplayName = coremodel.PluralType(coremodel.DisplayName(r.Type)) - } - // Working around the fact we don't really differentiate policies from the rest of resources: - // Anything global can't be a policy as it need to be on a mesh. Anything with locked Ws config is something internal and therefore not a policy - out.IsPolicy = !out.SkipRegistration && !out.Global && !out.WsAdminOnly && !out.WsReadOnly && out.ResourceType != "Dataplane" && out.ResourceType != "ExternalService" - switch { - case r.Dds == nil || (!r.Dds.SendToZone && !r.Dds.SendToGlobal): - out.DdsDirection = "" - case r.Dds.SendToGlobal && r.Dds.SendToZone: - out.DdsDirection = "model.ZoneToGlobalFlag | model.GlobalToAllButOriginalZoneFlag" - case r.Dds.SendToGlobal: - out.DdsDirection = "model.ZoneToGlobalFlag" - case r.Dds.SendToZone: - out.DdsDirection = "model.GlobalToAllZonesFlag" - } - - if out.ResourceType == "MeshGateway" { - out.DdsDirection = "model.ZoneToGlobalFlag | model.GlobalToAllZonesFlag" + Name: r.Name, + PluralName: r.PluralName, + ProtoType: string(desc.Name()), + Selectors: SelectorsForMessage(desc), + IsExperimental: r.IsExperimental, } if p := desc.Parent(); p != nil { From 90fdfc2b25602379cf7c17314a1edc1a355da682 Mon Sep 17 00:00:00 2001 From: robb Date: Sun, 12 Oct 2025 11:28:15 +0800 Subject: [PATCH 06/40] feat: support memory type of store (#1332) * feat: support memory type of store * fix: muilti indexes should use intersecection * simplify code Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refractor: GetByKeys return a list instead of map --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app/dubbo-admin/dubbo-admin.yaml | 3 +- .../{errors/error.go => bizerror/common.go} | 2 +- pkg/console/handler/configurator_rule.go | 2 +- pkg/console/handler/tag_rule.go | 2 +- pkg/console/service/application.go | 10 +- pkg/console/service/instance.go | 2 +- pkg/console/service/service.go | 2 +- pkg/core/bootstrap/bootstrap.go | 6 - .../memory.go => core/bootstrap/init.go} | 14 +- pkg/core/manager/manager.go | 8 +- pkg/core/manager/manager_helper.go | 14 +- pkg/core/store/factory.go | 10 +- pkg/core/store/index/common.go | 4 +- pkg/core/store/index/instance.go | 6 +- .../store/index/service_consumer_metadata.go | 4 +- .../store/index/service_provider_metadata.go | 4 +- pkg/core/store/store.go | 8 +- pkg/store/memory/factory.go | 40 + pkg/store/memory/store.go | 203 +++++ pkg/store/memory/store_test.go | 777 ++++++++++++++++++ 20 files changed, 1072 insertions(+), 49 deletions(-) rename pkg/common/{errors/error.go => bizerror/common.go} (98%) rename pkg/{store/memory/memory.go => core/bootstrap/init.go} (67%) create mode 100644 pkg/store/memory/factory.go create mode 100644 pkg/store/memory/store.go create mode 100644 pkg/store/memory/store_test.go diff --git a/app/dubbo-admin/dubbo-admin.yaml b/app/dubbo-admin/dubbo-admin.yaml index 8f105ffac..6147444d3 100644 --- a/app/dubbo-admin/dubbo-admin.yaml +++ b/app/dubbo-admin/dubbo-admin.yaml @@ -37,8 +37,7 @@ console: password: dubbo@2025 expirationTime: 3600 store: - type: mysql - address: xx + type: memory discovery: - type: nacos id: nacos-44.33 diff --git a/pkg/common/errors/error.go b/pkg/common/bizerror/common.go similarity index 98% rename from pkg/common/errors/error.go rename to pkg/common/bizerror/common.go index 196386012..1f993c4b6 100644 --- a/pkg/common/errors/error.go +++ b/pkg/common/bizerror/common.go @@ -15,7 +15,7 @@ * limitations under the License. */ -package errors +package bizerror import ( "errors" diff --git a/pkg/console/handler/configurator_rule.go b/pkg/console/handler/configurator_rule.go index 37ed7f803..19280c5ea 100644 --- a/pkg/console/handler/configurator_rule.go +++ b/pkg/console/handler/configurator_rule.go @@ -48,7 +48,7 @@ func ConfiguratorSearch(ctx consolectx.Context) gin.HandlerFunc { pageData, err = manager.PageListByIndexes[*meshresource.DynamicConfigResource]( ctx.ResourceManager(), meshresource.DynamicConfigKind, - map[string]interface{}{ + map[string]string{ index.ByMeshIndex: req.Mesh, }, req.PageReq, diff --git a/pkg/console/handler/tag_rule.go b/pkg/console/handler/tag_rule.go index 6bc1ab89f..7f5756fc6 100644 --- a/pkg/console/handler/tag_rule.go +++ b/pkg/console/handler/tag_rule.go @@ -49,7 +49,7 @@ func TagRuleSearch(ctx consolectx.Context) gin.HandlerFunc { pageData, err = manager.PageListByIndexes[*meshresource.TagRouteResource]( ctx.ResourceManager(), meshresource.TagRouteKind, - map[string]interface{}{ + map[string]string{ index.ByMeshIndex: req.Mesh, }, req.PageReq) diff --git a/pkg/console/service/application.go b/pkg/console/service/application.go index ff7f3500f..d78f512a9 100644 --- a/pkg/console/service/application.go +++ b/pkg/console/service/application.go @@ -35,7 +35,7 @@ func GetApplicationDetail(ctx consolectx.Context, req *model.ApplicationDetailRe instanceResources, err := manager.ListByIndexes[*meshresource.InstanceResource]( ctx.ResourceManager(), meshresource.InstanceKind, - map[string]interface{}{ + map[string]string{ index.ByMeshIndex: req.Mesh, index.ByInstanceAppNameIndex: req.AppName, }, @@ -61,7 +61,7 @@ func GetAppInstanceInfo(ctx consolectx.Context, req *model.ApplicationTabInstanc pageData, err := manager.PageListByIndexes[*meshresource.InstanceResource]( ctx.ResourceManager(), meshresource.InstanceKind, - map[string]interface{}{ + map[string]string{ index.ByMeshIndex: req.Mesh, index.ByInstanceAppNameIndex: req.AppName, }, @@ -117,7 +117,7 @@ func getAppProvideServiceInfo(ctx consolectx.Context, req *model.ApplicationServ pageData, err := manager.PageListByIndexes[*meshresource.ServiceProviderMetadataResource]( ctx.ResourceManager(), meshresource.ServiceProviderMetadataKind, - map[string]interface{}{ + map[string]string{ index.ByMeshIndex: req.Mesh, index.ByServiceProviderAppName: req.AppName, }, @@ -160,7 +160,7 @@ func getAppConsumeServiceInfo(ctx consolectx.Context, req *model.ApplicationServ pageData, err := manager.PageListByIndexes[*meshresource.ServiceConsumerMetadataResource]( ctx.ResourceManager(), meshresource.ServiceConsumerMetadataKind, - map[string]interface{}{ + map[string]string{ index.ByMeshIndex: req.Mesh, index.ByServiceConsumerAppName: req.AppName, }, @@ -239,7 +239,7 @@ func searchApplications( pageData, err = manager.PageListByIndexes[*meshresource.ApplicationResource]( ctx.ResourceManager(), meshresource.ApplicationKind, - map[string]interface{}{ + map[string]string{ index.ByMeshIndex: mesh, }, pageReq, diff --git a/pkg/console/service/instance.go b/pkg/console/service/instance.go index 111a82645..2686390d5 100644 --- a/pkg/console/service/instance.go +++ b/pkg/console/service/instance.go @@ -53,7 +53,7 @@ func SearchInstances(ctx consolectx.Context, req *model.SearchInstanceReq) (*mod pageData, err = manager.PageListByIndexes[*meshresource.InstanceResource]( ctx.ResourceManager(), meshresource.InstanceKind, - map[string]interface{}{ + map[string]string{ index.ByMeshIndex: req.Mesh, }, req.PageReq) diff --git a/pkg/console/service/service.go b/pkg/console/service/service.go index 73f079e65..4ff11e885 100644 --- a/pkg/console/service/service.go +++ b/pkg/console/service/service.go @@ -47,7 +47,7 @@ func SearchServices(ctx consolectx.Context, req *model.ServiceSearchReq) (*model pageData, err = manager.PageListByIndexes[*meshresource.ServiceResource]( ctx.ResourceManager(), meshresource.ServiceKind, - map[string]interface{}{ + map[string]string{ index.ByMeshIndex: req.Mesh, }, req.PageReq, diff --git a/pkg/core/bootstrap/bootstrap.go b/pkg/core/bootstrap/bootstrap.go index 0b8329f23..213c817f6 100644 --- a/pkg/core/bootstrap/bootstrap.go +++ b/pkg/core/bootstrap/bootstrap.go @@ -23,14 +23,8 @@ import ( "github.com/pkg/errors" "github.com/apache/dubbo-admin/pkg/config/app" - _ "github.com/apache/dubbo-admin/pkg/console" - _ "github.com/apache/dubbo-admin/pkg/core/discovery" - _ "github.com/apache/dubbo-admin/pkg/core/engine" - _ "github.com/apache/dubbo-admin/pkg/core/events" "github.com/apache/dubbo-admin/pkg/core/logger" - _ "github.com/apache/dubbo-admin/pkg/core/manager" "github.com/apache/dubbo-admin/pkg/core/runtime" - _ "github.com/apache/dubbo-admin/pkg/core/store" "github.com/apache/dubbo-admin/pkg/diagnostics" ) diff --git a/pkg/store/memory/memory.go b/pkg/core/bootstrap/init.go similarity index 67% rename from pkg/store/memory/memory.go rename to pkg/core/bootstrap/init.go index 80a2c7cda..2fecda05d 100644 --- a/pkg/store/memory/memory.go +++ b/pkg/core/bootstrap/init.go @@ -15,8 +15,14 @@ * limitations under the License. */ -package memory +package bootstrap -import _ "k8s.io/client-go/tools/cache" - -// TODO implement memory resource store, refer to client-go cache.Store +import ( + _ "github.com/apache/dubbo-admin/pkg/console" + _ "github.com/apache/dubbo-admin/pkg/core/discovery" + _ "github.com/apache/dubbo-admin/pkg/core/engine" + _ "github.com/apache/dubbo-admin/pkg/core/events" + _ "github.com/apache/dubbo-admin/pkg/core/manager" + _ "github.com/apache/dubbo-admin/pkg/core/store" + _ "github.com/apache/dubbo-admin/pkg/store/memory" +) diff --git a/pkg/core/manager/manager.go b/pkg/core/manager/manager.go index 3cf8685e7..2ed0a11fa 100644 --- a/pkg/core/manager/manager.go +++ b/pkg/core/manager/manager.go @@ -28,9 +28,9 @@ type ReadOnlyResourceManager interface { // GetByKey returns the resource with the given resource key GetByKey(rk model.ResourceKind, key string) (r model.Resource, exist bool, err error) // ListByIndexes returns the resources with the given indexes, indexes is a map of index name and index value - ListByIndexes(rk model.ResourceKind, indexes map[string]interface{}) ([]model.Resource, error) + ListByIndexes(rk model.ResourceKind, indexes map[string]string) ([]model.Resource, error) // PageListByIndexes page list the resources with the given indexes, indexes is a map of index name and index value - PageListByIndexes(rk model.ResourceKind, indexes map[string]interface{}, pr model.PageReq) (*model.PageData[model.Resource], error) + PageListByIndexes(rk model.ResourceKind, indexes map[string]string, pr model.PageReq) (*model.PageData[model.Resource], error) // PageSearchResourceByConditions page fuzzy search resource by conditions, conditions cannot be empty // TODO support multiple conditions PageSearchResourceByConditions(rk model.ResourceKind, conditions []string, pr model.PageReq) (*model.PageData[model.Resource], error) @@ -74,7 +74,7 @@ func (rm *resourcesManager) GetByKey(rk model.ResourceKind, key string) (r model return item.(model.Resource), exist, err } -func (rm *resourcesManager) ListByIndexes(rk model.ResourceKind, indexes map[string]interface{}) ([]model.Resource, error) { +func (rm *resourcesManager) ListByIndexes(rk model.ResourceKind, indexes map[string]string) ([]model.Resource, error) { rs, err := rm.StoreRouter.ResourceKindRoute(rk) if err != nil { return nil, err @@ -88,7 +88,7 @@ func (rm *resourcesManager) ListByIndexes(rk model.ResourceKind, indexes map[str func (rm *resourcesManager) PageListByIndexes( rk model.ResourceKind, - indexes map[string]interface{}, + indexes map[string]string, pr model.PageReq) (*model.PageData[model.Resource], error) { rs, err := rm.StoreRouter.ResourceKindRoute(rk) diff --git a/pkg/core/manager/manager_helper.go b/pkg/core/manager/manager_helper.go index 7429477f0..ff32ce2a3 100644 --- a/pkg/core/manager/manager_helper.go +++ b/pkg/core/manager/manager_helper.go @@ -20,7 +20,7 @@ package manager import ( "reflect" - "github.com/apache/dubbo-admin/pkg/common/errors" + "github.com/apache/dubbo-admin/pkg/common/bizerror" "github.com/apache/dubbo-admin/pkg/core/resource/model" ) @@ -35,13 +35,13 @@ func GetByKey[T model.Resource](rm ReadOnlyResourceManager, rk model.ResourceKin typedResource, ok := resource.(T) if !ok { var zero T - return zero, false, errors.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) + return zero, false, bizerror.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) } return typedResource, true, nil } // ListByIndexes is a helper function of ResourceManager.ListByIndexes -func ListByIndexes[T model.Resource](rm ReadOnlyResourceManager, rk model.ResourceKind, indexes map[string]interface{}) ([]T, error) { +func ListByIndexes[T model.Resource](rm ReadOnlyResourceManager, rk model.ResourceKind, indexes map[string]string) ([]T, error) { resources, err := rm.ListByIndexes(rk, indexes) if err != nil { return nil, err @@ -51,7 +51,7 @@ func ListByIndexes[T model.Resource](rm ReadOnlyResourceManager, rk model.Resour for i, resource := range resources { typedResource, ok := resource.(T) if !ok { - return nil, errors.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) + return nil, bizerror.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) } typedResources[i] = typedResource } @@ -63,7 +63,7 @@ func ListByIndexes[T model.Resource](rm ReadOnlyResourceManager, rk model.Resour func PageListByIndexes[T model.Resource]( rm ReadOnlyResourceManager, rk model.ResourceKind, - indexes map[string]interface{}, + indexes map[string]string, pr model.PageReq) (*model.PageData[T], error) { pageData, err := rm.PageListByIndexes(rk, indexes, pr) @@ -75,7 +75,7 @@ func PageListByIndexes[T model.Resource]( for i, resource := range pageData.Data { typedResource, ok := resource.(T) if !ok { - return nil, errors.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) + return nil, bizerror.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) } typedResources[i] = typedResource } @@ -105,7 +105,7 @@ func PageSearchResourceByConditions[T model.Resource]( for i, resource := range pageData.Data { typedResource, ok := resource.(T) if !ok { - return nil, errors.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) + return nil, bizerror.NewAssertionError(rk, reflect.TypeOf(typedResource).Name()) } typedResources[i] = typedResource } diff --git a/pkg/core/store/factory.go b/pkg/core/store/factory.go index 09202b23a..e0e9b79ec 100644 --- a/pkg/core/store/factory.go +++ b/pkg/core/store/factory.go @@ -20,7 +20,7 @@ package store import ( "fmt" - "github.com/apache/dubbo-admin/pkg/config/store" + storecfg "github.com/apache/dubbo-admin/pkg/config/store" "github.com/apache/dubbo-admin/pkg/core/resource/model" ) @@ -37,13 +37,13 @@ func FactoryRegistry() Registry { // Factory is the interface for create a specific type of ManagedResourceStore type Factory interface { // Support returns true if the factory supports the given type in config - Support(store.Type) bool + Support(storecfg.Type) bool // New returns a new ManagedResourceStore for the model.ResourceKind using the given config - New(model.ResourceKind, *store.Config) (ManagedResourceStore, error) + New(model.ResourceKind, *storecfg.Config) (ManagedResourceStore, error) } type Registry interface { - GetStoreFactory(store.Type) (Factory, error) + GetStoreFactory(storecfg.Type) (Factory, error) } type RegistryMutator interface { @@ -66,7 +66,7 @@ func newStoreFactoryRegistry() MutableRegistry { factories: make([]Factory, 0), } } -func (s *storeFactoryRegistry) GetStoreFactory(t store.Type) (Factory, error) { +func (s *storeFactoryRegistry) GetStoreFactory(t storecfg.Type) (Factory, error) { for _, factory := range s.factories { if factory.Support(t) { return factory, nil diff --git a/pkg/core/store/index/common.go b/pkg/core/store/index/common.go index 240bb1e9c..f2b69f964 100644 --- a/pkg/core/store/index/common.go +++ b/pkg/core/store/index/common.go @@ -23,7 +23,7 @@ import ( "github.com/duke-git/lancet/v2/slice" "k8s.io/client-go/tools/cache" - "github.com/apache/dubbo-admin/pkg/common/errors" + "github.com/apache/dubbo-admin/pkg/common/bizerror" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) @@ -41,7 +41,7 @@ func init() { func ByMesh(obj interface{}) ([]string, error) { r, ok := obj.(coremodel.Resource) if !ok { - return nil, errors.NewAssertionError("Resource", reflect.TypeOf(obj).Name()) + return nil, bizerror.NewAssertionError("Resource", reflect.TypeOf(obj).Name()) } return []string{r.MeshName()}, nil } diff --git a/pkg/core/store/index/instance.go b/pkg/core/store/index/instance.go index e2d4c86fa..f0bbd3fdf 100644 --- a/pkg/core/store/index/instance.go +++ b/pkg/core/store/index/instance.go @@ -22,7 +22,7 @@ import ( "k8s.io/client-go/tools/cache" - "github.com/apache/dubbo-admin/pkg/common/errors" + "github.com/apache/dubbo-admin/pkg/common/bizerror" meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" ) @@ -41,7 +41,7 @@ func init() { func byInstanceAppName(obj interface{}) ([]string, error) { instance, ok := obj.(*meshresource.InstanceResource) if !ok { - return nil, errors.NewAssertionError(meshresource.InstanceKind, reflect.TypeOf(obj).Name()) + return nil, bizerror.NewAssertionError(meshresource.InstanceKind, reflect.TypeOf(obj).Name()) } if instance.Spec == nil { return []string{}, nil @@ -52,7 +52,7 @@ func byInstanceAppName(obj interface{}) ([]string, error) { func byIp(obj interface{}) ([]string, error) { instance, ok := obj.(*meshresource.InstanceResource) if !ok { - return nil, errors.NewAssertionError(meshresource.InstanceKind, reflect.TypeOf(obj).Name()) + return nil, bizerror.NewAssertionError(meshresource.InstanceKind, reflect.TypeOf(obj).Name()) } if instance.Spec == nil { return []string{}, nil diff --git a/pkg/core/store/index/service_consumer_metadata.go b/pkg/core/store/index/service_consumer_metadata.go index a5ce6eed8..6b5c7fa38 100644 --- a/pkg/core/store/index/service_consumer_metadata.go +++ b/pkg/core/store/index/service_consumer_metadata.go @@ -22,7 +22,7 @@ import ( "k8s.io/client-go/tools/cache" - "github.com/apache/dubbo-admin/pkg/common/errors" + "github.com/apache/dubbo-admin/pkg/common/bizerror" meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" ) @@ -39,7 +39,7 @@ func init() { func byServiceConsumerAppName(obj interface{}) ([]string, error) { metadata, ok := obj.(*meshresource.ServiceConsumerMetadataResource) if !ok { - return nil, errors.NewAssertionError(meshresource.ServiceConsumerMetadataKind, reflect.TypeOf(obj).Name()) + return nil, bizerror.NewAssertionError(meshresource.ServiceConsumerMetadataKind, reflect.TypeOf(obj).Name()) } if metadata == nil { return []string{}, nil diff --git a/pkg/core/store/index/service_provider_metadata.go b/pkg/core/store/index/service_provider_metadata.go index 5975150f6..53f9b8921 100644 --- a/pkg/core/store/index/service_provider_metadata.go +++ b/pkg/core/store/index/service_provider_metadata.go @@ -22,7 +22,7 @@ import ( "k8s.io/client-go/tools/cache" - "github.com/apache/dubbo-admin/pkg/common/errors" + "github.com/apache/dubbo-admin/pkg/common/bizerror" meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" ) @@ -39,7 +39,7 @@ func init() { func byServiceProviderAppName(obj interface{}) ([]string, error) { metadata, ok := obj.(*meshresource.ServiceProviderMetadataResource) if !ok { - return nil, errors.NewAssertionError(meshresource.ServiceProviderMetadataKind, reflect.TypeOf(obj)) + return nil, bizerror.NewAssertionError(meshresource.ServiceProviderMetadataKind, reflect.TypeOf(obj).Name()) } if metadata.Spec == nil { return []string{}, nil diff --git a/pkg/core/store/store.go b/pkg/core/store/store.go index 04fc8cf90..15d2117e0 100644 --- a/pkg/core/store/store.go +++ b/pkg/core/store/store.go @@ -33,9 +33,13 @@ import ( // ResourceStore expanded the interface of cache.Indexer and cache.Store type ResourceStore interface { Indexer - ListByIndexes(indexes map[string]interface{}) ([]model.Resource, error) + // GetByKeys get resources by keys, return list of resource. + // if a resource of specified key doesn't exist in the store, resource list will not include it + GetByKeys(keys []string) ([]model.Resource, error) + // ListByIndexes list resources by indexes, indexes is map of index name and index value + ListByIndexes(indexes map[string]string) ([]model.Resource, error) // PageListByIndexes list resources by indexes pageable, indexes is map of index name and index value - PageListByIndexes(indexes map[string]interface{}, pq model.PageReq) (*model.PageData[model.Resource], error) + PageListByIndexes(indexes map[string]string, pq model.PageReq) (*model.PageData[model.Resource], error) } // ManagedResourceStore includes both functional interfaces and lifecycle interfaces diff --git a/pkg/store/memory/factory.go b/pkg/store/memory/factory.go new file mode 100644 index 000000000..564b32d17 --- /dev/null +++ b/pkg/store/memory/factory.go @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package memory + +import ( + storecfg "github.com/apache/dubbo-admin/pkg/config/store" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/store" +) + +func init() { + store.RegisterFactory(&storeFactory{}) +} + +type storeFactory struct{} + +var _ store.Factory = &storeFactory{} + +func (sf *storeFactory) Support(s storecfg.Type) bool { + return s == storecfg.Memory +} + +func (sf *storeFactory) New(_ coremodel.ResourceKind, _ *storecfg.Config) (store.ManagedResourceStore, error) { + return NewMemoryResourceStore(), nil +} diff --git a/pkg/store/memory/store.go b/pkg/store/memory/store.go new file mode 100644 index 000000000..e522cb06c --- /dev/null +++ b/pkg/store/memory/store.go @@ -0,0 +1,203 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package memory + +import ( + "reflect" + "sort" + + set "github.com/duke-git/lancet/v2/datastructure/set" + "k8s.io/client-go/tools/cache" + + "github.com/apache/dubbo-admin/pkg/common/bizerror" + "github.com/apache/dubbo-admin/pkg/common/util/slices" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/runtime" + "github.com/apache/dubbo-admin/pkg/core/store" +) + +type resourceStore struct { + storeProxy cache.Indexer +} + +var _ store.ManagedResourceStore = &resourceStore{} + +func NewMemoryResourceStore() store.ManagedResourceStore { + return &resourceStore{} +} + +func (rs *resourceStore) Init(_ runtime.BuilderContext) error { + rs.storeProxy = cache.NewIndexer( + func(obj interface{}) (string, error) { + r, ok := obj.(coremodel.Resource) + if !ok { + return "", bizerror.NewAssertionError("Resource", reflect.TypeOf(obj).Name()) + } + return r.ResourceKey(), nil + }, + cache.Indexers{}, + ) + return nil +} + +func (rs *resourceStore) Start(_ runtime.Runtime, _ <-chan struct{}) error { + return nil +} + +func (rs *resourceStore) Add(obj interface{}) error { + return rs.storeProxy.Add(obj) +} + +func (rs *resourceStore) Update(obj interface{}) error { + return rs.storeProxy.Update(obj) +} + +func (rs *resourceStore) Delete(obj interface{}) error { + return rs.storeProxy.Delete(obj) +} + +func (rs *resourceStore) List() []interface{} { + return rs.storeProxy.List() +} + +func (rs *resourceStore) ListKeys() []string { + return rs.storeProxy.ListKeys() +} + +func (rs *resourceStore) Get(obj interface{}) (item interface{}, exists bool, err error) { + return rs.storeProxy.Get(obj) +} + +func (rs *resourceStore) GetByKey(key string) (item interface{}, exists bool, err error) { + return rs.storeProxy.GetByKey(key) +} + +func (rs *resourceStore) Replace(i []interface{}, s string) error { + return rs.storeProxy.Replace(i, s) +} + +func (rs *resourceStore) Resync() error { + return rs.storeProxy.Resync() +} + +func (rs *resourceStore) Index(indexName string, obj interface{}) ([]interface{}, error) { + return rs.storeProxy.Index(indexName, obj) +} + +func (rs *resourceStore) IndexKeys(indexName, indexedValue string) ([]string, error) { + return rs.storeProxy.IndexKeys(indexName, indexedValue) +} + +func (rs *resourceStore) ListIndexFuncValues(indexName string) []string { + return rs.storeProxy.ListIndexFuncValues(indexName) +} + +func (rs *resourceStore) ByIndex(indexName, indexedValue string) ([]interface{}, error) { + return rs.storeProxy.ByIndex(indexName, indexedValue) +} + +func (rs *resourceStore) GetIndexers() cache.Indexers { + return rs.storeProxy.GetIndexers() +} + +func (rs *resourceStore) AddIndexers(newIndexers cache.Indexers) error { + return rs.storeProxy.AddIndexers(newIndexers) +} + +func (rs *resourceStore) GetByKeys(keys []string) ([]coremodel.Resource, error) { + resources := make([]coremodel.Resource, 0) + for _, key := range keys { + r, exists, err := rs.storeProxy.GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + continue + } + res, ok := r.(coremodel.Resource) + if !ok { + return nil, bizerror.NewAssertionError("Resource", reflect.TypeOf(r).Name()) + } + resources = append(resources, res) + } + return resources, nil +} + +func (rs *resourceStore) ListByIndexes(indexes map[string]string) ([]coremodel.Resource, error) { + keys, err := rs.getKeysByIndexes(indexes) + if err != nil { + return nil, err + } + resources, err := rs.GetByKeys(keys) + if err != nil { + return nil, err + } + resources = slices.SortBy(resources, func(r coremodel.Resource) string { + return r.ResourceKey() + }) + return resources, nil +} + +func (rs *resourceStore) PageListByIndexes(indexes map[string]string, pq coremodel.PageReq) (*coremodel.PageData[coremodel.Resource], error) { + keys, err := rs.getKeysByIndexes(indexes) + if err != nil { + return nil, err + } + sort.Strings(keys) + total := len(keys) + resources := make([]coremodel.Resource, 0, pq.PageSize) + for i := pq.PageOffset; len(resources) < pq.PageSize && i < total; i++ { + r, exists, err := rs.storeProxy.GetByKey(keys[i]) + if err != nil { + return nil, err + } + if !exists { + total -= 1 + continue + } + res, ok := r.(coremodel.Resource) + if !ok { + return nil, bizerror.NewAssertionError("Resource", reflect.TypeOf(r).Name()) + } + resources = append(resources, res) + } + pageData := coremodel.NewPageData(total, pq.PageOffset, pq.PageSize, resources) + return pageData, nil +} + +func (rs *resourceStore) getKeysByIndexes(indexes map[string]string) ([]string, error) { + if len(indexes) == 0 { + return []string{}, nil + } + keySet := set.New[string]() + first := true + for indexName, indexValue := range indexes { + keys, err := rs.storeProxy.IndexKeys(indexName, indexValue) + if err != nil { + return nil, err + } + if first { + keySet = set.FromSlice(keys) + first = false + } else { + nextSet := set.FromSlice(keys) + keySet = keySet.Intersection(nextSet) + } + } + return keySet.ToSlice(), nil +} diff --git a/pkg/store/memory/store_test.go b/pkg/store/memory/store_test.go new file mode 100644 index 000000000..f78c88c05 --- /dev/null +++ b/pkg/store/memory/store_test.go @@ -0,0 +1,777 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package memory + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/tools/cache" + + "github.com/apache/dubbo-admin/pkg/core/resource/model" +) + +// mockResource is a mock implementation of model.Resource for testing +type mockResource struct { + kind model.ResourceKind + key string + mesh string + meta metav1.ObjectMeta + spec model.ResourceSpec + objectRef runtime.Object +} + +func (mr *mockResource) GetObjectKind() schema.ObjectKind { + return schema.EmptyObjectKind +} + +func (mr *mockResource) DeepCopyObject() runtime.Object { + return mr.objectRef +} + +func (mr *mockResource) ResourceKind() model.ResourceKind { + return mr.kind +} + +func (mr *mockResource) ResourceKey() string { + return mr.key +} + +func (mr *mockResource) MeshName() string { + return mr.mesh +} + +func (mr *mockResource) ResourceMeta() metav1.ObjectMeta { + return mr.meta +} + +func (mr *mockResource) ResourceSpec() model.ResourceSpec { + return mr.spec +} + +func TestNewMemoryResourceStore(t *testing.T) { + store := NewMemoryResourceStore() + assert.NotNil(t, store) +} + +func TestResourceStore_Init(t *testing.T) { + store := &resourceStore{} + err := store.Init(nil) + assert.NoError(t, err) + assert.NotNil(t, store.storeProxy) +} + +func TestResourceStore_AddAndGet(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create a mock resource + mockRes := &mockResource{ + kind: "TestResource", + key: "test-key", + mesh: "default", + meta: metav1.ObjectMeta{ + Name: "test-resource", + Namespace: "default", + }, + } + + // Add the resource + err = store.Add(mockRes) + assert.NoError(t, err) + + // Get the resource + item, exists, err := store.Get(mockRes) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, mockRes, item) + + // Get by key + item, exists, err = store.GetByKey("test-key") + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, mockRes, item) +} + +func TestResourceStore_Update(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create a mock resource + mockRes := &mockResource{ + kind: "TestResource", + key: "test-key", + mesh: "default", + meta: metav1.ObjectMeta{ + Name: "test-resource", + Namespace: "default", + }, + } + + // Add the resource + err = store.Add(mockRes) + assert.NoError(t, err) + + // Update the resource + updatedRes := &mockResource{ + kind: "TestResource", + key: "test-key", + mesh: "default", + meta: metav1.ObjectMeta{ + Name: "updated-resource", + Namespace: "default", + }, + } + + err = store.Update(updatedRes) + assert.NoError(t, err) + + // Get the updated resource + item, exists, err := store.Get(updatedRes) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, updatedRes, item) + assert.Equal(t, "updated-resource", item.(*mockResource).meta.Name) +} + +func TestResourceStore_Delete(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create a mock resource + mockRes := &mockResource{ + kind: "TestResource", + key: "test-key", + mesh: "default", + meta: metav1.ObjectMeta{ + Name: "test-resource", + Namespace: "default", + }, + } + + // Add the resource + err = store.Add(mockRes) + assert.NoError(t, err) + + // Delete the resource + err = store.Delete(mockRes) + assert.NoError(t, err) + + // Try to get the deleted resource + _, exists, err := store.Get(mockRes) + assert.NoError(t, err) + assert.False(t, exists) +} + +func TestResourceStore_List(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create mock resources + mockRes1 := &mockResource{ + kind: "TestResource", + key: "test-key-1", + mesh: "default", + meta: metav1.ObjectMeta{Name: "test-resource-1"}, + } + + mockRes2 := &mockResource{ + kind: "TestResource", + key: "test-key-2", + mesh: "default", + meta: metav1.ObjectMeta{Name: "test-resource-2"}, + } + + // Add resources + err = store.Add(mockRes1) + assert.NoError(t, err) + err = store.Add(mockRes2) + assert.NoError(t, err) + + // List resources + list := store.List() + assert.Len(t, list, 2) + assert.Contains(t, list, mockRes1) + assert.Contains(t, list, mockRes2) +} + +func TestResourceStore_ListKeys(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create mock resources + mockRes1 := &mockResource{ + kind: "TestResource", + key: "test-key-1", + mesh: "default", + meta: metav1.ObjectMeta{Name: "test-resource-1"}, + } + + mockRes2 := &mockResource{ + kind: "TestResource", + key: "test-key-2", + mesh: "default", + meta: metav1.ObjectMeta{Name: "test-resource-2"}, + } + + // Add resources + err = store.Add(mockRes1) + assert.NoError(t, err) + err = store.Add(mockRes2) + assert.NoError(t, err) + + // List keys + keys := store.ListKeys() + assert.Len(t, keys, 2) + assert.Contains(t, keys, "test-key-1") + assert.Contains(t, keys, "test-key-2") +} + +func TestResourceStore_Replace(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create initial mock resources + mockRes1 := &mockResource{ + kind: "TestResource", + key: "test-key-1", + mesh: "default", + meta: metav1.ObjectMeta{Name: "test-resource-1"}, + } + + mockRes2 := &mockResource{ + kind: "TestResource", + key: "test-key-2", + mesh: "default", + meta: metav1.ObjectMeta{Name: "test-resource-2"}, + } + + // Add resources + err = store.Add(mockRes1) + assert.NoError(t, err) + + // Replace with new set of resources + newResources := []interface{}{mockRes2} + err = store.Replace(newResources, "version-1") + assert.NoError(t, err) + + // Check that only the new resource exists + keys := store.ListKeys() + assert.Len(t, keys, 1) + assert.Contains(t, keys, "test-key-2") + assert.NotContains(t, keys, "test-key-1") +} + +func TestResourceStore_GetByKeys(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create mock resources + mockRes1 := &mockResource{ + kind: "TestResource", + key: "test-key-1", + mesh: "default", + meta: metav1.ObjectMeta{Name: "test-resource-1"}, + } + + mockRes2 := &mockResource{ + kind: "TestResource", + key: "test-key-2", + mesh: "default", + meta: metav1.ObjectMeta{Name: "test-resource-2"}, + } + + // Add only first resource + err = store.Add(mockRes1) + assert.NoError(t, err) + + err = store.Add(mockRes2) + assert.NoError(t, err) + + // Get by multiple keys + keys := []string{"test-key-1", "test-key-2", "test-key-3"} + resources, err := store.GetByKeys(keys) + assert.NoError(t, err) + assert.Len(t, resources, 2) + assert.Equal(t, mockRes1, resources[0]) + assert.Equal(t, mockRes2, resources[1]) +} + +func TestResourceStore_ListByIndexes(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create mock resources + mockRes1 := &mockResource{ + kind: "TestResource", + key: "mesh1/test-key-1", + mesh: "mesh1", + meta: metav1.ObjectMeta{Name: "test-resource-1"}, + } + + mockRes2 := &mockResource{ + kind: "TestResource", + key: "mesh1/test-key-2", + mesh: "mesh1", + meta: metav1.ObjectMeta{Name: "test-resource-2"}, + } + + mockRes3 := &mockResource{ + kind: "TestResource", + key: "mesh2/test-key-3", + mesh: "mesh2", + meta: metav1.ObjectMeta{Name: "test-resource-3"}, + } + + // Add indexers + indexers := map[string]cache.IndexFunc{ + "by-mesh": func(obj interface{}) ([]string, error) { + resource := obj.(model.Resource) + return []string{resource.MeshName()}, nil + }, + } + err = store.AddIndexers(indexers) + assert.NoError(t, err) + + // Add resources + err = store.Add(mockRes1) + assert.NoError(t, err) + err = store.Add(mockRes2) + assert.NoError(t, err) + err = store.Add(mockRes3) + assert.NoError(t, err) + + // List by indexes + indexes := map[string]string{"by-mesh": "mesh1"} + resources, err := store.ListByIndexes(indexes) + assert.NoError(t, err) + assert.Len(t, resources, 2) + // Should be sorted by ResourceKey + assert.Equal(t, mockRes1, resources[0]) + assert.Equal(t, mockRes2, resources[1]) +} + +func TestResourceStore_PageListByIndexes(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create mock resources + mockRes1 := &mockResource{ + kind: "TestResource", + key: "mesh1/test-key-1", + mesh: "mesh1", + meta: metav1.ObjectMeta{Name: "test-resource-1"}, + } + + mockRes2 := &mockResource{ + kind: "TestResource", + key: "mesh1/test-key-2", + mesh: "mesh1", + meta: metav1.ObjectMeta{Name: "test-resource-2"}, + } + + mockRes3 := &mockResource{ + kind: "TestResource", + key: "mesh1/test-key-3", + mesh: "mesh1", + meta: metav1.ObjectMeta{Name: "test-resource-3"}, + } + + // Add indexers + indexers := map[string]cache.IndexFunc{ + "by-mesh": func(obj interface{}) ([]string, error) { + resource := obj.(model.Resource) + return []string{resource.MeshName()}, nil + }, + } + err = store.AddIndexers(indexers) + assert.NoError(t, err) + + // Add resources + err = store.Add(mockRes1) + assert.NoError(t, err) + err = store.Add(mockRes2) + assert.NoError(t, err) + err = store.Add(mockRes3) + assert.NoError(t, err) + + // Page list by indexes + indexes := map[string]string{"by-mesh": "mesh1"} + pageReq := model.PageReq{ + PageOffset: 0, + PageSize: 2, + } + pageData, err := store.PageListByIndexes(indexes, pageReq) + assert.NoError(t, err) + // Total 3 resources + assert.Equal(t, 3, pageData.Total) + // Page offset 0 + assert.Equal(t, 0, pageData.PageOffset) + // Page size 2 + assert.Equal(t, 2, pageData.PageSize) + // 2 items in this page + assert.Len(t, pageData.Data, 2) + // Sorted by key + assert.Equal(t, mockRes1, pageData.Data[0]) + assert.Equal(t, mockRes2, pageData.Data[1]) + + // Second page + pageReq.PageOffset = 2 + pageData, err = store.PageListByIndexes(indexes, pageReq) + assert.NoError(t, err) + // Total still 3 + assert.Equal(t, 3, pageData.Total) + // Page offset 2 + assert.Equal(t, 2, pageData.PageOffset) + // Page size 2 + assert.Equal(t, 2, pageData.PageSize) + // Only 1 item left + assert.Len(t, pageData.Data, 1) + // Last item + assert.Equal(t, mockRes3, pageData.Data[0]) +} + +func TestResourceStore_MultipleIndexes(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create mock resources + mockRes1 := &mockResource{ + kind: "TestApplication", + key: "mesh1/app1", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "app1", + Namespace: "default", + Labels: map[string]string{ + "version": "v1", + "env": "prod", + }, + }, + } + + mockRes2 := &mockResource{ + kind: "TestApplication", + key: "mesh1/app2", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "app2", + Namespace: "default", + Labels: map[string]string{ + "version": "v2", + "env": "prod", + }, + }, + } + + mockRes3 := &mockResource{ + kind: "TestApplication", + key: "mesh2/app3", + mesh: "mesh2", + meta: metav1.ObjectMeta{ + Name: "app3", + Namespace: "default", + Labels: map[string]string{ + "version": "v1", + "env": "dev", + }, + }, + } + + // Add indexers for multiple fields + indexers := map[string]cache.IndexFunc{ + "by-mesh": func(obj interface{}) ([]string, error) { + resource := obj.(model.Resource) + return []string{resource.MeshName()}, nil + }, + "by-version": func(obj interface{}) ([]string, error) { + resource := obj.(model.Resource) + version := resource.ResourceMeta().Labels["version"] + return []string{version}, nil + }, + "by-env": func(obj interface{}) ([]string, error) { + resource := obj.(model.Resource) + env := resource.ResourceMeta().Labels["env"] + return []string{env}, nil + }, + } + err = store.AddIndexers(indexers) + assert.NoError(t, err) + + // Add resources + resources := []model.Resource{mockRes1, mockRes2, mockRes3} + for _, res := range resources { + err = store.Add(res) + assert.NoError(t, err) + } + + // Test multiple indexes - get all prod env resources in mesh1 + indexes := map[string]string{ + "by-mesh": "mesh1", + "by-version": "v1", + } + result, err := store.ListByIndexes(indexes) + assert.NoError(t, err) + assert.Len(t, result, 1) + // Should contain app1 + keys := make([]string, len(result)) + for i, res := range result { + keys[i] = res.ResourceKey() + } + assert.Contains(t, keys, "mesh1/app1") +} + +func TestResourceStore_IndexKeys(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create mock resources + mockRes1 := &mockResource{ + kind: "TestService", + key: "mesh1/service1", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "service1", + Labels: map[string]string{ + "group": "frontend", + }, + }, + } + + mockRes2 := &mockResource{ + kind: "TestService", + key: "mesh1/service2", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "service2", + Labels: map[string]string{ + "group": "backend", + }, + }, + } + + mockRes3 := &mockResource{ + kind: "TestService", + key: "mesh1/service3", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "service3", + Labels: map[string]string{ + "group": "frontend", + }, + }, + } + + // Add indexer + indexers := map[string]cache.IndexFunc{ + "by-group": func(obj interface{}) ([]string, error) { + resource := obj.(model.Resource) + group := resource.ResourceMeta().Labels["group"] + return []string{group}, nil + }, + } + err = store.AddIndexers(indexers) + assert.NoError(t, err) + + // Add resources + resources := []model.Resource{mockRes1, mockRes2, mockRes3} + for _, res := range resources { + err = store.Add(res) + assert.NoError(t, err) + } + + // Test IndexKeys method + keys, err := store.IndexKeys("by-group", "frontend") + assert.NoError(t, err) + assert.Len(t, keys, 2) + assert.Contains(t, keys, "mesh1/service1") + assert.Contains(t, keys, "mesh1/service3") + + keys, err = store.IndexKeys("by-group", "backend") + assert.NoError(t, err) + assert.Len(t, keys, 1) + assert.Contains(t, keys, "mesh1/service2") +} + +func TestResourceStore_ByIndex(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create mock resources + mockRes1 := &mockResource{ + kind: "TestInstance", + key: "mesh1/instance1", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "instance1", + Labels: map[string]string{ + "type": "web", + }, + }, + } + + mockRes2 := &mockResource{ + kind: "TestInstance", + key: "mesh1/instance2", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "instance2", + Labels: map[string]string{ + "type": "database", + }, + }, + } + + // Add indexer + indexers := map[string]cache.IndexFunc{ + "by-type": func(obj interface{}) ([]string, error) { + resource := obj.(model.Resource) + instanceType := resource.ResourceMeta().Labels["type"] + return []string{instanceType}, nil + }, + } + err = store.AddIndexers(indexers) + assert.NoError(t, err) + + // Add resources + err = store.Add(mockRes1) + assert.NoError(t, err) + err = store.Add(mockRes2) + assert.NoError(t, err) + + // Test ByIndex method + items, err := store.ByIndex("by-type", "web") + assert.NoError(t, err) + assert.Len(t, items, 1) + assert.Equal(t, mockRes1, items[0]) + + items, err = store.ByIndex("by-type", "database") + assert.NoError(t, err) + assert.Len(t, items, 1) + assert.Equal(t, mockRes2, items[0]) +} + +func TestResourceStore_GetIndexers(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Initially no indexers + indexers := store.GetIndexers() + assert.Empty(t, indexers) + + // Add indexers + newIndexers := map[string]cache.IndexFunc{ + "by-name": func(obj interface{}) ([]string, error) { + return []string{obj.(model.Resource).ResourceMeta().Name}, nil + }, + "by-kind": func(obj interface{}) ([]string, error) { + return []string{string(obj.(model.Resource).ResourceKind())}, nil + }, + } + err = store.AddIndexers(newIndexers) + assert.NoError(t, err) + + // Check if indexers were added + indexers = store.GetIndexers() + assert.Len(t, indexers, 2) + assert.Contains(t, indexers, "by-name") + assert.Contains(t, indexers, "by-kind") +} + +func TestResourceStore_ListIndexFuncValues(t *testing.T) { + store := NewMemoryResourceStore() + err := store.Init(nil) + assert.NoError(t, err) + + // Create mock resources + mockRes1 := &mockResource{ + kind: "TestResource", + key: "mesh1/resource1", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "resource1", + Labels: map[string]string{ + "status": "active", + }, + }, + } + + mockRes2 := &mockResource{ + kind: "TestResource", + key: "mesh1/resource2", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "resource2", + Labels: map[string]string{ + "status": "inactive", + }, + }, + } + + mockRes3 := &mockResource{ + kind: "TestResource", + key: "mesh1/resource3", + mesh: "mesh1", + meta: metav1.ObjectMeta{ + Name: "resource3", + Labels: map[string]string{ + "status": "active", + }, + }, + } + + // Add indexer + indexers := map[string]cache.IndexFunc{ + "by-status": func(obj interface{}) ([]string, error) { + resource := obj.(model.Resource) + status := resource.ResourceMeta().Labels["status"] + return []string{status}, nil + }, + } + err = store.AddIndexers(indexers) + assert.NoError(t, err) + + // Add resources + resources := []model.Resource{mockRes1, mockRes2, mockRes3} + for _, res := range resources { + err = store.Add(res) + assert.NoError(t, err) + } + + // Test ListIndexFuncValues method + values := store.ListIndexFuncValues("by-status") + assert.Len(t, values, 2) + assert.Contains(t, values, "active") + assert.Contains(t, values, "inactive") +} From ca9fb03b8badb75577397bc9df8b916379eedadc Mon Sep 17 00:00:00 2001 From: robb Date: Sun, 2 Nov 2025 16:59:49 +0800 Subject: [PATCH 07/40] feat: support kubernetes as a backend engine (#1340) * feat: implement runtime engine using kubernetes --- api/mesh/v1alpha1/instance.pb.go | 181 +++++------ api/mesh/v1alpha1/instance.proto | 16 +- api/mesh/v1alpha1/rpc_instance_metadata.pb.go | 38 +-- api/mesh/v1alpha1/rpc_instance_metadata.proto | 6 +- api/mesh/v1alpha1/runtime_instance.pb.go | 282 +++++++++++++++--- api/mesh/v1alpha1/runtime_instance.proto | 39 ++- api/mesh/v1alpha1/runtime_instance_helper.go | 26 ++ .../v1alpha1/service_provider_metadata.pb.go | 28 +- .../v1alpha1/service_provider_metadata.proto | 2 +- app/dubbo-admin/cmd/root.go | 2 - app/dubbo-admin/cmd/run.go | 27 +- app/dubbo-admin/dubbo-admin.yaml | 49 ++- go.mod | 7 + pkg/config/discovery/config.go | 8 +- pkg/config/engine/config.go | 55 +++- pkg/console/component.go | 2 +- pkg/core/bootstrap/init.go | 3 + pkg/core/consts/const.go | 4 + pkg/core/controller/informer.go | 26 +- pkg/core/controller/listwatcher.go | 6 +- pkg/core/discovery/component.go | 30 +- pkg/core/engine/component.go | 111 ++++--- pkg/core/engine/factory.go | 10 +- .../engine/subscriber/runtime_instance.go | 186 ++++++++++++ pkg/core/events/component.go | 44 ++- pkg/core/events/eventbus.go | 29 +- pkg/core/manager/component.go | 2 +- .../apis/mesh/v1alpha1/affinityroute_types.go | 11 + .../apis/mesh/v1alpha1/application_types.go | 11 + .../mesh/v1alpha1/conditionroute_types.go | 11 + .../apis/mesh/v1alpha1/dynamicconfig_types.go | 11 + .../apis/mesh/v1alpha1/instance_types.go | 11 + .../apis/mesh/v1alpha1/rpcinstance_types.go | 11 + .../v1alpha1/rpcinstancemetadata_types.go | 61 ++-- .../mesh/v1alpha1/runtimeinstance_types.go | 11 + .../apis/mesh/v1alpha1/service_types.go | 11 + .../v1alpha1/serviceconsumermetadata_types.go | 11 + .../v1alpha1/serviceprovidermapping_types.go | 11 + .../v1alpha1/serviceprovidermetadata_types.go | 17 +- .../apis/mesh/v1alpha1/tagroute_types.go | 11 + pkg/core/resource/model/resource.go | 2 + pkg/core/runtime/runtime.go | 26 +- pkg/core/store/component.go | 2 +- pkg/core/store/index/registry.go | 24 +- pkg/diagnostics/server.go | 22 +- pkg/discovery/mock/factory.go | 40 +++ pkg/engine/kubernetes/engine.go | 230 ++++++++++++++ pkg/engine/kubernetes/factory.go | 75 +++++ pkg/store/memory/store_test.go | 8 + pkg/store/{db => mysql}/mysql.go | 2 +- scripts/resourcegen/gen.go | 11 + 51 files changed, 1478 insertions(+), 382 deletions(-) create mode 100644 api/mesh/v1alpha1/runtime_instance_helper.go create mode 100644 pkg/core/engine/subscriber/runtime_instance.go create mode 100644 pkg/discovery/mock/factory.go create mode 100644 pkg/engine/kubernetes/engine.go create mode 100644 pkg/engine/kubernetes/factory.go rename pkg/store/{db => mysql}/mysql.go (98%) diff --git a/api/mesh/v1alpha1/instance.pb.go b/api/mesh/v1alpha1/instance.pb.go index fea32bda2..b9e14fa69 100644 --- a/api/mesh/v1alpha1/instance.pb.go +++ b/api/mesh/v1alpha1/instance.pb.go @@ -46,7 +46,8 @@ type Instance struct { WorkloadType string `protobuf:"bytes,56,opt,name=workloadType,proto3" json:"workloadType,omitempty"` WorkloadName string `protobuf:"bytes,57,opt,name=workloadName,proto3" json:"workloadName,omitempty"` Node string `protobuf:"bytes,58,opt,name=node,proto3" json:"node,omitempty"` - Probes []*Instance_Probe `protobuf:"bytes,59,rep,name=probes,proto3" json:"probes,omitempty"` + Probes []*Probe `protobuf:"bytes,59,rep,name=probes,proto3" json:"probes,omitempty"` + Conditions []*Condition `protobuf:"bytes,60,rep,name=conditions,proto3" json:"conditions,omitempty"` } func (x *Instance) Reset() { @@ -212,64 +213,18 @@ func (x *Instance) GetNode() string { return "" } -func (x *Instance) GetProbes() []*Instance_Probe { +func (x *Instance) GetProbes() []*Probe { if x != nil { return x.Probes } return nil } -type Instance_Probe struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` -} - -func (x *Instance_Probe) Reset() { - *x = Instance_Probe{} - mi := &file_api_mesh_v1alpha1_instance_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Instance_Probe) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Instance_Probe) ProtoMessage() {} - -func (x *Instance_Probe) ProtoReflect() protoreflect.Message { - mi := &file_api_mesh_v1alpha1_instance_proto_msgTypes[1] +func (x *Instance) GetConditions() []*Condition { if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Instance_Probe.ProtoReflect.Descriptor instead. -func (*Instance_Probe) Descriptor() ([]byte, []int) { - return file_api_mesh_v1alpha1_instance_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Instance_Probe) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Instance_Probe) GetPort() int32 { - if x != nil { - return x.Port + return x.Conditions } - return 0 + return nil } var File_api_mesh_v1alpha1_instance_proto protoreflect.FileDescriptor @@ -279,59 +234,62 @@ var file_api_mesh_v1alpha1_instance_proto_rawDesc = []byte{ 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xb7, 0x06, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, - 0x12, 0x18, 0x0a, 0x07, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x6f, - 0x73, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x6f, 0x73, - 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, - 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x6e, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x24, - 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x32, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x33, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x34, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x18, 0x35, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x36, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x37, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, - 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x38, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, - 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, - 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x39, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x3a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x3b, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x1a, 0x2f, - 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, + 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x28, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x06, 0x0a, 0x08, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x70, + 0x63, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x70, 0x63, + 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x6f, 0x73, 0x50, 0x6f, 0x72, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x6f, 0x73, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x6e, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, + 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x32, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, + 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x18, 0x33, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x34, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x35, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x36, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x37, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x38, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x39, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, + 0x3a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, + 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x3b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x75, + 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x12, + 0x3e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x3c, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x23, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x1d, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x09, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x20, 0x01, 0x4a, 0x04, 0x08, - 0x0b, 0x10, 0x32, 0x4a, 0x04, 0x08, 0x3c, 0x10, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, + 0x0b, 0x10, 0x32, 0x4a, 0x04, 0x08, 0x3d, 0x10, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, @@ -350,20 +308,22 @@ func file_api_mesh_v1alpha1_instance_proto_rawDescGZIP() []byte { return file_api_mesh_v1alpha1_instance_proto_rawDescData } -var file_api_mesh_v1alpha1_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_api_mesh_v1alpha1_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_api_mesh_v1alpha1_instance_proto_goTypes = []any{ - (*Instance)(nil), // 0: dubbo.mesh.v1alpha1.Instance - (*Instance_Probe)(nil), // 1: dubbo.mesh.v1alpha1.Instance.Probe - nil, // 2: dubbo.mesh.v1alpha1.Instance.TagsEntry + (*Instance)(nil), // 0: dubbo.mesh.v1alpha1.Instance + nil, // 1: dubbo.mesh.v1alpha1.Instance.TagsEntry + (*Probe)(nil), // 2: dubbo.mesh.v1alpha1.Probe + (*Condition)(nil), // 3: dubbo.mesh.v1alpha1.Condition } var file_api_mesh_v1alpha1_instance_proto_depIdxs = []int32{ - 2, // 0: dubbo.mesh.v1alpha1.Instance.tags:type_name -> dubbo.mesh.v1alpha1.Instance.TagsEntry - 1, // 1: dubbo.mesh.v1alpha1.Instance.probes:type_name -> dubbo.mesh.v1alpha1.Instance.Probe - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 1, // 0: dubbo.mesh.v1alpha1.Instance.tags:type_name -> dubbo.mesh.v1alpha1.Instance.TagsEntry + 2, // 1: dubbo.mesh.v1alpha1.Instance.probes:type_name -> dubbo.mesh.v1alpha1.Probe + 3, // 2: dubbo.mesh.v1alpha1.Instance.conditions:type_name -> dubbo.mesh.v1alpha1.Condition + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_api_mesh_v1alpha1_instance_proto_init() } @@ -371,13 +331,14 @@ func file_api_mesh_v1alpha1_instance_proto_init() { if File_api_mesh_v1alpha1_instance_proto != nil { return } + file_api_mesh_v1alpha1_runtime_instance_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_mesh_v1alpha1_instance_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/api/mesh/v1alpha1/instance.proto b/api/mesh/v1alpha1/instance.proto index 33ec87196..b475261c2 100644 --- a/api/mesh/v1alpha1/instance.proto +++ b/api/mesh/v1alpha1/instance.proto @@ -5,6 +5,7 @@ package dubbo.mesh.v1alpha1; option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; import "api/mesh/options.proto"; +import "api/mesh/v1alpha1/runtime_instance.proto"; // Instance is merged from RuntimeInstance and RPCInstance, indicates a runtime entity of a specific dubbo application message Instance { @@ -13,19 +14,14 @@ message Instance { option (dubbo.mesh.resource).package = "mesh"; option (dubbo.mesh.resource).is_experimental = true; - message Probe { - string type = 1; - int32 port = 2; - } + string name = 1; + + string ip = 2; /* FROM RPCInstance */ - string name = 1; - - string ip = 2; - int32 rpcPort = 3; int32 qosPort = 4; @@ -68,5 +64,7 @@ message Instance { repeated Probe probes = 59; - reserved 60 to 100; + repeated Condition conditions = 60; + + reserved 61 to 100; } \ No newline at end of file diff --git a/api/mesh/v1alpha1/rpc_instance_metadata.pb.go b/api/mesh/v1alpha1/rpc_instance_metadata.pb.go index 313601553..117f4ede5 100644 --- a/api/mesh/v1alpha1/rpc_instance_metadata.pb.go +++ b/api/mesh/v1alpha1/rpc_instance_metadata.pb.go @@ -21,7 +21,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type RPCInstanceMetaData struct { +type RPCInstanceMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -32,20 +32,20 @@ type RPCInstanceMetaData struct { Services map[string]*ServiceInfo `protobuf:"bytes,4,rep,name=services,proto3" json:"services,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (x *RPCInstanceMetaData) Reset() { - *x = RPCInstanceMetaData{} +func (x *RPCInstanceMetadata) Reset() { + *x = RPCInstanceMetadata{} mi := &file_api_mesh_v1alpha1_rpc_instance_metadata_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *RPCInstanceMetaData) String() string { +func (x *RPCInstanceMetadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RPCInstanceMetaData) ProtoMessage() {} +func (*RPCInstanceMetadata) ProtoMessage() {} -func (x *RPCInstanceMetaData) ProtoReflect() protoreflect.Message { +func (x *RPCInstanceMetadata) ProtoReflect() protoreflect.Message { mi := &file_api_mesh_v1alpha1_rpc_instance_metadata_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57,26 +57,26 @@ func (x *RPCInstanceMetaData) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RPCInstanceMetaData.ProtoReflect.Descriptor instead. -func (*RPCInstanceMetaData) Descriptor() ([]byte, []int) { +// Deprecated: Use RPCInstanceMetadata.ProtoReflect.Descriptor instead. +func (*RPCInstanceMetadata) Descriptor() ([]byte, []int) { return file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescGZIP(), []int{0} } -func (x *RPCInstanceMetaData) GetApp() string { +func (x *RPCInstanceMetadata) GetApp() string { if x != nil { return x.App } return "" } -func (x *RPCInstanceMetaData) GetRevision() string { +func (x *RPCInstanceMetadata) GetRevision() string { if x != nil { return x.Revision } return "" } -func (x *RPCInstanceMetaData) GetServices() map[string]*ServiceInfo { +func (x *RPCInstanceMetadata) GetServices() map[string]*ServiceInfo { if x != nil { return x.Services } @@ -186,13 +186,13 @@ var file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDesc = []byte{ 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x02, 0x0a, 0x13, 0x52, 0x50, 0x43, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x50, 0x43, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, @@ -201,8 +201,8 @@ var file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDesc = []byte{ 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x37, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x31, 0x0a, 0x13, 0x52, - 0x70, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x14, 0x52, 0x70, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, + 0x50, 0x43, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x14, 0x52, 0x50, 0x43, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x73, 0x1a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x22, 0x96, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, @@ -242,15 +242,15 @@ func file_api_mesh_v1alpha1_rpc_instance_metadata_proto_rawDescGZIP() []byte { var file_api_mesh_v1alpha1_rpc_instance_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_api_mesh_v1alpha1_rpc_instance_metadata_proto_goTypes = []any{ - (*RPCInstanceMetaData)(nil), // 0: dubbo.mesh.v1alpha1.RPCInstanceMetaData + (*RPCInstanceMetadata)(nil), // 0: dubbo.mesh.v1alpha1.RPCInstanceMetadata (*ServiceInfo)(nil), // 1: dubbo.mesh.v1alpha1.ServiceInfo - nil, // 2: dubbo.mesh.v1alpha1.RPCInstanceMetaData.ServicesEntry + nil, // 2: dubbo.mesh.v1alpha1.RPCInstanceMetadata.ServicesEntry nil, // 3: dubbo.mesh.v1alpha1.ServiceInfo.ParamsEntry } var file_api_mesh_v1alpha1_rpc_instance_metadata_proto_depIdxs = []int32{ - 2, // 0: dubbo.mesh.v1alpha1.RPCInstanceMetaData.services:type_name -> dubbo.mesh.v1alpha1.RPCInstanceMetaData.ServicesEntry + 2, // 0: dubbo.mesh.v1alpha1.RPCInstanceMetadata.services:type_name -> dubbo.mesh.v1alpha1.RPCInstanceMetadata.ServicesEntry 3, // 1: dubbo.mesh.v1alpha1.ServiceInfo.params:type_name -> dubbo.mesh.v1alpha1.ServiceInfo.ParamsEntry - 1, // 2: dubbo.mesh.v1alpha1.RPCInstanceMetaData.ServicesEntry.value:type_name -> dubbo.mesh.v1alpha1.ServiceInfo + 1, // 2: dubbo.mesh.v1alpha1.RPCInstanceMetadata.ServicesEntry.value:type_name -> dubbo.mesh.v1alpha1.ServiceInfo 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name diff --git a/api/mesh/v1alpha1/rpc_instance_metadata.proto b/api/mesh/v1alpha1/rpc_instance_metadata.proto index ecccdd2f1..045b6f71b 100644 --- a/api/mesh/v1alpha1/rpc_instance_metadata.proto +++ b/api/mesh/v1alpha1/rpc_instance_metadata.proto @@ -6,9 +6,9 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; import "api/mesh/options.proto"; -message RPCInstanceMetaData { - option (dubbo.mesh.resource).name = "RpcInstanceMetadata"; - option (dubbo.mesh.resource).plural_name = "RpcInstanceMetaDatas"; +message RPCInstanceMetadata { + option (dubbo.mesh.resource).name = "RPCInstanceMetadata"; + option (dubbo.mesh.resource).plural_name = "RPCInstanceMetaDatas"; option (dubbo.mesh.resource).package = "mesh"; option (dubbo.mesh.resource).is_experimental = false; diff --git a/api/mesh/v1alpha1/runtime_instance.pb.go b/api/mesh/v1alpha1/runtime_instance.pb.go index 97e5effc6..8772e5a51 100644 --- a/api/mesh/v1alpha1/runtime_instance.pb.go +++ b/api/mesh/v1alpha1/runtime_instance.pb.go @@ -27,15 +27,19 @@ type RuntimeInstance struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` - Port string `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"` - Image string `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"` - AppName string `protobuf:"bytes,5,opt,name=appName,proto3" json:"appName,omitempty"` - CreateTime string `protobuf:"bytes,6,opt,name=createTime,proto3" json:"createTime,omitempty"` - StartTime string `protobuf:"bytes,7,opt,name=startTime,proto3" json:"startTime,omitempty"` - ReadyTime string `protobuf:"bytes,8,opt,name=readyTime,proto3" json:"readyTime,omitempty"` - RegisterTime string `protobuf:"bytes,9,opt,name=registerTime,proto3" json:"registerTime,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` + Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` + AppName string `protobuf:"bytes,4,opt,name=appName,proto3" json:"appName,omitempty"` + CreateTime string `protobuf:"bytes,5,opt,name=createTime,proto3" json:"createTime,omitempty"` + StartTime string `protobuf:"bytes,6,opt,name=startTime,proto3" json:"startTime,omitempty"` + ReadyTime string `protobuf:"bytes,7,opt,name=readyTime,proto3" json:"readyTime,omitempty"` + Phase string `protobuf:"bytes,8,opt,name=phase,proto3" json:"phase,omitempty"` + WorkloadName string `protobuf:"bytes,9,opt,name=workloadName,proto3" json:"workloadName,omitempty"` + WorkloadType string `protobuf:"bytes,10,opt,name=workloadType,proto3" json:"workloadType,omitempty"` + Node string `protobuf:"bytes,11,opt,name=node,proto3" json:"node,omitempty"` + Probes []*Probe `protobuf:"bytes,12,rep,name=probes,proto3" json:"probes,omitempty"` + Conditions []*Condition `protobuf:"bytes,13,rep,name=conditions,proto3" json:"conditions,omitempty"` } func (x *RuntimeInstance) Reset() { @@ -82,13 +86,6 @@ func (x *RuntimeInstance) GetIp() string { return "" } -func (x *RuntimeInstance) GetPort() string { - if x != nil { - return x.Port - } - return "" -} - func (x *RuntimeInstance) GetImage() string { if x != nil { return x.Image @@ -124,9 +121,175 @@ func (x *RuntimeInstance) GetReadyTime() string { return "" } -func (x *RuntimeInstance) GetRegisterTime() string { +func (x *RuntimeInstance) GetPhase() string { + if x != nil { + return x.Phase + } + return "" +} + +func (x *RuntimeInstance) GetWorkloadName() string { + if x != nil { + return x.WorkloadName + } + return "" +} + +func (x *RuntimeInstance) GetWorkloadType() string { + if x != nil { + return x.WorkloadType + } + return "" +} + +func (x *RuntimeInstance) GetNode() string { + if x != nil { + return x.Node + } + return "" +} + +func (x *RuntimeInstance) GetProbes() []*Probe { + if x != nil { + return x.Probes + } + return nil +} + +func (x *RuntimeInstance) GetConditions() []*Condition { + if x != nil { + return x.Conditions + } + return nil +} + +type Probe struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` +} + +func (x *Probe) Reset() { + *x = Probe{} + mi := &file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Probe) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Probe) ProtoMessage() {} + +func (x *Probe) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Probe.ProtoReflect.Descriptor instead. +func (*Probe) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_runtime_instance_proto_rawDescGZIP(), []int{1} +} + +func (x *Probe) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Probe) GetPort() int32 { + if x != nil { + return x.Port + } + return 0 +} + +// reference: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions +type Condition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + LastTransitionTime string `protobuf:"bytes,3,opt,name=lastTransitionTime,proto3" json:"lastTransitionTime,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` + Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *Condition) Reset() { + *x = Condition{} + mi := &file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Condition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Condition) ProtoMessage() {} + +func (x *Condition) ProtoReflect() protoreflect.Message { + mi := &file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Condition.ProtoReflect.Descriptor instead. +func (*Condition) Descriptor() ([]byte, []int) { + return file_api_mesh_v1alpha1_runtime_instance_proto_rawDescGZIP(), []int{2} +} + +func (x *Condition) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Condition) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Condition) GetLastTransitionTime() string { + if x != nil { + return x.LastTransitionTime + } + return "" +} + +func (x *Condition) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *Condition) GetMessage() string { if x != nil { - return x.RegisterTime + return x.Message } return "" } @@ -139,30 +302,53 @@ var file_api_mesh_v1alpha1_runtime_instance_proto_rawDesc = []byte{ 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x02, 0x0a, 0x0f, 0x52, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x03, 0x0a, 0x0f, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, - 0x69, 0x6d, 0x65, 0x3a, 0x31, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x2b, 0x0a, 0x0f, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x10, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x04, - 0x6d, 0x65, 0x73, 0x68, 0x20, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, - 0x6f, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, + 0x68, 0x61, 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, + 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x32, 0x0a, + 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, + 0x73, 0x12, 0x3e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x3a, 0x31, 0xaa, 0x8c, 0x89, 0xa6, 0x01, 0x2b, 0x0a, 0x0f, 0x52, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x10, 0x52, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x04, 0x6d, 0x65, + 0x73, 0x68, 0x20, 0x01, 0x22, 0x2f, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x2e, 0x0a, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x61, 0x73, + 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2d, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -177,16 +363,20 @@ func file_api_mesh_v1alpha1_runtime_instance_proto_rawDescGZIP() []byte { return file_api_mesh_v1alpha1_runtime_instance_proto_rawDescData } -var file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_api_mesh_v1alpha1_runtime_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_api_mesh_v1alpha1_runtime_instance_proto_goTypes = []any{ (*RuntimeInstance)(nil), // 0: dubbo.mesh.v1alpha1.RuntimeInstance + (*Probe)(nil), // 1: dubbo.mesh.v1alpha1.Probe + (*Condition)(nil), // 2: dubbo.mesh.v1alpha1.Condition } var file_api_mesh_v1alpha1_runtime_instance_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 1, // 0: dubbo.mesh.v1alpha1.RuntimeInstance.probes:type_name -> dubbo.mesh.v1alpha1.Probe + 2, // 1: dubbo.mesh.v1alpha1.RuntimeInstance.conditions:type_name -> dubbo.mesh.v1alpha1.Condition + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_api_mesh_v1alpha1_runtime_instance_proto_init() } @@ -200,7 +390,7 @@ func file_api_mesh_v1alpha1_runtime_instance_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_mesh_v1alpha1_runtime_instance_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/api/mesh/v1alpha1/runtime_instance.proto b/api/mesh/v1alpha1/runtime_instance.proto index 9e4d08dea..65abb130c 100644 --- a/api/mesh/v1alpha1/runtime_instance.proto +++ b/api/mesh/v1alpha1/runtime_instance.proto @@ -17,17 +17,44 @@ message RuntimeInstance { string ip = 2; - string port = 3; + string image = 3; - string image = 4; + string appName = 4; - string appName = 5; + string createTime = 5; - string createTime = 6; + string startTime = 6; - string startTime = 7; + string readyTime = 7; - string readyTime = 8; + string phase = 8; + string workloadName = 9; + string workloadType = 10; + + string node = 11; + + repeated Probe probes = 12; + + repeated Condition conditions = 13; +} + +message Probe { + string type = 1; + int32 port = 2; +} + +// reference: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions +message Condition{ + + string type = 1; + + string status = 2; + + string lastTransitionTime = 3; + + string reason = 4; + + string message = 5; } \ No newline at end of file diff --git a/api/mesh/v1alpha1/runtime_instance_helper.go b/api/mesh/v1alpha1/runtime_instance_helper.go new file mode 100644 index 000000000..c69c002a6 --- /dev/null +++ b/api/mesh/v1alpha1/runtime_instance_helper.go @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package v1alpha1 + +const ( + LivenessProbe = "liveness" + ReadinessProbe = "readiness" + StartupProbe = "startup" +) + +const InstanceTerminating = "Terminating" diff --git a/api/mesh/v1alpha1/service_provider_metadata.pb.go b/api/mesh/v1alpha1/service_provider_metadata.pb.go index f81530b0b..73a3bd3cb 100644 --- a/api/mesh/v1alpha1/service_provider_metadata.pb.go +++ b/api/mesh/v1alpha1/service_provider_metadata.pb.go @@ -21,7 +21,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type ServiceProviderMetaData struct { +type ServiceProviderMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -32,20 +32,20 @@ type ServiceProviderMetaData struct { Group string `protobuf:"bytes,4,opt,name=group,proto3" json:"group,omitempty"` // TODO add more fields } -func (x *ServiceProviderMetaData) Reset() { - *x = ServiceProviderMetaData{} +func (x *ServiceProviderMetadata) Reset() { + *x = ServiceProviderMetadata{} mi := &file_api_mesh_v1alpha1_service_provider_metadata_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ServiceProviderMetaData) String() string { +func (x *ServiceProviderMetadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ServiceProviderMetaData) ProtoMessage() {} +func (*ServiceProviderMetadata) ProtoMessage() {} -func (x *ServiceProviderMetaData) ProtoReflect() protoreflect.Message { +func (x *ServiceProviderMetadata) ProtoReflect() protoreflect.Message { mi := &file_api_mesh_v1alpha1_service_provider_metadata_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57,33 +57,33 @@ func (x *ServiceProviderMetaData) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ServiceProviderMetaData.ProtoReflect.Descriptor instead. -func (*ServiceProviderMetaData) Descriptor() ([]byte, []int) { +// Deprecated: Use ServiceProviderMetadata.ProtoReflect.Descriptor instead. +func (*ServiceProviderMetadata) Descriptor() ([]byte, []int) { return file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescGZIP(), []int{0} } -func (x *ServiceProviderMetaData) GetServiceName() string { +func (x *ServiceProviderMetadata) GetServiceName() string { if x != nil { return x.ServiceName } return "" } -func (x *ServiceProviderMetaData) GetProviderAppName() string { +func (x *ServiceProviderMetadata) GetProviderAppName() string { if x != nil { return x.ProviderAppName } return "" } -func (x *ServiceProviderMetaData) GetVersion() string { +func (x *ServiceProviderMetadata) GetVersion() string { if x != nil { return x.Version } return "" } -func (x *ServiceProviderMetaData) GetGroup() string { +func (x *ServiceProviderMetadata) GetGroup() string { if x != nil { return x.Group } @@ -100,7 +100,7 @@ var file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDesc = []byte{ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, + 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x70, 0x70, 0x4e, 0x61, 0x6d, @@ -133,7 +133,7 @@ func file_api_mesh_v1alpha1_service_provider_metadata_proto_rawDescGZIP() []byte var file_api_mesh_v1alpha1_service_provider_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_api_mesh_v1alpha1_service_provider_metadata_proto_goTypes = []any{ - (*ServiceProviderMetaData)(nil), // 0: dubbo.mesh.v1alpha1.ServiceProviderMetaData + (*ServiceProviderMetadata)(nil), // 0: dubbo.mesh.v1alpha1.ServiceProviderMetadata } var file_api_mesh_v1alpha1_service_provider_metadata_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/api/mesh/v1alpha1/service_provider_metadata.proto b/api/mesh/v1alpha1/service_provider_metadata.proto index df402ff06..abbf4a267 100644 --- a/api/mesh/v1alpha1/service_provider_metadata.proto +++ b/api/mesh/v1alpha1/service_provider_metadata.proto @@ -6,7 +6,7 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1"; import "api/mesh/options.proto"; -message ServiceProviderMetaData { +message ServiceProviderMetadata { option (dubbo.mesh.resource).name = "ServiceProviderMetadata"; option (dubbo.mesh.resource).plural_name = "ServiceProviderMetaDatas"; option (dubbo.mesh.resource).package = "mesh"; diff --git a/app/dubbo-admin/cmd/root.go b/app/dubbo-admin/cmd/root.go index 363d1c775..e49deda3a 100644 --- a/app/dubbo-admin/cmd/root.go +++ b/app/dubbo-admin/cmd/root.go @@ -30,8 +30,6 @@ import ( "github.com/apache/dubbo-admin/pkg/core/cmd/version" ) -var adminLog = core.Log.WithName("admin") - // newRootCmd represents the base command when called without any subcommands. func newRootCmd() *cobra.Command { args := struct { diff --git a/app/dubbo-admin/cmd/run.go b/app/dubbo-admin/cmd/run.go index 6bd94b9c9..67e14f4c5 100644 --- a/app/dubbo-admin/cmd/run.go +++ b/app/dubbo-admin/cmd/run.go @@ -18,7 +18,6 @@ package cmd import ( - "fmt" "time" "github.com/spf13/cobra" @@ -27,11 +26,10 @@ import ( "github.com/apache/dubbo-admin/pkg/config/app" "github.com/apache/dubbo-admin/pkg/core/bootstrap" dubbocmd "github.com/apache/dubbo-admin/pkg/core/cmd" + "github.com/apache/dubbo-admin/pkg/core/logger" dubboversion "github.com/apache/dubbo-admin/pkg/version" ) -var runLog = adminLog.WithName("run") - const gracefullyShutdownDuration = 3 * time.Second // This is the open file limit below which the control plane may not @@ -51,44 +49,43 @@ func newRunCmdWithOpts(opts dubbocmd.RunCmdOpts) *cobra.Command { cfg := app.DefaultAdminConfig() err := config.Load(args.configPath, &cfg) if err != nil { - runLog.Error(err, "could not load the configuration") + logger.Errorf("could not load the configuration, err: %s", err.Error()) return err } cfgForDisplay, err := config.ConfigForDisplay(&cfg) if err != nil { - runLog.Error(err, "unable to prepare config for display") + logger.Errorf("unable to prepare config for display, err: %s", err.Error()) return err } cfgBytes, err := config.ToJson(cfgForDisplay) if err != nil { - runLog.Error(err, "unable to convert config to json") + logger.Errorf("unable to convert config to json, err: %s", err.Error()) return err } - runLog.Info(fmt.Sprintf("Current config %s", cfgBytes)) - runLog.Info(fmt.Sprintf("Running in mode `%s`", cfg.Mode)) + logger.Infof("Current config %s", cfgBytes) + logger.Infof("Running in mode `%s`", cfg.Mode) // 2. build components gracefulCtx, ctx := opts.SetupSignalHandler() rt, err := bootstrap.Bootstrap(gracefulCtx, cfg) if err != nil { - runLog.Error(err, "unable to bootstrap") + logger.Errorf("unable to bootstrap, err: %s", err.Error()) return err } // 3. start components - runLog.Info("starting Admin......", "version", dubboversion.Build.Version) + logger.Infof("starting Admin......, version: %s", dubboversion.Build.Version) if err := rt.Start(gracefulCtx.Done()); err != nil { - runLog.Error(err, "problem running Admin") + logger.Errorf("problem running Admin, err: %s", err.Error()) return err } - - runLog.Info("stop signal received. Waiting 3 seconds for components to stop gracefully...") + logger.Info("stop signal received. Waiting 3 seconds for components to stop gracefully...") select { case <-ctx.Done(): - runLog.Info("all components have stopped") + logger.Info("all components have stopped") case <-time.After(gracefullyShutdownDuration): - runLog.Info("forcefully stopped") + logger.Info("forcefully stopped") } return nil }, diff --git a/app/dubbo-admin/dubbo-admin.yaml b/app/dubbo-admin/dubbo-admin.yaml index 6147444d3..932304ea8 100644 --- a/app/dubbo-admin/dubbo-admin.yaml +++ b/app/dubbo-admin/dubbo-admin.yaml @@ -45,11 +45,54 @@ discovery: registry: nacos://47.76.94.134:8848?username=nacos&password=nacos configCenter: nacos://47.76.94.134:8848?username=nacos&password=nacos metadataReport: nacos://47.76.94.134:8848?username=nacos&password=nacos - - type: istio + + - type: etcd + id: etcd-44.33 + address: http://127.0.0.1:2379 + + # mock discovery is only for development + - type: mock engine: name: k8s1.28.6 type: kubernetes properties: - apiServerAddress: https://192.168.1.1:6443 - kubeConfig: /etc/kubernetes/admin.conf + # [Kubernetes] Path to kubernetes config file, if not set, will use in cluster config + kubeConfigPath: /root/.kube/config + # [Kubernetes] Watch pods with specified labels, if not set, will watch all pods + # podWatchSelector: org.apache.dubbo/dubbo-apps=true + # [Kubernetes] Identify which Dubbo app the pod belongs to, if not set, [type = ByIP] will be used + # 1. ByLabels: Use the label value corresponding to the labelKey as the dubbo app name + # e.g. + # type: ByLabel + # labelKey: org.apache.dubbo/dubbo-app-name + # 2. ByAnnotation: Use the annotation value corresponding to the annotationKey as the dubbo app name + # e.g. + # type: ByAnnotation + # annotationKey: org.apache.dubbo/dubbo-app-name + # 3. ByIP(default): Use pod's IP to find if there is a same ip of an instance and use the instance's app name as the identifier, + # if there is no such association, the pod will not be seen as a pod of dubbo application. + # e.g. + # type: ByIP +# dubboAppIdentifier: +# type: ByLabel +# labelKey: org.apache.dubbo/dubbo-app-name + # [Kubernetes] Strategy of choosing the main container, if not set, [type = ByIndex] and [index = 0] will be used + # 1. ByLast: choose the last container as the main container + # e.g. + # type: ByLast + # 2. ByIndex(default): choose the container at the specified index location as the main container + # e.g. + # type: ByIndex + # index: 0 + # 3. ByName: choose the container with the specified name + # e.g. + # type: ByName + # name: main + # 4. ByAnnotation: choose the container with the annotation key, specified annotation value will be used as the container name + # e.g. + # type: ByAnnotation + # annotationKey: org.apache.dubbo/main-container-name=${app-name} + mainContainerChooseStrategy: + type: ByIndex + index: 0 controlPlane: \ No newline at end of file diff --git a/go.mod b/go.mod index 049253545..c60caef17 100644 --- a/go.mod +++ b/go.mod @@ -55,6 +55,7 @@ require ( google.golang.org/grpc v1.73.0 google.golang.org/protobuf v1.36.6 gopkg.in/natefinch/lumberjack.v2 v2.2.1 + k8s.io/api v0.32.0 k8s.io/apimachinery v0.32.0 k8s.io/client-go v0.32.0 k8s.io/klog/v2 v2.130.1 @@ -78,7 +79,9 @@ require ( github.com/gabriel-vasile/mimetype v1.4.8 // indirect github.com/gin-contrib/sse v1.0.0 // indirect github.com/go-jose/go-jose/v4 v4.0.5 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.26.0 // indirect @@ -92,9 +95,11 @@ require ( github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/sessions v1.4.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/leodido/go-urn v1.4.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -121,9 +126,11 @@ require ( golang.org/x/tools v0.28.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect diff --git a/pkg/config/discovery/config.go b/pkg/config/discovery/config.go index e748ff235..fe4dfd002 100644 --- a/pkg/config/discovery/config.go +++ b/pkg/config/discovery/config.go @@ -22,8 +22,10 @@ import "github.com/apache/dubbo-admin/pkg/config" type Type string const ( - zookeeper Type = "zookeeper" - nacos Type = "nacos" + Zookeeper Type = "zookeeper" + Nacos Type = "nacos" + // Mock is only for develop and test + Mock Type = "mock" ) // Config defines Discovery configuration @@ -44,7 +46,7 @@ type AddressConfig struct { func DefaultDiscoveryEnginConfig() *Config { return &Config{ Name: "localhost", - Type: nacos, + Type: Nacos, Address: AddressConfig{ Registry: "nacos://127.0.0.1:8848?username=nacos&password=nacos", ConfigCenter: "nacos://127.0.0.1:8848?username=nacos&password=nacos", diff --git a/pkg/config/engine/config.go b/pkg/config/engine/config.go index 706404f32..299620edc 100644 --- a/pkg/config/engine/config.go +++ b/pkg/config/engine/config.go @@ -28,15 +28,62 @@ const ( type Config struct { config.BaseConfig - Name string `json:"name"` - Type Type `json:"type"` - Properties map[string]string `json:"properties"` + Name string `json:"name"` + Type Type `json:"type"` + Properties Properties `json:"properties"` +} + +type Properties struct { + KubeConfigPath string `json:"kubeConfigPath"` + PodWatchSelector string `json:"podWatchSelector"` + DubboAppIdentifier *DubboAppIdentifier `json:"dubboAppIdentifier"` + MainContainerChooseStrategy *MainContainerChooseStrategy `json:"mainContainerChooseStrategy"` +} + +func (p *Properties) GetOrDefaultMainContainerChooseStrategy() *MainContainerChooseStrategy { + if p.MainContainerChooseStrategy == nil { + return &MainContainerChooseStrategy{ + Type: ChooseByIndex, + Index: 0, + } + } + return p.MainContainerChooseStrategy +} + +type MainContainerChooseStrategyType string + +const ( + ChooseByLast MainContainerChooseStrategyType = "ByLast" + ChooseByIndex MainContainerChooseStrategyType = "ByIndex" + ChooseByName MainContainerChooseStrategyType = "ByName" + ChooseByAnnotation MainContainerChooseStrategyType = "ByAnnotation" +) + +type MainContainerChooseStrategy struct { + Type MainContainerChooseStrategyType `json:"type"` + Index int `json:"index"` + Name string `json:"name"` + AnnotationKey string `json:"annotationKey"` +} + +type DubboAppIdentifierType string + +const ( + IdentifyByLabel DubboAppIdentifierType = "ByLabel" + IdentifyByAnnotation DubboAppIdentifierType = "ByAnnotation" + IdentifyByIP DubboAppIdentifierType = "ByIP" +) + +type DubboAppIdentifier struct { + Type DubboAppIdentifierType `json:"type"` + LabelKey string `json:"labelKey"` + AnnotationKey string `json:"annotationKey"` } func DefaultResourceEngineConfig() *Config { return &Config{ Name: "default", Type: VM, - Properties: map[string]string{}, + Properties: Properties{}, } } diff --git a/pkg/console/component.go b/pkg/console/component.go index fd4f94db8..1672b95f0 100644 --- a/pkg/console/component.go +++ b/pkg/console/component.go @@ -53,7 +53,7 @@ func (c *consoleWebServer) Type() runtime.ComponentType { } func (c *consoleWebServer) Order() int { - return math.MaxInt + return math.MaxInt - 5 } func (c *consoleWebServer) Init(ctx runtime.BuilderContext) error { diff --git a/pkg/core/bootstrap/init.go b/pkg/core/bootstrap/init.go index 2fecda05d..32d94f36c 100644 --- a/pkg/core/bootstrap/init.go +++ b/pkg/core/bootstrap/init.go @@ -17,6 +17,7 @@ package bootstrap +// import all components registered by init function import ( _ "github.com/apache/dubbo-admin/pkg/console" _ "github.com/apache/dubbo-admin/pkg/core/discovery" @@ -24,5 +25,7 @@ import ( _ "github.com/apache/dubbo-admin/pkg/core/events" _ "github.com/apache/dubbo-admin/pkg/core/manager" _ "github.com/apache/dubbo-admin/pkg/core/store" + _ "github.com/apache/dubbo-admin/pkg/discovery/mock" + _ "github.com/apache/dubbo-admin/pkg/engine/kubernetes" _ "github.com/apache/dubbo-admin/pkg/store/memory" ) diff --git a/pkg/core/consts/const.go b/pkg/core/consts/const.go index 785c84f4a..0bacadee1 100644 --- a/pkg/core/consts/const.go +++ b/pkg/core/consts/const.go @@ -101,3 +101,7 @@ const ( NotEqual = "!=" Equal = "=" ) + +const ( + TimeFormatStr = "2006-01-02 15:04:05" +) diff --git a/pkg/core/controller/informer.go b/pkg/core/controller/informer.go index 28cf884bf..e2ab13937 100644 --- a/pkg/core/controller/informer.go +++ b/pkg/core/controller/informer.go @@ -43,6 +43,17 @@ type Informer interface { // Adding event handlers to already stopped informers is not possible. // An informer already stopped will never be started again. IsStopped() bool + + // SetTransform The TransformFunc is called for each object which is about to be stored. + // + // This function is intended for you to take the opportunity to + // remove, transform, or normalize fields. One use case is to strip unused + // metadata fields out of objects to save on RAM cost. + // + // Must be set before starting the informer. + // + // Please see the comment on TransformFunc for more details. + SetTransform(handler cache.TransformFunc) error } // Options configures an informer. @@ -91,13 +102,11 @@ type informer struct { transform cache.TransformFunc } -func NewInformerWithOptions(lw cache.ListerWatcher, emitter events.Emitter, store store.ResourceStore, - exampleObject runtime.Object, options Options) Informer { +func NewInformerWithOptions(lw cache.ListerWatcher, emitter events.Emitter, store store.ResourceStore, options Options) Informer { return &informer{ indexer: store, listerWatcher: lw, emitter: emitter, - objectType: exampleObject, resyncCheckPeriod: options.ResyncPeriod, } } @@ -126,6 +135,17 @@ func (s *informer) SetTransform(handler cache.TransformFunc) error { return nil } +func (s *informer) SetObjectType(objectType runtime.Object) error { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.started { + return fmt.Errorf("informer has already started") + } + s.objectType = objectType + return nil +} + func (s *informer) Run(stopCh <-chan struct{}) { defer utilruntime.HandleCrash() defer func() { diff --git a/pkg/core/controller/listwatcher.go b/pkg/core/controller/listwatcher.go index f15006b72..e90580f0d 100644 --- a/pkg/core/controller/listwatcher.go +++ b/pkg/core/controller/listwatcher.go @@ -24,6 +24,10 @@ import ( ) type ResourceListerWatcher interface { - ResourceKind() coremodel.ResourceKind cache.ListerWatcher + // ResourceKind returns the kind of resource this listerwatcher is for + ResourceKind() coremodel.ResourceKind + // TransformFunc transform the raw resource into your need before the raw resource pushing into the delta fifo, + // return nil if there is no need to transform, see cache.SharedInformer for detail + TransformFunc() cache.TransformFunc } diff --git a/pkg/core/discovery/component.go b/pkg/core/discovery/component.go index 8751bfb1a..2bc0476b8 100644 --- a/pkg/core/discovery/component.go +++ b/pkg/core/discovery/component.go @@ -18,8 +18,11 @@ package discovery import ( + "fmt" "math" + "reflect" + "github.com/apache/dubbo-admin/pkg/common/bizerror" "github.com/apache/dubbo-admin/pkg/config/discovery" "github.com/apache/dubbo-admin/pkg/core/controller" "github.com/apache/dubbo-admin/pkg/core/events" @@ -57,7 +60,7 @@ func (d *discoveryComponent) Type() runtime.ComponentType { } func (d *discoveryComponent) Order() int { - return math.MaxInt + return math.MaxInt - 2 } func (d *discoveryComponent) Init(ctx runtime.BuilderContext) error { @@ -110,21 +113,26 @@ func (d *discoveryComponent) newInformers(cfg *discovery.Config, ctx runtime.Bui if err != nil { return nil, err } - emitter := eventBusComponent.(events.Emitter) + emitter, ok := eventBusComponent.(events.Emitter) + if !ok { + return nil, bizerror.NewAssertionError("Emitter", reflect.TypeOf(eventBusComponent).Name()) + } storeComponent, err := ctx.GetActivatedComponent(runtime.ResourceStore) if err != nil { - return nil, err + return nil, fmt.Errorf("can not retrieve store from runtime in engine %s, %w", cfg.Name, err) + } + storeRouter, ok := storeComponent.(store.Router) + if !ok { + return nil, bizerror.NewAssertionError("store.Router", reflect.TypeOf(storeComponent).Name()) } - resourceStore := storeComponent.(store.ResourceStore) - var informers Informers - for _, lw := range lwList { - rk := lw.ResourceKind() - newFunc, err := coremodel.ResourceSchemaRegistry().NewResourceFunc(rk) + var informers = make([]controller.Informer, len(lwList)) + for i, lw := range lwList { + resourceStore, err := storeRouter.ResourceKindRoute(lw.ResourceKind()) if err != nil { - return nil, err + return nil, fmt.Errorf("cannot find store for resource kind %s", lw.ResourceKind()) } - informer := controller.NewInformerWithOptions(lw, emitter, resourceStore, newFunc(), controller.Options{ResyncPeriod: 0}) - informers = append(informers, informer) + informer := controller.NewInformerWithOptions(lw, emitter, resourceStore, controller.Options{ResyncPeriod: 0}) + informers[i] = informer } return informers, nil } diff --git a/pkg/core/engine/component.go b/pkg/core/engine/component.go index 6aa5fa744..783aa340c 100644 --- a/pkg/core/engine/component.go +++ b/pkg/core/engine/component.go @@ -20,11 +20,15 @@ package engine import ( "fmt" "math" + "reflect" + "github.com/apache/dubbo-admin/pkg/common/bizerror" + enginecfg "github.com/apache/dubbo-admin/pkg/config/engine" "github.com/apache/dubbo-admin/pkg/core/controller" + "github.com/apache/dubbo-admin/pkg/core/engine/subscriber" "github.com/apache/dubbo-admin/pkg/core/events" "github.com/apache/dubbo-admin/pkg/core/logger" - coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" "github.com/apache/dubbo-admin/pkg/core/runtime" "github.com/apache/dubbo-admin/pkg/core/store" ) @@ -41,25 +45,59 @@ type Component interface { var _ Component = &engineComponent{} type engineComponent struct { - name string - informers []controller.Informer + name string + storeRouter store.Router + informers []controller.Informer + subscriptionManager events.SubscriptionManager + subscribers []events.Subscriber } func newEngineComponent() Component { return &engineComponent{ - informers: make([]controller.Informer, 0), + informers: make([]controller.Informer, 0), + subscribers: make([]events.Subscriber, 0), } } -func (b *engineComponent) Type() runtime.ComponentType { +func (e *engineComponent) Type() runtime.ComponentType { return runtime.ResourceEngine } -func (b *engineComponent) Order() int { - return math.MaxInt +func (e *engineComponent) Order() int { + return math.MaxInt - 3 } -func (b *engineComponent) Init(ctx runtime.BuilderContext) error { +func (e *engineComponent) Init(ctx runtime.BuilderContext) error { cfg := ctx.Config().Engine + e.name = cfg.Name + eventBusComponent, err := ctx.GetActivatedComponent(runtime.EventBus) + if err != nil { + return fmt.Errorf("can not retrieve event bus from runtime in engine %s, %w", cfg.Name, err) + } + eventBus, ok := eventBusComponent.(events.EventBus) + if !ok { + return bizerror.NewAssertionError("EventBus", reflect.TypeOf(eventBusComponent).Name()) + } + e.subscriptionManager = eventBus + storeComponent, err := ctx.GetActivatedComponent(runtime.ResourceStore) + if err != nil { + return fmt.Errorf("can not retrieve store from runtime in engine %s, %w", e.name, err) + } + storeRouter, ok := storeComponent.(store.Router) + if !ok { + return bizerror.NewAssertionError("store.Router", reflect.TypeOf(storeComponent).Name()) + } + e.storeRouter = storeRouter + if err = e.initInformers(cfg, eventBus); err != nil { + return fmt.Errorf("init informer failed, %w", err) + } + if err = e.initSubscribers(eventBus); err != nil { + return fmt.Errorf("init subscribers failed, %w", err) + } + logger.Infof("resource engine %s has been inited successfully", e.name) + return nil +} + +func (e *engineComponent) initInformers(cfg *enginecfg.Config, emitter events.Emitter) error { factory, err := FactoryRegistry().GetListWatcherFactory(cfg.Type) if err != nil { return err @@ -69,40 +107,45 @@ func (b *engineComponent) Init(ctx runtime.BuilderContext) error { return err } for _, lw := range lwList { - eventBusComponent, err := ctx.GetActivatedComponent(runtime.EventBus) - if err != nil { - return err - } - emitter, ok := eventBusComponent.(events.Emitter) - if !ok { - return fmt.Errorf("type assertion failed, event bus component in runtime is not an Emitter") - } - storeComponent, err := ctx.GetActivatedComponent(runtime.ResourceStore) - if err != nil { - return err - } - resourceStore, ok := storeComponent.(store.ResourceStore) - if !ok { - return fmt.Errorf("type assertion failed, resource store component in runtime is not a ResourceStore") - } rk := lw.ResourceKind() - newFunc, err := coremodel.ResourceSchemaRegistry().NewResourceFunc(rk) + rs, err := e.storeRouter.ResourceKindRoute(rk) if err != nil { - return err + return fmt.Errorf("can not find store for resource kind %s, %w", rk, err) + } + informer := controller.NewInformerWithOptions(lw, emitter, rs, controller.Options{ResyncPeriod: 0}) + if lw.TransformFunc() != nil { + err = informer.SetTransform(lw.TransformFunc()) + if err != nil { + return fmt.Errorf("can not set transform for informer of resource kind %s, %w", rk, err) + } } - informer := controller.NewInformerWithOptions(lw, emitter, resourceStore, - newFunc(), controller.Options{ResyncPeriod: 0}) - b.informers = append(b.informers, informer) + e.informers = append(e.informers, informer) + logger.Infof("resource engine %s has added informer for resource kind %s", e.name, rk) + } + return nil +} + +func (e *engineComponent) initSubscribers(eventbus events.EventBus) error { + rs, err := e.storeRouter.ResourceKindRoute(meshresource.InstanceKind) + if err != nil { + return fmt.Errorf("can not find store for resource kind %s, %w", meshresource.RuntimeInstanceKind, err) } - b.name = cfg.Name - logger.Infof("resource engine %s has been inited successfully", b.name) + runtimeInstanceSub := subscriber.NewRuntimeInstanceEventSubscriber(rs, eventbus) + e.subscribers = append(e.subscribers, runtimeInstanceSub) return nil } -func (b *engineComponent) Start(_ runtime.Runtime, ch <-chan struct{}) error { - for _, informer := range b.informers { +func (e *engineComponent) Start(_ runtime.Runtime, ch <-chan struct{}) error { + // 1. subscribe resource changed events + for _, sub := range e.subscribers { + if err := e.subscriptionManager.Subscribe(sub); err != nil { + return fmt.Errorf("could not subscribe %s to eventbus, %w", sub.Name(), err) + } + } + // 2. start informers + for _, informer := range e.informers { go informer.Run(ch) } - logger.Infof("resource engine %s has started successfully", b.name) + logger.Infof("resource engine %s has started successfully", e.name) return nil } diff --git a/pkg/core/engine/factory.go b/pkg/core/engine/factory.go index 4b86df96f..19f27d46e 100644 --- a/pkg/core/engine/factory.go +++ b/pkg/core/engine/factory.go @@ -20,7 +20,7 @@ package engine import ( "fmt" - "github.com/apache/dubbo-admin/pkg/config/engine" + enginecfg "github.com/apache/dubbo-admin/pkg/config/engine" "github.com/apache/dubbo-admin/pkg/core/controller" ) @@ -36,12 +36,12 @@ func FactoryRegistry() Registry { // Factory defines if a specific engine type is supported and how to create ListWatchers type Factory interface { - Support(engine.Type) bool - NewListWatchers(*engine.Config) ([]controller.ResourceListerWatcher, error) + Support(enginecfg.Type) bool + NewListWatchers(*enginecfg.Config) ([]controller.ResourceListerWatcher, error) } type Registry interface { - GetListWatcherFactory(engine.Type) (Factory, error) + GetListWatcherFactory(enginecfg.Type) (Factory, error) } type RegistryMutator interface { @@ -70,7 +70,7 @@ func (e *listWatchFactoryRegistry) Register(factory Factory) { e.factories = append(e.factories, factory) } -func (e *listWatchFactoryRegistry) GetListWatcherFactory(t engine.Type) (Factory, error) { +func (e *listWatchFactoryRegistry) GetListWatcherFactory(t enginecfg.Type) (Factory, error) { for _, factory := range e.factories { if factory.Support(t) { return factory, nil diff --git a/pkg/core/engine/subscriber/runtime_instance.go b/pkg/core/engine/subscriber/runtime_instance.go new file mode 100644 index 000000000..212a114fd --- /dev/null +++ b/pkg/core/engine/subscriber/runtime_instance.go @@ -0,0 +1,186 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package subscriber + +import ( + "errors" + "reflect" + + "github.com/duke-git/lancet/v2/strutil" + "k8s.io/client-go/tools/cache" + + "github.com/apache/dubbo-admin/pkg/common/bizerror" + "github.com/apache/dubbo-admin/pkg/core/events" + "github.com/apache/dubbo-admin/pkg/core/logger" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" + "github.com/apache/dubbo-admin/pkg/core/store" + "github.com/apache/dubbo-admin/pkg/core/store/index" +) + +type RuntimeInstanceEventSubscriber struct { + instanceResourceStore store.ResourceStore + eventEmitter events.Emitter +} + +func (s *RuntimeInstanceEventSubscriber) ResourceKind() coremodel.ResourceKind { + return meshresource.RuntimeInstanceKind +} + +func (s *RuntimeInstanceEventSubscriber) Name() string { + return "Engine-" + s.ResourceKind().ToString() +} + +func (s *RuntimeInstanceEventSubscriber) ProcessEvent(event events.Event) error { + newObj, ok := event.NewObj().(*meshresource.RuntimeInstanceResource) + if !ok && newObj != nil { + return bizerror.NewAssertionError(meshresource.RuntimeInstanceKind, reflect.TypeOf(event.NewObj()).Name()) + } + oldObj, ok := event.OldObj().(*meshresource.RuntimeInstanceResource) + if !ok && oldObj != nil { + return bizerror.NewAssertionError(meshresource.RuntimeInstanceKind, reflect.TypeOf(event.OldObj()).Name()) + } + var processErr error + switch event.Type() { + case cache.Added, cache.Updated, cache.Replaced, cache.Sync: + if newObj == nil { + errStr := "process runtime instance upsert event, but new obj is nil, skipped processing" + logger.Error(errStr) + return errors.New(errStr) + } + processErr = s.processUpsert(newObj) + case cache.Deleted: + if oldObj == nil { + errStr := "process runtime instance delete event, but old obj is nil, skipped processing" + logger.Error(errStr) + return errors.New(errStr) + } + processErr = s.processDelete(oldObj) + } + eventStr := event.String() + if processErr == nil { + logger.Infof("process runtime instance event successfully, event: %s", eventStr) + } else { + logger.Errorf("process runtime instance event failed, event: %s, err: %s", eventStr, processErr.Error()) + } + return processErr +} + +func (s *RuntimeInstanceEventSubscriber) getRelatedInstanceResource( + rtInstance *meshresource.RuntimeInstanceResource) (*meshresource.InstanceResource, error) { + resources, err := s.instanceResourceStore.ListByIndexes(map[string]string{ + index.ByInstanceIpIndex: rtInstance.Spec.Ip, + }) + if err != nil { + return nil, err + } + if len(resources) == 0 { + return nil, nil + } + instanceResources := make([]*meshresource.InstanceResource, len(resources)) + for i, item := range resources { + if res, ok := item.(*meshresource.InstanceResource); ok { + instanceResources[i] = res + } else { + return nil, bizerror.NewAssertionError("InstanceResource", reflect.TypeOf(item).Name()) + } + } + return instanceResources[0], nil +} + +func (s *RuntimeInstanceEventSubscriber) mergeRuntimeInstance( + instanceRes *meshresource.InstanceResource, + rtInstanceRes *meshresource.RuntimeInstanceResource) { + instanceRes.Name = rtInstanceRes.Name + instanceRes.Spec.Name = rtInstanceRes.Spec.Name + instanceRes.Spec.Ip = rtInstanceRes.Spec.Ip + instanceRes.Labels = rtInstanceRes.Labels + instanceRes.Spec.Image = rtInstanceRes.Spec.Image + instanceRes.Spec.CreateTime = rtInstanceRes.Spec.CreateTime + instanceRes.Spec.StartTime = rtInstanceRes.Spec.StartTime + instanceRes.Spec.ReadyTime = rtInstanceRes.Spec.ReadyTime + instanceRes.Spec.DeployState = rtInstanceRes.Spec.Phase + instanceRes.Spec.WorkloadType = rtInstanceRes.Spec.WorkloadType + instanceRes.Spec.WorkloadName = rtInstanceRes.Spec.WorkloadName + instanceRes.Spec.Node = rtInstanceRes.Spec.Node + instanceRes.Spec.Probes = rtInstanceRes.Spec.Probes + instanceRes.Spec.Conditions = rtInstanceRes.Spec.Conditions +} + +func (s *RuntimeInstanceEventSubscriber) fromRuntimeInstance( + rtInstanceRes *meshresource.RuntimeInstanceResource) *meshresource.InstanceResource { + instanceRes := meshresource.NewInstanceResourceWithAttributes(rtInstanceRes.Name, rtInstanceRes.Mesh) + s.mergeRuntimeInstance(instanceRes, rtInstanceRes) + return instanceRes +} + +// processUpsert when runtime instance added or updated, we should add/update the corresponding instance resource +func (s *RuntimeInstanceEventSubscriber) processUpsert(rtInstanceRes *meshresource.RuntimeInstanceResource) error { + instanceResource, err := s.getRelatedInstanceResource(rtInstanceRes) + if err != nil { + return err + } + // If instance resource exists, the rpc instance resource exists in remote registry and has been watched by discovery. + // So we should merge the runtime info into it + if instanceResource != nil { + s.mergeRuntimeInstance(instanceResource, rtInstanceRes) + return s.instanceResourceStore.Update(instanceResource) + } + // If instance resource does not exist, we should create a new instance resource by runtime instance + // If the app name is empty, we cannot identify it as a dubbo app, so we skip it + if strutil.IsBlank(rtInstanceRes.Spec.AppName) { + logger.Warnf("cannot identify runtime instance %s as a dubbo app, skipped updating instance", rtInstanceRes.Name) + return nil + } + // Otherwise we can create a new instance resource by runtime instance + instanceRes := s.fromRuntimeInstance(rtInstanceRes) + if err = s.instanceResourceStore.Add(instanceRes); err != nil { + logger.Errorf("add instance resource failed, instance: %s, err: %s", instanceRes.ResourceKey(), err.Error()) + return err + } + instanceAddEvent := events.NewResourceChangedEvent(cache.Added, nil, instanceRes) + s.eventEmitter.Send(instanceAddEvent) + logger.Debugf("runtime instance upsert trigger instance add event, event: %s", instanceAddEvent.String()) + return nil +} + +// processDelete when runtime instance deleted, we should delete the corresponding instance resource +func (s *RuntimeInstanceEventSubscriber) processDelete(rtInstanceRes *meshresource.RuntimeInstanceResource) error { + instanceResource, err := s.getRelatedInstanceResource(rtInstanceRes) + if err != nil { + return err + } + if instanceResource == nil { + return nil + } + if err = s.instanceResourceStore.Delete(instanceResource.ResourceKey()); err != nil { + logger.Errorf("delete instance resource failed, instance: %s, err: %s", instanceResource.ResourceKey(), err.Error()) + return err + } + instanceDeleteEvent := events.NewResourceChangedEvent(cache.Deleted, instanceResource, nil) + s.eventEmitter.Send(instanceDeleteEvent) + logger.Debugf("runtime instance delete trigger instance delete event, event: %s", instanceDeleteEvent.String()) + return nil +} + +func NewRuntimeInstanceEventSubscriber(instanceResourceStore store.ResourceStore, emitter events.Emitter) events.Subscriber { + return &RuntimeInstanceEventSubscriber{ + instanceResourceStore: instanceResourceStore, + eventEmitter: emitter, + } +} diff --git a/pkg/core/events/component.go b/pkg/core/events/component.go index 1c4dcb827..6c1fff9a2 100644 --- a/pkg/core/events/component.go +++ b/pkg/core/events/component.go @@ -31,13 +31,6 @@ func init() { runtime.RegisterComponent(&eventBus{}) } -type subscriber struct { - name string - resourceKind model.ResourceKind - processFunc ProcessEventFunc -} -type subscribers []subscriber - type EventBusComponent interface { EventBus runtime.Component @@ -47,7 +40,7 @@ var _ EventBusComponent = &eventBus{} type eventBus struct { rwMutex sync.RWMutex - subscriberDir map[model.ResourceKind]subscribers + subscriberDir map[model.ResourceKind]Subscribers } func (b *eventBus) Type() runtime.ComponentType { @@ -59,7 +52,7 @@ func (b *eventBus) Order() int { } func (b *eventBus) Init(_ runtime.BuilderContext) error { - b.subscriberDir = make(map[model.ResourceKind]subscribers) + b.subscriberDir = make(map[model.ResourceKind]Subscribers) return nil } @@ -68,36 +61,34 @@ func (b *eventBus) Start(_ runtime.Runtime, _ <-chan struct{}) error { } // Subscribe subscribes to a resource kind, ProcessEventFunc is synchronous which is used to avoid event loss -func (b *eventBus) Subscribe(rk model.ResourceKind, name string, process ProcessEventFunc) error { +func (b *eventBus) Subscribe(subscriber Subscriber) error { b.rwMutex.Lock() defer b.rwMutex.Unlock() - subs, exists := b.subscriberDir[rk] + subs, exists := b.subscriberDir[subscriber.ResourceKind()] if !exists { - subs = make(subscribers, 0) + subs = make(Subscribers, 0) } // check name if is unique for _, sub := range subs { - if sub.name == name { - return fmt.Errorf("duplicated subscriber name %s, skipped subscribing", name) + if sub.Name() == subscriber.Name() { + return fmt.Errorf("duplicated subscriber name %s, skipped subscribing", subscriber.Name()) } } - b.subscriberDir[rk] = append(subs, subscriber{ - name: name, - resourceKind: rk, - processFunc: process, - }) + b.subscriberDir[subscriber.ResourceKind()] = append(subs, subscriber) return nil } -func (b *eventBus) Unsubscribe(rk model.ResourceKind, name string) error { +func (b *eventBus) Unsubscribe(subscriber Subscriber) error { b.rwMutex.Lock() defer b.rwMutex.Unlock() + rk := subscriber.ResourceKind() + name := subscriber.Name() subs, exists := b.subscriberDir[rk] if !exists { return fmt.Errorf("no subscriber for resource %s, skipped unsubscribing", rk) } for i, sub := range subs { - if sub.name == name { + if sub.Name() == name { b.subscriberDir[rk] = append(subs[:i], subs[i+1:]...) return nil } @@ -108,7 +99,12 @@ func (b *eventBus) Unsubscribe(rk model.ResourceKind, name string) error { func (b *eventBus) Send(event Event) { b.rwMutex.RLock() defer b.rwMutex.RUnlock() - rk := event.OldObj().ResourceKind() + var rk model.ResourceKind + if event.OldObj() != nil { + rk = event.OldObj().ResourceKind() + } else if event.NewObj() != nil { + rk = event.NewObj().ResourceKind() + } subs, exists := b.subscriberDir[rk] if !exists { logger.Warnf("no subscriber for resource %s, skipped sending event%v", rk, event) @@ -116,8 +112,8 @@ func (b *eventBus) Send(event Event) { } for _, sub := range subs { // TODO Do we need to support reprocess - if err := sub.processFunc(event); err != nil { - logger.Errorf("failed to process event in %s , skipped, event: %v", sub.name, event) + if err := sub.ProcessEvent(event); err != nil { + logger.Errorf("failed to process event in %s , skipped, event: %v", sub.Name(), event) } } } diff --git a/pkg/core/events/eventbus.go b/pkg/core/events/eventbus.go index c9956e3fc..552d1f479 100644 --- a/pkg/core/events/eventbus.go +++ b/pkg/core/events/eventbus.go @@ -18,18 +18,34 @@ package events import ( + "fmt" + + "github.com/duke-git/lancet/v2/convertor" "k8s.io/client-go/tools/cache" "github.com/apache/dubbo-admin/pkg/core/resource/model" ) type Event interface { + // Type returns the type of the event, see definitions in cache.DeltaType Type() cache.DeltaType + // OldObj returns the old object, nil if old object doesn't exist in store OldObj() model.Resource + // NewObj returns the new object, nil if event type is in [cache.Deleted] NewObj() model.Resource + // String returns the string representation of the event + String() string +} + +type Subscriber interface { + ResourceKind() model.ResourceKind + + Name() string + + ProcessEvent(event Event) error } -type ProcessEventFunc func(event Event) error +type Subscribers []Subscriber type ResourceChangedEvent struct { typ cache.DeltaType @@ -37,6 +53,8 @@ type ResourceChangedEvent struct { newObj model.Resource } +var _ Event = &ResourceChangedEvent{} + func NewResourceChangedEvent(typ cache.DeltaType, oldObj model.Resource, newObj model.Resource) *ResourceChangedEvent { return &ResourceChangedEvent{ typ: typ, @@ -57,13 +75,18 @@ func (e *ResourceChangedEvent) NewObj() model.Resource { return e.newObj } +func (e *ResourceChangedEvent) String() string { + return fmt.Sprintf("[type]: %s, [oldObj]: %s, [newObj]: %s", + e.typ, convertor.ToString(e.oldObj), convertor.ToString(e.newObj)) +} + type Emitter interface { Send(event Event) } type SubscriptionManager interface { - Subscribe(rk model.ResourceKind, name string, process ProcessEventFunc) error - Unsubscribe(rk model.ResourceKind, name string) error + Subscribe(subscriber Subscriber) error + Unsubscribe(subscriber Subscriber) error } type EventBus interface { diff --git a/pkg/core/manager/component.go b/pkg/core/manager/component.go index e18344280..e12f3c317 100644 --- a/pkg/core/manager/component.go +++ b/pkg/core/manager/component.go @@ -46,7 +46,7 @@ func (r *resourceManagerComponent) Type() runtime.ComponentType { } func (r *resourceManagerComponent) Order() int { - return math.MaxInt + return math.MaxInt - 4 } func (r *resourceManagerComponent) Init(ctx runtime.BuilderContext) error { diff --git a/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go b/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go index ff9f2f28a..46fa116b7 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *AffinityRouteResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *AffinityRouteResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode AffinityRouteResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewAffinityRouteResourceWithAttributes(name string, mesh string) *AffinityRouteResource { return &AffinityRouteResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/application_types.go b/pkg/core/resource/apis/mesh/v1alpha1/application_types.go index 6aef4ccc3..8fb5e9bb1 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/application_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/application_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *ApplicationResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *ApplicationResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode ApplicationResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewApplicationResourceWithAttributes(name string, mesh string) *ApplicationResource { return &ApplicationResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go b/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go index 83b6b8c39..27260d2ce 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/conditionroute_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *ConditionRouteResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *ConditionRouteResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode ConditionRouteResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewConditionRouteResourceWithAttributes(name string, mesh string) *ConditionRouteResource { return &ConditionRouteResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go b/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go index e2fa03fd2..ab6766e5f 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/dynamicconfig_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *DynamicConfigResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *DynamicConfigResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode DynamicConfigResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewDynamicConfigResourceWithAttributes(name string, mesh string) *DynamicConfigResource { return &DynamicConfigResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go b/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go index 17f92e2e3..3c451db6b 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/instance_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *InstanceResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *InstanceResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode InstanceResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewInstanceResourceWithAttributes(name string, mesh string) *InstanceResource { return &InstanceResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/rpcinstance_types.go b/pkg/core/resource/apis/mesh/v1alpha1/rpcinstance_types.go index 0c5d18edf..064d77453 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/rpcinstance_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/rpcinstance_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *RPCInstanceResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *RPCInstanceResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode RPCInstanceResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewRPCInstanceResourceWithAttributes(name string, mesh string) *RPCInstanceResource { return &RPCInstanceResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/rpcinstancemetadata_types.go b/pkg/core/resource/apis/mesh/v1alpha1/rpcinstancemetadata_types.go index b51fc2686..c0e738266 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/rpcinstancemetadata_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/rpcinstancemetadata_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -30,13 +32,13 @@ import ( coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) -const RpcInstanceMetadataKind coremodel.ResourceKind = "RpcInstanceMetadata" +const RPCInstanceMetadataKind coremodel.ResourceKind = "RPCInstanceMetadata" func init() { - coremodel.RegisterResourceSchema(RpcInstanceMetadataKind, NewRpcInstanceMetadataResource) + coremodel.RegisterResourceSchema(RPCInstanceMetadataKind, NewRPCInstanceMetadataResource) } -type RpcInstanceMetadataResource struct { +type RPCInstanceMetadataResource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -45,48 +47,48 @@ type RpcInstanceMetadataResource struct { // It may be omitted for cluster-scoped resources. Mesh string `json:"mesh,omitempty"` - // Spec is the specification of the Dubbo RPCInstanceMetaData resource. - Spec *meshproto.RPCInstanceMetaData `json:"spec,omitempty"` + // Spec is the specification of the Dubbo RPCInstanceMetadata resource. + Spec *meshproto.RPCInstanceMetadata `json:"spec,omitempty"` - // Status is the status of the Dubbo RpcInstanceMetadata resource. - Status RpcInstanceMetadataResourceStatus `json:"status,omitempty"` + // Status is the status of the Dubbo RPCInstanceMetadata resource. + Status RPCInstanceMetadataResourceStatus `json:"status,omitempty"` } -type RpcInstanceMetadataResourceStatus struct { +type RPCInstanceMetadataResourceStatus struct { // define resource-specific status here } -type RpcInstanceMetadataResourceList struct { +type RPCInstanceMetadataResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []RpcInstanceMetadataResource `json:"items"` + Items []RPCInstanceMetadataResource `json:"items"` } -func (r *RpcInstanceMetadataResource) ResourceKind() coremodel.ResourceKind { - return RpcInstanceMetadataKind +func (r *RPCInstanceMetadataResource) ResourceKind() coremodel.ResourceKind { + return RPCInstanceMetadataKind } -func (r *RpcInstanceMetadataResource) MeshName() string { +func (r *RPCInstanceMetadataResource) MeshName() string { return r.Mesh } -func (r *RpcInstanceMetadataResource) ResourceKey() string { +func (r *RPCInstanceMetadataResource) ResourceKey() string { return coremodel.BuildResourceKey(r.Mesh, r.Name) } -func (r *RpcInstanceMetadataResource) ResourceMeta() metav1.ObjectMeta { +func (r *RPCInstanceMetadataResource) ResourceMeta() metav1.ObjectMeta { return r.ObjectMeta } -func (r *RpcInstanceMetadataResource) ResourceSpec() coremodel.ResourceSpec { +func (r *RPCInstanceMetadataResource) ResourceSpec() coremodel.ResourceSpec { return r.Spec } -func (r *RpcInstanceMetadataResource) DeepCopyObject() k8sruntime.Object { +func (r *RPCInstanceMetadataResource) DeepCopyObject() k8sruntime.Object { if r == nil { return nil } - out := &RpcInstanceMetadataResource{ + out := &RPCInstanceMetadataResource{ TypeMeta: r.TypeMeta, Mesh: r.Mesh, Status: r.Status, @@ -95,7 +97,7 @@ func (r *RpcInstanceMetadataResource) DeepCopyObject() k8sruntime.Object { r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if r.Spec != nil { - spec, ok := proto.Clone(r.Spec).(*meshproto.RPCInstanceMetaData) + spec, ok := proto.Clone(r.Spec).(*meshproto.RPCInstanceMetadata) if !ok { logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) return out @@ -106,10 +108,19 @@ func (r *RpcInstanceMetadataResource) DeepCopyObject() k8sruntime.Object { return out } -func NewRpcInstanceMetadataResourceWithAttributes(name string, mesh string) *RpcInstanceMetadataResource { - return &RpcInstanceMetadataResource{ +func (r *RPCInstanceMetadataResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode RPCInstanceMetadataResource: %s to json, err: %w", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + +func NewRPCInstanceMetadataResourceWithAttributes(name string, mesh string) *RPCInstanceMetadataResource { + return &RPCInstanceMetadataResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(RpcInstanceMetadataKind), + Kind: string(RPCInstanceMetadataKind), APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ @@ -120,10 +131,10 @@ func NewRpcInstanceMetadataResourceWithAttributes(name string, mesh string) *Rpc } } -func NewRpcInstanceMetadataResource() coremodel.Resource { - return &RpcInstanceMetadataResource{ +func NewRPCInstanceMetadataResource() coremodel.Resource { + return &RPCInstanceMetadataResource{ TypeMeta: metav1.TypeMeta{ - Kind: string(RpcInstanceMetadataKind), + Kind: string(RPCInstanceMetadataKind), APIVersion: "v1alpha1", }, } diff --git a/pkg/core/resource/apis/mesh/v1alpha1/runtimeinstance_types.go b/pkg/core/resource/apis/mesh/v1alpha1/runtimeinstance_types.go index 03e6cb53c..113c89719 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/runtimeinstance_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/runtimeinstance_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *RuntimeInstanceResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *RuntimeInstanceResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode RuntimeInstanceResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewRuntimeInstanceResourceWithAttributes(name string, mesh string) *RuntimeInstanceResource { return &RuntimeInstanceResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/service_types.go b/pkg/core/resource/apis/mesh/v1alpha1/service_types.go index 364ffed82..a18e6a4a9 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/service_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/service_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *ServiceResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *ServiceResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode ServiceResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewServiceResourceWithAttributes(name string, mesh string) *ServiceResource { return &ServiceResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/serviceconsumermetadata_types.go b/pkg/core/resource/apis/mesh/v1alpha1/serviceconsumermetadata_types.go index 82a6bf091..ef64a62f7 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/serviceconsumermetadata_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/serviceconsumermetadata_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *ServiceConsumerMetadataResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *ServiceConsumerMetadataResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode ServiceConsumerMetadataResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewServiceConsumerMetadataResourceWithAttributes(name string, mesh string) *ServiceConsumerMetadataResource { return &ServiceConsumerMetadataResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermapping_types.go b/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermapping_types.go index 23365fce0..389ae8b1e 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermapping_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermapping_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *ServiceProviderMappingResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *ServiceProviderMappingResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode ServiceProviderMappingResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewServiceProviderMappingResourceWithAttributes(name string, mesh string) *ServiceProviderMappingResource { return &ServiceProviderMappingResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermetadata_types.go b/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermetadata_types.go index ab03f233a..e0e973159 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermetadata_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/serviceprovidermetadata_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -45,8 +47,8 @@ type ServiceProviderMetadataResource struct { // It may be omitted for cluster-scoped resources. Mesh string `json:"mesh,omitempty"` - // Spec is the specification of the Dubbo ServiceProviderMetaData resource. - Spec *meshproto.ServiceProviderMetaData `json:"spec,omitempty"` + // Spec is the specification of the Dubbo ServiceProviderMetadata resource. + Spec *meshproto.ServiceProviderMetadata `json:"spec,omitempty"` // Status is the status of the Dubbo ServiceProviderMetadata resource. Status ServiceProviderMetadataResourceStatus `json:"status,omitempty"` @@ -95,7 +97,7 @@ func (r *ServiceProviderMetadataResource) DeepCopyObject() k8sruntime.Object { r.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if r.Spec != nil { - spec, ok := proto.Clone(r.Spec).(*meshproto.ServiceProviderMetaData) + spec, ok := proto.Clone(r.Spec).(*meshproto.ServiceProviderMetadata) if !ok { logger.Warnf("failed to clone spec %v, spec is not conformed to %s", r.Spec, r.ResourceKind()) return out @@ -106,6 +108,15 @@ func (r *ServiceProviderMetadataResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *ServiceProviderMetadataResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode ServiceProviderMetadataResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewServiceProviderMetadataResourceWithAttributes(name string, mesh string) *ServiceProviderMetadataResource { return &ServiceProviderMetadataResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go b/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go index ab97c424b..741f3af2f 100644 --- a/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go +++ b/pkg/core/resource/apis/mesh/v1alpha1/tagroute_types.go @@ -21,6 +21,8 @@ package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +108,15 @@ func (r *TagRouteResource) DeepCopyObject() k8sruntime.Object { return out } +func (r *TagRouteResource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode TagRouteResource: %s to json, err: %s", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func NewTagRouteResourceWithAttributes(name string, mesh string) *TagRouteResource { return &TagRouteResource{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/core/resource/model/resource.go b/pkg/core/resource/model/resource.go index 9b1ad52d1..fccdc30b3 100644 --- a/pkg/core/resource/model/resource.go +++ b/pkg/core/resource/model/resource.go @@ -65,6 +65,8 @@ type Resource interface { ResourceMeta() metav1.ObjectMeta // ResourceSpec returns the resource spec ResourceSpec() ResourceSpec + // String returns the string representation of the resource + String() string } // BuildResourceKey build a unique identifier for a resource, usually is `mesh/name` diff --git a/pkg/core/runtime/runtime.go b/pkg/core/runtime/runtime.go index bf5c865ee..260451ec5 100644 --- a/pkg/core/runtime/runtime.go +++ b/pkg/core/runtime/runtime.go @@ -26,6 +26,7 @@ import ( "github.com/pkg/errors" "github.com/apache/dubbo-admin/pkg/config/app" + "github.com/apache/dubbo-admin/pkg/core/logger" "github.com/apache/dubbo-admin/pkg/config/mode" ) @@ -115,13 +116,26 @@ func (rt *runtime) Add(components ...Component) { func (rt *runtime) Start(stop <-chan struct{}) error { components := maputil.Values(rt.components) slice.SortBy(components, func(a, b Component) bool { - return a.Order() < b.Order() + return a.Order() > b.Order() }) for _, com := range components { - err := com.Start(rt, stop) - if err != nil { - return err - } + go func() { + err := com.Start(rt, stop) + if err != nil { + // if a core component failed to start, panic + if slice.Contain(CoreComponentTypes, com.Type()) { + panic("core component " + com.Type() + " running failed with error: " + err.Error()) + } else { + logger.Errorf("component %s running failed with error: %s", com.Type(), err.Error()) + } + } else { + logger.Infof("component %s started successfully", com.Type()) + } + }() + } + logger.Info("Admin started successfully") + select { + case <-stop: + return nil } - return nil } diff --git a/pkg/core/store/component.go b/pkg/core/store/component.go index 5f09e8db0..481de86b0 100644 --- a/pkg/core/store/component.go +++ b/pkg/core/store/component.go @@ -60,7 +60,7 @@ func (sc *storeComponent) Type() runtime.ComponentType { } func (sc *storeComponent) Order() int { - return math.MaxInt + return math.MaxInt - 1 } func (sc *storeComponent) Init(ctx runtime.BuilderContext) error { diff --git a/pkg/core/store/index/registry.go b/pkg/core/store/index/registry.go index 98f13de6c..ea579c71e 100644 --- a/pkg/core/store/index/registry.go +++ b/pkg/core/store/index/registry.go @@ -18,6 +18,7 @@ package index import ( + "github.com/duke-git/lancet/v2/maputil" "k8s.io/client-go/tools/cache" "github.com/apache/dubbo-admin/pkg/core/resource/model" @@ -46,33 +47,26 @@ type MutableIndexerRegistry interface { IndexerRegistryMutator } -// ResourceIndexers defines the rIndexers belong to a specific model.Resource -type ResourceIndexers struct { - rk model.ResourceKind - indexers cache.Indexers -} - var _ IndexerRegistry = &indexerRegistry{} type indexerRegistry struct { - rIndexers []ResourceIndexers + rIndexers map[model.ResourceKind]cache.Indexers } func newIndexRegistry() MutableIndexerRegistry { return &indexerRegistry{ - rIndexers: make([]ResourceIndexers, 0), + rIndexers: make(map[model.ResourceKind]cache.Indexers), } } func (i *indexerRegistry) Indexers(k model.ResourceKind) cache.Indexers { - for _, rIndexer := range i.rIndexers { - if rIndexer.rk == k { - return rIndexer.indexers - } - } - return nil + return i.rIndexers[k] } func (i *indexerRegistry) Register(k model.ResourceKind, indexers cache.Indexers) { - i.rIndexers = append(i.rIndexers, ResourceIndexers{rk: k, indexers: indexers}) + if existedIndexers, exists := i.rIndexers[k]; !exists { + i.rIndexers[k] = indexers + } else { + i.rIndexers[k] = maputil.Merge(existedIndexers, indexers) + } } diff --git a/pkg/diagnostics/server.go b/pkg/diagnostics/server.go index a14fcfd8c..4d707b361 100644 --- a/pkg/diagnostics/server.go +++ b/pkg/diagnostics/server.go @@ -19,16 +19,15 @@ package diagnostics import ( "context" + "errors" "fmt" "math" "net/http" "net/http/pprof" "time" - "github.com/bakito/go-log-logr-adapter/adapter" - diagnosticsconfig "github.com/apache/dubbo-admin/pkg/config/diagnostics" - "github.com/apache/dubbo-admin/pkg/core" + "github.com/apache/dubbo-admin/pkg/core/logger" "github.com/apache/dubbo-admin/pkg/core/runtime" ) @@ -36,8 +35,6 @@ func init() { runtime.RegisterComponent(&diagnosticsServer{}) } -var diagnosticsServerLog = core.Log.WithName("diagnostics") - const DiagnosticsServer = "diagnostics server" type diagnosticsServer struct { @@ -79,31 +76,30 @@ func (s *diagnosticsServer) Start(_ runtime.Runtime, stop <-chan struct{}) error Addr: fmt.Sprintf(":%d", s.config.ServerPort), Handler: mux, ReadHeaderTimeout: time.Second, - ErrorLog: adapter.ToStd(diagnosticsServerLog), } - diagnosticsServerLog.Info("starting diagnostic server", "interface", "0.0.0.0", "port", s.config.ServerPort) + logger.Infof("starting diagnostic server, endpoint is 0.0.0.0: %d", s.config.ServerPort) errChan := make(chan error) go func() { defer close(errChan) var err error err = httpServer.ListenAndServe() if err != nil { - switch err { - case http.ErrServerClosed: - diagnosticsServerLog.Info("shutting down server") + switch { + case errors.Is(err, http.ErrServerClosed): + logger.Info("shutting down diagnostics server") default: - diagnosticsServerLog.Error(err, "could not start HTTP Server") + logger.Error("could not start diagnostics http server, unknown err: %s", err) errChan <- err } return } - diagnosticsServerLog.Info("terminated normally") + logger.Info("terminated normally") }() select { case <-stop: - diagnosticsServerLog.Info("stopping") + logger.Info("received stop signal, stopping diagnostics server ...") return httpServer.Shutdown(context.Background()) case err := <-errChan: return err diff --git a/pkg/discovery/mock/factory.go b/pkg/discovery/mock/factory.go new file mode 100644 index 000000000..87c1ada28 --- /dev/null +++ b/pkg/discovery/mock/factory.go @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package mock + +import ( + discoverycfg "github.com/apache/dubbo-admin/pkg/config/discovery" + "github.com/apache/dubbo-admin/pkg/core/controller" + "github.com/apache/dubbo-admin/pkg/core/discovery" +) + +func init() { + discovery.RegisterListWatcherFactory(&mockListerWaterFactory{}) +} + +type mockListerWaterFactory struct{} + +var _ discovery.Factory = &mockListerWaterFactory{} + +func (l *mockListerWaterFactory) Support(d discoverycfg.Type) bool { + return d == discoverycfg.Mock +} + +func (l *mockListerWaterFactory) NewListWatchers(_ *discoverycfg.Config) ([]controller.ResourceListerWatcher, error) { + return make([]controller.ResourceListerWatcher, 0), nil +} diff --git a/pkg/engine/kubernetes/engine.go b/pkg/engine/kubernetes/engine.go new file mode 100644 index 000000000..14757c180 --- /dev/null +++ b/pkg/engine/kubernetes/engine.go @@ -0,0 +1,230 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package kubernetes + +import ( + "fmt" + "reflect" + + "github.com/duke-git/lancet/v2/slice" + "github.com/duke-git/lancet/v2/strutil" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/cache" + + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/common/bizerror" + enginecfg "github.com/apache/dubbo-admin/pkg/config/engine" + "github.com/apache/dubbo-admin/pkg/core/consts" + "github.com/apache/dubbo-admin/pkg/core/controller" + "github.com/apache/dubbo-admin/pkg/core/logger" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) + +type PodListerWatcher struct { + cfg *enginecfg.Config + lw cache.ListerWatcher +} + +var _ controller.ResourceListerWatcher = &PodListerWatcher{} + +func NewPodListWatcher(clientset *kubernetes.Clientset, cfg *enginecfg.Config) (*PodListerWatcher, error) { + var selector fields.Selector + s := cfg.Properties.PodWatchSelector + if strutil.IsBlank(s) { + selector = fields.Everything() + } + selector, err := fields.ParseSelector(s) + if err != nil { + return nil, fmt.Errorf("parse selector %s failed: %v", s, err) + } + lw := cache.NewListWatchFromClient( + clientset.CoreV1().RESTClient(), + "pods", + metav1.NamespaceAll, + selector, + ) + return &PodListerWatcher{ + cfg: cfg, + lw: lw, + }, nil +} + +func (p *PodListerWatcher) List(options metav1.ListOptions) (k8sruntime.Object, error) { + return p.lw.List(options) +} + +func (p *PodListerWatcher) Watch(options metav1.ListOptions) (watch.Interface, error) { + return p.lw.Watch(options) +} + +func (p *PodListerWatcher) ResourceKind() coremodel.ResourceKind { + return meshresource.RuntimeInstanceKind +} + +func (p *PodListerWatcher) TransformFunc() cache.TransformFunc { + return func(obj interface{}) (interface{}, error) { + pod, ok := obj.(*v1.Pod) + if !ok { + objType := reflect.TypeOf(obj).Name() + logger.Errorf("cannot transform %s to Pod", objType) + return nil, bizerror.NewAssertionError("Pod", objType) + } + mainContainer := p.getMainContainer(pod) + appName := p.getDubboAppName(pod) + var startTime string + if pod.Status.StartTime != nil { + startTime = pod.Status.StartTime.Format(consts.TimeFormatStr) + } + createTime := pod.CreationTimestamp.Format(consts.TimeFormatStr) + readyTime := "" + slice.ForEach(pod.Status.Conditions, func(_ int, c v1.PodCondition) { + if c.Type == v1.PodReady && c.Status == v1.ConditionTrue { + readyTime = c.LastTransitionTime.Format(consts.TimeFormatStr) + } + }) + phase := string(pod.Status.Phase) + if pod.DeletionTimestamp != nil { + phase = meshproto.InstanceTerminating + } + var workloadName string + var workloadType string + if len(pod.GetOwnerReferences()) > 0 { + workloadName = pod.GetOwnerReferences()[0].Name + workloadType = pod.GetOwnerReferences()[0].Kind + } + conditions := slice.Map(pod.Status.Conditions, func(_ int, c v1.PodCondition) *meshproto.Condition { + return &meshproto.Condition{ + Type: string(c.Type), + Status: string(c.Status), + LastTransitionTime: c.LastTransitionTime.Format(consts.TimeFormatStr), + Reason: c.Reason, + Message: c.Message, + } + }) + var image string + probes := make([]*meshproto.Probe, 0) + if mainContainer != nil { + image = mainContainer.Image + if mainContainer.LivenessProbe != nil { + port := p.getProbePort(mainContainer.LivenessProbe) + probes = append(probes, &meshproto.Probe{ + Type: meshproto.LivenessProbe, + Port: port, + }) + } + if mainContainer.ReadinessProbe != nil { + port := p.getProbePort(mainContainer.ReadinessProbe) + probes = append(probes, &meshproto.Probe{ + Type: meshproto.ReadinessProbe, + Port: port, + }) + } + if mainContainer.StartupProbe != nil { + port := p.getProbePort(mainContainer.StartupProbe) + probes = append(probes, &meshproto.Probe{ + Type: meshproto.StartupProbe, + Port: port, + }) + } + } + res := meshresource.NewRuntimeInstanceResourceWithAttributes(pod.Name, "default") + res.Spec = &meshproto.RuntimeInstance{ + Name: pod.Name, + Ip: pod.Status.PodIP, + Image: image, + AppName: appName, + CreateTime: createTime, + StartTime: startTime, + ReadyTime: readyTime, + Phase: phase, + WorkloadName: workloadName, + WorkloadType: workloadType, + Node: pod.Spec.NodeName, + Probes: probes, + Conditions: conditions, + } + return res, nil + } +} + +func (p *PodListerWatcher) getMainContainer(pod *v1.Pod) *v1.Container { + containers := pod.Spec.Containers + strategy := p.cfg.Properties.GetOrDefaultMainContainerChooseStrategy() + switch strategy.Type { + case enginecfg.ChooseByLast: + return &containers[len(containers)-1] + case enginecfg.ChooseByIndex: + return &containers[strategy.Index] + case enginecfg.ChooseByName: + c, ok := slice.FindBy[v1.Container](containers, func(_ int, c v1.Container) bool { + return c.Name == strategy.Name + }) + if !ok { + logger.Warnf("pod %s has no container named %s, cannot retrieve the correct main container", + pod.Name, strategy.Name) + return nil + } + return &c + case enginecfg.ChooseByAnnotation: + value, exists := pod.Annotations[strategy.AnnotationKey] + if !exists { + logger.Warnf("pod %s has no annotation %s, cannot retrieve the correct main container", + pod.Name, strategy.AnnotationKey) + return nil + } + c, ok := slice.FindBy[v1.Container](containers, func(_ int, c v1.Container) bool { + return c.Name == value + }) + if !ok { + logger.Warnf("pod %s has no container named %s, cannot retrieve the correct main container", + pod.Name, value) + return nil + } + return &c + } + return nil +} + +func (p *PodListerWatcher) getDubboAppName(pod *v1.Pod) string { + identifier := p.cfg.Properties.DubboAppIdentifier + switch identifier.Type { + case enginecfg.IdentifyByAnnotation: + return pod.Annotations[identifier.AnnotationKey] + case enginecfg.IdentifyByLabel: + return pod.Labels[identifier.LabelKey] + default: + return "" + } +} + +func (p *PodListerWatcher) getProbePort(probe *v1.Probe) int32 { + if probe.TCPSocket != nil { + return probe.TCPSocket.Port.IntVal + } else if probe.HTTPGet != nil { + return probe.HTTPGet.Port.IntVal + } else if probe.GRPC != nil { + return probe.GRPC.Port + } + return 0 +} diff --git a/pkg/engine/kubernetes/factory.go b/pkg/engine/kubernetes/factory.go new file mode 100644 index 000000000..946f3e7a0 --- /dev/null +++ b/pkg/engine/kubernetes/factory.go @@ -0,0 +1,75 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package kubernetes + +import ( + "fmt" + + "github.com/duke-git/lancet/v2/strutil" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + + enginecfg "github.com/apache/dubbo-admin/pkg/config/engine" + "github.com/apache/dubbo-admin/pkg/core/controller" + "github.com/apache/dubbo-admin/pkg/core/engine" +) + +func init() { + engine.RegisterFactory(NewKubernetesEngineFactory()) +} + +var _ engine.Factory = &EngineFactory{} + +type EngineFactory struct{} + +func NewKubernetesEngineFactory() *EngineFactory { + return &EngineFactory{} +} + +func (e *EngineFactory) Support(typ enginecfg.Type) bool { + return enginecfg.Kubernetes == typ +} + +func (e *EngineFactory) NewListWatchers(cfg *enginecfg.Config) ([]controller.ResourceListerWatcher, error) { + kubeconfigPath := cfg.Properties.KubeConfigPath + + var config *rest.Config + var err error + if !strutil.IsBlank(kubeconfigPath) { + config, err = clientcmd.BuildConfigFromFlags("", kubeconfigPath) + } else { + config, err = rest.InClusterConfig() + } + if err != nil { + return nil, fmt.Errorf("failed to init kubeconfig in kubernetes engine, %w", err) + } + + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, fmt.Errorf("failed to init clientset in kubernetes engine, %w", err) + } + + lwList := make([]controller.ResourceListerWatcher, 0) + podListerWatcher, err := NewPodListWatcher(clientset, cfg) + if err != nil { + return nil, fmt.Errorf("failed to init PodListerWatcher in kubernetes engine, %w", err) + } + lwList = append(lwList, podListerWatcher) + return lwList, nil +} diff --git a/pkg/store/memory/store_test.go b/pkg/store/memory/store_test.go index f78c88c05..0596926e8 100644 --- a/pkg/store/memory/store_test.go +++ b/pkg/store/memory/store_test.go @@ -18,6 +18,7 @@ package memory import ( + "encoding/json" "testing" "github.com/stretchr/testify/assert" @@ -66,6 +67,13 @@ func (mr *mockResource) ResourceMeta() metav1.ObjectMeta { func (mr *mockResource) ResourceSpec() model.ResourceSpec { return mr.spec } +func (mr *mockResource) String() string { + b, err := json.Marshal(mr) + if err != nil { + return "" + } + return string(b) +} func TestNewMemoryResourceStore(t *testing.T) { store := NewMemoryResourceStore() diff --git a/pkg/store/db/mysql.go b/pkg/store/mysql/mysql.go similarity index 98% rename from pkg/store/db/mysql.go rename to pkg/store/mysql/mysql.go index 43e59a333..484ead99b 100644 --- a/pkg/store/db/mysql.go +++ b/pkg/store/mysql/mysql.go @@ -15,6 +15,6 @@ * limitations under the License. */ -package db +package mysql // TODO implement memory resource store, refer to GORM https://gorm.io/docs/ diff --git a/scripts/resourcegen/gen.go b/scripts/resourcegen/gen.go index 3b9b5851d..d61606067 100644 --- a/scripts/resourcegen/gen.go +++ b/scripts/resourcegen/gen.go @@ -63,6 +63,8 @@ var resourceTemplate = template.Must(template.New("dubbo-resource").Parse(` package v1alpha1 import ( + "encoding/json" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -150,6 +152,15 @@ func (r *{{.Name}}Resource) DeepCopyObject() k8sruntime.Object { return out } +func (r *{{.Name}}Resource) String() string { + jsonStr, err := json.Marshal(r) + if err != nil { + logger.Errorf("failed to encode {{.Name}}Resource: %s to json, err: %w", r.ResourceKey(), err) + return "" + } + return string(jsonStr) +} + func New{{.Name}}ResourceWithAttributes(name string, mesh string) *{{.Name}}Resource{ return &{{.Name}}Resource{ TypeMeta: metav1.TypeMeta{ From 4aae2061efc9cd7a4ca406c729c481e18c3d6fe0 Mon Sep 17 00:00:00 2001 From: robb Date: Sun, 9 Nov 2025 20:08:49 +0800 Subject: [PATCH 08/40] feat: Defined a unified error (#1353) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: unified error code; separate application handler and service into parts * fix: license header lack * fix: copilot review err fix * fix: simplify the if-else condition * chore: rename Error() to String() * chore: add extra String() in Error * feat: 新增listMeshes接口 * fix: copilot review --- app/dubbo-admin/dubbo-admin.yaml | 24 +- pkg/common/bizerror/common.go | 35 +- pkg/common/bizerror/error.go | 66 ++++ pkg/config/discovery/config.go | 23 +- pkg/console/component.go | 4 +- pkg/console/handler/application.go | 458 ++++--------------------- pkg/console/handler/auth.go | 38 +- pkg/console/handler/mesh.go | 43 +++ pkg/console/model/application.go | 12 + pkg/console/model/common.go | 28 +- pkg/console/model/condition_rule.go | 13 +- pkg/console/model/configurator_rule.go | 9 +- pkg/console/model/mesh.go | 23 ++ pkg/console/model/tag_rule.go | 8 +- pkg/console/router/router.go | 5 +- pkg/console/service/application.go | 408 ++++++++++++++++++++++ pkg/console/util/error.go | 41 +++ 17 files changed, 751 insertions(+), 487 deletions(-) create mode 100644 pkg/common/bizerror/error.go create mode 100644 pkg/console/handler/mesh.go create mode 100644 pkg/console/model/mesh.go create mode 100644 pkg/console/util/error.go diff --git a/app/dubbo-admin/dubbo-admin.yaml b/app/dubbo-admin/dubbo-admin.yaml index 932304ea8..178957721 100644 --- a/app/dubbo-admin/dubbo-admin.yaml +++ b/app/dubbo-admin/dubbo-admin.yaml @@ -39,19 +39,23 @@ console: store: type: memory discovery: - - type: nacos - id: nacos-44.33 - address: - registry: nacos://47.76.94.134:8848?username=nacos&password=nacos - configCenter: nacos://47.76.94.134:8848?username=nacos&password=nacos - metadataReport: nacos://47.76.94.134:8848?username=nacos&password=nacos - - - type: etcd - id: etcd-44.33 - address: http://127.0.0.1:2379 +# - type: nacos +# name: nacos-44.33 +# address: +# registry: nacos://47.76.94.134:8848?username=nacos&password=nacos +# configCenter: nacos://47.76.94.134:8848?username=nacos&password=nacos +# metadataReport: nacos://47.76.94.134:8848?username=nacos&password=nacos +# +# - type: etcd +# name: etcd-44.33 +# address: +# registry: http://127.0.0.1:2379 +# configCenter: http://127.0.0.1:2379 +# metadataReport: http://127.0.0.1:2379 # mock discovery is only for development - type: mock + name: mockRegistry engine: name: k8s1.28.6 type: kubernetes diff --git a/pkg/common/bizerror/common.go b/pkg/common/bizerror/common.go index 1f993c4b6..b8201e952 100644 --- a/pkg/common/bizerror/common.go +++ b/pkg/common/bizerror/common.go @@ -18,38 +18,15 @@ package bizerror import ( - "errors" "fmt" ) -type AssertionError struct { - msg string +func NewAssertionError(expected, actual interface{}) Error { + return NewBizError(UnknownError, fmt.Sprintf("type assertion error, expected:%v, actual:%v", expected, actual)) } - -func NewAssertionError(expected, actual interface{}) error { - return &AssertionError{ - msg: fmt.Sprintf("type assertion error, expected:%v, actual:%v", expected, actual), - } -} - -func (e *AssertionError) Error() string { - return e.msg -} - -type MeshNotFoundError struct { - Mesh string +func NewUnauthorizedError() Error { + return NewBizError(Unauthorized, "no access, please login") } - -func (m *MeshNotFoundError) Error() string { - return fmt.Sprintf("mesh of name %s is not found", m.Mesh) -} - -func MeshNotFound(meshName string) error { - return &MeshNotFoundError{meshName} -} - -func IsMeshNotFound(err error) bool { - var meshNotFoundError *MeshNotFoundError - ok := errors.As(err, &meshNotFoundError) - return ok +func MeshNotFoundError(mesh string) Error { + return NewBizError(UnknownError, fmt.Sprintf("mesh of name %s is not found", mesh)) } diff --git a/pkg/common/bizerror/error.go b/pkg/common/bizerror/error.go new file mode 100644 index 000000000..b65b023dc --- /dev/null +++ b/pkg/common/bizerror/error.go @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package bizerror + +type Error interface { + Code() ErrorCode + Message() string + Error() string + String() string +} + +type ErrorCode string + +const ( + UnknownError ErrorCode = "UnknownError" + InvalidArgument ErrorCode = "InvalidArgument" + StoreError ErrorCode = "StoreError" + AppNotFound ErrorCode = "AppNotFound" + Unauthorized ErrorCode = "Unauthorized" + SessionError ErrorCode = "SessionError" +) + +type bizError struct { + code ErrorCode + message string +} + +var _ Error = &bizError{} + +func NewBizError(code ErrorCode, message string) Error { + return &bizError{ + code: code, + message: message, + } +} + +func (b *bizError) Code() ErrorCode { + return b.code +} + +func (b *bizError) Message() string { + return b.message +} + +func (b *bizError) Error() string { + return b.String() +} + +func (b *bizError) String() string { + return string(b.code) + ": " + b.message +} diff --git a/pkg/config/discovery/config.go b/pkg/config/discovery/config.go index fe4dfd002..ee63eed42 100644 --- a/pkg/config/discovery/config.go +++ b/pkg/config/discovery/config.go @@ -17,7 +17,12 @@ package discovery -import "github.com/apache/dubbo-admin/pkg/config" +import ( + "github.com/duke-git/lancet/v2/strutil" + + "github.com/apache/dubbo-admin/pkg/common/bizerror" + "github.com/apache/dubbo-admin/pkg/config" +) type Type string @@ -31,9 +36,9 @@ const ( // Config defines Discovery configuration type Config struct { config.BaseConfig - Name string `json:"name"` - Type Type `json:"type"` - Address AddressConfig + Name string `json:"name"` + Type Type `json:"type"` + Address AddressConfig `json:"address"` } // AddressConfig defines Discovery Engine address @@ -54,3 +59,13 @@ func DefaultDiscoveryEnginConfig() *Config { }, } } + +func (c *Config) Validate() error { + if strutil.IsBlank(c.Name) { + return bizerror.NewBizError(bizerror.InvalidArgument, "discovery name is needed") + } + if strutil.IsBlank(string(c.Type)) { + return bizerror.NewBizError(bizerror.InvalidArgument, "discovery type is needed") + } + return nil +} diff --git a/pkg/console/component.go b/pkg/console/component.go index 1672b95f0..985b78f66 100644 --- a/pkg/console/component.go +++ b/pkg/console/component.go @@ -30,6 +30,7 @@ import ( "github.com/gin-gonic/gin" ui "github.com/apache/dubbo-admin/app/dubbo-ui" + "github.com/apache/dubbo-admin/pkg/common/bizerror" "github.com/apache/dubbo-admin/pkg/config/console" consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" @@ -130,7 +131,8 @@ func (c *consoleWebServer) authMiddleware() gin.HandlerFunc { session := sessions.Default(c) user := session.Get("user") if user == nil { - c.JSON(http.StatusUnauthorized, model.NewUnauthorizedResp()) + authErr := bizerror.NewBizError(bizerror.Unauthorized, "no access, please login") + c.JSON(http.StatusUnauthorized, model.NewBizErrorResp(authErr)) c.Abort() return } diff --git a/pkg/console/handler/application.go b/pkg/console/handler/application.go index 1eedc9069..4ad2985af 100644 --- a/pkg/console/handler/application.go +++ b/pkg/console/handler/application.go @@ -18,32 +18,29 @@ package handler import ( + "errors" "net/http" "strconv" "github.com/duke-git/lancet/v2/strutil" "github.com/gin-gonic/gin" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" "github.com/apache/dubbo-admin/pkg/console/service" - "github.com/apache/dubbo-admin/pkg/core/consts" - "github.com/apache/dubbo-admin/pkg/core/logger" - meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" - corestore "github.com/apache/dubbo-admin/pkg/core/store" + "github.com/apache/dubbo-admin/pkg/console/util" ) func GetApplicationDetail(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { req := &model.ApplicationDetailReq{} if err := c.ShouldBindQuery(req); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + util.HandleArgumentError(c, err) return } resp, err := service.GetApplicationDetail(ctx, req) if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) + util.HandleServiceError(c, err) return } c.JSON(http.StatusOK, model.NewSuccessResp(resp)) @@ -54,13 +51,13 @@ func GetApplicationTabInstanceInfo(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { req := model.NewApplicationTabInstanceInfoReq() if err := c.ShouldBindQuery(req); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + util.HandleArgumentError(c, err) return } resp, err := service.GetAppInstanceInfo(ctx, req) if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) + util.HandleServiceError(c, err) return } @@ -72,12 +69,12 @@ func GetApplicationServiceForm(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { req := model.NewApplicationServiceFormReq() if err := c.ShouldBindQuery(req); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + util.HandleArgumentError(c, err) return } resp, err := service.GetAppServiceInfo(ctx, req) if err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + util.HandleServiceError(c, err) return } c.JSON(http.StatusOK, model.NewSuccessResp(resp)) @@ -88,468 +85,159 @@ func ApplicationSearch(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { req := model.NewApplicationSearchReq() if err := c.ShouldBindQuery(req); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + util.HandleArgumentError(c, err) return } resp, err := service.SearchApplications(ctx, req) if err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + util.HandleServiceError(c, err) return } c.JSON(http.StatusOK, model.NewSuccessResp(resp)) } } -func isAppOperatorLogOpened(conf *meshproto.OverrideConfig, appName string) bool { - if conf.Side != consts.SideProvider || - conf.Parameters == nil || - conf.Match == nil || - conf.Match.Application == nil || - conf.Match.Application.Oneof == nil || - len(conf.Match.Application.Oneof) != 1 || - conf.Match.Application.Oneof[0].Exact != appName { - return false - } else if val, ok := conf.Parameters[`accesslog`]; !ok || val != `true` { - return false - } - return true -} - -func ApplicationConfigOperatorLogPut(ctx consolectx.Context) gin.HandlerFunc { +func ApplicationConfigAccessLogPut(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - var ( - appName string - operatorLogOpen bool - isNotExist = false - mesh string - ) - appName = c.Query("appName") - mesh = c.Query("mesh") - operatorLogOpen, err := strconv.ParseBool(c.Query("operatorLog")) - if err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + appName := c.Query("appName") + if strutil.IsBlank(appName) { + util.HandleArgumentError(c, errors.New("appName is required")) return } - appConfiguratorName := appName + consts.ConfiguratorRuleSuffix - res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) - if err != nil { - if corestore.IsResourceNotFound(err) { - // check app exists - data, err := service.GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: appName}) - if err != nil || data == nil { - c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) - return - } - res = meshresource.NewDynamicConfigResourceWithAttributes(appConfiguratorName, mesh) - res.Spec = &meshproto.DynamicConfig{ - Key: appName, - Scope: consts.ScopeApplication, - ConfigVersion: consts.ConfiguratorVersionV3, - Enabled: true, - Configs: make([]*meshproto.OverrideConfig, 0), - } - isNotExist = true - } else { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } + mesh := c.Query("mesh") + if strutil.IsBlank(mesh) { + util.HandleArgumentError(c, errors.New("mesh is required")) + return } - // append or remove - if operatorLogOpen { - // check is already exist - alreadyExist := false - res.Spec.RangeConfig(func(conf *meshproto.OverrideConfig) (isStop bool) { - alreadyExist = isAppOperatorLogOpened(conf, appName) - return alreadyExist - }) - if alreadyExist { - c.JSON(http.StatusOK, model.NewSuccessResp(nil)) - return - } - if res.Spec.Configs == nil { - res.Spec.Configs = make([]*meshproto.OverrideConfig, 0) - } - res.Spec.Configs = append(res.Spec.Configs, &meshproto.OverrideConfig{ - Side: consts.SideProvider, - Parameters: map[string]string{`accesslog`: `true`}, - Enabled: true, - Match: &meshproto.ConditionMatch{ - Application: &meshproto.ListStringMatch{ - Oneof: []*meshproto.StringMatch{ - { - Exact: appName, - }, - }}}, - XGenerateByCp: true, - }) - } else { - res.Spec.RangeConfigsToRemove(func(conf *meshproto.OverrideConfig) (IsRemove bool) { - if conf == nil { - return true - } - return isAppOperatorLogOpened(conf, appName) - }) + operatorLogOpen, err := strconv.ParseBool(c.Query("operatorLog")) + if err != nil { + util.HandleArgumentError(c, err) + return } - // restore - if isNotExist { - err = service.CreateConfigurator(ctx, appName, res) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } - } else { - err = service.UpdateConfigurator(ctx, appName, res) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } + if err := service.UpInsertAppAccessLog(ctx, appName, operatorLogOpen, mesh); err != nil { + util.HandleServiceError(c, err) + return } - c.JSON(http.StatusOK, model.NewSuccessResp(nil)) + c.JSON(http.StatusOK, model.NewSuccessResp(true)) } } -func ApplicationConfigOperatorLogGet(ctx consolectx.Context) gin.HandlerFunc { +func ApplicationConfigAccessLogGet(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { appName := c.Query("appName") - if appName == "" { - c.JSON(http.StatusBadRequest, model.NewErrorResp("appName is required")) + if strutil.IsBlank(appName) { + util.HandleArgumentError(c, errors.New("appName is required")) return } mesh := c.Query("mesh") if strutil.IsBlank(mesh) { - c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is required")) + util.HandleArgumentError(c, errors.New("mesh is required")) return } - appConfiguratorName := appName + consts.ConfiguratorRuleSuffix - res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) + resp, err := service.GetAppAccessLog(ctx, appName, mesh) if err != nil { - if corestore.IsResourceNotFound(err) { - c.JSON(http.StatusOK, model.NewSuccessResp(map[string]interface{}{"operatorLog": false})) - return - } - c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) + util.HandleServiceError(c, err) return } - isExist := false - res.Spec.RangeConfig(func(conf *meshproto.OverrideConfig) (isStop bool) { - if isExist = isAppOperatorLogOpened(conf, appName); isExist { - return true - } - return false - }) - c.JSON(http.StatusOK, model.NewSuccessResp(map[string]interface{}{"operatorLog": isExist})) + c.JSON(http.StatusOK, model.NewSuccessResp(resp)) } } func ApplicationConfigFlowWeightGET(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - var ( - appName string - mesh string - resp = struct { - FlowWeightSets []model.FlowWeightSet `json:"flowWeightSets"` - }{} - ) - appName = c.Query("appName") - mesh = c.Query("mesh") - if appName == "" { - c.JSON(http.StatusBadRequest, model.NewErrorResp("appName is required")) + appName := c.Query("appName") + mesh := c.Query("mesh") + if strutil.IsBlank(appName) { + util.HandleArgumentError(c, errors.New("appName is required")) return } - - resp.FlowWeightSets = make([]model.FlowWeightSet, 0) - appConfiguratorName := appName + consts.ConfiguratorRuleSuffix - res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) - if err != nil { - if corestore.IsResourceNotFound(err) { - c.JSON(http.StatusOK, model.NewSuccessResp(resp)) - return - } - c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) + if strutil.IsBlank(mesh) { + util.HandleArgumentError(c, errors.New("mesh is required")) return } - - weight := 0 - res.Spec.RangeConfig(func(conf *meshproto.OverrideConfig) (isStop bool) { - if isFlowWeight(conf) { - weight, err = strconv.Atoi(conf.Parameters[`weight`]) - if err != nil { - logger.Error("parse weight failed", err) - return true - } - scope := make([]model.ParamMatch, 0, len(conf.Match.Param)) - for _, param := range conf.Match.Param { - scope = append(scope, model.ParamMatch{ - Key: ¶m.Key, - Value: model.StringMatchToModelStringMatch(param.Value), - }) - } - - resp.FlowWeightSets = append(resp.FlowWeightSets, model.FlowWeightSet{ - Weight: int32(weight), - Scope: scope, - }) - } - return false - }) + resp, err := service.GetAppFlowWeight(ctx, appName, mesh) if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) + util.HandleServiceError(c, err) return } c.JSON(http.StatusOK, model.NewSuccessResp(resp)) } } -func isFlowWeight(conf *meshproto.OverrideConfig) bool { - if conf.Side != consts.SideProvider || - conf.Parameters == nil || - conf.Match == nil || - conf.Match.Param == nil { - return false - } else if _, ok := conf.Parameters[`weight`]; !ok { - return false - } - return true -} - func ApplicationConfigFlowWeightPUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - var ( - appName string - mesh string - body = struct { - FlowWeightSets []model.FlowWeightSet `json:"flowWeightSets"` - }{} - ) - appName = c.Query("appName") - mesh = c.Query("mesh") + body := struct { + FlowWeightSets []model.FlowWeightSet `json:"flowWeightSets"` + }{} + appName := c.Query("appName") + mesh := c.Query("mesh") if strutil.IsBlank(appName) { - c.JSON(http.StatusBadRequest, model.NewErrorResp("application name is required")) + util.HandleArgumentError(c, errors.New("appName is required")) + return } if strutil.IsBlank(mesh) { - c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is required")) + util.HandleArgumentError(c, errors.New("mesh is required")) return } if err := c.Bind(&body); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + util.HandleArgumentError(c, err) return } - // get from store, or generate default resource - isNotExist := false - appConfiguratorName := appName + consts.ConfiguratorRuleSuffix - res, err := service.GetConfigurator(ctx, appConfiguratorName, mesh) + err := service.UpInsertAppFlowWeightConfig(ctx, appName, mesh, body.FlowWeightSets) if err != nil { - if corestore.IsResourceNotFound(err) { - // for check app exist - data, err := service.GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: appName}) - if err != nil { - c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) - return - } else if data == nil { - c.JSON(http.StatusNotFound, model.NewErrorResp("application not found")) - return - } - res = meshresource.NewDynamicConfigResourceWithAttributes(appConfiguratorName, mesh) - res.Spec = &meshproto.DynamicConfig{ - Key: appName, - Scope: consts.ScopeApplication, - ConfigVersion: consts.ConfiguratorVersionV3, - Enabled: true, - Configs: make([]*meshproto.OverrideConfig, 0), - } - isNotExist = true - } else { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } - } - - // remove old - res.Spec.RangeConfigsToRemove(func(conf *meshproto.OverrideConfig) (IsRemove bool) { - return isFlowWeight(conf) - }) - // append new - for _, set := range body.FlowWeightSets { - paramMatch := make([]*meshproto.ParamMatch, 0, len(set.Scope)) - for _, match := range set.Scope { - paramMatch = append(paramMatch, &meshproto.ParamMatch{ - Key: *match.Key, - Value: model.ModelStringMatchToStringMatch(match.Value), - }) - } - res.Spec.Configs = append(res.Spec.Configs, &meshproto.OverrideConfig{ - Side: consts.SideProvider, - Parameters: map[string]string{`weight`: strconv.Itoa(int(set.Weight))}, - Match: &meshproto.ConditionMatch{ - Param: paramMatch, - }, - XGenerateByCp: true, - }) - } - // restore - if isNotExist { - err = service.CreateConfigurator(ctx, appName, res) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } - } else { - err = service.UpdateConfigurator(ctx, appName, res) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } + util.HandleServiceError(c, err) + return } - c.JSON(http.StatusOK, model.NewSuccessResp(nil)) + c.JSON(http.StatusOK, model.NewSuccessResp(true)) } } func ApplicationConfigGrayGET(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - var ( - appName string - mesh string - resp = struct { - GraySets []model.GraySet `json:"graySets"` - }{} - ) - appName = c.Query("appName") - mesh = c.Query("mesh") + appName := c.Query("appName") + mesh := c.Query("mesh") if strutil.IsBlank(appName) { - c.JSON(http.StatusBadRequest, model.NewErrorResp("appName is required")) + util.HandleArgumentError(c, errors.New("appName is required")) return } if strutil.IsBlank(mesh) { - c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is required")) + util.HandleArgumentError(c, errors.New("mesh is required")) return } - serviceTagRuleName := appName + consts.TagRuleSuffix - res, err := service.GetTagRule(ctx, serviceTagRuleName, mesh) + resp, err := service.GetGrayConfig(ctx, appName, mesh) if err != nil { - if corestore.IsResourceNotFound(err) { - resp.GraySets = make([]model.GraySet, 0) - c.JSON(http.StatusOK, model.NewSuccessResp(resp)) - return - } - c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) + util.HandleServiceError(c, err) return } - resp.GraySets = make([]model.GraySet, 0, len(res.Spec.Tags)) - - res.Spec.RangeTags(func(tag *meshproto.Tag) (isStop bool) { - if isGrayTag(tag) { - scope := make([]model.ParamMatch, 0, len(tag.Match)) - for _, paramMatch := range tag.Match { - scope = append(scope, model.ParamMatch{ - Key: ¶mMatch.Key, - Value: model.StringMatchToModelStringMatch(paramMatch.Value), - }) - } - resp.GraySets = append(resp.GraySets, model.GraySet{ - EnvName: tag.Name, - Scope: scope, - }) - } - return false - }) - c.JSON(http.StatusOK, model.NewSuccessResp(resp)) } } func ApplicationConfigGrayPUT(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { - var ( - appName string - mesh string - body = struct { - GraySets []model.GraySet `json:"graySets"` - }{} - ) - appName = c.Query("appName") - mesh = c.Query("mesh") + body := struct { + GraySets []model.GraySet `json:"graySets"` + }{} + appName := c.Query("appName") + mesh := c.Query("mesh") if strutil.IsBlank(appName) { - c.JSON(http.StatusBadRequest, model.NewErrorResp("application name is required")) + util.HandleArgumentError(c, errors.New("appName is required")) return } if strutil.IsBlank(mesh) { - c.JSON(http.StatusBadRequest, model.NewErrorResp("mesh is required")) + util.HandleArgumentError(c, errors.New("mesh is required")) return } if err := c.Bind(&body); err != nil { - c.JSON(http.StatusBadRequest, model.NewErrorResp(err.Error())) + util.HandleArgumentError(c, err) + return } - - isNotExist := false - serviceTagRuleName := appName + consts.TagRuleSuffix - res, err := service.GetTagRule(ctx, serviceTagRuleName, mesh) + err := service.UpInsertAppGrayConfig(ctx, appName, mesh, body.GraySets) if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - } - if res == nil { - data, err := service.GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: appName, Mesh: mesh}) - if err != nil { - c.JSON(http.StatusNotFound, model.NewErrorResp(err.Error())) - return - } else if data == nil { - c.JSON(http.StatusNotFound, model.NewErrorResp("application not found")) - return - } - - res = meshresource.NewTagRouteResourceWithAttributes(serviceTagRuleName, mesh) - res.Spec = &meshproto.TagRoute{ - Enabled: true, - Key: appName, - ConfigVersion: consts.ConfiguratorVersionV3, - Force: false, - Tags: make([]*meshproto.Tag, 0), - } - isNotExist = true - } - - // remove old config, generate config from admin, append - res.Spec.RangeTagsToRemove(func(tag *meshproto.Tag) (IsRemove bool) { - return isGrayTag(tag) - }) - newTags := make([]*meshproto.Tag, 0) - for _, set := range body.GraySets { - paramMatches := make([]*meshproto.ParamMatch, 0, len(set.Scope)) - for _, match := range set.Scope { - paramMatches = append(paramMatches, &meshproto.ParamMatch{ - Key: *match.Key, - Value: model.ModelStringMatchToStringMatch(match.Value), - }) - } - newTags = append(newTags, &meshproto.Tag{ - Name: set.EnvName, - Match: paramMatches, - XGenerateByCp: true, - }) - } - res.Spec.Tags = append(res.Spec.Tags, newTags...) - - // restore - if isNotExist { - err = service.CreateTagRule(ctx, res) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } - } else { - err = service.UpdateTagRule(ctx, res) - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - return - } + util.HandleServiceError(c, err) + return } - c.JSON(http.StatusOK, model.NewSuccessResp(nil)) - } -} - -func isGrayTag(tag *meshproto.Tag) bool { - if tag.Name == "" || tag.Addresses != nil || len(tag.Addresses) != 0 { - return false + c.JSON(http.StatusOK, model.NewSuccessResp(true)) } - return true } diff --git a/pkg/console/handler/auth.go b/pkg/console/handler/auth.go index dc1777e4c..0ec4dcf76 100644 --- a/pkg/console/handler/auth.go +++ b/pkg/console/handler/auth.go @@ -23,6 +23,7 @@ import ( "github.com/gin-contrib/sessions" "github.com/gin-gonic/gin" + "github.com/apache/dubbo-admin/pkg/common/bizerror" consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" ) @@ -33,21 +34,24 @@ func Login(ctx consolectx.Context) gin.HandlerFunc { password := c.PostForm("password") // verify username and password authCfg := ctx.Config().Console.Auth - if user == authCfg.User && password == authCfg.Password { - session := sessions.Default(c) - session.Set("user", user) - session.Options(sessions.Options{ - MaxAge: authCfg.ExpirationTime, - Path: "/", - }) - err := session.Save() - if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) - } - c.JSON(http.StatusOK, model.NewSuccessResp(nil)) - } else { - c.JSON(http.StatusUnauthorized, model.NewUnauthorizedResp()) + if user != authCfg.User || password != authCfg.Password { + authErr := bizerror.NewBizError(bizerror.Unauthorized, "username or password is not correct!") + c.JSON(http.StatusUnauthorized, model.NewBizErrorResp(authErr)) + return } + session := sessions.Default(c) + session.Set("user", user) + session.Options(sessions.Options{ + MaxAge: authCfg.ExpirationTime, + Path: "/", + }) + err := session.Save() + if err != nil { + sessionErr := bizerror.NewBizError(bizerror.SessionError, err.Error()) + c.JSON(http.StatusOK, model.NewBizErrorResp(sessionErr)) + return + } + c.JSON(http.StatusOK, model.NewSuccessResp(true)) } } @@ -57,8 +61,10 @@ func Logout(_ consolectx.Context) gin.HandlerFunc { session.Clear() err := session.Save() if err != nil { - c.JSON(http.StatusInternalServerError, model.NewErrorResp(err.Error())) + sessionErr := bizerror.NewBizError(bizerror.SessionError, err.Error()) + c.JSON(http.StatusOK, model.NewBizErrorResp(sessionErr)) + return } - c.JSON(http.StatusOK, model.NewSuccessResp(nil)) + c.JSON(http.StatusOK, model.NewSuccessResp(true)) } } diff --git a/pkg/console/handler/mesh.go b/pkg/console/handler/mesh.go new file mode 100644 index 000000000..3ebee0f9c --- /dev/null +++ b/pkg/console/handler/mesh.go @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package handler + +import ( + "net/http" + + "github.com/duke-git/lancet/v2/slice" + "github.com/gin-gonic/gin" + + discoverycfg "github.com/apache/dubbo-admin/pkg/config/discovery" + consolectx "github.com/apache/dubbo-admin/pkg/console/context" + "github.com/apache/dubbo-admin/pkg/console/model" +) + +// ListMeshes list all meshes(discoveries) defined in config +func ListMeshes(ctx consolectx.Context) gin.HandlerFunc { + return func(c *gin.Context) { + discoveries := ctx.Config().Discovery + meshes := slice.Map(discoveries, func(index int, item *discoverycfg.Config) model.MeshResp { + return model.MeshResp{ + Name: item.Name, + Type: string(item.Type), + } + }) + c.JSON(http.StatusOK, model.NewSuccessResp(meshes)) + } +} diff --git a/pkg/console/model/application.go b/pkg/console/model/application.go index 3720de368..5b02b674b 100644 --- a/pkg/console/model/application.go +++ b/pkg/console/model/application.go @@ -195,3 +195,15 @@ type GraySet struct { EnvName string `json:"name,omitempty"` Scope []ParamMatch `json:"scope,omitempty"` } + +type AppAccessLogConfigResp struct { + AccessLog bool `json:"operatorLog"` +} + +type AppFlowWeightConfigResp struct { + FlowWeightSets []FlowWeightSet `json:"flowWeightSets"` +} + +type AppGrayConfigResp struct { + GraySets []GraySet `json:"graySets"` +} diff --git a/pkg/console/model/common.go b/pkg/console/model/common.go index 7a11ea86f..18ab50b32 100644 --- a/pkg/console/model/common.go +++ b/pkg/console/model/common.go @@ -17,21 +17,18 @@ package model -import coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" - -const ( - successCode = 200 - unauthorizedCode = 401 - errorCode = 500 +import ( + "github.com/apache/dubbo-admin/pkg/common/bizerror" + coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) type CommonResp struct { - Code int `json:"code"` + Code string `json:"code"` Msg string `json:"msg"` Data any `json:"data"` } -func (r *CommonResp) WithCode(code int) *CommonResp { +func (r *CommonResp) WithCode(code string) *CommonResp { r.Code = code return r } @@ -48,24 +45,25 @@ func (r *CommonResp) WithData(data any) *CommonResp { func NewSuccessResp(data any) *CommonResp { return &CommonResp{ - Code: successCode, + Code: "Success", Msg: "success", Data: data, } } -func NewUnauthorizedResp() *CommonResp { +// NewErrorResp TODO replace with NewBizErrorResp +func NewErrorResp(msg string) *CommonResp { return &CommonResp{ - Code: unauthorizedCode, - Msg: "UnAuthorized, please login", + Code: string(bizerror.UnknownError), + Msg: msg, Data: nil, } } -func NewErrorResp(msg string) *CommonResp { +func NewBizErrorResp(err bizerror.Error) *CommonResp { return &CommonResp{ - Code: errorCode, - Msg: msg, + Code: string(err.Code()), + Msg: err.Message(), Data: nil, } } diff --git a/pkg/console/model/condition_rule.go b/pkg/console/model/condition_rule.go index e13d7e2ce..42bb6bc6b 100644 --- a/pkg/console/model/condition_rule.go +++ b/pkg/console/model/condition_rule.go @@ -18,7 +18,6 @@ package model import ( - "net/http" "strings" meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" @@ -209,11 +208,7 @@ func matchValueToDestinationCondition(val string) []DestinationCondition { func GenConditionRuleToResp(data *meshproto.ConditionRoute) *CommonResp { if data == nil { - return &CommonResp{ - Code: http.StatusNotFound, - Msg: "not found", - Data: map[string]string{}, - } + return NewSuccessResp(nil) } if pb := data.ToConditionRouteV3(); pb != nil { return NewSuccessResp(ConditionRuleResp{ @@ -249,11 +244,7 @@ func GenConditionRuleToResp(data *meshproto.ConditionRoute) *CommonResp { } return NewSuccessResp(res) } else { - return &CommonResp{ - Code: http.StatusInternalServerError, - Msg: "invalid condition rule", - Data: data, - } + return NewErrorResp("invalid condition rule") } } diff --git a/pkg/console/model/configurator_rule.go b/pkg/console/model/configurator_rule.go index facced62a..677f742eb 100644 --- a/pkg/console/model/configurator_rule.go +++ b/pkg/console/model/configurator_rule.go @@ -18,8 +18,6 @@ package model import ( - "net/http" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" ) @@ -101,7 +99,7 @@ type RespAddressMatch struct { } func GenDynamicConfigToResp(pb *meshproto.DynamicConfig) (res *CommonResp) { - cfg := RespConfigurator{} + cfg := &RespConfigurator{} if pb != nil { cfg.ConfigVersion = pb.ConfigVersion cfg.Key = pb.Key @@ -110,10 +108,7 @@ func GenDynamicConfigToResp(pb *meshproto.DynamicConfig) (res *CommonResp) { cfg.Configs = overrideConfigToRespConfigItem(pb.Configs) return NewSuccessResp(cfg) } - return &CommonResp{ - Code: http.StatusNotFound, - Msg: "configurator not found", - } + return NewSuccessResp(nil) } func overrideConfigToRespConfigItem(OverrideConfigs []*meshproto.OverrideConfig) []ConfigItem { diff --git a/pkg/console/model/mesh.go b/pkg/console/model/mesh.go new file mode 100644 index 000000000..7ee9e5387 --- /dev/null +++ b/pkg/console/model/mesh.go @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package model + +type MeshResp struct { + Name string `json:"name"` + Type string `json:"type"` +} diff --git a/pkg/console/model/tag_rule.go b/pkg/console/model/tag_rule.go index 7bdf1ecde..6890ef1f6 100644 --- a/pkg/console/model/tag_rule.go +++ b/pkg/console/model/tag_rule.go @@ -18,8 +18,6 @@ package model import ( - "net/http" - meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" "github.com/apache/dubbo-admin/pkg/core/consts" ) @@ -47,11 +45,7 @@ type RespTagElement struct { func GenTagRouteResp(pb *meshproto.TagRoute) *CommonResp { if pb == nil { - return &CommonResp{ - Code: http.StatusNotFound, - Msg: "tag rule not found", - Data: "", - } + return NewSuccessResp(nil) } else { return NewSuccessResp(TagRuleResp{ ConfigVersion: pb.ConfigVersion, diff --git a/pkg/console/router/router.go b/pkg/console/router/router.go index 334f9fee4..f83706997 100644 --- a/pkg/console/router/router.go +++ b/pkg/console/router/router.go @@ -67,8 +67,8 @@ func InitRouter(r *gin.Engine, ctx consolectx.Context) { application.GET("/search", handler.ApplicationSearch(ctx)) { applicationConfig := application.Group("/config") - applicationConfig.PUT("/operatorLog", handler.ApplicationConfigOperatorLogPut(ctx)) - applicationConfig.GET("/operatorLog", handler.ApplicationConfigOperatorLogGet(ctx)) + applicationConfig.PUT("/operatorLog", handler.ApplicationConfigAccessLogPut(ctx)) + applicationConfig.GET("/operatorLog", handler.ApplicationConfigAccessLogGet(ctx)) applicationConfig.GET("/flowWeight", handler.ApplicationConfigFlowWeightGET(ctx)) applicationConfig.PUT("/flowWeight", handler.ApplicationConfigFlowWeightPUT(ctx)) @@ -139,4 +139,5 @@ func InitRouter(r *gin.Engine, ctx consolectx.Context) { router.GET("/search", handler.BannerGlobalSearch(ctx)) router.GET("/overview", handler.ClusterOverview(ctx)) router.GET("/metadata", handler.AdminMetadata(ctx)) + router.GET("/meshes", handler.ListMeshes(ctx)) } diff --git a/pkg/console/service/application.go b/pkg/console/service/application.go index d78f512a9..836c7019f 100644 --- a/pkg/console/service/application.go +++ b/pkg/console/service/application.go @@ -18,13 +18,19 @@ package service import ( + "fmt" + "strconv" + "github.com/duke-git/lancet/v2/maputil" "github.com/duke-git/lancet/v2/slice" "github.com/duke-git/lancet/v2/strutil" + meshproto "github.com/apache/dubbo-admin/api/mesh/v1alpha1" + "github.com/apache/dubbo-admin/pkg/common/bizerror" consolectx "github.com/apache/dubbo-admin/pkg/console/context" "github.com/apache/dubbo-admin/pkg/console/model" "github.com/apache/dubbo-admin/pkg/core/consts" + "github.com/apache/dubbo-admin/pkg/core/logger" "github.com/apache/dubbo-admin/pkg/core/manager" meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" coremodel "github.com/apache/dubbo-admin/pkg/core/resource/model" @@ -267,3 +273,405 @@ func buildApplicationSearchResp(appResource *meshresource.ApplicationResource, m RegistryClusters: []string{mesh}, } } + +func isAppAccessLogConfig(conf *meshproto.OverrideConfig, appName string) bool { + if conf.Side != consts.SideProvider || + conf.Parameters == nil || + conf.Match == nil || + conf.Match.Application == nil || + conf.Match.Application.Oneof == nil || + len(conf.Match.Application.Oneof) != 1 || + conf.Match.Application.Oneof[0].Exact != appName { + return false + } + if _, ok := conf.Parameters[`accesslog`]; !ok { + return false + } + return true +} + +func UpInsertAppAccessLog(ctx consolectx.Context, appName string, openAccessLog bool, mesh string) error { + // check app exists + data, err := GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: appName}) + if err != nil { + return err + } + if data == nil { + return bizerror.NewBizError(bizerror.AppNotFound, fmt.Sprintf("%s does not exist", appName)) + } + // check app configurator exists + appConfiguratorName := appName + consts.ConfiguratorRuleSuffix + res, err := GetConfigurator(ctx, appConfiguratorName, mesh) + if err != nil { + return err + } + // if not exists, create one configurator with access log enable + if res == nil { + return insertConfiguratorWithAccessLog(ctx, res, openAccessLog, appConfiguratorName, appName, mesh) + } + // else we update the configurator + return updateConfiguratorWithAccessLog(ctx, res, openAccessLog, appConfiguratorName, appName, mesh) +} + +func insertConfiguratorWithAccessLog(ctx consolectx.Context, res *meshresource.DynamicConfigResource, openAccessLog bool, + appConfiguratorName, appName, mesh string) error { + // configurator is nil, accessLog is already closed + if !openAccessLog { + return nil + } + res = meshresource.NewDynamicConfigResourceWithAttributes(appConfiguratorName, mesh) + res.Spec = &meshproto.DynamicConfig{ + Key: appName, + Scope: consts.ScopeApplication, + ConfigVersion: consts.ConfiguratorVersionV3, + Enabled: true, + Configs: make([]*meshproto.OverrideConfig, 0), + } + res.Spec.Configs = append(res.Spec.Configs, newAccessLogEnabledConfig(appName)) + err := CreateConfigurator(ctx, appConfiguratorName, res) + if err != nil { + logger.Errorf("create configurator failed when open accesslog, resourceKey: %s, openAccessLog: %t, err: %s", + coremodel.BuildResourceKey(mesh, appName), openAccessLog, err) + return err + } + return nil +} + +func updateConfiguratorWithAccessLog(ctx consolectx.Context, res *meshresource.DynamicConfigResource, openAccessLog bool, + appConfiguratorName, appName, mesh string) error { + var accessLogConfig *meshproto.OverrideConfig + res.Spec.RangeConfig(func(conf *meshproto.OverrideConfig) (isStop bool) { + if isAppAccessLogConfig(conf, appName) { + accessLogConfig = conf + return true + } + return false + }) + // access log config not found + if accessLogConfig == nil { + // access log needs to be closed and already closed + if !openAccessLog { + return nil + } + // insert a access log enabled config + res.Spec.Configs = append(res.Spec.Configs, newAccessLogEnabledConfig(appName)) + } else { + // access log config found and status is the same as needed + if accessLogConfig.Enabled == openAccessLog { + return nil + } + // update the access log enabled status as needed + accessLogConfig.Enabled = openAccessLog + } + err := UpdateConfigurator(ctx, appConfiguratorName, res) + if err != nil { + logger.Errorf("update configurator failed when opening accesslog, resourceKey: %s, openAccessLog: %t, err: %s", + coremodel.BuildResourceKey(mesh, appName), openAccessLog, err) + return err + } + return nil +} + +func newAccessLogEnabledConfig(appName string) *meshproto.OverrideConfig { + return &meshproto.OverrideConfig{ + Side: consts.SideProvider, + Parameters: map[string]string{`accesslog`: `true`}, + Enabled: true, + Match: &meshproto.ConditionMatch{ + Application: &meshproto.ListStringMatch{ + Oneof: []*meshproto.StringMatch{ + { + Exact: appName, + }, + }}}, + XGenerateByCp: true, + } +} + +func GetAppAccessLog(ctx consolectx.Context, appName string, mesh string) (*model.AppAccessLogConfigResp, error) { + appConfiguratorName := appName + consts.ConfiguratorRuleSuffix + res, err := GetConfigurator(ctx, appConfiguratorName, mesh) + resp := &model.AppAccessLogConfigResp{ + AccessLog: false, + } + if err != nil { + logger.Errorf("get configurator failed when get app accesslog, resourceKey: %s, err: %s", + coremodel.BuildResourceKey(mesh, appName), err) + return nil, err + } + if res == nil { + return resp, nil + } + var appAccessLogConfig *meshproto.OverrideConfig + res.Spec.RangeConfig(func(conf *meshproto.OverrideConfig) (isStop bool) { + if isAppAccessLogConfig(conf, appName) { + appAccessLogConfig = conf + return true + } + return false + }) + if appAccessLogConfig == nil { + return resp, nil + } + resp.AccessLog = appAccessLogConfig.Enabled + return resp, nil +} + +func GetAppFlowWeight(ctx consolectx.Context, appName string, mesh string) (*model.AppFlowWeightConfigResp, error) { + resp := &model.AppFlowWeightConfigResp{ + FlowWeightSets: []model.FlowWeightSet{}, + } + appConfiguratorName := appName + consts.ConfiguratorRuleSuffix + res, err := GetConfigurator(ctx, appConfiguratorName, mesh) + if err != nil { + logger.Errorf("get configurator failed when get app flow weight, resourceKey: %s, err: %s", + coremodel.BuildResourceKey(mesh, appName), err) + return nil, err + } + if res == nil { + return resp, nil + } + + weight := 0 + res.Spec.RangeConfig(func(conf *meshproto.OverrideConfig) (isStop bool) { + if isFlowWeightConfig(conf) { + weight, err = strconv.Atoi(conf.Parameters[`weight`]) + if err != nil { + logger.Error("parse weight failed", err) + return true + } + scope := make([]model.ParamMatch, 0, len(conf.Match.Param)) + for _, param := range conf.Match.Param { + scope = append(scope, model.ParamMatch{ + Key: ¶m.Key, + Value: model.StringMatchToModelStringMatch(param.Value), + }) + } + + resp.FlowWeightSets = append(resp.FlowWeightSets, model.FlowWeightSet{ + Weight: int32(weight), + Scope: scope, + }) + } + return false + }) + return resp, nil +} + +func isFlowWeightConfig(conf *meshproto.OverrideConfig) bool { + if conf.Side != consts.SideProvider || + conf.Parameters == nil || + conf.Match == nil || + conf.Match.Param == nil { + return false + } + if _, ok := conf.Parameters[`weight`]; !ok { + return false + } + return true +} + +func UpInsertAppFlowWeightConfig(ctx consolectx.Context, appName string, mesh string, flowWeightSets []model.FlowWeightSet) error { + // check app exists + data, err := GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: appName}) + if err != nil { + return err + } + if data == nil { + return bizerror.NewBizError(bizerror.AppNotFound, fmt.Sprintf("%s does not exist", appName)) + } + appConfiguratorName := appName + consts.ConfiguratorRuleSuffix + res, err := GetConfigurator(ctx, appConfiguratorName, mesh) + if err != nil { + logger.Errorf("get configurator failed when update app flow weight, resourceKey: %s, err: %s", + coremodel.BuildResourceKey(mesh, appName), err) + return err + } + // configurator not exists, insert a new one + if res == nil { + return insertConfiguratorWithFlowWeight(ctx, flowWeightSets, appName, appConfiguratorName, mesh) + } + // configurator exists, update it + + // remove old flow weight config + res.Spec.RangeConfigsToRemove(func(conf *meshproto.OverrideConfig) (IsRemove bool) { + return isFlowWeightConfig(conf) + }) + + // add new flow weight config + flowWeightConfigs := slice.Map(flowWeightSets, func(index int, set model.FlowWeightSet) *meshproto.OverrideConfig { + return fromFlowWeightSet(set) + }) + res.Spec.Configs = slice.Union(res.Spec.Configs, flowWeightConfigs) + + err = UpdateConfigurator(ctx, appConfiguratorName, res) + if err != nil { + logger.Errorf("update configurator failed with app flow weight, resourceKey: %s, err: %s", + coremodel.BuildResourceKey(mesh, appName), err) + return err + } + return nil +} + +func insertConfiguratorWithFlowWeight( + ctx consolectx.Context, + flowWeightSets []model.FlowWeightSet, + appName, appConfiguratorName, mesh string) error { + res := meshresource.NewDynamicConfigResourceWithAttributes(appConfiguratorName, mesh) + res.Spec = &meshproto.DynamicConfig{ + Key: appName, + Scope: consts.ScopeApplication, + ConfigVersion: consts.ConfiguratorVersionV3, + Enabled: true, + } + flowWeightConfigs := slice.Map(flowWeightSets, func(index int, set model.FlowWeightSet) *meshproto.OverrideConfig { + return fromFlowWeightSet(set) + }) + res.Spec.Configs = flowWeightConfigs + err := CreateConfigurator(ctx, appConfiguratorName, res) + if err != nil { + logger.Errorf("insert configurator failed with app flow weight, resourceKey: %s, err: %s", + coremodel.BuildResourceKey(mesh, appName), err) + return err + } + return nil +} + +func fromFlowWeightSet(set model.FlowWeightSet) *meshproto.OverrideConfig { + paramMatch := make([]*meshproto.ParamMatch, 0, len(set.Scope)) + for _, match := range set.Scope { + paramMatch = append(paramMatch, &meshproto.ParamMatch{ + Key: *match.Key, + Value: model.ModelStringMatchToStringMatch(match.Value), + }) + } + return &meshproto.OverrideConfig{ + Side: consts.SideProvider, + Parameters: map[string]string{`weight`: strconv.Itoa(int(set.Weight))}, + Match: &meshproto.ConditionMatch{ + Param: paramMatch, + }, + XGenerateByCp: true, + } +} +func GetGrayConfig(ctx consolectx.Context, appName string, mesh string) (*model.AppGrayConfigResp, error) { + resp := &model.AppGrayConfigResp{} + serviceTagRuleName := appName + consts.TagRuleSuffix + res, err := GetTagRule(ctx, serviceTagRuleName, mesh) + if err != nil { + logger.Errorf("get tag rule failed when get gray config, resourceKey: %s, err: %s", + coremodel.BuildResourceKey(mesh, appName), err) + return nil, err + } + if res == nil { + return resp, err + } + resp.GraySets = make([]model.GraySet, 0, len(res.Spec.Tags)) + + res.Spec.RangeTags(func(tag *meshproto.Tag) (isStop bool) { + if isGrayTag(tag) { + scope := make([]model.ParamMatch, 0, len(tag.Match)) + for _, paramMatch := range tag.Match { + scope = append(scope, model.ParamMatch{ + Key: ¶mMatch.Key, + Value: model.StringMatchToModelStringMatch(paramMatch.Value), + }) + } + resp.GraySets = append(resp.GraySets, model.GraySet{ + EnvName: tag.Name, + Scope: scope, + }) + } + return false + }) + return resp, nil +} + +func isGrayTag(tag *meshproto.Tag) bool { + if tag.Name == "" || len(tag.Addresses) != 0 { + return false + } + return true +} + +func UpInsertAppGrayConfig(ctx consolectx.Context, appName string, mesh string, graySets []model.GraySet) error { + serviceTagRuleName := appName + consts.TagRuleSuffix + res, err := GetTagRule(ctx, serviceTagRuleName, mesh) + if err != nil { + logger.Errorf("get tag rule failed when update app gray config, resourceKey: %s, err: %s", + coremodel.BuildResourceKey(mesh, appName), err) + return err + } + _, err = GetApplicationDetail(ctx, &model.ApplicationDetailReq{AppName: appName, Mesh: mesh}) + if err != nil { + return err + } + // tag rule not exists, insert a new one + if res == nil { + return insertTagRuleWithGrayConfig(ctx, graySets, appName, serviceTagRuleName, mesh) + } + // tag rule exists, update it + return updateTagRuleWithGrayConfig(ctx, graySets, res, appName, mesh) +} + +func insertTagRuleWithGrayConfig( + ctx consolectx.Context, + graySets []model.GraySet, + appName, serviceTagRuleName, mesh string) error { + res := meshresource.NewTagRouteResourceWithAttributes(serviceTagRuleName, mesh) + res.Spec = &meshproto.TagRoute{ + Enabled: true, + Key: appName, + ConfigVersion: consts.ConfiguratorVersionV3, + Force: false, + } + tags := slice.Map(graySets, func(index int, set model.GraySet) *meshproto.Tag { + return fromGraySet(set) + }) + res.Spec.Tags = tags + err := CreateTagRule(ctx, res) + if err != nil { + logger.Errorf("insert tag rule failed with app gray config, resourceKey: %s, err: %s", + coremodel.BuildResourceKey(mesh, appName), err) + return err + } + return nil +} + +func updateTagRuleWithGrayConfig( + ctx consolectx.Context, + graySets []model.GraySet, + res *meshresource.TagRouteResource, + appName string, mesh string) error { + // remove old config, generate config from admin, append + res.Spec.RangeTagsToRemove(func(tag *meshproto.Tag) (IsRemove bool) { + return isGrayTag(tag) + }) + tags := slice.Map(graySets, func(index int, set model.GraySet) *meshproto.Tag { + return fromGraySet(set) + }) + res.Spec.Tags = append(res.Spec.Tags, tags...) + err := UpdateTagRule(ctx, res) + if err != nil { + logger.Errorf("update tag rule failed with app gray config, resourceKey: %s, err: %s", + coremodel.BuildResourceKey(mesh, appName), err) + return err + } + return nil +} + +func fromGraySet(set model.GraySet) *meshproto.Tag { + paramMatches := make([]*meshproto.ParamMatch, 0, len(set.Scope)) + for _, match := range set.Scope { + paramMatches = append(paramMatches, &meshproto.ParamMatch{ + Key: *match.Key, + Value: model.ModelStringMatchToStringMatch(match.Value), + }) + } + + return &meshproto.Tag{ + Name: set.EnvName, + Match: paramMatches, + XGenerateByCp: true, + } +} diff --git a/pkg/console/util/error.go b/pkg/console/util/error.go new file mode 100644 index 000000000..62eb3287e --- /dev/null +++ b/pkg/console/util/error.go @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package util + +import ( + "errors" + "net/http" + + "github.com/gin-gonic/gin" + + "github.com/apache/dubbo-admin/pkg/common/bizerror" + "github.com/apache/dubbo-admin/pkg/console/model" +) + +func HandleServiceError(ctx *gin.Context, err error) { + var e bizerror.Error + if !errors.As(err, &e) { + e = bizerror.NewBizError(bizerror.UnknownError, err.Error()) + } + ctx.JSON(http.StatusOK, model.NewBizErrorResp(e)) +} + +func HandleArgumentError(ctx *gin.Context, err error) { + e := bizerror.NewBizError(bizerror.InvalidArgument, err.Error()) + ctx.JSON(http.StatusOK, model.NewBizErrorResp(e)) +} From 1e55d30635381f76d9e94478082a74b351887283 Mon Sep 17 00:00:00 2001 From: WyRainBow Date: Mon, 10 Nov 2025 20:57:05 +0800 Subject: [PATCH 09/40] Implment Counter in local cache (#1345) --- pkg/console/context/context.go | 14 ++ pkg/console/counter/component.go | 73 ++++++++ pkg/console/counter/counter.go | 104 +++++++++++ pkg/console/counter/manager.go | 306 +++++++++++++++++++++++++++++++ pkg/console/handler/overview.go | 11 +- pkg/console/model/overview.go | 12 +- pkg/core/bootstrap/bootstrap.go | 15 +- pkg/core/events/component.go | 6 +- 8 files changed, 530 insertions(+), 11 deletions(-) create mode 100644 pkg/console/counter/component.go create mode 100644 pkg/console/counter/counter.go create mode 100644 pkg/console/counter/manager.go diff --git a/pkg/console/context/context.go b/pkg/console/context/context.go index f423ca092..9133c4f93 100644 --- a/pkg/console/context/context.go +++ b/pkg/console/context/context.go @@ -21,12 +21,14 @@ import ( ctx "context" "github.com/apache/dubbo-admin/pkg/config/app" + "github.com/apache/dubbo-admin/pkg/console/counter" "github.com/apache/dubbo-admin/pkg/core/manager" "github.com/apache/dubbo-admin/pkg/core/runtime" ) type Context interface { ResourceManager() manager.ResourceManager + CounterManager() counter.CounterManager Config() app.AdminConfig @@ -57,3 +59,15 @@ func (c *context) ResourceManager() manager.ResourceManager { rmc, _ := c.coreRt.GetComponent(runtime.ResourceManager) return rmc.(manager.ResourceManagerComponent).ResourceManager() } + +func (c *context) CounterManager() counter.CounterManager { + comp, err := c.coreRt.GetComponent(counter.ComponentType) + if err != nil { + return nil + } + managerComp, ok := comp.(counter.ManagerComponent) + if !ok { + return nil + } + return managerComp.CounterManager() +} diff --git a/pkg/console/counter/component.go b/pkg/console/counter/component.go new file mode 100644 index 000000000..c38d7fe85 --- /dev/null +++ b/pkg/console/counter/component.go @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package counter + +import ( + "fmt" + "math" + + "github.com/apache/dubbo-admin/pkg/core/events" + "github.com/apache/dubbo-admin/pkg/core/runtime" +) + +const ComponentType runtime.ComponentType = "counter manager" + +func init() { + runtime.RegisterComponent(&managerComponent{}) +} + +type ManagerComponent interface { + runtime.Component + CounterManager() CounterManager +} + +var _ ManagerComponent = &managerComponent{} + +type managerComponent struct { + manager CounterManager +} + +func (c *managerComponent) Type() runtime.ComponentType { + return ComponentType +} + +func (c *managerComponent) Order() int { + return math.MaxInt - 1 +} + +func (c *managerComponent) Init(runtime.BuilderContext) error { + mgr := NewCounterManager() + c.manager = mgr + return nil +} + +func (c *managerComponent) Start(rt runtime.Runtime, _ <-chan struct{}) error { + component, err := rt.GetComponent(runtime.EventBus) + if err != nil { + return err + } + bus, ok := component.(events.EventBus) + if !ok { + return fmt.Errorf("component %s does not implement events.EventBus", runtime.EventBus) + } + return c.manager.Bind(bus) +} + +func (c *managerComponent) CounterManager() CounterManager { + return c.manager +} diff --git a/pkg/console/counter/counter.go b/pkg/console/counter/counter.go new file mode 100644 index 000000000..c32d35163 --- /dev/null +++ b/pkg/console/counter/counter.go @@ -0,0 +1,104 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package counter + +import ( + "sync" + "sync/atomic" +) + +type Counter struct { + name string + value atomic.Int64 +} + +func NewCounter(name string) *Counter { + return &Counter{name: name} +} + +func (c *Counter) Get() int64 { + return c.value.Load() +} + +func (c *Counter) Increment() { + c.value.Add(1) +} + +func (c *Counter) Decrement() { + for { + current := c.value.Load() + if current == 0 { + return + } + if c.value.CompareAndSwap(current, current-1) { + return + } + } +} + +func (c *Counter) Reset() { + c.value.Store(0) +} + +type DistributionCounter struct { + name string + data map[string]int64 + mu sync.RWMutex +} + +func NewDistributionCounter(name string) *DistributionCounter { + return &DistributionCounter{ + name: name, + data: make(map[string]int64), + } +} + +func (c *DistributionCounter) Increment(key string) { + c.mu.Lock() + defer c.mu.Unlock() + c.data[key]++ +} + +func (c *DistributionCounter) Decrement(key string) { + c.mu.Lock() + defer c.mu.Unlock() + if value, ok := c.data[key]; ok { + value-- + if value <= 0 { + delete(c.data, key) + } else { + c.data[key] = value + } + } +} + +func (c *DistributionCounter) GetAll() map[string]int64 { + c.mu.RLock() + defer c.mu.RUnlock() + result := make(map[string]int64, len(c.data)) + for k, v := range c.data { + result[k] = v + } + return result +} + +func (c *DistributionCounter) Reset() { + c.mu.Lock() + defer c.mu.Unlock() + c.data = make(map[string]int64) +} diff --git a/pkg/console/counter/manager.go b/pkg/console/counter/manager.go new file mode 100644 index 000000000..f9fb7ea3d --- /dev/null +++ b/pkg/console/counter/manager.go @@ -0,0 +1,306 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package counter + +import ( + "fmt" + + "k8s.io/client-go/tools/cache" + + "github.com/apache/dubbo-admin/pkg/core/events" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" + resmodel "github.com/apache/dubbo-admin/pkg/core/resource/model" +) + +type CounterType string + +type FieldExtractor func(resmodel.Resource) string + +const ( + ProtocolCounter CounterType = "protocol" + ReleaseCounter CounterType = "release" + DiscoveryCounter CounterType = "discovery" +) + +type CounterManager interface { + RegisterSimpleCounter(kind resmodel.ResourceKind) + RegisterDistributionCounter(kind resmodel.ResourceKind, metric CounterType, extractor FieldExtractor) + Count(kind resmodel.ResourceKind) int64 + Distribution(metric CounterType) map[string]int64 + Reset() + Bind(bus events.EventBus) error +} + +type distributionCounterConfig struct { + counterType CounterType + counter *DistributionCounter + extractor func(resmodel.Resource) string +} + +type counterManager struct { + simpleCounters map[resmodel.ResourceKind]*Counter + distributionConfigs map[resmodel.ResourceKind][]*distributionCounterConfig + distributionByType map[CounterType]*DistributionCounter +} + +func NewCounterManager() CounterManager { + return newCounterManager() +} + +func newCounterManager() *counterManager { + cm := &counterManager{ + simpleCounters: make(map[resmodel.ResourceKind]*Counter), + distributionConfigs: make(map[resmodel.ResourceKind][]*distributionCounterConfig), + distributionByType: make(map[CounterType]*DistributionCounter), + } + + cm.RegisterSimpleCounter(meshresource.ApplicationKind) + cm.RegisterSimpleCounter(meshresource.ServiceKind) + cm.RegisterSimpleCounter(meshresource.InstanceKind) + + cm.RegisterDistributionCounter(meshresource.InstanceKind, ProtocolCounter, instanceProtocolKey) + cm.RegisterDistributionCounter(meshresource.InstanceKind, ReleaseCounter, instanceReleaseKey) + cm.RegisterDistributionCounter(meshresource.InstanceKind, DiscoveryCounter, instanceMeshKey) + + return cm +} + +func (cm *counterManager) RegisterSimpleCounter(kind resmodel.ResourceKind) { + if kind == "" { + return + } + if _, exists := cm.simpleCounters[kind]; exists { + return + } + cm.simpleCounters[kind] = NewCounter(string(kind)) +} + +func (cm *counterManager) RegisterDistributionCounter(kind resmodel.ResourceKind, metric CounterType, extractor FieldExtractor) { + if kind == "" || metric == "" { + return + } + counter := cm.distributionByType[metric] + if counter == nil { + counter = NewDistributionCounter(string(metric)) + cm.distributionByType[metric] = counter + } + + configs := cm.distributionConfigs[kind] + for _, cfg := range configs { + if cfg.counterType == metric { + cfg.counter = counter + cfg.extractor = extractor + return + } + } + + cm.distributionConfigs[kind] = append(configs, &distributionCounterConfig{ + counterType: metric, + counter: counter, + extractor: extractor, + }) +} + +func (cm *counterManager) Reset() { + for _, counter := range cm.simpleCounters { + counter.Reset() + } + for _, counter := range cm.distributionByType { + counter.Reset() + } +} + +func (cm *counterManager) Count(kind resmodel.ResourceKind) int64 { + if counter, exists := cm.simpleCounters[kind]; exists { + return counter.Get() + } + return 0 +} + +func (cm *counterManager) Distribution(metric CounterType) map[string]int64 { + counter, exists := cm.distributionByType[metric] + if !exists { + return map[string]int64{} + } + raw := counter.GetAll() + result := make(map[string]int64, len(raw)) + for k, v := range raw { + result[k] = v + } + return result +} + +func (cm *counterManager) Bind(bus events.EventBus) error { + handledKinds := make(map[resmodel.ResourceKind]struct{}) + for kind := range cm.simpleCounters { + handledKinds[kind] = struct{}{} + } + for kind := range cm.distributionConfigs { + handledKinds[kind] = struct{}{} + } + + for kind := range handledKinds { + resourceKind := kind + name := fmt.Sprintf("counter-manager/%s", resourceKind) + subscriber := &counterEventSubscriber{ + kind: resourceKind, + name: name, + handler: func(event events.Event) error { + return cm.handleEvent(resourceKind, event) + }, + } + if err := bus.Subscribe(subscriber); err != nil { + return err + } + } + return nil +} + +func (cm *counterManager) handleEvent(kind resmodel.ResourceKind, event events.Event) error { + if counter := cm.simpleCounters[kind]; counter != nil { + processSimpleCounter(counter, event) + } + if configs := cm.distributionConfigs[kind]; len(configs) > 0 { + for _, cfg := range configs { + processDistributionCounter(cfg, event) + } + } + return nil +} + +func processSimpleCounter(counter *Counter, event events.Event) { + switch event.Type() { + case cache.Added: + counter.Increment() + case cache.Sync, cache.Replaced: + if isNewResourceEvent(event) { + counter.Increment() + } + case cache.Deleted: + counter.Decrement() + case cache.Updated: + // no-op for simple counters + default: + } +} + +func processDistributionCounter(cfg *distributionCounterConfig, event events.Event) { + switch event.Type() { + case cache.Added: + cfg.increment(cfg.extractFrom(event.NewObj())) + case cache.Sync, cache.Replaced: + if isNewResourceEvent(event) { + cfg.increment(cfg.extractFrom(event.NewObj())) + } else { + cfg.update(event.OldObj(), event.NewObj()) + } + case cache.Updated: + cfg.update(event.OldObj(), event.NewObj()) + case cache.Deleted: + cfg.decrement(cfg.extractFrom(event.OldObj())) + default: + } +} + +func (cfg *distributionCounterConfig) extractFrom(res resmodel.Resource) string { + if cfg.extractor == nil || res == nil { + return "" + } + return cfg.extractor(res) +} + +func (cfg *distributionCounterConfig) increment(key string) { + cfg.counter.Increment(normalizeDistributionKey(key)) +} + +func (cfg *distributionCounterConfig) decrement(key string) { + cfg.counter.Decrement(normalizeDistributionKey(key)) +} + +func (cfg *distributionCounterConfig) update(oldObj, newObj resmodel.Resource) { + oldKey := normalizeDistributionKey(cfg.extractFrom(oldObj)) + newKey := normalizeDistributionKey(cfg.extractFrom(newObj)) + if oldKey == newKey { + return + } + if oldObj != nil { + cfg.counter.Decrement(oldKey) + } + if newObj != nil { + cfg.counter.Increment(newKey) + } +} + +func instanceProtocolKey(res resmodel.Resource) string { + instance, ok := res.(*meshresource.InstanceResource) + if !ok || instance == nil || instance.Spec == nil { + return "" + } + return instance.Spec.GetProtocol() +} + +func instanceReleaseKey(res resmodel.Resource) string { + instance, ok := res.(*meshresource.InstanceResource) + if !ok || instance == nil || instance.Spec == nil { + return "" + } + return instance.Spec.GetReleaseVersion() +} + +func instanceMeshKey(res resmodel.Resource) string { + instance, ok := res.(*meshresource.InstanceResource) + if !ok || instance == nil { + return "" + } + return instance.Mesh +} + +func normalizeDistributionKey(key string) string { + if key == "" { + return "unknown" + } + return key +} + +func isNewResourceEvent(event events.Event) bool { + if event == nil { + return false + } + return event.OldObj() == nil +} + +type counterEventSubscriber struct { + kind resmodel.ResourceKind + name string + handler func(events.Event) error +} + +func (s *counterEventSubscriber) ResourceKind() resmodel.ResourceKind { + return s.kind +} + +func (s *counterEventSubscriber) Name() string { + return s.name +} + +func (s *counterEventSubscriber) ProcessEvent(event events.Event) error { + if s.handler == nil { + return nil + } + return s.handler(event) +} diff --git a/pkg/console/handler/overview.go b/pkg/console/handler/overview.go index ae1a1e6d6..c2aac5335 100644 --- a/pkg/console/handler/overview.go +++ b/pkg/console/handler/overview.go @@ -23,7 +23,9 @@ import ( "github.com/gin-gonic/gin" consolectx "github.com/apache/dubbo-admin/pkg/console/context" + "github.com/apache/dubbo-admin/pkg/console/counter" "github.com/apache/dubbo-admin/pkg/console/model" + meshresource "github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1" ) func AdminMetadata(ctx consolectx.Context) gin.HandlerFunc { @@ -38,7 +40,14 @@ func AdminMetadata(ctx consolectx.Context) gin.HandlerFunc { func ClusterOverview(ctx consolectx.Context) gin.HandlerFunc { return func(c *gin.Context) { resp := model.NewOverviewResp() - + if counterMgr := ctx.CounterManager(); counterMgr != nil { + resp.AppCount = counterMgr.Count(meshresource.ApplicationKind) + resp.ServiceCount = counterMgr.Count(meshresource.ServiceKind) + resp.InsCount = counterMgr.Count(meshresource.InstanceKind) + resp.Protocols = counterMgr.Distribution(counter.ProtocolCounter) + resp.Releases = counterMgr.Distribution(counter.ReleaseCounter) + resp.Discoveries = counterMgr.Distribution(counter.DiscoveryCounter) + } c.JSON(http.StatusOK, model.NewSuccessResp(resp)) } } diff --git a/pkg/console/model/overview.go b/pkg/console/model/overview.go index 2a467a92d..6ffbf0e09 100644 --- a/pkg/console/model/overview.go +++ b/pkg/console/model/overview.go @@ -18,12 +18,12 @@ package model type OverviewResp struct { - AppCount int `json:"appCount"` - ServiceCount int `json:"serviceCount"` - InsCount int `json:"insCount"` - Protocols map[string]int `json:"protocols"` - Releases map[string]int `json:"releases"` - Discoveries map[string]int `json:"discoveries"` + AppCount int64 `json:"appCount"` + ServiceCount int64 `json:"serviceCount"` + InsCount int64 `json:"insCount"` + Protocols map[string]int64 `json:"protocols"` + Releases map[string]int64 `json:"releases"` + Discoveries map[string]int64 `json:"discoveries"` } func NewOverviewResp() *OverviewResp { diff --git a/pkg/core/bootstrap/bootstrap.go b/pkg/core/bootstrap/bootstrap.go index 213c817f6..7abcae7d5 100644 --- a/pkg/core/bootstrap/bootstrap.go +++ b/pkg/core/bootstrap/bootstrap.go @@ -23,6 +23,7 @@ import ( "github.com/pkg/errors" "github.com/apache/dubbo-admin/pkg/config/app" + "github.com/apache/dubbo-admin/pkg/console/counter" "github.com/apache/dubbo-admin/pkg/core/logger" "github.com/apache/dubbo-admin/pkg/core/runtime" "github.com/apache/dubbo-admin/pkg/diagnostics" @@ -57,7 +58,11 @@ func Bootstrap(appCtx context.Context, cfg app.AdminConfig) (runtime.Runtime, er if err := initializeConsole(builder); err != nil { return nil, err } - // 6. initialize diagnotics + // 6. initialize counter manager + if err := initializeCounterManager(builder); err != nil { + return nil, err + } + // 7. initialize diagnostics if err := initializeDiagnoticsServer(builder); err != nil { logger.Errorf("got error when init diagnotics server %s", err) } @@ -123,6 +128,14 @@ func initializeDiagnoticsServer(builder *runtime.Builder) error { return initAndActivateComponent(builder, comp) } +func initializeCounterManager(builder *runtime.Builder) error { + comp, err := runtime.ComponentRegistry().Get(counter.ComponentType) + if err != nil { + return err + } + return initAndActivateComponent(builder, comp) +} + func initAndActivateComponent(builder *runtime.Builder, comp runtime.Component) error { logger.Infof("initializing %s ...", comp.Type()) if err := comp.Init(builder); err != nil { diff --git a/pkg/core/events/component.go b/pkg/core/events/component.go index 6c1fff9a2..2e6bfc0f5 100644 --- a/pkg/core/events/component.go +++ b/pkg/core/events/component.go @@ -100,10 +100,10 @@ func (b *eventBus) Send(event Event) { b.rwMutex.RLock() defer b.rwMutex.RUnlock() var rk model.ResourceKind - if event.OldObj() != nil { - rk = event.OldObj().ResourceKind() - } else if event.NewObj() != nil { + if event.NewObj() != nil { rk = event.NewObj().ResourceKind() + } else if event.OldObj() != nil { + rk = event.OldObj().ResourceKind() } subs, exists := b.subscriberDir[rk] if !exists { From 0b8fa1ffd966ab1b10db22a38e0e2596194df8c4 Mon Sep 17 00:00:00 2001 From: LGgbond <1493170339@qq.com> Date: Sat, 15 Nov 2025 15:26:06 +0800 Subject: [PATCH 10/40] fix: update response interceptor to handle success and error messages more accurately (#1355) --- ui-vue3/src/base/http/request.ts | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/ui-vue3/src/base/http/request.ts b/ui-vue3/src/base/http/request.ts index fb7f822d4..0481752ff 100644 --- a/ui-vue3/src/base/http/request.ts +++ b/ui-vue3/src/base/http/request.ts @@ -63,27 +63,36 @@ const rejectState: { errorHandler: Function | null } = { response.use( (response) => { NProgress.done() + // Success case - code is 'Success' if ( response.status === 200 && - (response.data.code === 200 || response.data.status === 'success') + (response.data.code === 'Success') ) { return Promise.resolve(response.data) } + // Handle 401 unauthorized if (response.status === 401) { removeAuthState() } - console.error(response.data.code + ':' + response.data.msg) + // Show error toast message + const errorMsg = `${response.data.code}:${response.data.message}` + message.error(errorMsg) + console.error(errorMsg) return Promise.reject(response.data) }, (error) => { NProgress.done() - if (error.response.data) { - console.error(error.response.data.code + ':' + error.response.data.msg) + // Handle error response with data + if (error.response?.data) { + const errorMsg = `${error.response.data.code}:${error.response.data.message}` + message.error(errorMsg) + console.error(errorMsg) } else { - console.error(error.response) + // Handle network or other errors + message.error('NetworkError:请求失败,请检查网络连接') + console.error(error) } - - return Promise.reject(error.response.data) + return Promise.reject(error.response?.data) } ) export default service From 42d456127e042f4006e922455bc55054ff3dc6dc Mon Sep 17 00:00:00 2001 From: Helltab <939255879@qq.com> Date: Sun, 16 Nov 2025 20:19:01 +0800 Subject: [PATCH 11/40] feat(UI): Support multiple registries (#1356) * feat(#1352): Support multiple registries: add registry select box and refresh main area on change * doc(build): build ui * fix(#1352): Set first available mesh after login when no mesh is set * doc(build): build ui * fix(conflict) * doc(build): build ui --- ...el-QFNd-Zdd.js => ConfigModel-IgPiU3B2.js} | 2 +- ...age--FZz2L2D.js => ConfigPage-Onvd_SY6.js} | 2 +- .../dist/admin/assets/DateUtil-BI1mUH_z.js | 1 - .../dist/admin/assets/DateUtil-QXt7LnE3.js | 1 + ...ge-_hmQyI5w.js => GrafanaPage-tT3NMW70.js} | 2 +- ...{Login-OEOmZzrT.css => Login-85H3mqPu.css} | 2 +- .../dist/admin/assets/Login-QsM7tdlI.js | 1 + .../dist/admin/assets/Login-imIhMlq6.js | 1 - ...-2EbGMcmH.js => PromQueryUtil-4K1j3sa5.js} | 2 +- ...til-sOWd6ofa.js => SearchUtil-bfid3zNl.js} | 2 +- ...LView-Kv0Zh07k.js => YAMLView-TcLqiDOf.js} | 2 +- .../dist/admin/assets/YAMLView-lT4dPq7F.js | 1 - .../dist/admin/assets/YAMLView-mXrxtewG.js | 1 + .../dist/admin/assets/YAMLView-q7Cf5xIc.js | 10 - .../dist/admin/assets/YAMLView-s3WMf-Uo.js | 10 + ...-L619fQ34.js => addByFormView-Ia4T74MU.js} | 2 +- .../admin/assets/addByFormView-PDTQ6Oi5.js | 1 - .../admin/assets/addByFormView-suZAGsdv.js | 1 + ...-KSfwZr8J.js => addByYAMLView--WjgktlZ.js} | 4 +- ...-mp4IQp11.js => addByYAMLView-fC-hqbkM.js} | 4 +- .../{app-duU6O0cq.js => app-mdoSebGq.js} | 2 +- .../dist/admin/assets/config-Bcppce3q.js | 1 - .../dist/admin/assets/config-iPQQ4Osw.js | 1 + ...-c8iwuhKj.js => configuration-um3mt9hU.js} | 2 +- ...ssMode-3d_RQH6d.js => cssMode-RYNyR8Bq.js} | 2 +- .../dist/admin/assets/detail-IPVQRAO3.js | 1 + .../dist/admin/assets/detail-NWi5D_Jp.js | 1 + .../dist/admin/assets/detail-ZfcGZsJx.js | 1 - .../dist/admin/assets/detail-c9-keEBq.js | 1 - .../admin/assets/distribution-WSPxFnjE.js | 1 + .../admin/assets/distribution-rzJg55IY.js | 1 - .../{event-WVUl-Hrs.js => event-Di8PmXwq.js} | 2 +- .../{event-PfSKfl9X.js => event-IjH1CTVp.js} | 2 +- .../dist/admin/assets/event-ZoLBaQpy.js | 1 + .../dist/admin/assets/event-ympyACpm.js | 1 - .../dist/admin/assets/formView-2KzX11dd.js | 1 + .../dist/admin/assets/formView-RlUvRzIB.js | 1 + .../dist/admin/assets/formView-dr6vkirR.js | 1 - ...mView--eWAQ02R.js => formView-vzcbtWy_.js} | 2 +- .../dist/admin/assets/formView-yOHva0ty.js | 1 - ...r2-7czNGzoq.js => freemarker2-UxhOxt-M.js} | 2 +- .../admin/assets/globalSearch--VMQnq3S.js | 1 + ...ars-WxO52qam.js => handlebars-feyIBGtU.js} | 2 +- .../{html-uljtN73o.js => html-XW1o38ac.js} | 2 +- ...lMode-X6nY_fAl.js => htmlMode-GNYYzuyz.js} | 2 +- .../dist/admin/assets/index-0bxuOvJ7.css | 1 + .../dist/admin/assets/index-1-DS2ySp.js | 1 - .../dist/admin/assets/index-1FKHxc4J.css | 1 - .../dist/admin/assets/index-3zDsduUv.js | 566 +++++++++++++++++ .../{index-3ObQClF5.js => index-9Tpk6WxM.js} | 2 +- .../dist/admin/assets/index-ECEQf-Fc.js | 1 + .../{index-Va7nxJVK.js => index-HdnVQEsT.js} | 4 +- .../{index-bidvosE-.js => index-PuhA8qFJ.js} | 2 +- .../{index-JAGQH17O.js => index-VDeT_deC.js} | 2 +- .../{index-VJs-1Ntn.js => index-fU57L0AQ.js} | 4 +- .../{index-PRmcKXGy.js => index-gNarHmYQ.js} | 2 +- .../dist/admin/assets/index-hmLAZQYT.js | 573 ------------------ .../dist/admin/assets/index-jbm-YZ4W.js | 1 + .../{index-BItwxFIb.js => index-tIlk8-2z.js} | 2 +- .../dist/admin/assets/index-tgq9rPkt.js | 1 - .../{index-6mDJigRo.js => index-ytKGiqRq.js} | 2 +- ...tance-9-P3Wy8N.js => instance-qriYfOrq.js} | 2 +- ...tance-GgpcTYxF.js => instance-u5IY96cv.js} | 4 +- ...ipt-co0piviO.js => javascript-aILp5GNb.js} | 2 +- ...s-yaml-8Gkz3BRW.js => js-yaml-eElisXzH.js} | 14 +- ...nMode-KM143a9D.js => jsonMode-KjD1007i.js} | 2 +- .../admin/assets/linkTracking-gLhWXj25.js | 1 + .../admin/assets/linkTracking-vLLhx3tk.js | 1 - ...{liquid-JQLAJlRU.js => liquid-Xdf0sURN.js} | 2 +- .../dist/admin/assets/login-9T-XtNdg.js | 1 - .../{mdx--MEc7-59.js => mdx-gQ43aWZ0.js} | 2 +- .../dist/admin/assets/monitor-4PTw3Hnl.js | 1 - .../dist/admin/assets/monitor-JE2IXQk_.js | 1 + .../dist/admin/assets/monitor-Yx9RU22f.js | 1 + .../dist/admin/assets/monitor-kZ_wOjob.js | 1 + .../dist/admin/assets/monitor-l-14_P1G.js | 1 - .../dist/admin/assets/monitor-sGZqYA6v.js | 1 - ...Found-gtHVn9y2.js => notFound-hYD9Tscu.js} | 2 +- ...{python-jcEZ1nxp.js => python-1HHjXB9h.js} | 2 +- .../{razor-dzNkTErc.js => razor-TyEeYTJH.js} | 2 +- .../dist/admin/assets/request-3an337VF.js | 7 + .../dist/admin/assets/request-8jI_GZey.js | 7 - ...ig-b6LJLlLg.js => sceneConfig-wKVgfCMN.js} | 2 +- .../dist/admin/assets/search-ZPtMszjO.js | 1 - .../dist/admin/assets/search-c0Szb99-.js | 1 + ...nfo-j8z5RY-E.js => serverInfo-F5PlCBPJ.js} | 2 +- ...ervice-HiIVI9X0.js => service-Hb3ldtV6.js} | 2 +- ...ervice-SHOGrh_I.js => service-LECfslfz.js} | 2 +- .../{tab1-y_fNgbfH.js => tab1-Erm3qhoK.js} | 2 +- .../{tab2-s33OHi_L.js => tab2-gYKBqlWv.js} | 2 +- .../dist/admin/assets/tracing-92ETcaci.js | 1 - .../dist/admin/assets/tracing-DAAA17XP.js | 1 + .../dist/admin/assets/tracing-egUve7nj.js | 1 + .../dist/admin/assets/tracing-ga_5tnvN.js | 1 - ...raffic-C2a-KjHH.js => traffic-dHGZ6qwp.js} | 2 +- ...{tsMode-i1fWJZVb.js => tsMode-uoK2x2Py.js} | 2 +- ...ipt-rFPVZWyT.js => typescript-jSqLomXD.js} | 2 +- ...lnXIPo.js => updateByFormView-mbEXmvrc.js} | 2 +- ...pq9Kli.js => updateByFormView-ySWJqpjX.js} | 2 +- ...qbsfZ8.js => updateByYAMLView--nyJvxZJ.js} | 4 +- ...QATUCs.js => updateByYAMLView-X3vjkbCV.js} | 4 +- .../{xml-vsTTX_Cj.js => xml-PQ1W1vQC.js} | 2 +- .../{yaml-1sMNGfO1.js => yaml-QORSracL.js} | 2 +- app/dubbo-ui/dist/admin/index.html | 2 +- ui-vue3/package.json | 1 + ui-vue3/src/Login.vue | 14 +- ui-vue3/src/api/service/globalSearch.ts | 7 + ui-vue3/src/base/constants.ts | 25 + ui-vue3/src/base/enums/ProvideInject.ts | 1 + ui-vue3/src/base/http/request.ts | 15 +- ui-vue3/src/base/i18n/en.ts | 1 + ui-vue3/src/base/i18n/zh.ts | 1 + ui-vue3/src/layout/header/layout_header.vue | 55 +- ui-vue3/src/layout/index.vue | 17 +- ui-vue3/src/main.ts | 24 +- ui-vue3/src/stores/mesh.ts | 25 + 116 files changed, 826 insertions(+), 711 deletions(-) rename app/dubbo-ui/dist/admin/assets/{ConfigModel-QFNd-Zdd.js => ConfigModel-IgPiU3B2.js} (98%) rename app/dubbo-ui/dist/admin/assets/{ConfigPage--FZz2L2D.js => ConfigPage-Onvd_SY6.js} (59%) delete mode 100644 app/dubbo-ui/dist/admin/assets/DateUtil-BI1mUH_z.js create mode 100644 app/dubbo-ui/dist/admin/assets/DateUtil-QXt7LnE3.js rename app/dubbo-ui/dist/admin/assets/{GrafanaPage-_hmQyI5w.js => GrafanaPage-tT3NMW70.js} (80%) rename app/dubbo-ui/dist/admin/assets/{Login-OEOmZzrT.css => Login-85H3mqPu.css} (55%) create mode 100644 app/dubbo-ui/dist/admin/assets/Login-QsM7tdlI.js delete mode 100644 app/dubbo-ui/dist/admin/assets/Login-imIhMlq6.js rename app/dubbo-ui/dist/admin/assets/{PromQueryUtil-2EbGMcmH.js => PromQueryUtil-4K1j3sa5.js} (81%) rename app/dubbo-ui/dist/admin/assets/{SearchUtil-sOWd6ofa.js => SearchUtil-bfid3zNl.js} (81%) rename app/dubbo-ui/dist/admin/assets/{YAMLView-Kv0Zh07k.js => YAMLView-TcLqiDOf.js} (51%) delete mode 100644 app/dubbo-ui/dist/admin/assets/YAMLView-lT4dPq7F.js create mode 100644 app/dubbo-ui/dist/admin/assets/YAMLView-mXrxtewG.js delete mode 100644 app/dubbo-ui/dist/admin/assets/YAMLView-q7Cf5xIc.js create mode 100644 app/dubbo-ui/dist/admin/assets/YAMLView-s3WMf-Uo.js rename app/dubbo-ui/dist/admin/assets/{addByFormView-L619fQ34.js => addByFormView-Ia4T74MU.js} (68%) delete mode 100644 app/dubbo-ui/dist/admin/assets/addByFormView-PDTQ6Oi5.js create mode 100644 app/dubbo-ui/dist/admin/assets/addByFormView-suZAGsdv.js rename app/dubbo-ui/dist/admin/assets/{addByYAMLView-KSfwZr8J.js => addByYAMLView--WjgktlZ.js} (56%) rename app/dubbo-ui/dist/admin/assets/{addByYAMLView-mp4IQp11.js => addByYAMLView-fC-hqbkM.js} (55%) rename app/dubbo-ui/dist/admin/assets/{app-duU6O0cq.js => app-mdoSebGq.js} (94%) delete mode 100644 app/dubbo-ui/dist/admin/assets/config-Bcppce3q.js create mode 100644 app/dubbo-ui/dist/admin/assets/config-iPQQ4Osw.js rename app/dubbo-ui/dist/admin/assets/{configuration-c8iwuhKj.js => configuration-um3mt9hU.js} (82%) rename app/dubbo-ui/dist/admin/assets/{cssMode-3d_RQH6d.js => cssMode-RYNyR8Bq.js} (99%) create mode 100644 app/dubbo-ui/dist/admin/assets/detail-IPVQRAO3.js create mode 100644 app/dubbo-ui/dist/admin/assets/detail-NWi5D_Jp.js delete mode 100644 app/dubbo-ui/dist/admin/assets/detail-ZfcGZsJx.js delete mode 100644 app/dubbo-ui/dist/admin/assets/detail-c9-keEBq.js create mode 100644 app/dubbo-ui/dist/admin/assets/distribution-WSPxFnjE.js delete mode 100644 app/dubbo-ui/dist/admin/assets/distribution-rzJg55IY.js rename app/dubbo-ui/dist/admin/assets/{event-WVUl-Hrs.js => event-Di8PmXwq.js} (60%) rename app/dubbo-ui/dist/admin/assets/{event-PfSKfl9X.js => event-IjH1CTVp.js} (76%) create mode 100644 app/dubbo-ui/dist/admin/assets/event-ZoLBaQpy.js delete mode 100644 app/dubbo-ui/dist/admin/assets/event-ympyACpm.js create mode 100644 app/dubbo-ui/dist/admin/assets/formView-2KzX11dd.js create mode 100644 app/dubbo-ui/dist/admin/assets/formView-RlUvRzIB.js delete mode 100644 app/dubbo-ui/dist/admin/assets/formView-dr6vkirR.js rename app/dubbo-ui/dist/admin/assets/{formView--eWAQ02R.js => formView-vzcbtWy_.js} (99%) delete mode 100644 app/dubbo-ui/dist/admin/assets/formView-yOHva0ty.js rename app/dubbo-ui/dist/admin/assets/{freemarker2-7czNGzoq.js => freemarker2-UxhOxt-M.js} (99%) create mode 100644 app/dubbo-ui/dist/admin/assets/globalSearch--VMQnq3S.js rename app/dubbo-ui/dist/admin/assets/{handlebars-WxO52qam.js => handlebars-feyIBGtU.js} (98%) rename app/dubbo-ui/dist/admin/assets/{html-uljtN73o.js => html-XW1o38ac.js} (97%) rename app/dubbo-ui/dist/admin/assets/{htmlMode-X6nY_fAl.js => htmlMode-GNYYzuyz.js} (99%) create mode 100644 app/dubbo-ui/dist/admin/assets/index-0bxuOvJ7.css delete mode 100644 app/dubbo-ui/dist/admin/assets/index-1-DS2ySp.js delete mode 100644 app/dubbo-ui/dist/admin/assets/index-1FKHxc4J.css create mode 100644 app/dubbo-ui/dist/admin/assets/index-3zDsduUv.js rename app/dubbo-ui/dist/admin/assets/{index-3ObQClF5.js => index-9Tpk6WxM.js} (69%) create mode 100644 app/dubbo-ui/dist/admin/assets/index-ECEQf-Fc.js rename app/dubbo-ui/dist/admin/assets/{index-Va7nxJVK.js => index-HdnVQEsT.js} (96%) rename app/dubbo-ui/dist/admin/assets/{index-bidvosE-.js => index-PuhA8qFJ.js} (99%) rename app/dubbo-ui/dist/admin/assets/{index-JAGQH17O.js => index-VDeT_deC.js} (55%) rename app/dubbo-ui/dist/admin/assets/{index-VJs-1Ntn.js => index-fU57L0AQ.js} (63%) rename app/dubbo-ui/dist/admin/assets/{index-PRmcKXGy.js => index-gNarHmYQ.js} (67%) delete mode 100644 app/dubbo-ui/dist/admin/assets/index-hmLAZQYT.js create mode 100644 app/dubbo-ui/dist/admin/assets/index-jbm-YZ4W.js rename app/dubbo-ui/dist/admin/assets/{index-BItwxFIb.js => index-tIlk8-2z.js} (91%) delete mode 100644 app/dubbo-ui/dist/admin/assets/index-tgq9rPkt.js rename app/dubbo-ui/dist/admin/assets/{index-6mDJigRo.js => index-ytKGiqRq.js} (72%) rename app/dubbo-ui/dist/admin/assets/{instance-9-P3Wy8N.js => instance-qriYfOrq.js} (91%) rename app/dubbo-ui/dist/admin/assets/{instance-GgpcTYxF.js => instance-u5IY96cv.js} (66%) rename app/dubbo-ui/dist/admin/assets/{javascript-co0piviO.js => javascript-aILp5GNb.js} (89%) rename app/dubbo-ui/dist/admin/assets/{js-yaml-8Gkz3BRW.js => js-yaml-eElisXzH.js} (99%) rename app/dubbo-ui/dist/admin/assets/{jsonMode-KM143a9D.js => jsonMode-KjD1007i.js} (99%) create mode 100644 app/dubbo-ui/dist/admin/assets/linkTracking-gLhWXj25.js delete mode 100644 app/dubbo-ui/dist/admin/assets/linkTracking-vLLhx3tk.js rename app/dubbo-ui/dist/admin/assets/{liquid-JQLAJlRU.js => liquid-Xdf0sURN.js} (96%) delete mode 100644 app/dubbo-ui/dist/admin/assets/login-9T-XtNdg.js rename app/dubbo-ui/dist/admin/assets/{mdx--MEc7-59.js => mdx-gQ43aWZ0.js} (97%) delete mode 100644 app/dubbo-ui/dist/admin/assets/monitor-4PTw3Hnl.js create mode 100644 app/dubbo-ui/dist/admin/assets/monitor-JE2IXQk_.js create mode 100644 app/dubbo-ui/dist/admin/assets/monitor-Yx9RU22f.js create mode 100644 app/dubbo-ui/dist/admin/assets/monitor-kZ_wOjob.js delete mode 100644 app/dubbo-ui/dist/admin/assets/monitor-l-14_P1G.js delete mode 100644 app/dubbo-ui/dist/admin/assets/monitor-sGZqYA6v.js rename app/dubbo-ui/dist/admin/assets/{notFound-gtHVn9y2.js => notFound-hYD9Tscu.js} (98%) rename app/dubbo-ui/dist/admin/assets/{python-jcEZ1nxp.js => python-1HHjXB9h.js} (97%) rename app/dubbo-ui/dist/admin/assets/{razor-dzNkTErc.js => razor-TyEeYTJH.js} (98%) create mode 100644 app/dubbo-ui/dist/admin/assets/request-3an337VF.js delete mode 100644 app/dubbo-ui/dist/admin/assets/request-8jI_GZey.js rename app/dubbo-ui/dist/admin/assets/{sceneConfig-b6LJLlLg.js => sceneConfig-wKVgfCMN.js} (89%) delete mode 100644 app/dubbo-ui/dist/admin/assets/search-ZPtMszjO.js create mode 100644 app/dubbo-ui/dist/admin/assets/search-c0Szb99-.js rename app/dubbo-ui/dist/admin/assets/{serverInfo-j8z5RY-E.js => serverInfo-F5PlCBPJ.js} (61%) rename app/dubbo-ui/dist/admin/assets/{service-HiIVI9X0.js => service-Hb3ldtV6.js} (92%) rename app/dubbo-ui/dist/admin/assets/{service-SHOGrh_I.js => service-LECfslfz.js} (54%) rename app/dubbo-ui/dist/admin/assets/{tab1-y_fNgbfH.js => tab1-Erm3qhoK.js} (66%) rename app/dubbo-ui/dist/admin/assets/{tab2-s33OHi_L.js => tab2-gYKBqlWv.js} (66%) delete mode 100644 app/dubbo-ui/dist/admin/assets/tracing-92ETcaci.js create mode 100644 app/dubbo-ui/dist/admin/assets/tracing-DAAA17XP.js create mode 100644 app/dubbo-ui/dist/admin/assets/tracing-egUve7nj.js delete mode 100644 app/dubbo-ui/dist/admin/assets/tracing-ga_5tnvN.js rename app/dubbo-ui/dist/admin/assets/{traffic-C2a-KjHH.js => traffic-dHGZ6qwp.js} (94%) rename app/dubbo-ui/dist/admin/assets/{tsMode-i1fWJZVb.js => tsMode-uoK2x2Py.js} (99%) rename app/dubbo-ui/dist/admin/assets/{typescript-rFPVZWyT.js => typescript-jSqLomXD.js} (97%) rename app/dubbo-ui/dist/admin/assets/{updateByFormView-uqlnXIPo.js => updateByFormView-mbEXmvrc.js} (76%) rename app/dubbo-ui/dist/admin/assets/{updateByFormView-ykpq9Kli.js => updateByFormView-ySWJqpjX.js} (78%) rename app/dubbo-ui/dist/admin/assets/{updateByYAMLView-C-qbsfZ8.js => updateByYAMLView--nyJvxZJ.js} (52%) rename app/dubbo-ui/dist/admin/assets/{updateByYAMLView-CBQATUCs.js => updateByYAMLView-X3vjkbCV.js} (55%) rename app/dubbo-ui/dist/admin/assets/{xml-vsTTX_Cj.js => xml-PQ1W1vQC.js} (97%) rename app/dubbo-ui/dist/admin/assets/{yaml-1sMNGfO1.js => yaml-QORSracL.js} (97%) create mode 100644 ui-vue3/src/stores/mesh.ts diff --git a/app/dubbo-ui/dist/admin/assets/ConfigModel-QFNd-Zdd.js b/app/dubbo-ui/dist/admin/assets/ConfigModel-IgPiU3B2.js similarity index 98% rename from app/dubbo-ui/dist/admin/assets/ConfigModel-QFNd-Zdd.js rename to app/dubbo-ui/dist/admin/assets/ConfigModel-IgPiU3B2.js index fff9dad0e..b99de2dab 100644 --- a/app/dubbo-ui/dist/admin/assets/ConfigModel-QFNd-Zdd.js +++ b/app/dubbo-ui/dist/admin/assets/ConfigModel-IgPiU3B2.js @@ -1 +1 @@ -var h=Object.defineProperty;var p=(u,e,t)=>e in u?h(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t;var o=(u,e,t)=>(p(u,typeof e!="symbol"?e+"":e,t),t);import{i as c}from"./index-hmLAZQYT.js";class m{constructor(e){o(this,"enabled",!0);o(this,"hasMatch",!1);o(this,"side","provider");o(this,"matches",[]);o(this,"parameters",[]);o(this,"matchesKeys",[]);o(this,"parametersKeys",[]);o(this,"parametersValue",{retries:{type:"obj",relation:"=",value:""},timeout:{type:"obj",relation:"=",value:""},accesslog:{type:"obj",relation:"=",value:""},weight:{type:"obj",relation:"=",value:""},other:{type:"free",arr:[{key:"",relation:"=",value:""}]}});o(this,"matchesValue",{address:{type:"obj",relation:"",value:""},providerAddress:{type:"obj",relation:"",value:""},service:{type:"arr",arr:[{key:"oneof",relation:"",value:""}]},application:{type:"arr",arr:[{key:"oneof",relation:"",value:""}]},param:{type:"free",arr:[{key:"",relation:"",value:""}]}});if(e){for(let t of Object.keys(this))e[t]&&(this[t]=e[t]);this.hasMatch=this.matchesKeys.length>0}}descMatches(){let e=[];for(let t in this.matchesValue){let a=this.matchesValue[t];if(this.matchesKeys.includes(t))if(a.type==="obj")e.push(`${t} ${a.relation} ${a.value}`);else if(a.type==="arr"){let s=a.arr.map(r=>`${r.relation} ${r.value}`).join(", ");e.push(`${t} oneof [${s}]`)}else{let s=a.arr.map(r=>`${r.key} ${r.relation} ${r.value}`).join(", ");e.push(`${t} allof [${s}]`)}}return e}descParameters(){let e=[];for(let t in this.parametersValue){let a=this.parametersValue[t];this.parametersKeys.includes(t)&&(a.type==="obj"?e.push(`${t} = ${a.value}`):e.push(...a.arr.map(s=>`${s.key} ${s.relation} ${s.value}`)))}return e}delArrConfig(e,t,a){e[t].arr.splice(a,1)}addArrConfig(e,t,a,s){e[t].arr.splice(a+1,0,{key:"",relation:(s==null?void 0:s.relation)||"",value:""})}parseMatches(e){let t=this.matchesValue;for(let a in e){this.matchesKeys.push(a),this.hasMatch=!0;let s=e[a];if(t[a])if(t[a].type==="obj")for(let r in s)t[a].relation=r,t[a].value=s[r];else if(t[a].type==="arr"){t[a].arr=[];for(let r in s)for(let i of s[r])for(let l in i)t[a].arr.push({key:r,relation:l,value:i[l]})}else{t[a].arr=[];for(let r of s)for(let i in r.value)t[a].arr.push({key:r.key,relation:i,value:r.value[i]})}}}parseParameters(e){let t=this.parametersValue;for(let a in e){let s=e[a];if(this.parametersValue[a])this.parametersKeys.push(a),t[a].relation="=",t[a].value=s;else{let r="other";this.parametersKeys.push(r),t[r].arr=[],t[r].arr.push({key:a,relation:"=",value:s})}}}checkArrConfig(e,t,a,s){for(let r of t){let i=a[r];if(i.type==="obj"){if(i.relation===null||i.relation==="")return s.push(`${e}: ${r} 条件为空`),console.log(`${e}: ${r} 条件为空`),!1;if(i.value===null)return s.push(`${e}: ${r} 值为空`),console.log(`${e}: ${r} 值为空`),!1}if(i.type==="arr")for(let l of i.arr){if(l.relation===null||l.relation==="")return s.push(`${e}: ${r} 条件为空`),console.log(`${e}: ${r} 条件为空`),!1;if(l.value===null)return s.push(`${e}: ${r} 值为空`),console.log(`${e}: ${r} 值为空`),!1}else{let l=1;if(!i.arr)continue;for(let n of i.arr){if(n.relation===null||n.relation==="")return s.push(`${e}: ${r} 下第${l}条记录key为空`),console.log(`${e}: ${r} 下第${l}条记录key为空`),!1;if(n.relation===null||n.relation==="")return s.push(`${e}: ${r} 下第${l}条记录条件为空`),console.log(`${e}: ${r} 下第${l}条记录条件为空`),!1;if(n.value===null)return s.push(`${e}: ${r} 第${l}条记录值为空`),console.log(`${e}: ${r} 第${l}条记录值为空`),!1;l++}}}return!0}}class y{constructor(){o(this,"ruleName");o(this,"scope");o(this,"configVersion");o(this,"key");o(this,"effectTime");o(this,"enabled")}}class g{constructor(){o(this,"basicInfo",new y);o(this,"config",[]);o(this,"errorMsg",[]);o(this,"isAdd",!1)}fromData(e){this.basicInfo=e.basicInfo,this.config=e.config,this.isAdd=e.isAdd}fromApiOutput(e){this.basicInfo.configVerison=e.configVerison||"v3.0",this.basicInfo.scope=e.scope,this.basicInfo.key=e.key,this.basicInfo.enabled=e.enabled||!1,this.config=e.configs.map(t=>{let a=new m({enabled:t.enabled,side:t.side});return a.parseMatches(t.match),a.parseParameters(t.parameters),a})}toApiInput(e=!1){return this.errorMsg=[],{ruleName:this.basicInfo.ruleName==="_tmp"?this.basicInfo.key+".configurators":this.basicInfo.ruleName,scope:this.basicInfo.scope,key:this.basicInfo.key,enabled:this.basicInfo.enabled,configVersion:this.basicInfo.configVerison||"v3.0",configs:this.config.map((a,s)=>{const r={},i={};if(e){if(a.parametersKeys.length===0)throw this.errorMsg.push(`配置 ${s+1}${c.global.t("dynamicConfigDomain.configType")} 不能为空`),loading.value=!1,new Error("数据检查失败");if(!(a.checkArrConfig(`配置 ${s+1}${c.global.t("dynamicConfigDomain.matchType")} 检查失败`,a.matchesKeys,a.matchesValue,this.errorMsg)&&a.checkArrConfig(`配置 ${s+1}${c.global.t("dynamicConfigDomain.configType")} 检查失败`,a.parametersKeys,a.parametersValue,this.errorMsg)))throw new Error("数据检查失败")}for(let l of a.matchesKeys){let n=a.matchesValue[l];if(n.type==="obj")r[l]={[n.relation]:n.value};else if(n.type==="arr")r[l]={oneof:n.arr.map(f=>({[f.relation]:f.value}))};else{r[l]=[];for(let f of n.arr)r[l].push({key:f.key,value:{[f.relation]:f.value}})}}for(let l of a.parametersKeys){let n=a.parametersValue[l];if(n.type==="obj")i[l]=n.value;else{r[l]={};for(let f of n.arr)i[f.key]=f.value}}return{match:r,parameters:i,enabled:a.enabled,side:a.side}})}}}export{m as C,g as V}; +var h=Object.defineProperty;var p=(u,e,t)=>e in u?h(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t;var o=(u,e,t)=>(p(u,typeof e!="symbol"?e+"":e,t),t);import{i as c}from"./index-3zDsduUv.js";class m{constructor(e){o(this,"enabled",!0);o(this,"hasMatch",!1);o(this,"side","provider");o(this,"matches",[]);o(this,"parameters",[]);o(this,"matchesKeys",[]);o(this,"parametersKeys",[]);o(this,"parametersValue",{retries:{type:"obj",relation:"=",value:""},timeout:{type:"obj",relation:"=",value:""},accesslog:{type:"obj",relation:"=",value:""},weight:{type:"obj",relation:"=",value:""},other:{type:"free",arr:[{key:"",relation:"=",value:""}]}});o(this,"matchesValue",{address:{type:"obj",relation:"",value:""},providerAddress:{type:"obj",relation:"",value:""},service:{type:"arr",arr:[{key:"oneof",relation:"",value:""}]},application:{type:"arr",arr:[{key:"oneof",relation:"",value:""}]},param:{type:"free",arr:[{key:"",relation:"",value:""}]}});if(e){for(let t of Object.keys(this))e[t]&&(this[t]=e[t]);this.hasMatch=this.matchesKeys.length>0}}descMatches(){let e=[];for(let t in this.matchesValue){let a=this.matchesValue[t];if(this.matchesKeys.includes(t))if(a.type==="obj")e.push(`${t} ${a.relation} ${a.value}`);else if(a.type==="arr"){let s=a.arr.map(r=>`${r.relation} ${r.value}`).join(", ");e.push(`${t} oneof [${s}]`)}else{let s=a.arr.map(r=>`${r.key} ${r.relation} ${r.value}`).join(", ");e.push(`${t} allof [${s}]`)}}return e}descParameters(){let e=[];for(let t in this.parametersValue){let a=this.parametersValue[t];this.parametersKeys.includes(t)&&(a.type==="obj"?e.push(`${t} = ${a.value}`):e.push(...a.arr.map(s=>`${s.key} ${s.relation} ${s.value}`)))}return e}delArrConfig(e,t,a){e[t].arr.splice(a,1)}addArrConfig(e,t,a,s){e[t].arr.splice(a+1,0,{key:"",relation:(s==null?void 0:s.relation)||"",value:""})}parseMatches(e){let t=this.matchesValue;for(let a in e){this.matchesKeys.push(a),this.hasMatch=!0;let s=e[a];if(t[a])if(t[a].type==="obj")for(let r in s)t[a].relation=r,t[a].value=s[r];else if(t[a].type==="arr"){t[a].arr=[];for(let r in s)for(let i of s[r])for(let l in i)t[a].arr.push({key:r,relation:l,value:i[l]})}else{t[a].arr=[];for(let r of s)for(let i in r.value)t[a].arr.push({key:r.key,relation:i,value:r.value[i]})}}}parseParameters(e){let t=this.parametersValue;for(let a in e){let s=e[a];if(this.parametersValue[a])this.parametersKeys.push(a),t[a].relation="=",t[a].value=s;else{let r="other";this.parametersKeys.push(r),t[r].arr=[],t[r].arr.push({key:a,relation:"=",value:s})}}}checkArrConfig(e,t,a,s){for(let r of t){let i=a[r];if(i.type==="obj"){if(i.relation===null||i.relation==="")return s.push(`${e}: ${r} 条件为空`),console.log(`${e}: ${r} 条件为空`),!1;if(i.value===null)return s.push(`${e}: ${r} 值为空`),console.log(`${e}: ${r} 值为空`),!1}if(i.type==="arr")for(let l of i.arr){if(l.relation===null||l.relation==="")return s.push(`${e}: ${r} 条件为空`),console.log(`${e}: ${r} 条件为空`),!1;if(l.value===null)return s.push(`${e}: ${r} 值为空`),console.log(`${e}: ${r} 值为空`),!1}else{let l=1;if(!i.arr)continue;for(let n of i.arr){if(n.relation===null||n.relation==="")return s.push(`${e}: ${r} 下第${l}条记录key为空`),console.log(`${e}: ${r} 下第${l}条记录key为空`),!1;if(n.relation===null||n.relation==="")return s.push(`${e}: ${r} 下第${l}条记录条件为空`),console.log(`${e}: ${r} 下第${l}条记录条件为空`),!1;if(n.value===null)return s.push(`${e}: ${r} 第${l}条记录值为空`),console.log(`${e}: ${r} 第${l}条记录值为空`),!1;l++}}}return!0}}class y{constructor(){o(this,"ruleName");o(this,"scope");o(this,"configVersion");o(this,"key");o(this,"effectTime");o(this,"enabled")}}class g{constructor(){o(this,"basicInfo",new y);o(this,"config",[]);o(this,"errorMsg",[]);o(this,"isAdd",!1)}fromData(e){this.basicInfo=e.basicInfo,this.config=e.config,this.isAdd=e.isAdd}fromApiOutput(e){this.basicInfo.configVerison=e.configVerison||"v3.0",this.basicInfo.scope=e.scope,this.basicInfo.key=e.key,this.basicInfo.enabled=e.enabled||!1,this.config=e.configs.map(t=>{let a=new m({enabled:t.enabled,side:t.side});return a.parseMatches(t.match),a.parseParameters(t.parameters),a})}toApiInput(e=!1){return this.errorMsg=[],{ruleName:this.basicInfo.ruleName==="_tmp"?this.basicInfo.key+".configurators":this.basicInfo.ruleName,scope:this.basicInfo.scope,key:this.basicInfo.key,enabled:this.basicInfo.enabled,configVersion:this.basicInfo.configVerison||"v3.0",configs:this.config.map((a,s)=>{const r={},i={};if(e){if(a.parametersKeys.length===0)throw this.errorMsg.push(`配置 ${s+1}${c.global.t("dynamicConfigDomain.configType")} 不能为空`),loading.value=!1,new Error("数据检查失败");if(!(a.checkArrConfig(`配置 ${s+1}${c.global.t("dynamicConfigDomain.matchType")} 检查失败`,a.matchesKeys,a.matchesValue,this.errorMsg)&&a.checkArrConfig(`配置 ${s+1}${c.global.t("dynamicConfigDomain.configType")} 检查失败`,a.parametersKeys,a.parametersValue,this.errorMsg)))throw new Error("数据检查失败")}for(let l of a.matchesKeys){let n=a.matchesValue[l];if(n.type==="obj")r[l]={[n.relation]:n.value};else if(n.type==="arr")r[l]={oneof:n.arr.map(f=>({[f.relation]:f.value}))};else{r[l]=[];for(let f of n.arr)r[l].push({key:f.key,value:{[f.relation]:f.value}})}}for(let l of a.parametersKeys){let n=a.parametersValue[l];if(n.type==="obj")i[l]=n.value;else{r[l]={};for(let f of n.arr)i[f.key]=f.value}}return{match:r,parameters:i,enabled:a.enabled,side:a.side}})}}}export{m as C,g as V}; diff --git a/app/dubbo-ui/dist/admin/assets/ConfigPage--FZz2L2D.js b/app/dubbo-ui/dist/admin/assets/ConfigPage-Onvd_SY6.js similarity index 59% rename from app/dubbo-ui/dist/admin/assets/ConfigPage--FZz2L2D.js rename to app/dubbo-ui/dist/admin/assets/ConfigPage-Onvd_SY6.js index f973829df..cfd0a0027 100644 --- a/app/dubbo-ui/dist/admin/assets/ConfigPage--FZz2L2D.js +++ b/app/dubbo-ui/dist/admin/assets/ConfigPage-Onvd_SY6.js @@ -1 +1 @@ -import{d as G,l as J,z as K,a as O,c as k,b as a,w as t,e as r,o as l,j as C,n as e,I as h,f as _,t as u,J as Q,K as T,G as m,Q as b,a8 as U,m as w,p as q,h as A,_ as H}from"./index-hmLAZQYT.js";const M=d=>(q("data-v-4c314c51"),d=d(),A(),d),W={class:"__container_common_config"},X={class:"title"},Y=M(()=>C("div",{class:"bg"},null,-1)),Z={class:"truncate-text"},ee={key:0,style:{float:"right"}},te=G({__name:"ConfigPage",props:{options:{}},setup(d){let y=d,s=J(()=>y.options.list[y.options.current[0]]),x=K(null),g=K(!1),I=O();async function N(){g.value=!0,await x.value.validate().catch(c=>{w.error("submit failed [form check]: "+c),g.value=!1});let n=y.options.list[y.options.current[0]];await n.submit(n.form).catch(c=>{w.error("submit failed [server error]: "+c)}),g.value=!1,w.success("submit success")}function V(){s.value.reset(s.value.form)}return(n,c)=>{const L=r("a-tooltip"),P=r("a-menu-item"),R=r("a-menu"),$=r("a-card"),S=r("a-col"),v=r("a-button"),j=r("a-form"),D=r("a-form-item"),E=r("a-spin"),F=r("a-row");return l(),k("div",W,[a(F,{gutter:20},{default:t(()=>[a(S,{span:6},{default:t(()=>[a($,{class:"__opt"},{title:t(()=>[C("div",X,[Y,a(e(h),{class:"title-icon",icon:"icon-park-twotone:application-one"}),a(L,{placement:"topLeft"},{title:t(()=>{var o;return[_(u((o=e(I).params)==null?void 0:o.pathId),1)]}),default:t(()=>{var o;return[C("span",Z,u((o=e(I).params)==null?void 0:o.pathId),1)]}),_:1})])]),default:t(()=>[a(R,{selectedKeys:n.options.current,"onUpdate:selectedKeys":c[0]||(c[0]=o=>n.options.current=o)},{default:t(()=>[(l(!0),k(Q,null,T(n.options.list,(o,i)=>(l(),m(P,{key:i},{default:t(()=>[i===n.options.current[0]?(l(),m(e(h),{key:0,style:{"margin-bottom":"-5px","font-size":"20px"},icon:"material-symbols:settings-b-roll-rounded"})):(l(),m(e(h),{key:1,style:{"margin-bottom":"-5px","font-size":"20px",color:"grey"},icon:"material-symbols:settings-b-roll-outline-rounded"})),_(" "+u(n.$t(o.title)),1)]),_:2},1024))),128))]),_:1},8,["selectedKeys"])]),_:1})]),_:1}),a(S,{span:18},{default:t(()=>[a($,null,{title:t(()=>{var o;return[_(u(n.$t(e(s).title))+" ",1),(o=e(s))!=null&&o.ext?(l(),k("div",ee,[a(v,{type:"primary",onClick:c[1]||(c[1]=i=>{var p,f,z,B;return(B=(p=e(s))==null?void 0:p.ext)==null?void 0:B.fun((z=(f=e(s))==null?void 0:f.form)==null?void 0:z.rules)})},{default:t(()=>{var i,p;return[_(u((p=(i=e(s))==null?void 0:i.ext)==null?void 0:p.title),1)]}),_:1})])):b("",!0)]}),default:t(()=>[a(E,{spinning:e(g)},{default:t(()=>{var o,i;return[(l(),m(j,{style:{overflow:"auto","max-height":"calc(100vh - 450px)"},ref_key:"__config_form",ref:x,key:n.options.current,"wrapper-col":{span:14},model:e(s).form,"label-col":{style:{width:"100px"}},layout:"horizontal"},{default:t(()=>[U(n.$slots,"form_"+e(s).key,{current:e(s)},void 0,!0)]),_:3},8,["model"])),(o=e(s))!=null&&o.submit||(i=e(s))!=null&&i.reset?(l(),m(D,{key:0,style:{margin:"20px 0 0 100px"}},{default:t(()=>{var p,f;return[(p=e(s))!=null&&p.submit?(l(),m(v,{key:0,type:"primary",onClick:N},{default:t(()=>[_(u(n.$t("submit")),1)]),_:1})):b("",!0),(f=e(s))!=null&&f.reset?(l(),m(v,{key:1,style:{"margin-left":"10px"},onClick:V},{default:t(()=>[_(u(n.$t("reset")),1)]),_:1})):b("",!0)]}),_:1})):b("",!0)]}),_:3},8,["spinning"])]),_:3})]),_:3})]),_:3})])}}}),se=H(te,[["__scopeId","data-v-4c314c51"]]);export{se as C}; +import{d as F,l as J,B as V,a as M,c as k,b as a,w as t,e as r,o as l,j as C,n as e,I as h,f as _,t as u,L as O,M as U,J as m,T as b,a9 as q,m as w,p as A,h as G,_ as H}from"./index-3zDsduUv.js";const Q=d=>(A("data-v-4c314c51"),d=d(),G(),d),W={class:"__container_common_config"},X={class:"title"},Y=Q(()=>C("div",{class:"bg"},null,-1)),Z={class:"truncate-text"},ee={key:0,style:{float:"right"}},te=F({__name:"ConfigPage",props:{options:{}},setup(d){let y=d,s=J(()=>y.options.list[y.options.current[0]]),x=V(null),g=V(!1),I=M();async function z(){g.value=!0,await x.value.validate().catch(c=>{w.error("submit failed [form check]: "+c),g.value=!1});let n=y.options.list[y.options.current[0]];await n.submit(n.form).catch(c=>{w.error("submit failed [server error]: "+c)}),g.value=!1,w.success("submit success")}function K(){s.value.reset(s.value.form)}return(n,c)=>{const L=r("a-tooltip"),P=r("a-menu-item"),R=r("a-menu"),$=r("a-card"),B=r("a-col"),v=r("a-button"),T=r("a-form"),j=r("a-form-item"),D=r("a-spin"),E=r("a-row");return l(),k("div",W,[a(E,{gutter:20},{default:t(()=>[a(B,{span:6},{default:t(()=>[a($,{class:"__opt"},{title:t(()=>[C("div",X,[Y,a(e(h),{class:"title-icon",icon:"icon-park-twotone:application-one"}),a(L,{placement:"topLeft"},{title:t(()=>{var o;return[_(u((o=e(I).params)==null?void 0:o.pathId),1)]}),default:t(()=>{var o;return[C("span",Z,u((o=e(I).params)==null?void 0:o.pathId),1)]}),_:1})])]),default:t(()=>[a(R,{selectedKeys:n.options.current,"onUpdate:selectedKeys":c[0]||(c[0]=o=>n.options.current=o)},{default:t(()=>[(l(!0),k(O,null,U(n.options.list,(o,i)=>(l(),m(P,{key:i},{default:t(()=>[i===n.options.current[0]?(l(),m(e(h),{key:0,style:{"margin-bottom":"-5px","font-size":"20px"},icon:"material-symbols:settings-b-roll-rounded"})):(l(),m(e(h),{key:1,style:{"margin-bottom":"-5px","font-size":"20px",color:"grey"},icon:"material-symbols:settings-b-roll-outline-rounded"})),_(" "+u(n.$t(o.title)),1)]),_:2},1024))),128))]),_:1},8,["selectedKeys"])]),_:1})]),_:1}),a(B,{span:18},{default:t(()=>[a($,null,{title:t(()=>{var o;return[_(u(n.$t(e(s).title))+" ",1),(o=e(s))!=null&&o.ext?(l(),k("div",ee,[a(v,{type:"primary",onClick:c[1]||(c[1]=i=>{var p,f,S,N;return(N=(p=e(s))==null?void 0:p.ext)==null?void 0:N.fun((S=(f=e(s))==null?void 0:f.form)==null?void 0:S.rules)})},{default:t(()=>{var i,p;return[_(u((p=(i=e(s))==null?void 0:i.ext)==null?void 0:p.title),1)]}),_:1})])):b("",!0)]}),default:t(()=>[a(D,{spinning:e(g)},{default:t(()=>{var o,i;return[(l(),m(T,{style:{overflow:"auto","max-height":"calc(100vh - 450px)"},ref_key:"__config_form",ref:x,key:n.options.current,"wrapper-col":{span:14},model:e(s).form,"label-col":{style:{width:"100px"}},layout:"horizontal"},{default:t(()=>[q(n.$slots,"form_"+e(s).key,{current:e(s)},void 0,!0)]),_:3},8,["model"])),(o=e(s))!=null&&o.submit||(i=e(s))!=null&&i.reset?(l(),m(j,{key:0,style:{margin:"20px 0 0 100px"}},{default:t(()=>{var p,f;return[(p=e(s))!=null&&p.submit?(l(),m(v,{key:0,type:"primary",onClick:z},{default:t(()=>[_(u(n.$t("submit")),1)]),_:1})):b("",!0),(f=e(s))!=null&&f.reset?(l(),m(v,{key:1,style:{"margin-left":"10px"},onClick:K},{default:t(()=>[_(u(n.$t("reset")),1)]),_:1})):b("",!0)]}),_:1})):b("",!0)]}),_:3},8,["spinning"])]),_:3})]),_:3})]),_:3})])}}}),se=H(te,[["__scopeId","data-v-4c314c51"]]);export{se as C}; diff --git a/app/dubbo-ui/dist/admin/assets/DateUtil-BI1mUH_z.js b/app/dubbo-ui/dist/admin/assets/DateUtil-BI1mUH_z.js deleted file mode 100644 index 34471c839..000000000 --- a/app/dubbo-ui/dist/admin/assets/DateUtil-BI1mUH_z.js +++ /dev/null @@ -1 +0,0 @@ -import{ab as t}from"./index-hmLAZQYT.js";const m=r=>r&&t(r).format("YYYY-MM-DD HH:mm:ss");export{m as f}; diff --git a/app/dubbo-ui/dist/admin/assets/DateUtil-QXt7LnE3.js b/app/dubbo-ui/dist/admin/assets/DateUtil-QXt7LnE3.js new file mode 100644 index 000000000..776b9ebb7 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/DateUtil-QXt7LnE3.js @@ -0,0 +1 @@ +import{ac as t}from"./index-3zDsduUv.js";const m=r=>r&&t(r).format("YYYY-MM-DD HH:mm:ss");export{m as f}; diff --git a/app/dubbo-ui/dist/admin/assets/GrafanaPage-_hmQyI5w.js b/app/dubbo-ui/dist/admin/assets/GrafanaPage-tT3NMW70.js similarity index 80% rename from app/dubbo-ui/dist/admin/assets/GrafanaPage-_hmQyI5w.js rename to app/dubbo-ui/dist/admin/assets/GrafanaPage-tT3NMW70.js index c6b9ed85e..adc160de4 100644 --- a/app/dubbo-ui/dist/admin/assets/GrafanaPage-_hmQyI5w.js +++ b/app/dubbo-ui/dist/admin/assets/GrafanaPage-tT3NMW70.js @@ -1 +1 @@ -import{d as l,x as m,y as d,z as _,a as f,W as u,e as p,o as r,c as s,b as g,w as h,j as y,n,Q as v,_ as I}from"./index-hmLAZQYT.js";const w={class:"__container_tabDemo3"},b={class:"__container_iframe_container"},q=["src"],x=l({__name:"GrafanaPage",setup(S){const a=m(d.GRAFANA);_(""),f(),u(async()=>{var t;let e=await a.api({});a.url=`${window.location.origin}/grafana/d/${(t=e.data)==null?void 0:t.baseURL.split("/d/")[1].split("?")[0]}?var-${a.type}=${a.name}&kiosk=tv`,a.showIframe=!0});function o(e){try{e()}catch(t){console.log(t)}}function c(){console.log("The iframe has been loaded."),setTimeout(()=>{try{let e=document.querySelector("#grafanaIframe").contentDocument;o(()=>{e.querySelector("header").remove()}),o(()=>{e.querySelector("[data-testid*='controls']").remove()}),setTimeout(()=>{o(()=>{e.querySelector("[data-testid*='navigation mega-menu']").remove()}),o(()=>{for(let t of e.querySelectorAll("[data-testid*='Panel menu']"))t.remove()})},2e3)}catch{}a.showIframe=!0},1e3)}return(e,t)=>{const i=p("a-spin");return r(),s("div",w,[g(i,{class:"spin",spinning:!n(a).showIframe},{default:h(()=>[y("div",b,[n(a).showIframe?(r(),s("iframe",{key:0,onload:c,id:"grafanaIframe",style:{"padding-top":"60px"},src:n(a).url,frameborder:"0"},null,8,q)):v("",!0)])]),_:1},8,["spinning"])])}}}),A=I(x,[["__scopeId","data-v-c6fbb32b"]]);export{A as G}; +import{d as l,y as m,z as d,B as _,a as f,D as u,e as p,o as r,c as s,b as g,w as h,j as y,n,T as v,_ as I}from"./index-3zDsduUv.js";const w={class:"__container_tabDemo3"},b={class:"__container_iframe_container"},q=["src"],D=l({__name:"GrafanaPage",setup(S){const a=m(d.GRAFANA);_(""),f(),u(async()=>{var t;let e=await a.api({});a.url=`${window.location.origin}/grafana/d/${(t=e.data)==null?void 0:t.baseURL.split("/d/")[1].split("?")[0]}?var-${a.type}=${a.name}&kiosk=tv`,a.showIframe=!0});function o(e){try{e()}catch(t){console.log(t)}}function c(){console.log("The iframe has been loaded."),setTimeout(()=>{try{let e=document.querySelector("#grafanaIframe").contentDocument;o(()=>{e.querySelector("header").remove()}),o(()=>{e.querySelector("[data-testid*='controls']").remove()}),setTimeout(()=>{o(()=>{e.querySelector("[data-testid*='navigation mega-menu']").remove()}),o(()=>{for(let t of e.querySelectorAll("[data-testid*='Panel menu']"))t.remove()})},2e3)}catch{}a.showIframe=!0},1e3)}return(e,t)=>{const i=p("a-spin");return r(),s("div",w,[g(i,{class:"spin",spinning:!n(a).showIframe},{default:h(()=>[y("div",b,[n(a).showIframe?(r(),s("iframe",{key:0,onload:c,id:"grafanaIframe",style:{"padding-top":"60px"},src:n(a).url,frameborder:"0"},null,8,q)):v("",!0)])]),_:1},8,["spinning"])])}}}),x=I(D,[["__scopeId","data-v-c6fbb32b"]]);export{x as G}; diff --git a/app/dubbo-ui/dist/admin/assets/Login-OEOmZzrT.css b/app/dubbo-ui/dist/admin/assets/Login-85H3mqPu.css similarity index 55% rename from app/dubbo-ui/dist/admin/assets/Login-OEOmZzrT.css rename to app/dubbo-ui/dist/admin/assets/Login-85H3mqPu.css index c7ad8572d..07d6ddec2 100644 --- a/app/dubbo-ui/dist/admin/assets/Login-OEOmZzrT.css +++ b/app/dubbo-ui/dist/admin/assets/Login-85H3mqPu.css @@ -1 +1 @@ -.background[data-v-286ee7a5]{background:url(/admin/assets/login-aBMy9l95.jpg) no-repeat center center fixed;background-size:cover;width:100vw;height:100vh;display:flex;justify-content:center;align-items:center}.background .login[data-v-286ee7a5]{background-color:#fff;padding:20px;border-radius:12px;box-shadow:0 0 10px #0000001a;display:flex;justify-content:center;width:22vw}.background .login .title[data-v-286ee7a5]{width:100%;display:flex;justify-content:center;font-size:20px;font-weight:500;margin-bottom:20px}.background .login .login-btn[data-v-286ee7a5]{width:100%} +.background[data-v-790dbd2e]{background:url(/admin/assets/login-aBMy9l95.jpg) no-repeat center center fixed;background-size:cover;width:100vw;height:100vh;display:flex;justify-content:center;align-items:center}.background .login[data-v-790dbd2e]{background-color:#fff;padding:20px;border-radius:12px;box-shadow:0 0 10px #0000001a;display:flex;justify-content:center;width:22vw}.background .login .title[data-v-790dbd2e]{width:100%;display:flex;justify-content:center;font-size:20px;font-weight:500;margin-bottom:20px}.background .login .login-btn[data-v-790dbd2e]{width:100%} diff --git a/app/dubbo-ui/dist/admin/assets/Login-QsM7tdlI.js b/app/dubbo-ui/dist/admin/assets/Login-QsM7tdlI.js new file mode 100644 index 000000000..3dd112d73 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/Login-QsM7tdlI.js @@ -0,0 +1 @@ +import{l as h,m as b}from"./globalSearch--VMQnq3S.js";import{d as v,r as y,u as S,a as D,c as k,b as e,w as t,e as n,o as C,f as I,t as q,g as B,m as N,i as V,p as $,h as x,j as F,_ as L}from"./index-3zDsduUv.js";import{u as R}from"./request-3an337VF.js";const U=l=>($("data-v-790dbd2e"),l=l(),x(),l),j={class:"background"},z=U(()=>F("div",null,"用户登录",-1)),A=v({__name:"Login",setup(l){const a=y({username:"",password:""}),c=S(),p=D().query.redirect||"/",m=R();function _(){let s=new FormData;s.append("user",a.username),s.append("password",a.password),h(s).then(async()=>{var r;B(!0,a.username);const{data:o}=await b();(!m.mesh||!o.some(u=>u.name===m.mesh))&&(m.mesh=(r=o[0])==null?void 0:r.name),c.replace(p)}).catch(o=>{N.error(V.global.t("loginDomain.authFail"))})}return(s,o)=>{const r=n("a-row"),u=n("a-input"),i=n("a-form-item"),f=n("a-button"),g=n("a-form"),w=n("a-card");return C(),k("div",j,[e(w,{class:"login"},{default:t(()=>[e(r,{class:"title"},{default:t(()=>[z]),_:1}),e(r,null,{default:t(()=>[e(g,{layout:"vertical",model:a,ref:"login-form-ref"},{default:t(()=>[e(i,{class:"item",label:s.$t("loginDomain.username"),name:"username",rules:[{required:!0}]},{default:t(()=>[e(u,{type:"",value:a.username,"onUpdate:value":o[0]||(o[0]=d=>a.username=d)},null,8,["value"])]),_:1},8,["label"]),e(i,{class:"item",label:s.$t("loginDomain.password"),name:"password",rules:[{required:!0}]},{default:t(()=>[e(u,{type:"password",value:a.password,"onUpdate:value":o[1]||(o[1]=d=>a.password=d)},null,8,["value"])]),_:1},8,["label"]),e(i,{class:"item",label:""},{default:t(()=>[e(f,{onClick:_,size:"large",type:"primary",class:"login-btn"},{default:t(()=>[I(q(s.$t("loginDomain.login")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})]),_:1})])}}}),G=L(A,[["__scopeId","data-v-790dbd2e"]]);export{G as default}; diff --git a/app/dubbo-ui/dist/admin/assets/Login-imIhMlq6.js b/app/dubbo-ui/dist/admin/assets/Login-imIhMlq6.js deleted file mode 100644 index 59ad04742..000000000 --- a/app/dubbo-ui/dist/admin/assets/Login-imIhMlq6.js +++ /dev/null @@ -1 +0,0 @@ -import{l as w}from"./login-9T-XtNdg.js";import{d as v,r as b,u as h,a as y,c as D,b as e,w as o,e as s,o as S,f as k,t as C,g as I,m as q,i as B,p as N,h as V,j as $,_ as x}from"./index-hmLAZQYT.js";import"./request-8jI_GZey.js";const F=r=>(N("data-v-286ee7a5"),r=r(),V(),r),L={class:"background"},R=F(()=>$("div",null,"用户登录",-1)),U=v({__name:"Login",setup(r){const a=b({username:"",password:""}),d=h(),m=y().query.redirect||"/";function c(){let t=new FormData;t.append("user",a.username),t.append("password",a.password),w(t).then(()=>{I(!0,a.username),d.replace(m)}).catch(n=>{q.error(B.global.t("loginDomain.authFail"))})}return(t,n)=>{const i=s("a-row"),p=s("a-input"),l=s("a-form-item"),_=s("a-button"),f=s("a-form"),g=s("a-card");return S(),D("div",L,[e(g,{class:"login"},{default:o(()=>[e(i,{class:"title"},{default:o(()=>[R]),_:1}),e(i,null,{default:o(()=>[e(f,{layout:"vertical",model:a,ref:"login-form-ref"},{default:o(()=>[e(l,{class:"item",label:t.$t("loginDomain.username"),name:"username",rules:[{required:!0}]},{default:o(()=>[e(p,{type:"",value:a.username,"onUpdate:value":n[0]||(n[0]=u=>a.username=u)},null,8,["value"])]),_:1},8,["label"]),e(l,{class:"item",label:t.$t("loginDomain.password"),name:"password",rules:[{required:!0}]},{default:o(()=>[e(p,{type:"password",value:a.password,"onUpdate:value":n[1]||(n[1]=u=>a.password=u)},null,8,["value"])]),_:1},8,["label"]),e(l,{class:"item",label:""},{default:o(()=>[e(_,{onClick:c,size:"large",type:"primary",class:"login-btn"},{default:o(()=>[k(C(t.$t("loginDomain.login")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})]),_:1})])}}}),H=x(U,[["__scopeId","data-v-286ee7a5"]]);export{H as default}; diff --git a/app/dubbo-ui/dist/admin/assets/PromQueryUtil-2EbGMcmH.js b/app/dubbo-ui/dist/admin/assets/PromQueryUtil-4K1j3sa5.js similarity index 81% rename from app/dubbo-ui/dist/admin/assets/PromQueryUtil-2EbGMcmH.js rename to app/dubbo-ui/dist/admin/assets/PromQueryUtil-4K1j3sa5.js index 2658aad18..13a0309e2 100644 --- a/app/dubbo-ui/dist/admin/assets/PromQueryUtil-2EbGMcmH.js +++ b/app/dubbo-ui/dist/admin/assets/PromQueryUtil-4K1j3sa5.js @@ -1 +1 @@ -import{r as c}from"./request-8jI_GZey.js";import{r as i,a3 as s}from"./index-hmLAZQYT.js";const f=async t=>c({url:"promQL/query",method:"get",params:t});async function q(t){var o,a;try{let r=(a=(o=await f({query:t}))==null?void 0:o.data)==null?void 0:a.result[0];return r!=null&&r.value&&r.value.length>0?Number(r.value[1]):"NA"}catch(r){console.error("fetch from prom error: ",r)}return"NA"}function p(t,o,a){var u;const r=i(t);for(let l of o){let e=(u=t==null?void 0:t.data)==null?void 0:u.list;for(let n of e)n[l]="skeleton-loading"}return s(async()=>{var l;try{let e=((l=r==null?void 0:r.data)==null?void 0:l.list)||[];for(let n of e)a(n)}catch(e){console.error(e)}}),r}export{p,q}; +import{r as c}from"./request-3an337VF.js";import{r as i,a4 as s}from"./index-3zDsduUv.js";const f=async t=>c({url:"promQL/query",method:"get",params:t});async function q(t){var o,a;try{let r=(a=(o=await f({query:t}))==null?void 0:o.data)==null?void 0:a.result[0];return r!=null&&r.value&&r.value.length>0?Number(r.value[1]):"NA"}catch(r){console.error("fetch from prom error: ",r)}return"NA"}function p(t,o,a){var u;const r=i(t);for(let l of o){let e=(u=t==null?void 0:t.data)==null?void 0:u.list;for(let n of e)n[l]="skeleton-loading"}return s(async()=>{var l;try{let e=((l=r==null?void 0:r.data)==null?void 0:l.list)||[];for(let n of e)a(n)}catch(e){console.error(e)}}),r}export{p,q}; diff --git a/app/dubbo-ui/dist/admin/assets/SearchUtil-sOWd6ofa.js b/app/dubbo-ui/dist/admin/assets/SearchUtil-bfid3zNl.js similarity index 81% rename from app/dubbo-ui/dist/admin/assets/SearchUtil-sOWd6ofa.js rename to app/dubbo-ui/dist/admin/assets/SearchUtil-bfid3zNl.js index 99a8c0313..b7385e30f 100644 --- a/app/dubbo-ui/dist/admin/assets/SearchUtil-sOWd6ofa.js +++ b/app/dubbo-ui/dist/admin/assets/SearchUtil-bfid3zNl.js @@ -1 +1 @@ -var Q=Object.defineProperty;var X=(d,o,u)=>o in d?Q(d,o,{enumerable:!0,configurable:!0,writable:!0,value:u}):d[o]=u;var _=(d,o,u)=>(X(d,typeof o!="symbol"?o+"":o,u),u);import{d as Z,v as W,r as A,k as q,x as ee,y as te,l as D,c as m,j as g,b as i,w as n,n as s,e as c,P as ae,o as r,H as oe,J as b,K as C,G as y,f as P,t as S,ad as I,I as T,a8 as U,Z as se,a0 as le,ae as ne,Q as re,m as ie,_ as ce}from"./index-hmLAZQYT.js";const ue={class:"__container_search_table"},de={class:"search-query-container"},pe={class:"custom-column button"},_e={class:"dropdown"},me={class:"body"},he=["onClick"],fe={class:"search-table-container"},ge={key:0},ye={key:1},be=Z({__name:"SearchTable",setup(d){W(a=>({"3d09cf76":s(ae)}));const o=A({customColumns:!1}),{appContext:{config:{globalProperties:u}}}=q(),e=ee(te.SEARCH_DOMAIN);e.table.columns.forEach(a=>{if(a.title){const p=a.title;a.title=D(()=>u.$t(p))}});const h=D(()=>e.noPaged?!1:{pageSize:e.paged.pageSize,current:e.paged.curPage,total:e.paged.total,showTotal:a=>u.$t("searchDomain.total")+": "+a+" "+u.$t("searchDomain.unit")}),f=(a,p,v)=>{e.paged.pageSize=a.pageSize,e.paged.curPage=a.current,e.onSearch()};function k(a){let p=e==null?void 0:e.table.columns.filter(v=>!v.__hide);if(!a.__hide&&p.length<=1){ie.warn("must show at least one column");return}a.__hide=!a.__hide}return(a,p)=>{var N,O,E,V;const v=c("a-radio-button"),R=c("a-radio-group"),B=c("a-select-option"),K=c("a-select"),j=c("a-input"),$=c("a-form-item"),M=c("a-button"),F=c("a-flex"),Y=c("a-form"),x=c("a-col"),H=c("a-card"),J=c("a-row"),L=c("a-skeleton-button"),G=c("a-table");return r(),m("div",ue,[g("div",de,[i(J,null,{default:n(()=>[i(x,{span:18},{default:n(()=>[i(Y,{onKeyup:p[1]||(p[1]=oe(t=>s(e).onSearch(),["enter"]))},{default:n(()=>[i(F,{wrap:"wrap",gap:"large"},{default:n(()=>[(r(!0),m(b,null,C(s(e).params,t=>(r(),y($,{label:a.$t(t.label)},{default:n(()=>[t.dict&&t.dict.length>0?(r(),m(b,{key:0},[t.dictType==="BUTTON"?(r(),y(R,{key:0,"button-style":"solid",value:s(e).queryForm[t.param],"onUpdate:value":l=>s(e).queryForm[t.param]=l},{default:n(()=>[(r(!0),m(b,null,C(t.dict,l=>(r(),y(v,{value:l.value},{default:n(()=>[P(S(a.$t(l.label)),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"])):(r(),y(K,{key:1,class:"select-type",style:I(t.style),value:s(e).queryForm[t.param],"onUpdate:value":l=>s(e).queryForm[t.param]=l},{default:n(()=>[(r(!0),m(b,null,C([...t.dict,{label:"none",value:""}],l=>(r(),y(B,{value:l.value},{default:n(()=>[P(S(a.$t(l.label)),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["style","value","onUpdate:value"]))],64)):(r(),y(j,{key:1,style:I(t.style),placeholder:a.$t("placeholder."+(t.placeholder||"typeDefault")),value:s(e).queryForm[t.param],"onUpdate:value":l=>s(e).queryForm[t.param]=l},null,8,["style","placeholder","value","onUpdate:value"]))]),_:2},1032,["label"]))),256)),i($,{label:""},{default:n(()=>[i(M,{type:"primary",onClick:p[0]||(p[0]=t=>s(e).onSearch())},{default:n(()=>[i(s(T),{style:{"margin-bottom":"-2px","font-size":"1.3rem"},icon:"ic:outline-manage-search"})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),i(x,{span:6},{default:n(()=>[i(F,{style:{"justify-content":"flex-end"}},{default:n(()=>[U(a.$slots,"customOperation",{},void 0,!0),g("div",{class:"common-tool",onClick:p[2]||(p[2]=t=>o.customColumns=!o.customColumns)},[g("div",pe,[i(s(T),{icon:"material-symbols-light:format-list-bulleted-rounded"})]),se(g("div",_e,[i(H,{style:{"max-width":"300px"},title:"Custom Column"},{default:n(()=>{var t;return[g("div",me,[(r(!0),m(b,null,C((t=s(e))==null?void 0:t.table.columns,(l,w)=>(r(),m("div",{class:"item",onClick:ne(z=>k(l),["stop"])},[i(s(T),{style:{"margin-bottom":"-4px","font-size":"1rem","margin-right":"2px"},icon:l.__hide?"zondicons:view-hide":"zondicons:view-show"},null,8,["icon"]),P(" "+S(l.title),1)],8,he))),256))])]}),_:1})],512),[[le,o.customColumns]])])]),_:3})]),_:3})]),_:3})]),g("div",fe,[i(G,{loading:s(e).table.loading,pagination:h.value,scroll:{scrollToFirstRowOnChange:!0,y:((N=s(e).tableStyle)==null?void 0:N.scrollY)||"",x:((O=s(e).tableStyle)==null?void 0:O.scrollX)||""},columns:(E=s(e))==null?void 0:E.table.columns.filter(t=>!t.__hide),"data-source":(V=s(e))==null?void 0:V.result,onChange:f},{bodyCell:n(({text:t,record:l,index:w,column:z})=>[z.key==="idx"?(r(),m("span",ge,S(w+1),1)):re("",!0),t==="skeleton-loading"?(r(),m("span",ye,[i(L,{active:"",size:"small"})])):U(a.$slots,"bodyCell",{key:2,text:t,record:l,index:w,column:z},void 0,!0)]),_:3},8,["loading","pagination","scroll","columns","data-source"])])])}}}),Se=ce(be,[["__scopeId","data-v-e2b01919"]]);class ke{constructor(o,u,e,h,f,k){_(this,"noPaged");_(this,"queryForm");_(this,"params");_(this,"searchApi");_(this,"result");_(this,"handleResult");_(this,"tableStyle");_(this,"table",{columns:[]});_(this,"paged",{curPage:1,pageOffset:"0",total:0,pageSize:10});this.params=o,this.noPaged=f,this.queryForm=A({}),this.table.columns=e,o.forEach(a=>{a.defaultValue&&(this.queryForm[a.param]=a.defaultValue)}),h&&(this.paged={...this.paged,...h}),this.searchApi=u,this.handleResult=k}async onSearch(o){o&&(this.handleResult=o),this.table.loading=!0,setTimeout(()=>{this.table.loading=!1},1e4);const u={...this.queryForm,...this.noPaged?{}:{pageSize:this.paged.pageSize,pageOffset:(this.paged.curPage-1)*this.paged.pageSize}};this.searchApi(u).then(e=>{const{data:{list:h,pageInfo:f}}=e;this.result=o?o(h):h,this.noPaged||(this.paged.total=(f==null?void 0:f.Total)||0)}).catch(e=>{console.error("Error fetching data:",e)}).finally(()=>{this.table.loading=!1})}}function we(d,o){return isNaN(d-o)?d.localeCompare(o):d-o}export{ke as S,Se as a,we as s}; +var G=Object.defineProperty;var Q=(d,o,u)=>o in d?G(d,o,{enumerable:!0,configurable:!0,writable:!0,value:u}):d[o]=u;var _=(d,o,u)=>(Q(d,typeof o!="symbol"?o+"":o,u),u);import{d as W,v as Z,r as A,k as q,y as ee,z as te,l as D,c as m,j as g,b as i,w as n,n as s,e as c,P as ae,o as r,K as oe,L as b,M as C,J as y,f as P,t as S,af as I,I as T,a9 as U,$ as se,a1 as le,ag as ne,T as re,m as ie,_ as ce}from"./index-3zDsduUv.js";const ue={class:"__container_search_table"},de={class:"search-query-container"},pe={class:"custom-column button"},_e={class:"dropdown"},me={class:"body"},he=["onClick"],fe={class:"search-table-container"},ge={key:0},ye={key:1},be=W({__name:"SearchTable",setup(d){Z(a=>({"3d09cf76":s(ae)}));const o=A({customColumns:!1}),{appContext:{config:{globalProperties:u}}}=q(),e=ee(te.SEARCH_DOMAIN);e.table.columns.forEach(a=>{if(a.title){const p=a.title;a.title=D(()=>u.$t(p))}});const h=D(()=>e.noPaged?!1:{pageSize:e.paged.pageSize,current:e.paged.curPage,total:e.paged.total,showTotal:a=>u.$t("searchDomain.total")+": "+a+" "+u.$t("searchDomain.unit")}),f=(a,p,v)=>{e.paged.pageSize=a.pageSize,e.paged.curPage=a.current,e.onSearch()};function k(a){let p=e==null?void 0:e.table.columns.filter(v=>!v.__hide);if(!a.__hide&&p.length<=1){ie.warn("must show at least one column");return}a.__hide=!a.__hide}return(a,p)=>{var N,O,E,V;const v=c("a-radio-button"),R=c("a-radio-group"),B=c("a-select-option"),K=c("a-select"),M=c("a-input"),$=c("a-form-item"),j=c("a-button"),F=c("a-flex"),L=c("a-form"),x=c("a-col"),Y=c("a-card"),J=c("a-row"),H=c("a-skeleton-button"),X=c("a-table");return r(),m("div",ue,[g("div",de,[i(J,null,{default:n(()=>[i(x,{span:18},{default:n(()=>[i(L,{onKeyup:p[1]||(p[1]=oe(t=>s(e).onSearch(),["enter"]))},{default:n(()=>[i(F,{wrap:"wrap",gap:"large"},{default:n(()=>[(r(!0),m(b,null,C(s(e).params,t=>(r(),y($,{label:a.$t(t.label)},{default:n(()=>[t.dict&&t.dict.length>0?(r(),m(b,{key:0},[t.dictType==="BUTTON"?(r(),y(R,{key:0,"button-style":"solid",value:s(e).queryForm[t.param],"onUpdate:value":l=>s(e).queryForm[t.param]=l},{default:n(()=>[(r(!0),m(b,null,C(t.dict,l=>(r(),y(v,{value:l.value},{default:n(()=>[P(S(a.$t(l.label)),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"])):(r(),y(K,{key:1,class:"select-type",style:I(t.style),value:s(e).queryForm[t.param],"onUpdate:value":l=>s(e).queryForm[t.param]=l},{default:n(()=>[(r(!0),m(b,null,C([...t.dict,{label:"none",value:""}],l=>(r(),y(B,{value:l.value},{default:n(()=>[P(S(a.$t(l.label)),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["style","value","onUpdate:value"]))],64)):(r(),y(M,{key:1,style:I(t.style),placeholder:a.$t("placeholder."+(t.placeholder||"typeDefault")),value:s(e).queryForm[t.param],"onUpdate:value":l=>s(e).queryForm[t.param]=l},null,8,["style","placeholder","value","onUpdate:value"]))]),_:2},1032,["label"]))),256)),i($,{label:""},{default:n(()=>[i(j,{type:"primary",onClick:p[0]||(p[0]=t=>s(e).onSearch())},{default:n(()=>[i(s(T),{style:{"margin-bottom":"-2px","font-size":"1.3rem"},icon:"ic:outline-manage-search"})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),i(x,{span:6},{default:n(()=>[i(F,{style:{"justify-content":"flex-end"}},{default:n(()=>[U(a.$slots,"customOperation",{},void 0,!0),g("div",{class:"common-tool",onClick:p[2]||(p[2]=t=>o.customColumns=!o.customColumns)},[g("div",pe,[i(s(T),{icon:"material-symbols-light:format-list-bulleted-rounded"})]),se(g("div",_e,[i(Y,{style:{"max-width":"300px"},title:"Custom Column"},{default:n(()=>{var t;return[g("div",me,[(r(!0),m(b,null,C((t=s(e))==null?void 0:t.table.columns,(l,w)=>(r(),m("div",{class:"item",onClick:ne(z=>k(l),["stop"])},[i(s(T),{style:{"margin-bottom":"-4px","font-size":"1rem","margin-right":"2px"},icon:l.__hide?"zondicons:view-hide":"zondicons:view-show"},null,8,["icon"]),P(" "+S(l.title),1)],8,he))),256))])]}),_:1})],512),[[le,o.customColumns]])])]),_:3})]),_:3})]),_:3})]),g("div",fe,[i(X,{loading:s(e).table.loading,pagination:h.value,scroll:{scrollToFirstRowOnChange:!0,y:((N=s(e).tableStyle)==null?void 0:N.scrollY)||"",x:((O=s(e).tableStyle)==null?void 0:O.scrollX)||""},columns:(E=s(e))==null?void 0:E.table.columns.filter(t=>!t.__hide),"data-source":(V=s(e))==null?void 0:V.result,onChange:f},{bodyCell:n(({text:t,record:l,index:w,column:z})=>[z.key==="idx"?(r(),m("span",ge,S(w+1),1)):re("",!0),t==="skeleton-loading"?(r(),m("span",ye,[i(H,{active:"",size:"small"})])):U(a.$slots,"bodyCell",{key:2,text:t,record:l,index:w,column:z},void 0,!0)]),_:3},8,["loading","pagination","scroll","columns","data-source"])])])}}}),Se=ce(be,[["__scopeId","data-v-e2b01919"]]);class ke{constructor(o,u,e,h,f,k){_(this,"noPaged");_(this,"queryForm");_(this,"params");_(this,"searchApi");_(this,"result");_(this,"handleResult");_(this,"tableStyle");_(this,"table",{columns:[]});_(this,"paged",{curPage:1,pageOffset:"0",total:0,pageSize:10});this.params=o,this.noPaged=f,this.queryForm=A({}),this.table.columns=e,o.forEach(a=>{a.defaultValue&&(this.queryForm[a.param]=a.defaultValue)}),h&&(this.paged={...this.paged,...h}),this.searchApi=u,this.handleResult=k}async onSearch(o){o&&(this.handleResult=o),this.table.loading=!0,setTimeout(()=>{this.table.loading=!1},1e4);const u={...this.queryForm,...this.noPaged?{}:{pageSize:this.paged.pageSize,pageOffset:(this.paged.curPage-1)*this.paged.pageSize}};this.searchApi(u).then(e=>{const{data:{list:h,pageInfo:f}}=e;this.result=o?o(h):h,this.noPaged||(this.paged.total=(f==null?void 0:f.Total)||0)}).catch(e=>{console.error("Error fetching data:",e)}).finally(()=>{this.table.loading=!1})}}function we(d,o){return isNaN(d-o)?d.localeCompare(o):d-o}export{ke as S,Se as a,we as s}; diff --git a/app/dubbo-ui/dist/admin/assets/YAMLView-Kv0Zh07k.js b/app/dubbo-ui/dist/admin/assets/YAMLView-TcLqiDOf.js similarity index 51% rename from app/dubbo-ui/dist/admin/assets/YAMLView-Kv0Zh07k.js rename to app/dubbo-ui/dist/admin/assets/YAMLView-TcLqiDOf.js index 928720763..9c9863632 100644 --- a/app/dubbo-ui/dist/admin/assets/YAMLView-Kv0Zh07k.js +++ b/app/dubbo-ui/dist/admin/assets/YAMLView-TcLqiDOf.js @@ -1 +1 @@ -import{y as V,_ as L}from"./js-yaml-8Gkz3BRW.js";import{d as R,a as K,z as r,x as P,y as q,W as z,l as G,r as N,u as Q,c as D,b as a,w as e,G as O,Q as b,J as B,e as d,o as y,j as I,K as U,f as v,m as g,a3 as W,p as $,h as H,_ as X}from"./index-hmLAZQYT.js";import{k as Z,l as aa,m as ea}from"./traffic-C2a-KjHH.js";import{V as ta}from"./ConfigModel-QFNd-Zdd.js";import"./request-8jI_GZey.js";const S=m=>($("data-v-68fde8b4"),m=m(),H(),m),sa={class:"editorBox"},na=S(()=>I("p",null,"修改时间: 2024/3/20 15:20:31",-1)),oa=S(()=>I("p",null,"版本号: xo842xqpx834",-1)),la=R({__name:"YAMLView",setup(m){const _=K(),C=r(_.params.isEdit==="1"),h=r(!1),f=r(!1),A=r(8),p=P(q.PROVIDE_INJECT_KEY),u=r(),k=r(),T=r("");z(async()=>{await E()}),G(()=>k.value!==JSON.stringify(u.value));const t=N(new ta);async function E(){var s,l,i;if((s=p.dynamicConfigForm)!=null&&s.data)t.fromData(p.dynamicConfigForm.data);else{if(((l=_.params)==null?void 0:l.pathId)==="_tmp")C.value=!0,t.isAdd=!0;else{t.isAdd=!1;const c=await Z({name:(i=_.params)==null?void 0:i.pathId});t.fromApiOutput(c.data)}p.dynamicConfigForm=N({data:t})}const n=t.toApiInput();T.value=n.ruleName,n.ruleName=void 0;const o=V.dump(n);k.value=JSON.stringify(o),u.value=o}async function F(){f.value=!0;try{p.dynamicConfigForm.data=null,await E(),g.success("config reset success")}finally{f.value=!1}}const j=Q();async function J(){var o;f.value=!0;let n=V.load(u.value);try{if(t.isAdd===!0){aa({name:t.basicInfo.key+".configurators"},n).then(l=>{p.dynamicConfigForm.data=null,W(()=>{j.replace("/traffic/dynamicConfig"),g.success("config add success")})}).catch(l=>{g.error("添加失败: "+l.msg)});return}let s=await ea({name:(o=_.params)==null?void 0:o.pathId},n);t.fromApiOutput(s.data),g.success("config save success")}finally{f.value=!1}}function M(n){t.fromApiOutput(V.load(u.value))}return(n,o)=>{const s=d("a-col"),l=d("a-row"),i=d("a-flex"),c=d("a-button"),x=d("a-card"),Y=d("a-spin");return y(),D(B,null,[a(x,null,{default:e(()=>[a(Y,{spinning:f.value},{default:e(()=>[a(i,{style:{width:"100%"}},{default:e(()=>[a(s,{span:h.value?24-A.value:24,class:"left"},{default:e(()=>[a(i,{vertical:"",align:"end"},{default:e(()=>[a(l,{style:{width:"100%"},justify:"space-between"},{default:e(()=>[a(s,{span:12}),a(s,{span:12})]),_:1}),I("div",sa,[a(L,{modelValue:u.value,"onUpdate:modelValue":o[0]||(o[0]=w=>u.value=w),onChange:M,theme:"vs-dark",height:"calc(100vh - 450px)",language:"yaml",readonly:!C.value},null,8,["modelValue","readonly"])])]),_:1})]),_:1},8,["span"]),a(s,{span:h.value?A.value:0,class:"right"},{default:e(()=>[h.value?(y(),O(x,{key:0,class:"sliderBox"},{default:e(()=>[(y(),D(B,null,U(2,w=>a(x,{key:w},{default:e(()=>[na,oa,a(i,{justify:"flex-end"},{default:e(()=>[a(c,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[v("查看")]),_:1}),a(c,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[v("回滚")]),_:1})]),_:1})]),_:2},1024)),64))]),_:1})):b("",!0)]),_:1},8,["span"])]),_:1})]),_:1},8,["spinning"])]),_:1}),C.value?(y(),O(i,{key:0,style:{"margin-top":"30px"}},{default:e(()=>[a(c,{type:"primary",onClick:J},{default:e(()=>[v("保存")]),_:1}),a(c,{style:{"margin-left":"30px"},onClick:F},{default:e(()=>[v("重置")]),_:1})]),_:1})):b("",!0)],64)}}}),fa=X(la,[["__scopeId","data-v-68fde8b4"]]);export{fa as default}; +import{y as V,_ as Y}from"./js-yaml-eElisXzH.js";import{d as R,a as K,B as r,y as P,z as q,D as z,l as U,r as N,u as $,c as D,b as a,w as e,J as B,T as O,L as T,e as d,o as y,j as I,M as G,f as v,m as g,a4 as H,p as Q,h as W,_ as X}from"./index-3zDsduUv.js";import{k as Z,l as aa,m as ea}from"./traffic-dHGZ6qwp.js";import{V as ta}from"./ConfigModel-IgPiU3B2.js";import"./request-3an337VF.js";const b=m=>(Q("data-v-68fde8b4"),m=m(),W(),m),sa={class:"editorBox"},na=b(()=>I("p",null,"修改时间: 2024/3/20 15:20:31",-1)),oa=b(()=>I("p",null,"版本号: xo842xqpx834",-1)),la=R({__name:"YAMLView",setup(m){const _=K(),C=r(_.params.isEdit==="1"),h=r(!1),f=r(!1),A=r(8),p=P(q.PROVIDE_INJECT_KEY),u=r(),k=r(),S=r("");z(async()=>{await E()}),U(()=>k.value!==JSON.stringify(u.value));const t=N(new ta);async function E(){var s,l,i;if((s=p.dynamicConfigForm)!=null&&s.data)t.fromData(p.dynamicConfigForm.data);else{if(((l=_.params)==null?void 0:l.pathId)==="_tmp")C.value=!0,t.isAdd=!0;else{t.isAdd=!1;const c=await Z({name:(i=_.params)==null?void 0:i.pathId});t.fromApiOutput(c.data)}p.dynamicConfigForm=N({data:t})}const n=t.toApiInput();S.value=n.ruleName,n.ruleName=void 0;const o=V.dump(n);k.value=JSON.stringify(o),u.value=o}async function F(){f.value=!0;try{p.dynamicConfigForm.data=null,await E(),g.success("config reset success")}finally{f.value=!1}}const M=$();async function j(){var o;f.value=!0;let n=V.load(u.value);try{if(t.isAdd===!0){aa({name:t.basicInfo.key+".configurators"},n).then(l=>{p.dynamicConfigForm.data=null,H(()=>{M.replace("/traffic/dynamicConfig"),g.success("config add success")})}).catch(l=>{g.error("添加失败: "+l.msg)});return}let s=await ea({name:(o=_.params)==null?void 0:o.pathId},n);t.fromApiOutput(s.data),g.success("config save success")}finally{f.value=!1}}function J(n){t.fromApiOutput(V.load(u.value))}return(n,o)=>{const s=d("a-col"),l=d("a-row"),i=d("a-flex"),c=d("a-button"),x=d("a-card"),L=d("a-spin");return y(),D(T,null,[a(x,null,{default:e(()=>[a(L,{spinning:f.value},{default:e(()=>[a(i,{style:{width:"100%"}},{default:e(()=>[a(s,{span:h.value?24-A.value:24,class:"left"},{default:e(()=>[a(i,{vertical:"",align:"end"},{default:e(()=>[a(l,{style:{width:"100%"},justify:"space-between"},{default:e(()=>[a(s,{span:12}),a(s,{span:12})]),_:1}),I("div",sa,[a(Y,{modelValue:u.value,"onUpdate:modelValue":o[0]||(o[0]=w=>u.value=w),onChange:J,theme:"vs-dark",height:"calc(100vh - 450px)",language:"yaml",readonly:!C.value},null,8,["modelValue","readonly"])])]),_:1})]),_:1},8,["span"]),a(s,{span:h.value?A.value:0,class:"right"},{default:e(()=>[h.value?(y(),B(x,{key:0,class:"sliderBox"},{default:e(()=>[(y(),D(T,null,G(2,w=>a(x,{key:w},{default:e(()=>[na,oa,a(i,{justify:"flex-end"},{default:e(()=>[a(c,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[v("查看")]),_:1}),a(c,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[v("回滚")]),_:1})]),_:1})]),_:2},1024)),64))]),_:1})):O("",!0)]),_:1},8,["span"])]),_:1})]),_:1},8,["spinning"])]),_:1}),C.value?(y(),B(i,{key:0,style:{"margin-top":"30px"}},{default:e(()=>[a(c,{type:"primary",onClick:j},{default:e(()=>[v("保存")]),_:1}),a(c,{style:{"margin-left":"30px"},onClick:F},{default:e(()=>[v("重置")]),_:1})]),_:1})):O("",!0)],64)}}}),fa=X(la,[["__scopeId","data-v-68fde8b4"]]);export{fa as default}; diff --git a/app/dubbo-ui/dist/admin/assets/YAMLView-lT4dPq7F.js b/app/dubbo-ui/dist/admin/assets/YAMLView-lT4dPq7F.js deleted file mode 100644 index 7f8354350..000000000 --- a/app/dubbo-ui/dist/admin/assets/YAMLView-lT4dPq7F.js +++ /dev/null @@ -1 +0,0 @@ -import{y as D,_ as R}from"./js-yaml-8Gkz3BRW.js";import{g as $}from"./traffic-C2a-KjHH.js";import{d as b,a as A,z as _,W as B,G as m,w as a,e as f,o as c,b as t,f as y,t as I,n as k,a9 as L,aa as S,j as g,c as M,K as O,J as Y,Q as j,p as q,h as z,_ as E}from"./index-hmLAZQYT.js";import"./request-8jI_GZey.js";const w=i=>(q("data-v-76e6a408"),i=i(),z(),i),F={class:"editorBox"},G=w(()=>g("p",null,"修改时间: 2024/3/20 15:20:31",-1)),J=w(()=>g("p",null,"版本号: xo842xqpx834",-1)),K=b({__name:"YAMLView",setup(i){const h=A(),N=_(!0),l=_(!1),V=_(8),v=_("");async function C(){var o,n;let e=await $((o=h.params)==null?void 0:o.ruleName);console.log(e),(e==null?void 0:e.code)===200&&e.data&&((n=h.params)!=null&&n.ruleName)&&e.data.scope==="service"&&(Array.isArray(e.data.conditions)&&(e.data.conditions=e.data.conditions.map(d=>{const s=d.split("=>");if(s.length===2){const r=s[0].trim();let x=s[1].trim();const u=x.match(/other\[(.*?)\]=(.*)/);return u&&u[1]&&u[2]&&(x=`${u[1]}=${u[2]}`),`${r} => ${x}`}return d})),v.value=D.dump(e.data))}return B(()=>{C()}),(e,o)=>{const n=f("a-button"),p=f("a-flex"),d=f("a-col"),s=f("a-card");return c(),m(s,null,{default:a(()=>[t(p,{style:{width:"100%"}},{default:a(()=>[t(d,{span:l.value?24-V.value:24,class:"left"},{default:a(()=>[t(p,{vertical:"",align:"end"},{default:a(()=>[t(n,{type:"text",style:{color:"#0a90d5"},onClick:o[0]||(o[0]=r=>l.value=!l.value)},{default:a(()=>[y(I(e.$t("flowControlDomain.versionRecords"))+" ",1),l.value?(c(),m(k(S),{key:1})):(c(),m(k(L),{key:0}))]),_:1}),g("div",F,[t(R,{modelValue:v.value,"onUpdate:modelValue":o[1]||(o[1]=r=>v.value=r),theme:"vs-dark",height:500,language:"yaml",readonly:N.value},null,8,["modelValue","readonly"])])]),_:1})]),_:1},8,["span"]),y(" Ï "),t(d,{span:l.value?V.value:0,class:"right"},{default:a(()=>[l.value?(c(),m(s,{key:0,class:"sliderBox"},{default:a(()=>[(c(),M(Y,null,O(2,r=>t(s,{key:r},{default:a(()=>[G,J,t(p,{justify:"flex-end"},{default:a(()=>[t(n,{type:"text",style:{color:"#0a90d5"}},{default:a(()=>[y("查看")]),_:1}),t(n,{type:"text",style:{color:"#0a90d5"}},{default:a(()=>[y("回滚")]),_:1})]),_:1})]),_:2},1024)),64))]),_:1})):j("",!0)]),_:1},8,["span"])]),_:1})]),_:1})}}}),W=E(K,[["__scopeId","data-v-76e6a408"]]);export{W as default}; diff --git a/app/dubbo-ui/dist/admin/assets/YAMLView-mXrxtewG.js b/app/dubbo-ui/dist/admin/assets/YAMLView-mXrxtewG.js new file mode 100644 index 000000000..d0128dea6 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/YAMLView-mXrxtewG.js @@ -0,0 +1 @@ +import{y as b,_ as B}from"./js-yaml-eElisXzH.js";import{g as C}from"./traffic-dHGZ6qwp.js";import{d as R,a as $,B as _,D as A,J as m,w as a,e as f,o as c,b as t,f as y,t as L,n as k,aa as I,ab as M,j as g,c as S,M as O,L as Y,T as j,p as T,h as q,_ as E}from"./index-3zDsduUv.js";import"./request-3an337VF.js";const w=i=>(T("data-v-76e6a408"),i=i(),q(),i),F={class:"editorBox"},J=w(()=>g("p",null,"修改时间: 2024/3/20 15:20:31",-1)),P=w(()=>g("p",null,"版本号: xo842xqpx834",-1)),U=R({__name:"YAMLView",setup(i){const h=$(),D=_(!0),l=_(!1),V=_(8),v=_("");async function N(){var o,n;let e=await C((o=h.params)==null?void 0:o.ruleName);console.log(e),(e==null?void 0:e.code)===200&&e.data&&((n=h.params)!=null&&n.ruleName)&&e.data.scope==="service"&&(Array.isArray(e.data.conditions)&&(e.data.conditions=e.data.conditions.map(d=>{const s=d.split("=>");if(s.length===2){const r=s[0].trim();let x=s[1].trim();const u=x.match(/other\[(.*?)\]=(.*)/);return u&&u[1]&&u[2]&&(x=`${u[1]}=${u[2]}`),`${r} => ${x}`}return d})),v.value=b.dump(e.data))}return A(()=>{N()}),(e,o)=>{const n=f("a-button"),p=f("a-flex"),d=f("a-col"),s=f("a-card");return c(),m(s,null,{default:a(()=>[t(p,{style:{width:"100%"}},{default:a(()=>[t(d,{span:l.value?24-V.value:24,class:"left"},{default:a(()=>[t(p,{vertical:"",align:"end"},{default:a(()=>[t(n,{type:"text",style:{color:"#0a90d5"},onClick:o[0]||(o[0]=r=>l.value=!l.value)},{default:a(()=>[y(L(e.$t("flowControlDomain.versionRecords"))+" ",1),l.value?(c(),m(k(M),{key:1})):(c(),m(k(I),{key:0}))]),_:1}),g("div",F,[t(B,{modelValue:v.value,"onUpdate:modelValue":o[1]||(o[1]=r=>v.value=r),theme:"vs-dark",height:500,language:"yaml",readonly:D.value},null,8,["modelValue","readonly"])])]),_:1})]),_:1},8,["span"]),y(" Ï "),t(d,{span:l.value?V.value:0,class:"right"},{default:a(()=>[l.value?(c(),m(s,{key:0,class:"sliderBox"},{default:a(()=>[(c(),S(Y,null,O(2,r=>t(s,{key:r},{default:a(()=>[J,P,t(p,{justify:"flex-end"},{default:a(()=>[t(n,{type:"text",style:{color:"#0a90d5"}},{default:a(()=>[y("查看")]),_:1}),t(n,{type:"text",style:{color:"#0a90d5"}},{default:a(()=>[y("回滚")]),_:1})]),_:1})]),_:2},1024)),64))]),_:1})):j("",!0)]),_:1},8,["span"])]),_:1})]),_:1})}}}),Q=E(U,[["__scopeId","data-v-76e6a408"]]);export{Q as default}; diff --git a/app/dubbo-ui/dist/admin/assets/YAMLView-q7Cf5xIc.js b/app/dubbo-ui/dist/admin/assets/YAMLView-q7Cf5xIc.js deleted file mode 100644 index 2317c5d65..000000000 --- a/app/dubbo-ui/dist/admin/assets/YAMLView-q7Cf5xIc.js +++ /dev/null @@ -1,10 +0,0 @@ -import{y as D,_ as b}from"./js-yaml-8Gkz3BRW.js";import{e as B}from"./traffic-C2a-KjHH.js";import{d as C,a as R,z as u,W as I,G as r,w as e,e as c,o as s,b as a,f as p,t as L,n as x,a9 as N,aa as S,j as f,c as A,K as M,J as O,Q as T,p as Y,h as $,_ as j}from"./index-hmLAZQYT.js";import"./request-8jI_GZey.js";const h=n=>(Y("data-v-4f1417af"),n=n(),$(),n),q={class:"editorBox"},z=h(()=>f("p",null,"修改时间: 2024/3/20 15:20:31",-1)),E=h(()=>f("p",null,"版本号: xo842xqpx834",-1)),F=C({__name:"YAMLView",setup(n){const k=R(),V=u(!0),t=u(!1),m=u(8),y=u(`configVersion: v3.0 -force: true -enabled: true -key: shop-detail -tags: -  - name: gray -    match: -      - key: env -        value: -          exact: gray`),w=async()=>{var l;const o=await B((l=k.params)==null?void 0:l.ruleName);o.code===200&&(y.value=D.dump(o==null?void 0:o.data))};return I(()=>{w()}),(o,l)=>{const d=c("a-button"),_=c("a-flex"),v=c("a-col"),i=c("a-card");return s(),r(i,null,{default:e(()=>[a(_,{style:{width:"100%"}},{default:e(()=>[a(v,{span:t.value?24-m.value:24,class:"left"},{default:e(()=>[a(_,{vertical:"",align:"end"},{default:e(()=>[a(d,{type:"text",style:{color:"#0a90d5"},onClick:l[0]||(l[0]=g=>t.value=!t.value)},{default:e(()=>[p(L(o.$t("flowControlDomain.versionRecords"))+" ",1),t.value?(s(),r(x(S),{key:1})):(s(),r(x(N),{key:0}))]),_:1}),f("div",q,[a(b,{modelValue:y.value,theme:"vs-dark",height:500,language:"yaml",readonly:V.value},null,8,["modelValue","readonly"])])]),_:1})]),_:1},8,["span"]),a(v,{span:t.value?m.value:0,class:"right"},{default:e(()=>[t.value?(s(),r(i,{key:0,class:"sliderBox"},{default:e(()=>[(s(),A(O,null,M(2,g=>a(i,{key:g},{default:e(()=>[z,E,a(_,{justify:"flex-end"},{default:e(()=>[a(d,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[p("查看")]),_:1}),a(d,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[p("回滚")]),_:1})]),_:1})]),_:2},1024)),64))]),_:1})):T("",!0)]),_:1},8,["span"])]),_:1})]),_:1})}}}),Q=j(F,[["__scopeId","data-v-4f1417af"]]);export{Q as default}; diff --git a/app/dubbo-ui/dist/admin/assets/YAMLView-s3WMf-Uo.js b/app/dubbo-ui/dist/admin/assets/YAMLView-s3WMf-Uo.js new file mode 100644 index 000000000..0d3bc3883 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/YAMLView-s3WMf-Uo.js @@ -0,0 +1,10 @@ +import{y as D,_ as b}from"./js-yaml-eElisXzH.js";import{e as B}from"./traffic-dHGZ6qwp.js";import{d as C,a as L,B as u,D as R,J as r,w as e,e as c,o as s,b as a,f as p,t as I,n as x,aa as M,ab as N,j as f,c as S,M as A,L as T,T as O,p as Y,h as $,_ as j}from"./index-3zDsduUv.js";import"./request-3an337VF.js";const h=n=>(Y("data-v-4f1417af"),n=n(),$(),n),q={class:"editorBox"},E=h(()=>f("p",null,"修改时间: 2024/3/20 15:20:31",-1)),F=h(()=>f("p",null,"版本号: xo842xqpx834",-1)),J=C({__name:"YAMLView",setup(n){const k=L(),V=u(!0),t=u(!1),m=u(8),y=u(`configVersion: v3.0 +force: true +enabled: true +key: shop-detail +tags: +  - name: gray +    match: +      - key: env +        value: +          exact: gray`),w=async()=>{var l;const o=await B((l=k.params)==null?void 0:l.ruleName);o.code===200&&(y.value=D.dump(o==null?void 0:o.data))};return R(()=>{w()}),(o,l)=>{const d=c("a-button"),_=c("a-flex"),v=c("a-col"),i=c("a-card");return s(),r(i,null,{default:e(()=>[a(_,{style:{width:"100%"}},{default:e(()=>[a(v,{span:t.value?24-m.value:24,class:"left"},{default:e(()=>[a(_,{vertical:"",align:"end"},{default:e(()=>[a(d,{type:"text",style:{color:"#0a90d5"},onClick:l[0]||(l[0]=g=>t.value=!t.value)},{default:e(()=>[p(I(o.$t("flowControlDomain.versionRecords"))+" ",1),t.value?(s(),r(x(N),{key:1})):(s(),r(x(M),{key:0}))]),_:1}),f("div",q,[a(b,{modelValue:y.value,theme:"vs-dark",height:500,language:"yaml",readonly:V.value},null,8,["modelValue","readonly"])])]),_:1})]),_:1},8,["span"]),a(v,{span:t.value?m.value:0,class:"right"},{default:e(()=>[t.value?(s(),r(i,{key:0,class:"sliderBox"},{default:e(()=>[(s(),S(T,null,A(2,g=>a(i,{key:g},{default:e(()=>[E,F,a(_,{justify:"flex-end"},{default:e(()=>[a(d,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[p("查看")]),_:1}),a(d,{type:"text",style:{color:"#0a90d5"}},{default:e(()=>[p("回滚")]),_:1})]),_:1})]),_:2},1024)),64))]),_:1})):O("",!0)]),_:1},8,["span"])]),_:1})]),_:1})}}}),K=j(J,[["__scopeId","data-v-4f1417af"]]);export{K as default}; diff --git a/app/dubbo-ui/dist/admin/assets/addByFormView-L619fQ34.js b/app/dubbo-ui/dist/admin/assets/addByFormView-Ia4T74MU.js similarity index 68% rename from app/dubbo-ui/dist/admin/assets/addByFormView-L619fQ34.js rename to app/dubbo-ui/dist/admin/assets/addByFormView-Ia4T74MU.js index 84e0c2720..ce32d971c 100644 --- a/app/dubbo-ui/dist/admin/assets/addByFormView-L619fQ34.js +++ b/app/dubbo-ui/dist/admin/assets/addByFormView-Ia4T74MU.js @@ -1 +1 @@ -import{u as ce}from"./index-Va7nxJVK.js";import{d as ue,x as de,y as re,W as pe,F as z,k as _e,a as fe,z as N,u as ye,r as ve,D as J,c as W,b as e,w as t,e as i,o as k,f as r,G as g,n as S,a9 as be,aa as he,J as me,K as ke,j as x,t as B,I as L,Q as P,p as ge,h as xe,_ as we}from"./index-hmLAZQYT.js";import{f as $e}from"./traffic-C2a-KjHH.js";import"./request-8jI_GZey.js";const E=A=>(ge("data-v-74fb5f17"),A=A(),xe(),A),Ce={class:"__container_tagRule_detail"},Ue={style:{"max-width":"400px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},Ke=E(()=>x("br",null,null,-1)),Ne=E(()=>x("br",null,null,-1)),Oe=E(()=>x("br",null,null,-1)),Re=E(()=>x("br",null,null,-1)),Ee=E(()=>x("br",null,null,-1)),Te=E(()=>x("br",null,null,-1)),je={class:"bottom-action-footer"},Se=ue({__name:"addByFormView",setup(A){const w=de(re.PROVIDE_INJECT_KEY);pe(()=>{if(!z.isNil(w.tagRule)){const{enabled:a=!0,key:l,scope:u,runtime:p=!0,tags:n}=w.tagRule;c.enable=a,c.objectOfAction=l,c.ruleGranularity=u,c.runtime=p,n&&n.length&&n.forEach((b,d)=>{m.value.push({tagName:b.name,scope:{type:"labels",labels:[],addresses:{condition:"=",addressesStr:""}}});const{match:_}=b;let s=[];_.forEach((y,f)=>{s.push({myKey:y.key,condition:Object.keys(y.value)[0],value:y.value[Object.keys(y.value)[0]]})}),m.value[d]&&m.value[d].scope&&(m.value[d].scope.labels=s)})}}),_e(),fe();const O=N(!1),G=N(8);ce().toClipboard;const Y=ye(),q=(a,l)=>{var n,b,d,_;let u=`对于应用 ${l||"未指定"},将满足 `;const p=[];if(((n=a.scope)==null?void 0:n.type)==="labels"&&((b=a.scope.labels)==null?void 0:b.length)>0)a.scope.labels.forEach(s=>{var C,v;let y="";if(s.myKey==="method")y="请求方法";else if((C=s.myKey)!=null&&C.startsWith("args[")){const T=(v=s.myKey.match(/\[(\d+)\]/))==null?void 0:v[1];T!==void 0?y=`第 ${parseInt(T)+1} 个参数`:y=`标签 ${s.myKey||"未指定"}`}else y=`标签 ${s.myKey||"未指定"}`;let f="";const h=s.value||"未指定";switch(s.condition){case"exact":f=`exact ${h}`;break;case"regex":f=`regex ${h}`;break;case"prefix":f=`prefix ${h}`;break;case"noempty":f="noempty";break;case"empty":f="empty";break;case"wildcard":f=`wildcard ${h}`;break;case"!=":f=`!= ${h}`;break;default:f=`${s.condition||"未知关系"} ${h}`}s.condition!=="empty"&&s.condition!=="noempty"&&!s.value?p.push(`${y} 未填写`):p.push(`${y} ${f}`)});else if(((d=a.scope)==null?void 0:d.type)==="addresses"&&((_=a.scope.addresses)!=null&&_.addressesStr)){const s=a.scope.addresses.condition==="="?"等于":"不等于";p.push(`地址 ${s} [${a.scope.addresses.addressesStr}]`)}return p.length===0?u+="任意请求":u+=p.join(" 且 "),u+=` 的实例,打上 ${a.tagName||"未指定"} 标签,划入 ${a.tagName||"未指定"} 的隔离环境`,u},c=ve({ruleGranularity:"application",objectOfAction:"",enable:!0,faultTolerantProtection:!0,runtime:!0,priority:1,configVersion:"v3.0"});J(c,a=>{const{enable:l,objectOfAction:u,runtime:p,ruleGranularity:n}=a;w.tagRule={...w.tagRule,enabled:l,key:u,runtime:p,scope:n}},{immediate:!!z.isNil(w.tagRule)});const M=N([{label:"labels",value:"labels"}]),Q=N([{label:"exact",value:"exact"},{label:"regex",value:"regex"},{label:"prefix",value:"prefix"},{label:"noempty",value:"noempty"},{label:"empty",value:"empty"},{label:"wildcard",value:"wildcard"}]),H=N([{label:"=",value:"="},{label:"!=",value:"!="}]),X=N([{title:"键",dataIndex:"myKey",key:"myKey"},{title:"关系",dataIndex:"condition",key:"condition"},{title:"值",dataIndex:"value",key:"value"},{title:"操作",dataIndex:"operation",key:"operation"}]),m=N([]);J(m,a=>{console.log(a);const l=[];a.forEach(u=>{const{tagName:p,scope:n}=u,b=n.labels,d={name:p,match:[]};b&&b.length>0&&b.forEach(_=>{d.match.push({key:_.myKey,value:{[_.condition]:_.value}})}),l.push(d)}),w.tagRule={...w.tagRule,tags:l}},{deep:!0,immediate:!!z.isNil(w.tagRule)});const Z=(a,l)=>{if(m.value[a].scope.labels.length===1){m.value[a].scope.type="addresses";return}m.value[a].scope.labels.splice(l,1)},I=a=>{m.value[a].scope.labels.push({myKey:"",condition:"exact",value:""})},ee=()=>{m.value.push({tagName:"",scope:{type:"labels",labels:[{myKey:"",condition:"",value:""}],addresses:{condition:"",addressesStr:""}}})},te=a=>{m.value.splice(a,1)},ae=async()=>{const{ruleGranularity:a,objectOfAction:l,enable:u,faultTolerantProtection:p,runtime:n,priority:b,configVersion:d}=c,_={configVersion:d,scope:a,key:l,enabled:u,runtime:n,tags:[]};m.value.forEach((f,h)=>{const C={name:f.tagName,match:[]};f.scope.labels.forEach((v,T)=>{const D={key:v.myKey,value:{}};D.value[v.condition]=v.value,C.match.push(D)}),_.tags.push(C)});let s="";a=="application"?s=`${l}.tag-router`:s=`${l}:${d}.tag-router`,(await $e(s,_)).code===200&&Y.push("/traffic/tagRule")};return(a,l)=>{const u=i("a-button"),p=i("a-flex"),n=i("a-form-item"),b=i("a-switch"),d=i("a-col"),_=i("a-input"),s=i("a-input-number"),y=i("a-row"),f=i("a-form"),h=i("a-card"),C=i("a-tooltip"),v=i("a-space"),T=i("a-radio-group"),D=i("a-tag"),F=i("a-select"),le=i("a-table"),oe=i("a-textarea"),V=i("a-descriptions-item"),ne=i("a-descriptions"),se=i("a-affix");return k(),W("div",Ce,[e(p,{style:{width:"100%"}},{default:t(()=>[e(d,{span:O.value?24-G.value:24,class:"left"},{default:t(()=>[e(h,null,{default:t(()=>[e(v,{style:{width:"100%"},direction:"vertical",size:"middle"},{default:t(()=>[e(y,null,{default:t(()=>[e(p,{justify:"end",style:{width:"100%"}},{default:t(()=>[e(u,{type:"text",style:{color:"#0a90d5"},onClick:l[0]||(l[0]=o=>O.value=!O.value)},{default:t(()=>[r(" 字段说明 "),O.value?(k(),g(S(he),{key:1})):(k(),g(S(be),{key:0}))]),_:1})]),_:1}),e(h,{title:"基础信息",style:{width:"100%"},class:"_detail"},{default:t(()=>[e(f,{layout:"horizontal"},{default:t(()=>[e(y,{style:{width:"100%"}},{default:t(()=>[e(d,{span:12},{default:t(()=>[e(n,{label:"规则粒度",required:""},{default:t(()=>[r(" 应用")]),_:1}),e(n,{label:"容错保护"},{default:t(()=>[e(b,{checked:c.faultTolerantProtection,"onUpdate:checked":l[1]||(l[1]=o=>c.faultTolerantProtection=o),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1}),e(n,{label:"运行时生效"},{default:t(()=>[e(b,{checked:c.runtime,"onUpdate:checked":l[2]||(l[2]=o=>c.runtime=o),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"作用对象",required:""},{default:t(()=>[e(_,{value:c.objectOfAction,"onUpdate:value":l[3]||(l[3]=o=>c.objectOfAction=o),style:{width:"200px"}},null,8,["value"])]),_:1}),e(n,{label:"立即启用"},{default:t(()=>[e(b,{checked:c.enable,"onUpdate:checked":l[4]||(l[4]=o=>c.enable=o),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1}),e(n,{label:"优先级"},{default:t(()=>[e(s,{min:"1",value:c.priority,"onUpdate:value":l[5]||(l[5]=o=>c.priority=o)},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e(h,{title:"标签列表",style:{width:"100%"},class:"_detail"},{default:t(()=>[(k(!0),W(me,null,ke(m.value,(o,j)=>(k(),g(h,{key:j},{title:t(()=>[e(v,{align:"center"},{default:t(()=>[x("div",null,"路由【"+B(j+1)+"】",1),e(C,null,{title:t(()=>[r(B(q(o,c.objectOfAction)),1)]),default:t(()=>[x("div",Ue,B(q(o,c.objectOfAction)),1)]),_:2},1024)]),_:2},1024)]),default:t(()=>[e(f,{layout:"horizontal"},{default:t(()=>[e(v,{style:{width:"100%"},direction:"vertical",size:"large"},{default:t(()=>[e(p,{justify:"end"},{default:t(()=>[e(S(L),{onClick:U=>te(j),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024),e(n,{label:"标签名",required:""},{default:t(()=>[e(_,{placeholder:"隔离环境名",value:o.tagName,"onUpdate:value":U=>o.tagName=U},null,8,["value","onUpdate:value"])]),_:2},1024),e(n,{label:"作用范围",required:""},{default:t(()=>[e(h,null,{default:t(()=>[e(v,{style:{width:"100%"},direction:"vertical"},{default:t(()=>[e(n,{label:"匹配条件类型"},{default:t(()=>[e(T,{value:o.scope.type,"onUpdate:value":U=>o.scope.type=U,options:M.value},null,8,["value","onUpdate:value","options"])]),_:2},1024),e(v,{align:"start",style:{width:"100%"},direction:"horizontal"},{default:t(()=>{var U;return[e(D,{bordered:!1,color:"processing"},{default:t(()=>[r(B(o.scope.type),1)]),_:2},1024),o.scope.type==="labels"?(k(),g(le,{key:0,pagination:!1,columns:X.value,"data-source":(U=o.scope)==null?void 0:U.labels},{bodyCell:t(({column:$,record:R,text:Ae,index:ie})=>[$.key==="myKey"?(k(),g(_,{key:0,placeholder:"label key",value:R.myKey,"onUpdate:value":K=>R.myKey=K},null,8,["value","onUpdate:value"])):P("",!0),$.key==="condition"?(k(),g(F,{key:1,value:R.condition,"onUpdate:value":K=>R.condition=K,style:{width:"120px"},options:Q.value},null,8,["value","onUpdate:value","options"])):P("",!0),$.key==="value"?(k(),g(_,{key:2,placeholder:"label value",value:R.value,"onUpdate:value":K=>R.value=K},null,8,["value","onUpdate:value"])):$.key==="operation"?(k(),g(v,{key:3,align:"center"},{default:t(()=>[e(S(L),{icon:"tdesign:remove",class:"action-icon",onClick:K=>Z(j,ie)},null,8,["onClick"]),e(S(L),{class:"action-icon",icon:"tdesign:add",onClick:K=>I(j)},null,8,["onClick"])]),_:2},1024)):P("",!0)]),_:2},1032,["columns","data-source"])):(k(),g(v,{key:1,align:"start"},{default:t(()=>[e(F,{style:{width:"120px"},value:o.scope.addresses.condition,"onUpdate:value":$=>o.scope.addresses.condition=$,options:H.value},null,8,["value","onUpdate:value","options"]),e(oe,{style:{width:"500px"},value:o.scope.addresses.addressesStr,"onUpdate:value":$=>o.scope.addresses.addressesStr=$,placeholder:'地址列表,如有多个用","隔开'},null,8,["value","onUpdate:value"])]),_:2},1024))]}),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1}),e(u,{onClick:ee,type:"primary"},{default:t(()=>[r(" 增加标签")]),_:1})]),_:1})]),_:1})]),_:1},8,["span"]),e(d,{span:O.value?G.value:0,class:"right"},{default:t(()=>[O.value?(k(),g(h,{key:0,class:"sliderBox"},{default:t(()=>[x("div",null,[e(ne,{title:"字段说明",column:1},{default:t(()=>[e(V,{label:"key"},{default:t(()=>[r(" 作用对象"),Ke,r(" 可能的值:Dubbo应用名或者服务名 ")]),_:1}),e(V,{label:"scope"},{default:t(()=>[r(" 规则粒度"),Ne,r(" 可能的值:application, service ")]),_:1}),e(V,{label:"force"},{default:t(()=>[r(" 容错保护"),Oe,r(" 可能的值:true, false"),Re,r(" 描述:如果为true,则路由筛选后若没有可用的地址则会直接报异常;如果为false,则会从可用地址中选择完成RPC调用 ")]),_:1}),e(V,{label:"runtime"},{default:t(()=>[r(" 运行时生效"),Ee,r(" 可能的值:true, false"),Te,r(" 描述:如果为true,则该rule下的所有路由将会实时生效;若为false,则只有在启动时才会生效 ")]),_:1})]),_:1})])]),_:1})):P("",!0)]),_:1},8,["span"])]),_:1}),e(se,{"offset-bottom":10},{default:t(()=>[x("div",je,[e(v,{align:"center",size:"large"},{default:t(()=>[e(u,{type:"primary",onClick:ae},{default:t(()=>[r(" 确认")]),_:1}),e(u,null,{default:t(()=>[r(" 取消")]),_:1})]),_:1})])]),_:1})])}}}),ze=we(Se,[["__scopeId","data-v-74fb5f17"]]);export{ze as default}; +import{u as ce}from"./index-HdnVQEsT.js";import{d as ue,y as de,z as re,D as pe,H as z,k as _e,a as fe,B as O,u as ye,r as ve,F as J,c as M,b as e,w as t,e as i,o as k,f as r,J as g,n as S,aa as be,ab as he,L as me,M as ke,j as x,t as V,I as L,T as P,p as ge,h as xe,_ as we}from"./index-3zDsduUv.js";import{f as $e}from"./traffic-dHGZ6qwp.js";import"./request-3an337VF.js";const T=A=>(ge("data-v-74fb5f17"),A=A(),xe(),A),Ce={class:"__container_tagRule_detail"},Ue={style:{"max-width":"400px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},Ne=T(()=>x("br",null,null,-1)),Oe=T(()=>x("br",null,null,-1)),Re=T(()=>x("br",null,null,-1)),Ke=T(()=>x("br",null,null,-1)),Te=T(()=>x("br",null,null,-1)),Ee=T(()=>x("br",null,null,-1)),je={class:"bottom-action-footer"},Se=ue({__name:"addByFormView",setup(A){const w=de(re.PROVIDE_INJECT_KEY);pe(()=>{if(!z.isNil(w.tagRule)){const{enabled:a=!0,key:l,scope:u,runtime:p=!0,tags:n}=w.tagRule;c.enable=a,c.objectOfAction=l,c.ruleGranularity=u,c.runtime=p,n&&n.length&&n.forEach((b,d)=>{m.value.push({tagName:b.name,scope:{type:"labels",labels:[],addresses:{condition:"=",addressesStr:""}}});const{match:_}=b;let s=[];_.forEach((y,f)=>{s.push({myKey:y.key,condition:Object.keys(y.value)[0],value:y.value[Object.keys(y.value)[0]]})}),m.value[d]&&m.value[d].scope&&(m.value[d].scope.labels=s)})}}),_e(),fe();const R=O(!1),q=O(8);ce().toClipboard;const Y=ye(),F=(a,l)=>{var n,b,d,_;let u=`对于应用 ${l||"未指定"},将满足 `;const p=[];if(((n=a.scope)==null?void 0:n.type)==="labels"&&((b=a.scope.labels)==null?void 0:b.length)>0)a.scope.labels.forEach(s=>{var C,v;let y="";if(s.myKey==="method")y="请求方法";else if((C=s.myKey)!=null&&C.startsWith("args[")){const E=(v=s.myKey.match(/\[(\d+)\]/))==null?void 0:v[1];E!==void 0?y=`第 ${parseInt(E)+1} 个参数`:y=`标签 ${s.myKey||"未指定"}`}else y=`标签 ${s.myKey||"未指定"}`;let f="";const h=s.value||"未指定";switch(s.condition){case"exact":f=`exact ${h}`;break;case"regex":f=`regex ${h}`;break;case"prefix":f=`prefix ${h}`;break;case"noempty":f="noempty";break;case"empty":f="empty";break;case"wildcard":f=`wildcard ${h}`;break;case"!=":f=`!= ${h}`;break;default:f=`${s.condition||"未知关系"} ${h}`}s.condition!=="empty"&&s.condition!=="noempty"&&!s.value?p.push(`${y} 未填写`):p.push(`${y} ${f}`)});else if(((d=a.scope)==null?void 0:d.type)==="addresses"&&((_=a.scope.addresses)!=null&&_.addressesStr)){const s=a.scope.addresses.condition==="="?"等于":"不等于";p.push(`地址 ${s} [${a.scope.addresses.addressesStr}]`)}return p.length===0?u+="任意请求":u+=p.join(" 且 "),u+=` 的实例,打上 ${a.tagName||"未指定"} 标签,划入 ${a.tagName||"未指定"} 的隔离环境`,u},c=ve({ruleGranularity:"application",objectOfAction:"",enable:!0,faultTolerantProtection:!0,runtime:!0,priority:1,configVersion:"v3.0"});J(c,a=>{const{enable:l,objectOfAction:u,runtime:p,ruleGranularity:n}=a;w.tagRule={...w.tagRule,enabled:l,key:u,runtime:p,scope:n}},{immediate:!!z.isNil(w.tagRule)});const H=O([{label:"labels",value:"labels"}]),W=O([{label:"exact",value:"exact"},{label:"regex",value:"regex"},{label:"prefix",value:"prefix"},{label:"noempty",value:"noempty"},{label:"empty",value:"empty"},{label:"wildcard",value:"wildcard"}]),Q=O([{label:"=",value:"="},{label:"!=",value:"!="}]),X=O([{title:"键",dataIndex:"myKey",key:"myKey"},{title:"关系",dataIndex:"condition",key:"condition"},{title:"值",dataIndex:"value",key:"value"},{title:"操作",dataIndex:"operation",key:"operation"}]),m=O([]);J(m,a=>{console.log(a);const l=[];a.forEach(u=>{const{tagName:p,scope:n}=u,b=n.labels,d={name:p,match:[]};b&&b.length>0&&b.forEach(_=>{d.match.push({key:_.myKey,value:{[_.condition]:_.value}})}),l.push(d)}),w.tagRule={...w.tagRule,tags:l}},{deep:!0,immediate:!!z.isNil(w.tagRule)});const Z=(a,l)=>{if(m.value[a].scope.labels.length===1){m.value[a].scope.type="addresses";return}m.value[a].scope.labels.splice(l,1)},I=a=>{m.value[a].scope.labels.push({myKey:"",condition:"exact",value:""})},ee=()=>{m.value.push({tagName:"",scope:{type:"labels",labels:[{myKey:"",condition:"",value:""}],addresses:{condition:"",addressesStr:""}}})},te=a=>{m.value.splice(a,1)},ae=async()=>{const{ruleGranularity:a,objectOfAction:l,enable:u,faultTolerantProtection:p,runtime:n,priority:b,configVersion:d}=c,_={configVersion:d,scope:a,key:l,enabled:u,runtime:n,tags:[]};m.value.forEach((f,h)=>{const C={name:f.tagName,match:[]};f.scope.labels.forEach((v,E)=>{const D={key:v.myKey,value:{}};D.value[v.condition]=v.value,C.match.push(D)}),_.tags.push(C)});let s="";a=="application"?s=`${l}.tag-router`:s=`${l}:${d}.tag-router`,(await $e(s,_)).code===200&&Y.push("/traffic/tagRule")};return(a,l)=>{const u=i("a-button"),p=i("a-flex"),n=i("a-form-item"),b=i("a-switch"),d=i("a-col"),_=i("a-input"),s=i("a-input-number"),y=i("a-row"),f=i("a-form"),h=i("a-card"),C=i("a-tooltip"),v=i("a-space"),E=i("a-radio-group"),D=i("a-tag"),G=i("a-select"),le=i("a-table"),oe=i("a-textarea"),B=i("a-descriptions-item"),ne=i("a-descriptions"),se=i("a-affix");return k(),M("div",Ce,[e(p,{style:{width:"100%"}},{default:t(()=>[e(d,{span:R.value?24-q.value:24,class:"left"},{default:t(()=>[e(h,null,{default:t(()=>[e(v,{style:{width:"100%"},direction:"vertical",size:"middle"},{default:t(()=>[e(y,null,{default:t(()=>[e(p,{justify:"end",style:{width:"100%"}},{default:t(()=>[e(u,{type:"text",style:{color:"#0a90d5"},onClick:l[0]||(l[0]=o=>R.value=!R.value)},{default:t(()=>[r(" 字段说明 "),R.value?(k(),g(S(he),{key:1})):(k(),g(S(be),{key:0}))]),_:1})]),_:1}),e(h,{title:"基础信息",style:{width:"100%"},class:"_detail"},{default:t(()=>[e(f,{layout:"horizontal"},{default:t(()=>[e(y,{style:{width:"100%"}},{default:t(()=>[e(d,{span:12},{default:t(()=>[e(n,{label:"规则粒度",required:""},{default:t(()=>[r(" 应用")]),_:1}),e(n,{label:"容错保护"},{default:t(()=>[e(b,{checked:c.faultTolerantProtection,"onUpdate:checked":l[1]||(l[1]=o=>c.faultTolerantProtection=o),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1}),e(n,{label:"运行时生效"},{default:t(()=>[e(b,{checked:c.runtime,"onUpdate:checked":l[2]||(l[2]=o=>c.runtime=o),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"作用对象",required:""},{default:t(()=>[e(_,{value:c.objectOfAction,"onUpdate:value":l[3]||(l[3]=o=>c.objectOfAction=o),style:{width:"200px"}},null,8,["value"])]),_:1}),e(n,{label:"立即启用"},{default:t(()=>[e(b,{checked:c.enable,"onUpdate:checked":l[4]||(l[4]=o=>c.enable=o),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1}),e(n,{label:"优先级"},{default:t(()=>[e(s,{min:"1",value:c.priority,"onUpdate:value":l[5]||(l[5]=o=>c.priority=o)},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e(h,{title:"标签列表",style:{width:"100%"},class:"_detail"},{default:t(()=>[(k(!0),M(me,null,ke(m.value,(o,j)=>(k(),g(h,{key:j},{title:t(()=>[e(v,{align:"center"},{default:t(()=>[x("div",null,"路由【"+V(j+1)+"】",1),e(C,null,{title:t(()=>[r(V(F(o,c.objectOfAction)),1)]),default:t(()=>[x("div",Ue,V(F(o,c.objectOfAction)),1)]),_:2},1024)]),_:2},1024)]),default:t(()=>[e(f,{layout:"horizontal"},{default:t(()=>[e(v,{style:{width:"100%"},direction:"vertical",size:"large"},{default:t(()=>[e(p,{justify:"end"},{default:t(()=>[e(S(L),{onClick:U=>te(j),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024),e(n,{label:"标签名",required:""},{default:t(()=>[e(_,{placeholder:"隔离环境名",value:o.tagName,"onUpdate:value":U=>o.tagName=U},null,8,["value","onUpdate:value"])]),_:2},1024),e(n,{label:"作用范围",required:""},{default:t(()=>[e(h,null,{default:t(()=>[e(v,{style:{width:"100%"},direction:"vertical"},{default:t(()=>[e(n,{label:"匹配条件类型"},{default:t(()=>[e(E,{value:o.scope.type,"onUpdate:value":U=>o.scope.type=U,options:H.value},null,8,["value","onUpdate:value","options"])]),_:2},1024),e(v,{align:"start",style:{width:"100%"},direction:"horizontal"},{default:t(()=>{var U;return[e(D,{bordered:!1,color:"processing"},{default:t(()=>[r(V(o.scope.type),1)]),_:2},1024),o.scope.type==="labels"?(k(),g(le,{key:0,pagination:!1,columns:X.value,"data-source":(U=o.scope)==null?void 0:U.labels},{bodyCell:t(({column:$,record:K,text:Ae,index:ie})=>[$.key==="myKey"?(k(),g(_,{key:0,placeholder:"label key",value:K.myKey,"onUpdate:value":N=>K.myKey=N},null,8,["value","onUpdate:value"])):P("",!0),$.key==="condition"?(k(),g(G,{key:1,value:K.condition,"onUpdate:value":N=>K.condition=N,style:{width:"120px"},options:W.value},null,8,["value","onUpdate:value","options"])):P("",!0),$.key==="value"?(k(),g(_,{key:2,placeholder:"label value",value:K.value,"onUpdate:value":N=>K.value=N},null,8,["value","onUpdate:value"])):$.key==="operation"?(k(),g(v,{key:3,align:"center"},{default:t(()=>[e(S(L),{icon:"tdesign:remove",class:"action-icon",onClick:N=>Z(j,ie)},null,8,["onClick"]),e(S(L),{class:"action-icon",icon:"tdesign:add",onClick:N=>I(j)},null,8,["onClick"])]),_:2},1024)):P("",!0)]),_:2},1032,["columns","data-source"])):(k(),g(v,{key:1,align:"start"},{default:t(()=>[e(G,{style:{width:"120px"},value:o.scope.addresses.condition,"onUpdate:value":$=>o.scope.addresses.condition=$,options:Q.value},null,8,["value","onUpdate:value","options"]),e(oe,{style:{width:"500px"},value:o.scope.addresses.addressesStr,"onUpdate:value":$=>o.scope.addresses.addressesStr=$,placeholder:'地址列表,如有多个用","隔开'},null,8,["value","onUpdate:value"])]),_:2},1024))]}),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1}),e(u,{onClick:ee,type:"primary"},{default:t(()=>[r(" 增加标签")]),_:1})]),_:1})]),_:1})]),_:1},8,["span"]),e(d,{span:R.value?q.value:0,class:"right"},{default:t(()=>[R.value?(k(),g(h,{key:0,class:"sliderBox"},{default:t(()=>[x("div",null,[e(ne,{title:"字段说明",column:1},{default:t(()=>[e(B,{label:"key"},{default:t(()=>[r(" 作用对象"),Ne,r(" 可能的值:Dubbo应用名或者服务名 ")]),_:1}),e(B,{label:"scope"},{default:t(()=>[r(" 规则粒度"),Oe,r(" 可能的值:application, service ")]),_:1}),e(B,{label:"force"},{default:t(()=>[r(" 容错保护"),Re,r(" 可能的值:true, false"),Ke,r(" 描述:如果为true,则路由筛选后若没有可用的地址则会直接报异常;如果为false,则会从可用地址中选择完成RPC调用 ")]),_:1}),e(B,{label:"runtime"},{default:t(()=>[r(" 运行时生效"),Te,r(" 可能的值:true, false"),Ee,r(" 描述:如果为true,则该rule下的所有路由将会实时生效;若为false,则只有在启动时才会生效 ")]),_:1})]),_:1})])]),_:1})):P("",!0)]),_:1},8,["span"])]),_:1}),e(se,{"offset-bottom":10},{default:t(()=>[x("div",je,[e(v,{align:"center",size:"large"},{default:t(()=>[e(u,{type:"primary",onClick:ae},{default:t(()=>[r(" 确认")]),_:1}),e(u,null,{default:t(()=>[r(" 取消")]),_:1})]),_:1})])]),_:1})])}}}),ze=we(Se,[["__scopeId","data-v-74fb5f17"]]);export{ze as default}; diff --git a/app/dubbo-ui/dist/admin/assets/addByFormView-PDTQ6Oi5.js b/app/dubbo-ui/dist/admin/assets/addByFormView-PDTQ6Oi5.js deleted file mode 100644 index 2f6461ed7..000000000 --- a/app/dubbo-ui/dist/admin/assets/addByFormView-PDTQ6Oi5.js +++ /dev/null @@ -1 +0,0 @@ -import{u as Ue}from"./index-Va7nxJVK.js";import{d as we,x as Re,y as De,W as Ke,F as Q,k as Se,u as qe,z as W,r as Oe,D as le,c as F,b as e,w as l,e as K,o as v,f as C,G as _,n as j,a9 as je,aa as Ee,Q as q,J as L,K as X,j as N,t as A,I as z,p as Ae,h as ze,_ as Be}from"./index-hmLAZQYT.js";import{a as Ve}from"./traffic-C2a-KjHH.js";import"./request-8jI_GZey.js";const J=Y=>(Ae("data-v-d3c6be66"),Y=Y(),ze(),Y),Ge={class:"__container_routingRule_detail"},Ne={style:{"max-width":"400px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},me=J(()=>N("br",null,null,-1)),Pe=J(()=>N("br",null,null,-1)),We=J(()=>N("br",null,null,-1)),xe=J(()=>N("br",null,null,-1)),Fe=J(()=>N("br",null,null,-1)),Je=J(()=>N("br",null,null,-1)),Le=we({__name:"addByFormView",setup(Y){const E=Re(De.PROVIDE_INJECT_KEY);Ke(()=>{if(!Q.isNil(E.conditionRule)){const{enabled:s=!0,key:t,scope:i,runtime:h=!0,conditions:$}=E.conditionRule;g.enable=s,g.objectOfAction=t,g.ruleGranularity=i,g.runtime=h,$&&$.length&&$.forEach((r,n)=>{var f,S;const k=r.split("=>"),o=(f=k[0])==null?void 0:f.trim(),M=(S=k[1])==null?void 0:S.trim();d.value[n].requestMatch=$e(o,n),d.value[n].routeDistribute=Te(M,n)})}if(!Q.isNil(E.addConditionRuleSate)){const{version:s,group:t}=E.addConditionRuleSate;g.version=s,g.group=t}}),Se();const ae=qe(),x=W(!1),Z=W(8);Ue().toClipboard;const g=Oe({version:"",ruleGranularity:"",objectOfAction:"",enable:!0,faultTolerantProtection:!1,runtime:!0,priority:null,group:""});le(g,s=>{const{ruleGranularity:t,enable:i=!0,runtime:h=!0,objectOfAction:$}=s;E.conditionRule={...E.conditionRule,enabled:i,key:$,runtime:h,scope:t},E.addConditionRuleSate={version:s.version,group:s.group}},{immediate:!!Q.isNil(E.conditionRule)});const ne=W([{label:"host",value:"host"},{label:"application",value:"application"},{label:"method",value:"method"},{label:"arguments",value:"arguments"},{label:"attachments",value:"attachments"},{label:"其他",value:"other"}]),se=W([{label:"host",value:"host"},{label:"其他",value:"other"}]),m=W([{label:"=",value:"="},{label:"!=",value:"!="}]),oe=W([{label:"应用",value:"application"},{label:"服务",value:"service"}]),d=W([{selectedMatchConditionTypes:[],requestMatch:[],selectedRouteDistributeMatchTypes:[],routeDistribute:[{type:"host",condition:"",value:""},{type:"other",list:[{myKey:"",condition:"",value:""}]}]}]);le(d,s=>{E.conditionRule={...E.conditionRule,conditions:te()}},{deep:!0,immediate:!!Q.isNil(E.conditionRule)});const ie=()=>{d.value.push({selectedMatchConditionTypes:[],requestMatch:[],selectedRouteDistributeMatchTypes:[],routeDistribute:[{type:"host",condition:"=",value:"127.0.0.1"},{type:"other",list:[{myKey:"key",condition:"=",value:"value"}]}]})},ue=s=>{d.value.splice(s,1)},ce=s=>{d.value[s].requestMatch=[],d.value[s].selectedMatchConditionTypes=[]},de=s=>{d.value[s].requestMatch=[{type:"host",condition:"",value:""},{type:"application",condition:"",value:""},{type:"method",condition:"",value:""},{type:"arguments",list:[{index:0,condition:"",value:""}]},{type:"attachments",list:[{myKey:"key",condition:"",value:""}]},{type:"other",list:[{myKey:"key",condition:"",value:""}]}]},H=(s,t)=>{d.value[t].selectedMatchConditionTypes=d.value[t].selectedMatchConditionTypes.filter(i=>i!==s)},re=(s,t)=>{d.value[t].selectedRouteDistributeMatchTypes=d.value[t].selectedRouteDistributeMatchTypes.filter(i=>i!==s)},pe=[{dataIndex:"index",key:"index",title:"参数索引"},{dataIndex:"condition",key:"condition",title:"关系"},{dataIndex:"value",key:"value",title:"值"},{dataIndex:"operation",key:"operation",title:"操作"}],ve=(s,t)=>{d.value[s].requestMatch[t].list.push({index:0,condition:"=",value:""})},ye=(s,t,i)=>{d.value[s].requestMatch[t].list.length===1&&(d.value[s].selectedMatchConditionTypes=d.value[s].selectedMatchConditionTypes.filter(h=>h!=="arguments")),d.value[s].requestMatch[t].list.splice(i,1)},he=[{dataIndex:"myKey",key:"myKey",title:"键"},{dataIndex:"condition",key:"condition",title:"关系"},{dataIndex:"value",key:"value",title:"值"},{dataIndex:"operation",key:"operation",title:"操作"}],fe=(s,t)=>{d.value[s].requestMatch[t].list.push({key:"key",condition:"=",value:""})},_e=(s,t,i)=>{d.value[s].requestMatch[t].list.length===1&&(d.value[s].selectedMatchConditionTypes=d.value[s].selectedMatchConditionTypes.filter(h=>h!=="attachments")),d.value[s].requestMatch[t].list.splice(i,1)},I=[{dataIndex:"myKey",key:"myKey",title:"键"},{dataIndex:"condition",key:"condition",title:"关系"},{dataIndex:"value",key:"value",title:"值"},{dataIndex:"operation",key:"operation",title:"操作"}],ke=(s,t)=>{d.value[s].requestMatch[t].list.push({myKey:"",condition:"=",value:""})},be=(s,t,i)=>{if(d.value[s].requestMatch[t].list.length===1){d.value[s].selectedMatchConditionTypes=d.value[s].selectedMatchConditionTypes.filter(h=>h!=="other");return}d.value[s].requestMatch[t].list.splice(i,1)},ge=(s,t)=>{d.value[s].routeDistribute[t].list.push({myKey:"",condition:"=",value:""})},Ce=(s,t,i)=>{if(d.value[s].routeDistribute[t].list.length===1){d.value[s].selectedRouteDistributeMatchTypes=d.value[s].selectedRouteDistributeMatchTypes.filter(h=>h!=="other");return}d.value[s].routeDistribute[t].list.splice(i,1)};function ee(s){var f,S;const t=d.value[s],{ruleGranularity:i,objectOfAction:h}=g;let r=`对于${i==="service"?"服务":"应用"}【${h||"未指定"}】`,n=[];(f=t.selectedMatchConditionTypes)==null||f.forEach(U=>{var V,P,p,b;const R=(V=t.requestMatch)==null?void 0:V.find(a=>a.type===U);if(!R)return;let y="";const O=R.condition==="="?"等于":R.condition==="!="?"不等于":R.condition||"",B=R.value||"未指定";switch(U){case"host":y=`请求来源主机 ${O} ${B}`;break;case"application":y=`请求来源应用 ${O} ${B}`;break;case"method":y=`请求方法 ${O} ${B}`;break;case"arguments":const a=(P=R.list)==null?void 0:P.map(u=>{const G=u.condition==="="?"等于":u.condition==="!="?"不等于":u.condition||"",D=u.value!==void 0&&u.value!==""?u.value:"未指定";return`参数[${u.index}] ${G} ${D}`}).filter(Boolean);(a==null?void 0:a.length)>0&&(y=a.join(" 且 "));break;case"attachments":const T=(p=R.list)==null?void 0:p.map(u=>{const G=u.condition==="="?"等于":u.condition==="!="?"不等于":u.condition||"",D=u.value!==void 0&&u.value!==""?u.value:"未指定";return`附件[${u.myKey||"未指定"}] ${G} ${D}`}).filter(Boolean);(T==null?void 0:T.length)>0&&(y=T.join(" 且 "));break;case"other":const c=(b=R.list)==null?void 0:b.map(u=>{const G=u.condition==="="?"等于":u.condition==="!="?"不等于":u.condition||"",D=u.value!==void 0&&u.value!==""?u.value:"未指定";return`自定义匹配[${u.myKey||"未指定"}] ${G} ${D}`}).filter(Boolean);(c==null?void 0:c.length)>0&&(y=c.join(" 且 "));break}y&&((U==="host"||U==="application"||U==="method")&&!R.value?n.push(`${U==="host"?"请求来源主机":U==="application"?"请求来源应用":"请求方法"} 未填写`):n.push(y))});const k=n.length>0?n.join(" 且 "):"任意请求";let o=[];(S=t.selectedRouteDistributeMatchTypes)==null||S.forEach(U=>{var V,P;const R=(V=t.routeDistribute)==null?void 0:V.find(p=>p.type===U);if(!R)return;let y="";const O=R.condition==="="?"等于":R.condition==="!="?"不等于":R.condition||"",B=R.value||"未指定";switch(U){case"host":y=`目标主机 ${O} ${B}`;break;case"other":const p=(P=R.list)==null?void 0:P.map(b=>{const a=b.condition==="="?"等于":b.condition==="!="?"不等于":b.condition||"",T=b.value!==void 0&&b.value!==""?b.value:"未指定";return`目标标签[${b.myKey||"未指定"}] ${a} ${T}`}).filter(Boolean);(p==null?void 0:p.length)>0&&(y=p.join(" 且 "));break}y&&(U==="host"&&!R.value?o.push("目标主机 未填写"):o.push(y))});const M=o.length>0?`满足 【${o.join(" 且 ")}】`:"默认路由规则";return`${r},将满足 【${k}】 条件的请求,转发到 ${M} 的实例。`}function te(){let s=[],t="",i="";return d.value.forEach((h,$)=>{h.selectedMatchConditionTypes.forEach((n,k)=>{h.requestMatch.forEach((o,M)=>{if(n==(o==null?void 0:o.type))switch(o==null?void 0:o.type){case"arguments":o.list.forEach((f,S)=>{t.length>0&&(t+=" & "),t+=`${n}[${f.index}]${f.condition}${f.value}`});break;case"attachments":o.list.forEach((f,S)=>{t.length>0&&(t+=" & "),t+=`${n}[${f.myKey}]${f.condition}${f.value}`});break;case"other":o.list.forEach((f,S)=>{t.length>0&&(t+=" & "),t+=`${f.myKey}${f.condition}${f.value}`});break;default:t.length>0&&(t+=" & "),t+=`${o.type}${o.condition}${o.value}`}})}),h.selectedRouteDistributeMatchTypes.forEach((n,k)=>{h.routeDistribute.forEach((o,M)=>{if(n==(o==null?void 0:o.type))switch(o==null?void 0:o.type){case"other":o==null||o.list.forEach((f,S)=>{i.length>0&&(i+=" & "),i+=`${f.myKey}${f.condition}${f.value}`});break;default:i.length>0&&(i+=" & "),i+=`${o.type}${o.condition}${o.value}`}})});let r="";t.length>0&&i.length>0?r=`${t} => ${i}`:t.length>0&&i.length==0&&(r=`${t}`),s.push(r)}),s}const Me=async()=>{const{version:s,ruleGranularity:t,objectOfAction:i,enable:h,faultTolerantProtection:$,runtime:r,group:n}=g,k={configVersion:"v3.0",scope:t,key:i,enabled:h,force:$,runtime:r,conditions:te()};let o="";t=="application"?o=`${i}.condition-router`:o=`${i}:${s||""}:${n||""}.condition-router`,(await Ve(o,k)).code===200&&ae.push("/traffic/routingRule")};function $e(s,t){const i=[],h=s.split(" & ");return[{type:"host",condition:"",value:""},{type:"application",condition:"",value:""},{type:"method",condition:"",value:""},{type:"arguments",list:[]},{type:"attachments",list:[]},{type:"other",list:[]}].forEach(r=>i.push({...r})),h.forEach(r=>{if(r=r.trim(),r.startsWith("host")){d.value[t].selectedMatchConditionTypes.push("host");const n=r.match(/^host(!=|=)(.+)/);if(n){const k=n[1],o=n[2].trim(),M=i.find(f=>f.type==="host");M.condition=k,M.value=o}}else if(r.startsWith("application")){d.value[t].selectedMatchConditionTypes.push("application");const n=r.match(/^application(!=|=)(.+)/);if(n){const k=n[1],o=n[2].trim(),M=i.find(f=>f.type==="application");M.condition=k,M.value=o}}else if(r.startsWith("method")){d.value[t].selectedMatchConditionTypes.push("method");const n=r.match(/^method(!=|=)(.+)/);if(n){const k=n[1],o=n[2].trim(),M=i.find(f=>f.type==="method");M.condition=k,M.value=o}}else if(r.startsWith("arguments")){!d.value[t].selectedMatchConditionTypes.includes("arguments")&&d.value[t].selectedMatchConditionTypes.push("arguments");const n=r.match(/^arguments\[(\d+)\](!=|=)(.+)/);if(n){const k=parseInt(n[1],10),o=n[2],M=n[3].trim();i.find(S=>S.type==="arguments").list.push({index:k,condition:o,value:M})}}else if(r.startsWith("attachments")){!d.value[t].selectedMatchConditionTypes.includes("attachments")&&d.value[t].selectedMatchConditionTypes.push("attachments");const n=r.match(/^attachments\[(.+)\](!=|=)(.+)/);if(n){const k=n[1].trim(),o=n[2],M=n[3].trim();i.find(S=>S.type==="attachments").list.push({myKey:k,condition:o,value:M})}}else{const n=r.match(/^([^!=]+)(!?=)(.+)$/);if(n){!d.value[t].selectedMatchConditionTypes.includes("other")&&d.value[t].selectedMatchConditionTypes.push("other");const k=i.find(o=>o.type==="other");k&&k.list.push({myKey:n[1].trim(),condition:n[2],value:n[3].trim()})}}}),i}function Te(s,t){const i=[],h=s==null?void 0:s.split(" & ");return[{type:"host",condition:"",value:""},{type:"other",list:[]}].forEach(r=>i.push({...r})),h!=null&&h.length&&h.forEach(r=>{if(r=r.trim(),r.startsWith("host")){d.value[t].selectedRouteDistributeMatchTypes.push("host");const n=r.match(/^host(!=|=)(.+)/);if(n){const k=n[1],o=n[2].trim(),M=i.find(f=>f.type==="host");M.condition=k,M.value=o}}else{const n=r.match(/^([^!=]+)(!?=)(.+)$/);if(n){!d.value[t].selectedRouteDistributeMatchTypes.includes("other")&&d.value[t].selectedRouteDistributeMatchTypes.push("other");const k=i.find(o=>o.type==="other");k&&k.list.push({myKey:n[1].trim(),condition:n[2],value:n[3].trim()})}}}),i}return(s,t)=>{const i=K("a-button"),h=K("a-flex"),$=K("a-select"),r=K("a-form-item"),n=K("a-input"),k=K("a-switch"),o=K("a-col"),M=K("a-input-number"),f=K("a-row"),S=K("a-form"),U=K("a-card"),R=K("a-tooltip"),y=K("a-space"),O=K("a-tag"),B=K("a-table"),V=K("a-descriptions-item"),P=K("a-descriptions");return v(),F("div",Ge,[e(h,{style:{width:"100%"}},{default:l(()=>[e(o,{span:x.value?24-Z.value:24,class:"left"},{default:l(()=>[e(U,null,{default:l(()=>[e(y,{style:{width:"100%"},direction:"vertical",size:"middle"},{default:l(()=>[e(f,null,{default:l(()=>[e(h,{justify:"end",style:{width:"100%"}},{default:l(()=>[e(i,{type:"text",style:{color:"#0a90d5"},onClick:t[0]||(t[0]=p=>x.value=!x.value)},{default:l(()=>[C(" 字段说明 "),x.value?(v(),_(j(Ee),{key:1})):(v(),_(j(je),{key:0}))]),_:1})]),_:1}),e(U,{title:"基础信息",style:{width:"100%"},class:"_detail"},{default:l(()=>[e(S,{layout:"horizontal"},{default:l(()=>[e(f,{style:{width:"100%"}},{default:l(()=>[e(o,{span:12},{default:l(()=>[e(r,{label:"规则粒度",required:""},{default:l(()=>[e($,{value:g.ruleGranularity,"onUpdate:value":t[1]||(t[1]=p=>g.ruleGranularity=p),style:{width:"120px"},options:oe.value},null,8,["value","options"])]),_:1}),g.ruleGranularity==="service"?(v(),_(r,{key:0,label:"版本",required:""},{default:l(()=>[e(n,{value:g.version,"onUpdate:value":t[2]||(t[2]=p=>g.version=p),style:{width:"300px"}},null,8,["value"])]),_:1})):q("",!0),e(r,{label:"容错保护"},{default:l(()=>[e(k,{checked:g.faultTolerantProtection,"onUpdate:checked":t[3]||(t[3]=p=>g.faultTolerantProtection=p),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1}),e(r,{label:"运行时生效"},{default:l(()=>[e(k,{checked:g.runtime,"onUpdate:checked":t[4]||(t[4]=p=>g.runtime=p),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1})]),_:1}),e(o,{span:12},{default:l(()=>[e(r,{label:"作用对象",required:""},{default:l(()=>[e(n,{value:g.objectOfAction,"onUpdate:value":t[5]||(t[5]=p=>g.objectOfAction=p),style:{width:"300px"}},null,8,["value"])]),_:1}),g.ruleGranularity==="service"?(v(),_(r,{key:0,label:"分组",required:""},{default:l(()=>[e(n,{value:g.group,"onUpdate:value":t[6]||(t[6]=p=>g.group=p),style:{width:"300px"}},null,8,["value"])]),_:1})):q("",!0),e(r,{label:"立即启用"},{default:l(()=>[e(k,{checked:g.enable,"onUpdate:checked":t[7]||(t[7]=p=>g.enable=p),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1}),e(r,{label:"优先级"},{default:l(()=>[e(M,{value:g.priority,"onUpdate:value":t[8]||(t[8]=p=>g.priority=p),min:"1"},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e(U,{title:"路由列表",style:{width:"100%"},class:"_detail"},{default:l(()=>[(v(!0),F(L,null,X(d.value,(p,b)=>(v(),_(U,null,{title:l(()=>[e(h,{justify:"space-between"},{default:l(()=>[e(y,{align:"center"},{default:l(()=>[N("div",null,"路由【"+A(b+1)+"】",1),e(R,null,{title:l(()=>[C(A(ee(b)),1)]),default:l(()=>[N("div",Ne,A(ee(b)),1)]),_:2},1024)]),_:2},1024),e(j(z),{onClick:a=>ue(b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)]),default:l(()=>[e(S,{layout:"horizontal"},{default:l(()=>[e(y,{style:{width:"100%"},direction:"vertical",size:"large"},{default:l(()=>[e(r,{label:"请求匹配"},{default:l(()=>[p.requestMatch.length>0?(v(),_(U,{key:0},{default:l(()=>[e(y,{style:{width:"100%"},direction:"vertical",size:"small"},{default:l(()=>[e(h,{align:"center",justify:"space-between"},{default:l(()=>[e(r,{label:"匹配条件类型"},{default:l(()=>[e($,{value:p.selectedMatchConditionTypes,"onUpdate:value":a=>p.selectedMatchConditionTypes=a,options:ne.value,mode:"multiple",style:{"min-width":"200px"}},null,8,["value","onUpdate:value","options"])]),_:2},1024),e(j(z),{onClick:a=>ce(b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024),(v(!0),F(L,null,X(p.requestMatch,(a,T)=>(v(),F(L,null,[p.selectedMatchConditionTypes.includes("host")&&a.type==="host"?(v(),_(y,{key:0,size:"large",align:"center"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e($,{value:a.condition,"onUpdate:value":c=>a.condition=c,style:{"min-width":"120px"},options:m.value},null,8,["value","onUpdate:value","options"]),e(n,{value:a.value,"onUpdate:value":c=>a.value=c,placeholder:"请求来源ip"},null,8,["value","onUpdate:value"]),e(j(z),{onClick:c=>H(a==null?void 0:a.type,b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("application")&&a.type==="application"?(v(),_(y,{key:1,size:"large",align:"center"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e($,{value:a.condition,"onUpdate:value":c=>a.condition=c,style:{"min-width":"120px"},options:m.value},null,8,["value","onUpdate:value","options"]),e(n,{value:a.value,"onUpdate:value":c=>a.value=c,placeholder:"请求来源应用名"},null,8,["value","onUpdate:value"]),e(j(z),{onClick:c=>H(a==null?void 0:a.type,b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("method")&&a.type==="method"?(v(),_(y,{key:2,size:"large",align:"center"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e($,{value:a.condition,"onUpdate:value":c=>a.condition=c,style:{"min-width":"120px"},options:m.value},null,8,["value","onUpdate:value","options"]),e(n,{value:a.value,"onUpdate:value":c=>a.value=c,placeholder:"方法值"},null,8,["value","onUpdate:value"]),e(j(z),{onClick:c=>H(a==null?void 0:a.type,b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("arguments")&&a.type==="arguments"?(v(),_(y,{key:3,style:{width:"100%"},size:"large",align:"start"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e(y,{direction:"vertical"},{default:l(()=>[e(i,{type:"primary",onClick:c=>ve(b,T)},{default:l(()=>[C(" 添加argument ")]),_:2},1032,["onClick"]),e(B,{pagination:!1,columns:pe,"data-source":p.requestMatch[T].list},{bodyCell:l(({column:c,record:u,text:G,index:D})=>[c.key==="index"?(v(),_(n,{key:0,value:u.index,"onUpdate:value":w=>u.index=w,placeholder:"index"},null,8,["value","onUpdate:value"])):c.key==="condition"?(v(),_($,{key:1,value:u.condition,"onUpdate:value":w=>u.condition=w,options:m.value},null,8,["value","onUpdate:value","options"])):c.key==="value"?(v(),_(n,{key:2,value:u.value,"onUpdate:value":w=>u.value=w,placeholder:"value"},null,8,["value","onUpdate:value"])):c.key==="operation"?(v(),_(y,{key:3,align:"center"},{default:l(()=>[e(j(z),{onClick:w=>ye(b,T,D),icon:"tdesign:remove",class:"action-icon"},null,8,["onClick"])]),_:2},1024)):q("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("attachments")&&a.type==="attachments"?(v(),_(y,{key:4,style:{width:"100%"},size:"large",align:"start"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e(y,{direction:"vertical"},{default:l(()=>[e(i,{type:"primary",onClick:c=>fe(b,T)},{default:l(()=>[C(" 添加attachment ")]),_:2},1032,["onClick"]),e(B,{pagination:!1,columns:he,"data-source":p.requestMatch[T].list},{bodyCell:l(({column:c,record:u,text:G,index:D})=>[c.key==="myKey"?(v(),_(n,{key:0,value:u.myKey,"onUpdate:value":w=>u.myKey=w,placeholder:"key"},null,8,["value","onUpdate:value"])):c.key==="condition"?(v(),_($,{key:1,value:u.condition,"onUpdate:value":w=>u.condition=w,options:m.value},null,8,["value","onUpdate:value","options"])):c.key==="value"?(v(),_(n,{key:2,value:u.value,"onUpdate:value":w=>u.value=w,placeholder:"value"},null,8,["value","onUpdate:value"])):c.key==="operation"?(v(),_(y,{key:3,align:"center"},{default:l(()=>[e(j(z),{onClick:w=>_e(b,T,D),icon:"tdesign:remove",class:"action-icon"},null,8,["onClick"])]),_:2},1024)):q("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("other")&&a.type==="other"?(v(),_(y,{key:5,style:{width:"100%"},size:"large",align:"start"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A((a==null?void 0:a.type)=="other"?"其他":a==null?void 0:a.type),1)]),_:2},1024),e(y,{direction:"vertical"},{default:l(()=>[e(i,{type:"primary",onClick:c=>ke(b,T)},{default:l(()=>[C(" 添加other ")]),_:2},1032,["onClick"]),e(B,{pagination:!1,columns:I,"data-source":p.requestMatch[T].list},{bodyCell:l(({column:c,record:u,text:G})=>[c.key==="myKey"?(v(),_(n,{key:0,value:u.myKey,"onUpdate:value":D=>u.myKey=D,placeholder:"key"},null,8,["value","onUpdate:value"])):c.key==="condition"?(v(),_($,{key:1,value:u.condition,"onUpdate:value":D=>u.condition=D,options:m.value},null,8,["value","onUpdate:value","options"])):c.key==="value"?(v(),_(n,{key:2,value:u.value,"onUpdate:value":D=>u.value=D,placeholder:"value"},null,8,["value","onUpdate:value"])):c.key==="operation"?(v(),_(y,{key:3,align:"center"},{default:l(()=>[e(j(z),{onClick:D=>be(b,T,u.index),icon:"tdesign:remove",class:"action-icon"},null,8,["onClick"])]),_:2},1024)):q("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)):q("",!0)],64))),256))]),_:2},1024)]),_:2},1024)):(v(),_(i,{key:1,onClick:a=>de(b),type:"dashed",size:"large"},{icon:l(()=>[e(j(z),{icon:"tdesign:add"})]),default:l(()=>[C(" 增加匹配条件 ")]),_:2},1032,["onClick"]))]),_:2},1024),e(r,{label:"路由分发",required:""},{default:l(()=>[e(U,null,{default:l(()=>[e(y,{style:{width:"100%"},direction:"vertical",size:"small"},{default:l(()=>[e(h,null,{default:l(()=>[e(r,{label:"匹配条件类型"},{default:l(()=>[e($,{value:p.selectedRouteDistributeMatchTypes,"onUpdate:value":a=>p.selectedRouteDistributeMatchTypes=a,options:se.value,mode:"multiple",style:{"min-width":"200px"}},null,8,["value","onUpdate:value","options"])]),_:2},1024)]),_:2},1024),(v(!0),F(L,null,X(p.routeDistribute,(a,T)=>(v(),F(L,{key:T},[p.selectedRouteDistributeMatchTypes.includes("host")&&a.type==="host"?(v(),_(y,{key:0,size:"large",align:"center"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e($,{value:a.condition,"onUpdate:value":c=>a.condition=c,style:{"min-width":"120px"},options:m.value},null,8,["value","onUpdate:value","options"]),e(n,{value:a.value,"onUpdate:value":c=>a.value=c,placeholder:"请求来源ip"},null,8,["value","onUpdate:value"]),e(j(z),{onClick:c=>re(a==null?void 0:a.type,b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)):q("",!0),p.selectedRouteDistributeMatchTypes.includes("other")&&a.type==="other"?(v(),_(y,{key:1,style:{width:"100%"},size:"large",align:"start"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A((a==null?void 0:a.type)=="other"?"其他":a==null?void 0:a.type),1)]),_:2},1024),e(y,{direction:"vertical"},{default:l(()=>[e(i,{type:"primary",onClick:c=>ge(b,T)},{default:l(()=>[C(" 添加其他 ")]),_:2},1032,["onClick"]),e(B,{pagination:!1,columns:I,"data-source":p.routeDistribute[T].list},{bodyCell:l(({column:c,record:u,text:G,index:D})=>[c.key==="myKey"?(v(),_(n,{key:0,value:u.myKey,"onUpdate:value":w=>u.myKey=w,placeholder:"key"},null,8,["value","onUpdate:value"])):c.key==="condition"?(v(),_($,{key:1,value:u.condition,"onUpdate:value":w=>u.condition=w,options:m.value},null,8,["value","onUpdate:value","options"])):c.key==="value"?(v(),_(n,{key:2,value:u.value,"onUpdate:value":w=>u.value=w,placeholder:"value"},null,8,["value","onUpdate:value"])):c.key==="operation"?(v(),_(y,{key:3,align:"center"},{default:l(()=>[e(j(z),{onClick:w=>Ce(b,T,D),icon:"tdesign:remove",class:"action-icon"},null,8,["onClick"])]),_:2},1024)):q("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)):q("",!0)],64))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),256))]),_:1}),e(i,{onClick:ie,type:"primary"},{default:l(()=>[C(" 增加路由")]),_:1})]),_:1})]),_:1})]),_:1},8,["span"]),e(o,{span:x.value?Z.value:0,class:"right"},{default:l(()=>[x.value?(v(),_(U,{key:0,class:"sliderBox"},{default:l(()=>[N("div",null,[e(P,{title:"字段说明",column:1},{default:l(()=>[e(V,{label:"key"},{default:l(()=>[C(" 作用对象"),me,C(" 可能的值:Dubbo应用名或者服务名 ")]),_:1}),e(V,{label:"scope"},{default:l(()=>[C(" 规则粒度"),Pe,C(" 可能的值:application, service ")]),_:1}),e(V,{label:"force"},{default:l(()=>[C(" 容错保护"),We,C(" 可能的值:true, false"),xe,C(" 描述:如果为true,则路由筛选后若没有可用的地址则会直接报异常;如果为false,则会从可用地址中选择完成RPC调用 ")]),_:1}),e(V,{label:"runtime"},{default:l(()=>[C(" 运行时生效"),Fe,C(" 可能的值:true, false"),Je,C(" 描述:如果为true,则该rule下的所有路由将会实时生效;若为false,则只有在启动时才会生效 ")]),_:1})]),_:1})])]),_:1})):q("",!0)]),_:1},8,["span"])]),_:1}),e(U,{class:"footer"},{default:l(()=>[e(h,null,{default:l(()=>[e(i,{type:"primary",onClick:Me},{default:l(()=>[C("确认")]),_:1})]),_:1})]),_:1})])}}}),Ze=Be(Le,[["__scopeId","data-v-d3c6be66"]]);export{Ze as default}; diff --git a/app/dubbo-ui/dist/admin/assets/addByFormView-suZAGsdv.js b/app/dubbo-ui/dist/admin/assets/addByFormView-suZAGsdv.js new file mode 100644 index 000000000..b50ef01ee --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/addByFormView-suZAGsdv.js @@ -0,0 +1 @@ +import{u as Ue}from"./index-HdnVQEsT.js";import{d as we,y as Re,z as De,D as Ke,H,k as Se,u as qe,B as W,r as Oe,F as le,c as F,b as e,w as l,e as K,o as v,f as C,J as _,n as j,aa as je,ab as Ee,T as q,L as J,M as X,j as G,t as A,I as z,p as Ae,h as ze,_ as Be}from"./index-3zDsduUv.js";import{a as Ve}from"./traffic-dHGZ6qwp.js";import"./request-3an337VF.js";const L=Y=>(Ae("data-v-d3c6be66"),Y=Y(),ze(),Y),Ne={class:"__container_routingRule_detail"},Ge={style:{"max-width":"400px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},me=L(()=>G("br",null,null,-1)),Pe=L(()=>G("br",null,null,-1)),We=L(()=>G("br",null,null,-1)),xe=L(()=>G("br",null,null,-1)),Fe=L(()=>G("br",null,null,-1)),Le=L(()=>G("br",null,null,-1)),Je=we({__name:"addByFormView",setup(Y){const E=Re(De.PROVIDE_INJECT_KEY);Ke(()=>{if(!H.isNil(E.conditionRule)){const{enabled:s=!0,key:t,scope:i,runtime:h=!0,conditions:$}=E.conditionRule;g.enable=s,g.objectOfAction=t,g.ruleGranularity=i,g.runtime=h,$&&$.length&&$.forEach((r,n)=>{var f,S;const k=r.split("=>"),o=(f=k[0])==null?void 0:f.trim(),M=(S=k[1])==null?void 0:S.trim();d.value[n].requestMatch=$e(o,n),d.value[n].routeDistribute=Te(M,n)})}if(!H.isNil(E.addConditionRuleSate)){const{version:s,group:t}=E.addConditionRuleSate;g.version=s,g.group=t}}),Se();const ae=qe(),x=W(!1),Z=W(8);Ue().toClipboard;const g=Oe({version:"",ruleGranularity:"",objectOfAction:"",enable:!0,faultTolerantProtection:!1,runtime:!0,priority:null,group:""});le(g,s=>{const{ruleGranularity:t,enable:i=!0,runtime:h=!0,objectOfAction:$}=s;E.conditionRule={...E.conditionRule,enabled:i,key:$,runtime:h,scope:t},E.addConditionRuleSate={version:s.version,group:s.group}},{immediate:!!H.isNil(E.conditionRule)});const ne=W([{label:"host",value:"host"},{label:"application",value:"application"},{label:"method",value:"method"},{label:"arguments",value:"arguments"},{label:"attachments",value:"attachments"},{label:"其他",value:"other"}]),se=W([{label:"host",value:"host"},{label:"其他",value:"other"}]),m=W([{label:"=",value:"="},{label:"!=",value:"!="}]),oe=W([{label:"应用",value:"application"},{label:"服务",value:"service"}]),d=W([{selectedMatchConditionTypes:[],requestMatch:[],selectedRouteDistributeMatchTypes:[],routeDistribute:[{type:"host",condition:"",value:""},{type:"other",list:[{myKey:"",condition:"",value:""}]}]}]);le(d,s=>{E.conditionRule={...E.conditionRule,conditions:te()}},{deep:!0,immediate:!!H.isNil(E.conditionRule)});const ie=()=>{d.value.push({selectedMatchConditionTypes:[],requestMatch:[],selectedRouteDistributeMatchTypes:[],routeDistribute:[{type:"host",condition:"=",value:"127.0.0.1"},{type:"other",list:[{myKey:"key",condition:"=",value:"value"}]}]})},ue=s=>{d.value.splice(s,1)},ce=s=>{d.value[s].requestMatch=[],d.value[s].selectedMatchConditionTypes=[]},de=s=>{d.value[s].requestMatch=[{type:"host",condition:"",value:""},{type:"application",condition:"",value:""},{type:"method",condition:"",value:""},{type:"arguments",list:[{index:0,condition:"",value:""}]},{type:"attachments",list:[{myKey:"key",condition:"",value:""}]},{type:"other",list:[{myKey:"key",condition:"",value:""}]}]},Q=(s,t)=>{d.value[t].selectedMatchConditionTypes=d.value[t].selectedMatchConditionTypes.filter(i=>i!==s)},re=(s,t)=>{d.value[t].selectedRouteDistributeMatchTypes=d.value[t].selectedRouteDistributeMatchTypes.filter(i=>i!==s)},pe=[{dataIndex:"index",key:"index",title:"参数索引"},{dataIndex:"condition",key:"condition",title:"关系"},{dataIndex:"value",key:"value",title:"值"},{dataIndex:"operation",key:"operation",title:"操作"}],ve=(s,t)=>{d.value[s].requestMatch[t].list.push({index:0,condition:"=",value:""})},ye=(s,t,i)=>{d.value[s].requestMatch[t].list.length===1&&(d.value[s].selectedMatchConditionTypes=d.value[s].selectedMatchConditionTypes.filter(h=>h!=="arguments")),d.value[s].requestMatch[t].list.splice(i,1)},he=[{dataIndex:"myKey",key:"myKey",title:"键"},{dataIndex:"condition",key:"condition",title:"关系"},{dataIndex:"value",key:"value",title:"值"},{dataIndex:"operation",key:"operation",title:"操作"}],fe=(s,t)=>{d.value[s].requestMatch[t].list.push({key:"key",condition:"=",value:""})},_e=(s,t,i)=>{d.value[s].requestMatch[t].list.length===1&&(d.value[s].selectedMatchConditionTypes=d.value[s].selectedMatchConditionTypes.filter(h=>h!=="attachments")),d.value[s].requestMatch[t].list.splice(i,1)},I=[{dataIndex:"myKey",key:"myKey",title:"键"},{dataIndex:"condition",key:"condition",title:"关系"},{dataIndex:"value",key:"value",title:"值"},{dataIndex:"operation",key:"operation",title:"操作"}],ke=(s,t)=>{d.value[s].requestMatch[t].list.push({myKey:"",condition:"=",value:""})},be=(s,t,i)=>{if(d.value[s].requestMatch[t].list.length===1){d.value[s].selectedMatchConditionTypes=d.value[s].selectedMatchConditionTypes.filter(h=>h!=="other");return}d.value[s].requestMatch[t].list.splice(i,1)},ge=(s,t)=>{d.value[s].routeDistribute[t].list.push({myKey:"",condition:"=",value:""})},Ce=(s,t,i)=>{if(d.value[s].routeDistribute[t].list.length===1){d.value[s].selectedRouteDistributeMatchTypes=d.value[s].selectedRouteDistributeMatchTypes.filter(h=>h!=="other");return}d.value[s].routeDistribute[t].list.splice(i,1)};function ee(s){var f,S;const t=d.value[s],{ruleGranularity:i,objectOfAction:h}=g;let r=`对于${i==="service"?"服务":"应用"}【${h||"未指定"}】`,n=[];(f=t.selectedMatchConditionTypes)==null||f.forEach(U=>{var V,P,p,b;const R=(V=t.requestMatch)==null?void 0:V.find(a=>a.type===U);if(!R)return;let y="";const O=R.condition==="="?"等于":R.condition==="!="?"不等于":R.condition||"",B=R.value||"未指定";switch(U){case"host":y=`请求来源主机 ${O} ${B}`;break;case"application":y=`请求来源应用 ${O} ${B}`;break;case"method":y=`请求方法 ${O} ${B}`;break;case"arguments":const a=(P=R.list)==null?void 0:P.map(u=>{const N=u.condition==="="?"等于":u.condition==="!="?"不等于":u.condition||"",D=u.value!==void 0&&u.value!==""?u.value:"未指定";return`参数[${u.index}] ${N} ${D}`}).filter(Boolean);(a==null?void 0:a.length)>0&&(y=a.join(" 且 "));break;case"attachments":const T=(p=R.list)==null?void 0:p.map(u=>{const N=u.condition==="="?"等于":u.condition==="!="?"不等于":u.condition||"",D=u.value!==void 0&&u.value!==""?u.value:"未指定";return`附件[${u.myKey||"未指定"}] ${N} ${D}`}).filter(Boolean);(T==null?void 0:T.length)>0&&(y=T.join(" 且 "));break;case"other":const c=(b=R.list)==null?void 0:b.map(u=>{const N=u.condition==="="?"等于":u.condition==="!="?"不等于":u.condition||"",D=u.value!==void 0&&u.value!==""?u.value:"未指定";return`自定义匹配[${u.myKey||"未指定"}] ${N} ${D}`}).filter(Boolean);(c==null?void 0:c.length)>0&&(y=c.join(" 且 "));break}y&&((U==="host"||U==="application"||U==="method")&&!R.value?n.push(`${U==="host"?"请求来源主机":U==="application"?"请求来源应用":"请求方法"} 未填写`):n.push(y))});const k=n.length>0?n.join(" 且 "):"任意请求";let o=[];(S=t.selectedRouteDistributeMatchTypes)==null||S.forEach(U=>{var V,P;const R=(V=t.routeDistribute)==null?void 0:V.find(p=>p.type===U);if(!R)return;let y="";const O=R.condition==="="?"等于":R.condition==="!="?"不等于":R.condition||"",B=R.value||"未指定";switch(U){case"host":y=`目标主机 ${O} ${B}`;break;case"other":const p=(P=R.list)==null?void 0:P.map(b=>{const a=b.condition==="="?"等于":b.condition==="!="?"不等于":b.condition||"",T=b.value!==void 0&&b.value!==""?b.value:"未指定";return`目标标签[${b.myKey||"未指定"}] ${a} ${T}`}).filter(Boolean);(p==null?void 0:p.length)>0&&(y=p.join(" 且 "));break}y&&(U==="host"&&!R.value?o.push("目标主机 未填写"):o.push(y))});const M=o.length>0?`满足 【${o.join(" 且 ")}】`:"默认路由规则";return`${r},将满足 【${k}】 条件的请求,转发到 ${M} 的实例。`}function te(){let s=[],t="",i="";return d.value.forEach((h,$)=>{h.selectedMatchConditionTypes.forEach((n,k)=>{h.requestMatch.forEach((o,M)=>{if(n==(o==null?void 0:o.type))switch(o==null?void 0:o.type){case"arguments":o.list.forEach((f,S)=>{t.length>0&&(t+=" & "),t+=`${n}[${f.index}]${f.condition}${f.value}`});break;case"attachments":o.list.forEach((f,S)=>{t.length>0&&(t+=" & "),t+=`${n}[${f.myKey}]${f.condition}${f.value}`});break;case"other":o.list.forEach((f,S)=>{t.length>0&&(t+=" & "),t+=`${f.myKey}${f.condition}${f.value}`});break;default:t.length>0&&(t+=" & "),t+=`${o.type}${o.condition}${o.value}`}})}),h.selectedRouteDistributeMatchTypes.forEach((n,k)=>{h.routeDistribute.forEach((o,M)=>{if(n==(o==null?void 0:o.type))switch(o==null?void 0:o.type){case"other":o==null||o.list.forEach((f,S)=>{i.length>0&&(i+=" & "),i+=`${f.myKey}${f.condition}${f.value}`});break;default:i.length>0&&(i+=" & "),i+=`${o.type}${o.condition}${o.value}`}})});let r="";t.length>0&&i.length>0?r=`${t} => ${i}`:t.length>0&&i.length==0&&(r=`${t}`),s.push(r)}),s}const Me=async()=>{const{version:s,ruleGranularity:t,objectOfAction:i,enable:h,faultTolerantProtection:$,runtime:r,group:n}=g,k={configVersion:"v3.0",scope:t,key:i,enabled:h,force:$,runtime:r,conditions:te()};let o="";t=="application"?o=`${i}.condition-router`:o=`${i}:${s||""}:${n||""}.condition-router`,(await Ve(o,k)).code===200&&ae.push("/traffic/routingRule")};function $e(s,t){const i=[],h=s.split(" & ");return[{type:"host",condition:"",value:""},{type:"application",condition:"",value:""},{type:"method",condition:"",value:""},{type:"arguments",list:[]},{type:"attachments",list:[]},{type:"other",list:[]}].forEach(r=>i.push({...r})),h.forEach(r=>{if(r=r.trim(),r.startsWith("host")){d.value[t].selectedMatchConditionTypes.push("host");const n=r.match(/^host(!=|=)(.+)/);if(n){const k=n[1],o=n[2].trim(),M=i.find(f=>f.type==="host");M.condition=k,M.value=o}}else if(r.startsWith("application")){d.value[t].selectedMatchConditionTypes.push("application");const n=r.match(/^application(!=|=)(.+)/);if(n){const k=n[1],o=n[2].trim(),M=i.find(f=>f.type==="application");M.condition=k,M.value=o}}else if(r.startsWith("method")){d.value[t].selectedMatchConditionTypes.push("method");const n=r.match(/^method(!=|=)(.+)/);if(n){const k=n[1],o=n[2].trim(),M=i.find(f=>f.type==="method");M.condition=k,M.value=o}}else if(r.startsWith("arguments")){!d.value[t].selectedMatchConditionTypes.includes("arguments")&&d.value[t].selectedMatchConditionTypes.push("arguments");const n=r.match(/^arguments\[(\d+)\](!=|=)(.+)/);if(n){const k=parseInt(n[1],10),o=n[2],M=n[3].trim();i.find(S=>S.type==="arguments").list.push({index:k,condition:o,value:M})}}else if(r.startsWith("attachments")){!d.value[t].selectedMatchConditionTypes.includes("attachments")&&d.value[t].selectedMatchConditionTypes.push("attachments");const n=r.match(/^attachments\[(.+)\](!=|=)(.+)/);if(n){const k=n[1].trim(),o=n[2],M=n[3].trim();i.find(S=>S.type==="attachments").list.push({myKey:k,condition:o,value:M})}}else{const n=r.match(/^([^!=]+)(!?=)(.+)$/);if(n){!d.value[t].selectedMatchConditionTypes.includes("other")&&d.value[t].selectedMatchConditionTypes.push("other");const k=i.find(o=>o.type==="other");k&&k.list.push({myKey:n[1].trim(),condition:n[2],value:n[3].trim()})}}}),i}function Te(s,t){const i=[],h=s==null?void 0:s.split(" & ");return[{type:"host",condition:"",value:""},{type:"other",list:[]}].forEach(r=>i.push({...r})),h!=null&&h.length&&h.forEach(r=>{if(r=r.trim(),r.startsWith("host")){d.value[t].selectedRouteDistributeMatchTypes.push("host");const n=r.match(/^host(!=|=)(.+)/);if(n){const k=n[1],o=n[2].trim(),M=i.find(f=>f.type==="host");M.condition=k,M.value=o}}else{const n=r.match(/^([^!=]+)(!?=)(.+)$/);if(n){!d.value[t].selectedRouteDistributeMatchTypes.includes("other")&&d.value[t].selectedRouteDistributeMatchTypes.push("other");const k=i.find(o=>o.type==="other");k&&k.list.push({myKey:n[1].trim(),condition:n[2],value:n[3].trim()})}}}),i}return(s,t)=>{const i=K("a-button"),h=K("a-flex"),$=K("a-select"),r=K("a-form-item"),n=K("a-input"),k=K("a-switch"),o=K("a-col"),M=K("a-input-number"),f=K("a-row"),S=K("a-form"),U=K("a-card"),R=K("a-tooltip"),y=K("a-space"),O=K("a-tag"),B=K("a-table"),V=K("a-descriptions-item"),P=K("a-descriptions");return v(),F("div",Ne,[e(h,{style:{width:"100%"}},{default:l(()=>[e(o,{span:x.value?24-Z.value:24,class:"left"},{default:l(()=>[e(U,null,{default:l(()=>[e(y,{style:{width:"100%"},direction:"vertical",size:"middle"},{default:l(()=>[e(f,null,{default:l(()=>[e(h,{justify:"end",style:{width:"100%"}},{default:l(()=>[e(i,{type:"text",style:{color:"#0a90d5"},onClick:t[0]||(t[0]=p=>x.value=!x.value)},{default:l(()=>[C(" 字段说明 "),x.value?(v(),_(j(Ee),{key:1})):(v(),_(j(je),{key:0}))]),_:1})]),_:1}),e(U,{title:"基础信息",style:{width:"100%"},class:"_detail"},{default:l(()=>[e(S,{layout:"horizontal"},{default:l(()=>[e(f,{style:{width:"100%"}},{default:l(()=>[e(o,{span:12},{default:l(()=>[e(r,{label:"规则粒度",required:""},{default:l(()=>[e($,{value:g.ruleGranularity,"onUpdate:value":t[1]||(t[1]=p=>g.ruleGranularity=p),style:{width:"120px"},options:oe.value},null,8,["value","options"])]),_:1}),g.ruleGranularity==="service"?(v(),_(r,{key:0,label:"版本",required:""},{default:l(()=>[e(n,{value:g.version,"onUpdate:value":t[2]||(t[2]=p=>g.version=p),style:{width:"300px"}},null,8,["value"])]),_:1})):q("",!0),e(r,{label:"容错保护"},{default:l(()=>[e(k,{checked:g.faultTolerantProtection,"onUpdate:checked":t[3]||(t[3]=p=>g.faultTolerantProtection=p),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1}),e(r,{label:"运行时生效"},{default:l(()=>[e(k,{checked:g.runtime,"onUpdate:checked":t[4]||(t[4]=p=>g.runtime=p),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1})]),_:1}),e(o,{span:12},{default:l(()=>[e(r,{label:"作用对象",required:""},{default:l(()=>[e(n,{value:g.objectOfAction,"onUpdate:value":t[5]||(t[5]=p=>g.objectOfAction=p),style:{width:"300px"}},null,8,["value"])]),_:1}),g.ruleGranularity==="service"?(v(),_(r,{key:0,label:"分组",required:""},{default:l(()=>[e(n,{value:g.group,"onUpdate:value":t[6]||(t[6]=p=>g.group=p),style:{width:"300px"}},null,8,["value"])]),_:1})):q("",!0),e(r,{label:"立即启用"},{default:l(()=>[e(k,{checked:g.enable,"onUpdate:checked":t[7]||(t[7]=p=>g.enable=p),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1}),e(r,{label:"优先级"},{default:l(()=>[e(M,{value:g.priority,"onUpdate:value":t[8]||(t[8]=p=>g.priority=p),min:"1"},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e(U,{title:"路由列表",style:{width:"100%"},class:"_detail"},{default:l(()=>[(v(!0),F(J,null,X(d.value,(p,b)=>(v(),_(U,null,{title:l(()=>[e(h,{justify:"space-between"},{default:l(()=>[e(y,{align:"center"},{default:l(()=>[G("div",null,"路由【"+A(b+1)+"】",1),e(R,null,{title:l(()=>[C(A(ee(b)),1)]),default:l(()=>[G("div",Ge,A(ee(b)),1)]),_:2},1024)]),_:2},1024),e(j(z),{onClick:a=>ue(b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)]),default:l(()=>[e(S,{layout:"horizontal"},{default:l(()=>[e(y,{style:{width:"100%"},direction:"vertical",size:"large"},{default:l(()=>[e(r,{label:"请求匹配"},{default:l(()=>[p.requestMatch.length>0?(v(),_(U,{key:0},{default:l(()=>[e(y,{style:{width:"100%"},direction:"vertical",size:"small"},{default:l(()=>[e(h,{align:"center",justify:"space-between"},{default:l(()=>[e(r,{label:"匹配条件类型"},{default:l(()=>[e($,{value:p.selectedMatchConditionTypes,"onUpdate:value":a=>p.selectedMatchConditionTypes=a,options:ne.value,mode:"multiple",style:{"min-width":"200px"}},null,8,["value","onUpdate:value","options"])]),_:2},1024),e(j(z),{onClick:a=>ce(b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024),(v(!0),F(J,null,X(p.requestMatch,(a,T)=>(v(),F(J,null,[p.selectedMatchConditionTypes.includes("host")&&a.type==="host"?(v(),_(y,{key:0,size:"large",align:"center"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e($,{value:a.condition,"onUpdate:value":c=>a.condition=c,style:{"min-width":"120px"},options:m.value},null,8,["value","onUpdate:value","options"]),e(n,{value:a.value,"onUpdate:value":c=>a.value=c,placeholder:"请求来源ip"},null,8,["value","onUpdate:value"]),e(j(z),{onClick:c=>Q(a==null?void 0:a.type,b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("application")&&a.type==="application"?(v(),_(y,{key:1,size:"large",align:"center"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e($,{value:a.condition,"onUpdate:value":c=>a.condition=c,style:{"min-width":"120px"},options:m.value},null,8,["value","onUpdate:value","options"]),e(n,{value:a.value,"onUpdate:value":c=>a.value=c,placeholder:"请求来源应用名"},null,8,["value","onUpdate:value"]),e(j(z),{onClick:c=>Q(a==null?void 0:a.type,b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("method")&&a.type==="method"?(v(),_(y,{key:2,size:"large",align:"center"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e($,{value:a.condition,"onUpdate:value":c=>a.condition=c,style:{"min-width":"120px"},options:m.value},null,8,["value","onUpdate:value","options"]),e(n,{value:a.value,"onUpdate:value":c=>a.value=c,placeholder:"方法值"},null,8,["value","onUpdate:value"]),e(j(z),{onClick:c=>Q(a==null?void 0:a.type,b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("arguments")&&a.type==="arguments"?(v(),_(y,{key:3,style:{width:"100%"},size:"large",align:"start"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e(y,{direction:"vertical"},{default:l(()=>[e(i,{type:"primary",onClick:c=>ve(b,T)},{default:l(()=>[C(" 添加argument ")]),_:2},1032,["onClick"]),e(B,{pagination:!1,columns:pe,"data-source":p.requestMatch[T].list},{bodyCell:l(({column:c,record:u,text:N,index:D})=>[c.key==="index"?(v(),_(n,{key:0,value:u.index,"onUpdate:value":w=>u.index=w,placeholder:"index"},null,8,["value","onUpdate:value"])):c.key==="condition"?(v(),_($,{key:1,value:u.condition,"onUpdate:value":w=>u.condition=w,options:m.value},null,8,["value","onUpdate:value","options"])):c.key==="value"?(v(),_(n,{key:2,value:u.value,"onUpdate:value":w=>u.value=w,placeholder:"value"},null,8,["value","onUpdate:value"])):c.key==="operation"?(v(),_(y,{key:3,align:"center"},{default:l(()=>[e(j(z),{onClick:w=>ye(b,T,D),icon:"tdesign:remove",class:"action-icon"},null,8,["onClick"])]),_:2},1024)):q("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("attachments")&&a.type==="attachments"?(v(),_(y,{key:4,style:{width:"100%"},size:"large",align:"start"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e(y,{direction:"vertical"},{default:l(()=>[e(i,{type:"primary",onClick:c=>fe(b,T)},{default:l(()=>[C(" 添加attachment ")]),_:2},1032,["onClick"]),e(B,{pagination:!1,columns:he,"data-source":p.requestMatch[T].list},{bodyCell:l(({column:c,record:u,text:N,index:D})=>[c.key==="myKey"?(v(),_(n,{key:0,value:u.myKey,"onUpdate:value":w=>u.myKey=w,placeholder:"key"},null,8,["value","onUpdate:value"])):c.key==="condition"?(v(),_($,{key:1,value:u.condition,"onUpdate:value":w=>u.condition=w,options:m.value},null,8,["value","onUpdate:value","options"])):c.key==="value"?(v(),_(n,{key:2,value:u.value,"onUpdate:value":w=>u.value=w,placeholder:"value"},null,8,["value","onUpdate:value"])):c.key==="operation"?(v(),_(y,{key:3,align:"center"},{default:l(()=>[e(j(z),{onClick:w=>_e(b,T,D),icon:"tdesign:remove",class:"action-icon"},null,8,["onClick"])]),_:2},1024)):q("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)):q("",!0),p.selectedMatchConditionTypes.includes("other")&&a.type==="other"?(v(),_(y,{key:5,style:{width:"100%"},size:"large",align:"start"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A((a==null?void 0:a.type)=="other"?"其他":a==null?void 0:a.type),1)]),_:2},1024),e(y,{direction:"vertical"},{default:l(()=>[e(i,{type:"primary",onClick:c=>ke(b,T)},{default:l(()=>[C(" 添加other ")]),_:2},1032,["onClick"]),e(B,{pagination:!1,columns:I,"data-source":p.requestMatch[T].list},{bodyCell:l(({column:c,record:u,text:N})=>[c.key==="myKey"?(v(),_(n,{key:0,value:u.myKey,"onUpdate:value":D=>u.myKey=D,placeholder:"key"},null,8,["value","onUpdate:value"])):c.key==="condition"?(v(),_($,{key:1,value:u.condition,"onUpdate:value":D=>u.condition=D,options:m.value},null,8,["value","onUpdate:value","options"])):c.key==="value"?(v(),_(n,{key:2,value:u.value,"onUpdate:value":D=>u.value=D,placeholder:"value"},null,8,["value","onUpdate:value"])):c.key==="operation"?(v(),_(y,{key:3,align:"center"},{default:l(()=>[e(j(z),{onClick:D=>be(b,T,u.index),icon:"tdesign:remove",class:"action-icon"},null,8,["onClick"])]),_:2},1024)):q("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)):q("",!0)],64))),256))]),_:2},1024)]),_:2},1024)):(v(),_(i,{key:1,onClick:a=>de(b),type:"dashed",size:"large"},{icon:l(()=>[e(j(z),{icon:"tdesign:add"})]),default:l(()=>[C(" 增加匹配条件 ")]),_:2},1032,["onClick"]))]),_:2},1024),e(r,{label:"路由分发",required:""},{default:l(()=>[e(U,null,{default:l(()=>[e(y,{style:{width:"100%"},direction:"vertical",size:"small"},{default:l(()=>[e(h,null,{default:l(()=>[e(r,{label:"匹配条件类型"},{default:l(()=>[e($,{value:p.selectedRouteDistributeMatchTypes,"onUpdate:value":a=>p.selectedRouteDistributeMatchTypes=a,options:se.value,mode:"multiple",style:{"min-width":"200px"}},null,8,["value","onUpdate:value","options"])]),_:2},1024)]),_:2},1024),(v(!0),F(J,null,X(p.routeDistribute,(a,T)=>(v(),F(J,{key:T},[p.selectedRouteDistributeMatchTypes.includes("host")&&a.type==="host"?(v(),_(y,{key:0,size:"large",align:"center"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A(a==null?void 0:a.type),1)]),_:2},1024),e($,{value:a.condition,"onUpdate:value":c=>a.condition=c,style:{"min-width":"120px"},options:m.value},null,8,["value","onUpdate:value","options"]),e(n,{value:a.value,"onUpdate:value":c=>a.value=c,placeholder:"请求来源ip"},null,8,["value","onUpdate:value"]),e(j(z),{onClick:c=>re(a==null?void 0:a.type,b),class:"action-icon",icon:"tdesign:delete"},null,8,["onClick"])]),_:2},1024)):q("",!0),p.selectedRouteDistributeMatchTypes.includes("other")&&a.type==="other"?(v(),_(y,{key:1,style:{width:"100%"},size:"large",align:"start"},{default:l(()=>[e(O,{class:"match-condition-type-label",bordered:!1,color:"processing"},{default:l(()=>[C(A((a==null?void 0:a.type)=="other"?"其他":a==null?void 0:a.type),1)]),_:2},1024),e(y,{direction:"vertical"},{default:l(()=>[e(i,{type:"primary",onClick:c=>ge(b,T)},{default:l(()=>[C(" 添加其他 ")]),_:2},1032,["onClick"]),e(B,{pagination:!1,columns:I,"data-source":p.routeDistribute[T].list},{bodyCell:l(({column:c,record:u,text:N,index:D})=>[c.key==="myKey"?(v(),_(n,{key:0,value:u.myKey,"onUpdate:value":w=>u.myKey=w,placeholder:"key"},null,8,["value","onUpdate:value"])):c.key==="condition"?(v(),_($,{key:1,value:u.condition,"onUpdate:value":w=>u.condition=w,options:m.value},null,8,["value","onUpdate:value","options"])):c.key==="value"?(v(),_(n,{key:2,value:u.value,"onUpdate:value":w=>u.value=w,placeholder:"value"},null,8,["value","onUpdate:value"])):c.key==="operation"?(v(),_(y,{key:3,align:"center"},{default:l(()=>[e(j(z),{onClick:w=>Ce(b,T,D),icon:"tdesign:remove",class:"action-icon"},null,8,["onClick"])]),_:2},1024)):q("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)):q("",!0)],64))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),256))]),_:1}),e(i,{onClick:ie,type:"primary"},{default:l(()=>[C(" 增加路由")]),_:1})]),_:1})]),_:1})]),_:1},8,["span"]),e(o,{span:x.value?Z.value:0,class:"right"},{default:l(()=>[x.value?(v(),_(U,{key:0,class:"sliderBox"},{default:l(()=>[G("div",null,[e(P,{title:"字段说明",column:1},{default:l(()=>[e(V,{label:"key"},{default:l(()=>[C(" 作用对象"),me,C(" 可能的值:Dubbo应用名或者服务名 ")]),_:1}),e(V,{label:"scope"},{default:l(()=>[C(" 规则粒度"),Pe,C(" 可能的值:application, service ")]),_:1}),e(V,{label:"force"},{default:l(()=>[C(" 容错保护"),We,C(" 可能的值:true, false"),xe,C(" 描述:如果为true,则路由筛选后若没有可用的地址则会直接报异常;如果为false,则会从可用地址中选择完成RPC调用 ")]),_:1}),e(V,{label:"runtime"},{default:l(()=>[C(" 运行时生效"),Fe,C(" 可能的值:true, false"),Le,C(" 描述:如果为true,则该rule下的所有路由将会实时生效;若为false,则只有在启动时才会生效 ")]),_:1})]),_:1})])]),_:1})):q("",!0)]),_:1},8,["span"])]),_:1}),e(U,{class:"footer"},{default:l(()=>[e(h,null,{default:l(()=>[e(i,{type:"primary",onClick:Me},{default:l(()=>[C("确认")]),_:1})]),_:1})]),_:1})])}}}),Ze=Be(Je,[["__scopeId","data-v-d3c6be66"]]);export{Ze as default}; diff --git a/app/dubbo-ui/dist/admin/assets/addByYAMLView-KSfwZr8J.js b/app/dubbo-ui/dist/admin/assets/addByYAMLView--WjgktlZ.js similarity index 56% rename from app/dubbo-ui/dist/admin/assets/addByYAMLView-KSfwZr8J.js rename to app/dubbo-ui/dist/admin/assets/addByYAMLView--WjgktlZ.js index b412c0b3a..11027680c 100644 --- a/app/dubbo-ui/dist/admin/assets/addByYAMLView-KSfwZr8J.js +++ b/app/dubbo-ui/dist/admin/assets/addByYAMLView--WjgktlZ.js @@ -1,4 +1,4 @@ -import{y as g,_ as T}from"./js-yaml-8Gkz3BRW.js";import{f as A}from"./traffic-C2a-KjHH.js";import{d as D,x as O,y as S,u as Y,a as $,z as p,W as L,F as M,G as m,w as e,e as n,o as v,b as a,f as t,n as E,a9 as P,aa as j,j as o,Q as z,p as G,h as J,_ as K}from"./index-hmLAZQYT.js";import"./request-8jI_GZey.js";const r=f=>(G("data-v-169bd129"),f=f(),J(),f),F={class:"editorBox"},Q={class:"bottom-action-footer"},U=r(()=>o("br",null,null,-1)),W=r(()=>o("br",null,null,-1)),q=r(()=>o("br",null,null,-1)),H=r(()=>o("br",null,null,-1)),X=r(()=>o("br",null,null,-1)),Z=r(()=>o("br",null,null,-1)),ee=D({__name:"addByYAMLView",setup(f){const y=O(S.PROVIDE_INJECT_KEY),I=Y();$();const w=p(!1),s=p(!1),h=p(8),u=p(`configVersion: v3.0 +import{y as g,_ as N}from"./js-yaml-eElisXzH.js";import{f as A}from"./traffic-dHGZ6qwp.js";import{d as D,y as O,z as S,u as Y,a as $,B as p,D as L,H as M,J as m,w as e,e as n,o as v,b as a,f as t,n as B,aa as P,ab as j,j as o,T as J,p as z,h as K,_ as G}from"./index-3zDsduUv.js";import"./request-3an337VF.js";const r=f=>(z("data-v-169bd129"),f=f(),K(),f),H={class:"editorBox"},U={class:"bottom-action-footer"},q=r(()=>o("br",null,null,-1)),F=r(()=>o("br",null,null,-1)),Q=r(()=>o("br",null,null,-1)),W=r(()=>o("br",null,null,-1)),X=r(()=>o("br",null,null,-1)),Z=r(()=>o("br",null,null,-1)),ee=D({__name:"addByYAMLView",setup(f){const y=O(S.PROVIDE_INJECT_KEY),E=Y();$();const I=p(!1),s=p(!1),h=p(8),u=p(`configVersion: v3.0 force: true enabled: true key: shop-detail @@ -7,4 +7,4 @@ tags:     match:       - key: env         value: -          exact: gray`);L(()=>{if(M.isNil(y.tagRule))u.value="";else{const c=y.tagRule;u.value=g.dump(c)}});const B=c=>{y.tagRule=g.load(u.value)},N=async()=>{const c=g.load(u.value),{configVersion:d,scope:i,key:_,runtime:x,force:V,conditions:b}=c;let l="";i=="application"?l=`${_}.tag-router`:l=`${_}:${d}.tag-router`,(await A(l,c)).code===200&&I.push("/traffic/tagRule")};return(c,d)=>{const i=n("a-button"),_=n("a-flex"),x=n("a-space"),V=n("a-affix"),b=n("a-col"),l=n("a-descriptions-item"),R=n("a-descriptions"),k=n("a-card");return v(),m(k,null,{default:e(()=>[a(_,{style:{width:"100%"}},{default:e(()=>[a(b,{span:s.value?24-h.value:24,class:"left"},{default:e(()=>[a(_,{vertical:"",align:"end"},{default:e(()=>[a(i,{type:"text",style:{color:"#0a90d5"},onClick:d[0]||(d[0]=C=>s.value=!s.value)},{default:e(()=>[t(" 字段说明 "),s.value?(v(),m(E(j),{key:1})):(v(),m(E(P),{key:0}))]),_:1}),o("div",F,[a(T,{onChange:B,modelValue:u.value,"onUpdate:modelValue":d[1]||(d[1]=C=>u.value=C),theme:"vs-dark",height:500,language:"yaml",readonly:w.value},null,8,["modelValue","readonly"])])]),_:1}),a(V,{"offset-bottom":10},{default:e(()=>[o("div",Q,[a(x,{align:"center",size:"large"},{default:e(()=>[a(i,{type:"primary",onClick:N},{default:e(()=>[t(" 确认 ")]),_:1}),a(i,null,{default:e(()=>[t(" 取消 ")]),_:1})]),_:1})])]),_:1})]),_:1},8,["span"]),a(b,{span:s.value?h.value:0,class:"right"},{default:e(()=>[s.value?(v(),m(k,{key:0,class:"sliderBox"},{default:e(()=>[o("div",null,[a(R,{title:"字段说明",column:1},{default:e(()=>[a(l,{label:"key"},{default:e(()=>[t(" 作用对象"),U,t(" 可能的值:Dubbo应用名或者服务名 ")]),_:1}),a(l,{label:"scope"},{default:e(()=>[t(" 规则粒度"),W,t(" 可能的值:application, service ")]),_:1}),a(l,{label:"force"},{default:e(()=>[t(" 容错保护"),q,t(" 可能的值:true, false"),H,t(" 描述:如果为true,则路由筛选后若没有可用的地址则会直接报异常;如果为false,则会从可用地址中选择完成RPC调用 ")]),_:1}),a(l,{label:"runtime"},{default:e(()=>[t(" 运行时生效"),X,t(" 可能的值:true, false"),Z,t(" 描述:如果为true,则该rule下的所有路由将会实时生效;若为false,则只有在启动时才会生效 ")]),_:1})]),_:1})])]),_:1})):z("",!0)]),_:1},8,["span"])]),_:1})]),_:1})}}}),ne=K(ee,[["__scopeId","data-v-169bd129"]]);export{ne as default}; +          exact: gray`);L(()=>{if(M.isNil(y.tagRule))u.value="";else{const c=y.tagRule;u.value=g.dump(c)}});const T=c=>{y.tagRule=g.load(u.value)},w=async()=>{const c=g.load(u.value),{configVersion:d,scope:i,key:_,runtime:x,force:V,conditions:b}=c;let l="";i=="application"?l=`${_}.tag-router`:l=`${_}:${d}.tag-router`,(await A(l,c)).code===200&&E.push("/traffic/tagRule")};return(c,d)=>{const i=n("a-button"),_=n("a-flex"),x=n("a-space"),V=n("a-affix"),b=n("a-col"),l=n("a-descriptions-item"),R=n("a-descriptions"),k=n("a-card");return v(),m(k,null,{default:e(()=>[a(_,{style:{width:"100%"}},{default:e(()=>[a(b,{span:s.value?24-h.value:24,class:"left"},{default:e(()=>[a(_,{vertical:"",align:"end"},{default:e(()=>[a(i,{type:"text",style:{color:"#0a90d5"},onClick:d[0]||(d[0]=C=>s.value=!s.value)},{default:e(()=>[t(" 字段说明 "),s.value?(v(),m(B(j),{key:1})):(v(),m(B(P),{key:0}))]),_:1}),o("div",H,[a(N,{onChange:T,modelValue:u.value,"onUpdate:modelValue":d[1]||(d[1]=C=>u.value=C),theme:"vs-dark",height:500,language:"yaml",readonly:I.value},null,8,["modelValue","readonly"])])]),_:1}),a(V,{"offset-bottom":10},{default:e(()=>[o("div",U,[a(x,{align:"center",size:"large"},{default:e(()=>[a(i,{type:"primary",onClick:w},{default:e(()=>[t(" 确认 ")]),_:1}),a(i,null,{default:e(()=>[t(" 取消 ")]),_:1})]),_:1})])]),_:1})]),_:1},8,["span"]),a(b,{span:s.value?h.value:0,class:"right"},{default:e(()=>[s.value?(v(),m(k,{key:0,class:"sliderBox"},{default:e(()=>[o("div",null,[a(R,{title:"字段说明",column:1},{default:e(()=>[a(l,{label:"key"},{default:e(()=>[t(" 作用对象"),q,t(" 可能的值:Dubbo应用名或者服务名 ")]),_:1}),a(l,{label:"scope"},{default:e(()=>[t(" 规则粒度"),F,t(" 可能的值:application, service ")]),_:1}),a(l,{label:"force"},{default:e(()=>[t(" 容错保护"),Q,t(" 可能的值:true, false"),W,t(" 描述:如果为true,则路由筛选后若没有可用的地址则会直接报异常;如果为false,则会从可用地址中选择完成RPC调用 ")]),_:1}),a(l,{label:"runtime"},{default:e(()=>[t(" 运行时生效"),X,t(" 可能的值:true, false"),Z,t(" 描述:如果为true,则该rule下的所有路由将会实时生效;若为false,则只有在启动时才会生效 ")]),_:1})]),_:1})])]),_:1})):J("",!0)]),_:1},8,["span"])]),_:1})]),_:1})}}}),ne=G(ee,[["__scopeId","data-v-169bd129"]]);export{ne as default}; diff --git a/app/dubbo-ui/dist/admin/assets/addByYAMLView-mp4IQp11.js b/app/dubbo-ui/dist/admin/assets/addByYAMLView-fC-hqbkM.js similarity index 55% rename from app/dubbo-ui/dist/admin/assets/addByYAMLView-mp4IQp11.js rename to app/dubbo-ui/dist/admin/assets/addByYAMLView-fC-hqbkM.js index 4c6e9497f..f8332cccf 100644 --- a/app/dubbo-ui/dist/admin/assets/addByYAMLView-mp4IQp11.js +++ b/app/dubbo-ui/dist/admin/assets/addByYAMLView-fC-hqbkM.js @@ -1,4 +1,4 @@ -import{y as R,_ as D}from"./js-yaml-8Gkz3BRW.js";import{d as T,x as $,y as O,u as Y,z as h,W as L,F as w,G as v,w as e,e as s,o as b,b as t,f as a,n as E,a9 as M,aa as P,j as o,Q as j,m as I,p as z,h as J,_ as K}from"./index-hmLAZQYT.js";import{a as F}from"./traffic-C2a-KjHH.js";import"./request-8jI_GZey.js";const c=p=>(z("data-v-f0b44ffc"),p=p(),J(),p),G={class:"editorBox"},Q={class:"bottom-action-footer"},U=c(()=>o("br",null,null,-1)),W=c(()=>o("br",null,null,-1)),q=c(()=>o("br",null,null,-1)),H=c(()=>o("br",null,null,-1)),X=c(()=>o("br",null,null,-1)),Z=c(()=>o("br",null,null,-1)),ee=T({__name:"addByYAMLView",setup(p){const d=$(O.PROVIDE_INJECT_KEY),N=Y(),B=h(!1),r=h(!1),V=h(8),i=h(`conditions: +import{y as R,_ as T}from"./js-yaml-eElisXzH.js";import{d as A,y as $,z as O,u as Y,B as h,D as L,H as w,J as v,w as e,e as s,o as b,b as t,f as a,n as B,aa as M,ab as P,j as o,T as J,m as E,p as j,h as z,_ as K}from"./index-3zDsduUv.js";import{a as H}from"./traffic-dHGZ6qwp.js";import"./request-3an337VF.js";const c=p=>(j("data-v-f0b44ffc"),p=p(),z(),p),U={class:"editorBox"},q={class:"bottom-action-footer"},F=c(()=>o("br",null,null,-1)),G=c(()=>o("br",null,null,-1)),Q=c(()=>o("br",null,null,-1)),W=c(()=>o("br",null,null,-1)),X=c(()=>o("br",null,null,-1)),Z=c(()=>o("br",null,null,-1)),ee=A({__name:"addByYAMLView",setup(p){const d=$(O.PROVIDE_INJECT_KEY),I=Y(),N=h(!1),r=h(!1),V=h(8),i=h(`conditions: - from: match: >- method=string & arguments[method]=string & @@ -23,4 +23,4 @@ enabled: true force: false key: org.apache.dubbo.samples.CommentService runtime: true -scope: service`);L(()=>{if(w.isNil(d.conditionRule))i.value="";else{const l=d.conditionRule;i.value=R.dump(l)}});const S=l=>{d.conditionRule=R.load(i.value)},A=async()=>{const l=R.load(i.value),{configVersion:_,scope:g,key:u,runtime:x,force:C,conditions:y}=l;let n="";if(u=="application")n=`${u}.condition-router`;else if(w.isNil(d.addConditionRuleSate)){I.error("请先填写版本和分组字段");return}else{const{version:m,group:f}=d.addConditionRuleSate;if(m==""||f==""){I.error("请先填写版本和分组字段");return}n=`${u}:${m}:${f}.condition-router`}l.configVersion="v3.0",(await F(n,l)).code===200&&N.push("/traffic/routingRule")};return(l,_)=>{const g=s("a-button"),u=s("a-flex"),x=s("a-space"),C=s("a-affix"),y=s("a-col"),n=s("a-descriptions-item"),k=s("a-descriptions"),m=s("a-card");return b(),v(m,null,{default:e(()=>[t(u,{style:{width:"100%"}},{default:e(()=>[t(y,{span:r.value?24-V.value:24,class:"left"},{default:e(()=>[t(u,{vertical:"",align:"end"},{default:e(()=>[t(g,{type:"text",style:{color:"#0a90d5"},onClick:_[0]||(_[0]=f=>r.value=!r.value)},{default:e(()=>[a(" 字段说明 "),r.value?(b(),v(E(P),{key:1})):(b(),v(E(M),{key:0}))]),_:1}),o("div",G,[t(D,{onChange:S,modelValue:i.value,"onUpdate:modelValue":_[1]||(_[1]=f=>i.value=f),theme:"vs-dark",height:500,language:"yaml",readonly:B.value},null,8,["modelValue","readonly"])])]),_:1}),t(C,{"offset-bottom":10},{default:e(()=>[o("div",Q,[t(x,{align:"center",size:"large"},{default:e(()=>[t(g,{type:"primary",onClick:A},{default:e(()=>[a(" 确认 ")]),_:1}),t(g,null,{default:e(()=>[a(" 取消 ")]),_:1})]),_:1})])]),_:1})]),_:1},8,["span"]),t(y,{span:r.value?V.value:0,class:"right"},{default:e(()=>[r.value?(b(),v(m,{key:0,class:"sliderBox"},{default:e(()=>[o("div",null,[t(k,{title:"字段说明",column:1},{default:e(()=>[t(n,{label:"key"},{default:e(()=>[a(" 作用对象"),U,a(" 可能的值:Dubbo应用名或者服务名 ")]),_:1}),t(n,{label:"scope"},{default:e(()=>[a(" 规则粒度"),W,a(" 可能的值:application, service ")]),_:1}),t(n,{label:"force"},{default:e(()=>[a(" 容错保护"),q,a(" 可能的值:true, false"),H,a(" 描述:如果为true,则路由筛选后若没有可用的地址则会直接报异常;如果为false,则会从可用地址中选择完成RPC调用 ")]),_:1}),t(n,{label:"runtime"},{default:e(()=>[a(" 运行时生效"),X,a(" 可能的值:true, false"),Z,a(" 描述:如果为true,则该rule下的所有路由将会实时生效;若为false,则只有在启动时才会生效 ")]),_:1})]),_:1})])]),_:1})):j("",!0)]),_:1},8,["span"])]),_:1})]),_:1})}}}),se=K(ee,[["__scopeId","data-v-f0b44ffc"]]);export{se as default}; +scope: service`);L(()=>{if(w.isNil(d.conditionRule))i.value="";else{const l=d.conditionRule;i.value=R.dump(l)}});const S=l=>{d.conditionRule=R.load(i.value)},D=async()=>{const l=R.load(i.value),{configVersion:_,scope:g,key:u,runtime:C,force:x,conditions:y}=l;let n="";if(u=="application")n=`${u}.condition-router`;else if(w.isNil(d.addConditionRuleSate)){E.error("请先填写版本和分组字段");return}else{const{version:m,group:f}=d.addConditionRuleSate;if(m==""||f==""){E.error("请先填写版本和分组字段");return}n=`${u}:${m}:${f}.condition-router`}l.configVersion="v3.0",(await H(n,l)).code===200&&I.push("/traffic/routingRule")};return(l,_)=>{const g=s("a-button"),u=s("a-flex"),C=s("a-space"),x=s("a-affix"),y=s("a-col"),n=s("a-descriptions-item"),k=s("a-descriptions"),m=s("a-card");return b(),v(m,null,{default:e(()=>[t(u,{style:{width:"100%"}},{default:e(()=>[t(y,{span:r.value?24-V.value:24,class:"left"},{default:e(()=>[t(u,{vertical:"",align:"end"},{default:e(()=>[t(g,{type:"text",style:{color:"#0a90d5"},onClick:_[0]||(_[0]=f=>r.value=!r.value)},{default:e(()=>[a(" 字段说明 "),r.value?(b(),v(B(P),{key:1})):(b(),v(B(M),{key:0}))]),_:1}),o("div",U,[t(T,{onChange:S,modelValue:i.value,"onUpdate:modelValue":_[1]||(_[1]=f=>i.value=f),theme:"vs-dark",height:500,language:"yaml",readonly:N.value},null,8,["modelValue","readonly"])])]),_:1}),t(x,{"offset-bottom":10},{default:e(()=>[o("div",q,[t(C,{align:"center",size:"large"},{default:e(()=>[t(g,{type:"primary",onClick:D},{default:e(()=>[a(" 确认 ")]),_:1}),t(g,null,{default:e(()=>[a(" 取消 ")]),_:1})]),_:1})])]),_:1})]),_:1},8,["span"]),t(y,{span:r.value?V.value:0,class:"right"},{default:e(()=>[r.value?(b(),v(m,{key:0,class:"sliderBox"},{default:e(()=>[o("div",null,[t(k,{title:"字段说明",column:1},{default:e(()=>[t(n,{label:"key"},{default:e(()=>[a(" 作用对象"),F,a(" 可能的值:Dubbo应用名或者服务名 ")]),_:1}),t(n,{label:"scope"},{default:e(()=>[a(" 规则粒度"),G,a(" 可能的值:application, service ")]),_:1}),t(n,{label:"force"},{default:e(()=>[a(" 容错保护"),Q,a(" 可能的值:true, false"),W,a(" 描述:如果为true,则路由筛选后若没有可用的地址则会直接报异常;如果为false,则会从可用地址中选择完成RPC调用 ")]),_:1}),t(n,{label:"runtime"},{default:e(()=>[a(" 运行时生效"),X,a(" 可能的值:true, false"),Z,a(" 描述:如果为true,则该rule下的所有路由将会实时生效;若为false,则只有在启动时才会生效 ")]),_:1})]),_:1})])]),_:1})):J("",!0)]),_:1},8,["span"])]),_:1})]),_:1})}}}),se=K(ee,[["__scopeId","data-v-f0b44ffc"]]);export{se as default}; diff --git a/app/dubbo-ui/dist/admin/assets/app-duU6O0cq.js b/app/dubbo-ui/dist/admin/assets/app-mdoSebGq.js similarity index 94% rename from app/dubbo-ui/dist/admin/assets/app-duU6O0cq.js rename to app/dubbo-ui/dist/admin/assets/app-mdoSebGq.js index 55cacf1ce..6360cbc84 100644 --- a/app/dubbo-ui/dist/admin/assets/app-duU6O0cq.js +++ b/app/dubbo-ui/dist/admin/assets/app-mdoSebGq.js @@ -1 +1 @@ -import{r as a}from"./request-8jI_GZey.js";const r=t=>a({url:"/application/search",method:"get",params:t}),p=t=>a({url:"/application/detail",method:"get",params:t}),i=t=>a({url:"/application/instance/info",method:"get",params:t}),n=t=>a({url:"/application/service/form",method:"get",params:t}),c=t=>a({url:"/application/metric-dashboard",method:"get",params:t}),s=t=>a({url:"/application/trace-dashboard",method:"get",params:t}),l=t=>a({url:"/application/event",method:"get",params:t}),g=t=>a({url:"/application/config/operatorLog",method:"get",params:{appName:t}}),u=(t,o)=>a({url:"/application/config/operatorLog",method:"put",params:{appName:t,operatorLog:o}}),d=t=>a({url:"/application/config/flowWeight",method:"get",params:{appName:t}}),h=(t,o)=>a({url:"/application/config/flowWeight",method:"put",params:{appName:t},data:{flowWeightSets:o}}),m=t=>a({url:"/application/config/gray",method:"get",params:{appName:t}}),f=(t,o)=>a({url:"/application/config/gray",method:"put",params:{appName:t},data:{graySets:o}});export{i as a,n as b,c,s as d,d as e,h as f,p as g,m as h,f as i,g as j,l,r as s,u}; +import{r as a}from"./request-3an337VF.js";const r=t=>a({url:"/application/search",method:"get",params:t}),p=t=>a({url:"/application/detail",method:"get",params:t}),i=t=>a({url:"/application/instance/info",method:"get",params:t}),n=t=>a({url:"/application/service/form",method:"get",params:t}),c=t=>a({url:"/application/metric-dashboard",method:"get",params:t}),s=t=>a({url:"/application/trace-dashboard",method:"get",params:t}),l=t=>a({url:"/application/event",method:"get",params:t}),g=t=>a({url:"/application/config/operatorLog",method:"get",params:{appName:t}}),u=(t,o)=>a({url:"/application/config/operatorLog",method:"put",params:{appName:t,operatorLog:o}}),d=t=>a({url:"/application/config/flowWeight",method:"get",params:{appName:t}}),h=(t,o)=>a({url:"/application/config/flowWeight",method:"put",params:{appName:t},data:{flowWeightSets:o}}),m=t=>a({url:"/application/config/gray",method:"get",params:{appName:t}}),f=(t,o)=>a({url:"/application/config/gray",method:"put",params:{appName:t},data:{graySets:o}});export{i as a,n as b,c,s as d,d as e,h as f,p as g,m as h,f as i,g as j,l,r as s,u}; diff --git a/app/dubbo-ui/dist/admin/assets/config-Bcppce3q.js b/app/dubbo-ui/dist/admin/assets/config-Bcppce3q.js deleted file mode 100644 index 6c9e6d4e0..000000000 --- a/app/dubbo-ui/dist/admin/assets/config-Bcppce3q.js +++ /dev/null @@ -1 +0,0 @@ -import{C as H}from"./ConfigPage--FZz2L2D.js";import{d as X,a as Y,r as Z,a3 as ee,W as ae,c as W,b as l,w as o,n as I,e as _,o as p,J as T,K as $,G as g,f as C,t as U,j as L,I as j,Q as w,_ as te}from"./index-hmLAZQYT.js";import{u as oe,e as le,f as ne,h as se,i as ie,j as ue}from"./app-duU6O0cq.js";import"./request-8jI_GZey.js";const ce=D=>{var m;(m=document.getElementById(D))==null||m.scrollIntoView({behavior:"smooth"})},re={class:"__container_app_config"},de={style:{float:"right"}},fe={style:{float:"right"}},pe=X({__name:"config",setup(D){const m=Y(),A=[{key:"key",title:"label"},{key:"condition",title:"condition"},{key:"value",title:"value"},{key:"operation",title:"操作"}];let r=Z({list:[{title:"applicationDomain.operatorLog",key:"log",form:{logFlag:!1},submit:e=>new Promise(a=>{a(N(e==null?void 0:e.logFlag))}),reset(e){e.logFlag=!1}},{title:"applicationDomain.flowWeight",key:"flow",ext:{title:"添加权重配置",fun(e){V(),ee(()=>{var t;const a=((t=r.list.find(n=>n.key==="flow"))==null?void 0:t.form.rules.length)-1;a>=0&&ce("flowWeight"+a)})}},form:{rules:[{weight:10,scope:[]}]},submit(e){return new Promise(a=>{a(O())})},reset(){x()}},{title:"applicationDomain.gray",key:"gray",ext:{title:"添加灰度环境",fun(){M()}},form:{rules:[{name:"env-nam",scope:{key:"env",value:{exact:"gray"}}}]},submit(e){return new Promise(a=>{a(K())})},reset(){F()}}],current:[0]});const G=async()=>{var a;const e=await ue((a=m.params)==null?void 0:a.pathId);console.log(e),(e==null?void 0:e.code)==200&&r.list.forEach(t=>{if(t.key==="log"){t.form.logFlag=e.data.operatorLog;return}})},N=async e=>{var t;const a=await oe((t=m.params)==null?void 0:t.pathId,e);console.log(a),(a==null?void 0:a.code)==200&&await G()},x=async()=>{var a;const e=await le((a=m.params)==null?void 0:a.pathId);(e==null?void 0:e.code)==200&&r.list.forEach(t=>{t.key==="flow"&&(t.form.rules=JSON.parse(JSON.stringify(e.data.flowWeightSets)),t.form.rules.forEach(n=>{n.scope.forEach(s=>{s.label=s.key,s.condition=s.value?Object.keys(s.value)[0]:"",s.value=s.value?Object.values(s.value)[0]:""})}))})},O=async()=>{var t;let e=[];r.list.forEach(n=>{n.key==="flow"&&n.form.rules.forEach(s=>{let i={weight:s.weight,scope:[]};s.scope.forEach(b=>{const{key:v,value:E,condition:h}=b;let y={key:b.label||v,value:{}};h&&(y.value[h]=E),i.scope.push(y)}),e.push(i)})}),(await ne((t=m.params)==null?void 0:t.pathId,e)).code===200&&await x()},V=()=>{r.list.forEach(e=>{e.key==="flow"&&e.form.rules.push({weight:10,scope:[{key:"",condition:"",value:""}]})})},z=e=>{r.list.forEach(a=>{a.key==="flow"&&a.form.rules.splice(e,1)})},B=e=>{r.list.forEach(a=>{if(a.key==="flow"){let t={key:"",condition:"",value:""};a.form.rules[e].scope.push(t);return}})},P=(e,a)=>{r.list.forEach(t=>{t.key==="flow"&&t.form.rules[e].scope.splice(a,1)})},J=[{key:"label",title:"label",dataIndex:"label"},{key:"condition",title:"condition",dataIndex:"condition"},{key:"value",title:"value",dataIndex:"value"},{key:"operation",title:"operation",dataIndex:"operation"}],F=async()=>{var a;const e=await se((a=m.params)==null?void 0:a.pathId);(e==null?void 0:e.code)==200&&r.list.forEach(t=>{if(t.key==="gray"){const n=e.data.graySets;n.length>0&&n.forEach(s=>{s.scope.forEach(i=>{i.label=i.key,i.condition=i.value?Object.keys(i.value)[0]:"",i.value=i.value?Object.values(i.value)[0]:""})}),t.form.rules=n}})},K=async()=>{var t;let e=[];r.list.forEach(n=>{n.key==="gray"&&n.form.rules.forEach(s=>{let i={name:s.name,scope:[]};s.scope.forEach(b=>{const{key:v,value:E,condition:h}=b;let y={key:b.label,value:{}};h&&(y.value[h]=E),i.scope.push(y)}),e.push(i)})}),(await ie((t=m.params)==null?void 0:t.pathId,e)).code===200&&await F()},M=()=>{r.list.forEach(e=>{e.key==="gray"&&e.form.rules.push({name:"",scope:[{key:"",condition:"",value:""}]})})},Q=e=>{r.list.forEach(a=>{if(a.key==="gray"){let t={key:"",condition:"",value:""};a.form.rules[e].scope.push(t);return}})},R=(e,a)=>{r.list.forEach(t=>{t.key==="gray"&&t.form.rules[e].scope.splice(a,1)})},q=e=>{r.list.forEach(a=>{a.key==="gray"&&a.form.rules.splice(e,1)})};return ae(()=>{G(),x(),F()}),(e,a)=>{const t=_("a-switch"),n=_("a-form-item"),s=_("a-button"),i=_("a-space"),b=_("a-input-number"),v=_("a-input"),E=_("a-table"),h=_("a-card");return p(),W("div",re,[l(H,{options:I(r)},{form_log:o(({current:y})=>[l(n,{label:e.$t("applicationDomain.operatorLog"),name:"logFlag"},{default:o(()=>[l(t,{checked:y.form.logFlag,"onUpdate:checked":k=>y.form.logFlag=k},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"])]),form_flow:o(({current:y})=>[l(i,{direction:"vertical",size:"middle",class:"flowWeight-box"},{default:o(()=>[(p(!0),W(T,null,$(y.form.rules,(k,u)=>(p(),g(h,{id:"flowWeight"+u},{title:o(()=>[C(U(e.$t("applicationDomain.flowWeight"))+" "+U(u+1)+" ",1),L("div",de,[l(i,null,{default:o(()=>[l(s,{danger:"",type:"dashed",onClick:c=>z(u)},{default:o(()=>[l(I(j),{style:{"font-size":"20px"},icon:"fluent:delete-12-filled"})]),_:2},1032,["onClick"])]),_:2},1024)])]),default:o(()=>[l(n,{name:"rules["+u+"].weight",label:"权重"},{default:o(()=>[l(b,{min:"1",value:k.weight,"onUpdate:value":c=>k.weight=c},null,8,["value","onUpdate:value"])]),_:2},1032,["name"]),l(n,{label:"作用范围"},{default:o(()=>[l(s,{type:"primary",onClick:c=>B(u)},{default:o(()=>[C(" 添加")]),_:2},1032,["onClick"]),l(E,{style:{width:"40vw"},pagination:!1,columns:A,"data-source":k.scope},{bodyCell:o(({column:c,record:d,index:S})=>[c.key==="key"?(p(),g(n,{key:0,name:"rules["+u+"].scope.key"},{default:o(()=>[l(v,{value:d.key,"onUpdate:value":f=>d.key=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="condition"?(p(),g(n,{key:1,name:"rules["+u+"].scope.condition"},{default:o(()=>[l(v,{value:d.condition,"onUpdate:value":f=>d.condition=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="value"?(p(),g(n,{key:2,name:"rules["+u+"].scope.value"},{default:o(()=>[l(v,{value:d.value,"onUpdate:value":f=>d.value=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="operation"?(p(),g(n,{key:3,name:"rules["+u+"].scope.operation"},{default:o(()=>[l(s,{type:"link",onClick:f=>P(u,S)},{default:o(()=>[C(" 删除")]),_:2},1032,["onClick"])]),_:2},1032,["name"])):w("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1032,["id"]))),256))]),_:2},1024)]),form_gray:o(({current:y})=>[l(i,{direction:"vertical",size:"middle"},{default:o(()=>[(p(!0),W(T,null,$(y.form.rules,(k,u)=>(p(),g(h,null,{title:o(()=>[C(U(e.$t("applicationDomain.gray"))+" "+U(u+1)+" ",1),L("div",fe,[l(i,null,{default:o(()=>[l(s,{danger:"",type:"dashed",onClick:c=>q(u)},{default:o(()=>[l(I(j),{style:{"font-size":"20px"},icon:"fluent:delete-12-filled"})]),_:2},1032,["onClick"])]),_:2},1024)])]),default:o(()=>[l(n,{name:"rules["+u+"].name",label:"环境名称"},{default:o(()=>[l(v,{value:k.name,"onUpdate:value":c=>k.name=c},null,8,["value","onUpdate:value"])]),_:2},1032,["name"]),l(n,{label:"作用范围"},{default:o(()=>[l(i,{direction:"vertical",size:"middle"},{default:o(()=>[l(s,{type:"primary",onClick:c=>Q(u)},{default:o(()=>[C(" 添加")]),_:2},1032,["onClick"]),l(E,{style:{width:"40vw"},pagination:!1,columns:J,"data-source":k.scope},{bodyCell:o(({column:c,record:d,index:S})=>[c.key==="label"?(p(),g(n,{key:0,name:"rules["+u+"].scope.key"},{default:o(()=>[l(v,{value:d.label,"onUpdate:value":f=>d.label=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="condition"?(p(),g(n,{key:1,name:"rules["+u+"].scope.condition"},{default:o(()=>[l(v,{value:d.condition,"onUpdate:value":f=>d.condition=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="value"?(p(),g(n,{key:2,name:"rules["+u+"].scope.value"},{default:o(()=>[l(v,{value:d.value,"onUpdate:value":f=>d.value=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="operation"?(p(),g(n,{key:3,name:"rules["+u+"].scope.operation"},{default:o(()=>[l(s,{type:"link",onClick:f=>R(u,S)},{default:o(()=>[C(" 删除")]),_:2},1032,["onClick"])]),_:2},1032,["name"])):w("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),256))]),_:2},1024)]),_:1},8,["options"])])}}}),ke=te(pe,[["__scopeId","data-v-2bf9591a"]]);export{ke as default}; diff --git a/app/dubbo-ui/dist/admin/assets/config-iPQQ4Osw.js b/app/dubbo-ui/dist/admin/assets/config-iPQQ4Osw.js new file mode 100644 index 000000000..59454ecd1 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/config-iPQQ4Osw.js @@ -0,0 +1 @@ +import{C as Q}from"./ConfigPage-Onvd_SY6.js";import{d as X,a as Y,r as Z,a4 as ee,D as ae,c as I,b as l,w as o,n as W,e as _,o as p,L,M as $,J as g,f as C,t as U,j as G,I as j,T as w,_ as te}from"./index-3zDsduUv.js";import{u as oe,e as le,f as ne,h as se,i as ie,j as ue}from"./app-mdoSebGq.js";import"./request-3an337VF.js";const ce=D=>{var m;(m=document.getElementById(D))==null||m.scrollIntoView({behavior:"smooth"})},re={class:"__container_app_config"},de={style:{float:"right"}},fe={style:{float:"right"}},pe=X({__name:"config",setup(D){const m=Y(),A=[{key:"key",title:"label"},{key:"condition",title:"condition"},{key:"value",title:"value"},{key:"operation",title:"操作"}];let r=Z({list:[{title:"applicationDomain.operatorLog",key:"log",form:{logFlag:!1},submit:e=>new Promise(a=>{a(N(e==null?void 0:e.logFlag))}),reset(e){e.logFlag=!1}},{title:"applicationDomain.flowWeight",key:"flow",ext:{title:"添加权重配置",fun(e){V(),ee(()=>{var t;const a=((t=r.list.find(n=>n.key==="flow"))==null?void 0:t.form.rules.length)-1;a>=0&&ce("flowWeight"+a)})}},form:{rules:[{weight:10,scope:[]}]},submit(e){return new Promise(a=>{a(O())})},reset(){x()}},{title:"applicationDomain.gray",key:"gray",ext:{title:"添加灰度环境",fun(){R()}},form:{rules:[{name:"env-nam",scope:{key:"env",value:{exact:"gray"}}}]},submit(e){return new Promise(a=>{a(M())})},reset(){F()}}],current:[0]});const T=async()=>{var a;const e=await ue((a=m.params)==null?void 0:a.pathId);console.log(e),(e==null?void 0:e.code)==200&&r.list.forEach(t=>{if(t.key==="log"){t.form.logFlag=e.data.operatorLog;return}})},N=async e=>{var t;const a=await oe((t=m.params)==null?void 0:t.pathId,e);console.log(a),(a==null?void 0:a.code)==200&&await T()},x=async()=>{var a;const e=await le((a=m.params)==null?void 0:a.pathId);(e==null?void 0:e.code)==200&&r.list.forEach(t=>{t.key==="flow"&&(t.form.rules=JSON.parse(JSON.stringify(e.data.flowWeightSets)),t.form.rules.forEach(n=>{n.scope.forEach(s=>{s.label=s.key,s.condition=s.value?Object.keys(s.value)[0]:"",s.value=s.value?Object.values(s.value)[0]:""})}))})},O=async()=>{var t;let e=[];r.list.forEach(n=>{n.key==="flow"&&n.form.rules.forEach(s=>{let i={weight:s.weight,scope:[]};s.scope.forEach(b=>{const{key:v,value:E,condition:h}=b;let y={key:b.label||v,value:{}};h&&(y.value[h]=E),i.scope.push(y)}),e.push(i)})}),(await ne((t=m.params)==null?void 0:t.pathId,e)).code===200&&await x()},V=()=>{r.list.forEach(e=>{e.key==="flow"&&e.form.rules.push({weight:10,scope:[{key:"",condition:"",value:""}]})})},z=e=>{r.list.forEach(a=>{a.key==="flow"&&a.form.rules.splice(e,1)})},B=e=>{r.list.forEach(a=>{if(a.key==="flow"){let t={key:"",condition:"",value:""};a.form.rules[e].scope.push(t);return}})},P=(e,a)=>{r.list.forEach(t=>{t.key==="flow"&&t.form.rules[e].scope.splice(a,1)})},J=[{key:"label",title:"label",dataIndex:"label"},{key:"condition",title:"condition",dataIndex:"condition"},{key:"value",title:"value",dataIndex:"value"},{key:"operation",title:"operation",dataIndex:"operation"}],F=async()=>{var a;const e=await se((a=m.params)==null?void 0:a.pathId);(e==null?void 0:e.code)==200&&r.list.forEach(t=>{if(t.key==="gray"){const n=e.data.graySets;n.length>0&&n.forEach(s=>{s.scope.forEach(i=>{i.label=i.key,i.condition=i.value?Object.keys(i.value)[0]:"",i.value=i.value?Object.values(i.value)[0]:""})}),t.form.rules=n}})},M=async()=>{var t;let e=[];r.list.forEach(n=>{n.key==="gray"&&n.form.rules.forEach(s=>{let i={name:s.name,scope:[]};s.scope.forEach(b=>{const{key:v,value:E,condition:h}=b;let y={key:b.label,value:{}};h&&(y.value[h]=E),i.scope.push(y)}),e.push(i)})}),(await ie((t=m.params)==null?void 0:t.pathId,e)).code===200&&await F()},R=()=>{r.list.forEach(e=>{e.key==="gray"&&e.form.rules.push({name:"",scope:[{key:"",condition:"",value:""}]})})},q=e=>{r.list.forEach(a=>{if(a.key==="gray"){let t={key:"",condition:"",value:""};a.form.rules[e].scope.push(t);return}})},H=(e,a)=>{r.list.forEach(t=>{t.key==="gray"&&t.form.rules[e].scope.splice(a,1)})},K=e=>{r.list.forEach(a=>{a.key==="gray"&&a.form.rules.splice(e,1)})};return ae(()=>{T(),x(),F()}),(e,a)=>{const t=_("a-switch"),n=_("a-form-item"),s=_("a-button"),i=_("a-space"),b=_("a-input-number"),v=_("a-input"),E=_("a-table"),h=_("a-card");return p(),I("div",re,[l(Q,{options:W(r)},{form_log:o(({current:y})=>[l(n,{label:e.$t("applicationDomain.operatorLog"),name:"logFlag"},{default:o(()=>[l(t,{checked:y.form.logFlag,"onUpdate:checked":k=>y.form.logFlag=k},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"])]),form_flow:o(({current:y})=>[l(i,{direction:"vertical",size:"middle",class:"flowWeight-box"},{default:o(()=>[(p(!0),I(L,null,$(y.form.rules,(k,u)=>(p(),g(h,{id:"flowWeight"+u},{title:o(()=>[C(U(e.$t("applicationDomain.flowWeight"))+" "+U(u+1)+" ",1),G("div",de,[l(i,null,{default:o(()=>[l(s,{danger:"",type:"dashed",onClick:c=>z(u)},{default:o(()=>[l(W(j),{style:{"font-size":"20px"},icon:"fluent:delete-12-filled"})]),_:2},1032,["onClick"])]),_:2},1024)])]),default:o(()=>[l(n,{name:"rules["+u+"].weight",label:"权重"},{default:o(()=>[l(b,{min:"1",value:k.weight,"onUpdate:value":c=>k.weight=c},null,8,["value","onUpdate:value"])]),_:2},1032,["name"]),l(n,{label:"作用范围"},{default:o(()=>[l(s,{type:"primary",onClick:c=>B(u)},{default:o(()=>[C(" 添加")]),_:2},1032,["onClick"]),l(E,{style:{width:"40vw"},pagination:!1,columns:A,"data-source":k.scope},{bodyCell:o(({column:c,record:d,index:S})=>[c.key==="key"?(p(),g(n,{key:0,name:"rules["+u+"].scope.key"},{default:o(()=>[l(v,{value:d.key,"onUpdate:value":f=>d.key=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="condition"?(p(),g(n,{key:1,name:"rules["+u+"].scope.condition"},{default:o(()=>[l(v,{value:d.condition,"onUpdate:value":f=>d.condition=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="value"?(p(),g(n,{key:2,name:"rules["+u+"].scope.value"},{default:o(()=>[l(v,{value:d.value,"onUpdate:value":f=>d.value=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="operation"?(p(),g(n,{key:3,name:"rules["+u+"].scope.operation"},{default:o(()=>[l(s,{type:"link",onClick:f=>P(u,S)},{default:o(()=>[C(" 删除")]),_:2},1032,["onClick"])]),_:2},1032,["name"])):w("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1032,["id"]))),256))]),_:2},1024)]),form_gray:o(({current:y})=>[l(i,{direction:"vertical",size:"middle"},{default:o(()=>[(p(!0),I(L,null,$(y.form.rules,(k,u)=>(p(),g(h,null,{title:o(()=>[C(U(e.$t("applicationDomain.gray"))+" "+U(u+1)+" ",1),G("div",fe,[l(i,null,{default:o(()=>[l(s,{danger:"",type:"dashed",onClick:c=>K(u)},{default:o(()=>[l(W(j),{style:{"font-size":"20px"},icon:"fluent:delete-12-filled"})]),_:2},1032,["onClick"])]),_:2},1024)])]),default:o(()=>[l(n,{name:"rules["+u+"].name",label:"环境名称"},{default:o(()=>[l(v,{value:k.name,"onUpdate:value":c=>k.name=c},null,8,["value","onUpdate:value"])]),_:2},1032,["name"]),l(n,{label:"作用范围"},{default:o(()=>[l(i,{direction:"vertical",size:"middle"},{default:o(()=>[l(s,{type:"primary",onClick:c=>q(u)},{default:o(()=>[C(" 添加")]),_:2},1032,["onClick"]),l(E,{style:{width:"40vw"},pagination:!1,columns:J,"data-source":k.scope},{bodyCell:o(({column:c,record:d,index:S})=>[c.key==="label"?(p(),g(n,{key:0,name:"rules["+u+"].scope.key"},{default:o(()=>[l(v,{value:d.label,"onUpdate:value":f=>d.label=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="condition"?(p(),g(n,{key:1,name:"rules["+u+"].scope.condition"},{default:o(()=>[l(v,{value:d.condition,"onUpdate:value":f=>d.condition=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="value"?(p(),g(n,{key:2,name:"rules["+u+"].scope.value"},{default:o(()=>[l(v,{value:d.value,"onUpdate:value":f=>d.value=f},null,8,["value","onUpdate:value"])]),_:2},1032,["name"])):w("",!0),c.key==="operation"?(p(),g(n,{key:3,name:"rules["+u+"].scope.operation"},{default:o(()=>[l(s,{type:"link",onClick:f=>H(u,S)},{default:o(()=>[C(" 删除")]),_:2},1032,["onClick"])]),_:2},1032,["name"])):w("",!0)]),_:2},1032,["data-source"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),256))]),_:2},1024)]),_:1},8,["options"])])}}}),ke=te(pe,[["__scopeId","data-v-2bf9591a"]]);export{ke as default}; diff --git a/app/dubbo-ui/dist/admin/assets/configuration-c8iwuhKj.js b/app/dubbo-ui/dist/admin/assets/configuration-um3mt9hU.js similarity index 82% rename from app/dubbo-ui/dist/admin/assets/configuration-c8iwuhKj.js rename to app/dubbo-ui/dist/admin/assets/configuration-um3mt9hU.js index 4d59e4d24..9845420d3 100644 --- a/app/dubbo-ui/dist/admin/assets/configuration-c8iwuhKj.js +++ b/app/dubbo-ui/dist/admin/assets/configuration-um3mt9hU.js @@ -1 +1 @@ -import{C as w}from"./ConfigPage--FZz2L2D.js";import{d as _,a as h,r as u,W as b,c as I,b as c,w as l,n as D,e as d,o as k,_ as F}from"./index-hmLAZQYT.js";import{u as y,c as S,d as L,e as P}from"./instance-9-P3Wy8N.js";import"./request-8jI_GZey.js";const C={class:"__container_ins_config"},N=_({__name:"configuration",setup(v){const s=h();let i=u({list:[{title:"instanceDomain.operatorLog",key:"log",form:{logFlag:!1},submit:a=>new Promise(e=>{e(p(a==null?void 0:a.logFlag))}),reset(a){a.logFlag=!1}},{title:"instanceDomain.flowDisabled",form:{flowDisabledFlag:!1},key:"flowDisabled",submit:a=>new Promise(e=>{e(m(a==null?void 0:a.flowDisabledFlag))}),reset(a){a.logFlag=!1}}],current:[0]});const f=async()=>{var e,o;const a=await L((e=s.params)==null?void 0:e.pathId,(o=s.params)==null?void 0:o.appName);(a==null?void 0:a.code)==200&&i.list.forEach(t=>{if(t.key==="log"){t.form.logFlag=a.data.operatorLog;return}})},p=async a=>{var o,t;const e=await y((o=s.params)==null?void 0:o.pathId,(t=s.params)==null?void 0:t.appName,a);(e==null?void 0:e.code)==200&&await f()},g=async()=>{var e,o;const a=await P((e=s.params)==null?void 0:e.pathId,(o=s.params)==null?void 0:o.appName);(a==null?void 0:a.code)==200&&i.list.forEach(t=>{t.key==="flowDisabled"&&(t.form.flowDisabledFlag=a.data.trafficDisable)})},m=async a=>{var o,t;const e=await S((o=s.params)==null?void 0:o.pathId,(t=s.params)==null?void 0:t.appName,a);console.log(e)};return b(()=>{console.log(333),f(),g()}),(a,e)=>{const o=d("a-switch"),t=d("a-form-item");return k(),I("div",C,[c(w,{options:D(i)},{form_log:l(({current:n})=>[c(t,{label:a.$t("instanceDomain.operatorLog"),name:"logFlag"},{default:l(()=>[c(o,{checked:n.form.logFlag,"onUpdate:checked":r=>n.form.logFlag=r},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"])]),form_flowDisabled:l(({current:n})=>[c(t,{label:a.$t("instanceDomain.flowDisabled"),name:"flowDisabledFlag"},{default:l(()=>[c(o,{checked:n.form.flowDisabledFlag,"onUpdate:checked":r=>n.form.flowDisabledFlag=r},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"])]),_:1},8,["options"])])}}}),x=F(N,[["__scopeId","data-v-452f673d"]]);export{x as default}; +import{C as w}from"./ConfigPage-Onvd_SY6.js";import{d as _,a as h,r as u,D as b,c as D,b as c,w as l,n as I,e as d,o as k,_ as F}from"./index-3zDsduUv.js";import{u as y,c as S,d as L,e as P}from"./instance-qriYfOrq.js";import"./request-3an337VF.js";const C={class:"__container_ins_config"},N=_({__name:"configuration",setup(v){const s=h();let i=u({list:[{title:"instanceDomain.operatorLog",key:"log",form:{logFlag:!1},submit:a=>new Promise(e=>{e(p(a==null?void 0:a.logFlag))}),reset(a){a.logFlag=!1}},{title:"instanceDomain.flowDisabled",form:{flowDisabledFlag:!1},key:"flowDisabled",submit:a=>new Promise(e=>{e(m(a==null?void 0:a.flowDisabledFlag))}),reset(a){a.logFlag=!1}}],current:[0]});const f=async()=>{var e,o;const a=await L((e=s.params)==null?void 0:e.pathId,(o=s.params)==null?void 0:o.appName);(a==null?void 0:a.code)==200&&i.list.forEach(t=>{if(t.key==="log"){t.form.logFlag=a.data.operatorLog;return}})},p=async a=>{var o,t;const e=await y((o=s.params)==null?void 0:o.pathId,(t=s.params)==null?void 0:t.appName,a);(e==null?void 0:e.code)==200&&await f()},g=async()=>{var e,o;const a=await P((e=s.params)==null?void 0:e.pathId,(o=s.params)==null?void 0:o.appName);(a==null?void 0:a.code)==200&&i.list.forEach(t=>{t.key==="flowDisabled"&&(t.form.flowDisabledFlag=a.data.trafficDisable)})},m=async a=>{var o,t;const e=await S((o=s.params)==null?void 0:o.pathId,(t=s.params)==null?void 0:t.appName,a);console.log(e)};return b(()=>{console.log(333),f(),g()}),(a,e)=>{const o=d("a-switch"),t=d("a-form-item");return k(),D("div",C,[c(w,{options:I(i)},{form_log:l(({current:n})=>[c(t,{label:a.$t("instanceDomain.operatorLog"),name:"logFlag"},{default:l(()=>[c(o,{checked:n.form.logFlag,"onUpdate:checked":r=>n.form.logFlag=r},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"])]),form_flowDisabled:l(({current:n})=>[c(t,{label:a.$t("instanceDomain.flowDisabled"),name:"flowDisabledFlag"},{default:l(()=>[c(o,{checked:n.form.flowDisabledFlag,"onUpdate:checked":r=>n.form.flowDisabledFlag=r},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"])]),_:1},8,["options"])])}}}),x=F(N,[["__scopeId","data-v-452f673d"]]);export{x as default}; diff --git a/app/dubbo-ui/dist/admin/assets/cssMode-3d_RQH6d.js b/app/dubbo-ui/dist/admin/assets/cssMode-RYNyR8Bq.js similarity index 99% rename from app/dubbo-ui/dist/admin/assets/cssMode-3d_RQH6d.js rename to app/dubbo-ui/dist/admin/assets/cssMode-RYNyR8Bq.js index e4e4a69d4..1418b69ed 100644 --- a/app/dubbo-ui/dist/admin/assets/cssMode-3d_RQH6d.js +++ b/app/dubbo-ui/dist/admin/assets/cssMode-RYNyR8Bq.js @@ -1,4 +1,4 @@ -import{m as tt}from"./js-yaml-8Gkz3BRW.js";import"./index-hmLAZQYT.js";/*!----------------------------------------------------------------------------- +import{m as tt}from"./js-yaml-eElisXzH.js";import"./index-3zDsduUv.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1) * Released under the MIT license diff --git a/app/dubbo-ui/dist/admin/assets/detail-IPVQRAO3.js b/app/dubbo-ui/dist/admin/assets/detail-IPVQRAO3.js new file mode 100644 index 000000000..3470c3a84 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/detail-IPVQRAO3.js @@ -0,0 +1 @@ +import{u as H}from"./index-HdnVQEsT.js";import{d as K,a as Q,u as U,r as B,k as X,Z as x,D,c,b as o,w as t,e as n,o as u,j as y,f as r,t as a,n as b,a0 as h,J as k,T as P,L as V,M as A,m as ee,_ as oe}from"./index-3zDsduUv.js";import{g as te}from"./instance-qriYfOrq.js";import{f as M}from"./DateUtil-QXt7LnE3.js";import"./request-3an337VF.js";const le={class:"__container_instance_detail"},ae={class:"white_space"},se={class:"white_space"},re={class:"white_space"},pe=K({__name:"detail",setup(de){const S=Q(),j=U(),w=B({}),{appContext:{config:{globalProperties:E}}}=X();x("20");const e=B({});D(async()=>{const{appName:l,pathId:p}=S.params;let s={instanceName:l,instanceIP:p};w.detail=await te(s),Object.assign(e,w.detail.data)});const F=l=>{console.log("appName",l),j.push({path:"/resources/applications/detail/"+l})},J=H().toClipboard;function f(l){ee.success(E.$t("messageDomain.success.copy")),J(l)}const $=l=>l?"开启":"关闭";return(l,p)=>{const s=n("a-descriptions-item"),_=n("a-typography-paragraph"),C=n("a-descriptions"),m=n("a-card"),W=n("a-col"),Y=n("a-row"),v=n("a-typography-link"),Z=n("a-space"),q=n("a-tag"),z=n("a-card-grid"),G=n("a-flex");return u(),c("div",le,[o(G,null,{default:t(()=>[o(z,null,{default:t(()=>[o(Y,{gutter:10},{default:t(()=>[o(W,{span:12},{default:t(()=>[o(m,{class:"_detail"},{default:t(()=>[o(C,{class:"description-column",column:1},{default:t(()=>[o(s,{label:l.$t("instanceDomain.instanceName"),labelStyle:{fontWeight:"bold"}},{default:t(()=>{var d;return[y("p",{onClick:p[0]||(p[0]=i=>{var g;return f((g=b(S).params)==null?void 0:g.appName)}),class:"description-item-content with-card"},[r(a((d=b(S).params)==null?void 0:d.appName)+" ",1),o(b(h))])]}),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.creationTime_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,null,{default:t(()=>[r(a(b(M)(e==null?void 0:e.createTime)),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.deployState"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[(e==null?void 0:e.deployState)==="Running"?(u(),k(_,{key:0,type:"success"},{default:t(()=>[r(" Running ")]),_:1})):(u(),k(_,{key:1,type:"danger"},{default:t(()=>[r(" Stop")]),_:1}))]),_:1},8,["label"])]),_:1})]),_:1})]),_:1}),o(W,{span:12},{default:t(()=>[o(m,{class:"_detail",style:{height:"100%"}},{default:t(()=>[o(C,{class:"description-column",column:1},{default:t(()=>[o(s,{label:l.$t("instanceDomain.startTime_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,null,{default:t(()=>[r(a(b(M)(e==null?void 0:e.readyTime)),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.registerState"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,{type:(e==null?void 0:e.registerState)==="Registed"?"success":"danger"},{default:t(()=>[r(a(e==null?void 0:e.registerState),1)]),_:1},8,["type"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1}),o(m,{style:{"margin-top":"10px"},class:"_detail"},{default:t(()=>[o(C,{class:"description-column",column:1},{default:t(()=>[o(s,{label:l.$t("instanceDomain.instanceIP"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[y("p",{onClick:p[1]||(p[1]=d=>f(e==null?void 0:e.ip)),class:"description-item-content with-card"},[r(a(e==null?void 0:e.ip)+" ",1),o(b(h))])]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.deployCluster"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,null,{default:t(()=>[r(a(e==null?void 0:e.deployCluster),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.dubboPort"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[e!=null&&e.rpcPort?(u(),c("p",{key:0,onClick:p[2]||(p[2]=d=>f(e==null?void 0:e.rpcPort)),class:"description-item-content with-card"},[r(a(e==null?void 0:e.rpcPort)+" ",1),o(b(h))])):P("",!0)]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.registerCluster"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(Z,null,{default:t(()=>[(u(!0),c(V,null,A(e==null?void 0:e.registerClusters,d=>(u(),k(v,null,{default:t(()=>[r(a(d),1)]),_:2},1024))),256))]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.whichApplication"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(v,{onClick:p[3]||(p[3]=d=>F(e==null?void 0:e.appName))},{default:t(()=>[r(a(e==null?void 0:e.appName),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.node"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[e!=null&&e.node?(u(),c("p",{key:0,onClick:p[4]||(p[4]=d=>f(e==null?void 0:e.node)),class:"description-item-content with-card"},[r(a(e==null?void 0:e.node)+" ",1),o(b(h))])):P("",!0)]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.owningWorkload_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,null,{default:t(()=>[r(a(e==null?void 0:e.workloadName),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.instanceImage_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(m,{class:"description-item-card"},{default:t(()=>[e!=null&&e.image?(u(),c("p",{key:0,onClick:p[5]||(p[5]=d=>f(e==null?void 0:e.image)),class:"description-item-content with-card"},[r(a(e==null?void 0:e.image)+" ",1),o(b(h))])):P("",!0)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.instanceLabel"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(m,{class:"description-item-card"},{default:t(()=>[(u(!0),c(V,null,A(e==null?void 0:e.labels,(d,i)=>(u(),k(q,null,{default:t(()=>[r(a(i)+" : "+a(d),1)]),_:2},1024))),256))]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.healthExamination_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(m,{class:"description-item-card"},{default:t(()=>{var d,i,g,N,I,R,T,L,O;return[y("p",ae," 启动探针(StartupProbe):"+a($((d=e==null?void 0:e.probes)==null?void 0:d.startupProbe.open))+" 类型: "+a((i=e==null?void 0:e.probes)==null?void 0:i.startupProbe.type)+" 端口:"+a((g=e==null?void 0:e.probes)==null?void 0:g.startupProbe.port),1),y("p",se," 就绪探针(ReadinessProbe):"+a($((N=e==null?void 0:e.probes)==null?void 0:N.readinessProbe.open))+" 类型: "+a((I=e==null?void 0:e.probes)==null?void 0:I.readinessProbe.type)+" 端口:"+a((R=e==null?void 0:e.probes)==null?void 0:R.readinessProbe.port),1),y("p",re," 存活探针(LivenessProbe):"+a($((T=e==null?void 0:e.probes)==null?void 0:T.livenessProbe.open))+" 类型: "+a((L=e==null?void 0:e.probes)==null?void 0:L.livenessProbe.type)+" 端口:"+a((O=e==null?void 0:e.probes)==null?void 0:O.livenessProbe.port),1)]}),_:1})]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})])}}}),ce=oe(pe,[["__scopeId","data-v-fb65b5f4"]]);export{ce as default}; diff --git a/app/dubbo-ui/dist/admin/assets/detail-NWi5D_Jp.js b/app/dubbo-ui/dist/admin/assets/detail-NWi5D_Jp.js new file mode 100644 index 000000000..cc6009196 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/detail-NWi5D_Jp.js @@ -0,0 +1 @@ +import{d as L,a as O,r as I,k as T,Z as V,D as W,c as s,b as a,w as e,e as c,o,L as u,M as m,$ as P,J as b,f as S,t as h,n as y,a0 as A,m as j,a1 as $,_ as E}from"./index-3zDsduUv.js";import{g as F}from"./app-mdoSebGq.js";import{u as J}from"./index-HdnVQEsT.js";import"./request-3an337VF.js";const Y={class:"__container_app_detail"},Z={class:"description-item-content no-card"},q=["onClick"],z=L({__name:"detail",setup(G){const M=O(),C=I({}),{appContext:{config:{globalProperties:N}}}=T();V("20");let r=I({left:{},right:{},bottom:{}});W(async()=>{var i;let l=(i=M.params)==null?void 0:i.pathId;C.detail=await F({appName:l}),console.log(C.detail);let{appName:w,rpcProtocols:p,dubboVersions:_,dubboPorts:d,serialProtocols:f,appTypes:x,images:k,workloads:D,deployClusters:t,registerClusters:n,registerModes:g}=C.detail.data;r.left={appName:w,appTypes:x,serialProtocols:f},r.right={rpcProtocols:p,dubboPorts:d,dubboVersions:_},r.bottom={images:k,workloads:D,deployClusters:t,registerClusters:n,registerModes:g},console.log(w)});const R=J().toClipboard;function B(l){j.success(N.$t("messageDomain.success.copy")),R(l)}return(l,w)=>{const p=c("a-descriptions-item"),_=c("a-descriptions"),d=c("a-card"),f=c("a-col"),x=c("a-row"),k=c("a-card-grid"),D=c("a-flex");return o(),s("div",Y,[a(D,null,{default:e(()=>[a(k,null,{default:e(()=>[a(x,{gutter:10},{default:e(()=>[a(f,{span:12},{default:e(()=>[a(d,{class:"_detail"},{default:e(()=>[a(_,{class:"description-column",column:1},{default:e(()=>[(o(!0),s(u,null,m(y(r).left,(t,n,g)=>P((o(),b(p,{labelStyle:{fontWeight:"bold",width:"100px"},label:l.$t("applicationDomain."+n)},{default:e(()=>[S(h(typeof t=="object"?t[0]:t),1)]),_:2},1032,["label"])),[[$,!!t]])),256))]),_:1})]),_:1})]),_:1}),a(f,{span:12},{default:e(()=>[a(d,{class:"_detail"},{default:e(()=>[a(_,{class:"description-column",column:1},{default:e(()=>[(o(!0),s(u,null,m(y(r).right,(t,n,g)=>P((o(),b(p,{labelStyle:{fontWeight:"bold",width:"100px"},label:l.$t("applicationDomain."+n)},{default:e(()=>[S(h(t[0]),1)]),_:2},1032,["label"])),[[$,!!t]])),256))]),_:1})]),_:1})]),_:1})]),_:1}),a(d,{style:{"margin-top":"10px"},class:"_detail"},{default:e(()=>[a(_,{class:"description-column",column:1},{default:e(()=>[(o(!0),s(u,null,m(y(r).bottom,(t,n,g)=>P((o(),b(p,{labelStyle:{fontWeight:"bold"},label:l.$t("applicationDomain."+n)},{default:e(()=>[(t==null?void 0:t.length)<3?(o(!0),s(u,{key:0},m(t,i=>(o(),s("p",Z,h(i),1))),256)):(o(),b(d,{key:1,class:"description-item-card"},{default:e(()=>[(o(!0),s(u,null,m(t,i=>(o(),s("p",{onClick:H=>B(i.toString()),class:"description-item-content with-card"},[S(h(i)+" ",1),a(y(A))],8,q))),256))]),_:2},1024))]),_:2},1032,["label"])),[[$,!!t]])),256))]),_:1})]),_:1})]),_:1})]),_:1})])}}}),v=E(z,[["__scopeId","data-v-2ded24e2"]]);export{v as default}; diff --git a/app/dubbo-ui/dist/admin/assets/detail-ZfcGZsJx.js b/app/dubbo-ui/dist/admin/assets/detail-ZfcGZsJx.js deleted file mode 100644 index df9699c04..000000000 --- a/app/dubbo-ui/dist/admin/assets/detail-ZfcGZsJx.js +++ /dev/null @@ -1 +0,0 @@ -import{u as z}from"./index-Va7nxJVK.js";import{d as H,a as U,u as X,r as L,k as Z,Y as x,W as D,c,b as o,w as t,e as n,o as u,j as y,f as r,t as a,n as b,$ as h,G as k,Q as P,J as V,K as A,m as ee,_ as oe}from"./index-hmLAZQYT.js";import{g as te}from"./instance-9-P3Wy8N.js";import{f as j}from"./DateUtil-BI1mUH_z.js";import"./request-8jI_GZey.js";const le={class:"__container_instance_detail"},ae={class:"white_space"},se={class:"white_space"},re={class:"white_space"},pe=H({__name:"detail",setup(de){const S=U(),E=X(),W=L({}),{appContext:{config:{globalProperties:M}}}=Z();x("20");const e=L({});D(async()=>{const{appName:l,pathId:p}=S.params;let s={instanceName:l,instanceIP:p};W.detail=await te(s),Object.assign(e,W.detail.data)});const Y=l=>{console.log("appName",l),E.push({path:"/resources/applications/detail/"+l})},F=z().toClipboard;function f(l){ee.success(M.$t("messageDomain.success.copy")),F(l)}const $=l=>l?"开启":"关闭";return(l,p)=>{const s=n("a-descriptions-item"),_=n("a-typography-paragraph"),C=n("a-descriptions"),m=n("a-card"),w=n("a-col"),G=n("a-row"),v=n("a-typography-link"),J=n("a-space"),K=n("a-tag"),Q=n("a-card-grid"),q=n("a-flex");return u(),c("div",le,[o(q,null,{default:t(()=>[o(Q,null,{default:t(()=>[o(G,{gutter:10},{default:t(()=>[o(w,{span:12},{default:t(()=>[o(m,{class:"_detail"},{default:t(()=>[o(C,{class:"description-column",column:1},{default:t(()=>[o(s,{label:l.$t("instanceDomain.instanceName"),labelStyle:{fontWeight:"bold"}},{default:t(()=>{var d;return[y("p",{onClick:p[0]||(p[0]=i=>{var g;return f((g=b(S).params)==null?void 0:g.appName)}),class:"description-item-content with-card"},[r(a((d=b(S).params)==null?void 0:d.appName)+" ",1),o(b(h))])]}),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.creationTime_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,null,{default:t(()=>[r(a(b(j)(e==null?void 0:e.createTime)),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.deployState"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[(e==null?void 0:e.deployState)==="Running"?(u(),k(_,{key:0,type:"success"},{default:t(()=>[r(" Running ")]),_:1})):(u(),k(_,{key:1,type:"danger"},{default:t(()=>[r(" Stop")]),_:1}))]),_:1},8,["label"])]),_:1})]),_:1})]),_:1}),o(w,{span:12},{default:t(()=>[o(m,{class:"_detail",style:{height:"100%"}},{default:t(()=>[o(C,{class:"description-column",column:1},{default:t(()=>[o(s,{label:l.$t("instanceDomain.startTime_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,null,{default:t(()=>[r(a(b(j)(e==null?void 0:e.readyTime)),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.registerState"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,{type:(e==null?void 0:e.registerState)==="Registed"?"success":"danger"},{default:t(()=>[r(a(e==null?void 0:e.registerState),1)]),_:1},8,["type"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1}),o(m,{style:{"margin-top":"10px"},class:"_detail"},{default:t(()=>[o(C,{class:"description-column",column:1},{default:t(()=>[o(s,{label:l.$t("instanceDomain.instanceIP"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[y("p",{onClick:p[1]||(p[1]=d=>f(e==null?void 0:e.ip)),class:"description-item-content with-card"},[r(a(e==null?void 0:e.ip)+" ",1),o(b(h))])]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.deployCluster"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,null,{default:t(()=>[r(a(e==null?void 0:e.deployCluster),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.dubboPort"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[e!=null&&e.rpcPort?(u(),c("p",{key:0,onClick:p[2]||(p[2]=d=>f(e==null?void 0:e.rpcPort)),class:"description-item-content with-card"},[r(a(e==null?void 0:e.rpcPort)+" ",1),o(b(h))])):P("",!0)]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.registerCluster"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(J,null,{default:t(()=>[(u(!0),c(V,null,A(e==null?void 0:e.registerClusters,d=>(u(),k(v,null,{default:t(()=>[r(a(d),1)]),_:2},1024))),256))]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.whichApplication"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(v,{onClick:p[3]||(p[3]=d=>Y(e==null?void 0:e.appName))},{default:t(()=>[r(a(e==null?void 0:e.appName),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.node"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[e!=null&&e.node?(u(),c("p",{key:0,onClick:p[4]||(p[4]=d=>f(e==null?void 0:e.node)),class:"description-item-content with-card"},[r(a(e==null?void 0:e.node)+" ",1),o(b(h))])):P("",!0)]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.owningWorkload_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(_,null,{default:t(()=>[r(a(e==null?void 0:e.workloadName),1)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.instanceImage_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(m,{class:"description-item-card"},{default:t(()=>[e!=null&&e.image?(u(),c("p",{key:0,onClick:p[5]||(p[5]=d=>f(e==null?void 0:e.image)),class:"description-item-content with-card"},[r(a(e==null?void 0:e.image)+" ",1),o(b(h))])):P("",!0)]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.instanceLabel"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(m,{class:"description-item-card"},{default:t(()=>[(u(!0),c(V,null,A(e==null?void 0:e.labels,(d,i)=>(u(),k(K,null,{default:t(()=>[r(a(i)+" : "+a(d),1)]),_:2},1024))),256))]),_:1})]),_:1},8,["label"]),o(s,{label:l.$t("instanceDomain.healthExamination_k8s"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(m,{class:"description-item-card"},{default:t(()=>{var d,i,g,N,I,R,T,O,B;return[y("p",ae," 启动探针(StartupProbe):"+a($((d=e==null?void 0:e.probes)==null?void 0:d.startupProbe.open))+" 类型: "+a((i=e==null?void 0:e.probes)==null?void 0:i.startupProbe.type)+" 端口:"+a((g=e==null?void 0:e.probes)==null?void 0:g.startupProbe.port),1),y("p",se," 就绪探针(ReadinessProbe):"+a($((N=e==null?void 0:e.probes)==null?void 0:N.readinessProbe.open))+" 类型: "+a((I=e==null?void 0:e.probes)==null?void 0:I.readinessProbe.type)+" 端口:"+a((R=e==null?void 0:e.probes)==null?void 0:R.readinessProbe.port),1),y("p",re," 存活探针(LivenessProbe):"+a($((T=e==null?void 0:e.probes)==null?void 0:T.livenessProbe.open))+" 类型: "+a((O=e==null?void 0:e.probes)==null?void 0:O.livenessProbe.type)+" 端口:"+a((B=e==null?void 0:e.probes)==null?void 0:B.livenessProbe.port),1)]}),_:1})]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})])}}}),ce=oe(pe,[["__scopeId","data-v-fb65b5f4"]]);export{ce as default}; diff --git a/app/dubbo-ui/dist/admin/assets/detail-c9-keEBq.js b/app/dubbo-ui/dist/admin/assets/detail-c9-keEBq.js deleted file mode 100644 index 10e66268f..000000000 --- a/app/dubbo-ui/dist/admin/assets/detail-c9-keEBq.js +++ /dev/null @@ -1 +0,0 @@ -import{d as B,a as O,r as I,k as T,Y as V,W as A,c as s,b as a,w as e,e as c,o,J as u,K as m,Z as P,G as b,f as S,t as h,n as y,$ as L,m as Y,a0 as $,_ as j}from"./index-hmLAZQYT.js";import{g as E}from"./app-duU6O0cq.js";import{u as F}from"./index-Va7nxJVK.js";import"./request-8jI_GZey.js";const G={class:"__container_app_detail"},J={class:"description-item-content no-card"},K=["onClick"],Z=B({__name:"detail",setup(q){const N=O(),C=I({}),{appContext:{config:{globalProperties:M}}}=T();V("20");let r=I({left:{},right:{},bottom:{}});A(async()=>{var i;let l=(i=N.params)==null?void 0:i.pathId;C.detail=await E({appName:l}),console.log(C.detail);let{appName:w,rpcProtocols:p,dubboVersions:_,dubboPorts:d,serialProtocols:f,appTypes:x,images:k,workloads:D,deployClusters:t,registerClusters:n,registerModes:g}=C.detail.data;r.left={appName:w,appTypes:x,serialProtocols:f},r.right={rpcProtocols:p,dubboPorts:d,dubboVersions:_},r.bottom={images:k,workloads:D,deployClusters:t,registerClusters:n,registerModes:g},console.log(w)});const R=F().toClipboard;function W(l){Y.success(M.$t("messageDomain.success.copy")),R(l)}return(l,w)=>{const p=c("a-descriptions-item"),_=c("a-descriptions"),d=c("a-card"),f=c("a-col"),x=c("a-row"),k=c("a-card-grid"),D=c("a-flex");return o(),s("div",G,[a(D,null,{default:e(()=>[a(k,null,{default:e(()=>[a(x,{gutter:10},{default:e(()=>[a(f,{span:12},{default:e(()=>[a(d,{class:"_detail"},{default:e(()=>[a(_,{class:"description-column",column:1},{default:e(()=>[(o(!0),s(u,null,m(y(r).left,(t,n,g)=>P((o(),b(p,{labelStyle:{fontWeight:"bold",width:"100px"},label:l.$t("applicationDomain."+n)},{default:e(()=>[S(h(typeof t=="object"?t[0]:t),1)]),_:2},1032,["label"])),[[$,!!t]])),256))]),_:1})]),_:1})]),_:1}),a(f,{span:12},{default:e(()=>[a(d,{class:"_detail"},{default:e(()=>[a(_,{class:"description-column",column:1},{default:e(()=>[(o(!0),s(u,null,m(y(r).right,(t,n,g)=>P((o(),b(p,{labelStyle:{fontWeight:"bold",width:"100px"},label:l.$t("applicationDomain."+n)},{default:e(()=>[S(h(t[0]),1)]),_:2},1032,["label"])),[[$,!!t]])),256))]),_:1})]),_:1})]),_:1})]),_:1}),a(d,{style:{"margin-top":"10px"},class:"_detail"},{default:e(()=>[a(_,{class:"description-column",column:1},{default:e(()=>[(o(!0),s(u,null,m(y(r).bottom,(t,n,g)=>P((o(),b(p,{labelStyle:{fontWeight:"bold"},label:l.$t("applicationDomain."+n)},{default:e(()=>[(t==null?void 0:t.length)<3?(o(!0),s(u,{key:0},m(t,i=>(o(),s("p",J,h(i),1))),256)):(o(),b(d,{key:1,class:"description-item-card"},{default:e(()=>[(o(!0),s(u,null,m(t,i=>(o(),s("p",{onClick:z=>W(i.toString()),class:"description-item-content with-card"},[S(h(i)+" ",1),a(y(L))],8,K))),256))]),_:2},1024))]),_:2},1032,["label"])),[[$,!!t]])),256))]),_:1})]),_:1})]),_:1})]),_:1})])}}}),v=j(Z,[["__scopeId","data-v-2ded24e2"]]);export{v as default}; diff --git a/app/dubbo-ui/dist/admin/assets/distribution-WSPxFnjE.js b/app/dubbo-ui/dist/admin/assets/distribution-WSPxFnjE.js new file mode 100644 index 000000000..52c71661c --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/distribution-WSPxFnjE.js @@ -0,0 +1 @@ +import{d as $,v as E,u as L,a as U,k as j,B as g,r as x,H as F,c as f,b as s,w as p,e as d,n as r,P as O,o as v,f as m,j as A,I as R,t as b,T as h,L as G,J as H,_ as J}from"./index-3zDsduUv.js";import{g as M}from"./service-Hb3ldtV6.js";import{f as Y}from"./DateUtil-QXt7LnE3.js";import"./request-3an337VF.js";const q={class:"__container_services_tabs_distribution"},K=["onClick"],Q=["onClick"],W=$({__name:"distribution",setup(X){E(a=>({"70895fcd":r(O)}));const I=L(),C=U(),{appContext:{config:{globalProperties:S}}}=j(),y=g(""),z=x([{label:"不指定",value:""},{label:"version=1.0.0",value:"version=1.0.0"},{label:"group=group1",value:"group=group1"},{label:"version=1.0.0,group=group1",value:"version=1.0.0,group=group1"}]);g(z[0].value);const N=g("provider"),D=[{title:"应用名",dataIndex:"appName",width:"20%",customCell:(a,e)=>{const t=o.value[e].appName;return e===0||o.value[e-1].appName!==t?{rowSpan:o.value.filter(i=>i.appName===t).length}:{rowSpan:0}}},{title:"实例数",dataIndex:"instanceNum",width:"15%",customRender:({record:a})=>{const e=a.appName;return o.value.filter(l=>l.appName===e).length??0},customCell:(a,e)=>{const t=o.value[e].appName;return e===0||o.value[e-1].appName!==t?{rowSpan:o.value.filter(i=>i.appName===t).length}:{rowSpan:0}}},{title:"实例名",dataIndex:"instanceName",width:"25%",ellipsis:!0},{title:"RPC端口",dataIndex:"rpcPort",width:"8%"},{title:"超时时间",dataIndex:"timeOut",width:"10%"},{title:"重试次数",dataIndex:"retryNum",width:"10%"}],o=g([]),n=x({total:0,pageSize:10,current:1,pageOffset:0,showTotal:a=>S.$t("searchDomain.total")+": "+a+" "+S.$t("searchDomain.unit")}),w=async()=>{var l,i,_;let a={serviceName:(l=C.params)==null?void 0:l.pathId,side:N.value,version:((i=C.params)==null?void 0:i.version)||"",group:((_=C.params)==null?void 0:_.group)||"",pageOffset:n.pageOffset,pageSize:n.pageSize};const{data:{list:e,pageInfo:t}}=await M(a);o.value=e,n.total=t.Total};w();const k=F.debounce(w,300),P=a=>{n.pageSize=a.pageSize||10,n.current=a.current||1,n.pageOffset=(n.current-1)*n.pageSize,k()};return(a,e)=>{const t=d("a-radio-button"),l=d("a-radio-group"),i=d("a-input-search"),_=d("a-flex"),V=d("a-tag"),B=d("a-table");return v(),f("div",q,[s(_,{vertical:""},{default:p(()=>[s(_,{class:"service-filter"},{default:p(()=>[s(l,{value:N.value,"onUpdate:value":e[0]||(e[0]=u=>N.value=u),"button-style":"solid",onClick:r(k)},{default:p(()=>[s(t,{value:"provider"},{default:p(()=>[m("生产者")]),_:1}),s(t,{value:"consumer"},{default:p(()=>[m("消费者")]),_:1})]),_:1},8,["value","onClick"]),s(i,{value:y.value,"onUpdate:value":e[1]||(e[1]=u=>y.value=u),placeholder:"搜索应用,ip,支持前缀搜索",class:"service-filter-input",onSearch:r(k),"enter-button":""},null,8,["value","onSearch"])]),_:1}),s(B,{columns:D,"data-source":o.value,scroll:{y:"45vh"},pagination:n,onChange:P},{bodyCell:p(({column:u,text:c})=>[u.dataIndex==="appName"?(v(),f("span",{key:0,class:"link",onClick:T=>r(I).push("/resources/applications/detail/"+c)},[A("b",null,[s(r(R),{style:{"margin-bottom":"-2px"},icon:"material-symbols:attach-file-rounded"}),m(" "+b(c),1)])],8,K)):h("",!0),u.dataIndex==="instanceName"?(v(),f("span",{key:1,class:"link",onClick:T=>r(I).push("/resources/instances/detail/"+c)},[A("b",null,[s(r(R),{style:{"margin-bottom":"-2px"},icon:"material-symbols:attach-file-rounded"}),m(" "+b(c),1)])],8,Q)):h("",!0),u.dataIndex==="timeOut"?(v(),f(G,{key:2},[m(b(r(Y)(c)),1)],64)):h("",!0),u.dataIndex==="label"?(v(),H(V,{key:3,color:r(O)},{default:p(()=>[m(b(c),1)]),_:2},1032,["color"])):h("",!0)]),_:1},8,["data-source","pagination"])]),_:1})])}}}),oe=J(W,[["__scopeId","data-v-549fa778"]]);export{oe as default}; diff --git a/app/dubbo-ui/dist/admin/assets/distribution-rzJg55IY.js b/app/dubbo-ui/dist/admin/assets/distribution-rzJg55IY.js deleted file mode 100644 index 35734db2b..000000000 --- a/app/dubbo-ui/dist/admin/assets/distribution-rzJg55IY.js +++ /dev/null @@ -1 +0,0 @@ -import{d as $,v as E,u as F,a as G,k as U,z as g,r as x,F as j,c as f,b as s,w as p,e as d,n as r,P as O,o as v,f as m,j as A,I as z,t as b,Q as h,J,G as L,_ as M}from"./index-hmLAZQYT.js";import{g as Q}from"./service-HiIVI9X0.js";import{f as Y}from"./DateUtil-BI1mUH_z.js";import"./request-8jI_GZey.js";const q={class:"__container_services_tabs_distribution"},H=["onClick"],K=["onClick"],W=$({__name:"distribution",setup(X){E(a=>({"70895fcd":r(O)}));const I=F(),C=G(),{appContext:{config:{globalProperties:S}}}=U(),y=g(""),R=x([{label:"不指定",value:""},{label:"version=1.0.0",value:"version=1.0.0"},{label:"group=group1",value:"group=group1"},{label:"version=1.0.0,group=group1",value:"version=1.0.0,group=group1"}]);g(R[0].value);const N=g("provider"),D=[{title:"应用名",dataIndex:"appName",width:"20%",customCell:(a,e)=>{const t=o.value[e].appName;return e===0||o.value[e-1].appName!==t?{rowSpan:o.value.filter(i=>i.appName===t).length}:{rowSpan:0}}},{title:"实例数",dataIndex:"instanceNum",width:"15%",customRender:({record:a})=>{const e=a.appName;return o.value.filter(l=>l.appName===e).length??0},customCell:(a,e)=>{const t=o.value[e].appName;return e===0||o.value[e-1].appName!==t?{rowSpan:o.value.filter(i=>i.appName===t).length}:{rowSpan:0}}},{title:"实例名",dataIndex:"instanceName",width:"25%",ellipsis:!0},{title:"RPC端口",dataIndex:"rpcPort",width:"8%"},{title:"超时时间",dataIndex:"timeOut",width:"10%"},{title:"重试次数",dataIndex:"retryNum",width:"10%"}],o=g([]),n=x({total:0,pageSize:10,current:1,pageOffset:0,showTotal:a=>S.$t("searchDomain.total")+": "+a+" "+S.$t("searchDomain.unit")}),w=async()=>{var l,i,_;let a={serviceName:(l=C.params)==null?void 0:l.pathId,side:N.value,version:((i=C.params)==null?void 0:i.version)||"",group:((_=C.params)==null?void 0:_.group)||"",pageOffset:n.pageOffset,pageSize:n.pageSize};const{data:{list:e,pageInfo:t}}=await Q(a);o.value=e,n.total=t.Total};w();const k=j.debounce(w,300),P=a=>{n.pageSize=a.pageSize||10,n.current=a.current||1,n.pageOffset=(n.current-1)*n.pageSize,k()};return(a,e)=>{const t=d("a-radio-button"),l=d("a-radio-group"),i=d("a-input-search"),_=d("a-flex"),V=d("a-tag"),B=d("a-table");return v(),f("div",q,[s(_,{vertical:""},{default:p(()=>[s(_,{class:"service-filter"},{default:p(()=>[s(l,{value:N.value,"onUpdate:value":e[0]||(e[0]=u=>N.value=u),"button-style":"solid",onClick:r(k)},{default:p(()=>[s(t,{value:"provider"},{default:p(()=>[m("生产者")]),_:1}),s(t,{value:"consumer"},{default:p(()=>[m("消费者")]),_:1})]),_:1},8,["value","onClick"]),s(i,{value:y.value,"onUpdate:value":e[1]||(e[1]=u=>y.value=u),placeholder:"搜索应用,ip,支持前缀搜索",class:"service-filter-input",onSearch:r(k),"enter-button":""},null,8,["value","onSearch"])]),_:1}),s(B,{columns:D,"data-source":o.value,scroll:{y:"45vh"},pagination:n,onChange:P},{bodyCell:p(({column:u,text:c})=>[u.dataIndex==="appName"?(v(),f("span",{key:0,class:"link",onClick:T=>r(I).push("/resources/applications/detail/"+c)},[A("b",null,[s(r(z),{style:{"margin-bottom":"-2px"},icon:"material-symbols:attach-file-rounded"}),m(" "+b(c),1)])],8,H)):h("",!0),u.dataIndex==="instanceName"?(v(),f("span",{key:1,class:"link",onClick:T=>r(I).push("/resources/instances/detail/"+c)},[A("b",null,[s(r(z),{style:{"margin-bottom":"-2px"},icon:"material-symbols:attach-file-rounded"}),m(" "+b(c),1)])],8,K)):h("",!0),u.dataIndex==="timeOut"?(v(),f(J,{key:2},[m(b(r(Y)(c)),1)],64)):h("",!0),u.dataIndex==="label"?(v(),L(V,{key:3,color:r(O)},{default:p(()=>[m(b(c),1)]),_:2},1032,["color"])):h("",!0)]),_:1},8,["data-source","pagination"])]),_:1})])}}}),oe=M(W,[["__scopeId","data-v-549fa778"]]);export{oe as default}; diff --git a/app/dubbo-ui/dist/admin/assets/event-WVUl-Hrs.js b/app/dubbo-ui/dist/admin/assets/event-Di8PmXwq.js similarity index 60% rename from app/dubbo-ui/dist/admin/assets/event-WVUl-Hrs.js rename to app/dubbo-ui/dist/admin/assets/event-Di8PmXwq.js index a14424477..b21dc56fd 100644 --- a/app/dubbo-ui/dist/admin/assets/event-WVUl-Hrs.js +++ b/app/dubbo-ui/dist/admin/assets/event-Di8PmXwq.js @@ -1 +1 @@ -import{d as e,c as t,o as n}from"./index-hmLAZQYT.js";const s=e({__name:"event",setup(o){return(a,c)=>(n(),t("div",null,"event todo"))}});export{s as default}; +import{d as e,c as t,o as n}from"./index-3zDsduUv.js";const s=e({__name:"event",setup(o){return(a,c)=>(n(),t("div",null,"event todo"))}});export{s as default}; diff --git a/app/dubbo-ui/dist/admin/assets/event-PfSKfl9X.js b/app/dubbo-ui/dist/admin/assets/event-IjH1CTVp.js similarity index 76% rename from app/dubbo-ui/dist/admin/assets/event-PfSKfl9X.js rename to app/dubbo-ui/dist/admin/assets/event-IjH1CTVp.js index 36a0702b5..a8617739a 100644 --- a/app/dubbo-ui/dist/admin/assets/event-PfSKfl9X.js +++ b/app/dubbo-ui/dist/admin/assets/event-IjH1CTVp.js @@ -1 +1 @@ -import{b as s,A as b,d as C,c as d,w as a,e as r,o as p,n as u,J as M,K as S,P as y,f as x,t as _,j as f,p as P,h as w,_ as I}from"./index-hmLAZQYT.js";var j={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const z=j;function m(e){for(var t=1;t(P("data-v-9245080e"),e=e(),w(),e),D={class:"__container_services_tabs_event"},R={class:"description"},V=N(()=>f("span",null,"过期事件不会存储",-1)),E=C({__name:"event",setup(e){const t=[{time:"2022-01-01",description:"description"},{time:"2022-01-02",description:"description"},{time:"2022-01-03",description:"description"},{time:"2022-01-04",description:"description"},{time:"2022-01-05",description:"description"}];return(n,c)=>{const i=r("a-timeline-item"),v=r("a-tag"),O=r("a-timeline"),g=r("a-card");return p(),d("div",D,[s(g,{class:"timeline-container"},{default:a(()=>[s(O,{class:"timeline"},{default:a(()=>[s(i,null,{dot:a(()=>[s(u(B),{style:{"font-size":"18px"}})]),_:1}),(p(),d(M,null,S(t,(l,h)=>s(i,{key:h},{default:a(()=>[s(v,{class:"time",color:u(y)},{default:a(()=>[x(_(l.time),1)]),_:2},1032,["color"]),f("span",R,_(l.description),1)]),_:2},1024)),64)),s(i,null,{dot:a(()=>[]),default:a(()=>[V]),_:1})]),_:1})]),_:1})])}}}),$=I(E,[["__scopeId","data-v-9245080e"]]);export{$ as default}; +import{b as s,A as b,d as C,c as d,w as a,e as r,o as p,n as u,L as M,M as S,P as y,f as x,t as _,j as f,p as P,h as w,_ as I}from"./index-3zDsduUv.js";var j={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const z=j;function m(e){for(var t=1;t(P("data-v-9245080e"),e=e(),w(),e),D={class:"__container_services_tabs_event"},L={class:"description"},R=N(()=>f("span",null,"过期事件不会存储",-1)),V=C({__name:"event",setup(e){const t=[{time:"2022-01-01",description:"description"},{time:"2022-01-02",description:"description"},{time:"2022-01-03",description:"description"},{time:"2022-01-04",description:"description"},{time:"2022-01-05",description:"description"}];return(n,c)=>{const i=r("a-timeline-item"),v=r("a-tag"),O=r("a-timeline"),g=r("a-card");return p(),d("div",D,[s(g,{class:"timeline-container"},{default:a(()=>[s(O,{class:"timeline"},{default:a(()=>[s(i,null,{dot:a(()=>[s(u(B),{style:{"font-size":"18px"}})]),_:1}),(p(),d(M,null,S(t,(l,h)=>s(i,{key:h},{default:a(()=>[s(v,{class:"time",color:u(y)},{default:a(()=>[x(_(l.time),1)]),_:2},1032,["color"]),f("span",L,_(l.description),1)]),_:2},1024)),64)),s(i,null,{dot:a(()=>[]),default:a(()=>[R]),_:1})]),_:1})]),_:1})])}}}),$=I(V,[["__scopeId","data-v-9245080e"]]);export{$ as default}; diff --git a/app/dubbo-ui/dist/admin/assets/event-ZoLBaQpy.js b/app/dubbo-ui/dist/admin/assets/event-ZoLBaQpy.js new file mode 100644 index 000000000..06d6bf369 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/event-ZoLBaQpy.js @@ -0,0 +1 @@ +import{d as v,v as f,r as h,D as y,c as d,b as r,w as n,e as p,n as l,P as C,o as c,L as x,M as b,J as k,a5 as w,a6 as I,j as e,a7 as S,t as i,p as B,h as R,_ as g}from"./index-3zDsduUv.js";import{l as L}from"./app-mdoSebGq.js";import"./request-3an337VF.js";const M=t=>(B("data-v-e2aef936"),t=t(),R(),t),O={class:"__container_app_event"},V={class:"box"},z=M(()=>e("div",{class:"type"},null,-1)),A={class:"body"},D={class:"title"},E={class:"time"},N=v({__name:"event",setup(t){f(a=>({f166166e:l(C)}));let s=h({list:[]});return y(async()=>{let a=await L({});s.list=a.data.list,console.log(s)}),(a,P)=>{const m=p("a-timeline-item"),u=p("a-timeline");return c(),d("div",O,[r(u,{mode:"left"},{default:n(()=>[(c(!0),d(x,null,b(l(s).list,(o,_)=>(c(),k(m,null,w({default:n(()=>[e("div",V,[e("div",{class:S(["label",{yellow:_===0}])},[z,e("div",A,[e("b",D,i(o.type),1),e("p",null,i(o.desc),1)])],2),e("span",E,i(o.time),1)])]),_:2},[_===0?{name:"dot",fn:n(()=>[r(l(I),{style:{"font-size":"16px",color:"red"}})]),key:"0"}:void 0]),1024))),256))]),_:1})])}}}),Y=g(N,[["__scopeId","data-v-e2aef936"]]);export{Y as default}; diff --git a/app/dubbo-ui/dist/admin/assets/event-ympyACpm.js b/app/dubbo-ui/dist/admin/assets/event-ympyACpm.js deleted file mode 100644 index d627fc860..000000000 --- a/app/dubbo-ui/dist/admin/assets/event-ympyACpm.js +++ /dev/null @@ -1 +0,0 @@ -import{d as v,v as f,r as h,W as y,c as d,b as r,w as n,e as p,n as l,P as C,o as c,J as x,K as b,G as k,a4 as w,a5 as I,j as e,a6 as S,t as i,p as B,h as R,_ as g}from"./index-hmLAZQYT.js";import{l as O}from"./app-duU6O0cq.js";import"./request-8jI_GZey.js";const V=t=>(B("data-v-e2aef936"),t=t(),R(),t),z={class:"__container_app_event"},A={class:"box"},E=V(()=>e("div",{class:"type"},null,-1)),L={class:"body"},M={class:"title"},N={class:"time"},P=v({__name:"event",setup(t){f(a=>({f166166e:l(C)}));let s=h({list:[]});return y(async()=>{let a=await O({});s.list=a.data.list,console.log(s)}),(a,j)=>{const m=p("a-timeline-item"),u=p("a-timeline");return c(),d("div",z,[r(u,{mode:"left"},{default:n(()=>[(c(!0),d(x,null,b(l(s).list,(o,_)=>(c(),k(m,null,w({default:n(()=>[e("div",A,[e("div",{class:S(["label",{yellow:_===0}])},[E,e("div",L,[e("b",M,i(o.type),1),e("p",null,i(o.desc),1)])],2),e("span",N,i(o.time),1)])]),_:2},[_===0?{name:"dot",fn:n(()=>[r(l(I),{style:{"font-size":"16px",color:"red"}})]),key:"0"}:void 0]),1024))),256))]),_:1})])}}}),J=g(P,[["__scopeId","data-v-e2aef936"]]);export{J as default}; diff --git a/app/dubbo-ui/dist/admin/assets/formView-2KzX11dd.js b/app/dubbo-ui/dist/admin/assets/formView-2KzX11dd.js new file mode 100644 index 000000000..c7e2853f8 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/formView-2KzX11dd.js @@ -0,0 +1 @@ +import{d as P,v as T,a as L,k as M,l as x,r as A,D as E,c as f,b as t,w as a,L as v,M as w,e as l,n as m,P as F,o as c,j as h,f as n,t as o,a0 as D,J as $,m as G,_ as J}from"./index-3zDsduUv.js";import{u as Y}from"./index-HdnVQEsT.js";import{e as q}from"./traffic-dHGZ6qwp.js";import"./request-3an337VF.js";const z={class:"__container_app_detail"},H=P({__name:"formView",setup(K){T(e=>({"0baf33be":m(F)}));const k=L(),{appContext:{config:{globalProperties:O}}}=M(),R=Y().toClipboard;function _(e){G.success(O.$t("messageDomain.success.copy")),R(e)}const b=x(()=>{const e=s.key.split(":");return e[0]?e[0]:""}),s=A({configVersion:"v3.0",scope:"application",key:"shop-user",enabled:!0,runtime:!0,tags:[{name:"gray",match:[{key:"version",value:{exact:"v1"}}]}]}),N=async()=>{var r;const e=await q((r=k.params)==null?void 0:r.ruleName);e.code===200&&Object.assign(s,e.data||{})};return E(()=>{N()}),(e,r)=>{const i=l("a-descriptions-item"),u=l("a-typography-paragraph"),S=l("a-descriptions"),g=l("a-card"),V=l("a-flex"),j=l("a-typography-text"),y=l("a-typography-title"),C=l("a-space"),I=l("a-tag");return c(),f("div",z,[t(V,null,{default:a(()=>[t(g,{class:"_detail"},{default:a(()=>[t(S,{column:2,layout:"vertical",title:""},{default:a(()=>[t(i,{label:e.$t("flowControlDomain.ruleName"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[h("p",{onClick:r[0]||(r[0]=p=>_(s.key)),class:"description-item-content with-card"},[n(o(s.key)+" ",1),t(m(D))])]),_:1},8,["label"]),t(i,{label:e.$t("flowControlDomain.ruleGranularity"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[t(u,null,{default:a(()=>[n(o(s.scope),1)]),_:1})]),_:1},8,["label"]),t(i,{label:e.$t("flowControlDomain.actionObject"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[h("p",{onClick:r[1]||(r[1]=p=>_(b.value)),class:"description-item-content with-card"},[n(o(b.value)+" ",1),t(m(D))])]),_:1},8,["label"]),t(i,{label:e.$t("flowControlDomain.enabledState"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[t(u,null,{default:a(()=>[n(o(s.enabled?e.$t("flowControlDomain.enabled"):e.$t("flowControlDomain.disabled")),1)]),_:1})]),_:1},8,["label"]),t(i,{label:e.$t("flowControlDomain.runTimeEffective"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[t(u,null,{default:a(()=>[n(o(s.runtime?e.$t("flowControlDomain.opened"):e.$t("flowControlDomain.closed")),1)]),_:1})]),_:1},8,["label"])]),_:1})]),_:1})]),_:1}),(c(!0),f(v,null,w(s.tags,(p,W)=>(c(),$(g,{title:`标签【${W+1}】`,style:{"margin-top":"10px"},class:"_detail"},{default:a(()=>[t(C,{align:"center"},{default:a(()=>[t(y,{level:5},{default:a(()=>[n(o(e.$t("flowControlDomain.labelName"))+": ",1),t(j,{class:"labelName"},{default:a(()=>[n(o(p.name),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),t(C,{align:"start",style:{width:"100%"}},{default:a(()=>[t(y,{level:5},{default:a(()=>[n(o(e.$t("flowControlDomain.actuatingRange"))+": ",1)]),_:1}),(c(!0),f(v,null,w(p.match,(d,B)=>(c(),$(I,{key:B,color:"#2db7f5"},{default:a(()=>[n(o(d.key)+": "+o(Object.keys(d.value)[0])+"="+o(Object.values(d.value)[0]),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1032,["title"]))),256))])}}}),ee=J(H,[["__scopeId","data-v-4f4c877f"]]);export{ee as default}; diff --git a/app/dubbo-ui/dist/admin/assets/formView-RlUvRzIB.js b/app/dubbo-ui/dist/admin/assets/formView-RlUvRzIB.js new file mode 100644 index 000000000..855e76ff0 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/formView-RlUvRzIB.js @@ -0,0 +1 @@ +import{u as G}from"./index-HdnVQEsT.js";import{d as F,k as J,a as U,B as k,r as H,l as K,D as Q,c as $,b as o,w as t,e as i,o as s,f as n,t as r,J as c,n as y,aa as X,ab as Y,j as g,a0 as S,T as v,L as M,M as O,m as Z,p as ee,h as te,_ as oe}from"./index-3zDsduUv.js";import{g as ae}from"./traffic-dHGZ6qwp.js";import"./request-3an337VF.js";const A=w=>(ee("data-v-2f7b63ed"),w=w(),te(),w),le={class:"__container_routingRule_detail"},ne=A(()=>g("p",null,"修改时间: 2024/3/20 15:20:31",-1)),se=A(()=>g("p",null,"版本号: xo842xqpx834",-1)),re=F({__name:"formView",setup(w){const{appContext:{config:{globalProperties:T}}}=J(),j=U(),_=k(!1),B=k(8),x=G().toClipboard;function h(e){Z.success(T.$t("messageDomain.success.copy")),x(e)}const a=H({configVersion:"v3.0",scope:"service",key:"org.apache.dubbo.samples.UserService",enabled:!0,runtime:!0,force:!1,conditions:["=>host!=192.168.0.68"],group:"",version:""}),N=K(()=>{const e=a.key.split(":");return a.version=e[1]||"",a.group=e[2]||"",e[0]?e[0]:""}),R=k([]),V=k([]);async function E(){var l;let e=await ae((l=j.params)==null?void 0:l.ruleName);console.log(e),(e==null?void 0:e.code)===200&&(Object.assign(a,(e==null?void 0:e.data)||{}),a.conditions.forEach((p,C)=>{var D,f;const m=p.split(" => "),u=(D=m[1])==null?void 0:D.split(" & "),b=(f=m[0])==null?void 0:f.split(" & ");R.value=R.value.concat(b),V.value=V.value.concat(u)}))}const L=()=>{var l;const e=(l=j.params)==null?void 0:l.ruleName;if(e&&a.scope==="service"){const p=e==null?void 0:e.split(":");a.version=p[1],a.group=p[2].split(".")[0]}};return Q(async()=>{await E(),L()}),(e,l)=>{const p=i("a-typography-title"),C=i("a-button"),m=i("a-flex"),u=i("a-descriptions-item"),b=i("a-typography-paragraph"),D=i("a-descriptions"),f=i("a-card"),z=i("a-row"),P=i("a-tag"),W=i("a-space"),q=i("a-col");return s(),$("div",le,[o(m,{style:{width:"100%"}},{default:t(()=>[o(q,{span:_.value?24-B.value:24,class:"left"},{default:t(()=>[o(z,null,{default:t(()=>[o(m,{justify:"space-between",style:{width:"100%"}},{default:t(()=>[o(p,{level:3},{default:t(()=>[n(" 基础信息")]),_:1}),o(C,{type:"text",style:{color:"#0a90d5"},onClick:l[0]||(l[0]=d=>_.value=!_.value)},{default:t(()=>[n(r(e.$t("flowControlDomain.versionRecords"))+" ",1),_.value?(s(),c(y(Y),{key:1})):(s(),c(y(X),{key:0}))]),_:1})]),_:1}),o(f,{class:"_detail"},{default:t(()=>[o(D,{column:2,layout:"vertical",title:""},{default:t(()=>[o(u,{label:e.$t("flowControlDomain.ruleName"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[g("p",{class:"description-item-content with-card",onClick:l[1]||(l[1]=d=>h(a.key))},[n(r(a.key)+" ",1),o(y(S))])]),_:1},8,["label"]),o(u,{label:e.$t("flowControlDomain.ruleGranularity"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(b,null,{default:t(()=>[n(r(a.scope),1)]),_:1})]),_:1},8,["label"]),a.scope=="service"?(s(),c(u,{key:0,label:"版本",labelStyle:{fontWeight:"bold"}},{default:t(()=>[g("p",{class:"description-item-content with-card",onClick:l[2]||(l[2]=d=>h(a.version))},[n(r(a.version)+" ",1),a.version.length?(s(),c(y(S),{key:0})):v("",!0)])]),_:1})):v("",!0),a.scope=="service"?(s(),c(u,{key:1,label:"分组",labelStyle:{fontWeight:"bold"}},{default:t(()=>[g("p",{class:"description-item-content with-card",onClick:l[3]||(l[3]=d=>h(a.group))},[n(r(a.group)+" ",1),a.group.length?(s(),c(y(S),{key:0})):v("",!0)])]),_:1})):v("",!0),o(u,{label:e.$t("flowControlDomain.actionObject"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[g("p",{class:"description-item-content with-card",onClick:l[4]||(l[4]=d=>h(N.value))},[n(r(N.value)+" ",1),o(y(S))])]),_:1},8,["label"]),o(u,{label:e.$t("flowControlDomain.faultTolerantProtection"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(b,null,{default:t(()=>[n(r(a.force?e.$t("flowControlDomain.opened"):e.$t("flowControlDomain.closed")),1)]),_:1})]),_:1},8,["label"]),o(u,{label:e.$t("flowControlDomain.enabledState"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(b,null,{default:t(()=>[n(r(a.enabled?e.$t("flowControlDomain.enabled"):e.$t("flowControlDomain.disabled")),1)]),_:1})]),_:1},8,["label"]),o(u,{label:e.$t("flowControlDomain.runTimeEffective"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(b,null,{default:t(()=>[n(r(a.runtime?e.$t("flowControlDomain.opened"):e.$t("flowControlDomain.closed")),1)]),_:1})]),_:1},8,["label"])]),_:1})]),_:1})]),_:1}),o(f,{style:{"margin-top":"10px"},class:"_detail"},{default:t(()=>[o(W,{align:"start",style:{width:"100%"}},{default:t(()=>[o(p,{level:5},{default:t(()=>[n(r(e.$t("flowControlDomain.requestParameterMatching"))+": ",1)]),_:1}),o(W,{align:"center",direction:"horizontal",size:"middle",wrap:""},{default:t(()=>[(s(!0),$(M,null,O(R.value,(d,I)=>(s(),c(P,{key:I,color:"#2db7f5"},{default:t(()=>[n(r(d),1)]),_:2},1024))),128))]),_:1})]),_:1}),o(W,{align:"start",style:{width:"100%"},wrap:""},{default:t(()=>[o(p,{level:5},{default:t(()=>[n(r(e.$t("flowControlDomain.addressSubsetMatching"))+": ",1)]),_:1}),(s(!0),$(M,null,O(V.value,(d,I)=>(s(),c(P,{key:I,color:"#87d068"},{default:t(()=>[n(r(d),1)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["span"]),o(q,{span:_.value?B.value:0,class:"right"},{default:t(()=>[_.value?(s(),c(f,{key:0,class:"sliderBox"},{default:t(()=>[(s(),$(M,null,O(2,d=>o(f,{key:d},{default:t(()=>[ne,se,o(m,{justify:"flex-end"},{default:t(()=>[o(C,{type:"text",style:{color:"#0a90d5"}},{default:t(()=>[n("查看")]),_:1}),o(C,{type:"text",style:{color:"#0a90d5"}},{default:t(()=>[n("回滚")]),_:1})]),_:1})]),_:2},1024)),64))]),_:1})):v("",!0)]),_:1},8,["span"])]),_:1})])}}}),pe=oe(re,[["__scopeId","data-v-2f7b63ed"]]);export{pe as default}; diff --git a/app/dubbo-ui/dist/admin/assets/formView-dr6vkirR.js b/app/dubbo-ui/dist/admin/assets/formView-dr6vkirR.js deleted file mode 100644 index a1cf9955c..000000000 --- a/app/dubbo-ui/dist/admin/assets/formView-dr6vkirR.js +++ /dev/null @@ -1 +0,0 @@ -import{u as L}from"./index-Va7nxJVK.js";import{d as F,k as J,a as K,z as D,r as Q,l as U,W as H,c as $,b as o,w as t,e as i,o as s,f as n,t as r,G as c,n as y,a9 as X,aa as Y,j as g,$ as S,Q as v,J as O,K as j,m as Z,p as ee,h as te,_ as oe}from"./index-hmLAZQYT.js";import{g as le}from"./traffic-C2a-KjHH.js";import"./request-8jI_GZey.js";const A=w=>(ee("data-v-2f7b63ed"),w=w(),te(),w),ae={class:"__container_routingRule_detail"},ne=A(()=>g("p",null,"修改时间: 2024/3/20 15:20:31",-1)),se=A(()=>g("p",null,"版本号: xo842xqpx834",-1)),re=F({__name:"formView",setup(w){const{appContext:{config:{globalProperties:x}}}=J(),M=K(),_=D(!1),N=D(8),z=L().toClipboard;function h(e){Z.success(x.$t("messageDomain.success.copy")),z(e)}const l=Q({configVersion:"v3.0",scope:"service",key:"org.apache.dubbo.samples.UserService",enabled:!0,runtime:!0,force:!1,conditions:["=>host!=192.168.0.68"],group:"",version:""}),B=U(()=>{const e=l.key.split(":");return l.version=e[1]||"",l.group=e[2]||"",e[0]?e[0]:""}),W=D([]),R=D([]);async function E(){var a;let e=await le((a=M.params)==null?void 0:a.ruleName);console.log(e),(e==null?void 0:e.code)===200&&(Object.assign(l,(e==null?void 0:e.data)||{}),l.conditions.forEach((p,C)=>{var k,f;const m=p.split(" => "),u=(k=m[1])==null?void 0:k.split(" & "),b=(f=m[0])==null?void 0:f.split(" & ");W.value=W.value.concat(b),R.value=R.value.concat(u)}))}const G=()=>{var a;const e=(a=M.params)==null?void 0:a.ruleName;if(e&&l.scope==="service"){const p=e==null?void 0:e.split(":");l.version=p[1],l.group=p[2].split(".")[0]}};return H(async()=>{await E(),G()}),(e,a)=>{const p=i("a-typography-title"),C=i("a-button"),m=i("a-flex"),u=i("a-descriptions-item"),b=i("a-typography-paragraph"),k=i("a-descriptions"),f=i("a-card"),T=i("a-row"),P=i("a-tag"),V=i("a-space"),q=i("a-col");return s(),$("div",ae,[o(m,{style:{width:"100%"}},{default:t(()=>[o(q,{span:_.value?24-N.value:24,class:"left"},{default:t(()=>[o(T,null,{default:t(()=>[o(m,{justify:"space-between",style:{width:"100%"}},{default:t(()=>[o(p,{level:3},{default:t(()=>[n(" 基础信息")]),_:1}),o(C,{type:"text",style:{color:"#0a90d5"},onClick:a[0]||(a[0]=d=>_.value=!_.value)},{default:t(()=>[n(r(e.$t("flowControlDomain.versionRecords"))+" ",1),_.value?(s(),c(y(Y),{key:1})):(s(),c(y(X),{key:0}))]),_:1})]),_:1}),o(f,{class:"_detail"},{default:t(()=>[o(k,{column:2,layout:"vertical",title:""},{default:t(()=>[o(u,{label:e.$t("flowControlDomain.ruleName"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[g("p",{class:"description-item-content with-card",onClick:a[1]||(a[1]=d=>h(l.key))},[n(r(l.key)+" ",1),o(y(S))])]),_:1},8,["label"]),o(u,{label:e.$t("flowControlDomain.ruleGranularity"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(b,null,{default:t(()=>[n(r(l.scope),1)]),_:1})]),_:1},8,["label"]),l.scope=="service"?(s(),c(u,{key:0,label:"版本",labelStyle:{fontWeight:"bold"}},{default:t(()=>[g("p",{class:"description-item-content with-card",onClick:a[2]||(a[2]=d=>h(l.version))},[n(r(l.version)+" ",1),l.version.length?(s(),c(y(S),{key:0})):v("",!0)])]),_:1})):v("",!0),l.scope=="service"?(s(),c(u,{key:1,label:"分组",labelStyle:{fontWeight:"bold"}},{default:t(()=>[g("p",{class:"description-item-content with-card",onClick:a[3]||(a[3]=d=>h(l.group))},[n(r(l.group)+" ",1),l.group.length?(s(),c(y(S),{key:0})):v("",!0)])]),_:1})):v("",!0),o(u,{label:e.$t("flowControlDomain.actionObject"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[g("p",{class:"description-item-content with-card",onClick:a[4]||(a[4]=d=>h(B.value))},[n(r(B.value)+" ",1),o(y(S))])]),_:1},8,["label"]),o(u,{label:e.$t("flowControlDomain.faultTolerantProtection"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(b,null,{default:t(()=>[n(r(l.force?e.$t("flowControlDomain.opened"):e.$t("flowControlDomain.closed")),1)]),_:1})]),_:1},8,["label"]),o(u,{label:e.$t("flowControlDomain.enabledState"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(b,null,{default:t(()=>[n(r(l.enabled?e.$t("flowControlDomain.enabled"):e.$t("flowControlDomain.disabled")),1)]),_:1})]),_:1},8,["label"]),o(u,{label:e.$t("flowControlDomain.runTimeEffective"),labelStyle:{fontWeight:"bold"}},{default:t(()=>[o(b,null,{default:t(()=>[n(r(l.runtime?e.$t("flowControlDomain.opened"):e.$t("flowControlDomain.closed")),1)]),_:1})]),_:1},8,["label"])]),_:1})]),_:1})]),_:1}),o(f,{style:{"margin-top":"10px"},class:"_detail"},{default:t(()=>[o(V,{align:"start",style:{width:"100%"}},{default:t(()=>[o(p,{level:5},{default:t(()=>[n(r(e.$t("flowControlDomain.requestParameterMatching"))+": ",1)]),_:1}),o(V,{align:"center",direction:"horizontal",size:"middle",wrap:""},{default:t(()=>[(s(!0),$(O,null,j(W.value,(d,I)=>(s(),c(P,{key:I,color:"#2db7f5"},{default:t(()=>[n(r(d),1)]),_:2},1024))),128))]),_:1})]),_:1}),o(V,{align:"start",style:{width:"100%"},wrap:""},{default:t(()=>[o(p,{level:5},{default:t(()=>[n(r(e.$t("flowControlDomain.addressSubsetMatching"))+": ",1)]),_:1}),(s(!0),$(O,null,j(R.value,(d,I)=>(s(),c(P,{key:I,color:"#87d068"},{default:t(()=>[n(r(d),1)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["span"]),o(q,{span:_.value?N.value:0,class:"right"},{default:t(()=>[_.value?(s(),c(f,{key:0,class:"sliderBox"},{default:t(()=>[(s(),$(O,null,j(2,d=>o(f,{key:d},{default:t(()=>[ne,se,o(m,{justify:"flex-end"},{default:t(()=>[o(C,{type:"text",style:{color:"#0a90d5"}},{default:t(()=>[n("查看")]),_:1}),o(C,{type:"text",style:{color:"#0a90d5"}},{default:t(()=>[n("回滚")]),_:1})]),_:1})]),_:2},1024)),64))]),_:1})):v("",!0)]),_:1},8,["span"])]),_:1})])}}}),pe=oe(re,[["__scopeId","data-v-2f7b63ed"]]);export{pe as default}; diff --git a/app/dubbo-ui/dist/admin/assets/formView--eWAQ02R.js b/app/dubbo-ui/dist/admin/assets/formView-vzcbtWy_.js similarity index 99% rename from app/dubbo-ui/dist/admin/assets/formView--eWAQ02R.js rename to app/dubbo-ui/dist/admin/assets/formView-vzcbtWy_.js index ccd701c76..c5746bb52 100644 --- a/app/dubbo-ui/dist/admin/assets/formView--eWAQ02R.js +++ b/app/dubbo-ui/dist/admin/assets/formView-vzcbtWy_.js @@ -1,4 +1,4 @@ -import{d as tn,v as en,x as rn,y as nn,k as sn,a as an,u as on,z as Ge,r as Ke,l as Fi,W as ln,c as Ct,b as D,w as S,G as $,Q as zt,a3 as Ii,e as rt,n as G,P as Ft,o as E,j as Re,J as Wt,K as qt,f as nt,t as dt,ad as un,I as ne,ag as fn,m as ge,_ as hn}from"./index-hmLAZQYT.js";import{u as _n}from"./index-Va7nxJVK.js";import{k as dn,l as cn,m as pn}from"./traffic-C2a-KjHH.js";import{V as mn,C as gn}from"./ConfigModel-QFNd-Zdd.js";import"./request-8jI_GZey.js";function Mt(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function tr(l,t){l.prototype=Object.create(t.prototype),l.prototype.constructor=l,l.__proto__=t}/*! +import{d as tn,v as en,y as rn,z as nn,k as sn,a as an,u as on,B as Ge,r as Ke,l as Fi,D as ln,c as Ct,b as D,w as S,J as $,T as zt,a4 as Ii,e as rt,n as G,P as Ft,o as E,j as Re,L as Wt,M as qt,f as nt,t as dt,af as un,I as ne,ai as fn,m as ge,_ as hn}from"./index-3zDsduUv.js";import{u as _n}from"./index-HdnVQEsT.js";import{k as dn,l as cn,m as pn}from"./traffic-dHGZ6qwp.js";import{V as mn,C as gn}from"./ConfigModel-IgPiU3B2.js";import"./request-3an337VF.js";function Mt(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function tr(l,t){l.prototype=Object.create(t.prototype),l.prototype.constructor=l,l.__proto__=t}/*! * GSAP 3.12.7 * https://gsap.com * diff --git a/app/dubbo-ui/dist/admin/assets/formView-yOHva0ty.js b/app/dubbo-ui/dist/admin/assets/formView-yOHva0ty.js deleted file mode 100644 index b3f4d4720..000000000 --- a/app/dubbo-ui/dist/admin/assets/formView-yOHva0ty.js +++ /dev/null @@ -1 +0,0 @@ -import{d as P,v as T,a as x,k as A,l as E,r as G,W as L,c as f,b as t,w as a,J as v,K as w,e as l,n as m,P as M,o as c,j as h,f as n,t as o,$ as D,G as $,m as F,_ as J}from"./index-hmLAZQYT.js";import{u as K}from"./index-Va7nxJVK.js";import{e as Y}from"./traffic-C2a-KjHH.js";import"./request-8jI_GZey.js";const q={class:"__container_app_detail"},z=P({__name:"formView",setup(H){T(e=>({"0baf33be":m(M)}));const k=x(),{appContext:{config:{globalProperties:O}}}=A(),R=K().toClipboard;function _(e){F.success(O.$t("messageDomain.success.copy")),R(e)}const b=E(()=>{const e=s.key.split(":");return e[0]?e[0]:""}),s=G({configVersion:"v3.0",scope:"application",key:"shop-user",enabled:!0,runtime:!0,tags:[{name:"gray",match:[{key:"version",value:{exact:"v1"}}]}]}),N=async()=>{var r;const e=await Y((r=k.params)==null?void 0:r.ruleName);e.code===200&&Object.assign(s,e.data||{})};return L(()=>{N()}),(e,r)=>{const i=l("a-descriptions-item"),u=l("a-typography-paragraph"),S=l("a-descriptions"),g=l("a-card"),V=l("a-flex"),j=l("a-typography-text"),y=l("a-typography-title"),C=l("a-space"),W=l("a-tag");return c(),f("div",q,[t(V,null,{default:a(()=>[t(g,{class:"_detail"},{default:a(()=>[t(S,{column:2,layout:"vertical",title:""},{default:a(()=>[t(i,{label:e.$t("flowControlDomain.ruleName"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[h("p",{onClick:r[0]||(r[0]=p=>_(s.key)),class:"description-item-content with-card"},[n(o(s.key)+" ",1),t(m(D))])]),_:1},8,["label"]),t(i,{label:e.$t("flowControlDomain.ruleGranularity"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[t(u,null,{default:a(()=>[n(o(s.scope),1)]),_:1})]),_:1},8,["label"]),t(i,{label:e.$t("flowControlDomain.actionObject"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[h("p",{onClick:r[1]||(r[1]=p=>_(b.value)),class:"description-item-content with-card"},[n(o(b.value)+" ",1),t(m(D))])]),_:1},8,["label"]),t(i,{label:e.$t("flowControlDomain.enabledState"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[t(u,null,{default:a(()=>[n(o(s.enabled?e.$t("flowControlDomain.enabled"):e.$t("flowControlDomain.disabled")),1)]),_:1})]),_:1},8,["label"]),t(i,{label:e.$t("flowControlDomain.runTimeEffective"),labelStyle:{fontWeight:"bold"}},{default:a(()=>[t(u,null,{default:a(()=>[n(o(s.runtime?e.$t("flowControlDomain.opened"):e.$t("flowControlDomain.closed")),1)]),_:1})]),_:1},8,["label"])]),_:1})]),_:1})]),_:1}),(c(!0),f(v,null,w(s.tags,(p,I)=>(c(),$(g,{title:`标签【${I+1}】`,style:{"margin-top":"10px"},class:"_detail"},{default:a(()=>[t(C,{align:"center"},{default:a(()=>[t(y,{level:5},{default:a(()=>[n(o(e.$t("flowControlDomain.labelName"))+": ",1),t(j,{class:"labelName"},{default:a(()=>[n(o(p.name),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),t(C,{align:"start",style:{width:"100%"}},{default:a(()=>[t(y,{level:5},{default:a(()=>[n(o(e.$t("flowControlDomain.actuatingRange"))+": ",1)]),_:1}),(c(!0),f(v,null,w(p.match,(d,B)=>(c(),$(W,{key:B,color:"#2db7f5"},{default:a(()=>[n(o(d.key)+": "+o(Object.keys(d.value)[0])+"="+o(Object.values(d.value)[0]),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1032,["title"]))),256))])}}}),ee=J(z,[["__scopeId","data-v-4f4c877f"]]);export{ee as default}; diff --git a/app/dubbo-ui/dist/admin/assets/freemarker2-7czNGzoq.js b/app/dubbo-ui/dist/admin/assets/freemarker2-UxhOxt-M.js similarity index 99% rename from app/dubbo-ui/dist/admin/assets/freemarker2-7czNGzoq.js rename to app/dubbo-ui/dist/admin/assets/freemarker2-UxhOxt-M.js index aa1c13975..bd858663e 100644 --- a/app/dubbo-ui/dist/admin/assets/freemarker2-7czNGzoq.js +++ b/app/dubbo-ui/dist/admin/assets/freemarker2-UxhOxt-M.js @@ -1,4 +1,4 @@ -import{m as F}from"./js-yaml-8Gkz3BRW.js";import"./index-hmLAZQYT.js";/*!----------------------------------------------------------------------------- +import{m as F}from"./js-yaml-eElisXzH.js";import"./index-3zDsduUv.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1) * Released under the MIT license diff --git a/app/dubbo-ui/dist/admin/assets/globalSearch--VMQnq3S.js b/app/dubbo-ui/dist/admin/assets/globalSearch--VMQnq3S.js new file mode 100644 index 000000000..dd48b25a3 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/globalSearch--VMQnq3S.js @@ -0,0 +1 @@ +import{r as t}from"./request-3an337VF.js";const r=e=>t({url:"/auth/login",method:"post",data:e,headers:{"Content-Type":"multipart/form-data"}}),s=()=>t({url:"/auth/logout",method:"post"}),a=()=>t({url:"/meshes",method:"get"});export{s as a,r as l,a as m}; diff --git a/app/dubbo-ui/dist/admin/assets/handlebars-WxO52qam.js b/app/dubbo-ui/dist/admin/assets/handlebars-feyIBGtU.js similarity index 98% rename from app/dubbo-ui/dist/admin/assets/handlebars-WxO52qam.js rename to app/dubbo-ui/dist/admin/assets/handlebars-feyIBGtU.js index f7c544033..516ff2f19 100644 --- a/app/dubbo-ui/dist/admin/assets/handlebars-WxO52qam.js +++ b/app/dubbo-ui/dist/admin/assets/handlebars-feyIBGtU.js @@ -1,4 +1,4 @@ -import{m as i}from"./js-yaml-8Gkz3BRW.js";import"./index-hmLAZQYT.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./js-yaml-eElisXzH.js";import"./index-3zDsduUv.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1) * Released under the MIT license diff --git a/app/dubbo-ui/dist/admin/assets/html-uljtN73o.js b/app/dubbo-ui/dist/admin/assets/html-XW1o38ac.js similarity index 97% rename from app/dubbo-ui/dist/admin/assets/html-uljtN73o.js rename to app/dubbo-ui/dist/admin/assets/html-XW1o38ac.js index 059dc5488..0df3fe64f 100644 --- a/app/dubbo-ui/dist/admin/assets/html-uljtN73o.js +++ b/app/dubbo-ui/dist/admin/assets/html-XW1o38ac.js @@ -1,4 +1,4 @@ -import{m as p}from"./js-yaml-8Gkz3BRW.js";import"./index-hmLAZQYT.js";/*!----------------------------------------------------------------------------- +import{m as p}from"./js-yaml-eElisXzH.js";import"./index-3zDsduUv.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1) * Released under the MIT license diff --git a/app/dubbo-ui/dist/admin/assets/htmlMode-X6nY_fAl.js b/app/dubbo-ui/dist/admin/assets/htmlMode-GNYYzuyz.js similarity index 99% rename from app/dubbo-ui/dist/admin/assets/htmlMode-X6nY_fAl.js rename to app/dubbo-ui/dist/admin/assets/htmlMode-GNYYzuyz.js index c150c2acd..96fbf02e4 100644 --- a/app/dubbo-ui/dist/admin/assets/htmlMode-X6nY_fAl.js +++ b/app/dubbo-ui/dist/admin/assets/htmlMode-GNYYzuyz.js @@ -1,4 +1,4 @@ -import{m as ft}from"./js-yaml-8Gkz3BRW.js";import"./index-hmLAZQYT.js";/*!----------------------------------------------------------------------------- +import{m as ft}from"./js-yaml-eElisXzH.js";import"./index-3zDsduUv.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1) * Released under the MIT license diff --git a/app/dubbo-ui/dist/admin/assets/index-0bxuOvJ7.css b/app/dubbo-ui/dist/admin/assets/index-0bxuOvJ7.css new file mode 100644 index 000000000..306642d61 --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/index-0bxuOvJ7.css @@ -0,0 +1 @@ +.__container_menu .icon-wrapper .icon[data-v-0c21c672]{font-size:20px;margin-right:5px;margin-bottom:-4px;font-weight:700}.__container_layout_header .header[data-v-fbb481f3]{background:var(--33f79e48);padding:0}.__container_layout_header .header .mesh-select[data-v-fbb481f3]{min-width:100px}.__container_layout_header .header .mesh-select-item[data-v-fbb481f3] label{color:var(--75bb75af)}.__container_layout_header .header .search-group[data-v-fbb481f3]{display:flex;align-items:center}.__container_layout_header .header .search-group .select-type[data-v-fbb481f3]{width:120px}.__container_layout_header .header .search-group .input-keywords[data-v-fbb481f3]{width:20vw}.__container_layout_header .header .search-group .input-keywords[data-v-fbb481f3]:hover,.__container_layout_header .header .search-group .input-keywords[data-v-fbb481f3]:hover .ant-select-selector{border-color:#d9d9d9}.__container_layout_header .header .search-group .input-keywords[data-v-fbb481f3] .ant-select-selector,.__container_layout_header .header .search-group .input-keywords[data-v-fbb481f3] .ant-select-selector:hover{border-color:#d9d9d9;box-shadow:none}.__container_layout_header .header .search-group .search-icon[data-v-fbb481f3]{width:32px}.__container_layout_header .trigger[data-v-fbb481f3]{font-size:20px;margin-left:20px;color:#fff}.__container_layout_header .username[data-v-fbb481f3]{color:#fff;padding:5px}.__container_layout_header .reset-icon[data-v-fbb481f3]{font-size:25px;color:#fff}.__container_layout_bread[data-v-97925c3f]{padding-left:20px;padding-top:10px}.__container_layout_index[data-v-e6898f0d] .ant-layout-content{padding:16px!important}.__container_layout_index .logo[data-v-e6898f0d]{height:40px;width:auto;margin:10px 15px;padding-left:10px;padding-right:10px;border-radius:8px;background:var(--1cdde0dc);line-height:40px;vertical-align:middle;font-size:22px;color:#fff}.__container_layout_index .logo img[data-v-e6898f0d]{width:28px;height:28px;margin-bottom:5px;margin-right:5px}.__container_layout_index .layout-content[data-v-e6898f0d]{margin:16px;padding:16px 16px 24px;overflow:hidden;height:calc(100vh - 140px)}.__container_layout_index .layout-footer[data-v-e6898f0d]{height:30px;text-align:center}.slide-fade-enter-active{animation:slide-fade-in .5s}@keyframes slide-fade-in{0%{transform:translate(80px);opacity:0}50%{transform:translate(-2px);opacity:20}to{transform:translate(0);opacity:100}}.fade-enter-active{animation:fade-in .6s ease-in-out}.fade-leave-active{animation:fade-in .6s reverse}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:100}} diff --git a/app/dubbo-ui/dist/admin/assets/index-1-DS2ySp.js b/app/dubbo-ui/dist/admin/assets/index-1-DS2ySp.js deleted file mode 100644 index e9989d33c..000000000 --- a/app/dubbo-ui/dist/admin/assets/index-1-DS2ySp.js +++ /dev/null @@ -1 +0,0 @@ -import{d as N,v as g,a as w,r as b,W as D,D as S,c as n,b as _,w as l,n as p,P as v,R,e as V,o as t,J as y,K as C,G as h,f as d,t as c,X as q,j as A,I as E,Q as B,y as O,_ as M}from"./index-hmLAZQYT.js";import{s as P}from"./app-duU6O0cq.js";import{S as T,a as Y,s as x}from"./SearchUtil-sOWd6ofa.js";import"./request-8jI_GZey.js";const F={class:"__container_resources_application_index"},J=["onClick"],K=N({__name:"index",setup(L){g(e=>({d89413de:p(v)}));let u=w(),k=u.query.query,f=[{title:"appName",key:"appName",dataIndex:"appName",sorter:(e,s)=>x(e.appName,s.appName),width:140,ellipsis:!0},{title:"applicationDomain.instanceCount",key:"instanceCount",dataIndex:"instanceCount",width:100,sorter:(e,s)=>x(e.instanceCount,s.instanceCount)},{title:"applicationDomain.deployClusters",key:"deployClusters",dataIndex:"deployClusters",width:120},{title:"applicationDomain.registryClusters",key:"registryClusters",dataIndex:"registryClusters",width:200}];const a=b(new T([{label:"appName",param:"keywords",defaultValue:k,placeholder:"typeAppName",style:{width:"200px"}}],P,f));return D(()=>{a.onSearch(),a.tableStyle={scrollX:"100",scrollY:"367px"}}),R(O.SEARCH_DOMAIN,a),S(u,(e,s)=>{a.queryForm.keywords=e.query.query,a.onSearch(),console.log(e)}),(e,s)=>{const m=V("a-tag");return t(),n("div",F,[_(Y,{"search-domain":a},{bodyCell:l(({text:i,record:I,index:X,column:r})=>[r.dataIndex==="registryClusters"?(t(!0),n(y,{key:0},C(i,o=>(t(),h(m,null,{default:l(()=>[d(c(o),1)]),_:2},1024))),256)):r.dataIndex==="deployClusters"?(t(!0),n(y,{key:1},C(i,o=>(t(),h(m,null,{default:l(()=>[d(c(o),1)]),_:2},1024))),256)):r.dataIndex==="appName"?(t(),n("span",{key:2,class:"app-link",onClick:o=>p(q).push(`/resources/applications/detail/${I[r.key]}`)},[A("b",null,[_(p(E),{style:{"margin-bottom":"-2px"},icon:"material-symbols:attach-file-rounded"}),d(" "+c(i),1)])],8,J)):B("",!0)]),_:1},8,["search-domain"])])}}}),Q=M(K,[["__scopeId","data-v-2d6e7df7"]]);export{Q as default}; diff --git a/app/dubbo-ui/dist/admin/assets/index-1FKHxc4J.css b/app/dubbo-ui/dist/admin/assets/index-1FKHxc4J.css deleted file mode 100644 index 136a93cc5..000000000 --- a/app/dubbo-ui/dist/admin/assets/index-1FKHxc4J.css +++ /dev/null @@ -1 +0,0 @@ -.__container_menu .icon-wrapper .icon[data-v-0c21c672]{font-size:20px;margin-right:5px;margin-bottom:-4px;font-weight:700}.__container_layout_header .header[data-v-8929dc94]{background:var(--5b012264);padding:0}.__container_layout_header .header .search-group[data-v-8929dc94]{display:flex;align-items:center}.__container_layout_header .header .search-group .select-type[data-v-8929dc94]{width:120px}.__container_layout_header .header .search-group .input-keywords[data-v-8929dc94]{width:20vw}.__container_layout_header .header .search-group .input-keywords[data-v-8929dc94]:hover,.__container_layout_header .header .search-group .input-keywords[data-v-8929dc94]:hover .ant-select-selector{border-color:#d9d9d9}.__container_layout_header .header .search-group .input-keywords[data-v-8929dc94] .ant-select-selector,.__container_layout_header .header .search-group .input-keywords[data-v-8929dc94] .ant-select-selector:hover{border-color:#d9d9d9;box-shadow:none}.__container_layout_header .header .search-group .search-icon[data-v-8929dc94]{width:32px}.__container_layout_header .trigger[data-v-8929dc94]{font-size:20px;margin-left:20px;color:#fff}.__container_layout_header .username[data-v-8929dc94]{color:#fff;padding:5px}.__container_layout_header .reset-icon[data-v-8929dc94]{font-size:25px;color:#fff}.__container_layout_bread[data-v-97925c3f]{padding-left:20px;padding-top:10px}.__container_layout_index[data-v-bf34dde3] .ant-layout-content{padding:16px!important}.__container_layout_index .logo[data-v-bf34dde3]{height:40px;width:auto;margin:10px 15px;padding-left:10px;padding-right:10px;border-radius:8px;background:var(--0345b33d);line-height:40px;vertical-align:middle;font-size:22px;color:#fff}.__container_layout_index .logo img[data-v-bf34dde3]{width:28px;height:28px;margin-bottom:5px;margin-right:5px}.__container_layout_index .layout-content[data-v-bf34dde3]{margin:16px;padding:16px 16px 24px;overflow:hidden;height:calc(100vh - 140px)}.__container_layout_index .layout-footer[data-v-bf34dde3]{height:30px;text-align:center}.slide-fade-enter-active{animation:slide-fade-in .5s}@keyframes slide-fade-in{0%{transform:translate(80px);opacity:0}50%{transform:translate(-2px);opacity:20}to{transform:translate(0);opacity:100}}.fade-enter-active{animation:fade-in .6s ease-in-out}.fade-leave-active{animation:fade-in .6s reverse}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:100}} diff --git a/app/dubbo-ui/dist/admin/assets/index-3zDsduUv.js b/app/dubbo-ui/dist/admin/assets/index-3zDsduUv.js new file mode 100644 index 000000000..978fe3f9c --- /dev/null +++ b/app/dubbo-ui/dist/admin/assets/index-3zDsduUv.js @@ -0,0 +1,566 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();/** +* @vue/shared v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Jw(e,t){const n=new Set(e.split(","));return t?o=>n.has(o.toLowerCase()):o=>n.has(o)}const Mn={},rd=[],Ei=()=>{},kZ=()=>!1,vb=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),e2=e=>e.startsWith("onUpdate:"),bo=Object.assign,t2=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},BZ=Object.prototype.hasOwnProperty,dn=(e,t)=>BZ.call(e,t),Lt=Array.isArray,id=e=>mb(e)==="[object Map]",SL=e=>mb(e)==="[object Set]",Ut=e=>typeof e=="function",Qn=e=>typeof e=="string",Jd=e=>typeof e=="symbol",Tn=e=>e!==null&&typeof e=="object",CL=e=>(Tn(e)||Ut(e))&&Ut(e.then)&&Ut(e.catch),$L=Object.prototype.toString,mb=e=>$L.call(e),FZ=e=>mb(e).slice(8,-1),xL=e=>mb(e)==="[object Object]",n2=e=>Qn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,nm=Jw(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),bb=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},HZ=/-(\w)/g,Da=bb(e=>e.replace(HZ,(t,n)=>n?n.toUpperCase():"")),zZ=/\B([A-Z])/g,Vc=bb(e=>e.replace(zZ,"-$1").toLowerCase()),yb=bb(e=>e.charAt(0).toUpperCase()+e.slice(1)),IS=bb(e=>e?`on${yb(e)}`:""),Cs=(e,t)=>!Object.is(e,t),PS=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},jZ=e=>{const t=parseFloat(e);return isNaN(t)?e:t},WZ=e=>{const t=Qn(e)?Number(e):NaN;return isNaN(t)?e:t};let v4;const wL=()=>v4||(v4=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function vo(e){if(Lt(e)){const t={};for(let n=0;n{if(n){const o=n.split(KZ);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Oo(e){let t="";if(Qn(e))t=e;else if(Lt(e))for(let n=0;nQn(e)?e:e==null?"":Lt(e)||Tn(e)&&(e.toString===$L||!Ut(e.toString))?JSON.stringify(e,OL,2):String(e),OL=(e,t)=>t&&t.__v_isRef?OL(e,t.value):id(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],i)=>(n[TS(o,i)+" =>"]=r,n),{})}:SL(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>TS(n))}:Jd(t)?TS(t):Tn(t)&&!Lt(t)&&!xL(t)?String(t):t,TS=(e,t="")=>{var n;return Jd(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let li;class IL{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=li,!t&&li&&(this.index=(li.scopes||(li.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=li;try{return li=this,t()}finally{li=n}}}on(){li=this}off(){li=this.parent}stop(t){if(this._active){let n,o;for(n=0,o=this.effects.length;n=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),Uc()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=hs,n=Sc;try{return hs=!0,Sc=this,this._runnings++,m4(this),this.fn()}finally{b4(this),this._runnings--,Sc=n,hs=t}}stop(){var t;this.active&&(m4(this),b4(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function ZZ(e){return e.value}function m4(e){e._trackId++,e._depsLength=0}function b4(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},Qm=new WeakMap,Cc=Symbol(""),T$=Symbol("");function zr(e,t,n){if(hs&&Sc){let o=Qm.get(e);o||Qm.set(e,o=new Map);let r=o.get(n);r||o.set(n,r=RL(()=>o.delete(n))),EL(Sc,r)}}function ml(e,t,n,o,r,i){const a=Qm.get(e);if(!a)return;let l=[];if(t==="clear")l=[...a.values()];else if(n==="length"&&Lt(e)){const s=Number(o);a.forEach((c,u)=>{(u==="length"||!Jd(u)&&u>=s)&&l.push(c)})}else switch(n!==void 0&&l.push(a.get(n)),t){case"add":Lt(e)?n2(n)&&l.push(a.get("length")):(l.push(a.get(Cc)),id(e)&&l.push(a.get(T$)));break;case"delete":Lt(e)||(l.push(a.get(Cc)),id(e)&&l.push(a.get(T$)));break;case"set":id(e)&&l.push(a.get(Cc));break}a2();for(const s of l)s&&AL(s,2);l2()}function QZ(e,t){var n;return(n=Qm.get(e))==null?void 0:n.get(t)}const JZ=Jw("__proto__,__v_isRef,__isVue"),DL=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Jd)),y4=eQ();function eQ(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=$t(this);for(let i=0,a=this.length;i{e[t]=function(...n){Kc(),a2();const o=$t(this)[t].apply(this,n);return l2(),Uc(),o}}),e}function tQ(e){const t=$t(this);return zr(t,"has",e),t.hasOwnProperty(e)}class LL{constructor(t=!1,n=!1){this._isReadonly=t,this._shallow=n}get(t,n,o){const r=this._isReadonly,i=this._shallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(r?i?hQ:FL:i?BL:kL).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const a=Lt(t);if(!r){if(a&&dn(y4,n))return Reflect.get(y4,n,o);if(n==="hasOwnProperty")return tQ}const l=Reflect.get(t,n,o);return(Jd(n)?DL.has(n):JZ(n))||(r||zr(t,"get",n),i)?l:Wn(l)?a&&n2(n)?l:l.value:Tn(l)?r?u2(l):St(l):l}}class NL extends LL{constructor(t=!1){super(!1,t)}set(t,n,o,r){let i=t[n];if(!this._shallow){const s=Sd(i);if(!Jm(o)&&!Sd(o)&&(i=$t(i),o=$t(o)),!Lt(t)&&Wn(i)&&!Wn(o))return s?!1:(i.value=o,!0)}const a=Lt(t)&&n2(n)?Number(n)e,Cb=e=>Reflect.getPrototypeOf(e);function ov(e,t,n=!1,o=!1){e=e.__v_raw;const r=$t(e),i=$t(t);n||(Cs(t,i)&&zr(r,"get",t),zr(r,"get",i));const{has:a}=Cb(r),l=o?s2:n?f2:Gp;if(a.call(r,t))return l(e.get(t));if(a.call(r,i))return l(e.get(i));e!==r&&e.get(t)}function rv(e,t=!1){const n=this.__v_raw,o=$t(n),r=$t(e);return t||(Cs(e,r)&&zr(o,"has",e),zr(o,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function iv(e,t=!1){return e=e.__v_raw,!t&&zr($t(e),"iterate",Cc),Reflect.get(e,"size",e)}function S4(e){e=$t(e);const t=$t(this);return Cb(t).has.call(t,e)||(t.add(e),ml(t,"add",e,e)),this}function C4(e,t){t=$t(t);const n=$t(this),{has:o,get:r}=Cb(n);let i=o.call(n,e);i||(e=$t(e),i=o.call(n,e));const a=r.call(n,e);return n.set(e,t),i?Cs(t,a)&&ml(n,"set",e,t):ml(n,"add",e,t),this}function $4(e){const t=$t(this),{has:n,get:o}=Cb(t);let r=n.call(t,e);r||(e=$t(e),r=n.call(t,e)),o&&o.call(t,e);const i=t.delete(e);return r&&ml(t,"delete",e,void 0),i}function x4(){const e=$t(this),t=e.size!==0,n=e.clear();return t&&ml(e,"clear",void 0,void 0),n}function av(e,t){return function(o,r){const i=this,a=i.__v_raw,l=$t(a),s=t?s2:e?f2:Gp;return!e&&zr(l,"iterate",Cc),a.forEach((c,u)=>o.call(r,s(c),s(u),i))}}function lv(e,t,n){return function(...o){const r=this.__v_raw,i=$t(r),a=id(i),l=e==="entries"||e===Symbol.iterator&&a,s=e==="keys"&&a,c=r[e](...o),u=n?s2:t?f2:Gp;return!t&&zr(i,"iterate",s?T$:Cc),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:l?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function Ul(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function aQ(){const e={get(i){return ov(this,i)},get size(){return iv(this)},has:rv,add:S4,set:C4,delete:$4,clear:x4,forEach:av(!1,!1)},t={get(i){return ov(this,i,!1,!0)},get size(){return iv(this)},has:rv,add:S4,set:C4,delete:$4,clear:x4,forEach:av(!1,!0)},n={get(i){return ov(this,i,!0)},get size(){return iv(this,!0)},has(i){return rv.call(this,i,!0)},add:Ul("add"),set:Ul("set"),delete:Ul("delete"),clear:Ul("clear"),forEach:av(!0,!1)},o={get(i){return ov(this,i,!0,!0)},get size(){return iv(this,!0)},has(i){return rv.call(this,i,!0)},add:Ul("add"),set:Ul("set"),delete:Ul("delete"),clear:Ul("clear"),forEach:av(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=lv(i,!1,!1),n[i]=lv(i,!0,!1),t[i]=lv(i,!1,!0),o[i]=lv(i,!0,!0)}),[e,n,t,o]}const[lQ,sQ,cQ,uQ]=aQ();function c2(e,t){const n=t?e?uQ:cQ:e?sQ:lQ;return(o,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(dn(n,r)&&r in o?n:o,r,i)}const dQ={get:c2(!1,!1)},fQ={get:c2(!1,!0)},pQ={get:c2(!0,!1)},kL=new WeakMap,BL=new WeakMap,FL=new WeakMap,hQ=new WeakMap;function gQ(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function vQ(e){return e.__v_skip||!Object.isExtensible(e)?0:gQ(FZ(e))}function St(e){return Sd(e)?e:d2(e,!1,oQ,dQ,kL)}function HL(e){return d2(e,!1,iQ,fQ,BL)}function u2(e){return d2(e,!0,rQ,pQ,FL)}function d2(e,t,n,o,r){if(!Tn(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const a=vQ(e);if(a===0)return e;const l=new Proxy(e,a===2?o:n);return r.set(e,l),l}function gs(e){return Sd(e)?gs(e.__v_raw):!!(e&&e.__v_isReactive)}function Sd(e){return!!(e&&e.__v_isReadonly)}function Jm(e){return!!(e&&e.__v_isShallow)}function zL(e){return gs(e)||Sd(e)}function $t(e){const t=e&&e.__v_raw;return t?$t(t):e}function $b(e){return Zm(e,"__v_skip",!0),e}const Gp=e=>Tn(e)?St(e):e,f2=e=>Tn(e)?u2(e):e;class jL{constructor(t,n,o,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new i2(()=>t(this._value),()=>up(this,1),()=>this.dep&&ML(this.dep)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=o}get value(){const t=$t(this);return(!t._cacheable||t.effect.dirty)&&Cs(t._value,t._value=t.effect.run())&&up(t,2),WL(t),t.effect._dirtyLevel>=1&&up(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function mQ(e,t,n=!1){let o,r;const i=Ut(e);return i?(o=e,r=Ei):(o=e.get,r=e.set),new jL(o,r,i||!r,n)}function WL(e){hs&&Sc&&(e=$t(e),EL(Sc,e.dep||(e.dep=RL(()=>e.dep=void 0,e instanceof jL?e:void 0))))}function up(e,t=2,n){e=$t(e);const o=e.dep;o&&AL(o,t)}function Wn(e){return!!(e&&e.__v_isRef===!0)}function he(e){return VL(e,!1)}function ve(e){return VL(e,!0)}function VL(e,t){return Wn(e)?e:new bQ(e,t)}class bQ{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:$t(t),this._value=n?t:Gp(t)}get value(){return WL(this),this._value}set value(t){const n=this.__v_isShallow||Jm(t)||Sd(t);t=n?t:$t(t),Cs(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Gp(t),up(this,2))}}function KL(e){up(e,2)}function It(e){return Wn(e)?e.value:e}const yQ={get:(e,t,n)=>It(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Wn(r)&&!Wn(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function UL(e){return gs(e)?e:new Proxy(e,yQ)}function oa(e){const t=Lt(e)?new Array(e.length):{};for(const n in e)t[n]=GL(e,n);return t}class SQ{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return QZ($t(this._object),this._key)}}class CQ{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function st(e,t,n){return Wn(e)?e:Ut(e)?new CQ(e):Tn(e)&&arguments.length>1?GL(e,t,n):he(e)}function GL(e,t,n){const o=e[t];return Wn(o)?o:new SQ(e,t,n)}/** +* @vue/runtime-core v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function vs(e,t,n,o){let r;try{r=o?e(...o):e()}catch(i){xb(i,t,n)}return r}function Ai(e,t,n,o){if(Ut(e)){const i=vs(e,t,n,o);return i&&CL(i)&&i.catch(a=>{xb(a,t,n)}),i}const r=[];for(let i=0;i>>1,r=ir[o],i=Xp(r);iOa&&ir.splice(t,1)}function _Q(e){Lt(e)?ad.push(...e):(!ns||!ns.includes(e,e.allowRecurse?sc+1:sc))&&ad.push(e),XL()}function w4(e,t,n=Yp?Oa+1:0){for(;nXp(n)-Xp(o));if(ad.length=0,ns){ns.push(...t);return}for(ns=t,sc=0;sce.id==null?1/0:e.id,OQ=(e,t)=>{const n=Xp(e)-Xp(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ZL(e){E$=!1,Yp=!0,ir.sort(OQ);try{for(Oa=0;OaQn(h)?h.trim():h)),d&&(r=n.map(jZ))}let l,s=o[l=IS(t)]||o[l=IS(Da(t))];!s&&i&&(s=o[l=IS(Vc(t))]),s&&Ai(s,e,6,r);const c=o[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ai(c,e,6,r)}}function QL(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(r!==void 0)return r;const i=e.emits;let a={},l=!1;if(!Ut(e)){const s=c=>{const u=QL(c,t,!0);u&&(l=!0,bo(a,u))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!l?(Tn(e)&&o.set(e,null),null):(Lt(i)?i.forEach(s=>a[s]=null):bo(a,i),Tn(e)&&o.set(e,a),a)}function wb(e,t){return!e||!vb(t)?!1:(t=t.slice(2).replace(/Once$/,""),dn(e,t[0].toLowerCase()+t.slice(1))||dn(e,Vc(t))||dn(e,t))}let ho=null,_b=null;function e0(e){const t=ho;return ho=e,_b=e&&e.type.__scopeId||null,t}function Ps(e){_b=e}function Ts(){_b=null}function bn(e,t=ho,n){if(!t||e._n)return e;const o=(...r)=>{o._d&&F4(-1);const i=e0(t);let a;try{a=e(...r)}finally{e0(i),o._d&&F4(1)}return a};return o._n=!0,o._c=!0,o._d=!0,o}function ES(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:i,propsOptions:[a],slots:l,attrs:s,emit:c,render:u,renderCache:d,data:f,setupState:h,ctx:m,inheritAttrs:v}=e;let y,b;const $=e0(e);try{if(n.shapeFlag&4){const _=r||o,w=_;y=_a(u.call(w,_,d,i,h,f,m)),b=s}else{const _=t;y=_a(_.length>1?_(i,{attrs:s,slots:l,emit:c}):_(i,null)),b=t.props?s:PQ(s)}}catch(_){hp.length=0,xb(_,e,1),y=g(kr)}let x=y;if(b&&v!==!1){const _=Object.keys(b),{shapeFlag:w}=x;_.length&&w&7&&(a&&_.some(e2)&&(b=TQ(b,a)),x=ko(x,b))}return n.dirs&&(x=ko(x),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&(x.transition=n.transition),y=x,e0($),y}const PQ=e=>{let t;for(const n in e)(n==="class"||n==="style"||vb(n))&&((t||(t={}))[n]=e[n]);return t},TQ=(e,t)=>{const n={};for(const o in e)(!e2(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function EQ(e,t,n){const{props:o,children:r,component:i}=e,{props:a,children:l,patchFlag:s}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&s>=0){if(s&1024)return!0;if(s&16)return o?_4(o,a,c):!!a;if(s&8){const u=t.dynamicProps;for(let d=0;de.__isSuspense;function LQ(e,t){t&&t.pendingBranch?Lt(e)?t.effects.push(...e):t.effects.push(e):_Q(e)}const NQ=Symbol.for("v-scx"),kQ=()=>it(NQ);function ct(e,t){return Ob(e,null,t)}function BQ(e,t){return Ob(e,null,{flush:"post"})}const sv={};function Ie(e,t,n){return Ob(e,t,n)}function Ob(e,t,{immediate:n,deep:o,flush:r,once:i,onTrack:a,onTrigger:l}=Mn){if(t&&i){const I=t;t=(...O)=>{I(...O),w()}}const s=Ro,c=I=>o===!0?I:vc(I,o===!1?1:void 0);let u,d=!1,f=!1;if(Wn(e)?(u=()=>e.value,d=Jm(e)):gs(e)?(u=()=>c(e),d=!0):Lt(e)?(f=!0,d=e.some(I=>gs(I)||Jm(I)),u=()=>e.map(I=>{if(Wn(I))return I.value;if(gs(I))return c(I);if(Ut(I))return vs(I,s,2)})):Ut(e)?t?u=()=>vs(e,s,2):u=()=>(h&&h(),Ai(e,s,3,[m])):u=Ei,t&&o){const I=u;u=()=>vc(I())}let h,m=I=>{h=x.onStop=()=>{vs(I,s,4),h=x.onStop=void 0}},v;if(Rb)if(m=Ei,t?n&&Ai(t,s,3,[u(),f?[]:void 0,m]):u(),r==="sync"){const I=kQ();v=I.__watcherHandles||(I.__watcherHandles=[])}else return Ei;let y=f?new Array(e.length).fill(sv):sv;const b=()=>{if(!(!x.active||!x.dirty))if(t){const I=x.run();(o||d||(f?I.some((O,P)=>Cs(O,y[P])):Cs(I,y)))&&(h&&h(),Ai(t,s,3,[I,y===sv?void 0:f&&y[0]===sv?[]:y,m]),y=I)}else x.run()};b.allowRecurse=!!t;let $;r==="sync"?$=b:r==="post"?$=()=>Rr(b,s&&s.suspense):(b.pre=!0,s&&(b.id=s.uid),$=()=>h2(b));const x=new i2(u,Ei,$),_=Sb(),w=()=>{x.stop(),_&&t2(_.effects,x)};return t?n?b():y=x.run():r==="post"?Rr(x.run.bind(x),s&&s.suspense):x.run(),v&&v.push(w),w}function FQ(e,t,n){const o=this.proxy,r=Qn(e)?e.includes(".")?eN(o,e):()=>o[e]:e.bind(o,o);let i;Ut(t)?i=t:(i=t.handler,n=t);const a=Lh(this),l=Ob(r,i.bind(o),n);return a(),l}function eN(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;r0){if(n>=t)return e;n++}if(o=o||new Set,o.has(e))return e;if(o.add(e),Wn(e))vc(e.value,t,n,o);else if(Lt(e))for(let r=0;r{vc(r,t,n,o)});else if(xL(e))for(const r in e)vc(e[r],t,n,o);return e}function Ln(e,t){if(ho===null)return e;const n=Db(ho)||ho.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r{e.isMounted=!0}),Ct(()=>{e.isUnmounting=!0}),e}const xi=[Function,Array],nN={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:xi,onEnter:xi,onAfterEnter:xi,onEnterCancelled:xi,onBeforeLeave:xi,onLeave:xi,onAfterLeave:xi,onLeaveCancelled:xi,onBeforeAppear:xi,onAppear:xi,onAfterAppear:xi,onAppearCancelled:xi},HQ={name:"BaseTransition",props:nN,setup(e,{slots:t}){const n=Nn(),o=tN();let r;return()=>{const i=t.default&&m2(t.default(),!0);if(!i||!i.length)return;let a=i[0];if(i.length>1){for(const v of i)if(v.type!==kr){a=v;break}}const l=$t(e),{mode:s}=l;if(o.isLeaving)return AS(a);const c=P4(a);if(!c)return AS(a);const u=qp(c,l,o,n);Zp(c,u);const d=n.subTree,f=d&&P4(d);let h=!1;const{getTransitionKey:m}=c.type;if(m){const v=m();r===void 0?r=v:v!==r&&(r=v,h=!0)}if(f&&f.type!==kr&&(!cc(c,f)||h)){const v=qp(f,l,o,n);if(Zp(f,v),s==="out-in")return o.isLeaving=!0,v.afterLeave=()=>{o.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},AS(a);s==="in-out"&&c.type!==kr&&(v.delayLeave=(y,b,$)=>{const x=oN(o,f);x[String(f.key)]=f,y[os]=()=>{b(),y[os]=void 0,delete u.delayedLeave},u.delayedLeave=$})}return a}}},zQ=HQ;function oN(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function qp(e,t,n,o){const{appear:r,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:s,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:f,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:v,onAppear:y,onAfterAppear:b,onAppearCancelled:$}=t,x=String(e.key),_=oN(n,e),w=(P,E)=>{P&&Ai(P,o,9,E)},I=(P,E)=>{const R=E[1];w(P,E),Lt(P)?P.every(A=>A.length<=1)&&R():P.length<=1&&R()},O={mode:i,persisted:a,beforeEnter(P){let E=l;if(!n.isMounted)if(r)E=v||l;else return;P[os]&&P[os](!0);const R=_[x];R&&cc(e,R)&&R.el[os]&&R.el[os](),w(E,[P])},enter(P){let E=s,R=c,A=u;if(!n.isMounted)if(r)E=y||s,R=b||c,A=$||u;else return;let N=!1;const F=P[cv]=W=>{N||(N=!0,W?w(A,[P]):w(R,[P]),O.delayedLeave&&O.delayedLeave(),P[cv]=void 0)};E?I(E,[P,F]):F()},leave(P,E){const R=String(e.key);if(P[cv]&&P[cv](!0),n.isUnmounting)return E();w(d,[P]);let A=!1;const N=P[os]=F=>{A||(A=!0,E(),F?w(m,[P]):w(h,[P]),P[os]=void 0,_[R]===e&&delete _[R])};_[R]=e,f?I(f,[P,N]):N()},clone(P){return qp(P,t,n,o)}};return O}function AS(e){if(Ib(e))return e=ko(e),e.children=null,e}function P4(e){return Ib(e)?e.children?e.children[0]:void 0:e}function Zp(e,t){e.shapeFlag&6&&e.component?Zp(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function m2(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;i!!e.type.__asyncLoader,Ib=e=>e.type.__isKeepAlive;function Pb(e,t){iN(e,"a",t)}function rN(e,t){iN(e,"da",t)}function iN(e,t,n=Ro){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Tb(t,o,n),n){let r=n.parent;for(;r&&r.parent;)Ib(r.parent.vnode)&&jQ(o,t,n,r),r=r.parent}}function jQ(e,t,n,o){const r=Tb(t,e,o,!0);Fo(()=>{t2(o[t],r)},n)}function Tb(e,t,n=Ro,o=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...a)=>{if(n.isUnmounted)return;Kc();const l=Lh(n),s=Ai(t,n,e,a);return l(),Uc(),s});return o?r.unshift(i):r.push(i),i}}const wl=e=>(t,n=Ro)=>(!Rb||e==="sp")&&Tb(e,(...o)=>t(...o),n),Dh=wl("bm"),lt=wl("m"),Eb=wl("bu"),fr=wl("u"),Ct=wl("bum"),Fo=wl("um"),WQ=wl("sp"),VQ=wl("rtg"),KQ=wl("rtc");function UQ(e,t=Ro){Tb("ec",e,t)}function Cd(e,t,n,o){let r;const i=n&&n[o];if(Lt(e)||Qn(e)){r=new Array(e.length);for(let a=0,l=e.length;at(a,l,void 0,i&&i[l]));else{const a=Object.keys(e);r=new Array(a.length);for(let l=0,s=a.length;l{const i=o.fn(...r);return i&&(i.key=o.key),i}:o.fn)}return e}function GQ(e,t,n={},o,r){if(ho.isCE||ho.parent&&dp(ho.parent)&&ho.parent.isCE)return t!=="default"&&(n.name=t),g("slot",n,o&&o());let i=e[t];i&&i._c&&(i._d=!1),ht();const a=i&&aN(i(n)),l=jn(Je,{key:n.key||a&&a.key||`_${t}`},a||(o?o():[]),a&&e._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function aN(e){return e.some(t=>mo(t)?!(t.type===kr||t.type===Je&&!aN(t.children)):!0)?e:null}const A$=e=>e?bN(e)?Db(e)||e.proxy:A$(e.parent):null,fp=bo(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=>A$(e.parent),$root:e=>A$(e.root),$emit:e=>e.emit,$options:e=>b2(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,h2(e.update)}),$nextTick:e=>e.n||(e.n=wt.bind(e.proxy)),$watch:e=>FQ.bind(e)}),MS=(e,t)=>e!==Mn&&!e.__isScriptSetup&&dn(e,t),YQ={get({_:e},t){const{ctx:n,setupState:o,data:r,props:i,accessCache:a,type:l,appContext:s}=e;let c;if(t[0]!=="$"){const h=a[t];if(h!==void 0)switch(h){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(MS(o,t))return a[t]=1,o[t];if(r!==Mn&&dn(r,t))return a[t]=2,r[t];if((c=e.propsOptions[0])&&dn(c,t))return a[t]=3,i[t];if(n!==Mn&&dn(n,t))return a[t]=4,n[t];M$&&(a[t]=0)}}const u=fp[t];let d,f;if(u)return t==="$attrs"&&zr(e,"get",t),u(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==Mn&&dn(n,t))return a[t]=4,n[t];if(f=s.config.globalProperties,dn(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return MS(r,t)?(r[t]=n,!0):o!==Mn&&dn(o,t)?(o[t]=n,!0):dn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:i}},a){let l;return!!n[a]||e!==Mn&&dn(e,a)||MS(t,a)||(l=i[0])&&dn(l,a)||dn(o,a)||dn(fp,a)||dn(r.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:dn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function XQ(){return qQ().attrs}function qQ(){const e=Nn();return e.setupContext||(e.setupContext=SN(e))}function T4(e){return Lt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let M$=!0;function ZQ(e){const t=b2(e),n=e.proxy,o=e.ctx;M$=!1,t.beforeCreate&&E4(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:a,watch:l,provide:s,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:h,updated:m,activated:v,deactivated:y,beforeDestroy:b,beforeUnmount:$,destroyed:x,unmounted:_,render:w,renderTracked:I,renderTriggered:O,errorCaptured:P,serverPrefetch:E,expose:R,inheritAttrs:A,components:N,directives:F,filters:W}=t;if(c&&QQ(c,o,null),a)for(const k in a){const L=a[k];Ut(L)&&(o[k]=L.bind(n))}if(r){const k=r.call(n,n);Tn(k)&&(e.data=St(k))}if(M$=!0,i)for(const k in i){const L=i[k],z=Ut(L)?L.bind(n,n):Ut(L.get)?L.get.bind(n,n):Ei,K=!Ut(L)&&Ut(L.set)?L.set.bind(n):Ei,G=M({get:z,set:K});Object.defineProperty(o,k,{enumerable:!0,configurable:!0,get:()=>G.value,set:Y=>G.value=Y})}if(l)for(const k in l)lN(l[k],o,n,k);if(s){const k=Ut(s)?s.call(n):s;Reflect.ownKeys(k).forEach(L=>{ft(L,k[L])})}u&&E4(u,e,"c");function B(k,L){Lt(L)?L.forEach(z=>k(z.bind(n))):L&&k(L.bind(n))}if(B(Dh,d),B(lt,f),B(Eb,h),B(fr,m),B(Pb,v),B(rN,y),B(UQ,P),B(KQ,I),B(VQ,O),B(Ct,$),B(Fo,_),B(WQ,E),Lt(R))if(R.length){const k=e.exposed||(e.exposed={});R.forEach(L=>{Object.defineProperty(k,L,{get:()=>n[L],set:z=>n[L]=z})})}else e.exposed||(e.exposed={});w&&e.render===Ei&&(e.render=w),A!=null&&(e.inheritAttrs=A),N&&(e.components=N),F&&(e.directives=F)}function QQ(e,t,n=Ei){Lt(e)&&(e=R$(e));for(const o in e){const r=e[o];let i;Tn(r)?"default"in r?i=it(r.from||o,r.default,!0):i=it(r.from||o):i=it(r),Wn(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[o]=i}}function E4(e,t,n){Ai(Lt(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function lN(e,t,n,o){const r=o.includes(".")?eN(n,o):()=>n[o];if(Qn(e)){const i=t[e];Ut(i)&&Ie(r,i)}else if(Ut(e))Ie(r,e.bind(n));else if(Tn(e))if(Lt(e))e.forEach(i=>lN(i,t,n,o));else{const i=Ut(e.handler)?e.handler.bind(n):t[e.handler];Ut(i)&&Ie(r,i,e)}}function b2(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,l=i.get(t);let s;return l?s=l:!r.length&&!n&&!o?s=t:(s={},r.length&&r.forEach(c=>t0(s,c,a,!0)),t0(s,t,a)),Tn(t)&&i.set(t,s),s}function t0(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&t0(e,i,n,!0),r&&r.forEach(a=>t0(e,a,n,!0));for(const a in t)if(!(o&&a==="expose")){const l=JQ[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const JQ={data:A4,props:M4,emits:M4,methods:tp,computed:tp,beforeCreate:mr,created:mr,beforeMount:mr,mounted:mr,beforeUpdate:mr,updated:mr,beforeDestroy:mr,beforeUnmount:mr,destroyed:mr,unmounted:mr,activated:mr,deactivated:mr,errorCaptured:mr,serverPrefetch:mr,components:tp,directives:tp,watch:tJ,provide:A4,inject:eJ};function A4(e,t){return t?e?function(){return bo(Ut(e)?e.call(this,this):e,Ut(t)?t.call(this,this):t)}:t:e}function eJ(e,t){return tp(R$(e),R$(t))}function R$(e){if(Lt(e)){const t={};for(let n=0;n1)return n&&Ut(t)?t.call(o&&o.proxy):t}}function rJ(){return!!(Ro||ho||Qp)}function iJ(e,t,n,o=!1){const r={},i={};Zm(i,Mb,1),e.propsDefaults=Object.create(null),cN(e,t,r,i);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);n?e.props=o?r:HL(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function aJ(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:a}}=e,l=$t(r),[s]=e.propsOptions;let c=!1;if((o||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let d=0;d{s=!0;const[f,h]=uN(d,t,!0);bo(a,f),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!s)return Tn(e)&&o.set(e,rd),rd;if(Lt(i))for(let u=0;u-1,h[1]=v<0||m-1||dn(h,"default"))&&l.push(d)}}}const c=[a,l];return Tn(e)&&o.set(e,c),c}function R4(e){return e[0]!=="$"}function D4(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function L4(e,t){return D4(e)===D4(t)}function N4(e,t){return Lt(t)?t.findIndex(n=>L4(n,e)):Ut(t)&&L4(t,e)?0:-1}const dN=e=>e[0]==="_"||e==="$stable",y2=e=>Lt(e)?e.map(_a):[_a(e)],lJ=(e,t,n)=>{if(t._n)return t;const o=bn((...r)=>y2(t(...r)),n);return o._c=!1,o},fN=(e,t,n)=>{const o=e._ctx;for(const r in e){if(dN(r))continue;const i=e[r];if(Ut(i))t[r]=lJ(r,i,o);else if(i!=null){const a=y2(i);t[r]=()=>a}}},pN=(e,t)=>{const n=y2(t);e.slots.default=()=>n},sJ=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=$t(t),Zm(t,"_",n)):fN(t,e.slots={})}else e.slots={},t&&pN(e,t);Zm(e.slots,Mb,1)},cJ=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,a=Mn;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:(bo(r,t),!n&&l===1&&delete r._):(i=!t.$stable,fN(t,r)),a=t}else t&&(pN(e,t),a={default:1});if(i)for(const l in r)!dN(l)&&a[l]==null&&delete r[l]};function L$(e,t,n,o,r=!1){if(Lt(e)){e.forEach((f,h)=>L$(f,t&&(Lt(t)?t[h]:t),n,o,r));return}if(dp(o)&&!r)return;const i=o.shapeFlag&4?Db(o.component)||o.component.proxy:o.el,a=r?null:i,{i:l,r:s}=e,c=t&&t.r,u=l.refs===Mn?l.refs={}:l.refs,d=l.setupState;if(c!=null&&c!==s&&(Qn(c)?(u[c]=null,dn(d,c)&&(d[c]=null)):Wn(c)&&(c.value=null)),Ut(s))vs(s,l,12,[a,u]);else{const f=Qn(s),h=Wn(s),m=e.f;if(f||h){const v=()=>{if(m){const y=f?dn(d,s)?d[s]:u[s]:s.value;r?Lt(y)&&t2(y,i):Lt(y)?y.includes(i)||y.push(i):f?(u[s]=[i],dn(d,s)&&(d[s]=u[s])):(s.value=[i],e.k&&(u[e.k]=s.value))}else f?(u[s]=a,dn(d,s)&&(d[s]=a)):h&&(s.value=a,e.k&&(u[e.k]=a))};r||m?v():(v.id=-1,Rr(v,n))}}}const Rr=LQ;function uJ(e){return dJ(e)}function dJ(e,t){const n=wL();n.__VUE__=!0;const{insert:o,remove:r,patchProp:i,createElement:a,createText:l,createComment:s,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:h=Ei,insertStaticContent:m}=e,v=(H,j,q,se=null,ae=null,ge=null,Se=void 0,$e=null,_e=!!j.dynamicChildren)=>{if(H===j)return;H&&!cc(H,j)&&(se=ee(H),Y(H,ae,ge,!0),H=null),j.patchFlag===-2&&(_e=!1,j.dynamicChildren=null);const{type:be,ref:Te,shapeFlag:Pe}=j;switch(be){case _l:y(H,j,q,se);break;case kr:b(H,j,q,se);break;case om:H==null&&$(j,q,se,Se);break;case Je:N(H,j,q,se,ae,ge,Se,$e,_e);break;default:Pe&1?w(H,j,q,se,ae,ge,Se,$e,_e):Pe&6?F(H,j,q,se,ae,ge,Se,$e,_e):(Pe&64||Pe&128)&&be.process(H,j,q,se,ae,ge,Se,$e,_e,X)}Te!=null&&ae&&L$(Te,H&&H.ref,ge,j||H,!j)},y=(H,j,q,se)=>{if(H==null)o(j.el=l(j.children),q,se);else{const ae=j.el=H.el;j.children!==H.children&&c(ae,j.children)}},b=(H,j,q,se)=>{H==null?o(j.el=s(j.children||""),q,se):j.el=H.el},$=(H,j,q,se)=>{[H.el,H.anchor]=m(H.children,j,q,se,H.el,H.anchor)},x=({el:H,anchor:j},q,se)=>{let ae;for(;H&&H!==j;)ae=f(H),o(H,q,se),H=ae;o(j,q,se)},_=({el:H,anchor:j})=>{let q;for(;H&&H!==j;)q=f(H),r(H),H=q;r(j)},w=(H,j,q,se,ae,ge,Se,$e,_e)=>{j.type==="svg"?Se="svg":j.type==="math"&&(Se="mathml"),H==null?I(j,q,se,ae,ge,Se,$e,_e):E(H,j,ae,ge,Se,$e,_e)},I=(H,j,q,se,ae,ge,Se,$e)=>{let _e,be;const{props:Te,shapeFlag:Pe,transition:oe,dirs:le}=H;if(_e=H.el=a(H.type,ge,Te&&Te.is,Te),Pe&8?u(_e,H.children):Pe&16&&P(H.children,_e,null,se,ae,RS(H,ge),Se,$e),le&&Xs(H,null,se,"created"),O(_e,H,H.scopeId,Se,se),Te){for(const Ae in Te)Ae!=="value"&&!nm(Ae)&&i(_e,Ae,null,Te[Ae],ge,H.children,se,ae,te);"value"in Te&&i(_e,"value",null,Te.value,ge),(be=Te.onVnodeBeforeMount)&&ya(be,se,H)}le&&Xs(H,null,se,"beforeMount");const xe=fJ(ae,oe);xe&&oe.beforeEnter(_e),o(_e,j,q),((be=Te&&Te.onVnodeMounted)||xe||le)&&Rr(()=>{be&&ya(be,se,H),xe&&oe.enter(_e),le&&Xs(H,null,se,"mounted")},ae)},O=(H,j,q,se,ae)=>{if(q&&h(H,q),se)for(let ge=0;ge{for(let be=_e;be{const $e=j.el=H.el;let{patchFlag:_e,dynamicChildren:be,dirs:Te}=j;_e|=H.patchFlag&16;const Pe=H.props||Mn,oe=j.props||Mn;let le;if(q&&qs(q,!1),(le=oe.onVnodeBeforeUpdate)&&ya(le,q,j,H),Te&&Xs(j,H,q,"beforeUpdate"),q&&qs(q,!0),be?R(H.dynamicChildren,be,$e,q,se,RS(j,ae),ge):Se||L(H,j,$e,null,q,se,RS(j,ae),ge,!1),_e>0){if(_e&16)A($e,j,Pe,oe,q,se,ae);else if(_e&2&&Pe.class!==oe.class&&i($e,"class",null,oe.class,ae),_e&4&&i($e,"style",Pe.style,oe.style,ae),_e&8){const xe=j.dynamicProps;for(let Ae=0;Ae{le&&ya(le,q,j,H),Te&&Xs(j,H,q,"updated")},se)},R=(H,j,q,se,ae,ge,Se)=>{for(let $e=0;$e{if(q!==se){if(q!==Mn)for(const $e in q)!nm($e)&&!($e in se)&&i(H,$e,q[$e],null,Se,j.children,ae,ge,te);for(const $e in se){if(nm($e))continue;const _e=se[$e],be=q[$e];_e!==be&&$e!=="value"&&i(H,$e,be,_e,Se,j.children,ae,ge,te)}"value"in se&&i(H,"value",q.value,se.value,Se)}},N=(H,j,q,se,ae,ge,Se,$e,_e)=>{const be=j.el=H?H.el:l(""),Te=j.anchor=H?H.anchor:l("");let{patchFlag:Pe,dynamicChildren:oe,slotScopeIds:le}=j;le&&($e=$e?$e.concat(le):le),H==null?(o(be,q,se),o(Te,q,se),P(j.children||[],q,Te,ae,ge,Se,$e,_e)):Pe>0&&Pe&64&&oe&&H.dynamicChildren?(R(H.dynamicChildren,oe,q,ae,ge,Se,$e),(j.key!=null||ae&&j===ae.subTree)&&S2(H,j,!0)):L(H,j,q,Te,ae,ge,Se,$e,_e)},F=(H,j,q,se,ae,ge,Se,$e,_e)=>{j.slotScopeIds=$e,H==null?j.shapeFlag&512?ae.ctx.activate(j,q,se,Se,_e):W(j,q,se,ae,ge,Se,_e):D(H,j,_e)},W=(H,j,q,se,ae,ge,Se)=>{const $e=H.component=$J(H,se,ae);if(Ib(H)&&($e.ctx.renderer=X),xJ($e),$e.asyncDep){if(ae&&ae.registerDep($e,B),!H.el){const _e=$e.subTree=g(kr);b(null,_e,j,q)}}else B($e,H,j,q,ae,ge,Se)},D=(H,j,q)=>{const se=j.component=H.component;if(EQ(H,j,q))if(se.asyncDep&&!se.asyncResolved){k(se,j,q);return}else se.next=j,wQ(se.update),se.effect.dirty=!0,se.update();else j.el=H.el,se.vnode=j},B=(H,j,q,se,ae,ge,Se)=>{const $e=()=>{if(H.isMounted){let{next:Te,bu:Pe,u:oe,parent:le,vnode:xe}=H;{const Le=hN(H);if(Le){Te&&(Te.el=xe.el,k(H,Te,Se)),Le.asyncDep.then(()=>{H.isUnmounted||$e()});return}}let Ae=Te,Be;qs(H,!1),Te?(Te.el=xe.el,k(H,Te,Se)):Te=xe,Pe&&PS(Pe),(Be=Te.props&&Te.props.onVnodeBeforeUpdate)&&ya(Be,le,Te,xe),qs(H,!0);const Ye=ES(H),Re=H.subTree;H.subTree=Ye,v(Re,Ye,d(Re.el),ee(Re),H,ae,ge),Te.el=Ye.el,Ae===null&&AQ(H,Ye.el),oe&&Rr(oe,ae),(Be=Te.props&&Te.props.onVnodeUpdated)&&Rr(()=>ya(Be,le,Te,xe),ae)}else{let Te;const{el:Pe,props:oe}=j,{bm:le,m:xe,parent:Ae}=H,Be=dp(j);if(qs(H,!1),le&&PS(le),!Be&&(Te=oe&&oe.onVnodeBeforeMount)&&ya(Te,Ae,j),qs(H,!0),Pe&&ye){const Ye=()=>{H.subTree=ES(H),ye(Pe,H.subTree,H,ae,null)};Be?j.type.__asyncLoader().then(()=>!H.isUnmounted&&Ye()):Ye()}else{const Ye=H.subTree=ES(H);v(null,Ye,q,se,H,ae,ge),j.el=Ye.el}if(xe&&Rr(xe,ae),!Be&&(Te=oe&&oe.onVnodeMounted)){const Ye=j;Rr(()=>ya(Te,Ae,Ye),ae)}(j.shapeFlag&256||Ae&&dp(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&H.a&&Rr(H.a,ae),H.isMounted=!0,j=q=se=null}},_e=H.effect=new i2($e,Ei,()=>h2(be),H.scope),be=H.update=()=>{_e.dirty&&_e.run()};be.id=H.uid,qs(H,!0),be()},k=(H,j,q)=>{j.component=H;const se=H.vnode.props;H.vnode=j,H.next=null,aJ(H,j.props,se,q),cJ(H,j.children,q),Kc(),w4(H),Uc()},L=(H,j,q,se,ae,ge,Se,$e,_e=!1)=>{const be=H&&H.children,Te=H?H.shapeFlag:0,Pe=j.children,{patchFlag:oe,shapeFlag:le}=j;if(oe>0){if(oe&128){K(be,Pe,q,se,ae,ge,Se,$e,_e);return}else if(oe&256){z(be,Pe,q,se,ae,ge,Se,$e,_e);return}}le&8?(Te&16&&te(be,ae,ge),Pe!==be&&u(q,Pe)):Te&16?le&16?K(be,Pe,q,se,ae,ge,Se,$e,_e):te(be,ae,ge,!0):(Te&8&&u(q,""),le&16&&P(Pe,q,se,ae,ge,Se,$e,_e))},z=(H,j,q,se,ae,ge,Se,$e,_e)=>{H=H||rd,j=j||rd;const be=H.length,Te=j.length,Pe=Math.min(be,Te);let oe;for(oe=0;oeTe?te(H,ae,ge,!0,!1,Pe):P(j,q,se,ae,ge,Se,$e,_e,Pe)},K=(H,j,q,se,ae,ge,Se,$e,_e)=>{let be=0;const Te=j.length;let Pe=H.length-1,oe=Te-1;for(;be<=Pe&&be<=oe;){const le=H[be],xe=j[be]=_e?rs(j[be]):_a(j[be]);if(cc(le,xe))v(le,xe,q,null,ae,ge,Se,$e,_e);else break;be++}for(;be<=Pe&&be<=oe;){const le=H[Pe],xe=j[oe]=_e?rs(j[oe]):_a(j[oe]);if(cc(le,xe))v(le,xe,q,null,ae,ge,Se,$e,_e);else break;Pe--,oe--}if(be>Pe){if(be<=oe){const le=oe+1,xe=leoe)for(;be<=Pe;)Y(H[be],ae,ge,!0),be++;else{const le=be,xe=be,Ae=new Map;for(be=xe;be<=oe;be++){const Ue=j[be]=_e?rs(j[be]):_a(j[be]);Ue.key!=null&&Ae.set(Ue.key,be)}let Be,Ye=0;const Re=oe-xe+1;let Le=!1,Ne=0;const Ke=new Array(Re);for(be=0;be=Re){Y(Ue,ae,ge,!0);continue}let Xe;if(Ue.key!=null)Xe=Ae.get(Ue.key);else for(Be=xe;Be<=oe;Be++)if(Ke[Be-xe]===0&&cc(Ue,j[Be])){Xe=Be;break}Xe===void 0?Y(Ue,ae,ge,!0):(Ke[Xe-xe]=be+1,Xe>=Ne?Ne=Xe:Le=!0,v(Ue,j[Xe],q,null,ae,ge,Se,$e,_e),Ye++)}const Ze=Le?pJ(Ke):rd;for(Be=Ze.length-1,be=Re-1;be>=0;be--){const Ue=xe+be,Xe=j[Ue],xt=Ue+1{const{el:ge,type:Se,transition:$e,children:_e,shapeFlag:be}=H;if(be&6){G(H.component.subTree,j,q,se);return}if(be&128){H.suspense.move(j,q,se);return}if(be&64){Se.move(H,j,q,X);return}if(Se===Je){o(ge,j,q);for(let Pe=0;Pe<_e.length;Pe++)G(_e[Pe],j,q,se);o(H.anchor,j,q);return}if(Se===om){x(H,j,q);return}if(se!==2&&be&1&&$e)if(se===0)$e.beforeEnter(ge),o(ge,j,q),Rr(()=>$e.enter(ge),ae);else{const{leave:Pe,delayLeave:oe,afterLeave:le}=$e,xe=()=>o(ge,j,q),Ae=()=>{Pe(ge,()=>{xe(),le&&le()})};oe?oe(ge,xe,Ae):Ae()}else o(ge,j,q)},Y=(H,j,q,se=!1,ae=!1)=>{const{type:ge,props:Se,ref:$e,children:_e,dynamicChildren:be,shapeFlag:Te,patchFlag:Pe,dirs:oe}=H;if($e!=null&&L$($e,null,q,H,!0),Te&256){j.ctx.deactivate(H);return}const le=Te&1&&oe,xe=!dp(H);let Ae;if(xe&&(Ae=Se&&Se.onVnodeBeforeUnmount)&&ya(Ae,j,H),Te&6)J(H.component,q,se);else{if(Te&128){H.suspense.unmount(q,se);return}le&&Xs(H,null,j,"beforeUnmount"),Te&64?H.type.remove(H,j,q,ae,X,se):be&&(ge!==Je||Pe>0&&Pe&64)?te(be,j,q,!1,!0):(ge===Je&&Pe&384||!ae&&Te&16)&&te(_e,j,q),se&&ne(H)}(xe&&(Ae=Se&&Se.onVnodeUnmounted)||le)&&Rr(()=>{Ae&&ya(Ae,j,H),le&&Xs(H,null,j,"unmounted")},q)},ne=H=>{const{type:j,el:q,anchor:se,transition:ae}=H;if(j===Je){re(q,se);return}if(j===om){_(H);return}const ge=()=>{r(q),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(H.shapeFlag&1&&ae&&!ae.persisted){const{leave:Se,delayLeave:$e}=ae,_e=()=>Se(q,ge);$e?$e(H.el,ge,_e):_e()}else ge()},re=(H,j)=>{let q;for(;H!==j;)q=f(H),r(H),H=q;r(j)},J=(H,j,q)=>{const{bum:se,scope:ae,update:ge,subTree:Se,um:$e}=H;se&&PS(se),ae.stop(),ge&&(ge.active=!1,Y(Se,H,j,q)),$e&&Rr($e,j),Rr(()=>{H.isUnmounted=!0},j),j&&j.pendingBranch&&!j.isUnmounted&&H.asyncDep&&!H.asyncResolved&&H.suspenseId===j.pendingId&&(j.deps--,j.deps===0&&j.resolve())},te=(H,j,q,se=!1,ae=!1,ge=0)=>{for(let Se=ge;SeH.shapeFlag&6?ee(H.component.subTree):H.shapeFlag&128?H.suspense.next():f(H.anchor||H.el);let fe=!1;const ie=(H,j,q)=>{H==null?j._vnode&&Y(j._vnode,null,null,!0):v(j._vnode||null,H,j,null,null,null,q),fe||(fe=!0,w4(),qL(),fe=!1),j._vnode=H},X={p:v,um:Y,m:G,r:ne,mt:W,mc:P,pc:L,pbc:R,n:ee,o:e};let ue,ye;return t&&([ue,ye]=t(X)),{render:ie,hydrate:ue,createApp:oJ(ie,ue)}}function RS({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 qs({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function fJ(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function S2(e,t,n=!1){const o=e.children,r=t.children;if(Lt(o)&&Lt(r))for(let i=0;i>1,e[n[l]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,a=n[i-1];i-- >0;)n[i]=a,a=t[a];return n}function hN(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hN(t)}const hJ=e=>e.__isTeleport,pp=e=>e&&(e.disabled||e.disabled===""),k4=e=>typeof SVGElement<"u"&&e instanceof SVGElement,B4=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,N$=(e,t)=>{const n=e&&e.to;return Qn(n)?t?t(n):null:n},gJ={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,i,a,l,s,c){const{mc:u,pc:d,pbc:f,o:{insert:h,querySelector:m,createText:v,createComment:y}}=c,b=pp(t.props);let{shapeFlag:$,children:x,dynamicChildren:_}=t;if(e==null){const w=t.el=v(""),I=t.anchor=v("");h(w,n,o),h(I,n,o);const O=t.target=N$(t.props,m),P=t.targetAnchor=v("");O&&(h(P,O),a==="svg"||k4(O)?a="svg":(a==="mathml"||B4(O))&&(a="mathml"));const E=(R,A)=>{$&16&&u(x,R,A,r,i,a,l,s)};b?E(n,I):O&&E(O,P)}else{t.el=e.el;const w=t.anchor=e.anchor,I=t.target=e.target,O=t.targetAnchor=e.targetAnchor,P=pp(e.props),E=P?n:I,R=P?w:O;if(a==="svg"||k4(I)?a="svg":(a==="mathml"||B4(I))&&(a="mathml"),_?(f(e.dynamicChildren,_,E,r,i,a,l),S2(e,t,!0)):s||d(e,t,E,R,r,i,a,l,!1),b)P?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):uv(t,n,w,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=N$(t.props,m);A&&uv(t,A,null,c,0)}else P&&uv(t,I,O,c,1)}gN(t)},remove(e,t,n,o,{um:r,o:{remove:i}},a){const{shapeFlag:l,children:s,anchor:c,targetAnchor:u,target:d,props:f}=e;if(d&&i(u),a&&i(c),l&16){const h=a||!pp(f);for(let m=0;m0?ea||rd:null,mJ(),Jp>0&&ea&&ea.push(e),e}function qt(e,t,n,o,r,i){return vN(tt(e,t,n,o,r,i,!0))}function jn(e,t,n,o,r){return vN(g(e,t,n,o,r,!0))}function mo(e){return e?e.__v_isVNode===!0:!1}function cc(e,t){return e.type===t.type&&e.key===t.key}const Mb="__vInternal",mN=({key:e})=>e??null,rm=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Qn(e)||Wn(e)||Ut(e)?{i:ho,r:e,k:t,f:!!n}:e:null);function tt(e,t=null,n=null,o=0,r=null,i=e===Je?0:1,a=!1,l=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mN(t),ref:t&&rm(t),scopeId:_b,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ho};return l?(C2(s,n),i&128&&e.normalize(s)):n&&(s.shapeFlag|=Qn(n)?8:16),Jp>0&&!a&&ea&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&ea.push(s),s}const g=bJ;function bJ(e,t=null,n=null,o=0,r=null,i=!1){if((!e||e===JL)&&(e=kr),mo(e)){const l=ko(e,t,!0);return n&&C2(l,n),Jp>0&&!i&&ea&&(l.shapeFlag&6?ea[ea.indexOf(e)]=l:ea.push(l)),l.patchFlag|=-2,l}if(IJ(e)&&(e=e.__vccOpts),t){t=yJ(t);let{class:l,style:s}=t;l&&!Qn(l)&&(t.class=Oo(l)),Tn(s)&&(zL(s)&&!Lt(s)&&(s=bo({},s)),t.style=vo(s))}const a=Qn(e)?1:DQ(e)?128:hJ(e)?64:Tn(e)?4:Ut(e)?2:0;return tt(e,t,n,o,r,a,i,!0)}function yJ(e){return e?zL(e)||Mb in e?bo({},e):e:null}function ko(e,t,n=!1){const{props:o,ref:r,patchFlag:i,children:a}=e,l=t?k$(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&mN(l),ref:t&&t.ref?n&&r?Lt(r)?r.concat(rm(t)):[r,rm(t)]:rm(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Je?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ko(e.ssContent),ssFallback:e.ssFallback&&ko(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Do(e=" ",t=0){return g(_l,null,e,t)}function zn(e="",t=!1){return t?(ht(),jn(kr,null,e)):g(kr,null,e)}function _a(e){return e==null||typeof e=="boolean"?g(kr):Lt(e)?g(Je,null,e.slice()):typeof e=="object"?rs(e):g(_l,null,String(e))}function rs(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ko(e)}function C2(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(Lt(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),C2(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(Mb in t)?t._ctx=ho:r===3&&ho&&(ho.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ut(t)?(t={default:t,_ctx:ho},n=32):(t=String(t),o&64?(n=16,t=[Do(t)]):n=8);e.children=t,e.shapeFlag|=n}function k$(...e){const t={};for(let n=0;nRo||ho;let n0,B$;{const e=wL(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),i=>{r.length>1?r.forEach(a=>a(i)):r[0](i)}};n0=t("__VUE_INSTANCE_SETTERS__",n=>Ro=n),B$=t("__VUE_SSR_SETTERS__",n=>Rb=n)}const Lh=e=>{const t=Ro;return n0(e),e.scope.on(),()=>{e.scope.off(),n0(t)}},H4=()=>{Ro&&Ro.scope.off(),n0(null)};function bN(e){return e.vnode.shapeFlag&4}let Rb=!1;function xJ(e,t=!1){t&&B$(t);const{props:n,children:o}=e.vnode,r=bN(e);iJ(e,n,r,t),sJ(e,o);const i=r?wJ(e,t):void 0;return t&&B$(!1),i}function wJ(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=$b(new Proxy(e.ctx,YQ));const{setup:o}=n;if(o){const r=e.setupContext=o.length>1?SN(e):null,i=Lh(e);Kc();const a=vs(o,e,0,[e.props,r]);if(Uc(),i(),CL(a)){if(a.then(H4,H4),t)return a.then(l=>{z4(e,l,t)}).catch(l=>{xb(l,e,0)});e.asyncDep=a}else z4(e,a,t)}else yN(e,t)}function z4(e,t,n){Ut(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Tn(t)&&(e.setupState=UL(t)),yN(e,n)}let j4;function yN(e,t,n){const o=e.type;if(!e.render){if(!t&&j4&&!o.render){const r=o.template||b2(e).template;if(r){const{isCustomElement:i,compilerOptions:a}=e.appContext.config,{delimiters:l,compilerOptions:s}=o,c=bo(bo({isCustomElement:i,delimiters:l},a),s);o.render=j4(r,c)}}e.render=o.render||Ei}{const r=Lh(e);Kc();try{ZQ(e)}finally{Uc(),r()}}}function _J(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return zr(e,"get","$attrs"),t[n]}}))}function SN(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return _J(e)},slots:e.slots,emit:e.emit,expose:t}}function Db(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(UL($b(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in fp)return fp[n](e)},has(t,n){return n in t||n in fp}}))}function OJ(e,t=!0){return Ut(e)?e.displayName||e.name:e.name||t&&e.__name}function IJ(e){return Ut(e)&&"__vccOpts"in e}const M=(e,t)=>mQ(e,t,Rb);function Ni(e,t,n){const o=arguments.length;return o===2?Tn(t)&&!Lt(t)?mo(t)?g(e,null,[t]):g(e,t):g(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&mo(n)&&(n=[n]),g(e,t,n))}const PJ="3.4.15";/** +* @vue/runtime-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const TJ="http://www.w3.org/2000/svg",EJ="http://www.w3.org/1998/Math/MathML",is=typeof document<"u"?document:null,W4=is&&is.createElement("template"),AJ={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?is.createElementNS(TJ,e):t==="mathml"?is.createElementNS(EJ,e):is.createElement(e,n?{is:n}:void 0);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>is.createTextNode(e),createComment:e=>is.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>is.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,i){const a=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{W4.innerHTML=o==="svg"?`${e}`:o==="mathml"?`${e}`:e;const l=W4.content;if(o==="svg"||o==="mathml"){const s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}t.insertBefore(l,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Gl="transition",Ff="animation",$d=Symbol("_vtc"),so=(e,{slots:t})=>Ni(zQ,$N(e),t);so.displayName="Transition";const CN={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},MJ=so.props=bo({},nN,CN),Zs=(e,t=[])=>{Lt(e)?e.forEach(n=>n(...t)):e&&e(...t)},V4=e=>e?Lt(e)?e.some(t=>t.length>1):e.length>1:!1;function $N(e){const t={};for(const N in e)N in CN||(t[N]=e[N]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:s=i,appearActiveClass:c=a,appearToClass:u=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=RJ(r),v=m&&m[0],y=m&&m[1],{onBeforeEnter:b,onEnter:$,onEnterCancelled:x,onLeave:_,onLeaveCancelled:w,onBeforeAppear:I=b,onAppear:O=$,onAppearCancelled:P=x}=t,E=(N,F,W)=>{Jl(N,F?u:l),Jl(N,F?c:a),W&&W()},R=(N,F)=>{N._isLeaving=!1,Jl(N,d),Jl(N,h),Jl(N,f),F&&F()},A=N=>(F,W)=>{const D=N?O:$,B=()=>E(F,N,W);Zs(D,[F,B]),K4(()=>{Jl(F,N?s:i),il(F,N?u:l),V4(D)||U4(F,o,v,B)})};return bo(t,{onBeforeEnter(N){Zs(b,[N]),il(N,i),il(N,a)},onBeforeAppear(N){Zs(I,[N]),il(N,s),il(N,c)},onEnter:A(!1),onAppear:A(!0),onLeave(N,F){N._isLeaving=!0;const W=()=>R(N,F);il(N,d),wN(),il(N,f),K4(()=>{N._isLeaving&&(Jl(N,d),il(N,h),V4(_)||U4(N,o,y,W))}),Zs(_,[N,W])},onEnterCancelled(N){E(N,!1),Zs(x,[N])},onAppearCancelled(N){E(N,!0),Zs(P,[N])},onLeaveCancelled(N){R(N),Zs(w,[N])}})}function RJ(e){if(e==null)return null;if(Tn(e))return[DS(e.enter),DS(e.leave)];{const t=DS(e);return[t,t]}}function DS(e){return WZ(e)}function il(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[$d]||(e[$d]=new Set)).add(t)}function Jl(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[$d];n&&(n.delete(t),n.size||(e[$d]=void 0))}function K4(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let DJ=0;function U4(e,t,n,o){const r=e._endId=++DJ,i=()=>{r===e._endId&&o()};if(n)return setTimeout(i,n);const{type:a,timeout:l,propCount:s}=xN(e,t);if(!a)return o();const c=a+"end";let u=0;const d=()=>{e.removeEventListener(c,f),i()},f=h=>{h.target===e&&++u>=s&&d()};setTimeout(()=>{u(n[m]||"").split(", "),r=o(`${Gl}Delay`),i=o(`${Gl}Duration`),a=G4(r,i),l=o(`${Ff}Delay`),s=o(`${Ff}Duration`),c=G4(l,s);let u=null,d=0,f=0;t===Gl?a>0&&(u=Gl,d=a,f=i.length):t===Ff?c>0&&(u=Ff,d=c,f=s.length):(d=Math.max(a,c),u=d>0?a>c?Gl:Ff:null,f=u?u===Gl?i.length:s.length:0);const h=u===Gl&&/\b(transform|all)(,|$)/.test(o(`${Gl}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:h}}function G4(e,t){for(;e.lengthY4(n)+Y4(e[o])))}function Y4(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function wN(){return document.body.offsetHeight}function LJ(e,t,n){const o=e[$d];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const $2=Symbol("_vod"),Bo={beforeMount(e,{value:t},{transition:n}){e[$2]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Hf(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Hf(e,!0),o.enter(e)):o.leave(e,()=>{Hf(e,!1)}):Hf(e,t))},beforeUnmount(e,{value:t}){Hf(e,t)}};function Hf(e,t){e.style.display=t?e[$2]:"none"}const _N=Symbol("");function ON(e){const t=Nn();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>H$(i,r))},o=()=>{const r=e(t.proxy);F$(t.subTree,r),n(r)};BQ(o),lt(()=>{const r=new MutationObserver(o);r.observe(t.subTree.el.parentNode,{childList:!0}),Fo(()=>r.disconnect())})}function F$(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{F$(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)H$(e.el,t);else if(e.type===Je)e.children.forEach(n=>F$(n,t));else if(e.type===om){let{el:n,anchor:o}=e;for(;n&&(H$(n,t),n!==o);)n=n.nextSibling}}function H$(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const r in t)n.setProperty(`--${r}`,t[r]),o+=`--${r}: ${t[r]};`;n[_N]=o}}function NJ(e,t,n){const o=e.style,r=o.display,i=Qn(n);if(n&&!i){if(t&&!Qn(t))for(const a in t)n[a]==null&&z$(o,a,"");for(const a in n)z$(o,a,n[a])}else if(i){if(t!==n){const a=o[_N];a&&(n+=";"+a),o.cssText=n}}else t&&e.removeAttribute("style");$2 in e&&(o.display=r)}const X4=/\s*!important$/;function z$(e,t,n){if(Lt(n))n.forEach(o=>z$(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=kJ(e,t);X4.test(n)?e.setProperty(Vc(o),n.replace(X4,""),"important"):e[o]=n}}const q4=["Webkit","Moz","ms"],LS={};function kJ(e,t){const n=LS[t];if(n)return n;let o=Da(t);if(o!=="filter"&&o in e)return LS[t]=o;o=yb(o);for(let r=0;rNS||(VJ.then(()=>NS=0),NS=Date.now());function UJ(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Ai(GJ(o,n.value),t,5,[o])};return n.value=e,n.attached=KJ(),n}function GJ(e,t){if(Lt(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>r=>!r._stopped&&o&&o(r))}else return t}const e3=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,YJ=(e,t,n,o,r,i,a,l,s)=>{const c=r==="svg";t==="class"?LJ(e,o,c):t==="style"?NJ(e,n,o):vb(t)?e2(t)||jJ(e,t,n,o,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):XJ(e,t,o,c))?FJ(e,t,o,i,a,l,s):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),BJ(e,t,o,c))};function XJ(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&e3(t)&&Ut(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return e3(t)&&Qn(n)?!1:t in e}const IN=new WeakMap,PN=new WeakMap,o0=Symbol("_moveCb"),t3=Symbol("_enterCb"),TN={name:"TransitionGroup",props:bo({},MJ,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Nn(),o=tN();let r,i;return fr(()=>{if(!r.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!eee(r[0].el,n.vnode.el,a))return;r.forEach(ZJ),r.forEach(QJ);const l=r.filter(JJ);wN(),l.forEach(s=>{const c=s.el,u=c.style;il(c,a),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[o0]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",d),c[o0]=null,Jl(c,a))};c.addEventListener("transitionend",d)})}),()=>{const a=$t(e),l=$N(a);let s=a.tag||Je;r=i,i=t.default?m2(t.default()):[];for(let c=0;cdelete e.mode;TN.props;const Lb=TN;function ZJ(e){const t=e.el;t[o0]&&t[o0](),t[t3]&&t[t3]()}function QJ(e){PN.set(e,e.el.getBoundingClientRect())}function JJ(e){const t=IN.get(e),n=PN.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${o}px,${r}px)`,i.transitionDuration="0s",e}}function eee(e,t,n){const o=e.cloneNode(),r=e[$d];r&&r.forEach(l=>{l.split(/\s+/).forEach(s=>s&&o.classList.remove(s))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:a}=xN(o);return i.removeChild(o),a}const tee=["ctrl","shift","alt","meta"],nee={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)=>tee.some(n=>e[`${n}Key`]&&!t.includes(n))},n3=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(r,...i)=>{for(let a=0;a{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=r=>{if(!("key"in r))return;const i=Vc(r.key);if(t.some(a=>a===i||oee[a]===i))return e(r)})},ree=bo({patchProp:YJ},AJ);let o3;function EN(){return o3||(o3=uJ(ree))}const Ec=(...e)=>{EN().render(...e)},AN=(...e)=>{const t=EN().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=aee(o);if(!r)return;const i=t._component;!Ut(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.innerHTML="";const a=n(r,!1,iee(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function iee(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function aee(e){return Qn(e)?document.querySelector(e):e}function eh(e){"@babel/helpers - typeof";return eh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eh(e)}function lee(e,t){if(eh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(eh(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function see(e){var t=lee(e,"string");return eh(t)=="symbol"?t:String(t)}function cee(e,t,n){return t=see(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function V(e){for(var t=1;ttypeof e=="function",dee=Array.isArray,fee=e=>typeof e=="string",pee=e=>e!==null&&typeof e=="object",hee=/^on[^a-z]/,gee=e=>hee.test(e),x2=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},vee=/-(\w)/g,Gc=x2(e=>e.replace(vee,(t,n)=>n?n.toUpperCase():"")),mee=/\B([A-Z])/g,bee=x2(e=>e.replace(mee,"-$1").toLowerCase()),yee=x2(e=>e.charAt(0).toUpperCase()+e.slice(1)),See=Object.prototype.hasOwnProperty,i3=(e,t)=>See.call(e,t);function Cee(e,t,n,o){const r=e[n];if(r!=null){const i=i3(r,"default");if(i&&o===void 0){const a=r.default;o=r.type!==Function&&uee(a)?a():a}r.type===Boolean&&(!i3(t,n)&&!i?o=!1:o===""&&(o=!0))}return o}function $ee(e){return Object.keys(e).reduce((t,n)=>((n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n]),t),{})}function uc(e){return typeof e=="number"?`${e}px`:e}function Xu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return typeof e=="function"?e(t):e??n}function xee(e){let t;const n=new Promise(r=>{t=e(()=>{r(!0)})}),o=()=>{t==null||t()};return o.then=(r,i)=>n.then(r,i),o.promise=n,o}function me(){const e=[];for(let t=0;t0},e.prototype.connect_=function(){!j$||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Tee?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!j$||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,o=n===void 0?"":n,r=Pee.some(function(i){return!!~o.indexOf(i)});r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),RN=function(e,t){for(var n=0,o=Object.keys(t);n"u"||!(Element instanceof Object))){if(!(t instanceof xd(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Bee(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof xd(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(o){return new Fee(o.target,o.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),LN=typeof WeakMap<"u"?new WeakMap:new MN,NN=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Eee.getInstance(),o=new Hee(t,n,this);LN.set(this,o)}return e}();["observe","unobserve","disconnect"].forEach(function(e){NN.prototype[e]=function(){var t;return(t=LN.get(this))[e].apply(t,arguments)}});var zee=function(){return typeof r0.ResizeObserver<"u"?r0.ResizeObserver:NN}();const w2=zee,W$=e=>e!=null&&e!=="",bt=(e,t)=>{const n=S({},e);return Object.keys(t).forEach(o=>{const r=n[o];if(r)r.type||r.default?r.default=t[o]:r.def?r.def(t[o]):n[o]={type:r,default:t[o]};else throw new Error(`not have ${o} prop`)}),n},_2=e=>{const t=Object.keys(e),n={},o={},r={};for(let i=0,a=t.length;i0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n={},o=/;(?![^(]*\))/g,r=/:(.+)/;return typeof e=="object"?e:(e.split(o).forEach(function(i){if(i){const a=i.split(r);if(a.length>1){const l=t?Gc(a[0].trim()):a[0].trim();n[l]=a[1].trim()}}}),n)},ul=(e,t)=>e[t]!==void 0,kN=Symbol("skipFlatten"),ln=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=Array.isArray(e)?e:[e],o=[];return n.forEach(r=>{Array.isArray(r)?o.push(...ln(r,t)):r&&r.type===Je?r.key===kN?o.push(r):o.push(...ln(r.children,t)):r&&mo(r)?t&&!Nh(r)?o.push(r):t||o.push(r):W$(r)&&o.push(r)}),o},kb=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(mo(e))return e.type===Je?t==="default"?ln(e.children):[]:e.children&&e.children[t]?ln(e.children[t](n)):[];{const o=e.$slots[t]&&e.$slots[t](n);return ln(o)}},Nr=e=>{var t;let n=((t=e==null?void 0:e.vnode)===null||t===void 0?void 0:t.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n},BN=e=>{const t={};if(e.$&&e.$.vnode){const n=e.$.vnode.props||{};Object.keys(e.$props).forEach(o=>{const r=e.$props[o],i=bee(o);(r!==void 0||i in n)&&(t[o]=r)})}else if(mo(e)&&typeof e.type=="object"){const n=e.props||{},o={};Object.keys(n).forEach(i=>{o[Gc(i)]=n[i]});const r=e.type.props||{};Object.keys(r).forEach(i=>{const a=Cee(r,o,i,o[i]);(a!==void 0||i in o)&&(t[i]=a)})}return t},FN=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,r;if(e.$){const i=e[t];if(i!==void 0)return typeof i=="function"&&o?i(n):i;r=e.$slots[t],r=o&&r?r(n):r}else if(mo(e)){const i=e.props&&e.props[t];if(i!==void 0&&e.props!==null)return typeof i=="function"&&o?i(n):i;e.type===Je?r=e.children:e.children&&e.children[t]&&(r=e.children[t],r=o&&r?r(n):r)}return Array.isArray(r)&&(r=ln(r),r=r.length===1?r[0]:r,r=r.length===0?void 0:r),r};function l3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n={};return e.$?n=S(S({},n),e.$attrs):n=S(S({},n),e.props),_2(n)[t?"onEvents":"events"]}function Wee(e){const n=((mo(e)?e.props:e.$attrs)||{}).class||{};let o={};return typeof n=="string"?n.split(" ").forEach(r=>{o[r.trim()]=!0}):Array.isArray(n)?me(n).split(" ").forEach(r=>{o[r.trim()]=!0}):o=S(S({},o),n),o}function HN(e,t){let o=((mo(e)?e.props:e.$attrs)||{}).style||{};if(typeof o=="string")o=jee(o,t);else if(t&&o){const r={};return Object.keys(o).forEach(i=>r[Gc(i)]=o[i]),r}return o}function Vee(e){return e.length===1&&e[0].type===Je}function Kee(e){return e==null||e===""||Array.isArray(e)&&e.length===0}function Nh(e){return e&&(e.type===kr||e.type===Je&&e.children.length===0||e.type===_l&&e.children.trim()==="")}function Uee(e){return e&&e.type===_l}function _n(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0:n.type)===Je?t.push(..._n(n.children)):t.push(n)}),t.filter(n=>!Nh(n))}function zf(e){if(e){const t=_n(e);return t.length?t:void 0}else return e}function Jn(e){return Array.isArray(e)&&e.length===1&&(e=e[0]),e&&e.__v_isVNode&&typeof e.type!="symbol"}function lo(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var o,r;return(o=t[n])!==null&&o!==void 0?o:(r=e[n])===null||r===void 0?void 0:r.call(e)}const ki=pe({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(e,t){let{slots:n}=t;const o=St({width:0,height:0,offsetHeight:0,offsetWidth:0});let r=null,i=null;const a=()=>{i&&(i.disconnect(),i=null)},l=u=>{const{onResize:d}=e,f=u[0].target,{width:h,height:m}=f.getBoundingClientRect(),{offsetWidth:v,offsetHeight:y}=f,b=Math.floor(h),$=Math.floor(m);if(o.width!==b||o.height!==$||o.offsetWidth!==v||o.offsetHeight!==y){const x={width:b,height:$,offsetWidth:v,offsetHeight:y};S(o,x),d&&Promise.resolve().then(()=>{d(S(S({},x),{offsetWidth:v,offsetHeight:y}),f)})}},s=Nn(),c=()=>{const{disabled:u}=e;if(u){a();return}const d=Nr(s);d!==r&&(a(),r=d),!i&&d&&(i=new w2(l),i.observe(d))};return lt(()=>{c()}),fr(()=>{c()}),Fo(()=>{a()}),Ie(()=>e.disabled,()=>{c()},{flush:"post"}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});let zN=e=>setTimeout(e,16),jN=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(zN=e=>window.requestAnimationFrame(e),jN=e=>window.cancelAnimationFrame(e));let s3=0;const O2=new Map;function WN(e){O2.delete(e)}function mt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;s3+=1;const n=s3;function o(r){if(r===0)WN(n),e();else{const i=zN(()=>{o(r-1)});O2.set(n,i)}}return o(t),n}mt.cancel=e=>{const t=O2.get(e);return WN(t),jN(t)};function V$(e){let t;const n=r=>()=>{t=null,e(...r)},o=function(){if(t==null){for(var r=arguments.length,i=new Array(r),a=0;a{mt.cancel(t),t=null},o}const Go=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const t=e;return t.install=function(n){n.component(t.displayName||t.name,e)},e};function Ac(){return{type:[Function,Array]}}function qe(e){return{type:Object,default:e}}function De(e){return{type:Boolean,default:e}}function Oe(e){return{type:Function,default:e}}function cn(e,t){const n={validator:()=>!0,default:e};return n}function rr(){return{validator:()=>!0}}function kt(e){return{type:Array,default:e}}function Qe(e){return{type:String,default:e}}function rt(e,t){return e?{type:e,default:t}:cn(t)}let VN=!1;try{const e=Object.defineProperty({},"passive",{get(){VN=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}const fo=VN;function wn(e,t,n,o){if(e&&e.addEventListener){let r=o;r===void 0&&fo&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(r={passive:!1}),e.addEventListener(t,n,r)}return{remove:()=>{e&&e.removeEventListener&&e.removeEventListener(t,n)}}}function dv(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function c3(e,t,n){if(n!==void 0&&t.top>e.top-n)return`${n+t.top}px`}function u3(e,t,n){if(n!==void 0&&t.bottomo.target===e);n?n.affixList.push(t):(n={target:e,affixList:[t],eventHandlers:{}},gp.push(n),KN.forEach(o=>{n.eventHandlers[o]=wn(e,o,()=>{n.affixList.forEach(r=>{const{lazyUpdatePosition:i}=r.exposed;i()},(o==="touchstart"||o==="touchmove")&&fo?{passive:!0}:!1)})}))}function f3(e){const t=gp.find(n=>{const o=n.affixList.some(r=>r===e);return o&&(n.affixList=n.affixList.filter(r=>r!==e)),o});t&&t.affixList.length===0&&(gp=gp.filter(n=>n!==t),KN.forEach(n=>{const o=t.eventHandlers[n];o&&o.remove&&o.remove()}))}const I2="anticon",UN=Symbol("GlobalFormContextKey"),Yee=e=>{ft(UN,e)},Xee=()=>it(UN,{validateMessages:M(()=>{})}),qee=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:qe(),input:qe(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:qe(),pageHeader:qe(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:qe(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:qe(),pagination:qe(),theme:qe(),select:qe(),wave:qe()}),P2=Symbol("configProvider"),GN={getPrefixCls:(e,t)=>t||(e?`ant-${e}`:"ant"),iconPrefixCls:M(()=>I2),getPopupContainer:M(()=>()=>document.body),direction:M(()=>"ltr")},Bb=()=>it(P2,GN),Zee=e=>ft(P2,e),YN=Symbol("DisabledContextKey"),jr=()=>it(YN,he(void 0)),XN=e=>{const t=jr();return ft(YN,M(()=>{var n;return(n=e.value)!==null&&n!==void 0?n:t.value})),e},qN={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},Qee={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},Jee=Qee,ete={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},ZN=ete,tte={lang:S({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},Jee),timePickerLocale:S({},ZN)},th=tte,ei="${label} is not a valid ${type}",cr={locale:"en",Pagination:qN,DatePicker:th,TimePicker:ZN,Calendar:th,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ei,method:ei,array:ei,object:ei,number:ei,date:ei,boolean:ei,integer:ei,float:ei,regexp:ei,email:ei,url:ei,hex:ei},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},Yc=pe({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(e,t){let{slots:n}=t;const o=it("localeData",{}),r=M(()=>{const{componentName:a="global",defaultLocale:l}=e,s=l||cr[a||"global"],{antLocale:c}=o,u=a&&c?c[a]:{};return S(S({},typeof s=="function"?s():s),u||{})}),i=M(()=>{const{antLocale:a}=o,l=a&&a.locale;return a&&a.exist&&!l?cr.locale:l});return()=>{const a=e.children||n.default,{antLocale:l}=o;return a==null?void 0:a(r.value,i.value,l)}}});function Wi(e,t,n){const o=it("localeData",{});return[M(()=>{const{antLocale:i}=o,a=It(t)||cr[e||"global"],l=e&&i?i[e]:{};return S(S(S({},typeof a=="function"?a():a),l||{}),It(n)||{})})]}function T2(e){for(var t=0,n,o=0,r=e.length;r>=4;++o,r-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}const p3="%";class nte{constructor(t){this.cache=new Map,this.instanceId=t}get(t){return this.cache.get(Array.isArray(t)?t.join(p3):t)||null}update(t,n){const o=Array.isArray(t)?t.join(p3):t,r=this.cache.get(o),i=n(r);i===null?this.cache.delete(o):this.cache.set(o,i)}}const ote=nte,E2="data-token-hash",ms="data-css-hash",qu="__cssinjs_instance__";function wd(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${ms}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(r=>{r[qu]=r[qu]||e,r[qu]===e&&document.head.insertBefore(r,n)});const o={};Array.from(document.querySelectorAll(`style[${ms}]`)).forEach(r=>{var i;const a=r.getAttribute(ms);o[a]?r[qu]===e&&((i=r.parentNode)===null||i===void 0||i.removeChild(r)):o[a]=!0})}return new ote(e)}const QN=Symbol("StyleContextKey"),rte=()=>{var e,t,n;const o=Nn();let r;if(o&&o.appContext){const i=(n=(t=(e=o.appContext)===null||e===void 0?void 0:e.config)===null||t===void 0?void 0:t.globalProperties)===null||n===void 0?void 0:n.__ANTDV_CSSINJS_CACHE__;i?r=i:(r=wd(),o.appContext.config.globalProperties&&(o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=r))}else r=wd();return r},JN={cache:wd(),defaultCache:!0,hashPriority:"low"},kh=()=>{const e=rte();return it(QN,ve(S(S({},JN),{cache:e})))},e7=e=>{const t=kh(),n=ve(S(S({},JN),{cache:wd()}));return Ie([()=>It(e),t],()=>{const o=S({},t.value),r=It(e);Object.keys(r).forEach(a=>{const l=r[a];r[a]!==void 0&&(o[a]=l)});const{cache:i}=r;o.cache=o.cache||wd(),o.defaultCache=!i&&t.value.defaultCache,n.value=o},{immediate:!0}),ft(QN,n),n},ite=()=>({autoClear:De(),mock:Qe(),cache:qe(),defaultCache:De(),hashPriority:Qe(),container:rt(),ssrInline:De(),transformers:kt(),linters:kt()}),ate=$n(pe({name:"AStyleProvider",inheritAttrs:!1,props:ite(),setup(e,t){let{slots:n}=t;return e7(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function t7(e,t,n,o){const r=kh(),i=ve(""),a=ve();ct(()=>{i.value=[e,...t.value].join("%")});const l=s=>{r.value.cache.update(s,c=>{const[u=0,d]=c||[];return u-1===0?(o==null||o(d,!1),null):[u-1,d]})};return Ie(i,(s,c)=>{c&&l(c),r.value.cache.update(s,u=>{const[d=0,f]=u||[],m=f||n();return[d+1,m]}),a.value=r.value.cache.get(i.value)[1]},{immediate:!0}),Ct(()=>{l(i.value)}),a}function ur(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ss(e,t){return e&&e.contains?e.contains(t):!1}const h3="data-vc-order",lte="vc-util-key",K$=new Map;function n7(){let{mark:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e?e.startsWith("data-")?e:`data-${e}`:lte}function Fb(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function ste(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function o7(e){return Array.from((K$.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function r7(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ur())return null;const{csp:n,prepend:o}=t,r=document.createElement("style");r.setAttribute(h3,ste(o)),n!=null&&n.nonce&&(r.nonce=n==null?void 0:n.nonce),r.innerHTML=e;const i=Fb(t),{firstChild:a}=i;if(o){if(o==="queue"){const l=o7(i).filter(s=>["prepend","prependQueue"].includes(s.getAttribute(h3)));if(l.length)return i.insertBefore(r,l[l.length-1].nextSibling),r}i.insertBefore(r,a)}else i.appendChild(r);return r}function i7(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=Fb(t);return o7(n).find(o=>o.getAttribute(n7(t))===e)}function a0(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=i7(e,t);n&&Fb(t).removeChild(n)}function cte(e,t){const n=K$.get(e);if(!n||!ss(document,n)){const o=r7("",t),{parentNode:r}=o;K$.set(e,r),e.removeChild(o)}}function nh(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o,r,i;const a=Fb(n);cte(a,n);const l=i7(t,n);if(l)return!((o=n.csp)===null||o===void 0)&&o.nonce&&l.nonce!==((r=n.csp)===null||r===void 0?void 0:r.nonce)&&(l.nonce=(i=n.csp)===null||i===void 0?void 0:i.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;const s=r7(e,n);return s.setAttribute(n7(n),t),s}function ute(e,t){if(e.length!==t.length)return!1;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!1,o={map:this.cache};return t.forEach(r=>{var i;o?o=(i=o==null?void 0:o.map)===null||i===void 0?void 0:i.get(r):o=void 0}),o!=null&&o.value&&n&&(o.value[1]=this.cacheCallTimes++),o==null?void 0:o.value}get(t){var n;return(n=this.internalGet(t,!0))===null||n===void 0?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>_d.MAX_CACHE_SIZE+_d.MAX_CACHE_OFFSET){const[r]=this.keys.reduce((i,a)=>{const[,l]=i;return this.internalGet(a)[1]{if(i===t.length-1)o.set(r,{value:[n,this.cacheCallTimes++]});else{const a=o.get(r);a?a.map||(a.map=new Map):o.set(r,{map:new Map}),o=o.get(r).map}})}deleteByPath(t,n){var o;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(o=r.value)===null||o===void 0?void 0:o[0];const i=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),i}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!ute(n,t)),this.deleteByPath(this.cache,t)}}_d.MAX_CACHE_SIZE=20;_d.MAX_CACHE_OFFSET=5;let g3={};function dte(e,t){}function fte(e,t){}function a7(e,t,n){!t&&!g3[n]&&(e(!1,n),g3[n]=!0)}function Hb(e,t){a7(dte,e,t)}function pte(e,t){a7(fte,e,t)}function hte(){}let gte=hte;const Sn=gte;let v3=0;class A2{constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=v3,t.length===0&&Sn(t.length>0),v3+=1}getDerivativeToken(t){return this.derivatives.reduce((n,o)=>o(t,n),void 0)}}const kS=new _d;function M2(e){const t=Array.isArray(e)?e:[e];return kS.has(t)||kS.set(t,new A2(t)),kS.get(t)}const m3=new WeakMap;function l0(e){let t=m3.get(e)||"";return t||(Object.keys(e).forEach(n=>{const o=e[n];t+=n,o instanceof A2?t+=o.id:o&&typeof o=="object"?t+=l0(o):t+=o}),m3.set(e,t)),t}function vte(e,t){return T2(`${t}_${l0(e)}`)}const vp=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),l7="_bAmBoO_";function mte(e,t,n){var o,r;if(ur()){nh(e,vp);const i=document.createElement("div");i.style.position="fixed",i.style.left="0",i.style.top="0",t==null||t(i),document.body.appendChild(i);const a=n?n(i):(o=getComputedStyle(i).content)===null||o===void 0?void 0:o.includes(l7);return(r=i.parentNode)===null||r===void 0||r.removeChild(i),a0(vp),a}return!1}let BS;function bte(){return BS===void 0&&(BS=mte(`@layer ${vp} { .${vp} { content: "${l7}"!important; } }`,e=>{e.className=vp})),BS}const b3={},yte=!0,Ste=!1,Cte=!yte&&!Ste?"css-dev-only-do-not-override":"css",dc=new Map;function $te(e){dc.set(e,(dc.get(e)||0)+1)}function xte(e,t){typeof document<"u"&&document.querySelectorAll(`style[${E2}="${e}"]`).forEach(o=>{var r;o[qu]===t&&((r=o.parentNode)===null||r===void 0||r.removeChild(o))})}const wte=0;function _te(e,t){dc.set(e,(dc.get(e)||0)-1);const n=Array.from(dc.keys()),o=n.filter(r=>(dc.get(r)||0)<=0);n.length-o.length>wte&&o.forEach(r=>{xte(r,t),dc.delete(r)})}const Ote=(e,t,n,o)=>{const r=n.getDerivativeToken(e);let i=S(S({},r),t);return o&&(i=o(i)),i};function s7(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:he({});const o=kh(),r=M(()=>S({},...t.value)),i=M(()=>l0(r.value)),a=M(()=>l0(n.value.override||b3));return t7("token",M(()=>[n.value.salt||"",e.value.id,i.value,a.value]),()=>{const{salt:s="",override:c=b3,formatToken:u,getComputedToken:d}=n.value,f=d?d(r.value,c,e.value):Ote(r.value,c,e.value,u),h=vte(f,s);f._tokenKey=h,$te(h);const m=`${Cte}-${T2(h)}`;return f._hashId=m,[f,m]},s=>{var c;_te(s[0]._tokenKey,(c=o.value)===null||c===void 0?void 0:c.cache.instanceId)})}var c7={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},u7="comm",d7="rule",f7="decl",Ite="@import",Pte="@keyframes",Tte="@layer",p7=Math.abs,R2=String.fromCharCode;function h7(e){return e.trim()}function im(e,t,n){return e.replace(t,n)}function Ete(e,t,n){return e.indexOf(t,n)}function oh(e,t){return e.charCodeAt(t)|0}function rh(e,t,n){return e.slice(t,n)}function cl(e){return e.length}function Ate(e){return e.length}function fv(e,t){return t.push(e),e}var zb=1,Od=1,g7=0,Bi=0,po=0,ef="";function D2(e,t,n,o,r,i,a,l){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:zb,column:Od,length:a,return:"",siblings:l}}function Mte(){return po}function Rte(){return po=Bi>0?oh(ef,--Bi):0,Od--,po===10&&(Od=1,zb--),po}function ra(){return po=Bi2||U$(po)>3?"":" "}function kte(e,t){for(;--t&&ra()&&!(po<48||po>102||po>57&&po<65||po>70&&po<97););return jb(e,am()+(t<6&&$c()==32&&ra()==32))}function G$(e){for(;ra();)switch(po){case e:return Bi;case 34:case 39:e!==34&&e!==39&&G$(po);break;case 40:e===41&&G$(e);break;case 92:ra();break}return Bi}function Bte(e,t){for(;ra()&&e+po!==57;)if(e+po===84&&$c()===47)break;return"/*"+jb(t,Bi-1)+"*"+R2(e===47?e:ra())}function Fte(e){for(;!U$($c());)ra();return jb(e,Bi)}function Hte(e){return Lte(lm("",null,null,null,[""],e=Dte(e),0,[0],e))}function lm(e,t,n,o,r,i,a,l,s){for(var c=0,u=0,d=a,f=0,h=0,m=0,v=1,y=1,b=1,$=0,x="",_=r,w=i,I=o,O=x;y;)switch(m=$,$=ra()){case 40:if(m!=108&&oh(O,d-1)==58){Ete(O+=im(FS($),"&","&\f"),"&\f",p7(c?l[c-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:O+=FS($);break;case 9:case 10:case 13:case 32:O+=Nte(m);break;case 92:O+=kte(am()-1,7);continue;case 47:switch($c()){case 42:case 47:fv(zte(Bte(ra(),am()),t,n,s),s);break;default:O+="/"}break;case 123*v:l[c++]=cl(O)*b;case 125*v:case 59:case 0:switch($){case 0:case 125:y=0;case 59+u:b==-1&&(O=im(O,/\f/g,"")),h>0&&cl(O)-d&&fv(h>32?S3(O+";",o,n,d-1,s):S3(im(O," ","")+";",o,n,d-2,s),s);break;case 59:O+=";";default:if(fv(I=y3(O,t,n,c,u,r,l,x,_=[],w=[],d,i),i),$===123)if(u===0)lm(O,t,I,I,_,i,d,l,w);else switch(f===99&&oh(O,3)===110?100:f){case 100:case 108:case 109:case 115:lm(e,I,I,o&&fv(y3(e,I,I,0,0,r,l,x,r,_=[],d,w),w),r,w,d,l,o?_:w);break;default:lm(O,I,I,I,[""],w,0,l,w)}}c=u=h=0,v=b=1,x=O="",d=a;break;case 58:d=1+cl(O),h=m;default:if(v<1){if($==123)--v;else if($==125&&v++==0&&Rte()==125)continue}switch(O+=R2($),$*v){case 38:b=u>0?1:(O+="\f",-1);break;case 44:l[c++]=(cl(O)-1)*b,b=1;break;case 64:$c()===45&&(O+=FS(ra())),f=$c(),u=d=cl(x=O+=Fte(am())),$++;break;case 45:m===45&&cl(O)==2&&(v=0)}}return i}function y3(e,t,n,o,r,i,a,l,s,c,u,d){for(var f=r-1,h=r===0?i:[""],m=Ate(h),v=0,y=0,b=0;v0?h[$]+" "+x:im(x,/&\f/g,h[$])))&&(s[b++]=_);return D2(e,t,n,r===0?d7:l,s,c,u,d)}function zte(e,t,n,o){return D2(e,t,n,u7,R2(Mte()),rh(e,2,-2),0,o)}function S3(e,t,n,o,r){return D2(e,t,n,f7,rh(e,0,o),rh(e,o+1,-1),o,r)}function Y$(e,t){for(var n="",o=0;o ")}`:""}`)}function Wte(e){var t;return(((t=e.match(/:not\(([^)]*)\)/))===null||t===void 0?void 0:t[1])||"").split(/(\[[^[]*])|(?=[.#])/).filter(r=>r).length>1}function Vte(e){return e.parentSelectors.reduce((t,n)=>t?n.includes("&")?n.replace(/&/g,t):`${t} ${n}`:n,"")}const Kte=(e,t,n)=>{const r=Vte(n).match(/:not\([^)]*\)/g)||[];r.length>0&&r.some(Wte)&&Zu("Concat ':not' selector not support in legacy browsers.",n)},Ute=Kte,Gte=(e,t,n)=>{switch(e){case"marginLeft":case"marginRight":case"paddingLeft":case"paddingRight":case"left":case"right":case"borderLeft":case"borderLeftWidth":case"borderLeftStyle":case"borderLeftColor":case"borderRight":case"borderRightWidth":case"borderRightStyle":case"borderRightColor":case"borderTopLeftRadius":case"borderTopRightRadius":case"borderBottomLeftRadius":case"borderBottomRightRadius":Zu(`You seem to be using non-logical property '${e}' which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,n);return;case"margin":case"padding":case"borderWidth":case"borderStyle":if(typeof t=="string"){const o=t.split(" ").map(r=>r.trim());o.length===4&&o[1]!==o[3]&&Zu(`You seem to be using '${e}' property with different left ${e} and right ${e}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,n)}return;case"clear":case"textAlign":(t==="left"||t==="right")&&Zu(`You seem to be using non-logical value '${t}' of ${e}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,n);return;case"borderRadius":typeof t=="string"&&t.split("/").map(i=>i.trim()).reduce((i,a)=>{if(i)return i;const l=a.split(" ").map(s=>s.trim());return l.length>=2&&l[0]!==l[1]||l.length===3&&l[1]!==l[2]||l.length===4&&l[2]!==l[3]?!0:i},!1)&&Zu(`You seem to be using non-logical value '${t}' of ${e}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,n);return}},Yte=Gte,Xte=(e,t,n)=>{n.parentSelectors.some(o=>o.split(",").some(i=>i.split("&").length>2))&&Zu("Should not use more than one `&` in a selector.",n)},qte=Xte,mp="data-ant-cssinjs-cache-path",Zte="_FILE_STYLE__";function Qte(e){return Object.keys(e).map(t=>{const n=e[t];return`${t}:${n}`}).join(";")}let xc,v7=!0;function Jte(){var e;if(!xc&&(xc={},ur())){const t=document.createElement("div");t.className=mp,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);let n=getComputedStyle(t).content||"";n=n.replace(/^"/,"").replace(/"$/,""),n.split(";").forEach(r=>{const[i,a]=r.split(":");xc[i]=a});const o=document.querySelector(`style[${mp}]`);o&&(v7=!1,(e=o.parentNode)===null||e===void 0||e.removeChild(o)),document.body.removeChild(t)}}function ene(e){return Jte(),!!xc[e]}function tne(e){const t=xc[e];let n=null;if(t&&ur())if(v7)n=Zte;else{const o=document.querySelector(`style[${ms}="${xc[e]}"]`);o?n=o.innerHTML:delete xc[e]}return[n,t]}const C3=ur(),nne="_skip_check_",m7="_multi_value_";function X$(e){return Y$(Hte(e),jte).replace(/\{%%%\:[^;];}/g,";")}function one(e){return typeof e=="object"&&e&&(nne in e||m7 in e)}function rne(e,t,n){if(!t)return e;const o=`.${t}`,r=n==="low"?`:where(${o})`:o;return e.split(",").map(a=>{var l;const s=a.trim().split(/\s+/);let c=s[0]||"";const u=((l=c.match(/^\w+/))===null||l===void 0?void 0:l[0])||"";return c=`${u}${r}${c.slice(u.length)}`,[c,...s.slice(1)].join(" ")}).join(",")}const $3=new Set,q$=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:n,injectHash:o,parentSelectors:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:i,layer:a,path:l,hashPriority:s,transformers:c=[],linters:u=[]}=t;let d="",f={};function h(y){const b=y.getName(i);if(!f[b]){const[$]=q$(y.style,t,{root:!1,parentSelectors:r});f[b]=`@keyframes ${y.getName(i)}${$}`}}function m(y){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return y.forEach($=>{Array.isArray($)?m($,b):$&&b.push($)}),b}if(m(Array.isArray(e)?e:[e]).forEach(y=>{const b=typeof y=="string"&&!n?{}:y;if(typeof b=="string")d+=`${b} +`;else if(b._keyframe)h(b);else{const $=c.reduce((x,_)=>{var w;return((w=_==null?void 0:_.visit)===null||w===void 0?void 0:w.call(_,x))||x},b);Object.keys($).forEach(x=>{var _;const w=$[x];if(typeof w=="object"&&w&&(x!=="animationName"||!w._keyframe)&&!one(w)){let I=!1,O=x.trim(),P=!1;(n||o)&&i?O.startsWith("@")?I=!0:O=rne(x,i,s):n&&!i&&(O==="&"||O==="")&&(O="",P=!0);const[E,R]=q$(w,t,{root:P,injectHash:I,parentSelectors:[...r,O]});f=S(S({},f),R),d+=`${O}${E}`}else{let I=function(P,E){const R=P.replace(/[A-Z]/g,N=>`-${N.toLowerCase()}`);let A=E;!c7[P]&&typeof A=="number"&&A!==0&&(A=`${A}px`),P==="animationName"&&(E!=null&&E._keyframe)&&(h(E),A=E.getName(i)),d+=`${R}:${A};`};const O=(_=w==null?void 0:w.value)!==null&&_!==void 0?_:w;typeof w=="object"&&(w!=null&&w[m7])&&Array.isArray(O)?O.forEach(P=>{I(x,P)}):I(x,O)}})}}),!n)d=`{${d}}`;else if(a&&bte()){const y=a.split(",");d=`@layer ${y[y.length-1].trim()} {${d}}`,y.length>1&&(d=`@layer ${a}{%%%:%}${d}`)}return[d,f]};function ine(e,t){return T2(`${e.join("%")}${t}`)}function s0(e,t){const n=kh(),o=M(()=>e.value.token._tokenKey),r=M(()=>[o.value,...e.value.path]);let i=C3;return t7("style",r,()=>{const{path:a,hashId:l,layer:s,nonce:c,clientOnly:u,order:d=0}=e.value,f=r.value.join("|");if(ene(f)){const[O,P]=tne(f);if(O)return[O,o.value,P,{},u,d]}const h=t(),{hashPriority:m,container:v,transformers:y,linters:b,cache:$}=n.value,[x,_]=q$(h,{hashId:l,hashPriority:m,layer:s,path:a.join("-"),transformers:y,linters:b}),w=X$(x),I=ine(r.value,w);if(i){const O={mark:ms,prepend:"queue",attachTo:v,priority:d},P=typeof c=="function"?c():c;P&&(O.csp={nonce:P});const E=nh(w,I,O);E[qu]=$.instanceId,E.setAttribute(E2,o.value),Object.keys(_).forEach(R=>{$3.has(R)||($3.add(R),nh(X$(_[R]),`_effect-${R}`,{mark:ms,prepend:"queue",attachTo:v}))})}return[w,o.value,I,_,u,d]},(a,l)=>{let[,,s]=a;(l||n.value.autoClear)&&C3&&a0(s,{mark:ms})}),a=>a}function ane(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n="style%",o=Array.from(e.cache.keys()).filter(c=>c.startsWith(n)),r={},i={};let a="";function l(c,u,d){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const h=S(S({},f),{[E2]:u,[ms]:d}),m=Object.keys(h).map(v=>{const y=h[v];return y?`${v}="${y}"`:null}).filter(v=>v).join(" ");return t?c:``}return o.map(c=>{const u=c.slice(n.length).replace(/%/g,"|"),[d,f,h,m,v,y]=e.cache.get(c)[1];if(v)return null;const b={"data-vc-order":"prependQueue","data-vc-priority":`${y}`};let $=l(d,f,h,b);return i[u]=h,m&&Object.keys(m).forEach(_=>{r[_]||(r[_]=!0,$+=l(X$(m[_]),f,`_effect-${_}`,b))}),[y,$]}).filter(c=>c).sort((c,u)=>c[0]-u[0]).forEach(c=>{let[,u]=c;a+=u}),a+=l(`.${mp}{content:"${Qte(i)}";}`,void 0,void 0,{[mp]:mp}),a}class lne{constructor(t,n){this._keyframe=!0,this.name=t,this.style=n}getName(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?`${t}-${this.name}`:this.name}}const Pt=lne;function sne(e){if(typeof e=="number")return[e];const t=String(e).split(/\s+/);let n="",o=0;return t.reduce((r,i)=>(i.includes("(")?(n+=i,o+=i.split("(").length-1):i.includes(")")?(n+=` ${i}`,o-=i.split(")").length-1,o===0&&(r.push(n),n="")):o>0?n+=` ${i}`:r.push(i),r),[])}function Iu(e){return e.notSplit=!0,e}const cne={inset:["top","right","bottom","left"],insetBlock:["top","bottom"],insetBlockStart:["top"],insetBlockEnd:["bottom"],insetInline:["left","right"],insetInlineStart:["left"],insetInlineEnd:["right"],marginBlock:["marginTop","marginBottom"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],marginInline:["marginLeft","marginRight"],marginInlineStart:["marginLeft"],marginInlineEnd:["marginRight"],paddingBlock:["paddingTop","paddingBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"],paddingInline:["paddingLeft","paddingRight"],paddingInlineStart:["paddingLeft"],paddingInlineEnd:["paddingRight"],borderBlock:Iu(["borderTop","borderBottom"]),borderBlockStart:Iu(["borderTop"]),borderBlockEnd:Iu(["borderBottom"]),borderInline:Iu(["borderLeft","borderRight"]),borderInlineStart:Iu(["borderLeft"]),borderInlineEnd:Iu(["borderRight"]),borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndWidth:["borderBottomWidth"],borderInlineWidth:["borderLeftWidth","borderRightWidth"],borderInlineStartWidth:["borderLeftWidth"],borderInlineEndWidth:["borderRightWidth"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderBlockStartStyle:["borderTopStyle"],borderBlockEndStyle:["borderBottomStyle"],borderInlineStyle:["borderLeftStyle","borderRightStyle"],borderInlineStartStyle:["borderLeftStyle"],borderInlineEndStyle:["borderRightStyle"],borderBlockColor:["borderTopColor","borderBottomColor"],borderBlockStartColor:["borderTopColor"],borderBlockEndColor:["borderBottomColor"],borderInlineColor:["borderLeftColor","borderRightColor"],borderInlineStartColor:["borderLeftColor"],borderInlineEndColor:["borderRightColor"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"]};function pv(e){return{_skip_check_:!0,value:e}}const une={visit:e=>{const t={};return Object.keys(e).forEach(n=>{const o=e[n],r=cne[n];if(r&&(typeof o=="number"||typeof o=="string")){const i=sne(o);r.length&&r.notSplit?r.forEach(a=>{t[a]=pv(o)}):r.length===1?t[r[0]]=pv(o):r.length===2?r.forEach((a,l)=>{var s;t[a]=pv((s=i[l])!==null&&s!==void 0?s:i[0])}):r.length===4?r.forEach((a,l)=>{var s,c;t[a]=pv((c=(s=i[l])!==null&&s!==void 0?s:i[l-2])!==null&&c!==void 0?c:i[0])}):t[n]=o}else t[n]=o}),t}},dne=une,HS=/url\([^)]+\)|var\([^)]+\)|(\d*\.?\d+)px/g;function fne(e,t){const n=Math.pow(10,t+1),o=Math.floor(e*n);return Math.round(o/10)*10/n}const pne=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{rootValue:t=16,precision:n=5,mediaQuery:o=!1}=e,r=(a,l)=>{if(!l)return a;const s=parseFloat(l);return s<=1?a:`${fne(s/t,n)}rem`};return{visit:a=>{const l=S({},a);return Object.entries(a).forEach(s=>{let[c,u]=s;if(typeof u=="string"&&u.includes("px")){const f=u.replace(HS,r);l[c]=f}!c7[c]&&typeof u=="number"&&u!==0&&(l[c]=`${u}px`.replace(HS,r));const d=c.trim();if(d.startsWith("@")&&d.includes("px")&&o){const f=c.replace(HS,r);l[f]=l[c],delete l[c]}}),l}}},hne=pne,gne={Theme:A2,createTheme:M2,useStyleRegister:s0,useCacheToken:s7,createCache:wd,useStyleInject:kh,useStyleProvider:e7,Keyframes:Pt,extractStyle:ane,legacyLogicalPropertiesTransformer:dne,px2remTransformer:hne,logicalPropertiesLinter:Yte,legacyNotSelectorLinter:Ute,parentSelectorLinter:qte,StyleProvider:ate},vne=gne,b7="4.1.2",ih=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Vo(e,t){mne(e)&&(e="100%");var n=bne(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function hv(e){return Math.min(1,Math.max(0,e))}function mne(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function bne(e){return typeof e=="string"&&e.indexOf("%")!==-1}function y7(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function gv(e){return e<=1?"".concat(Number(e)*100,"%"):e}function mc(e){return e.length===1?"0"+e:String(e)}function yne(e,t,n){return{r:Vo(e,255)*255,g:Vo(t,255)*255,b:Vo(n,255)*255}}function x3(e,t,n){e=Vo(e,255),t=Vo(t,255),n=Vo(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,a=0,l=(o+r)/2;if(o===r)a=0,i=0;else{var s=o-r;switch(a=l>.5?s/(2-o-r):s/(o+r),o){case e:i=(t-n)/s+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Sne(e,t,n){var o,r,i;if(e=Vo(e,360),t=Vo(t,100),n=Vo(n,100),t===0)r=n,i=n,o=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=zS(l,a,e+1/3),r=zS(l,a,e),i=zS(l,a,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function Z$(e,t,n){e=Vo(e,255),t=Vo(t,255),n=Vo(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,a=o,l=o-r,s=o===0?0:l/o;if(o===r)i=0;else{switch(o){case e:i=(t-n)/l+(t>16,g:(e&65280)>>8,b:e&255}}var J$={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Wu(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=Ine(e)),typeof e=="object"&&(Qa(e.r)&&Qa(e.g)&&Qa(e.b)?(t=yne(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Qa(e.h)&&Qa(e.s)&&Qa(e.v)?(o=gv(e.s),r=gv(e.v),t=Cne(e.h,o,r),a=!0,l="hsv"):Qa(e.h)&&Qa(e.s)&&Qa(e.l)&&(o=gv(e.s),i=gv(e.l),t=Sne(e.h,o,i),a=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=y7(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var _ne="[-\\+]?\\d+%?",One="[-\\+]?\\d*\\.\\d+%?",ds="(?:".concat(One,")|(?:").concat(_ne,")"),jS="[\\s|\\(]+(".concat(ds,")[,|\\s]+(").concat(ds,")[,|\\s]+(").concat(ds,")\\s*\\)?"),WS="[\\s|\\(]+(".concat(ds,")[,|\\s]+(").concat(ds,")[,|\\s]+(").concat(ds,")[,|\\s]+(").concat(ds,")\\s*\\)?"),Zi={CSS_UNIT:new RegExp(ds),rgb:new RegExp("rgb"+jS),rgba:new RegExp("rgba"+WS),hsl:new RegExp("hsl"+jS),hsla:new RegExp("hsla"+WS),hsv:new RegExp("hsv"+jS),hsva:new RegExp("hsva"+WS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Ine(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(J$[e])e=J$[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Zi.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Zi.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Zi.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Zi.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Zi.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Zi.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Zi.hex8.exec(e),n?{r:ri(n[1]),g:ri(n[2]),b:ri(n[3]),a:w3(n[4]),format:t?"name":"hex8"}:(n=Zi.hex6.exec(e),n?{r:ri(n[1]),g:ri(n[2]),b:ri(n[3]),format:t?"name":"hex"}:(n=Zi.hex4.exec(e),n?{r:ri(n[1]+n[1]),g:ri(n[2]+n[2]),b:ri(n[3]+n[3]),a:w3(n[4]+n[4]),format:t?"name":"hex8"}:(n=Zi.hex3.exec(e),n?{r:ri(n[1]+n[1]),g:ri(n[2]+n[2]),b:ri(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Qa(e){return!!Zi.CSS_UNIT.exec(String(e))}var Zt=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=wne(t)),this.originalInput=t;var r=Wu(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,r,i=t.r/255,a=t.g/255,l=t.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),l<=.03928?r=l/12.92:r=Math.pow((l+.055)/1.055,2.4),.2126*n+.7152*o+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=y7(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Z$(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Z$(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=x3(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=x3(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Q$(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),$ne(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Vo(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Vo(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Q$(this.r,this.g,this.b,!1),n=0,o=Object.entries(J$);n=0,i=!n&&r&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=hv(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=hv(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=hv(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=hv(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),r=new e(t).toRgb(),i=n/100,a={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),r=360/n,i=[this];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(new e(o));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,r=n.s,i=n.v,a=[],l=1/t;t--;)a.push(new e({h:o,s:r,v:i})),i=(i+l)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),r=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/r,g:(n.g*n.a+o.g*o.a*(1-n.a))/r,b:(n.b*n.a+o.b*o.a*(1-n.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,r=[this],i=360/t,a=1;a=60&&Math.round(e.h)<=240?o=n?Math.round(e.h)-vv*t:Math.round(e.h)+vv*t:o=n?Math.round(e.h)+vv*t:Math.round(e.h)-vv*t,o<0?o+=360:o>=360&&(o-=360),o}function P3(e,t,n){if(e.h===0&&e.s===0)return e.s;var o;return n?o=e.s-_3*t:t===C7?o=e.s+_3:o=e.s+Pne*t,o>1&&(o=1),n&&t===S7&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2))}function T3(e,t,n){var o;return n?o=e.v+Tne*t:o=e.v-Ene*t,o>1&&(o=1),Number(o.toFixed(2))}function Mc(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],o=Wu(e),r=S7;r>0;r-=1){var i=O3(o),a=mv(Wu({h:I3(i,r,!0),s:P3(i,r,!0),v:T3(i,r,!0)}));n.push(a)}n.push(mv(o));for(var l=1;l<=C7;l+=1){var s=O3(o),c=mv(Wu({h:I3(s,l),s:P3(s,l),v:T3(s,l)}));n.push(c)}return t.theme==="dark"?Ane.map(function(u){var d=u.index,f=u.opacity,h=mv(Mne(Wu(t.backgroundColor||"#141414"),Wu(n[d]),f*100));return h}):n}var ld={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},bp={},VS={};Object.keys(ld).forEach(function(e){bp[e]=Mc(ld[e]),bp[e].primary=bp[e][5],VS[e]=Mc(ld[e],{theme:"dark",backgroundColor:"#141414"}),VS[e].primary=VS[e][5]});var Rne=bp.gold,Dne=bp.blue;const Lne=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function Nne(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const $7={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},kne=S(S({},$7),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, +'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', +'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1}),Wb=kne;function Bne(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:o}=t;const{colorSuccess:r,colorWarning:i,colorError:a,colorInfo:l,colorPrimary:s,colorBgBase:c,colorTextBase:u}=e,d=n(s),f=n(r),h=n(i),m=n(a),v=n(l),y=o(c,u);return S(S({},y),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorBgMask:new Zt("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const Fne=e=>{let t=e,n=e,o=e,r=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?o=1:e>=6&&(o=2),e>4&&e<8?r=4:e>=8&&(r=6),{borderRadius:e>16?16:e,borderRadiusXS:o,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:r}};function Hne(e){const{motionUnit:t,motionBase:n,borderRadius:o,lineWidth:r}=e;return S({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:r+1},Fne(o))}const Ja=(e,t)=>new Zt(e).setAlpha(t).toRgbString(),jf=(e,t)=>new Zt(e).darken(t).toHexString(),zne=e=>{const t=Mc(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},jne=(e,t)=>{const n=e||"#fff",o=t||"#000";return{colorBgBase:n,colorTextBase:o,colorText:Ja(o,.88),colorTextSecondary:Ja(o,.65),colorTextTertiary:Ja(o,.45),colorTextQuaternary:Ja(o,.25),colorFill:Ja(o,.15),colorFillSecondary:Ja(o,.06),colorFillTertiary:Ja(o,.04),colorFillQuaternary:Ja(o,.02),colorBgLayout:jf(n,4),colorBgContainer:jf(n,0),colorBgElevated:jf(n,0),colorBgSpotlight:Ja(o,.85),colorBorder:jf(n,15),colorBorderSecondary:jf(n,6)}};function Wne(e){const t=new Array(10).fill(null).map((n,o)=>{const r=o-1,i=e*Math.pow(2.71828,r/5),a=o>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>{const o=n+8;return{size:n,lineHeight:o/n}})}const Vne=e=>{const t=Wne(e),n=t.map(r=>r.size),o=t.map(r=>r.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:o[1],lineHeightLG:o[2],lineHeightSM:o[0],lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}};function Kne(e){const t=Object.keys($7).map(n=>{const o=Mc(e[n]);return new Array(10).fill(1).reduce((r,i,a)=>(r[`${n}-${a+1}`]=o[a],r),{})}).reduce((n,o)=>(n=S(S({},n),o),n),{});return S(S(S(S(S(S(S({},e),t),Bne(e,{generateColorPalettes:zne,generateNeutralColorPalettes:jne})),Vne(e.fontSize)),Nne(e)),Lne(e)),Hne(e))}function KS(e){return e>=0&&e<=255}function bv(e,t){const{r:n,g:o,b:r,a:i}=new Zt(e).toRgb();if(i<1)return e;const{r:a,g:l,b:s}=new Zt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((o-l*(1-c))/c),f=Math.round((r-s*(1-c))/c);if(KS(u)&&KS(d)&&KS(f))return new Zt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Zt({r:n,g:o,b:r,a:1}).toRgbString()}var Une=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{delete o[h]});const r=S(S({},n),o),i=480,a=576,l=768,s=992,c=1200,u=1600,d=2e3;return S(S(S({},r),{colorLink:r.colorInfoText,colorLinkHover:r.colorInfoHover,colorLinkActive:r.colorInfoActive,colorFillContent:r.colorFillSecondary,colorFillContentHover:r.colorFill,colorFillAlter:r.colorFillQuaternary,colorBgContainerDisabled:r.colorFillTertiary,colorBorderBg:r.colorBgContainer,colorSplit:bv(r.colorBorderSecondary,r.colorBgContainer),colorTextPlaceholder:r.colorTextQuaternary,colorTextDisabled:r.colorTextQuaternary,colorTextHeading:r.colorText,colorTextLabel:r.colorTextSecondary,colorTextDescription:r.colorTextTertiary,colorTextLightSolid:r.colorWhite,colorHighlight:r.colorError,colorBgTextHover:r.colorFillSecondary,colorBgTextActive:r.colorFill,colorIcon:r.colorTextTertiary,colorIconHover:r.colorText,colorErrorOutline:bv(r.colorErrorBg,r.colorBgContainer),colorWarningOutline:bv(r.colorWarningBg,r.colorBgContainer),fontSizeIcon:r.fontSizeSM,lineWidth:r.lineWidth,controlOutlineWidth:r.lineWidth*2,controlInteractiveSize:r.controlHeight/2,controlItemBgHover:r.colorFillTertiary,controlItemBgActive:r.colorPrimaryBg,controlItemBgActiveHover:r.colorPrimaryBgHover,controlItemBgActiveDisabled:r.colorFill,controlTmpOutline:r.colorFillQuaternary,controlOutline:bv(r.colorPrimaryBg,r.colorBgContainer),lineType:r.lineType,borderRadius:r.borderRadius,borderRadiusXS:r.borderRadiusXS,borderRadiusSM:r.borderRadiusSM,borderRadiusLG:r.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:r.sizeXXS,paddingXS:r.sizeXS,paddingSM:r.sizeSM,padding:r.size,paddingMD:r.sizeMD,paddingLG:r.sizeLG,paddingXL:r.sizeXL,paddingContentHorizontalLG:r.sizeLG,paddingContentVerticalLG:r.sizeMS,paddingContentHorizontal:r.sizeMS,paddingContentVertical:r.sizeSM,paddingContentHorizontalSM:r.size,paddingContentVerticalSM:r.sizeXS,marginXXS:r.sizeXXS,marginXS:r.sizeXS,marginSM:r.sizeSM,margin:r.size,marginMD:r.sizeMD,marginLG:r.sizeLG,marginXL:r.sizeXL,marginXXL:r.sizeXXL,boxShadow:` + 0 1px 2px 0 rgba(0, 0, 0, 0.03), + 0 1px 6px -1px rgba(0, 0, 0, 0.02), + 0 2px 4px 0 rgba(0, 0, 0, 0.02) + `,boxShadowSecondary:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTertiary:` + 0 1px 2px 0 rgba(0, 0, 0, 0.03), + 0 1px 6px -1px rgba(0, 0, 0, 0.02), + 0 2px 4px 0 rgba(0, 0, 0, 0.02) + `,screenXS:i,screenXSMin:i,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:l-1,screenMD:l,screenMDMin:l,screenMDMax:s-1,screenLG:s,screenLGMin:s,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,screenXXLMax:d-1,screenXXXL:d,screenXXXLMin:d,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:` + 0 1px 2px -2px ${new Zt("rgba(0, 0, 0, 0.16)").toRgbString()}, + 0 3px 6px 0 ${new Zt("rgba(0, 0, 0, 0.12)").toRgbString()}, + 0 5px 12px 4px ${new Zt("rgba(0, 0, 0, 0.09)").toRgbString()} + `,boxShadowDrawerRight:` + -6px 0 16px 0 rgba(0, 0, 0, 0.08), + -3px 0 6px -4px rgba(0, 0, 0, 0.12), + -9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerLeft:` + 6px 0 16px 0 rgba(0, 0, 0, 0.08), + 3px 0 6px -4px rgba(0, 0, 0, 0.12), + 9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerUp:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerDown:` + 0 -6px 16px 0 rgba(0, 0, 0, 0.08), + 0 -3px 6px -4px rgba(0, 0, 0, 0.12), + 0 -9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),o)}const Vb=e=>({color:e.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),L2=(e,t,n,o,r)=>{const i=e/2,a=0,l=i,s=n*1/Math.sqrt(2),c=i-n*(1-1/Math.sqrt(2)),u=i-t*(1/Math.sqrt(2)),d=n*(Math.sqrt(2)-1)+t*(1/Math.sqrt(2)),f=2*i-u,h=d,m=2*i-s,v=c,y=2*i-a,b=l,$=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),x=n*(Math.sqrt(2)-1);return{pointerEvents:"none",width:e,height:e,overflow:"hidden","&::after":{content:'""',position:"absolute",width:$,height:$,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${t}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"},"&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:e,height:e/2,background:o,clipPath:{_multi_value_:!0,value:[`polygon(${x}px 100%, 50% ${x}px, ${2*i-x}px 100%, ${x}px 100%)`,`path('M ${a} ${l} A ${n} ${n} 0 0 0 ${s} ${c} L ${u} ${d} A ${t} ${t} 0 0 1 ${f} ${h} L ${m} ${v} A ${n} ${n} 0 0 0 ${y} ${b} Z')`]},content:'""'}}};function c0(e,t){return ih.reduce((n,o)=>{const r=e[`${o}-1`],i=e[`${o}-3`],a=e[`${o}-6`],l=e[`${o}-7`];return S(S({},n),t(o,{lightColor:r,lightBorderColor:i,darkColor:a,textColor:l}))},{})}const eo={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},vt=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),Xc=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),aa=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),Yne=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Xne=(e,t)=>{const{fontFamily:n,fontSize:o}=e,r=`[class^="${t}"], [class*=" ${t}"]`;return{[r]:{fontFamily:n,fontSize:o,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[r]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},yl=e=>({outline:`${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),Sl=e=>({"&:focus-visible":S({},yl(e))});function pt(e,t,n){return o=>{const r=M(()=>o==null?void 0:o.value),[i,a,l]=Ol(),{getPrefixCls:s,iconPrefixCls:c}=Bb(),u=M(()=>s()),d=M(()=>({theme:i.value,token:a.value,hashId:l.value,path:["Shared",u.value]}));s0(d,()=>[{"&":Yne(a.value)}]);const f=M(()=>({theme:i.value,token:a.value,hashId:l.value,path:[e,r.value,c.value]}));return[s0(f,()=>{const{token:h,flush:m}=Zne(a.value),v=typeof n=="function"?n(h):n,y=S(S({},v),a.value[e]),b=`.${r.value}`,$=nt(h,{componentCls:b,prefixCls:r.value,iconCls:`.${c.value}`,antCls:`.${u.value}`},y),x=t($,{hashId:l.value,prefixCls:r.value,rootPrefixCls:u.value,iconPrefixCls:c.value,overrideComponentToken:a.value[e]});return m(e,y),[Xne(a.value,r.value),x]}),l]}}const x7=typeof CSSINJS_STATISTIC<"u";let ex=!0;function nt(){for(var e=arguments.length,t=new Array(e),n=0;n{Object.keys(r).forEach(a=>{Object.defineProperty(o,a,{configurable:!0,enumerable:!0,get:()=>r[a]})})}),ex=!0,o}function qne(){}function Zne(e){let t,n=e,o=qne;return x7&&(t=new Set,n=new Proxy(e,{get(r,i){return ex&&t.add(i),r[i]}}),o=(r,i)=>{Array.from(t)}),{token:n,keys:t,flush:o}}const Qne=M2(Kne),w7={token:Wb,hashed:!0},_7=Symbol("DesignTokenContext"),tx=ve(),Jne=e=>{ft(_7,e),Ie(e,()=>{tx.value=It(e),KL(tx)},{immediate:!0,deep:!0})},eoe=pe({props:{value:qe()},setup(e,t){let{slots:n}=t;return Jne(M(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function Ol(){const e=it(_7,M(()=>tx.value||w7)),t=M(()=>`${b7}-${e.value.hashed||""}`),n=M(()=>e.value.theme||Qne),o=s7(n,M(()=>[Wb,e.value.token]),M(()=>({salt:t.value,override:S({override:e.value.token},e.value.components),formatToken:Gne})));return[n,M(()=>o.value[0]),M(()=>e.value.hashed?o.value[1]:"")]}const O7=pe({compatConfig:{MODE:3},setup(){const[,e]=Ol(),t=M(()=>new Zt(e.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>g("svg",{style:t.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[g("g",{fill:"none","fill-rule":"evenodd"},[g("g",{transform:"translate(24 31.67)"},[g("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),g("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),g("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),g("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),g("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),g("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),g("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[g("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),g("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});O7.PRESENTED_IMAGE_DEFAULT=!0;const toe=O7,I7=pe({compatConfig:{MODE:3},setup(){const[,e]=Ol(),t=M(()=>{const{colorFill:n,colorFillTertiary:o,colorFillQuaternary:r,colorBgContainer:i}=e.value;return{borderColor:new Zt(n).onBackground(i).toHexString(),shadowColor:new Zt(o).onBackground(i).toHexString(),contentColor:new Zt(r).onBackground(i).toHexString()}});return()=>g("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[g("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[g("ellipse",{fill:t.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),g("g",{"fill-rule":"nonzero",stroke:t.value.borderColor},[g("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),g("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:t.value.contentColor},null)])])])}});I7.PRESENTED_IMAGE_SIMPLE=!0;const noe=I7,ooe=e=>{const{componentCls:t,margin:n,marginXS:o,marginXL:r,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:o,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:o,opacity:e.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:r,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:o,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},roe=pt("Empty",e=>{const{componentCls:t,controlHeightLG:n}=e,o=nt(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n*2.5,emptyImgHeightMD:n,emptyImgHeightSM:n*.875});return[ooe(o)]});var ioe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,imageStyle:qe(),image:cn(),description:cn()}),N2=pe({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:aoe(),setup(e,t){let{slots:n={},attrs:o}=t;const{direction:r,prefixCls:i}=Ve("empty",e),[a,l]=roe(i);return()=>{var s,c;const u=i.value,d=S(S({},e),o),{image:f=((s=n.image)===null||s===void 0?void 0:s.call(n))||P7,description:h=((c=n.description)===null||c===void 0?void 0:c.call(n))||void 0,imageStyle:m,class:v=""}=d,y=ioe(d,["image","description","imageStyle","class"]);return a(g(Yc,{componentName:"Empty",children:b=>{const $=typeof h<"u"?h:b.description,x=typeof $=="string"?$:"empty";let _=null;return typeof f=="string"?_=g("img",{alt:x,src:f},null):_=f,g("div",V({class:me(u,v,l.value,{[`${u}-normal`]:f===T7,[`${u}-rtl`]:r.value==="rtl"})},y),[g("div",{class:`${u}-image`,style:m},[_]),$&&g("p",{class:`${u}-description`},[$]),n.default&&g("div",{class:`${u}-footer`},[_n(n.default())])])}},null))}}});N2.PRESENTED_IMAGE_DEFAULT=P7;N2.PRESENTED_IMAGE_SIMPLE=T7;const cs=$n(N2),k2=e=>{const{prefixCls:t}=Ve("empty",e);return(o=>{switch(o){case"Table":case"List":return g(cs,{image:cs.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return g(cs,{image:cs.PRESENTED_IMAGE_SIMPLE,class:`${t.value}-small`},null);default:return g(cs,null,null)}})(e.componentName)};function loe(e){return g(k2,{componentName:e},null)}const E7=Symbol("SizeContextKey"),A7=()=>it(E7,he(void 0)),M7=e=>{const t=A7();return ft(E7,M(()=>e.value||t.value)),e},Ve=(e,t)=>{const n=A7(),o=jr(),r=it(P2,S(S({},GN),{renderEmpty:O=>Ni(k2,{componentName:O})})),i=M(()=>r.getPrefixCls(e,t.prefixCls)),a=M(()=>{var O,P;return(O=t.direction)!==null&&O!==void 0?O:(P=r.direction)===null||P===void 0?void 0:P.value}),l=M(()=>{var O;return(O=t.iconPrefixCls)!==null&&O!==void 0?O:r.iconPrefixCls.value}),s=M(()=>r.getPrefixCls()),c=M(()=>{var O;return(O=r.autoInsertSpaceInButton)===null||O===void 0?void 0:O.value}),u=r.renderEmpty,d=r.space,f=r.pageHeader,h=r.form,m=M(()=>{var O,P;return(O=t.getTargetContainer)!==null&&O!==void 0?O:(P=r.getTargetContainer)===null||P===void 0?void 0:P.value}),v=M(()=>{var O,P,E;return(P=(O=t.getContainer)!==null&&O!==void 0?O:t.getPopupContainer)!==null&&P!==void 0?P:(E=r.getPopupContainer)===null||E===void 0?void 0:E.value}),y=M(()=>{var O,P;return(O=t.dropdownMatchSelectWidth)!==null&&O!==void 0?O:(P=r.dropdownMatchSelectWidth)===null||P===void 0?void 0:P.value}),b=M(()=>{var O;return(t.virtual===void 0?((O=r.virtual)===null||O===void 0?void 0:O.value)!==!1:t.virtual!==!1)&&y.value!==!1}),$=M(()=>t.size||n.value),x=M(()=>{var O,P,E;return(O=t.autocomplete)!==null&&O!==void 0?O:(E=(P=r.input)===null||P===void 0?void 0:P.value)===null||E===void 0?void 0:E.autocomplete}),_=M(()=>{var O;return(O=t.disabled)!==null&&O!==void 0?O:o.value}),w=M(()=>{var O;return(O=t.csp)!==null&&O!==void 0?O:r.csp}),I=M(()=>{var O,P;return(O=t.wave)!==null&&O!==void 0?O:(P=r.wave)===null||P===void 0?void 0:P.value});return{configProvider:r,prefixCls:i,direction:a,size:$,getTargetContainer:m,getPopupContainer:v,space:d,pageHeader:f,form:h,autoInsertSpaceInButton:c,renderEmpty:u,virtual:b,dropdownMatchSelectWidth:y,rootPrefixCls:s,getPrefixCls:r.getPrefixCls,autocomplete:x,csp:w,iconPrefixCls:l,disabled:_,select:r.select,wave:I}};function _t(e,t){const n=S({},e);for(let o=0;o{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}},coe=pt("Affix",e=>{const t=nt(e,{zIndexPopup:e.zIndexBase+10});return[soe(t)]});function uoe(){return typeof window<"u"?window:null}var Qu;(function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"})(Qu||(Qu={}));const doe=()=>({offsetTop:Number,offsetBottom:Number,target:{type:Function,default:uoe},prefixCls:String,onChange:Function,onTestUpdatePosition:Function}),foe=pe({compatConfig:{MODE:3},name:"AAffix",inheritAttrs:!1,props:doe(),setup(e,t){let{slots:n,emit:o,expose:r,attrs:i}=t;const a=ve(),l=ve(),s=St({affixStyle:void 0,placeholderStyle:void 0,status:Qu.None,lastAffix:!1,prevTarget:null,timeout:null}),c=Nn(),u=M(()=>e.offsetBottom===void 0&&e.offsetTop===void 0?0:e.offsetTop),d=M(()=>e.offsetBottom),f=()=>{const{status:x,lastAffix:_}=s,{target:w}=e;if(x!==Qu.Prepare||!l.value||!a.value||!w)return;const I=w();if(!I)return;const O={status:Qu.None},P=dv(a.value);if(P.top===0&&P.left===0&&P.width===0&&P.height===0)return;const E=dv(I),R=c3(P,E,u.value),A=u3(P,E,d.value);if(!(P.top===0&&P.left===0&&P.width===0&&P.height===0)){if(R!==void 0){const N=`${P.width}px`,F=`${P.height}px`;O.affixStyle={position:"fixed",top:R,width:N,height:F},O.placeholderStyle={width:N,height:F}}else if(A!==void 0){const N=`${P.width}px`,F=`${P.height}px`;O.affixStyle={position:"fixed",bottom:A,width:N,height:F},O.placeholderStyle={width:N,height:F}}O.lastAffix=!!O.affixStyle,_!==O.lastAffix&&o("change",O.lastAffix),S(s,O)}},h=()=>{S(s,{status:Qu.Prepare,affixStyle:void 0,placeholderStyle:void 0})},m=V$(()=>{h()}),v=V$(()=>{const{target:x}=e,{affixStyle:_}=s;if(x&&_){const w=x();if(w&&a.value){const I=dv(w),O=dv(a.value),P=c3(O,I,u.value),E=u3(O,I,d.value);if(P!==void 0&&_.top===P||E!==void 0&&_.bottom===E)return}}h()});r({updatePosition:m,lazyUpdatePosition:v}),Ie(()=>e.target,x=>{const _=(x==null?void 0:x())||null;s.prevTarget!==_&&(f3(c),_&&(d3(_,c),m()),s.prevTarget=_)}),Ie(()=>[e.offsetTop,e.offsetBottom],m),lt(()=>{const{target:x}=e;x&&(s.timeout=setTimeout(()=>{d3(x(),c),m()}))}),fr(()=>{f()}),Fo(()=>{clearTimeout(s.timeout),f3(c),m.cancel(),v.cancel()});const{prefixCls:y}=Ve("affix",e),[b,$]=coe(y);return()=>{var x;const{affixStyle:_,placeholderStyle:w,status:I}=s,O=me({[y.value]:_,[$.value]:!0}),P=_t(e,["prefixCls","offsetTop","offsetBottom","target","onChange","onTestUpdatePosition"]);return b(g(ki,{onResize:m},{default:()=>[g("div",V(V(V({},P),i),{},{ref:a,"data-measure-status":I}),[_&&g("div",{style:w,"aria-hidden":"true"},null),g("div",{class:O,ref:l,style:_},[(x=n.default)===null||x===void 0?void 0:x.call(n)])])]}))}}}),R7=$n(foe);function E3(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function A3(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function US(e,t){if(e.clientHeightt||i>e&&a=t&&l>=n?i-e-o:a>t&&ln?a-t+r:0}var M3=function(e,t){var n=window,o=t.scrollMode,r=t.block,i=t.inline,a=t.boundary,l=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(j){return j!==a};if(!E3(e))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,f=[],h=e;E3(h)&&s(h);){if((h=(u=(c=h).parentElement)==null?c.getRootNode().host||null:u)===d){f.push(h);break}h!=null&&h===document.body&&US(h)&&!US(document.documentElement)||h!=null&&US(h,l)&&f.push(h)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,v=n.visualViewport?n.visualViewport.height:innerHeight,y=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,$=e.getBoundingClientRect(),x=$.height,_=$.width,w=$.top,I=$.right,O=$.bottom,P=$.left,E=r==="start"||r==="nearest"?w:r==="end"?O:w+x/2,R=i==="center"?P+_/2:i==="end"?I:P,A=[],N=0;N=0&&P>=0&&O<=v&&I<=m&&w>=k&&O<=z&&P>=K&&I<=L)return A;var G=getComputedStyle(F),Y=parseInt(G.borderLeftWidth,10),ne=parseInt(G.borderTopWidth,10),re=parseInt(G.borderRightWidth,10),J=parseInt(G.borderBottomWidth,10),te=0,ee=0,fe="offsetWidth"in F?F.offsetWidth-F.clientWidth-Y-re:0,ie="offsetHeight"in F?F.offsetHeight-F.clientHeight-ne-J:0,X="offsetWidth"in F?F.offsetWidth===0?0:B/F.offsetWidth:0,ue="offsetHeight"in F?F.offsetHeight===0?0:D/F.offsetHeight:0;if(d===F)te=r==="start"?E:r==="end"?E-v:r==="nearest"?yv(b,b+v,v,ne,J,b+E,b+E+x,x):E-v/2,ee=i==="start"?R:i==="center"?R-m/2:i==="end"?R-m:yv(y,y+m,m,Y,re,y+R,y+R+_,_),te=Math.max(0,te+b),ee=Math.max(0,ee+y);else{te=r==="start"?E-k-ne:r==="end"?E-z+J+ie:r==="nearest"?yv(k,z,D,ne,J+ie,E,E+x,x):E-(k+D/2)+ie/2,ee=i==="start"?R-K-Y:i==="center"?R-(K+B/2)+fe/2:i==="end"?R-L+re+fe:yv(K,L,B,Y,re+fe,R,R+_,_);var ye=F.scrollLeft,H=F.scrollTop;E+=H-(te=Math.max(0,Math.min(H+te/ue,F.scrollHeight-D/ue+ie))),R+=ye-(ee=Math.max(0,Math.min(ye+ee/X,F.scrollWidth-B/X+fe)))}A.push({el:F,top:te,left:ee})}return A};function D7(e){return e===Object(e)&&Object.keys(e).length!==0}function poe(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(o){var r=o.el,i=o.top,a=o.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)})}function hoe(e){return e===!1?{block:"end",inline:"nearest"}:D7(e)?e:{block:"start",inline:"nearest"}}function L7(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(D7(t)&&typeof t.behavior=="function")return t.behavior(n?M3(e,t):[]);if(n){var o=hoe(t);return poe(M3(e,o),o.behavior)}}function goe(e,t,n,o){const r=n-t;return e/=o/2,e<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}function nx(e){return e!=null&&e===e.window}function B2(e,t){var n,o;if(typeof window>"u")return 0;const r=t?"scrollTop":"scrollLeft";let i=0;return nx(e)?i=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?i=e.documentElement[r]:(e instanceof HTMLElement||e)&&(i=e[r]),e&&!nx(e)&&typeof i!="number"&&(i=(o=((n=e.ownerDocument)!==null&&n!==void 0?n:e).documentElement)===null||o===void 0?void 0:o[r]),i}function F2(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:n=()=>window,callback:o,duration:r=450}=t,i=n(),a=B2(i,!0),l=Date.now(),s=()=>{const u=Date.now()-l,d=goe(u>r?r:u,a,e,r);nx(i)?i.scrollTo(window.pageXOffset,d):i instanceof Document||i.constructor.name==="HTMLDocument"?i.documentElement.scrollTop=d:i.scrollTop=d,u{ft(N7,e)},moe=()=>it(N7,{registerLink:Sv,unregisterLink:Sv,scrollTo:Sv,activeLink:M(()=>""),handleClick:Sv,direction:M(()=>"vertical")}),boe=e=>{const{componentCls:t,holderOffsetBlock:n,motionDurationSlow:o,lineWidthBold:r,colorPrimary:i,lineType:a,colorSplit:l}=e;return{[`${t}-wrapper`]:{marginBlockStart:-n,paddingBlockStart:n,backgroundColor:"transparent",[t]:S(S({},vt(e)),{position:"relative",paddingInlineStart:r,[`${t}-link`]:{paddingBlock:e.anchorPaddingBlock,paddingInline:`${e.anchorPaddingInline}px 0`,"&-title":S(S({},eo),{position:"relative",display:"block",marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${t}-link-title`]:{color:e.colorPrimary},[`${t}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${t}-wrapper-horizontal)`]:{[t]:{"&::before":{position:"absolute",left:{_skip_check_:!0,value:0},top:0,height:"100%",borderInlineStart:`${r}px ${a} ${l}`,content:'" "'},[`${t}-ink`]:{position:"absolute",left:{_skip_check_:!0,value:0},display:"none",transform:"translateY(-50%)",transition:`top ${o} ease-in-out`,width:r,backgroundColor:i,[`&${t}-ink-visible`]:{display:"inline-block"}}}},[`${t}-fixed ${t}-ink ${t}-ink`]:{display:"none"}}}},yoe=e=>{const{componentCls:t,motionDurationSlow:n,lineWidthBold:o,colorPrimary:r}=e;return{[`${t}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:'" "'},[t]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${t}-link:first-of-type`]:{paddingInline:0},[`${t}-ink`]:{position:"absolute",bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:o,backgroundColor:r}}}}},Soe=pt("Anchor",e=>{const{fontSize:t,fontSizeLG:n,padding:o,paddingXXS:r}=e,i=nt(e,{holderOffsetBlock:r,anchorPaddingBlock:r,anchorPaddingBlockSecondary:r/2,anchorPaddingInline:o,anchorTitleBlock:t/14*3,anchorBallSize:n/2});return[boe(i),yoe(i)]}),Coe=()=>({prefixCls:String,href:String,title:cn(),target:String,customTitleProps:qe()}),H2=pe({compatConfig:{MODE:3},name:"AAnchorLink",inheritAttrs:!1,props:bt(Coe(),{href:"#"}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t,r=null;const{handleClick:i,scrollTo:a,unregisterLink:l,registerLink:s,activeLink:c}=moe(),{prefixCls:u}=Ve("anchor",e),d=f=>{const{href:h}=e;i(f,{title:r,href:h}),a(h)};return Ie(()=>e.href,(f,h)=>{wt(()=>{l(h),s(f)})}),lt(()=>{s(e.href)}),Ct(()=>{l(e.href)}),()=>{var f;const{href:h,target:m,title:v=n.title,customTitleProps:y={}}=e,b=u.value;r=typeof v=="function"?v(y):v;const $=c.value===h,x=me(`${b}-link`,{[`${b}-link-active`]:$},o.class),_=me(`${b}-link-title`,{[`${b}-link-title-active`]:$});return g("div",V(V({},o),{},{class:x}),[g("a",{class:_,href:h,title:typeof r=="string"?r:"",target:m,onClick:d},[n.customTitle?n.customTitle(y):r]),(f=n.default)===null||f===void 0?void 0:f.call(n)])}}});function R3(e,t){for(var n=0;n=0||(r[n]=e[n]);return r}function D3(e){return((t=e)!=null&&typeof t=="object"&&Array.isArray(t)===!1)==1&&Object.prototype.toString.call(e)==="[object Object]";var t}var H7=Object.prototype,z7=H7.toString,$oe=H7.hasOwnProperty,j7=/^\s*function (\w+)/;function L3(e){var t,n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){var o=n.toString().match(j7);return o?o[1]:""}return""}var Rc=function(e){var t,n;return D3(e)!==!1&&typeof(t=e.constructor)=="function"&&D3(n=t.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1},xoe=function(e){return e},Sr=xoe,ah=function(e,t){return $oe.call(e,t)},woe=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Id=Array.isArray||function(e){return z7.call(e)==="[object Array]"},Pd=function(e){return z7.call(e)==="[object Function]"},u0=function(e){return Rc(e)&&ah(e,"_vueTypes_name")},W7=function(e){return Rc(e)&&(ah(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return ah(e,t)}))};function z2(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function qc(e,t,n){var o;n===void 0&&(n=!1);var r=!0,i="";o=Rc(e)?e:{type:e};var a=u0(o)?o._vueTypes_name+" - ":"";if(W7(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&t===void 0)return r;Id(o.type)?(r=o.type.some(function(d){return qc(d,t,!0)===!0}),i=o.type.map(function(d){return L3(d)}).join(" or ")):r=(i=L3(o))==="Array"?Id(t):i==="Object"?Rc(t):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(d){if(d==null)return"";var f=d.constructor.toString().match(j7);return f?f[1]:""}(t)===i:t instanceof o.type}if(!r){var l=a+'value "'+t+'" should be of type "'+i+'"';return n===!1?(Sr(l),!1):l}if(ah(o,"validator")&&Pd(o.validator)){var s=Sr,c=[];if(Sr=function(d){c.push(d)},r=o.validator(t),Sr=s,!r){var u=(c.length>1?"* ":"")+c.join(` +* `);return c.length=0,n===!1?(Sr(u),r):u}}return r}function ui(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(r){return r!==void 0||this.default?Pd(r)||qc(this,r,!0)===!0?(this.default=Id(r)?function(){return[].concat(r)}:Rc(r)?function(){return Object.assign({},r)}:r,this):(Sr(this._vueTypes_name+' - invalid default value: "'+r+'"'),this):this}}}),o=n.validator;return Pd(o)&&(n.validator=z2(o,n)),n}function La(e,t){var n=ui(e,t);return Object.defineProperty(n,"validate",{value:function(o){return Pd(this.validator)&&Sr(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info: +`+JSON.stringify(this)),this.validator=z2(o,this),this}})}function N3(e,t,n){var o,r,i=(o=t,r={},Object.getOwnPropertyNames(o).forEach(function(d){r[d]=Object.getOwnPropertyDescriptor(o,d)}),Object.defineProperties({},r));if(i._vueTypes_name=e,!Rc(n))return i;var a,l,s=n.validator,c=F7(n,["validator"]);if(Pd(s)){var u=i.validator;u&&(u=(l=(a=u).__original)!==null&&l!==void 0?l:a),i.validator=z2(u?function(d){return u.call(this,d)&&s.call(this,d)}:s,i)}return Object.assign(i,c)}function Kb(e){return e.replace(/^(?!\s*$)/gm," ")}var _oe=function(){return La("any",{})},Ooe=function(){return La("function",{type:Function})},Ioe=function(){return La("boolean",{type:Boolean})},Poe=function(){return La("string",{type:String})},Toe=function(){return La("number",{type:Number})},Eoe=function(){return La("array",{type:Array})},Aoe=function(){return La("object",{type:Object})},Moe=function(){return ui("integer",{type:Number,validator:function(e){return woe(e)}})},Roe=function(){return ui("symbol",{validator:function(e){return typeof e=="symbol"}})};function Doe(e,t){if(t===void 0&&(t="custom validation failed"),typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return ui(e.name||"<>",{validator:function(n){var o=e(n);return o||Sr(this._vueTypes_name+" - "+t),o}})}function Loe(e){if(!Id(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.join('", "')+'".',n=e.reduce(function(o,r){if(r!=null){var i=r.constructor;o.indexOf(i)===-1&&o.push(i)}return o},[]);return ui("oneOf",{type:n.length>0?n:void 0,validator:function(o){var r=e.indexOf(o)!==-1;return r||Sr(t),r}})}function Noe(e){if(!Id(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=[],o=0;o0&&n.some(function(s){return a.indexOf(s)===-1})){var l=n.filter(function(s){return a.indexOf(s)===-1});return Sr(l.length===1?'shape - required property "'+l[0]+'" is not defined.':'shape - required properties "'+l.join('", "')+'" are not defined.'),!1}return a.every(function(s){if(t.indexOf(s)===-1)return i._vueTypes_isLoose===!0||(Sr('shape - shape definition does not include a "'+s+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var c=qc(e[s],r[s],!0);return typeof c=="string"&&Sr('shape - "'+s+`" property validation error: + `+Kb(c)),c===!0})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),o}var Ca=function(){function e(){}return e.extend=function(t){var n=this;if(Id(t))return t.forEach(function(d){return n.extend(d)}),this;var o=t.name,r=t.validate,i=r!==void 0&&r,a=t.getter,l=a!==void 0&&a,s=F7(t,["name","validate","getter"]);if(ah(this,o))throw new TypeError('[VueTypes error]: Type "'+o+'" already defined');var c,u=s.type;return u0(u)?(delete s.type,Object.defineProperty(this,o,l?{get:function(){return N3(o,u,s)}}:{value:function(){var d,f=N3(o,u,s);return f.validator&&(f.validator=(d=f.validator).bind.apply(d,[f].concat([].slice.call(arguments)))),f}})):(c=l?{get:function(){var d=Object.assign({},s);return i?La(o,d):ui(o,d)},enumerable:!0}:{value:function(){var d,f,h=Object.assign({},s);return d=i?La(o,h):ui(o,h),h.validator&&(d.validator=(f=h.validator).bind.apply(f,[d].concat([].slice.call(arguments)))),d},enumerable:!0},Object.defineProperty(this,o,c))},k7(e,null,[{key:"any",get:function(){return _oe()}},{key:"func",get:function(){return Ooe().def(this.defaults.func)}},{key:"bool",get:function(){return Ioe().def(this.defaults.bool)}},{key:"string",get:function(){return Poe().def(this.defaults.string)}},{key:"number",get:function(){return Toe().def(this.defaults.number)}},{key:"array",get:function(){return Eoe().def(this.defaults.array)}},{key:"object",get:function(){return Aoe().def(this.defaults.object)}},{key:"integer",get:function(){return Moe().def(this.defaults.integer)}},{key:"symbol",get:function(){return Roe()}}]),e}();function V7(e){var t;return e===void 0&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(t=function(n){function o(){return n.apply(this,arguments)||this}return B7(o,n),k7(o,null,[{key:"sensibleDefaults",get:function(){return sm({},this.defaults)},set:function(r){this.defaults=r!==!1?sm({},r!==!0?r:e):{}}}]),o}(Ca)).defaults=sm({},e),t}Ca.defaults={},Ca.custom=Doe,Ca.oneOf=Loe,Ca.instanceOf=Boe,Ca.oneOfType=Noe,Ca.arrayOf=koe,Ca.objectOf=Foe,Ca.shape=Hoe,Ca.utils={validate:function(e,t){return qc(t,e,!0)===!0},toType:function(e,t,n){return n===void 0&&(n=!1),n?La(e,t):ui(e,t)}};(function(e){function t(){return e.apply(this,arguments)||this}return B7(t,e),t})(V7());const Z=V7({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});Z.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);function K7(e){return e.default=void 0,e}const pn=(e,t,n)=>{Hb(e,`[ant-design-vue: ${t}] ${n}`)};function zoe(){return window}function k3(e,t){if(!e.getClientRects().length)return 0;const n=e.getBoundingClientRect();return n.width||n.height?t===window?(t=e.ownerDocument.documentElement,n.top-t.clientTop):n.top-t.getBoundingClientRect().top:n.top}const B3=/#([\S ]+)$/,joe=()=>({prefixCls:String,offsetTop:Number,bounds:Number,affix:{type:Boolean,default:!0},showInkInFixed:{type:Boolean,default:!1},getContainer:Function,wrapperClass:String,wrapperStyle:{type:Object,default:void 0},getCurrentAnchor:Function,targetOffset:Number,items:kt(),direction:Z.oneOf(["vertical","horizontal"]).def("vertical"),onChange:Function,onClick:Function}),fc=pe({compatConfig:{MODE:3},name:"AAnchor",inheritAttrs:!1,props:joe(),setup(e,t){let{emit:n,attrs:o,slots:r,expose:i}=t;const{prefixCls:a,getTargetContainer:l,direction:s}=Ve("anchor",e),c=M(()=>{var O;return(O=e.direction)!==null&&O!==void 0?O:"vertical"}),u=he(null),d=he(),f=St({links:[],scrollContainer:null,scrollEvent:null,animating:!1}),h=he(null),m=M(()=>{const{getContainer:O}=e;return O||(l==null?void 0:l.value)||zoe}),v=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;const E=[],R=m.value();return f.links.forEach(A=>{const N=B3.exec(A.toString());if(!N)return;const F=document.getElementById(N[1]);if(F){const W=k3(F,R);WF.top>N.top?F:N).link:""},y=O=>{const{getCurrentAnchor:P}=e;h.value!==O&&(h.value=typeof P=="function"?P(O):O,n("change",O))},b=O=>{const{offsetTop:P,targetOffset:E}=e;y(O);const R=B3.exec(O);if(!R)return;const A=document.getElementById(R[1]);if(!A)return;const N=m.value(),F=B2(N,!0),W=k3(A,N);let D=F+W;D-=E!==void 0?E:P||0,f.animating=!0,F2(D,{callback:()=>{f.animating=!1},getContainer:m.value})};i({scrollTo:b});const $=()=>{if(f.animating)return;const{offsetTop:O,bounds:P,targetOffset:E}=e,R=v(E!==void 0?E:O||0,P);y(R)},x=()=>{const O=d.value.querySelector(`.${a.value}-link-title-active`);if(O&&u.value){const P=c.value==="horizontal";u.value.style.top=P?"":`${O.offsetTop+O.clientHeight/2}px`,u.value.style.height=P?"":`${O.clientHeight}px`,u.value.style.left=P?`${O.offsetLeft}px`:"",u.value.style.width=P?`${O.clientWidth}px`:"",P&&L7(O,{scrollMode:"if-needed",block:"nearest"})}};voe({registerLink:O=>{f.links.includes(O)||f.links.push(O)},unregisterLink:O=>{const P=f.links.indexOf(O);P!==-1&&f.links.splice(P,1)},activeLink:h,scrollTo:b,handleClick:(O,P)=>{n("click",O,P)},direction:c}),lt(()=>{wt(()=>{const O=m.value();f.scrollContainer=O,f.scrollEvent=wn(f.scrollContainer,"scroll",$),$()})}),Ct(()=>{f.scrollEvent&&f.scrollEvent.remove()}),fr(()=>{if(f.scrollEvent){const O=m.value();f.scrollContainer!==O&&(f.scrollContainer=O,f.scrollEvent.remove(),f.scrollEvent=wn(f.scrollContainer,"scroll",$),$())}x()});const _=O=>Array.isArray(O)?O.map(P=>{const{children:E,key:R,href:A,target:N,class:F,style:W,title:D}=P;return g(H2,{key:R,href:A,target:N,class:F,style:W,title:D,customTitleProps:P},{default:()=>[c.value==="vertical"?_(E):null],customTitle:r.customTitle})}):null,[w,I]=Soe(a);return()=>{var O;const{offsetTop:P,affix:E,showInkInFixed:R}=e,A=a.value,N=me(`${A}-ink`,{[`${A}-ink-visible`]:h.value}),F=me(I.value,e.wrapperClass,`${A}-wrapper`,{[`${A}-wrapper-horizontal`]:c.value==="horizontal",[`${A}-rtl`]:s.value==="rtl"}),W=me(A,{[`${A}-fixed`]:!E&&!R}),D=S({maxHeight:P?`calc(100vh - ${P}px)`:"100vh"},e.wrapperStyle),B=g("div",{class:F,style:D,ref:d},[g("div",{class:W},[g("span",{class:N,ref:u},null),Array.isArray(e.items)?_(e.items):(O=r.default)===null||O===void 0?void 0:O.call(r)])]);return w(E?g(R7,V(V({},o),{},{offsetTop:P,target:m.value}),{default:()=>[B]}):B)}}});fc.Link=H2;fc.install=function(e){return e.component(fc.name,fc),e.component(fc.Link.name,fc.Link),e};function F3(e,t){const{key:n}=e;let o;return"value"in e&&({value:o}=e),n??(o!==void 0?o:`rc-index-key-${t}`)}function U7(e,t){const{label:n,value:o,options:r}=e||{};return{label:n||(t?"children":"label"),value:o||"value",options:r||"options"}}function Woe(e){let{fieldNames:t,childrenAsData:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=[],{label:r,value:i,options:a}=U7(t,!1);function l(s,c){s.forEach(u=>{const d=u[r];if(c||!(a in u)){const f=u[i];o.push({key:F3(u,o.length),groupOption:c,data:u,label:d,value:f})}else{let f=d;f===void 0&&n&&(f=u.label),o.push({key:F3(u,o.length),group:!0,data:u,label:f}),l(u[a],!0)}})}return l(e,!1),o}function ox(e){const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function Voe(e,t){if(!t||!t.length)return null;let n=!1;function o(i,a){let[l,...s]=a;if(!l)return[i];const c=i.split(l);return n=n||c.length>1,c.reduce((u,d)=>[...u,...o(d,s)],[]).filter(u=>u)}const r=o(e,t);return n?r:null}function Koe(){return""}function Uoe(e){return e?e.ownerDocument:window.document}function G7(){}const Y7=()=>({action:Z.oneOfType([Z.string,Z.arrayOf(Z.string)]).def([]),showAction:Z.any.def([]),hideAction:Z.any.def([]),getPopupClassNameFromAlign:Z.any.def(Koe),onPopupVisibleChange:Function,afterPopupVisibleChange:Z.func.def(G7),popup:Z.any,popupStyle:{type:Object,default:void 0},prefixCls:Z.string.def("rc-trigger-popup"),popupClassName:Z.string.def(""),popupPlacement:String,builtinPlacements:Z.object,popupTransitionName:String,popupAnimation:Z.any,mouseEnterDelay:Z.number.def(0),mouseLeaveDelay:Z.number.def(.1),zIndex:Number,focusDelay:Z.number.def(0),blurDelay:Z.number.def(.15),getPopupContainer:Function,getDocument:Z.func.def(Uoe),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:Z.object.def(()=>({})),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function}),j2={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},Goe=S(S({},j2),{mobile:{type:Object}}),Yoe=S(S({},j2),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function W2(e){let{prefixCls:t,animation:n,transitionName:o}=e;return n?{name:`${t}-${n}`}:o?{name:o}:{}}function X7(e){const{prefixCls:t,visible:n,zIndex:o,mask:r,maskAnimation:i,maskTransitionName:a}=e;if(!r)return null;let l={};return(a||i)&&(l=W2({prefixCls:t,transitionName:a,animation:i})),g(so,V({appear:!0},l),{default:()=>[Ln(g("div",{style:{zIndex:o},class:`${t}-mask`},null),[[RQ("if"),n]])]})}X7.displayName="Mask";const Xoe=pe({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:Goe,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,slots:o}=t;const r=he();return n({forceAlign:()=>{},getElement:()=>r.value}),()=>{var i;const{zIndex:a,visible:l,prefixCls:s,mobile:{popupClassName:c,popupStyle:u,popupMotion:d={},popupRender:f}={}}=e,h=S({zIndex:a},u);let m=ln((i=o.default)===null||i===void 0?void 0:i.call(o));m.length>1&&(m=g("div",{class:`${s}-content`},[m])),f&&(m=f(m));const v=me(s,c);return g(so,V({ref:r},d),{default:()=>[l?g("div",{class:v,style:h},[m]):null]})}}});var qoe=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(u){try{c(o.next(u))}catch(d){a(d)}}function s(u){try{c(o.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):r(u.value).then(l,s)}c((o=o.apply(e,t||[])).next())})};const H3=["measure","align",null,"motion"],Zoe=(e,t)=>{const n=ve(null),o=ve(),r=ve(!1);function i(s){r.value||(n.value=s)}function a(){mt.cancel(o.value)}function l(s){a(),o.value=mt(()=>{let c=n.value;switch(n.value){case"align":c="motion";break;case"motion":c="stable";break}i(c),s==null||s()})}return Ie(e,()=>{i("measure")},{immediate:!0,flush:"post"}),lt(()=>{Ie(n,()=>{switch(n.value){case"measure":t();break}n.value&&(o.value=mt(()=>qoe(void 0,void 0,void 0,function*(){const s=H3.indexOf(n.value),c=H3[s+1];c&&s!==-1&&i(c)})))},{immediate:!0,flush:"post"})}),Ct(()=>{r.value=!0,a()}),[n,l]},Qoe=e=>{const t=ve({width:0,height:0});function n(r){t.value={width:r.offsetWidth,height:r.offsetHeight}}return[M(()=>{const r={};if(e.value){const{width:i,height:a}=t.value;e.value.indexOf("height")!==-1&&a?r.height=`${a}px`:e.value.indexOf("minHeight")!==-1&&a&&(r.minHeight=`${a}px`),e.value.indexOf("width")!==-1&&i?r.width=`${i}px`:e.value.indexOf("minWidth")!==-1&&i&&(r.minWidth=`${i}px`)}return r}),n]};function z3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function j3(e){for(var t=1;t=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Cre(e,t,n,o){var r=Vt.clone(e),i={width:t.width,height:t.height};return o.adjustX&&r.left=n.left&&r.left+i.width>n.right&&(i.width-=r.left+i.width-n.right),o.adjustX&&r.left+i.width>n.right&&(r.left=Math.max(n.right-i.width,n.left)),o.adjustY&&r.top=n.top&&r.top+i.height>n.bottom&&(i.height-=r.top+i.height-n.bottom),o.adjustY&&r.top+i.height>n.bottom&&(r.top=Math.max(n.bottom-i.height,n.top)),Vt.mix(r,i)}function G2(e){var t,n,o;if(!Vt.isWindow(e)&&e.nodeType!==9)t=Vt.offset(e),n=Vt.outerWidth(e),o=Vt.outerHeight(e);else{var r=Vt.getWindow(e);t={left:Vt.getWindowScrollLeft(r),top:Vt.getWindowScrollTop(r)},n=Vt.viewportWidth(r),o=Vt.viewportHeight(r)}return t.width=n,t.height=o,t}function q3(e,t){var n=t.charAt(0),o=t.charAt(1),r=e.width,i=e.height,a=e.left,l=e.top;return n==="c"?l+=i/2:n==="b"&&(l+=i),o==="c"?a+=r/2:o==="r"&&(a+=r),{left:a,top:l}}function $v(e,t,n,o,r){var i=q3(t,n[1]),a=q3(e,n[0]),l=[a.left-i.left,a.top-i.top];return{left:Math.round(e.left-l[0]+o[0]-r[0]),top:Math.round(e.top-l[1]+o[1]-r[1])}}function Z3(e,t,n){return e.leftn.right}function Q3(e,t,n){return e.topn.bottom}function $re(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.right||o.top>=n.bottom}function Y2(e,t,n){var o=n.target||t,r=G2(o),i=!wre(o,n.overflow&&n.overflow.alwaysByViewport);return ok(e,r,n,i)}Y2.__getOffsetParent=lx;Y2.__getVisibleRectForElement=U2;function _re(e,t,n){var o,r,i=Vt.getDocument(e),a=i.defaultView||i.parentWindow,l=Vt.getWindowScrollLeft(a),s=Vt.getWindowScrollTop(a),c=Vt.viewportWidth(a),u=Vt.viewportHeight(a);"pageX"in t?o=t.pageX:o=l+t.clientX,"pageY"in t?r=t.pageY:r=s+t.clientY;var d={left:o,top:r,width:0,height:0},f=o>=0&&o<=l+c&&r>=0&&r<=s+u,h=[n.points[0],"cc"];return ok(e,d,j3(j3({},n),{},{points:h}),f)}function Gt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,r=e;if(Array.isArray(e)&&(r=_n(e)[0]),!r)return null;const i=ko(r,t,o);return i.props=n?S(S({},i.props),t):i.props,Sn(typeof i.props.class!="object"),i}function Ore(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e.map(o=>Gt(o,t,n))}function yp(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Array.isArray(e))return e.map(r=>yp(r,t,n,o));{if(!mo(e))return e;const r=Gt(e,t,n,o);return Array.isArray(r.children)&&(r.children=yp(r.children)),r}}function Ire(e,t,n){Ec(ko(e,S({},t)),n)}const rk=e=>(e||[]).some(t=>mo(t)?!(t.type===kr||t.type===Je&&!rk(t.children)):!0)?e:null;function Gb(e,t,n,o){var r;const i=(r=e[t])===null||r===void 0?void 0:r.call(e,n);return rk(i)?i:o==null?void 0:o()}const Yb=e=>{if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){const t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){const t=e.getBoundingClientRect();if(t.width||t.height)return!0}return!1};function Pre(e,t){return e===t?!0:!e||!t?!1:"pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t?e.clientX===t.clientX&&e.clientY===t.clientY:!1}function Tre(e,t){e!==document.activeElement&&ss(t,e)&&typeof e.focus=="function"&&e.focus()}function tA(e,t){let n=null,o=null;function r(a){let[{target:l}]=a;if(!document.documentElement.contains(l))return;const{width:s,height:c}=l.getBoundingClientRect(),u=Math.floor(s),d=Math.floor(c);(n!==u||o!==d)&&Promise.resolve().then(()=>{t({width:u,height:d})}),n=u,o=d}const i=new w2(r);return e&&i.observe(e),()=>{i.disconnect()}}const Ere=(e,t)=>{let n=!1,o=null;function r(){clearTimeout(o)}function i(a){if(!n||a===!0){if(e()===!1)return;n=!0,r(),o=setTimeout(()=>{n=!1},t.value)}else r(),o=setTimeout(()=>{n=!1,i()},t.value)}return[i,()=>{n=!1,r()}]};function Are(){this.__data__=[],this.size=0}function Fh(e,t){return e===t||e!==e&&t!==t}function Xb(e,t){for(var n=e.length;n--;)if(Fh(e[n][0],t))return n;return-1}var Mre=Array.prototype,Rre=Mre.splice;function Dre(e){var t=this.__data__,n=Xb(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Rre.call(t,n,1),--this.size,!0}function Lre(e){var t=this.__data__,n=Xb(t,e);return n<0?void 0:t[n][1]}function Nre(e){return Xb(this.__data__,e)>-1}function kre(e,t){var n=this.__data__,o=Xb(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function Il(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=n&kie?new Td:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=fae}var pae="[object Arguments]",hae="[object Array]",gae="[object Boolean]",vae="[object Date]",mae="[object Error]",bae="[object Function]",yae="[object Map]",Sae="[object Number]",Cae="[object Object]",$ae="[object RegExp]",xae="[object Set]",wae="[object String]",_ae="[object WeakMap]",Oae="[object ArrayBuffer]",Iae="[object DataView]",Pae="[object Float32Array]",Tae="[object Float64Array]",Eae="[object Int8Array]",Aae="[object Int16Array]",Mae="[object Int32Array]",Rae="[object Uint8Array]",Dae="[object Uint8ClampedArray]",Lae="[object Uint16Array]",Nae="[object Uint32Array]",An={};An[Pae]=An[Tae]=An[Eae]=An[Aae]=An[Mae]=An[Rae]=An[Dae]=An[Lae]=An[Nae]=!0;An[pae]=An[hae]=An[Oae]=An[gae]=An[Iae]=An[vae]=An[mae]=An[bae]=An[yae]=An[Sae]=An[Cae]=An[$ae]=An[xae]=An[wae]=An[_ae]=!1;function kae(e){return la(e)&&J2(e.length)&&!!An[Es(e)]}function Qb(e){return function(t){return e(t)}}var fk=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sp=fk&&typeof module=="object"&&module&&!module.nodeType&&module,Bae=Sp&&Sp.exports===fk,JS=Bae&&ik.process,Md=function(){try{var e=Sp&&Sp.require&&Sp.require("util").types;return e||JS&&JS.binding&&JS.binding("util")}catch{}}(),cA=Md&&Md.isTypedArray,Fae=cA?Qb(cA):kae;const Jb=Fae;var Hae=Object.prototype,zae=Hae.hasOwnProperty;function pk(e,t){var n=xr(e),o=!n&&Ed(e),r=!n&&!o&&Ad(e),i=!n&&!o&&!r&&Jb(e),a=n||o||r||i,l=a?nae(e.length,String):[],s=l.length;for(var c in e)(t||zae.call(e,c))&&!(a&&(c=="length"||r&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Zb(c,s)))&&l.push(c);return l}var jae=Object.prototype;function ey(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||jae;return e===n}function hk(e,t){return function(n){return e(t(n))}}var Wae=hk(Object.keys,Object),Vae=Object.prototype,Kae=Vae.hasOwnProperty;function gk(e){if(!ey(e))return Wae(e);var t=[];for(var n in Object(e))Kae.call(e,n)&&n!="constructor"&&t.push(n);return t}function Jc(e){return e!=null&&J2(e.length)&&!X2(e)}function tf(e){return Jc(e)?pk(e):gk(e)}function sx(e){return sk(e,tf,Q2)}var Uae=1,Gae=Object.prototype,Yae=Gae.hasOwnProperty;function Xae(e,t,n,o,r,i){var a=n&Uae,l=sx(e),s=l.length,c=sx(t),u=c.length;if(s!=u&&!a)return!1;for(var d=s;d--;){var f=l[d];if(!(a?f in t:Yae.call(t,f)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var v=!0;i.set(e,t),i.set(t,e);for(var y=a;++d{const{disabled:f,target:h,align:m,onAlign:v}=e;if(!f&&h&&i.value){const y=i.value;let b;const $=bA(h),x=yA(h);r.value.element=$,r.value.point=x,r.value.align=m;const{activeElement:_}=document;return $&&Yb($)?b=Y2(y,$,m):x&&(b=_re(y,x,m)),Tre(_,y),v&&b&&v(y,b),!0}return!1},M(()=>e.monitorBufferTime)),s=he({cancel:()=>{}}),c=he({cancel:()=>{}}),u=()=>{const f=e.target,h=bA(f),m=yA(f);i.value!==c.value.element&&(c.value.cancel(),c.value.element=i.value,c.value.cancel=tA(i.value,a)),(r.value.element!==h||!Pre(r.value.point,m)||!e_(r.value.align,e.align))&&(a(),s.value.element!==h&&(s.value.cancel(),s.value.element=h,s.value.cancel=tA(h,a)))};lt(()=>{wt(()=>{u()})}),fr(()=>{wt(()=>{u()})}),Ie(()=>e.disabled,f=>{f?l():a()},{immediate:!0,flush:"post"});const d=he(null);return Ie(()=>e.monitorWindowResize,f=>{f?d.value||(d.value=wn(window,"resize",a)):d.value&&(d.value.remove(),d.value=null)},{flush:"post"}),Fo(()=>{s.value.cancel(),c.value.cancel(),d.value&&d.value.remove(),l()}),n({forceAlign:()=>a(!0)}),()=>{const f=o==null?void 0:o.default();return f?Gt(f[0],{ref:i},!0,!0):null}}});Go("bottomLeft","bottomRight","topLeft","topRight");const t_=e=>e!==void 0&&(e==="topLeft"||e==="topRight")?"slide-down":"slide-up",Hi=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return S(e?{name:e,appear:!0,enterFromClass:`${e}-enter ${e}-enter-prepare ${e}-enter-start`,enterActiveClass:`${e}-enter ${e}-enter-prepare`,enterToClass:`${e}-enter ${e}-enter-active`,leaveFromClass:` ${e}-leave`,leaveActiveClass:`${e}-leave ${e}-leave-active`,leaveToClass:`${e}-leave ${e}-leave-active`}:{css:!1},t)},ny=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return S(e?{name:e,appear:!0,appearActiveClass:`${e}`,appearToClass:`${e}-appear ${e}-appear-active`,enterFromClass:`${e}-appear ${e}-enter ${e}-appear-prepare ${e}-enter-prepare`,enterActiveClass:`${e}`,enterToClass:`${e}-enter ${e}-appear ${e}-appear-active ${e}-enter-active`,leaveActiveClass:`${e} ${e}-leave`,leaveToClass:`${e}-leave-active`}:{css:!1},t)},dr=(e,t,n)=>n!==void 0?n:`${e}-${t}`,lle=pe({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:j2,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,attrs:o,slots:r}=t;const i=ve(),a=ve(),l=ve(),[s,c]=Qoe(st(e,"stretch")),u=()=>{e.stretch&&c(e.getRootDomNode())},d=ve(!1);let f;Ie(()=>e.visible,I=>{clearTimeout(f),I?f=setTimeout(()=>{d.value=e.visible}):d.value=!1},{immediate:!0});const[h,m]=Zoe(d,u),v=ve(),y=()=>e.point?e.point:e.getRootDomNode,b=()=>{var I;(I=i.value)===null||I===void 0||I.forceAlign()},$=(I,O)=>{var P;const E=e.getClassNameFromAlign(O),R=l.value;l.value!==E&&(l.value=E),h.value==="align"&&(R!==E?Promise.resolve().then(()=>{b()}):m(()=>{var A;(A=v.value)===null||A===void 0||A.call(v)}),(P=e.onAlign)===null||P===void 0||P.call(e,I,O))},x=M(()=>{const I=typeof e.animation=="object"?e.animation:W2(e);return["onAfterEnter","onAfterLeave"].forEach(O=>{const P=I[O];I[O]=E=>{m(),h.value="stable",P==null||P(E)}}),I}),_=()=>new Promise(I=>{v.value=I});Ie([x,h],()=>{!x.value&&h.value==="motion"&&m()},{immediate:!0}),n({forceAlign:b,getElement:()=>a.value.$el||a.value});const w=M(()=>{var I;return!(!((I=e.align)===null||I===void 0)&&I.points&&(h.value==="align"||h.value==="stable"))});return()=>{var I;const{zIndex:O,align:P,prefixCls:E,destroyPopupOnHide:R,onMouseenter:A,onMouseleave:N,onTouchstart:F=()=>{},onMousedown:W}=e,D=h.value,B=[S(S({},s.value),{zIndex:O,opacity:D==="motion"||D==="stable"||!d.value?null:0,pointerEvents:!d.value&&D!=="stable"?"none":null}),o.style];let k=ln((I=r.default)===null||I===void 0?void 0:I.call(r,{visible:e.visible}));k.length>1&&(k=g("div",{class:`${E}-content`},[k]));const L=me(E,o.class,l.value),K=d.value||!e.visible?Hi(x.value.name,x.value):{};return g(so,V(V({ref:a},K),{},{onBeforeEnter:_}),{default:()=>!R||e.visible?Ln(g(ale,{target:y(),key:"popup",ref:i,monitorWindowResize:!0,disabled:w.value,align:P,onAlign:$},{default:()=>g("div",{class:L,onMouseenter:A,onMouseleave:N,onMousedown:n3(W,["capture"]),[fo?"onTouchstartPassive":"onTouchstart"]:n3(F,["capture"]),style:B},[k])}),[[Bo,d.value]]):null})}}}),sle=pe({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:Yoe,setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=ve(!1),a=ve(!1),l=ve(),s=ve();return Ie([()=>e.visible,()=>e.mobile],()=>{i.value=e.visible,e.visible&&e.mobile&&(a.value=!0)},{immediate:!0,flush:"post"}),r({forceAlign:()=>{var c;(c=l.value)===null||c===void 0||c.forceAlign()},getElement:()=>{var c;return(c=l.value)===null||c===void 0?void 0:c.getElement()}}),()=>{const c=S(S(S({},e),n),{visible:i.value}),u=a.value?g(Xoe,V(V({},c),{},{mobile:e.mobile,ref:l}),{default:o.default}):g(lle,V(V({},c),{},{ref:l}),{default:o.default});return g("div",{ref:s},[g(X7,c,null),u])}}});function cle(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function SA(e,t,n){const o=e[t]||{};return S(S({},o),n)}function ule(e,t,n,o){const{points:r}=n,i=Object.keys(e);for(let a=0;a0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){const o=this.getDerivedStateFromProps(BN(this),S(S({},this.$data),n));if(o===null)return;n=S(S({},n),o||{})}S(this.$data,n),this._.isMounted&&this.$forceUpdate(),wt(()=>{t&&t()})},__emit(){const e=[].slice.call(arguments,0);let t=e[0];t=`on${t[0].toUpperCase()}${t.substring(1)}`;const n=this.$props[t]||this.$attrs[t];if(e.length&&n)if(Array.isArray(n))for(let o=0,r=n.length;o1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};ft(vk,{inTriggerContext:t.inTriggerContext,shouldRender:M(()=>{const{sPopupVisible:n,popupRef:o,forceRender:r,autoDestroy:i}=e||{};let a=!1;return(n||o||r)&&(a=!0),!n&&i&&(a=!1),a})})},dle=()=>{n_({},{inTriggerContext:!1});const e=it(vk,{shouldRender:M(()=>!1),inTriggerContext:!1});return{shouldRender:M(()=>e.shouldRender.value||e.inTriggerContext===!1)}},mk=pe({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:Z.func.isRequired,didUpdate:Function},setup(e,t){let{slots:n}=t,o=!0,r;const{shouldRender:i}=dle();function a(){i.value&&(r=e.getContainer())}Dh(()=>{o=!1,a()}),lt(()=>{r||a()});const l=Ie(i,()=>{i.value&&!r&&(r=e.getContainer()),r&&l()});return fr(()=>{wt(()=>{var s;i.value&&((s=e.didUpdate)===null||s===void 0||s.call(e,e))})}),()=>{var s;return i.value?o?(s=n.default)===null||s===void 0?void 0:s.call(n):r?g(Ab,{to:r},n):null:null}}});let eC;function h0(e){if(typeof document>"u")return 0;if(e||eC===void 0){const t=document.createElement("div");t.style.width="100%",t.style.height="200px";const n=document.createElement("div"),o=n.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(t),document.body.appendChild(n);const r=t.offsetWidth;n.style.overflow="scroll";let i=t.offsetWidth;r===i&&(i=n.clientWidth),document.body.removeChild(n),eC=r-i}return eC}function CA(e){const t=e.match(/^(.*)px$/),n=Number(t==null?void 0:t[1]);return Number.isNaN(n)?h0():n}function fle(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};const{width:t,height:n}=getComputedStyle(e,"::-webkit-scrollbar");return{width:CA(t),height:CA(n)}}const ple=`vc-util-locker-${Date.now()}`;let $A=0;function hle(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function gle(e){const t=M(()=>!!e&&!!e.value);$A+=1;const n=`${ple}_${$A}`;ct(o=>{if(ur()){if(t.value){const r=h0(),i=hle();nh(` +html body { + overflow-y: hidden; + ${i?`width: calc(100% - ${r}px);`:""} +}`,n)}else a0(n);o(()=>{a0(n)})}},{flush:"post"})}let Js=0;const cm=ur(),xA=e=>{if(!cm)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(typeof e=="object"&&e instanceof window.HTMLElement)return e}return document.body},Hh=pe({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:Z.any,visible:{type:Boolean,default:void 0},autoLock:De(),didUpdate:Function},setup(e,t){let{slots:n}=t;const o=ve(),r=ve(),i=ve(),a=ve(1),l=ur()&&document.createElement("div"),s=()=>{var h,m;o.value===l&&((m=(h=o.value)===null||h===void 0?void 0:h.parentNode)===null||m===void 0||m.removeChild(o.value)),o.value=null};let c=null;const u=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||o.value&&!o.value.parentNode?(c=xA(e.getContainer),c?(c.appendChild(o.value),!0):!1):!0},d=()=>cm?(o.value||(o.value=l,u(!0)),f(),o.value):null,f=()=>{const{wrapperClassName:h}=e;o.value&&h&&h!==o.value.className&&(o.value.className=h)};return fr(()=>{f(),u()}),gle(M(()=>e.autoLock&&e.visible&&ur()&&(o.value===document.body||o.value===l))),lt(()=>{let h=!1;Ie([()=>e.visible,()=>e.getContainer],(m,v)=>{let[y,b]=m,[$,x]=v;cm&&(c=xA(e.getContainer),c===document.body&&(y&&!$?Js+=1:h&&(Js-=1))),h&&(typeof b=="function"&&typeof x=="function"?b.toString()!==x.toString():b!==x)&&s(),h=!0},{immediate:!0,flush:"post"}),wt(()=>{u()||(i.value=mt(()=>{a.value+=1}))})}),Ct(()=>{const{visible:h}=e;cm&&c===document.body&&(Js=h&&Js?Js-1:Js),s(),mt.cancel(i.value)}),()=>{const{forceRender:h,visible:m}=e;let v=null;const y={getOpenCount:()=>Js,getContainer:d};return a.value&&(h||m||r.value)&&(v=g(mk,{getContainer:d,ref:r,didUpdate:e.didUpdate},{default:()=>{var b;return(b=n.default)===null||b===void 0?void 0:b.call(n,y)}})),v}}}),vle=["onClick","onMousedown","onTouchstart","onMouseenter","onMouseleave","onFocus","onBlur","onContextmenu"],tu=pe({compatConfig:{MODE:3},name:"Trigger",mixins:[eu],inheritAttrs:!1,props:Y7(),setup(e){const t=M(()=>{const{popupPlacement:r,popupAlign:i,builtinPlacements:a}=e;return r&&a?SA(a,r,i):i}),n=ve(null),o=r=>{n.value=r};return{vcTriggerContext:it("vcTriggerContext",{}),popupRef:n,setPopupRef:o,triggerRef:ve(null),align:t,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data(){const e=this.$props;let t;return this.popupVisible!==void 0?t=!!e.popupVisible:t=!!e.defaultPopupVisible,vle.forEach(n=>{this[`fire${n}`]=o=>{this.fireEvents(n,o)}}),{prevPopupVisible:t,sPopupVisible:t,point:null}},watch:{popupVisible(e){e!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=e)}},created(){ft("vcTriggerContext",{onPopupMouseDown:this.onPopupMouseDown,onPopupMouseenter:this.onPopupMouseenter,onPopupMouseleave:this.onPopupMouseleave}),n_(this)},deactivated(){this.setPopupVisible(!1)},mounted(){this.$nextTick(()=>{this.updatedCal()})},updated(){this.$nextTick(()=>{this.updatedCal()})},beforeUnmount(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),mt.cancel(this.attachId)},methods:{updatedCal(){const e=this.$props;if(this.$data.sPopupVisible){let n;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(n=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=wn(n,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(n=n||e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=wn(n,"touchstart",this.onDocumentClick,fo?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(n=n||e.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=wn(n,"scroll",this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=wn(window,"blur",this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter(e){const{mouseEnterDelay:t}=this.$props;this.fireEvents("onMouseenter",e),this.delaySetPopupVisible(!0,t,t?null:e)},onMouseMove(e){this.fireEvents("onMousemove",e),this.setPoint(e)},onMouseleave(e){this.fireEvents("onMouseleave",e),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter(){const{vcTriggerContext:e={}}=this;e.onPopupMouseenter&&e.onPopupMouseenter(),this.clearDelayTimer()},onPopupMouseleave(e){var t;if(e&&e.relatedTarget&&!e.relatedTarget.setTimeout&&ss((t=this.popupRef)===null||t===void 0?void 0:t.getElement(),e.relatedTarget))return;this.isMouseLeaveToHide()&&this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay);const{vcTriggerContext:n={}}=this;n.onPopupMouseleave&&n.onPopupMouseleave(e)},onFocus(e){this.fireEvents("onFocus",e),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown(e){this.fireEvents("onMousedown",e),this.preClickTime=Date.now()},onTouchstart(e){this.fireEvents("onTouchstart",e),this.preTouchTime=Date.now()},onBlur(e){ss(e.target,e.relatedTarget||document.activeElement)||(this.fireEvents("onBlur",e),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu(e){e.preventDefault(),this.fireEvents("onContextmenu",e),this.setPopupVisible(!0,e)},onContextmenuClose(){this.isContextmenuToShow()&&this.close()},onClick(e){if(this.fireEvents("onClick",e),this.focusTime){let n;if(this.preClickTime&&this.preTouchTime?n=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?n=this.preClickTime:this.preTouchTime&&(n=this.preTouchTime),Math.abs(n-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault(),e&&e.domEvent&&e.domEvent.preventDefault();const t=!this.$data.sPopupVisible;(this.isClickToHide()&&!t||t&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,e)},onPopupMouseDown(){const{vcTriggerContext:e={}}=this;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(()=>{this.hasPopupMouseDown=!1},0),e.onPopupMouseDown&&e.onPopupMouseDown(...arguments)},onDocumentClick(e){if(this.$props.mask&&!this.$props.maskClosable)return;const t=e.target,n=this.getRootDomNode(),o=this.getPopupDomNode();(!ss(n,t)||this.isContextMenuOnly())&&!ss(o,t)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)},getPopupDomNode(){var e;return((e=this.popupRef)===null||e===void 0?void 0:e.getElement())||null},getRootDomNode(){var e,t,n,o;const{getTriggerDOMNode:r}=this.$props;if(r){const i=((t=(e=this.triggerRef)===null||e===void 0?void 0:e.$el)===null||t===void 0?void 0:t.nodeName)==="#comment"?null:Nr(this.triggerRef);return Nr(r(i))}try{const i=((o=(n=this.triggerRef)===null||n===void 0?void 0:n.$el)===null||o===void 0?void 0:o.nodeName)==="#comment"?null:Nr(this.triggerRef);if(i)return i}catch{}return Nr(this)},handleGetPopupClassFromAlign(e){const t=[],n=this.$props,{popupPlacement:o,builtinPlacements:r,prefixCls:i,alignPoint:a,getPopupClassNameFromAlign:l}=n;return o&&r&&t.push(ule(r,i,e,a)),l&&t.push(l(e)),t.join(" ")},getPopupAlign(){const e=this.$props,{popupPlacement:t,popupAlign:n,builtinPlacements:o}=e;return t&&o?SA(o,t,n):n},getComponent(){const e={};this.isMouseEnterToShow()&&(e.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(e.onMouseleave=this.onPopupMouseleave),e.onMousedown=this.onPopupMouseDown,e[fo?"onTouchstartPassive":"onTouchstart"]=this.onPopupMouseDown;const{handleGetPopupClassFromAlign:t,getRootDomNode:n,$attrs:o}=this,{prefixCls:r,destroyPopupOnHide:i,popupClassName:a,popupAnimation:l,popupTransitionName:s,popupStyle:c,mask:u,maskAnimation:d,maskTransitionName:f,zIndex:h,stretch:m,alignPoint:v,mobile:y,forceRender:b}=this.$props,{sPopupVisible:$,point:x}=this.$data,_=S(S({prefixCls:r,destroyPopupOnHide:i,visible:$,point:v?x:null,align:this.align,animation:l,getClassNameFromAlign:t,stretch:m,getRootDomNode:n,mask:u,zIndex:h,transitionName:s,maskAnimation:d,maskTransitionName:f,class:a,style:c,onAlign:o.onPopupAlign||G7},e),{ref:this.setPopupRef,mobile:y,forceRender:b});return g(sle,_,{default:this.$slots.popup||(()=>FN(this,"popup"))})},attachParent(e){mt.cancel(this.attachId);const{getPopupContainer:t,getDocument:n}=this.$props,o=this.getRootDomNode();let r;t?(o||t.length===0)&&(r=t(o)):r=n(this.getRootDomNode()).body,r?r.appendChild(e):this.attachId=mt(()=>{this.attachParent(e)})},getContainer(){const{$props:e}=this,{getDocument:t}=e,n=t(this.getRootDomNode()).createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",this.attachParent(n),n},setPopupVisible(e,t){const{alignPoint:n,sPopupVisible:o,onPopupVisibleChange:r}=this;this.clearDelayTimer(),o!==e&&(ul(this,"popupVisible")||this.setState({sPopupVisible:e,prevPopupVisible:o}),r&&r(e)),n&&t&&e&&this.setPoint(t)},setPoint(e){const{alignPoint:t}=this.$props;!t||!e||this.setState({point:{pageX:e.pageX,pageY:e.pageY}})},handlePortalUpdate(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible(e,t,n){const o=t*1e3;if(this.clearDelayTimer(),o){const r=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(()=>{this.setPopupVisible(e,r),this.clearDelayTimer()},o)}else this.setPopupVisible(e,n)},clearDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},clearOutsideHandler(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextmenuOutsideHandler1&&(this.contextmenuOutsideHandler1.remove(),this.contextmenuOutsideHandler1=null),this.contextmenuOutsideHandler2&&(this.contextmenuOutsideHandler2.remove(),this.contextmenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},createTwoChains(e){let t=()=>{};const n=l3(this);return this.childOriginEvents[e]&&n[e]?this[`fire${e}`]:(t=this.childOriginEvents[e]||n[e]||t,t)},isClickToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isContextMenuOnly(){const{action:e}=this.$props;return e==="contextmenu"||e.length===1&&e[0]==="contextmenu"},isContextmenuToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("contextmenu")!==-1||t.indexOf("contextmenu")!==-1},isClickToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isMouseEnterToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseenter")!==-1},isMouseLeaveToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseleave")!==-1},isFocusToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("focus")!==-1},isBlurToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("blur")!==-1},forcePopupAlign(){var e;this.$data.sPopupVisible&&((e=this.popupRef)===null||e===void 0||e.forceAlign())},fireEvents(e,t){this.childOriginEvents[e]&&this.childOriginEvents[e](t);const n=this.$props[e]||this.$attrs[e];n&&n(t)},close(){this.setPopupVisible(!1)}},render(){const{$attrs:e}=this,t=_n(kb(this)),{alignPoint:n,getPopupContainer:o}=this.$props,r=t[0];this.childOriginEvents=l3(r);const i={key:"trigger"};this.isContextmenuToShow()?i.onContextmenu=this.onContextmenu:i.onContextmenu=this.createTwoChains("onContextmenu"),this.isClickToHide()||this.isClickToShow()?(i.onClick=this.onClick,i.onMousedown=this.onMousedown,i[fo?"onTouchstartPassive":"onTouchstart"]=this.onTouchstart):(i.onClick=this.createTwoChains("onClick"),i.onMousedown=this.createTwoChains("onMousedown"),i[fo?"onTouchstartPassive":"onTouchstart"]=this.createTwoChains("onTouchstart")),this.isMouseEnterToShow()?(i.onMouseenter=this.onMouseenter,n&&(i.onMousemove=this.onMouseMove)):i.onMouseenter=this.createTwoChains("onMouseenter"),this.isMouseLeaveToHide()?i.onMouseleave=this.onMouseleave:i.onMouseleave=this.createTwoChains("onMouseleave"),this.isFocusToShow()||this.isBlurToHide()?(i.onFocus=this.onFocus,i.onBlur=this.onBlur):(i.onFocus=this.createTwoChains("onFocus"),i.onBlur=c=>{c&&(!c.relatedTarget||!ss(c.target,c.relatedTarget))&&this.createTwoChains("onBlur")(c)});const a=me(r&&r.props&&r.props.class,e.class);a&&(i.class=a);const l=Gt(r,S(S({},i),{ref:"triggerRef"}),!0,!0),s=g(Hh,{key:"portal",getContainer:o&&(()=>o(this.getRootDomNode())),didUpdate:this.handlePortalUpdate,visible:this.$data.sPopupVisible},{default:this.getComponent});return g(Je,null,[l,s])}});var mle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},yle=pe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:Z.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:Z.oneOfType([Number,Boolean]).def(!0),popupElement:Z.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=M(()=>{const{dropdownMatchSelectWidth:l}=e;return ble(l)}),a=he();return r({getPopupElement:()=>a.value}),()=>{const l=S(S({},e),o),{empty:s=!1}=l,c=mle(l,["empty"]),{visible:u,dropdownAlign:d,prefixCls:f,popupElement:h,dropdownClassName:m,dropdownStyle:v,direction:y="ltr",placement:b,dropdownMatchSelectWidth:$,containerWidth:x,dropdownRender:_,animation:w,transitionName:I,getPopupContainer:O,getTriggerDOMNode:P,onPopupVisibleChange:E,onPopupMouseEnter:R,onPopupFocusin:A,onPopupFocusout:N}=c,F=`${f}-dropdown`;let W=h;_&&(W=_({menuNode:h,props:e}));const D=w?`${F}-${w}`:I,B=S({minWidth:`${x}px`},v);return typeof $=="number"?B.width=`${$}px`:$&&(B.width=`${x}px`),g(tu,V(V({},e),{},{showAction:E?["click"]:[],hideAction:E?["click"]:[],popupPlacement:b||(y==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:F,popupTransitionName:D,popupAlign:d,popupVisible:u,getPopupContainer:O,popupClassName:me(m,{[`${F}-empty`]:s}),popupStyle:B,getTriggerDOMNode:P,onPopupVisibleChange:E}),{default:n.default,popup:()=>g("div",{ref:a,onMouseenter:R,onFocusin:A,onFocusout:N},[W])})}}}),Sle=yle,Rt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(t){const{keyCode:n}=t;if(t.altKey&&!t.ctrlKey||t.metaKey||n>=Rt.F1&&n<=Rt.F12)return!1;switch(n){case Rt.ALT:case Rt.CAPS_LOCK:case Rt.CONTEXT_MENU:case Rt.CTRL:case Rt.DOWN:case Rt.END:case Rt.ESC:case Rt.HOME:case Rt.INSERT:case Rt.LEFT:case Rt.MAC_FF_META:case Rt.META:case Rt.NUMLOCK:case Rt.NUM_CENTER:case Rt.PAGE_DOWN:case Rt.PAGE_UP:case Rt.PAUSE:case Rt.PRINT_SCREEN:case Rt.RIGHT:case Rt.SHIFT:case Rt.UP:case Rt.WIN_KEY:case Rt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=Rt.ZERO&&t<=Rt.NINE||t>=Rt.NUM_ZERO&&t<=Rt.NUM_MULTIPLY||t>=Rt.A&&t<=Rt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case Rt.SPACE:case Rt.QUESTION_MARK:case Rt.NUM_PLUS:case Rt.NUM_MINUS:case Rt.NUM_PERIOD:case Rt.NUM_DIVISION:case Rt.SEMICOLON:case Rt.DASH:case Rt.EQUALS:case Rt.COMMA:case Rt.PERIOD:case Rt.SLASH:case Rt.APOSTROPHE:case Rt.SINGLE_QUOTE:case Rt.OPEN_SQUARE_BRACKET:case Rt.BACKSLASH:case Rt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Fe=Rt,oy=(e,t)=>{let{slots:n}=t;var o;const{class:r,customizeIcon:i,customizeIconProps:a,onMousedown:l,onClick:s}=e;let c;return typeof i=="function"?c=i(a):c=i,g("span",{class:r,onMousedown:u=>{u.preventDefault(),l&&l(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},[c!==void 0?c:g("span",{class:r.split(/\s+/).map(u=>`${u}-icon`)},[(o=n.default)===null||o===void 0?void 0:o.call(n)])])};oy.inheritAttrs=!1;oy.displayName="TransBtn";oy.props={class:String,customizeIcon:Z.any,customizeIconProps:Z.any,onMousedown:Function,onClick:Function};const g0=oy;function Cle(e){e.target.composing=!0}function wA(e){e.target.composing&&(e.target.composing=!1,$le(e.target,"input"))}function $le(e,t){const n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function tC(e,t,n,o){e.addEventListener(t,n,o)}const xle={created(e,t){(!t.modifiers||!t.modifiers.lazy)&&(tC(e,"compositionstart",Cle),tC(e,"compositionend",wA),tC(e,"change",wA))}},nf=xle,wle={inputRef:Z.any,prefixCls:String,id:String,inputElement:Z.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:Z.oneOfType([Z.number,Z.string]),attrs:Z.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},_le=pe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:wle,setup(e){let t=null;const n=it("VCSelectContainerEvent");return()=>{var o;const{prefixCls:r,id:i,inputElement:a,disabled:l,tabindex:s,autofocus:c,autocomplete:u,editable:d,activeDescendantId:f,value:h,onKeydown:m,onMousedown:v,onChange:y,onPaste:b,onCompositionstart:$,onCompositionend:x,onFocus:_,onBlur:w,open:I,inputRef:O,attrs:P}=e;let E=a||Ln(g("input",null,null),[[nf]]);const R=E.props||{},{onKeydown:A,onInput:N,onFocus:F,onBlur:W,onMousedown:D,onCompositionstart:B,onCompositionend:k,style:L}=R;return E=Gt(E,S(S(S(S(S({type:"search"},R),{id:i,ref:O,disabled:l,tabindex:s,autocomplete:u||"off",autofocus:c,class:me(`${r}-selection-search-input`,(o=E==null?void 0:E.props)===null||o===void 0?void 0:o.class),role:"combobox","aria-expanded":I,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":f}),P),{value:d?h:"",readonly:!d,unselectable:d?null:"on",style:S(S({},L),{opacity:d?null:0}),onKeydown:z=>{m(z),A&&A(z)},onMousedown:z=>{v(z),D&&D(z)},onInput:z=>{y(z),N&&N(z)},onCompositionstart(z){$(z),B&&B(z)},onCompositionend(z){x(z),k&&k(z)},onPaste:b,onFocus:function(){clearTimeout(t),F&&F(arguments.length<=0?void 0:arguments[0]),_&&_(arguments.length<=0?void 0:arguments[0]),n==null||n.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var z=arguments.length,K=new Array(z),G=0;G{W&&W(K[0]),w&&w(K[0]),n==null||n.blur(K[0])},100)}}),E.type==="textarea"?{}:{type:"search"}),!0,!0),E}}}),bk=_le,Ole=`accept acceptcharset accesskey action allowfullscreen allowtransparency +alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge +charset checked classid classname colspan cols content contenteditable contextmenu +controls coords crossorigin data datetime default defer dir disabled download draggable +enctype form formaction formenctype formmethod formnovalidate formtarget frameborder +headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity +is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media +mediagroup method min minlength multiple muted name novalidate nonce open +optimum pattern placeholder poster preload radiogroup readonly rel required +reversed role rowspan rows sandbox scope scoped scrolling seamless selected +shape size sizes span spellcheck src srcdoc srclang srcset start step style +summary tabindex target title type usemap value width wmode wrap`,Ile=`onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown + onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick + onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown + onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel + onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough + onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata + onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`,_A=`${Ole} ${Ile}`.split(/[\s\n]+/),Ple="aria-",Tle="data-";function OA(e,t){return e.indexOf(t)===0}function As(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=S({},t);const o={};return Object.keys(e).forEach(r=>{(n.aria&&(r==="role"||OA(r,Ple))||n.data&&OA(r,Tle)||n.attr&&(_A.includes(r)||_A.includes(r.toLowerCase())))&&(o[r]=e[r])}),o}const yk=Symbol("OverflowContextProviderKey"),fx=pe({compatConfig:{MODE:3},name:"OverflowContextProvider",inheritAttrs:!1,props:{value:{type:Object}},setup(e,t){let{slots:n}=t;return ft(yk,M(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),Ele=()=>it(yk,M(()=>null));var Ale=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.responsive&&!e.display),i=he();o({itemNodeRef:i});function a(l){e.registerSize(e.itemKey,l)}return Fo(()=>{a(null)}),()=>{var l;const{prefixCls:s,invalidate:c,item:u,renderItem:d,responsive:f,registerSize:h,itemKey:m,display:v,order:y,component:b="div"}=e,$=Ale(e,["prefixCls","invalidate","item","renderItem","responsive","registerSize","itemKey","display","order","component"]),x=(l=n.default)===null||l===void 0?void 0:l.call(n),_=d&&u!==Pu?d(u):x;let w;c||(w={opacity:r.value?0:1,height:r.value?0:Pu,overflowY:r.value?"hidden":Pu,order:f?y:Pu,pointerEvents:r.value?"none":Pu,position:r.value?"absolute":Pu});const I={};return r.value&&(I["aria-hidden"]=!0),g(ki,{disabled:!f,onResize:O=>{let{offsetWidth:P}=O;a(P)}},{default:()=>g(b,V(V(V({class:me(!c&&s),style:w},I),$),{},{ref:i}),{default:()=>[_]})})}}});var nC=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var i;if(!r.value){const{component:d="div"}=e,f=nC(e,["component"]);return g(d,V(V({},f),o),{default:()=>[(i=n.default)===null||i===void 0?void 0:i.call(n)]})}const a=r.value,{className:l}=a,s=nC(a,["className"]),{class:c}=o,u=nC(o,["class"]);return g(fx,{value:null},{default:()=>[g(um,V(V(V({class:me(l,c)},s),u),e),n)]})}}});var Rle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({id:String,prefixCls:String,data:Array,itemKey:[String,Number,Function],itemWidth:{type:Number,default:10},renderItem:Function,renderRawItem:Function,maxCount:[Number,String],renderRest:Function,renderRawRest:Function,suffix:Z.any,component:String,itemComponent:Z.any,onVisibleChange:Function,ssr:String,onMousedown:Function}),ry=pe({name:"Overflow",inheritAttrs:!1,props:Lle(),emits:["visibleChange"],setup(e,t){let{attrs:n,emit:o,slots:r}=t;const i=M(()=>e.ssr==="full"),a=ve(null),l=M(()=>a.value||0),s=ve(new Map),c=ve(0),u=ve(0),d=ve(0),f=ve(null),h=ve(null),m=M(()=>h.value===null&&i.value?Number.MAX_SAFE_INTEGER:h.value||0),v=ve(!1),y=M(()=>`${e.prefixCls}-item`),b=M(()=>Math.max(c.value,u.value)),$=M(()=>!!(e.data.length&&e.maxCount===Sk)),x=M(()=>e.maxCount===Ck),_=M(()=>$.value||typeof e.maxCount=="number"&&e.data.length>e.maxCount),w=M(()=>{let D=e.data;return $.value?a.value===null&&i.value?D=e.data:D=e.data.slice(0,Math.min(e.data.length,l.value/e.itemWidth)):typeof e.maxCount=="number"&&(D=e.data.slice(0,e.maxCount)),D}),I=M(()=>$.value?e.data.slice(m.value+1):e.data.slice(w.value.length)),O=(D,B)=>{var k;return typeof e.itemKey=="function"?e.itemKey(D):(k=e.itemKey&&(D==null?void 0:D[e.itemKey]))!==null&&k!==void 0?k:B},P=M(()=>e.renderItem||(D=>D)),E=(D,B)=>{h.value=D,B||(v.value=D{a.value=B.clientWidth},A=(D,B)=>{const k=new Map(s.value);B===null?k.delete(D):k.set(D,B),s.value=k},N=(D,B)=>{c.value=u.value,u.value=B},F=(D,B)=>{d.value=B},W=D=>s.value.get(O(w.value[D],D));return Ie([l,s,u,d,()=>e.itemKey,w],()=>{if(l.value&&b.value&&w.value){let D=d.value;const B=w.value.length,k=B-1;if(!B){E(0),f.value=null;return}for(let L=0;Ll.value){E(L-1),f.value=D-z-d.value+u.value;break}}e.suffix&&W(0)+d.value>l.value&&(f.value=null)}}),()=>{const D=v.value&&!!I.value.length,{itemComponent:B,renderRawItem:k,renderRawRest:L,renderRest:z,prefixCls:K="rc-overflow",suffix:G,component:Y="div",id:ne,onMousedown:re}=e,{class:J,style:te}=n,ee=Rle(n,["class","style"]);let fe={};f.value!==null&&$.value&&(fe={position:"absolute",left:`${f.value}px`,top:0});const ie={prefixCls:y.value,responsive:$.value,component:B,invalidate:x.value},X=k?(j,q)=>{const se=O(j,q);return g(fx,{key:se,value:S(S({},ie),{order:q,item:j,itemKey:se,registerSize:A,display:q<=m.value})},{default:()=>[k(j,q)]})}:(j,q)=>{const se=O(j,q);return g(um,V(V({},ie),{},{order:q,key:se,item:j,renderItem:P.value,itemKey:se,registerSize:A,display:q<=m.value}),null)};let ue=()=>null;const ye={order:D?m.value:Number.MAX_SAFE_INTEGER,className:`${y.value} ${y.value}-rest`,registerSize:N,display:D};if(L)L&&(ue=()=>g(fx,{value:S(S({},ie),ye)},{default:()=>[L(I.value)]}));else{const j=z||Dle;ue=()=>g(um,V(V({},ie),ye),{default:()=>typeof j=="function"?j(I.value):j})}const H=()=>{var j;return g(Y,V({id:ne,class:me(!x.value&&K,J),style:te,onMousedown:re},ee),{default:()=>[w.value.map(X),_.value?ue():null,G&&g(um,V(V({},ie),{},{order:m.value,class:`${y.value}-suffix`,registerSize:F,display:!0,style:fe}),{default:()=>G}),(j=r.default)===null||j===void 0?void 0:j.call(r)]})};return g(ki,{disabled:!$.value,onResize:R},{default:H})}}});ry.Item=Mle;ry.RESPONSIVE=Sk;ry.INVALIDATE=Ck;const ud=ry,$k=Symbol("TreeSelectLegacyContextPropsKey");function Nle(e){return ft($k,e)}function iy(){return it($k,{})}const kle={id:String,prefixCls:String,values:Z.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:Z.any,placeholder:Z.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:Z.oneOfType([Z.number,Z.string]),removeIcon:Z.any,choiceTransitionName:String,maxTagCount:Z.oneOfType([Z.number,Z.string]),maxTagTextLength:Number,maxTagPlaceholder:Z.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},IA=e=>{e.preventDefault(),e.stopPropagation()},Ble=pe({name:"MultipleSelectSelector",inheritAttrs:!1,props:kle,setup(e){const t=ve(),n=ve(0),o=ve(!1),r=iy(),i=M(()=>`${e.prefixCls}-selection`),a=M(()=>e.open||e.mode==="tags"?e.searchValue:""),l=M(()=>e.mode==="tags"||e.showSearch&&(e.open||o.value));lt(()=>{Ie(a,()=>{n.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function s(f,h,m,v,y){return g("span",{class:me(`${i.value}-item`,{[`${i.value}-item-disabled`]:m}),title:typeof f=="string"||typeof f=="number"?f.toString():void 0},[g("span",{class:`${i.value}-item-content`},[h]),v&&g(g0,{class:`${i.value}-item-remove`,onMousedown:IA,onClick:y,customizeIcon:e.removeIcon},{default:()=>[Do("×")]})])}function c(f,h,m,v,y,b){var $;const x=w=>{IA(w),e.onToggleOpen(!open)};let _=b;return r.keyEntities&&(_=(($=r.keyEntities[f])===null||$===void 0?void 0:$.node)||{}),g("span",{key:f,onMousedown:x},[e.tagRender({label:h,value:f,disabled:m,closable:v,onClose:y,option:_})])}function u(f){const{disabled:h,label:m,value:v,option:y}=f,b=!e.disabled&&!h;let $=m;if(typeof e.maxTagTextLength=="number"&&(typeof m=="string"||typeof m=="number")){const _=String($);_.length>e.maxTagTextLength&&($=`${_.slice(0,e.maxTagTextLength)}...`)}const x=_=>{var w;_&&_.stopPropagation(),(w=e.onRemove)===null||w===void 0||w.call(e,f)};return typeof e.tagRender=="function"?c(v,$,h,b,x,y):s(m,$,h,b,x)}function d(f){const{maxTagPlaceholder:h=v=>`+ ${v.length} ...`}=e,m=typeof h=="function"?h(f):h;return s(m,m,!1)}return()=>{const{id:f,prefixCls:h,values:m,open:v,inputRef:y,placeholder:b,disabled:$,autofocus:x,autocomplete:_,activeDescendantId:w,tabindex:I,onInputChange:O,onInputPaste:P,onInputKeyDown:E,onInputMouseDown:R,onInputCompositionStart:A,onInputCompositionEnd:N}=e,F=g("div",{class:`${i.value}-search`,style:{width:n.value+"px"},key:"input"},[g(bk,{inputRef:y,open:v,prefixCls:h,id:f,inputElement:null,disabled:$,autofocus:x,autocomplete:_,editable:l.value,activeDescendantId:w,value:a.value,onKeydown:E,onMousedown:R,onChange:O,onPaste:P,onCompositionstart:A,onCompositionend:N,tabindex:I,attrs:As(e,!0),onFocus:()=>o.value=!0,onBlur:()=>o.value=!1},null),g("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[a.value,Do(" ")])]),W=g(ud,{prefixCls:`${i.value}-overflow`,data:m,renderItem:u,renderRest:d,suffix:F,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return g(Je,null,[W,!m.length&&!a.value&&g("span",{class:`${i.value}-placeholder`},[b])])}}}),Fle=Ble,Hle={inputElement:Z.any,id:String,prefixCls:String,values:Z.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:Z.any,placeholder:Z.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:Z.oneOfType([Z.number,Z.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},o_=pe({name:"SingleSelector",setup(e){const t=ve(!1),n=M(()=>e.mode==="combobox"),o=M(()=>n.value||e.showSearch),r=M(()=>{let c=e.searchValue||"";return n.value&&e.activeValue&&!t.value&&(c=e.activeValue),c}),i=iy();Ie([n,()=>e.activeValue],()=>{n.value&&(t.value=!1)},{immediate:!0});const a=M(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!r.value),l=M(()=>{const c=e.values[0];return c&&(typeof c.label=="string"||typeof c.label=="number")?c.label.toString():void 0}),s=()=>{if(e.values[0])return null;const c=a.value?{visibility:"hidden"}:void 0;return g("span",{class:`${e.prefixCls}-selection-placeholder`,style:c},[e.placeholder])};return()=>{var c,u,d,f;const{inputElement:h,prefixCls:m,id:v,values:y,inputRef:b,disabled:$,autofocus:x,autocomplete:_,activeDescendantId:w,open:I,tabindex:O,optionLabelRender:P,onInputKeyDown:E,onInputMouseDown:R,onInputChange:A,onInputPaste:N,onInputCompositionStart:F,onInputCompositionEnd:W}=e,D=y[0];let B=null;if(D&&i.customSlots){const k=(c=D.key)!==null&&c!==void 0?c:D.value,L=((u=i.keyEntities[k])===null||u===void 0?void 0:u.node)||{};B=i.customSlots[(d=L.slots)===null||d===void 0?void 0:d.title]||i.customSlots.title||D.label,typeof B=="function"&&(B=B(L))}else B=P&&D?P(D.option):D==null?void 0:D.label;return g(Je,null,[g("span",{class:`${m}-selection-search`},[g(bk,{inputRef:b,prefixCls:m,id:v,open:I,inputElement:h,disabled:$,autofocus:x,autocomplete:_,editable:o.value,activeDescendantId:w,value:r.value,onKeydown:E,onMousedown:R,onChange:k=>{t.value=!0,A(k)},onPaste:N,onCompositionstart:F,onCompositionend:W,tabindex:O,attrs:As(e,!0)},null)]),!n.value&&D&&!a.value&&g("span",{class:`${m}-selection-item`,title:l.value},[g(Je,{key:(f=D.key)!==null&&f!==void 0?f:D.value},[B])]),s()])}}});o_.props=Hle;o_.inheritAttrs=!1;const zle=o_;function jle(e){return![Fe.ESC,Fe.SHIFT,Fe.BACKSPACE,Fe.TAB,Fe.WIN_KEY,Fe.ALT,Fe.META,Fe.WIN_KEY_RIGHT,Fe.CTRL,Fe.SEMICOLON,Fe.EQUALS,Fe.CAPS_LOCK,Fe.CONTEXT_MENU,Fe.F1,Fe.F2,Fe.F3,Fe.F4,Fe.F5,Fe.F6,Fe.F7,Fe.F8,Fe.F9,Fe.F10,Fe.F11,Fe.F12].includes(e)}function xk(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,n;Ct(()=>{clearTimeout(n)});function o(r){(r||t===null)&&(t=r),clearTimeout(n),n=setTimeout(()=>{t=null},e)}return[()=>t,o]}function uh(){const e=t=>{e.current=t};return e}const Wle=pe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:Z.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:Z.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:Z.oneOfType([Z.number,Z.string]),disabled:{type:Boolean,default:void 0},placeholder:Z.any,removeIcon:Z.any,maxTagCount:Z.oneOfType([Z.number,Z.string]),maxTagTextLength:Number,maxTagPlaceholder:Z.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:n}=t;const o=uh();let r=!1;const[i,a]=xk(0),l=b=>{const{which:$}=b;($===Fe.UP||$===Fe.DOWN)&&b.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(b),$===Fe.ENTER&&e.mode==="tags"&&!r&&!e.open&&e.onSearchSubmit(b.target.value),jle($)&&e.onToggleOpen(!0)},s=()=>{a(!0)};let c=null;const u=b=>{e.onSearch(b,!0,r)!==!1&&e.onToggleOpen(!0)},d=()=>{r=!0},f=b=>{r=!1,e.mode!=="combobox"&&u(b.target.value)},h=b=>{let{target:{value:$}}=b;if(e.tokenWithEnter&&c&&/[\r\n]/.test(c)){const x=c.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");$=$.replace(x,c)}c=null,u($)},m=b=>{const{clipboardData:$}=b;c=$.getData("text")},v=b=>{let{target:$}=b;$!==o.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{o.current.focus()}):o.current.focus())},y=b=>{const $=i();b.target!==o.current&&!$&&b.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!$)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return n({focus:()=>{o.current.focus()},blur:()=>{o.current.blur()}}),()=>{const{prefixCls:b,domRef:$,mode:x}=e,_={inputRef:o,onInputKeyDown:l,onInputMouseDown:s,onInputChange:h,onInputPaste:m,onInputCompositionStart:d,onInputCompositionEnd:f},w=x==="multiple"||x==="tags"?g(Fle,V(V({},e),_),null):g(zle,V(V({},e),_),null);return g("div",{ref:$,class:`${b}-selector`,onClick:v,onMousedown:y},[w])}}}),Vle=Wle;function Kle(e,t,n){function o(r){var i,a,l;let s=r.target;s.shadowRoot&&r.composed&&(s=r.composedPath()[0]||s);const c=[(i=e[0])===null||i===void 0?void 0:i.value,(l=(a=e[1])===null||a===void 0?void 0:a.value)===null||l===void 0?void 0:l.getPopupElement()];t.value&&c.every(u=>u&&!u.contains(s)&&u!==s)&&n(!1)}lt(()=>{window.addEventListener("mousedown",o)}),Ct(()=>{window.removeEventListener("mousedown",o)})}function Ule(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=ve(!1);let n;const o=()=>{clearTimeout(n)};return lt(()=>{o()}),[t,(i,a)=>{o(),n=setTimeout(()=>{t.value=i,a&&a()},e)},o]}const wk=Symbol("BaseSelectContextKey");function Gle(e){return ft(wk,e)}function zh(){return it(wk,{})}const r_=()=>{if(typeof navigator>"u"||typeof window>"u")return!1;const e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))};function v0(e){if(!Wn(e))return St(e);const t=new Proxy({},{get(n,o,r){return Reflect.get(e.value,o,r)},set(n,o,r){return e.value[o]=r,!0},deleteProperty(n,o){return Reflect.deleteProperty(e.value,o)},has(n,o){return Reflect.has(e.value,o)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return St(t)}var Yle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:Z.any,emptyOptions:Boolean}),ay=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:Z.any,placeholder:Z.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:Z.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:Z.any,clearIcon:Z.any,removeIcon:Z.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),Zle=()=>S(S({},qle()),ay());function _k(e){return e==="tags"||e==="multiple"}const i_=pe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:bt(Zle(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:n,expose:o,slots:r}=t;const i=M(()=>_k(e.mode)),a=M(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),l=ve(!1);lt(()=>{l.value=r_()});const s=iy(),c=ve(null),u=uh(),d=ve(null),f=ve(null),h=ve(null),m=he(!1),[v,y,b]=Ule();o({focus:()=>{var X;(X=f.value)===null||X===void 0||X.focus()},blur:()=>{var X;(X=f.value)===null||X===void 0||X.blur()},scrollTo:X=>{var ue;return(ue=h.value)===null||ue===void 0?void 0:ue.scrollTo(X)}});const _=M(()=>{var X;if(e.mode!=="combobox")return e.searchValue;const ue=(X=e.displayValues[0])===null||X===void 0?void 0:X.value;return typeof ue=="string"||typeof ue=="number"?String(ue):""}),w=e.open!==void 0?e.open:e.defaultOpen,I=ve(w),O=ve(w),P=X=>{I.value=e.open!==void 0?e.open:X,O.value=I.value};Ie(()=>e.open,()=>{P(e.open)});const E=M(()=>!e.notFoundContent&&e.emptyOptions);ct(()=>{O.value=I.value,(e.disabled||E.value&&O.value&&e.mode==="combobox")&&(O.value=!1)});const R=M(()=>E.value?!1:O.value),A=X=>{const ue=X!==void 0?X:!O.value;O.value!==ue&&!e.disabled&&(P(ue),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(ue))},N=M(()=>(e.tokenSeparators||[]).some(X=>[` +`,`\r +`].includes(X))),F=(X,ue,ye)=>{var H,j;let q=!0,se=X;(H=e.onActiveValueChange)===null||H===void 0||H.call(e,null);const ae=ye?null:Voe(X,e.tokenSeparators);return e.mode!=="combobox"&&ae&&(se="",(j=e.onSearchSplit)===null||j===void 0||j.call(e,ae),A(!1),q=!1),e.onSearch&&_.value!==se&&e.onSearch(se,{source:ue?"typing":"effect"}),q},W=X=>{var ue;!X||!X.trim()||(ue=e.onSearch)===null||ue===void 0||ue.call(e,X,{source:"submit"})};Ie(O,()=>{!O.value&&!i.value&&e.mode!=="combobox"&&F("",!1,!1)},{immediate:!0,flush:"post"}),Ie(()=>e.disabled,()=>{I.value&&e.disabled&&P(!1),e.disabled&&!m.value&&y(!1)},{immediate:!0});const[D,B]=xk(),k=function(X){var ue;const ye=D(),{which:H}=X;if(H===Fe.ENTER&&(e.mode!=="combobox"&&X.preventDefault(),O.value||A(!0)),B(!!_.value),H===Fe.BACKSPACE&&!ye&&i.value&&!_.value&&e.displayValues.length){const ae=[...e.displayValues];let ge=null;for(let Se=ae.length-1;Se>=0;Se-=1){const $e=ae[Se];if(!$e.disabled){ae.splice(Se,1),ge=$e;break}}ge&&e.onDisplayValuesChange(ae,{type:"remove",values:[ge]})}for(var j=arguments.length,q=new Array(j>1?j-1:0),se=1;se1?ue-1:0),H=1;H{const ue=e.displayValues.filter(ye=>ye!==X);e.onDisplayValuesChange(ue,{type:"remove",values:[X]})},K=ve(!1),G=function(){y(!0),e.disabled||(e.onFocus&&!K.value&&e.onFocus(...arguments),e.showAction&&e.showAction.includes("focus")&&A(!0)),K.value=!0},Y=he(!1),ne=function(){if(Y.value||(m.value=!0,y(!1,()=>{K.value=!1,m.value=!1,A(!1)}),e.disabled))return;const X=_.value;X&&(e.mode==="tags"?e.onSearch(X,{source:"submit"}):e.mode==="multiple"&&e.onSearch("",{source:"blur"})),e.onBlur&&e.onBlur(...arguments)},re=()=>{Y.value=!0},J=()=>{Y.value=!1};ft("VCSelectContainerEvent",{focus:G,blur:ne});const te=[];lt(()=>{te.forEach(X=>clearTimeout(X)),te.splice(0,te.length)}),Ct(()=>{te.forEach(X=>clearTimeout(X)),te.splice(0,te.length)});const ee=function(X){var ue,ye;const{target:H}=X,j=(ue=d.value)===null||ue===void 0?void 0:ue.getPopupElement();if(j&&j.contains(H)){const ge=setTimeout(()=>{var Se;const $e=te.indexOf(ge);$e!==-1&&te.splice($e,1),b(),!l.value&&!j.contains(document.activeElement)&&((Se=f.value)===null||Se===void 0||Se.focus())});te.push(ge)}for(var q=arguments.length,se=new Array(q>1?q-1:0),ae=1;ae{};return lt(()=>{Ie(R,()=>{var X;if(R.value){const ue=Math.ceil((X=c.value)===null||X===void 0?void 0:X.offsetWidth);fe.value!==ue&&!Number.isNaN(ue)&&(fe.value=ue)}},{immediate:!0,flush:"post"})}),Kle([c,d],R,A),Gle(v0(S(S({},oa(e)),{open:O,triggerOpen:R,showSearch:a,multiple:i,toggleOpen:A}))),()=>{const X=S(S({},e),n),{prefixCls:ue,id:ye,open:H,defaultOpen:j,mode:q,showSearch:se,searchValue:ae,onSearch:ge,allowClear:Se,clearIcon:$e,showArrow:_e,inputIcon:be,disabled:Te,loading:Pe,getInputElement:oe,getPopupContainer:le,placement:xe,animation:Ae,transitionName:Be,dropdownStyle:Ye,dropdownClassName:Re,dropdownMatchSelectWidth:Le,dropdownRender:Ne,dropdownAlign:Ke,showAction:Ze,direction:Ue,tokenSeparators:Xe,tagRender:xt,optionLabelRender:Mt,onPopupScroll:Ft,onDropdownVisibleChange:jt,onFocus:Yt,onBlur:Vn,onKeyup:Gn,onKeydown:oo,onMousedown:kn,onClear:yo,omitDomProps:Yo,getRawInputElement:wr,displayValues:Ur,onDisplayValuesChange:Ao,emptyOptions:za,activeDescendantId:We,activeValue:gt,OptionList:ut}=X,un=Yle(X,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),Yn=q==="combobox"&&oe&&oe()||null,Bn=typeof wr=="function"&&wr(),Xo=S({},un);let So;Bn&&(So=Zo=>{A(Zo)}),Xle.forEach(Zo=>{delete Xo[Zo]}),Yo==null||Yo.forEach(Zo=>{delete Xo[Zo]});const hi=_e!==void 0?_e:Pe||!i.value&&q!=="combobox";let qo;hi&&(qo=g(g0,{class:me(`${ue}-arrow`,{[`${ue}-arrow-loading`]:Pe}),customizeIcon:be,customizeIconProps:{loading:Pe,searchValue:_.value,open:O.value,focused:v.value,showSearch:a.value}},null));let _r;const Cn=()=>{yo==null||yo(),Ao([],{type:"clear",values:Ur}),F("",!1,!1)};!Te&&Se&&(Ur.length||_.value)&&(_r=g(g0,{class:`${ue}-clear`,onMousedown:Cn,customizeIcon:$e},{default:()=>[Do("×")]}));const Gr=g(ut,{ref:h},S(S({},s.customSlots),{option:r.option})),Or=me(ue,n.class,{[`${ue}-focused`]:v.value,[`${ue}-multiple`]:i.value,[`${ue}-single`]:!i.value,[`${ue}-allow-clear`]:Se,[`${ue}-show-arrow`]:hi,[`${ue}-disabled`]:Te,[`${ue}-loading`]:Pe,[`${ue}-open`]:O.value,[`${ue}-customize-input`]:Yn,[`${ue}-show-search`]:a.value}),pa=g(Sle,{ref:d,disabled:Te,prefixCls:ue,visible:R.value,popupElement:Gr,containerWidth:fe.value,animation:Ae,transitionName:Be,dropdownStyle:Ye,dropdownClassName:Re,direction:Ue,dropdownMatchSelectWidth:Le,dropdownRender:Ne,dropdownAlign:Ke,placement:xe,getPopupContainer:le,empty:za,getTriggerDOMNode:()=>u.current,onPopupVisibleChange:So,onPopupMouseEnter:ie,onPopupFocusin:re,onPopupFocusout:J},{default:()=>Bn?Jn(Bn)&&Gt(Bn,{ref:u},!1,!0):g(Vle,V(V({},e),{},{domRef:u,prefixCls:ue,inputElement:Yn,ref:f,id:ye,showSearch:a.value,mode:q,activeDescendantId:We,tagRender:xt,optionLabelRender:Mt,values:Ur,open:O.value,onToggleOpen:A,activeValue:gt,searchValue:_.value,onSearch:F,onSearchSubmit:W,onRemove:z,tokenWithEnter:N.value}),null)});let ha;return Bn?ha=pa:ha=g("div",V(V({},Xo),{},{class:Or,ref:c,onMousedown:ee,onKeydown:k,onKeyup:L}),[v.value&&!O.value&&g("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${Ur.map(Zo=>{let{label:Ll,value:Qo}=Zo;return["number","string"].includes(typeof Ll)?Ll:Qo}).join(", ")}`]),pa,qo,_r]),ha}}}),ly=(e,t)=>{let{height:n,offset:o,prefixCls:r,onInnerResize:i}=e,{slots:a}=t;var l;let s={},c={display:"flex",flexDirection:"column"};return o!==void 0&&(s={height:`${n}px`,position:"relative",overflow:"hidden"},c=S(S({},c),{transform:`translateY(${o}px)`,position:"absolute",left:0,right:0,top:0})),g("div",{style:s},[g(ki,{onResize:u=>{let{offsetHeight:d}=u;d&&i&&i()}},{default:()=>[g("div",{style:c,class:me({[`${r}-holder-inner`]:r})},[(l=a.default)===null||l===void 0?void 0:l.call(a)])]})])};ly.displayName="Filter";ly.inheritAttrs=!1;ly.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const Qle=ly,Ok=(e,t)=>{let{setRef:n}=e,{slots:o}=t;var r;const i=ln((r=o.default)===null||r===void 0?void 0:r.call(o));return i&&i.length?ko(i[0],{ref:n}):i};Ok.props={setRef:{type:Function,default:()=>{}}};const Jle=Ok,ese=20;function PA(e){return"touches"in e?e.touches[0].pageY:e.pageY}const tse=pe({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:uh(),thumbRef:uh(),visibleTimeout:null,state:St({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var e,t;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,fo?{passive:!1}:!1),(t=this.thumbRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onMouseDown,fo?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,fo?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,fo?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,fo?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,fo?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),mt.cancel(this.moveRaf)},onMouseDown(e){const{onStartMove:t}=this.$props;S(this.state,{dragging:!0,pageY:PA(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){const{dragging:t,pageY:n,startTop:o}=this.state,{onScroll:r}=this.$props;if(mt.cancel(this.moveRaf),t){const i=PA(e)-n,a=o+i,l=this.getEnableScrollRange(),s=this.getEnableHeightRange(),c=s?a/s:0,u=Math.ceil(c*l);this.moveRaf=mt(()=>{r(u)})}},onMouseUp(){const{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){const{height:e,scrollHeight:t}=this.$props;let n=e/t*100;return n=Math.max(n,ese),n=Math.min(n,e/2),Math.floor(n)},getEnableScrollRange(){const{scrollHeight:e,height:t}=this.$props;return e-t||0},getEnableHeightRange(){const{height:e}=this.$props,t=this.getSpinHeight();return e-t||0},getTop(){const{scrollTop:e}=this.$props,t=this.getEnableScrollRange(),n=this.getEnableHeightRange();return e===0||t===0?0:e/t*n},showScroll(){const{height:e,scrollHeight:t}=this.$props;return t>e}},render(){const{dragging:e,visible:t}=this.state,{prefixCls:n}=this.$props,o=this.getSpinHeight()+"px",r=this.getTop()+"px",i=this.showScroll(),a=i&&t;return g("div",{ref:this.scrollbarRef,class:me(`${n}-scrollbar`,{[`${n}-scrollbar-show`]:i}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:a?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[g("div",{ref:this.thumbRef,class:me(`${n}-scrollbar-thumb`,{[`${n}-scrollbar-thumb-moving`]:e}),style:{width:"100%",height:o,top:r,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function nse(e,t,n,o){const r=new Map,i=new Map,a=he(Symbol("update"));Ie(e,()=>{a.value=Symbol("update")});let l;function s(){mt.cancel(l)}function c(){s(),l=mt(()=>{r.forEach((d,f)=>{if(d&&d.offsetParent){const{offsetHeight:h}=d;i.get(f)!==h&&(a.value=Symbol("update"),i.set(f,d.offsetHeight))}})})}function u(d,f){const h=t(d),m=r.get(h);f?(r.set(h,f.$el||f),c()):r.delete(h),!m!=!f&&(f?n==null||n(d):o==null||o(d))}return Fo(()=>{s()}),[u,c,i,a]}function ose(e,t,n,o,r,i,a,l){let s;return c=>{if(c==null){l();return}mt.cancel(s);const u=t.value,d=o.itemHeight;if(typeof c=="number")a(c);else if(c&&typeof c=="object"){let f;const{align:h}=c;"index"in c?{index:f}=c:f=u.findIndex(y=>r(y)===c.key);const{offset:m=0}=c,v=(y,b)=>{if(y<0||!e.value)return;const $=e.value.clientHeight;let x=!1,_=b;if($){const w=b||h;let I=0,O=0,P=0;const E=Math.min(u.length,f);for(let N=0;N<=E;N+=1){const F=r(u[N]);O=I;const W=n.get(F);P=O+(W===void 0?d:W),I=P,N===f&&W===void 0&&(x=!0)}const R=e.value.scrollTop;let A=null;switch(w){case"top":A=O-m;break;case"bottom":A=P-$+m;break;default:{const N=R+$;ON&&(_="bottom")}}A!==null&&A!==R&&a(A)}s=mt(()=>{x&&i(),v(y-1,_)},2)};v(5)}}}const rse=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),Ik=(e,t)=>{let n=!1,o=null;function r(){clearTimeout(o),n=!0,o=setTimeout(()=>{n=!1},50)}return function(i){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const l=i<0&&e.value||i>0&&t.value;return a&&l?(clearTimeout(o),n=!1):(!l||n)&&r(),!n&&l}};function ise(e,t,n,o){let r=0,i=null,a=null,l=!1;const s=Ik(t,n);function c(d){if(!e.value)return;mt.cancel(i);const{deltaY:f}=d;r+=f,a=f,!s(f)&&(rse||d.preventDefault(),i=mt(()=>{o(r*(l?10:1)),r=0}))}function u(d){e.value&&(l=d.detail===a)}return[c,u]}const ase=14/15;function lse(e,t,n){let o=!1,r=0,i=null,a=null;const l=()=>{i&&(i.removeEventListener("touchmove",s),i.removeEventListener("touchend",c))},s=f=>{if(o){const h=Math.ceil(f.touches[0].pageY);let m=r-h;r=h,n(m)&&f.preventDefault(),clearInterval(a),a=setInterval(()=>{m*=ase,(!n(m,!0)||Math.abs(m)<=.1)&&clearInterval(a)},16)}},c=()=>{o=!1,l()},u=f=>{l(),f.touches.length===1&&!o&&(o=!0,r=Math.ceil(f.touches[0].pageY),i=f.target,i.addEventListener("touchmove",s,{passive:!1}),i.addEventListener("touchend",c))},d=()=>{};lt(()=>{document.addEventListener("touchmove",d,{passive:!1}),Ie(e,f=>{t.value.removeEventListener("touchstart",u),l(),clearInterval(a),f&&t.value.addEventListener("touchstart",u,{passive:!1})},{immediate:!0})}),Ct(()=>{document.removeEventListener("touchmove",d)})}var sse=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const c=t+s,u=r(l,c,{}),d=a(l);return g(Jle,{key:d,setRef:f=>o(l,f)},{default:()=>[u]})})}const fse=pe({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:Z.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,t){let{expose:n}=t;const o=M(()=>{const{height:z,itemHeight:K,virtual:G}=e;return!!(G!==!1&&z&&K)}),r=M(()=>{const{height:z,itemHeight:K,data:G}=e;return o.value&&G&&K*G.length>z}),i=St({scrollTop:0,scrollMoving:!1}),a=M(()=>e.data||cse),l=ve([]);Ie(a,()=>{l.value=$t(a.value).slice()},{immediate:!0});const s=ve(z=>{});Ie(()=>e.itemKey,z=>{typeof z=="function"?s.value=z:s.value=K=>K==null?void 0:K[z]},{immediate:!0});const c=ve(),u=ve(),d=ve(),f=z=>s.value(z),h={getKey:f};function m(z){let K;typeof z=="function"?K=z(i.scrollTop):K=z;const G=I(K);c.value&&(c.value.scrollTop=G),i.scrollTop=G}const[v,y,b,$]=nse(l,f,null,null),x=St({scrollHeight:void 0,start:0,end:0,offset:void 0}),_=ve(0);lt(()=>{wt(()=>{var z;_.value=((z=u.value)===null||z===void 0?void 0:z.offsetHeight)||0})}),fr(()=>{wt(()=>{var z;_.value=((z=u.value)===null||z===void 0?void 0:z.offsetHeight)||0})}),Ie([o,l],()=>{o.value||S(x,{scrollHeight:void 0,start:0,end:l.value.length-1,offset:void 0})},{immediate:!0}),Ie([o,l,_,r],()=>{o.value&&!r.value&&S(x,{scrollHeight:_.value,start:0,end:l.value.length-1,offset:void 0}),c.value&&(i.scrollTop=c.value.scrollTop)},{immediate:!0}),Ie([r,o,()=>i.scrollTop,l,$,()=>e.height,_],()=>{if(!o.value||!r.value)return;let z=0,K,G,Y;const ne=l.value.length,re=l.value,J=i.scrollTop,{itemHeight:te,height:ee}=e,fe=J+ee;for(let ie=0;ie=J&&(K=ie,G=z),Y===void 0&&H>fe&&(Y=ie),z=H}K===void 0&&(K=0,G=0,Y=Math.ceil(ee/te)),Y===void 0&&(Y=ne-1),Y=Math.min(Y+1,ne),S(x,{scrollHeight:z,start:K,end:Y,offset:G})},{immediate:!0});const w=M(()=>x.scrollHeight-e.height);function I(z){let K=z;return Number.isNaN(w.value)||(K=Math.min(K,w.value)),K=Math.max(K,0),K}const O=M(()=>i.scrollTop<=0),P=M(()=>i.scrollTop>=w.value),E=Ik(O,P);function R(z){m(z)}function A(z){var K;const{scrollTop:G}=z.currentTarget;G!==i.scrollTop&&m(G),(K=e.onScroll)===null||K===void 0||K.call(e,z)}const[N,F]=ise(o,O,P,z=>{m(K=>K+z)});lse(o,c,(z,K)=>E(z,K)?!1:(N({preventDefault(){},deltaY:z}),!0));function W(z){o.value&&z.preventDefault()}const D=()=>{c.value&&(c.value.removeEventListener("wheel",N,fo?{passive:!1}:!1),c.value.removeEventListener("DOMMouseScroll",F),c.value.removeEventListener("MozMousePixelScroll",W))};ct(()=>{wt(()=>{c.value&&(D(),c.value.addEventListener("wheel",N,fo?{passive:!1}:!1),c.value.addEventListener("DOMMouseScroll",F),c.value.addEventListener("MozMousePixelScroll",W))})}),Ct(()=>{D()});const B=ose(c,l,b,e,f,y,m,()=>{var z;(z=d.value)===null||z===void 0||z.delayHidden()});n({scrollTo:B});const k=M(()=>{let z=null;return e.height&&(z=S({[e.fullHeight?"height":"maxHeight"]:e.height+"px"},use),o.value&&(z.overflowY="hidden",i.scrollMoving&&(z.pointerEvents="none"))),z});return Ie([()=>x.start,()=>x.end,l],()=>{if(e.onVisibleChange){const z=l.value.slice(x.start,x.end+1);e.onVisibleChange(z,l.value)}},{flush:"post"}),{state:i,mergedData:l,componentStyle:k,onFallbackScroll:A,onScrollBar:R,componentRef:c,useVirtual:o,calRes:x,collectHeight:y,setInstance:v,sharedConfig:h,scrollBarRef:d,fillerInnerRef:u,delayHideScrollBar:()=>{var z;(z=d.value)===null||z===void 0||z.delayHidden()}}},render(){const e=S(S({},this.$props),this.$attrs),{prefixCls:t="rc-virtual-list",height:n,itemHeight:o,fullHeight:r,data:i,itemKey:a,virtual:l,component:s="div",onScroll:c,children:u=this.$slots.default,style:d,class:f}=e,h=sse(e,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),m=me(t,f),{scrollTop:v}=this.state,{scrollHeight:y,offset:b,start:$,end:x}=this.calRes,{componentStyle:_,onFallbackScroll:w,onScrollBar:I,useVirtual:O,collectHeight:P,sharedConfig:E,setInstance:R,mergedData:A,delayHideScrollBar:N}=this;return g("div",V({style:S(S({},d),{position:"relative"}),class:m},h),[g(s,{class:`${t}-holder`,style:_,ref:"componentRef",onScroll:w,onMouseenter:N},{default:()=>[g(Qle,{prefixCls:t,height:y,offset:b,onInnerResize:P,ref:"fillerInnerRef"},{default:()=>dse(A,$,x,R,u,E)})]}),O&&g(tse,{ref:"scrollBarRef",prefixCls:t,scrollTop:v,height:n,scrollHeight:y,count:A.length,onScroll:I,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}}),Pk=fse;function a_(e,t,n){const o=he(e());return Ie(t,(r,i)=>{n?n(r,i)&&(o.value=e()):o.value=e()}),o}function pse(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const Tk=Symbol("SelectContextKey");function hse(e){return ft(Tk,e)}function gse(){return it(Tk,{})}var vse=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r`${r.prefixCls}-item`),l=a_(()=>i.flattenOptions,[()=>r.open,()=>i.flattenOptions],w=>w[0]),s=uh(),c=w=>{w.preventDefault()},u=w=>{s.current&&s.current.scrollTo(typeof w=="number"?{index:w}:w)},d=function(w){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const O=l.value.length;for(let P=0;P1&&arguments[1]!==void 0?arguments[1]:!1;f.activeIndex=w;const O={source:I?"keyboard":"mouse"},P=l.value[w];if(!P){i.onActiveValue(null,-1,O);return}i.onActiveValue(P.value,w,O)};Ie([()=>l.value.length,()=>r.searchValue],()=>{h(i.defaultActiveFirstOption!==!1?d(0):-1)},{immediate:!0});const m=w=>i.rawValues.has(w)&&r.mode!=="combobox";Ie([()=>r.open,()=>r.searchValue],()=>{if(!r.multiple&&r.open&&i.rawValues.size===1){const w=Array.from(i.rawValues)[0],I=$t(l.value).findIndex(O=>{let{data:P}=O;return P[i.fieldNames.value]===w});I!==-1&&(h(I),wt(()=>{u(I)}))}r.open&&wt(()=>{var w;(w=s.current)===null||w===void 0||w.scrollTo(void 0)})},{immediate:!0,flush:"post"});const v=w=>{w!==void 0&&i.onSelect(w,{selected:!i.rawValues.has(w)}),r.multiple||r.toggleOpen(!1)},y=w=>typeof w.label=="function"?w.label():w.label;function b(w){const I=l.value[w];if(!I)return null;const O=I.data||{},{value:P}=O,{group:E}=I,R=As(O,!0),A=y(I);return I?g("div",V(V({"aria-label":typeof A=="string"&&!E?A:null},R),{},{key:w,role:E?"presentation":"option",id:`${r.id}_list_${w}`,"aria-selected":m(P)}),[P]):null}return n({onKeydown:w=>{const{which:I,ctrlKey:O}=w;switch(I){case Fe.N:case Fe.P:case Fe.UP:case Fe.DOWN:{let P=0;if(I===Fe.UP?P=-1:I===Fe.DOWN?P=1:pse()&&O&&(I===Fe.N?P=1:I===Fe.P&&(P=-1)),P!==0){const E=d(f.activeIndex+P,P);u(E),h(E,!0)}break}case Fe.ENTER:{const P=l.value[f.activeIndex];P&&!P.data.disabled?v(P.value):v(void 0),r.open&&w.preventDefault();break}case Fe.ESC:r.toggleOpen(!1),r.open&&w.stopPropagation()}},onKeyup:()=>{},scrollTo:w=>{u(w)}}),()=>{const{id:w,notFoundContent:I,onPopupScroll:O}=r,{menuItemSelectedIcon:P,fieldNames:E,virtual:R,listHeight:A,listItemHeight:N}=i,F=o.option,{activeIndex:W}=f,D=Object.keys(E).map(B=>E[B]);return l.value.length===0?g("div",{role:"listbox",id:`${w}_list`,class:`${a.value}-empty`,onMousedown:c},[I]):g(Je,null,[g("div",{role:"listbox",id:`${w}_list`,style:{height:0,width:0,overflow:"hidden"}},[b(W-1),b(W),b(W+1)]),g(Pk,{itemKey:"key",ref:s,data:l.value,height:A,itemHeight:N,fullHeight:!1,onMousedown:c,onScroll:O,virtual:R},{default:(B,k)=>{var L;const{group:z,groupOption:K,data:G,value:Y}=B,{key:ne}=G,re=typeof B.label=="function"?B.label():B.label;if(z){const $e=(L=G.title)!==null&&L!==void 0?L:TA(re)&&re;return g("div",{class:me(a.value,`${a.value}-group`),title:$e},[F?F(G):re!==void 0?re:ne])}const{disabled:J,title:te,children:ee,style:fe,class:ie,className:X}=G,ue=vse(G,["disabled","title","children","style","class","className"]),ye=_t(ue,D),H=m(Y),j=`${a.value}-option`,q=me(a.value,j,ie,X,{[`${j}-grouped`]:K,[`${j}-active`]:W===k&&!J,[`${j}-disabled`]:J,[`${j}-selected`]:H}),se=y(B),ae=!P||typeof P=="function"||H,ge=typeof se=="number"?se:se||Y;let Se=TA(ge)?ge.toString():void 0;return te!==void 0&&(Se=te),g("div",V(V({},ye),{},{"aria-selected":H,class:q,title:Se,onMousemove:$e=>{ue.onMousemove&&ue.onMousemove($e),!(W===k||J)&&h(k)},onClick:$e=>{J||v(Y),ue.onClick&&ue.onClick($e)},style:fe}),[g("div",{class:`${j}-content`},[F?F(G):ge]),Jn(P)||H,ae&&g(g0,{class:`${a.value}-option-state`,customizeIcon:P,customizeIconProps:{isSelected:H}},{default:()=>[H?"✓":null]})])}})])}}}),bse=mse;var yse=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r1&&arguments[1]!==void 0?arguments[1]:!1;return ln(e).map((o,r)=>{var i;if(!Jn(o)||!o.type)return null;const{type:{isSelectOptGroup:a},key:l,children:s,props:c}=o;if(t||!a)return Sse(o);const u=s&&s.default?s.default():void 0,d=(c==null?void 0:c.label)||((i=s.label)===null||i===void 0?void 0:i.call(s))||l;return S(S({key:`__RC_SELECT_GRP__${l===null?r:String(l)}__`},c),{label:d,options:Ek(u||[])})}).filter(o=>o)}function Cse(e,t,n){const o=ve(),r=ve(),i=ve(),a=ve([]);return Ie([e,t],()=>{e.value?a.value=$t(e.value).slice():a.value=Ek(t.value)},{immediate:!0,deep:!0}),ct(()=>{const l=a.value,s=new Map,c=new Map,u=n.value;function d(f){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let m=0;m0&&arguments[0]!==void 0?arguments[0]:he("");const t=`rc_select_${xse()}`;return e.value||t}function Ak(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function oC(e,t){return Ak(e).join("").toUpperCase().includes(t)}const wse=(e,t,n,o,r)=>M(()=>{const i=n.value,a=r==null?void 0:r.value,l=o==null?void 0:o.value;if(!i||l===!1)return e.value;const{options:s,label:c,value:u}=t.value,d=[],f=typeof l=="function",h=i.toUpperCase(),m=f?l:(y,b)=>a?oC(b[a],h):b[s]?oC(b[c!=="children"?c:"label"],h):oC(b[u],h),v=f?y=>ox(y):y=>y;return e.value.forEach(y=>{if(y[s]){if(m(i,v(y)))d.push(y);else{const $=y[s].filter(x=>m(i,v(x)));$.length&&d.push(S(S({},y),{[s]:$}))}return}m(i,v(y))&&d.push(y)}),d}),_se=(e,t)=>{const n=ve({values:new Map,options:new Map});return[M(()=>{const{values:i,options:a}=n.value,l=e.value.map(u=>{var d;return u.label===void 0?S(S({},u),{label:(d=i.get(u.value))===null||d===void 0?void 0:d.label}):u}),s=new Map,c=new Map;return l.forEach(u=>{s.set(u.value,u),c.set(u.value,t.value.get(u.value)||a.get(u.value))}),n.value.values=s,n.value.options=c,l}),i=>t.value.get(i)||n.value.options.get(i)]};function yn(e,t){const{defaultValue:n,value:o=he()}=t||{};let r=typeof e=="function"?e():e;o.value!==void 0&&(r=It(o)),n!==void 0&&(r=typeof n=="function"?n():n);const i=he(r),a=he(r);ct(()=>{let s=o.value!==void 0?o.value:i.value;t.postState&&(s=t.postState(s)),a.value=s});function l(s){const c=a.value;i.value=s,$t(a.value)!==s&&t.onChange&&t.onChange(s,c)}return Ie(o,()=>{i.value=o.value}),[a,l]}function nn(e){const t=typeof e=="function"?e():e,n=he(t);function o(r){n.value=r}return[n,o]}const Ose=["inputValue"];function Mk(){return S(S({},ay()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:Z.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:Z.any,defaultValue:Z.any,onChange:Function,children:Array})}function Ise(e){return!e||typeof e!="object"}const Pse=pe({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:bt(Mk(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,t){let{expose:n,attrs:o,slots:r}=t;const i=l_(st(e,"id")),a=M(()=>_k(e.mode)),l=M(()=>!!(!e.options&&e.children)),s=M(()=>e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption),c=M(()=>U7(e.fieldNames,l.value)),[u,d]=yn("",{value:M(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:ie=>ie||""}),f=Cse(st(e,"options"),st(e,"children"),c),{valueOptions:h,labelOptions:m,options:v}=f,y=ie=>Ak(ie).map(ue=>{var ye,H;let j,q,se,ae;Ise(ue)?j=ue:(se=ue.key,q=ue.label,j=(ye=ue.value)!==null&&ye!==void 0?ye:se);const ge=h.value.get(j);return ge&&(q===void 0&&(q=ge==null?void 0:ge[e.optionLabelProp||c.value.label]),se===void 0&&(se=(H=ge==null?void 0:ge.key)!==null&&H!==void 0?H:j),ae=ge==null?void 0:ge.disabled),{label:q,value:j,key:se,disabled:ae,option:ge}}),[b,$]=yn(e.defaultValue,{value:st(e,"value")}),x=M(()=>{var ie;const X=y(b.value);return e.mode==="combobox"&&!(!((ie=X[0])===null||ie===void 0)&&ie.value)?[]:X}),[_,w]=_se(x,h),I=M(()=>{if(!e.mode&&_.value.length===1){const ie=_.value[0];if(ie.value===null&&(ie.label===null||ie.label===void 0))return[]}return _.value.map(ie=>{var X;return S(S({},ie),{label:(X=typeof ie.label=="function"?ie.label():ie.label)!==null&&X!==void 0?X:ie.value})})}),O=M(()=>new Set(_.value.map(ie=>ie.value)));ct(()=>{var ie;if(e.mode==="combobox"){const X=(ie=_.value[0])===null||ie===void 0?void 0:ie.value;X!=null&&d(String(X))}},{flush:"post"});const P=(ie,X)=>{const ue=X??ie;return{[c.value.value]:ie,[c.value.label]:ue}},E=ve();ct(()=>{if(e.mode!=="tags"){E.value=v.value;return}const ie=v.value.slice(),X=ue=>h.value.has(ue);[..._.value].sort((ue,ye)=>ue.value{const ye=ue.value;X(ye)||ie.push(P(ye,ue.label))}),E.value=ie});const R=wse(E,c,u,s,st(e,"optionFilterProp")),A=M(()=>e.mode!=="tags"||!u.value||R.value.some(ie=>ie[e.optionFilterProp||"value"]===u.value)?R.value:[P(u.value),...R.value]),N=M(()=>e.filterSort?[...A.value].sort((ie,X)=>e.filterSort(ie,X)):A.value),F=M(()=>Woe(N.value,{fieldNames:c.value,childrenAsData:l.value})),W=ie=>{const X=y(ie);if($(X),e.onChange&&(X.length!==_.value.length||X.some((ue,ye)=>{var H;return((H=_.value[ye])===null||H===void 0?void 0:H.value)!==(ue==null?void 0:ue.value)}))){const ue=e.labelInValue?X.map(H=>S(S({},H),{originLabel:H.label,label:typeof H.label=="function"?H.label():H.label})):X.map(H=>H.value),ye=X.map(H=>ox(w(H.value)));e.onChange(a.value?ue:ue[0],a.value?ye:ye[0])}},[D,B]=nn(null),[k,L]=nn(0),z=M(()=>e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"),K=function(ie,X){let{source:ue="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};L(X),e.backfill&&e.mode==="combobox"&&ie!==null&&ue==="keyboard"&&B(String(ie))},G=(ie,X)=>{const ue=()=>{var ye;const H=w(ie),j=H==null?void 0:H[c.value.label];return[e.labelInValue?{label:typeof j=="function"?j():j,originLabel:j,value:ie,key:(ye=H==null?void 0:H.key)!==null&&ye!==void 0?ye:ie}:ie,ox(H)]};if(X&&e.onSelect){const[ye,H]=ue();e.onSelect(ye,H)}else if(!X&&e.onDeselect){const[ye,H]=ue();e.onDeselect(ye,H)}},Y=(ie,X)=>{let ue;const ye=a.value?X.selected:!0;ye?ue=a.value?[..._.value,ie]:[ie]:ue=_.value.filter(H=>H.value!==ie),W(ue),G(ie,ye),e.mode==="combobox"?B(""):(!a.value||e.autoClearSearchValue)&&(d(""),B(""))},ne=(ie,X)=>{W(ie),(X.type==="remove"||X.type==="clear")&&X.values.forEach(ue=>{G(ue.value,!1)})},re=(ie,X)=>{var ue;if(d(ie),B(null),X.source==="submit"){const ye=(ie||"").trim();if(ye){const H=Array.from(new Set([...O.value,ye]));W(H),G(ye,!0),d("")}return}X.source!=="blur"&&(e.mode==="combobox"&&W(ie),(ue=e.onSearch)===null||ue===void 0||ue.call(e,ie))},J=ie=>{let X=ie;e.mode!=="tags"&&(X=ie.map(ye=>{const H=m.value.get(ye);return H==null?void 0:H.value}).filter(ye=>ye!==void 0));const ue=Array.from(new Set([...O.value,...X]));W(ue),ue.forEach(ye=>{G(ye,!0)})},te=M(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);hse(v0(S(S({},f),{flattenOptions:F,onActiveValue:K,defaultActiveFirstOption:z,onSelect:Y,menuItemSelectedIcon:st(e,"menuItemSelectedIcon"),rawValues:O,fieldNames:c,virtual:te,listHeight:st(e,"listHeight"),listItemHeight:st(e,"listItemHeight"),childrenAsData:l})));const ee=he();n({focus(){var ie;(ie=ee.value)===null||ie===void 0||ie.focus()},blur(){var ie;(ie=ee.value)===null||ie===void 0||ie.blur()},scrollTo(ie){var X;(X=ee.value)===null||X===void 0||X.scrollTo(ie)}});const fe=M(()=>_t(e,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>g(i_,V(V(V({},fe.value),o),{},{id:i,prefixCls:e.prefixCls,ref:ee,omitDomProps:Ose,mode:e.mode,displayValues:I.value,onDisplayValuesChange:ne,searchValue:u.value,onSearch:re,onSearchSplit:J,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:bse,emptyOptions:!F.value.length,activeValue:D.value,activeDescendantId:`${i}_list_${k.value}`}),r)}}),s_=()=>null;s_.isSelectOption=!0;s_.displayName="ASelectOption";const Tse=s_,c_=()=>null;c_.isSelectOptGroup=!0;c_.displayName="ASelectOptGroup";const Ese=c_;var Ase={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const Mse=Ase;var Rse=Symbol("iconContext"),Rk=function(){return it(Rse,{prefixCls:he("anticon"),rootClassName:he(""),csp:he()})};function u_(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Dse(e,t){return e&&e.contains?e.contains(t):!1}var AA="data-vc-order",Lse="vc-icon-key",px=new Map;function Dk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Lse}function d_(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Nse(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Lk(e){return Array.from((px.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function Nk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!u_())return null;var n=t.csp,o=t.prepend,r=document.createElement("style");r.setAttribute(AA,Nse(o)),n&&n.nonce&&(r.nonce=n.nonce),r.innerHTML=e;var i=d_(t),a=i.firstChild;if(o){if(o==="queue"){var l=Lk(i).filter(function(s){return["prepend","prependQueue"].includes(s.getAttribute(AA))});if(l.length)return i.insertBefore(r,l[l.length-1].nextSibling),r}i.insertBefore(r,a)}else i.appendChild(r);return r}function kse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=d_(t);return Lk(n).find(function(o){return o.getAttribute(Dk(t))===e})}function Bse(e,t){var n=px.get(e);if(!n||!Dse(document,n)){var o=Nk("",t),r=o.parentNode;px.set(e,r),e.removeChild(o)}}function Fse(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=d_(n);Bse(o,n);var r=kse(t,n);if(r)return n.csp&&n.csp.nonce&&r.nonce!==n.csp.nonce&&(r.nonce=n.csp.nonce),r.innerHTML!==e&&(r.innerHTML=e),r;var i=Nk(e,n);return i.setAttribute(Dk(n),t),i}function MA(e){for(var t=1;t * { + line-height: 1; +} + +.anticon svg { + display: inline-block; +} + +.anticon::before { + display: none; +} + +.anticon .anticon-icon { + display: block; +} + +.anticon[tabindex] { + cursor: pointer; +} + +.anticon-spin::before, +.anticon-spin { + display: inline-block; + -webkit-animation: loadingCircle 1s infinite linear; + animation: loadingCircle 1s infinite linear; +} + +@-webkit-keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +`;function Fk(e){return e&&e.getRootNode&&e.getRootNode()}function jse(e){return u_()?Fk(e)instanceof ShadowRoot:!1}function Wse(e){return jse(e)?Fk(e):null}var Vse=function(){var t=Rk(),n=t.prefixCls,o=t.csp,r=Nn(),i=zse;n&&(i=i.replace(/anticon/g,n.value)),wt(function(){if(u_()){var a=r.vnode.el,l=Wse(a);Fse(i,"@ant-design-vue-icons",{prepend:!0,csp:o.value,attachTo:l})}})},Kse=["icon","primaryColor","secondaryColor"];function Use(e,t){if(e==null)return{};var n=Gse(e,t),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function Gse(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}function dm(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function dce(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}Hk(Dne.primary);var rf=function(t,n){var o,r=NA({},t,n.attrs),i=r.class,a=r.icon,l=r.spin,s=r.rotate,c=r.tabindex,u=r.twoToneColor,d=r.onClick,f=uce(r,rce),h=Rk(),m=h.prefixCls,v=h.rootClassName,y=(o={},op(o,v.value,!!v.value),op(o,m.value,!0),op(o,"".concat(m.value,"-").concat(a.name),!!a.name),op(o,"".concat(m.value,"-spin"),!!l||a.name==="loading"),o),b=c;b===void 0&&d&&(b=-1);var $=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,x=Bk(u),_=ice(x,2),w=_[0],I=_[1];return g("span",NA({role:"img","aria-label":a.name},f,{onClick:d,class:[y,i],tabindex:b}),[g(f_,{icon:a,primaryColor:w,secondaryColor:I,style:$},null),g(oce,null,null)])};rf.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]};rf.displayName="AntdIcon";rf.inheritAttrs=!1;rf.getTwoToneColor=nce;rf.setTwoToneColor=Hk;const Ot=rf;function kA(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};const{loading:n,multiple:o,prefixCls:r,hasFeedback:i,feedbackIcon:a,showArrow:l}=e,s=e.suffixIcon||t.suffixIcon&&t.suffixIcon(),c=e.clearIcon||t.clearIcon&&t.clearIcon(),u=e.menuItemSelectedIcon||t.menuItemSelectedIcon&&t.menuItemSelectedIcon(),d=e.removeIcon||t.removeIcon&&t.removeIcon(),f=c??g(Kr,null,null),h=b=>g(Je,null,[l!==!1&&b,i&&a]);let m=null;if(s!==void 0)m=h(s);else if(n)m=h(g(di,{spin:!0},null));else{const b=`${r}-suffix`;m=$=>{let{open:x,showSearch:_}=$;return h(x&&_?g(cy,{class:b},null):g(jh,{class:b},null))}}let v=null;u!==void 0?v=u:o?v=g(sy,null,null):v=null;let y=null;return d!==void 0?y=d:y=g(Vr,null,null),{clearIcon:f,suffixIcon:m,itemIcon:v,removeIcon:y}}function S_(e){const t=Symbol("contextKey");return{useProvide:(r,i)=>{const a=St({});return ft(t,a),ct(()=>{S(a,r,i||{})}),a},useInject:()=>it(t,e)||{}}}const m0=Symbol("ContextProps"),b0=Symbol("InternalContextProps"),Pce=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:M(()=>!0);const n=he(new Map),o=(i,a)=>{n.value.set(i,a),n.value=new Map(n.value)},r=i=>{n.value.delete(i),n.value=new Map(n.value)};Nn(),Ie([t,n],()=>{}),ft(m0,e),ft(b0,{addFormItemField:o,removeFormItemField:r})},gx={id:M(()=>{}),onFieldBlur:()=>{},onFieldChange:()=>{},clearValidate:()=>{}},vx={addFormItemField:()=>{},removeFormItemField:()=>{}},co=()=>{const e=it(b0,vx),t=Symbol("FormItemFieldKey"),n=Nn();return e.addFormItemField(t,n.type),Ct(()=>{e.removeFormItemField(t)}),ft(b0,vx),ft(m0,gx),it(m0,gx)},y0=pe({compatConfig:{MODE:3},name:"AFormItemRest",setup(e,t){let{slots:n}=t;return ft(b0,vx),ft(m0,gx),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),To=S_({}),S0=pe({name:"NoFormStatus",setup(e,t){let{slots:n}=t;return To.useProvide({}),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function sr(e,t,n){return me({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const da=(e,t)=>t||e,Tce=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},Ece=Tce,Ace=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-space-item`]:{"&:empty":{display:"none"}}}}},zk=pt("Space",e=>[Ace(e),Ece(e)]);var Mce="[object Symbol]";function uy(e){return typeof e=="symbol"||la(e)&&Es(e)==Mce}function dy(e,t){for(var n=-1,o=e==null?0:e.length,r=Array(o);++n0){if(++t>=Yce)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Qce(e){return function(){return e}}var C0=function(){try{var e=Qc(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Jce=C0?function(e,t){return C0(e,"toString",{configurable:!0,enumerable:!1,value:Qce(t),writable:!0})}:C_;const eue=Jce;var Vk=Zce(eue);function tue(e,t){for(var n=-1,o=e==null?0:e.length;++n-1}function $_(e,t,n){t=="__proto__"&&C0?C0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var iue=Object.prototype,aue=iue.hasOwnProperty;function x_(e,t,n){var o=e[t];(!(aue.call(e,t)&&Fh(o,n))||n===void 0&&!(t in e))&&$_(e,t,n)}function af(e,t,n,o){var r=!n;n||(n={});for(var i=-1,a=t.length;++i1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(r--,i):void 0,a&&lue(n[0],n[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++o0&&n(l)?t>1?Xk(l,t-1,n,o,r):Z2(r,l):o||(r[r.length]=l)}return r}function _ue(e){var t=e==null?0:e.length;return t?Xk(e,1):[]}function qk(e){return Vk(Gk(e,void 0,_ue),e+"")}var O_=hk(Object.getPrototypeOf,Object),Oue="[object Object]",Iue=Function.prototype,Pue=Object.prototype,Zk=Iue.toString,Tue=Pue.hasOwnProperty,Eue=Zk.call(Object);function py(e){if(!la(e)||Es(e)!=Oue)return!1;var t=O_(e);if(t===null)return!0;var n=Tue.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Zk.call(n)==Eue}function Aue(e,t,n){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o=t||O<0||d&&P>=i}function b(){var I=rC();if(y(I))return $(I);l=setTimeout(b,v(I))}function $(I){return l=void 0,f&&o?h(I):(o=r=void 0,a)}function x(){l!==void 0&&clearTimeout(l),c=0,o=s=r=l=void 0}function _(){return l===void 0?a:$(rC())}function w(){var I=rC(),O=y(I);if(o=arguments,r=this,s=I,O){if(l===void 0)return m(s);if(d)return clearTimeout(l),l=setTimeout(b,t),h(s)}return l===void 0&&(l=setTimeout(b,t)),a}return w.cancel=x,w.flush=_,w}function bx(e,t,n){(n!==void 0&&!Fh(e[t],n)||n===void 0&&!(t in e))&&$_(e,t,n)}function d9(e){return la(e)&&Jc(e)}function yx(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function hfe(e){return af(e,Wh(e))}function gfe(e,t,n,o,r,i,a){var l=yx(e,n),s=yx(t,n),c=a.get(s);if(c){bx(e,n,c);return}var u=i?i(l,s,n+"",e,t,a):void 0,d=u===void 0;if(d){var f=xr(s),h=!f&&Ad(s),m=!f&&!h&&Jb(s);u=s,f||h||m?xr(l)?u=l:d9(l)?u=Wk(l):h?(d=!1,u=Jk(s,!0)):m?(d=!1,u=n9(s,!0)):u=[]:py(s)||Ed(s)?(u=l,Ed(l)?u=hfe(l):(!Wr(l)||X2(l))&&(u=o9(s))):d=!1}d&&(a.set(s,u),r(u,s,o,i,a),a.delete(s)),bx(e,n,u)}function f9(e,t,n,o,r){e!==t&&u9(t,function(i,a){if(r||(r=new ia),Wr(i))gfe(e,t,a,n,f9,o,r);else{var l=o?o(yx(e,a),i,a+"",e,t,r):void 0;l===void 0&&(l=i),bx(e,a,l)}},Wh)}function p9(e,t,n){for(var o=-1,r=e==null?0:e.length;++o-1?r[i?t[a]:a]:void 0}}var bfe=Math.max;function yfe(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var r=n==null?0:Vce(n);return r<0&&(r=bfe(o+r,0)),Kk(e,P_(t),r)}var Sfe=mfe(yfe);function Cfe(e){for(var t=-1,n=e==null?0:e.length,o={};++t=120&&u.length>=120)?new Td(a&&u):void 0}u=e[0];var d=-1,f=l[0];e:for(;++d1),i}),af(e,t9(e),n),o&&(n=$p(n,Nfe|kfe|Bfe,Lfe));for(var r=t.length;r--;)Dfe(n,t[r]);return n});function Hfe(e,t,n,o){if(!Wr(e))return e;t=lf(t,e);for(var r=-1,i=t.length,a=i-1,l=e;l!=null&&++r=Gfe){var c=t?null:Ufe(e);if(c)return q2(c);a=!1,r=f0,s=new Td}else s=t?[]:l;e:for(;++o({compactSize:String,compactDirection:Z.oneOf(Go("horizontal","vertical")).def("horizontal"),isFirstItem:De(),isLastItem:De()}),gy=S_(null),Ms=(e,t)=>{const n=gy.useInject(),o=M(()=>{if(!n||h9(n))return"";const{compactDirection:r,isFirstItem:i,isLastItem:a}=n,l=r==="vertical"?"-vertical-":"-";return me({[`${e.value}-compact${l}item`]:!0,[`${e.value}-compact${l}first-item`]:i,[`${e.value}-compact${l}last-item`]:a,[`${e.value}-compact${l}item-rtl`]:t.value==="rtl"})});return{compactSize:M(()=>n==null?void 0:n.compactSize),compactDirection:M(()=>n==null?void 0:n.compactDirection),compactItemClassnames:o}},dh=pe({name:"NoCompactStyle",setup(e,t){let{slots:n}=t;return gy.useProvide(null),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),qfe=()=>({prefixCls:String,size:{type:String},direction:Z.oneOf(Go("horizontal","vertical")).def("horizontal"),align:Z.oneOf(Go("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),Zfe=pe({name:"CompactItem",props:Xfe(),setup(e,t){let{slots:n}=t;return gy.useProvide(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),Qfe=pe({name:"ASpaceCompact",inheritAttrs:!1,props:qfe(),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,direction:i}=Ve("space-compact",e),a=gy.useInject(),[l,s]=zk(r),c=M(()=>me(r.value,s.value,{[`${r.value}-rtl`]:i.value==="rtl",[`${r.value}-block`]:e.block,[`${r.value}-vertical`]:e.direction==="vertical"}));return()=>{var u;const d=ln(((u=o.default)===null||u===void 0?void 0:u.call(o))||[]);return d.length===0?null:l(g("div",V(V({},n),{},{class:[c.value,n.class]}),[d.map((f,h)=>{var m;const v=f&&f.key||`${r.value}-item-${h}`,y=!a||h9(a);return g(Zfe,{key:v,compactSize:(m=e.size)!==null&&m!==void 0?m:"middle",compactDirection:e.direction,isFirstItem:h===0&&(y||(a==null?void 0:a.isFirstItem)),isLastItem:h===d.length-1&&(y||(a==null?void 0:a.isLastItem))},{default:()=>[f]})})]))}}}),$0=Qfe,Jfe=e=>({animationDuration:e,animationFillMode:"both"}),epe=e=>({animationDuration:e,animationFillMode:"both"}),Vh=function(e,t,n,o){const i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` + ${i}${e}-enter, + ${i}${e}-appear + `]:S(S({},Jfe(o)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:S(S({},epe(o)),{animationPlayState:"paused"}),[` + ${i}${e}-enter${e}-enter-active, + ${i}${e}-appear${e}-appear-active + `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},tpe=new Pt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),npe=new Pt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),E_=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=e,o=`${n}-fade`,r=t?"&":"";return[Vh(o,tpe,npe,e.motionDurationMid,t),{[` + ${r}${o}-enter, + ${r}${o}-appear + `]:{opacity:0,animationTimingFunction:"linear"},[`${r}${o}-leave`]:{animationTimingFunction:"linear"}}]},ope=new Pt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),rpe=new Pt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ipe=new Pt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ape=new Pt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),lpe=new Pt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),spe=new Pt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),cpe=new Pt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),upe=new Pt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),dpe={"move-up":{inKeyframes:cpe,outKeyframes:upe},"move-down":{inKeyframes:ope,outKeyframes:rpe},"move-left":{inKeyframes:ipe,outKeyframes:ape},"move-right":{inKeyframes:lpe,outKeyframes:spe}},Dd=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=dpe[t];return[Vh(o,r,i,e.motionDurationMid),{[` + ${o}-enter, + ${o}-appear + `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},vy=new Pt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),my=new Pt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),by=new Pt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),yy=new Pt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),fpe=new Pt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ppe=new Pt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),hpe=new Pt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),gpe=new Pt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),vpe={"slide-up":{inKeyframes:vy,outKeyframes:my},"slide-down":{inKeyframes:by,outKeyframes:yy},"slide-left":{inKeyframes:fpe,outKeyframes:ppe},"slide-right":{inKeyframes:hpe,outKeyframes:gpe}},Na=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=vpe[t];return[Vh(o,r,i,e.motionDurationMid),{[` + ${o}-enter, + ${o}-appear + `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},A_=new Pt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),mpe=new Pt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),oM=new Pt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),rM=new Pt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),bpe=new Pt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),ype=new Pt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Spe=new Pt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),Cpe=new Pt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),$pe=new Pt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),xpe=new Pt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),wpe=new Pt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),_pe=new Pt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Ope={zoom:{inKeyframes:A_,outKeyframes:mpe},"zoom-big":{inKeyframes:oM,outKeyframes:rM},"zoom-big-fast":{inKeyframes:oM,outKeyframes:rM},"zoom-left":{inKeyframes:Spe,outKeyframes:Cpe},"zoom-right":{inKeyframes:$pe,outKeyframes:xpe},"zoom-up":{inKeyframes:bpe,outKeyframes:ype},"zoom-down":{inKeyframes:wpe,outKeyframes:_pe}},cf=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=Ope[t];return[Vh(o,r,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` + ${o}-enter, + ${o}-appear + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Ipe=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Kh=Ipe,iM=e=>{const{controlPaddingHorizontal:t}=e;return{position:"relative",display:"block",minHeight:e.controlHeight,padding:`${(e.controlHeight-e.fontSize*e.lineHeight)/2}px ${t}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,boxSizing:"border-box"}},Ppe=e=>{const{antCls:t,componentCls:n}=e,o=`${n}-item`;return[{[`${n}-dropdown`]:S(S({},vt(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[` + &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-bottomLeft, + &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-bottomLeft + `]:{animationName:vy},[` + &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-topLeft, + &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-topLeft + `]:{animationName:by},[`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]:{animationName:my},[`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-topLeft`]:{animationName:yy},"&-hidden":{display:"none"},"&-empty":{color:e.colorTextDisabled},[`${o}-empty`]:S(S({},iM(e)),{color:e.colorTextDisabled}),[`${o}`]:S(S({},iM(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":S({flex:"auto"},eo),"&-state":{flex:"none"},[`&-active:not(${o}-option-disabled)`]:{backgroundColor:e.controlItemBgHover},[`&-selected:not(${o}-option-disabled)`]:{color:e.colorText,fontWeight:e.fontWeightStrong,backgroundColor:e.controlItemBgActive,[`${o}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${o}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},Na(e,"slide-up"),Na(e,"slide-down"),Dd(e,"move-up"),Dd(e,"move-down")]},Tpe=Ppe,Tu=2;function v9(e){let{controlHeightSM:t,controlHeight:n,lineWidth:o}=e;const r=(n-t)/2-o,i=Math.ceil(r/2);return[r,i]}function aC(e,t){const{componentCls:n,iconCls:o}=e,r=`${n}-selection-overflow`,i=e.controlHeightSM,[a]=v9(e),l=t?`${n}-${t}`:"";return{[`${n}-multiple${l}`]:{fontSize:e.fontSize,[r]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${n}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${a-Tu}px ${Tu*2}px`,borderRadius:e.borderRadius,[`${n}-show-search&`]:{cursor:"text"},[`${n}-disabled&`]:{background:e.colorBgContainerDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Tu}px 0`,lineHeight:`${i}px`,content:'"\\a0"'}},[` + &${n}-show-arrow ${n}-selector, + &${n}-allow-clear ${n}-selector + `]:{paddingInlineEnd:e.fontSizeIcon+e.controlPaddingHorizontal},[`${n}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:i,marginTop:Tu,marginBottom:Tu,lineHeight:`${i-e.lineWidth*2}px`,background:e.colorFillSecondary,border:`${e.lineWidth}px solid ${e.colorSplit}`,borderRadius:e.borderRadiusSM,cursor:"default",transition:`font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Tu*2,paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS/2,[`${n}-disabled&`]:{color:e.colorTextDisabled,borderColor:e.colorBorder,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":S(S({},Xc()),{display:"inline-block",color:e.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${o}`]:{verticalAlign:"-0.2em"},"&:hover":{color:e.colorIconHover}})},[`${r}-item + ${r}-item`]:{[`${n}-selection-search`]:{marginInlineStart:0}},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.inputPaddingHorizontalBase-a,"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:`${i}px`,transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}}}}function Epe(e){const{componentCls:t}=e,n=nt(e,{controlHeight:e.controlHeightSM,controlHeightSM:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),[,o]=v9(e);return[aC(e),aC(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInlineStart:e.controlPaddingHorizontalSM-e.lineWidth,insetInlineEnd:"auto"},[`${t}-selection-search`]:{marginInlineStart:o}}},aC(nt(e,{fontSize:e.fontSizeLG,controlHeight:e.controlHeightLG,controlHeightSM:e.controlHeight,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius}),"lg")]}function lC(e,t){const{componentCls:n,inputPaddingHorizontalBase:o,borderRadius:r}=e,i=e.controlHeight-e.lineWidth*2,a=Math.ceil(e.fontSize*1.25),l=t?`${n}-${t}`:"";return{[`${n}-single${l}`]:{fontSize:e.fontSize,[`${n}-selector`]:S(S({},vt(e)),{display:"flex",borderRadius:r,[`${n}-selection-search`]:{position:"absolute",top:0,insetInlineStart:o,insetInlineEnd:o,bottom:0,"&-input":{width:"100%"}},[` + ${n}-selection-item, + ${n}-selection-placeholder + `]:{padding:0,lineHeight:`${i}px`,transition:`all ${e.motionDurationSlow}`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${i}px`}},[`${n}-selection-item`]:{position:"relative",userSelect:"none"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:after`,`${n}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` + &${n}-show-arrow ${n}-selection-item, + &${n}-show-arrow ${n}-selection-placeholder + `]:{paddingInlineEnd:a},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:e.controlHeight,padding:`0 ${o}px`,[`${n}-selection-search-input`]:{height:i},"&:after":{lineHeight:`${i}px`}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${o}px`,"&:after":{display:"none"}}}}}}}function Ape(e){const{componentCls:t}=e,n=e.controlPaddingHorizontalSM-e.lineWidth;return[lC(e),lC(nt(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selection-search`]:{insetInlineStart:n,insetInlineEnd:n},[`${t}-selector`]:{padding:`0 ${n}px`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:n+e.fontSize*1.5},[` + &${t}-show-arrow ${t}-selection-item, + &${t}-show-arrow ${t}-selection-placeholder + `]:{paddingInlineEnd:e.fontSize*1.5}}}},lC(nt(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}function Mpe(e,t,n){const{focusElCls:o,focus:r,borderElCls:i}=n,a=i?"> *":"",l=["hover",r?"focus":null,"active"].filter(Boolean).map(s=>`&:${s} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:-e.lineWidth},"&-item":S(S({[l]:{zIndex:2}},o?{[`&${o}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function Rpe(e,t,n){const{borderElCls:o}=n,r=o?`> ${o}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${r}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function uf(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=e,o=`${n}-compact`;return{[o]:S(S({},Mpe(e,o,t)),Rpe(n,o,t))}}const Dpe=e=>{const{componentCls:t}=e;return{position:"relative",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${t}-disabled&`]:{color:e.colorTextDisabled,background:e.colorBgContainerDisabled,cursor:"not-allowed",[`${t}-multiple&`]:{background:e.colorBgContainerDisabled},input:{cursor:"not-allowed"}}}},sC=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:o,borderHoverColor:r,outlineColor:i,antCls:a}=t,l=n?{[`${o}-selector`]:{borderColor:r}}:{};return{[e]:{[`&:not(${o}-disabled):not(${o}-customize-input):not(${a}-pagination-size-changer)`]:S(S({},l),{[`${o}-focused& ${o}-selector`]:{borderColor:r,boxShadow:`0 0 0 ${t.controlOutlineWidth}px ${i}`,borderInlineEndWidth:`${t.controlLineWidth}px !important`,outline:0},[`&:hover ${o}-selector`]:{borderColor:r,borderInlineEndWidth:`${t.controlLineWidth}px !important`}})}}},Lpe=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Npe=e=>{const{componentCls:t,inputPaddingHorizontalBase:n,iconCls:o}=e;return{[t]:S(S({},vt(e)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${t}-customize-input) ${t}-selector`]:S(S({},Dpe(e)),Lpe(e)),[`${t}-selection-item`]:S({flex:1,fontWeight:"normal"},eo),[`${t}-selection-placeholder`]:S(S({},eo),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${t}-arrow`]:S(S({},Xc()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[o]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${t}-suffix)`]:{pointerEvents:"auto"}},[`${t}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${t}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:e.colorBgContainer,cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},"&:hover":{[`${t}-clear`]:{opacity:1}}}),[`${t}-has-feedback`]:{[`${t}-clear`]:{insetInlineEnd:n+e.fontSize+e.paddingXXS}}}},kpe=e=>{const{componentCls:t}=e;return[{[t]:{[`&-borderless ${t}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${t}-in-form-item`]:{width:"100%"}}},Npe(e),Ape(e),Epe(e),Tpe(e),{[`${t}-rtl`]:{direction:"rtl"}},sC(t,nt(e,{borderHoverColor:e.colorPrimaryHover,outlineColor:e.controlOutline})),sC(`${t}-status-error`,nt(e,{borderHoverColor:e.colorErrorHover,outlineColor:e.colorErrorOutline}),!0),sC(`${t}-status-warning`,nt(e,{borderHoverColor:e.colorWarningHover,outlineColor:e.colorWarningOutline}),!0),uf(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},M_=pt("Select",(e,t)=>{let{rootPrefixCls:n}=t;const o=nt(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.paddingSM-1});return[kpe(o)]},e=>({zIndexPopup:e.zIndexPopupBase+50})),Sy=()=>S(S({},_t(Mk(),["inputIcon","mode","getInputElement","getRawInputElement","backfill"])),{value:rt([Array,Object,String,Number]),defaultValue:rt([Array,Object,String,Number]),notFoundContent:Z.any,suffixIcon:Z.any,itemIcon:Z.any,size:Qe(),mode:Qe(),bordered:De(!0),transitionName:String,choiceTransitionName:Qe(""),popupClassName:String,dropdownClassName:String,placement:Qe(),status:Qe(),"onUpdate:value":Oe()}),aM="SECRET_COMBOBOX_MODE_DO_NOT_USE",wa=pe({compatConfig:{MODE:3},name:"ASelect",Option:Tse,OptGroup:Ese,inheritAttrs:!1,props:bt(Sy(),{listHeight:256,listItemHeight:24}),SECRET_COMBOBOX_MODE_DO_NOT_USE:aM,slots:Object,setup(e,t){let{attrs:n,emit:o,slots:r,expose:i}=t;const a=he(),l=co(),s=To.useInject(),c=M(()=>da(s.status,e.status)),u=()=>{var Y;(Y=a.value)===null||Y===void 0||Y.focus()},d=()=>{var Y;(Y=a.value)===null||Y===void 0||Y.blur()},f=Y=>{var ne;(ne=a.value)===null||ne===void 0||ne.scrollTo(Y)},h=M(()=>{const{mode:Y}=e;if(Y!=="combobox")return Y===aM?"combobox":Y}),{prefixCls:m,direction:v,configProvider:y,renderEmpty:b,size:$,getPrefixCls:x,getPopupContainer:_,disabled:w,select:I}=Ve("select",e),{compactSize:O,compactItemClassnames:P}=Ms(m,v),E=M(()=>O.value||$.value),R=jr(),A=M(()=>{var Y;return(Y=w.value)!==null&&Y!==void 0?Y:R.value}),[N,F]=M_(m),W=M(()=>x()),D=M(()=>e.placement!==void 0?e.placement:v.value==="rtl"?"bottomRight":"bottomLeft"),B=M(()=>dr(W.value,t_(D.value),e.transitionName)),k=M(()=>me({[`${m.value}-lg`]:E.value==="large",[`${m.value}-sm`]:E.value==="small",[`${m.value}-rtl`]:v.value==="rtl",[`${m.value}-borderless`]:!e.bordered,[`${m.value}-in-form-item`]:s.isFormItemInput},sr(m.value,c.value,s.hasFeedback),P.value,F.value)),L=function(){for(var Y=arguments.length,ne=new Array(Y),re=0;re{o("blur",Y),l.onFieldBlur()};i({blur:d,focus:u,scrollTo:f});const K=M(()=>h.value==="multiple"||h.value==="tags"),G=M(()=>e.showArrow!==void 0?e.showArrow:e.loading||!(K.value||h.value==="combobox"));return()=>{var Y,ne,re,J;const{notFoundContent:te,listHeight:ee=256,listItemHeight:fe=24,popupClassName:ie,dropdownClassName:X,virtual:ue,dropdownMatchSelectWidth:ye,id:H=l.id.value,placeholder:j=(Y=r.placeholder)===null||Y===void 0?void 0:Y.call(r),showArrow:q}=e,{hasFeedback:se,feedbackIcon:ae}=s;let ge;te!==void 0?ge=te:r.notFoundContent?ge=r.notFoundContent():h.value==="combobox"?ge=null:ge=(b==null?void 0:b("Select"))||g(k2,{componentName:"Select"},null);const{suffixIcon:Se,itemIcon:$e,removeIcon:_e,clearIcon:be}=y_(S(S({},e),{multiple:K.value,prefixCls:m.value,hasFeedback:se,feedbackIcon:ae,showArrow:G.value}),r),Te=_t(e,["prefixCls","suffixIcon","itemIcon","removeIcon","clearIcon","size","bordered","status"]),Pe=me(ie||X,{[`${m.value}-dropdown-${v.value}`]:v.value==="rtl"},F.value);return N(g(Pse,V(V(V({ref:a,virtual:ue,dropdownMatchSelectWidth:ye},Te),n),{},{showSearch:(ne=e.showSearch)!==null&&ne!==void 0?ne:(re=I==null?void 0:I.value)===null||re===void 0?void 0:re.showSearch,placeholder:j,listHeight:ee,listItemHeight:fe,mode:h.value,prefixCls:m.value,direction:v.value,inputIcon:Se,menuItemSelectedIcon:$e,removeIcon:_e,clearIcon:be,notFoundContent:ge,class:[k.value,n.class],getPopupContainer:_==null?void 0:_.value,dropdownClassName:Pe,onChange:L,onBlur:z,id:H,dropdownRender:Te.dropdownRender||r.dropdownRender,transitionName:B.value,children:(J=r.default)===null||J===void 0?void 0:J.call(r),tagRender:e.tagRender||r.tagRender,optionLabelRender:r.optionLabel,maxTagPlaceholder:e.maxTagPlaceholder||r.maxTagPlaceholder,showArrow:se||q,disabled:A.value}),{option:r.option}))}}});wa.install=function(e){return e.component(wa.name,wa),e.component(wa.Option.displayName,wa.Option),e.component(wa.OptGroup.displayName,wa.OptGroup),e};const Bpe=wa.Option,Fpe=wa.OptGroup,Cl=wa,R_=()=>null;R_.isSelectOption=!0;R_.displayName="AAutoCompleteOption";const dd=R_,D_=()=>null;D_.isSelectOptGroup=!0;D_.displayName="AAutoCompleteOptGroup";const pm=D_;function Hpe(e){var t,n;return((t=e==null?void 0:e.type)===null||t===void 0?void 0:t.isSelectOption)||((n=e==null?void 0:e.type)===null||n===void 0?void 0:n.isSelectOptGroup)}const zpe=()=>S(S({},_t(Sy(),["loading","mode","optionLabelProp","labelInValue"])),{dataSource:Array,dropdownMenuStyle:{type:Object,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},prefixCls:String,showSearch:{type:Boolean,default:void 0},transitionName:String,choiceTransitionName:{type:String,default:"zoom"},autofocus:{type:Boolean,default:void 0},backfill:{type:Boolean,default:void 0},filterOption:{type:[Boolean,Function],default:!1},defaultActiveFirstOption:{type:Boolean,default:!0},status:String}),jpe=dd,Wpe=pm,cC=pe({compatConfig:{MODE:3},name:"AAutoComplete",inheritAttrs:!1,props:zpe(),slots:Object,setup(e,t){let{slots:n,attrs:o,expose:r}=t;Sn(),Sn(),Sn(!e.dropdownClassName);const i=he(),a=()=>{var u;const d=ln((u=n.default)===null||u===void 0?void 0:u.call(n));return d.length?d[0]:void 0};r({focus:()=>{var u;(u=i.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=i.value)===null||u===void 0||u.blur()}});const{prefixCls:c}=Ve("select",e);return()=>{var u,d,f;const{size:h,dataSource:m,notFoundContent:v=(u=n.notFoundContent)===null||u===void 0?void 0:u.call(n)}=e;let y;const{class:b}=o,$={[b]:!!b,[`${c.value}-lg`]:h==="large",[`${c.value}-sm`]:h==="small",[`${c.value}-show-search`]:!0,[`${c.value}-auto-complete`]:!0};if(e.options===void 0){const _=((d=n.dataSource)===null||d===void 0?void 0:d.call(n))||((f=n.options)===null||f===void 0?void 0:f.call(n))||[];_.length&&Hpe(_[0])?y=_:y=m?m.map(w=>{if(Jn(w))return w;switch(typeof w){case"string":return g(dd,{key:w,value:w},{default:()=>[w]});case"object":return g(dd,{key:w.value,value:w.value},{default:()=>[w.text]});default:throw new Error("AutoComplete[dataSource] only supports type `string[] | Object[]`.")}}):[]}const x=_t(S(S(S({},e),o),{mode:Cl.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:a,notFoundContent:v,class:$,popupClassName:e.popupClassName||e.dropdownClassName,ref:i}),["dataSource","loading"]);return g(Cl,x,V({default:()=>[y]},_t(n,["default","dataSource","options"])))}}}),Vpe=S(cC,{Option:dd,OptGroup:pm,install(e){return e.component(cC.name,cC),e.component(dd.displayName,dd),e.component(pm.displayName,pm),e}});var Kpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};const Upe=Kpe;function lM(e){for(var t=1;t({backgroundColor:e,border:`${o.lineWidth}px ${o.lineType} ${t}`,[`${r}-icon`]:{color:n}}),fhe=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:o,marginSM:r,fontSize:i,fontSizeLG:a,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:c,alertIconSizeLG:u,colorText:d,paddingContentVerticalSM:f,alertPaddingHorizontal:h,paddingMD:m,paddingContentHorizontalLG:v}=e;return{[t]:S(S({},vt(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${h}px`,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:o,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:l},"&-message":{color:d},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, + padding-top ${n} ${c}, padding-bottom ${n} ${c}, + margin-bottom ${n} ${c}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",paddingInline:v,paddingBlock:m,[`${t}-icon`]:{marginInlineEnd:r,fontSize:u,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:o,color:d,fontSize:a},[`${t}-description`]:{display:"block"}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},phe=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:o,colorSuccessBg:r,colorWarning:i,colorWarningBorder:a,colorWarningBg:l,colorError:s,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:h}=e;return{[t]:{"&-success":Ov(r,o,n,e,t),"&-info":Ov(h,f,d,e,t),"&-warning":Ov(l,a,i,e,t),"&-error":S(S({},Ov(u,c,s,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},hhe=e=>{const{componentCls:t,iconCls:n,motionDurationMid:o,marginXS:r,fontSizeIcon:i,colorIcon:a,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:r},[`${t}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:i,lineHeight:`${i}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${o}`,"&:hover":{color:l}}},"&-close-text":{color:a,transition:`color ${o}`,"&:hover":{color:l}}}}},ghe=e=>[fhe(e),phe(e),hhe(e)],vhe=pt("Alert",e=>{const{fontSizeHeading3:t}=e,n=nt(e,{alertIconSizeLG:t,alertPaddingHorizontal:12});return[ghe(n)]}),mhe={success:Tl,info:df,error:Kr,warning:El},bhe={success:m9,info:y9,error:S9,warning:b9},yhe=Go("success","info","warning","error"),She=()=>({type:Z.oneOf(yhe),closable:{type:Boolean,default:void 0},closeText:Z.any,message:Z.any,description:Z.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:Z.any,closeIcon:Z.any,onClose:Function}),Che=pe({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:She(),setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;const{prefixCls:a,direction:l}=Ve("alert",e),[s,c]=vhe(a),u=ve(!1),d=ve(!1),f=ve(),h=b=>{b.preventDefault();const $=f.value;$.style.height=`${$.offsetHeight}px`,$.style.height=`${$.offsetHeight}px`,u.value=!0,o("close",b)},m=()=>{var b;u.value=!1,d.value=!0,(b=e.afterClose)===null||b===void 0||b.call(e)},v=M(()=>{const{type:b}=e;return b!==void 0?b:e.banner?"warning":"info"});i({animationEnd:m});const y=ve({});return()=>{var b,$,x,_,w,I,O,P,E,R;const{banner:A,closeIcon:N=(b=n.closeIcon)===null||b===void 0?void 0:b.call(n)}=e;let{closable:F,showIcon:W}=e;const D=($=e.closeText)!==null&&$!==void 0?$:(x=n.closeText)===null||x===void 0?void 0:x.call(n),B=(_=e.description)!==null&&_!==void 0?_:(w=n.description)===null||w===void 0?void 0:w.call(n),k=(I=e.message)!==null&&I!==void 0?I:(O=n.message)===null||O===void 0?void 0:O.call(n),L=(P=e.icon)!==null&&P!==void 0?P:(E=n.icon)===null||E===void 0?void 0:E.call(n),z=(R=n.action)===null||R===void 0?void 0:R.call(n);W=A&&W===void 0?!0:W;const K=(B?bhe:mhe)[v.value]||null;D&&(F=!0);const G=a.value,Y=me(G,{[`${G}-${v.value}`]:!0,[`${G}-closing`]:u.value,[`${G}-with-description`]:!!B,[`${G}-no-icon`]:!W,[`${G}-banner`]:!!A,[`${G}-closable`]:F,[`${G}-rtl`]:l.value==="rtl",[c.value]:!0}),ne=F?g("button",{type:"button",onClick:h,class:`${G}-close-icon`,tabindex:0},[D?g("span",{class:`${G}-close-text`},[D]):N===void 0?g(Vr,null,null):N]):null,re=L&&(Jn(L)?Gt(L,{class:`${G}-icon`}):g("span",{class:`${G}-icon`},[L]))||g(K,{class:`${G}-icon`},null),J=Hi(`${G}-motion`,{appear:!1,css:!0,onAfterLeave:m,onBeforeLeave:te=>{te.style.maxHeight=`${te.offsetHeight}px`},onLeave:te=>{te.style.maxHeight="0px"}});return s(d.value?null:g(so,J,{default:()=>[Ln(g("div",V(V({role:"alert"},r),{},{style:[r.style,y.value],class:[r.class,Y],"data-show":!u.value,ref:f}),[W?re:null,g("div",{class:`${G}-content`},[k?g("div",{class:`${G}-message`},[k]):null,B?g("div",{class:`${G}-description`},[B]):null]),z?g("div",{class:`${G}-action`},[z]):null,ne]),[[Bo,!u.value]])]}))}}}),$he=$n(Che),pl=["xxxl","xxl","xl","lg","md","sm","xs"],xhe=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`{min-width: ${e.screenXXXL}px}`});function j_(){const[,e]=Ol();return M(()=>{const t=xhe(e.value),n=new Map;let o=-1,r={};return{matchHandlers:{},dispatch(i){return r=i,n.forEach(a=>a(r)),n.size>=1},subscribe(i){return n.size||this.register(),o+=1,n.set(o,i),i(r),o},unsubscribe(i){n.delete(i),n.size||this.unregister()},unregister(){Object.keys(t).forEach(i=>{const a=t[i],l=this.matchHandlers[a];l==null||l.mql.removeListener(l==null?void 0:l.listener)}),n.clear()},register(){Object.keys(t).forEach(i=>{const a=t[i],l=c=>{let{matches:u}=c;this.dispatch(S(S({},r),{[i]:u}))},s=window.matchMedia(a);s.addListener(l),this.matchHandlers[a]={mql:s,listener:l},l(s)})},responsiveMap:t}})}function ff(){const e=ve({});let t=null;const n=j_();return lt(()=>{t=n.value.subscribe(o=>{e.value=o})}),Fo(()=>{n.value.unsubscribe(t)}),e}function ai(e){const t=ve();return ct(()=>{t.value=e()},{flush:"sync"}),t}const whe=e=>{const{antCls:t,componentCls:n,iconCls:o,avatarBg:r,avatarColor:i,containerSize:a,containerSizeLG:l,containerSizeSM:s,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,borderRadius:f,borderRadiusLG:h,borderRadiusSM:m,lineWidth:v,lineType:y}=e,b=($,x,_)=>({width:$,height:$,lineHeight:`${$-v*2}px`,borderRadius:"50%",[`&${n}-square`]:{borderRadius:_},[`${n}-string`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transformOrigin:"0 center"},[`&${n}-icon`]:{fontSize:x,[`> ${o}`]:{margin:0}}});return{[n]:S(S(S(S({},vt(e)),{position:"relative",display:"inline-block",overflow:"hidden",color:i,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:r,border:`${v}px ${y} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"}}),b(a,c,f)),{"&-lg":S({},b(l,u,h)),"&-sm":S({},b(s,d,m)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},_he=e=>{const{componentCls:t,groupBorderColor:n,groupOverlapping:o,groupSpace:r}=e;return{[`${t}-group`]:{display:"inline-flex",[`${t}`]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:o}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:r}}}},C9=pt("Avatar",e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,o=nt(e,{avatarBg:n,avatarColor:t});return[whe(o),_he(o)]},e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:o,fontSize:r,fontSizeLG:i,fontSizeXL:a,fontSizeHeading3:l,marginXS:s,marginXXS:c,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:o,textFontSize:Math.round((i+a)/2),textFontSizeLG:l,textFontSizeSM:r,groupSpace:c,groupOverlapping:-s,groupBorderColor:u}}),$9=Symbol("AvatarContextKey"),Ohe=()=>it($9,{}),Ihe=e=>ft($9,e),Phe=()=>({prefixCls:String,shape:{type:String,default:"circle"},size:{type:[Number,String,Object],default:()=>"default"},src:String,srcset:String,icon:Z.any,alt:String,gap:Number,draggable:{type:Boolean,default:void 0},crossOrigin:String,loadError:{type:Function}}),The=pe({compatConfig:{MODE:3},name:"AAvatar",inheritAttrs:!1,props:Phe(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const r=ve(!0),i=ve(!1),a=ve(1),l=ve(null),s=ve(null),{prefixCls:c}=Ve("avatar",e),[u,d]=C9(c),f=Ohe(),h=M(()=>e.size==="default"?f.size:e.size),m=ff(),v=ai(()=>{if(typeof e.size!="object")return;const x=pl.find(w=>m.value[w]);return e.size[x]}),y=x=>v.value?{width:`${v.value}px`,height:`${v.value}px`,lineHeight:`${v.value}px`,fontSize:`${x?v.value/2:18}px`}:{},b=()=>{if(!l.value||!s.value)return;const x=l.value.offsetWidth,_=s.value.offsetWidth;if(x!==0&&_!==0){const{gap:w=4}=e;w*2<_&&(a.value=_-w*2{const{loadError:x}=e;(x==null?void 0:x())!==!1&&(r.value=!1)};return Ie(()=>e.src,()=>{wt(()=>{r.value=!0,a.value=1})}),Ie(()=>e.gap,()=>{wt(()=>{b()})}),lt(()=>{wt(()=>{b(),i.value=!0})}),()=>{var x,_;const{shape:w,src:I,alt:O,srcset:P,draggable:E,crossOrigin:R}=e,A=(x=f.shape)!==null&&x!==void 0?x:w,N=lo(n,e,"icon"),F=c.value,W={[`${o.class}`]:!!o.class,[F]:!0,[`${F}-lg`]:h.value==="large",[`${F}-sm`]:h.value==="small",[`${F}-${A}`]:!0,[`${F}-image`]:I&&r.value,[`${F}-icon`]:N,[d.value]:!0},D=typeof h.value=="number"?{width:`${h.value}px`,height:`${h.value}px`,lineHeight:`${h.value}px`,fontSize:N?`${h.value/2}px`:"18px"}:{},B=(_=n.default)===null||_===void 0?void 0:_.call(n);let k;if(I&&r.value)k=g("img",{draggable:E,src:I,srcset:P,onError:$,alt:O,crossorigin:R},null);else if(N)k=N;else if(i.value||a.value!==1){const L=`scale(${a.value}) translateX(-50%)`,z={msTransform:L,WebkitTransform:L,transform:L},K=typeof h.value=="number"?{lineHeight:`${h.value}px`}:{};k=g(ki,{onResize:b},{default:()=>[g("span",{class:`${F}-string`,ref:l,style:S(S({},K),z)},[B])]})}else k=g("span",{class:`${F}-string`,ref:l,style:{opacity:0}},[B]);return u(g("span",V(V({},o),{},{ref:s,class:W,style:[D,y(!!N),o.style]}),[k]))}}}),wc=The,wi={adjustX:1,adjustY:1},_i=[0,0],x9={left:{points:["cr","cl"],overflow:wi,offset:[-4,0],targetOffset:_i},right:{points:["cl","cr"],overflow:wi,offset:[4,0],targetOffset:_i},top:{points:["bc","tc"],overflow:wi,offset:[0,-4],targetOffset:_i},bottom:{points:["tc","bc"],overflow:wi,offset:[0,4],targetOffset:_i},topLeft:{points:["bl","tl"],overflow:wi,offset:[0,-4],targetOffset:_i},leftTop:{points:["tr","tl"],overflow:wi,offset:[-4,0],targetOffset:_i},topRight:{points:["br","tr"],overflow:wi,offset:[0,-4],targetOffset:_i},rightTop:{points:["tl","tr"],overflow:wi,offset:[4,0],targetOffset:_i},bottomRight:{points:["tr","br"],overflow:wi,offset:[0,4],targetOffset:_i},rightBottom:{points:["bl","br"],overflow:wi,offset:[4,0],targetOffset:_i},bottomLeft:{points:["tl","bl"],overflow:wi,offset:[0,4],targetOffset:_i},leftBottom:{points:["br","bl"],overflow:wi,offset:[-4,0],targetOffset:_i}},Ehe={prefixCls:String,id:String,overlayInnerStyle:Z.any},Ahe=pe({compatConfig:{MODE:3},name:"TooltipContent",props:Ehe,setup(e,t){let{slots:n}=t;return()=>{var o;return g("div",{class:`${e.prefixCls}-inner`,id:e.id,role:"tooltip",style:e.overlayInnerStyle},[(o=n.overlay)===null||o===void 0?void 0:o.call(n)])}}});var Mhe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:Z.string.def("rc-tooltip"),mouseEnterDelay:Z.number.def(.1),mouseLeaveDelay:Z.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:Z.object.def(()=>({})),arrowContent:Z.any.def(null),tipId:String,builtinPlacements:Z.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function},setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=ve(),a=()=>{const{prefixCls:u,tipId:d,overlayInnerStyle:f}=e;return[g("div",{class:`${u}-arrow`,key:"arrow"},[lo(n,e,"arrowContent")]),g(Ahe,{key:"content",prefixCls:u,id:d,overlayInnerStyle:f},{overlay:n.overlay})]};r({getPopupDomNode:()=>i.value.getPopupDomNode(),triggerDOM:i,forcePopupAlign:()=>{var u;return(u=i.value)===null||u===void 0?void 0:u.forcePopupAlign()}});const s=ve(!1),c=ve(!1);return ct(()=>{const{destroyTooltipOnHide:u}=e;if(typeof u=="boolean")s.value=u;else if(u&&typeof u=="object"){const{keepParent:d}=u;s.value=d===!0,c.value=d===!1}}),()=>{const{overlayClassName:u,trigger:d,mouseEnterDelay:f,mouseLeaveDelay:h,overlayStyle:m,prefixCls:v,afterVisibleChange:y,transitionName:b,animation:$,placement:x,align:_,destroyTooltipOnHide:w,defaultVisible:I}=e,O=Mhe(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),P=S({},O);e.visible!==void 0&&(P.popupVisible=e.visible);const E=S(S(S({popupClassName:u,prefixCls:v,action:d,builtinPlacements:x9,popupPlacement:x,popupAlign:_,afterPopupVisibleChange:y,popupTransitionName:b,popupAnimation:$,defaultPopupVisible:I,destroyPopupOnHide:s.value,autoDestroy:c.value,mouseLeaveDelay:h,popupStyle:m,mouseEnterDelay:f},P),o),{onPopupVisibleChange:e.onVisibleChange||hM,onPopupAlign:e.onPopupAlign||hM,ref:i,popup:a()});return g(tu,E,{default:n.default})}}}),W_=()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:qe(),overlayInnerStyle:qe(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:qe(),builtinPlacements:qe(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}),Dhe={adjustX:1,adjustY:1},gM={adjustX:0,adjustY:0},Lhe=[0,0];function vM(e){return typeof e=="boolean"?e?Dhe:gM:S(S({},gM),e)}function V_(e){const{arrowWidth:t=4,horizontalArrowShift:n=16,verticalArrowShift:o=8,autoAdjustOverflow:r,arrowPointAtCenter:i}=e,a={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(n+t),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(o+t)]},topRight:{points:["br","tc"],offset:[n+t,-4]},rightTop:{points:["tl","cr"],offset:[4,-(o+t)]},bottomRight:{points:["tr","bc"],offset:[n+t,4]},rightBottom:{points:["bl","cr"],offset:[4,o+t]},bottomLeft:{points:["tl","bc"],offset:[-(n+t),4]},leftBottom:{points:["br","cl"],offset:[-4,o+t]}};return Object.keys(a).forEach(l=>{a[l]=i?S(S({},a[l]),{overflow:vM(r),targetOffset:Lhe}):S(S({},x9[l]),{overflow:vM(r)}),a[l].ignoreShake=!0}),a}function x0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(let t=0,n=e.length;t`${e}-inverse`),khe=["success","processing","error","default","warning"];function Cy(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[...Nhe,...ih].includes(e):ih.includes(e)}function Bhe(e){return khe.includes(e)}function Fhe(e,t){const n=Cy(t),o=me({[`${e}-${t}`]:t&&n}),r={},i={};return t&&!n&&(r.background=t,i["--antd-arrow-background-color"]=t),{className:o,overlayStyle:r,arrowStyle:i}}function Iv(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return e.map(n=>`${t}${n}`).join(",")}const K_=8;function w9(e){const t=K_,{sizePopupArrow:n,contentRadius:o,borderRadiusOuter:r,limitVerticalRadius:i}=e,a=n/2-Math.ceil(r*(Math.sqrt(2)-1)),l=(o>12?o+2:12)-a,s=i?t-a:l;return{dropdownArrowOffset:l,dropdownArrowOffsetVertical:s}}function U_(e,t){const{componentCls:n,sizePopupArrow:o,marginXXS:r,borderRadiusXS:i,borderRadiusOuter:a,boxShadowPopoverArrow:l}=e,{colorBg:s,showArrowCls:c,contentRadius:u=e.borderRadiusLG,limitVerticalRadius:d}=t,{dropdownArrowOffsetVertical:f,dropdownArrowOffset:h}=w9({sizePopupArrow:o,contentRadius:u,borderRadiusOuter:a,limitVerticalRadius:d}),m=o/2+r;return{[n]:{[`${n}-arrow`]:[S(S({position:"absolute",zIndex:1,display:"block"},L2(o,i,a,s,l)),{"&:before":{background:s}})],[[`&-placement-top ${n}-arrow`,`&-placement-topLeft ${n}-arrow`,`&-placement-topRight ${n}-arrow`].join(",")]:{bottom:0,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:h}},[`&-placement-topRight ${n}-arrow`]:{right:{_skip_check_:!0,value:h}},[[`&-placement-bottom ${n}-arrow`,`&-placement-bottomLeft ${n}-arrow`,`&-placement-bottomRight ${n}-arrow`].join(",")]:{top:0,transform:"translateY(-100%)"},[`&-placement-bottom ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:h}},[`&-placement-bottomRight ${n}-arrow`]:{right:{_skip_check_:!0,value:h}},[[`&-placement-left ${n}-arrow`,`&-placement-leftTop ${n}-arrow`,`&-placement-leftBottom ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:0},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${n}-arrow`]:{top:f},[`&-placement-leftBottom ${n}-arrow`]:{bottom:f},[[`&-placement-right ${n}-arrow`,`&-placement-rightTop ${n}-arrow`,`&-placement-rightBottom ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:0},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${n}-arrow`]:{top:f},[`&-placement-rightBottom ${n}-arrow`]:{bottom:f},[Iv(["&-placement-topLeft","&-placement-top","&-placement-topRight"],c)]:{paddingBottom:m},[Iv(["&-placement-bottomLeft","&-placement-bottom","&-placement-bottomRight"],c)]:{paddingTop:m},[Iv(["&-placement-leftTop","&-placement-left","&-placement-leftBottom"],c)]:{paddingRight:{_skip_check_:!0,value:m}},[Iv(["&-placement-rightTop","&-placement-right","&-placement-rightBottom"],c)]:{paddingLeft:{_skip_check_:!0,value:m}}}}}const Hhe=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:r,tooltipBorderRadius:i,zIndexPopup:a,controlHeight:l,boxShadowSecondary:s,paddingSM:c,paddingXS:u,tooltipRadiusOuter:d}=e;return[{[t]:S(S(S(S({},vt(e)),{position:"absolute",zIndex:a,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:n,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":r,[`${t}-inner`]:{minWidth:l,minHeight:l,padding:`${c/2}px ${u}px`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:r,borderRadius:i,boxShadow:s},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(i,K_)}},[`${t}-content`]:{position:"relative"}}),c0(e,(f,h)=>{let{darkColor:m}=h;return{[`&${t}-${f}`]:{[`${t}-inner`]:{backgroundColor:m},[`${t}-arrow`]:{"--antd-arrow-background-color":m}}}})),{"&-rtl":{direction:"rtl"}})},U_(nt(e,{borderRadiusOuter:d}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:i,limitVerticalRadius:!0}),{[`${t}-pure`]:{position:"relative",maxWidth:"none"}}]},zhe=(e,t)=>pt("Tooltip",o=>{if((t==null?void 0:t.value)===!1)return[];const{borderRadius:r,colorTextLightSolid:i,colorBgDefault:a,borderRadiusOuter:l}=o,s=nt(o,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:r,tooltipBg:a,tooltipRadiusOuter:l>4?4:l});return[Hhe(s),cf(o,"zoom-big-fast")]},o=>{let{zIndexPopupBase:r,colorBgSpotlight:i}=o;return{zIndexPopup:r+70,colorBgDefault:i}})(e),jhe=(e,t)=>{const n={},o=S({},e);return t.forEach(r=>{e&&r in e&&(n[r]=e[r],delete o[r])}),{picked:n,omitted:o}},_9=()=>S(S({},W_()),{title:Z.any}),O9=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),Whe=pe({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:bt(_9(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;const{prefixCls:a,getPopupContainer:l,direction:s,rootPrefixCls:c}=Ve("tooltip",e),u=M(()=>{var R;return(R=e.open)!==null&&R!==void 0?R:e.visible}),d=he(x0([e.open,e.visible])),f=he();let h;Ie(u,R=>{mt.cancel(h),h=mt(()=>{d.value=!!R})});const m=()=>{var R;const A=(R=e.title)!==null&&R!==void 0?R:n.title;return!A&&A!==0},v=R=>{const A=m();u.value===void 0&&(d.value=A?!1:R),A||(o("update:visible",R),o("visibleChange",R),o("update:open",R),o("openChange",R))};i({getPopupDomNode:()=>f.value.getPopupDomNode(),open:d,forcePopupAlign:()=>{var R;return(R=f.value)===null||R===void 0?void 0:R.forcePopupAlign()}});const b=M(()=>{const{builtinPlacements:R,arrowPointAtCenter:A,autoAdjustOverflow:N}=e;return R||V_({arrowPointAtCenter:A,autoAdjustOverflow:N})}),$=R=>R||R==="",x=R=>{const A=R.type;if(typeof A=="object"&&R.props&&((A.__ANT_BUTTON===!0||A==="button")&&$(R.props.disabled)||A.__ANT_SWITCH===!0&&($(R.props.disabled)||$(R.props.loading))||A.__ANT_RADIO===!0&&$(R.props.disabled))){const{picked:N,omitted:F}=jhe(HN(R),["position","left","right","top","bottom","float","display","zIndex"]),W=S(S({display:"inline-block"},N),{cursor:"not-allowed",lineHeight:1,width:R.props&&R.props.block?"100%":void 0}),D=S(S({},F),{pointerEvents:"none"}),B=Gt(R,{style:D},!0);return g("span",{style:W,class:`${a.value}-disabled-compatible-wrapper`},[B])}return R},_=()=>{var R,A;return(R=e.title)!==null&&R!==void 0?R:(A=n.title)===null||A===void 0?void 0:A.call(n)},w=(R,A)=>{const N=b.value,F=Object.keys(N).find(W=>{var D,B;return N[W].points[0]===((D=A.points)===null||D===void 0?void 0:D[0])&&N[W].points[1]===((B=A.points)===null||B===void 0?void 0:B[1])});if(F){const W=R.getBoundingClientRect(),D={top:"50%",left:"50%"};F.indexOf("top")>=0||F.indexOf("Bottom")>=0?D.top=`${W.height-A.offset[1]}px`:(F.indexOf("Top")>=0||F.indexOf("bottom")>=0)&&(D.top=`${-A.offset[1]}px`),F.indexOf("left")>=0||F.indexOf("Right")>=0?D.left=`${W.width-A.offset[0]}px`:(F.indexOf("right")>=0||F.indexOf("Left")>=0)&&(D.left=`${-A.offset[0]}px`),R.style.transformOrigin=`${D.left} ${D.top}`}},I=M(()=>Fhe(a.value,e.color)),O=M(()=>r["data-popover-inject"]),[P,E]=zhe(a,M(()=>!O.value));return()=>{var R,A;const{openClassName:N,overlayClassName:F,overlayStyle:W,overlayInnerStyle:D}=e;let B=(A=_n((R=n.default)===null||R===void 0?void 0:R.call(n)))!==null&&A!==void 0?A:null;B=B.length===1?B[0]:B;let k=d.value;if(u.value===void 0&&m()&&(k=!1),!B)return null;const L=x(Jn(B)&&!Vee(B)?B:g("span",null,[B])),z=me({[N||`${a.value}-open`]:!0,[L.props&&L.props.class]:L.props&&L.props.class}),K=me(F,{[`${a.value}-rtl`]:s.value==="rtl"},I.value.className,E.value),G=S(S({},I.value.overlayStyle),D),Y=I.value.arrowStyle,ne=S(S(S({},r),e),{prefixCls:a.value,getPopupContainer:l==null?void 0:l.value,builtinPlacements:b.value,visible:k,ref:f,overlayClassName:K,overlayStyle:S(S({},Y),W),overlayInnerStyle:G,onVisibleChange:v,onPopupAlign:w,transitionName:dr(c.value,"zoom-big-fast",e.transitionName)});return P(g(Rhe,ne,{default:()=>[d.value?Gt(L,{class:z}):L],arrowContent:()=>g("span",{class:`${a.value}-arrow-content`},null),overlay:_}))}}}),Br=$n(Whe),Vhe=e=>{const{componentCls:t,popoverBg:n,popoverColor:o,width:r,fontWeightStrong:i,popoverPadding:a,boxShadowSecondary:l,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:u,marginXS:d,colorBgElevated:f}=e;return[{[t]:S(S({},vt(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":f,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:n,backgroundClip:"padding-box",borderRadius:c,boxShadow:l,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:d,color:s,fontWeight:i},[`${t}-inner-content`]:{color:o}})},U_(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",[`${t}-content`]:{display:"inline-block"}}}]},Khe=e=>{const{componentCls:t}=e;return{[t]:ih.map(n=>{const o=e[`${n}-6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}})}},Uhe=e=>{const{componentCls:t,lineWidth:n,lineType:o,colorSplit:r,paddingSM:i,controlHeight:a,fontSize:l,lineHeight:s,padding:c}=e,u=a-Math.round(l*s),d=u/2,f=u/2-n,h=c;return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${d}px ${h}px ${f}px`,borderBottom:`${n}px ${o} ${r}`},[`${t}-inner-content`]:{padding:`${i}px ${h}px`}}}},Ghe=pt("Popover",e=>{const{colorBgElevated:t,colorText:n,wireframe:o}=e,r=nt(e,{popoverBg:t,popoverColor:n,popoverPadding:12});return[Vhe(r),Khe(r),o&&Uhe(r),cf(r,"zoom-big")]},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+30,width:177}}),Yhe=()=>S(S({},W_()),{content:cn(),title:cn()}),Xhe=pe({compatConfig:{MODE:3},name:"APopover",inheritAttrs:!1,props:bt(Yhe(),S(S({},O9()),{trigger:"hover",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup(e,t){let{expose:n,slots:o,attrs:r}=t;const i=he();Sn(e.visible===void 0),n({getPopupDomNode:()=>{var f,h;return(h=(f=i.value)===null||f===void 0?void 0:f.getPopupDomNode)===null||h===void 0?void 0:h.call(f)}});const{prefixCls:a,configProvider:l}=Ve("popover",e),[s,c]=Ghe(a),u=M(()=>l.getPrefixCls()),d=()=>{var f,h;const{title:m=_n((f=o.title)===null||f===void 0?void 0:f.call(o)),content:v=_n((h=o.content)===null||h===void 0?void 0:h.call(o))}=e,y=!!(Array.isArray(m)?m.length:m),b=!!(Array.isArray(v)?v.length:m);return!y&&!b?null:g(Je,null,[y&&g("div",{class:`${a.value}-title`},[m]),g("div",{class:`${a.value}-inner-content`},[v])])};return()=>{const f=me(e.overlayClassName,c.value);return s(g(Br,V(V(V({},_t(e,["title","content"])),r),{},{prefixCls:a.value,ref:i,overlayClassName:f,transitionName:dr(u.value,"zoom-big",e.transitionName),"data-popover-inject":!0}),{title:d,default:o.default}))}}}),G_=$n(Xhe),qhe=()=>({prefixCls:String,maxCount:Number,maxStyle:{type:Object,default:void 0},maxPopoverPlacement:{type:String,default:"top"},maxPopoverTrigger:String,size:{type:[Number,String,Object],default:"default"},shape:{type:String,default:"circle"}}),Zhe=pe({compatConfig:{MODE:3},name:"AAvatarGroup",inheritAttrs:!1,props:qhe(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("avatar",e),a=M(()=>`${r.value}-group`),[l,s]=C9(r);return ct(()=>{const c={size:e.size,shape:e.shape};Ihe(c)}),()=>{const{maxPopoverPlacement:c="top",maxCount:u,maxStyle:d,maxPopoverTrigger:f="hover",shape:h}=e,m={[a.value]:!0,[`${a.value}-rtl`]:i.value==="rtl",[`${o.class}`]:!!o.class,[s.value]:!0},v=lo(n,e),y=ln(v).map(($,x)=>Gt($,{key:`avatar-key-${x}`})),b=y.length;if(u&&u[g(wc,{style:d,shape:h},{default:()=>[`+${b-u}`]})]})),l(g("div",V(V({},o),{},{class:m,style:o.style}),[$]))}return l(g("div",V(V({},o),{},{class:m,style:o.style}),[y]))}}}),w0=Zhe;wc.Group=w0;wc.install=function(e){return e.component(wc.name,wc),e.component(w0.name,w0),e};function mM(e){let{prefixCls:t,value:n,current:o,offset:r=0}=e,i;return r&&(i={position:"absolute",top:`${r}00%`,left:0}),g("p",{style:i,class:me(`${t}-only-unit`,{current:o})},[n])}function Qhe(e,t,n){let o=e,r=0;for(;(o+10)%10!==t;)o+=n,r+=n;return r}const Jhe=pe({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(e){const t=M(()=>Number(e.value)),n=M(()=>Math.abs(e.count)),o=St({prevValue:t.value,prevCount:n.value}),r=()=>{o.prevValue=t.value,o.prevCount=n.value},i=he();return Ie(t,()=>{clearTimeout(i.value),i.value=setTimeout(()=>{r()},1e3)},{flush:"post"}),Fo(()=>{clearTimeout(i.value)}),()=>{let a,l={};const s=t.value;if(o.prevValue===s||Number.isNaN(s)||Number.isNaN(o.prevValue))a=[mM(S(S({},e),{current:!0}))],l={transition:"none"};else{a=[];const c=s+10,u=[];for(let h=s;h<=c;h+=1)u.push(h);const d=u.findIndex(h=>h%10===o.prevValue);a=u.map((h,m)=>{const v=h%10;return mM(S(S({},e),{value:v,offset:m-d,current:m===d}))});const f=o.prevCountr()},[a])}}});var ege=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var i;const a=S(S({},e),n),{prefixCls:l,count:s,title:c,show:u,component:d="sup",class:f,style:h}=a,m=ege(a,["prefixCls","count","title","show","component","class","style"]),v=S(S({},m),{style:h,"data-show":e.show,class:me(r.value,f),title:c});let y=s;if(s&&Number(s)%1===0){const $=String(s).split("");y=$.map((x,_)=>g(Jhe,{prefixCls:r.value,count:Number(s),value:x,key:$.length-_},null))}h&&h.borderColor&&(v.style=S(S({},h),{boxShadow:`0 0 0 1px ${h.borderColor} inset`}));const b=_n((i=o.default)===null||i===void 0?void 0:i.call(o));return b&&b.length?Gt(b,{class:me(`${r.value}-custom-component`)},!1):g(d,v,{default:()=>[y]})}}}),oge=new Pt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),rge=new Pt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),ige=new Pt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),age=new Pt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),lge=new Pt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),sge=new Pt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),cge=e=>{const{componentCls:t,iconCls:n,antCls:o,badgeFontHeight:r,badgeShadowSize:i,badgeHeightSm:a,motionDurationSlow:l,badgeStatusSize:s,marginXS:c,badgeRibbonOffset:u}=e,d=`${o}-scroll-number`,f=`${o}-ribbon`,h=`${o}-ribbon-wrapper`,m=c0(e,(y,b)=>{let{darkColor:$}=b;return{[`&${t} ${t}-color-${y}`]:{background:$,[`&:not(${t}-count)`]:{color:$}}}}),v=c0(e,(y,b)=>{let{darkColor:$}=b;return{[`&${f}-color-${y}`]:{background:$,color:$}}});return{[t]:S(S(S(S({},vt(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{zIndex:e.badgeZIndex,minWidth:e.badgeHeight,height:e.badgeHeight,color:e.badgeTextColor,fontWeight:e.badgeFontWeight,fontSize:e.badgeFontSize,lineHeight:`${e.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:e.badgeHeight/2,boxShadow:`0 0 0 ${i}px ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:a,height:a,fontSize:e.badgeFontSizeSm,lineHeight:`${a}px`,borderRadius:a/2},[`${t}-multiple-words`]:{padding:`0 ${e.paddingXS}px`},[`${t}-dot`]:{zIndex:e.badgeZIndex,width:e.badgeDotSize,minWidth:e.badgeDotSize,height:e.badgeDotSize,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${i}px ${e.badgeShadowColor}`},[`${t}-dot${d}`]:{transition:`background ${l}`},[`${t}-count, ${t}-dot, ${d}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:sge,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:i,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:oge,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:c,color:e.colorText,fontSize:e.fontSize}}}),m),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:rge,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:ige,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:age,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:lge,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${d}-custom-component, ${t}-count`]:{transform:"none"},[`${d}-custom-component, ${d}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${d}`]:{overflow:"hidden",[`${d}-only`]:{position:"relative",display:"inline-block",height:e.badgeHeight,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${d}-only-unit`]:{height:e.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${d}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${d}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${h}`]:{position:"relative"},[`${f}`]:S(S(S(S({},vt(e)),{position:"absolute",top:c,padding:`0 ${e.paddingXS}px`,color:e.colorPrimary,lineHeight:`${r}px`,whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${f}-text`]:{color:e.colorTextLightSolid},[`${f}-corner`]:{position:"absolute",top:"100%",width:u,height:u,color:"currentcolor",border:`${u/2}px solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),v),{[`&${f}-placement-end`]:{insetInlineEnd:-u,borderEndEndRadius:0,[`${f}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${f}-placement-start`]:{insetInlineStart:-u,borderEndStartRadius:0,[`${f}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},I9=pt("Badge",e=>{const{fontSize:t,lineHeight:n,fontSizeSM:o,lineWidth:r,marginXS:i,colorBorderBg:a}=e,l=Math.round(t*n),s=r,c="auto",u=l-2*s,d=e.colorBgContainer,f="normal",h=o,m=e.colorError,v=e.colorErrorHover,y=t,b=o/2,$=o,x=o/2,_=nt(e,{badgeFontHeight:l,badgeShadowSize:s,badgeZIndex:c,badgeHeight:u,badgeTextColor:d,badgeFontWeight:f,badgeFontSize:h,badgeColor:m,badgeColorHover:v,badgeShadowColor:a,badgeHeightSm:y,badgeDotSize:b,badgeFontSizeSm:$,badgeStatusSize:x,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[cge(_)]});var uge=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefix:String,color:{type:String},text:Z.any,placement:{type:String,default:"end"}}),_0=pe({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:dge(),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,direction:i}=Ve("ribbon",e),[a,l]=I9(r),s=M(()=>Cy(e.color,!1)),c=M(()=>[r.value,`${r.value}-placement-${e.placement}`,{[`${r.value}-rtl`]:i.value==="rtl",[`${r.value}-color-${e.color}`]:s.value}]);return()=>{var u,d;const{class:f,style:h}=n,m=uge(n,["class","style"]),v={},y={};return e.color&&!s.value&&(v.background=e.color,y.color=e.color),a(g("div",V({class:`${r.value}-wrapper ${l.value}`},m),[(u=o.default)===null||u===void 0?void 0:u.call(o),g("div",{class:[c.value,f,l.value],style:S(S({},v),h)},[g("span",{class:`${r.value}-text`},[e.text||((d=o.text)===null||d===void 0?void 0:d.call(o))]),g("div",{class:`${r.value}-corner`,style:y},null)])]))}}}),O0=e=>!isNaN(parseFloat(e))&&isFinite(e),fge=()=>({count:Z.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:Z.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),xp=pe({compatConfig:{MODE:3},name:"ABadge",Ribbon:_0,inheritAttrs:!1,props:fge(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("badge",e),[a,l]=I9(r),s=M(()=>e.count>e.overflowCount?`${e.overflowCount}+`:e.count),c=M(()=>s.value==="0"||s.value===0),u=M(()=>e.count===null||c.value&&!e.showZero),d=M(()=>(e.status!==null&&e.status!==void 0||e.color!==null&&e.color!==void 0)&&u.value),f=M(()=>e.dot&&!c.value),h=M(()=>f.value?"":s.value),m=M(()=>(h.value===null||h.value===void 0||h.value===""||c.value&&!e.showZero)&&!f.value),v=he(e.count),y=he(h.value),b=he(f.value);Ie([()=>e.count,h,f],()=>{m.value||(v.value=e.count,y.value=h.value,b.value=f.value)},{immediate:!0});const $=M(()=>Cy(e.color,!1)),x=M(()=>({[`${r.value}-status-dot`]:d.value,[`${r.value}-status-${e.status}`]:!!e.status,[`${r.value}-color-${e.color}`]:$.value})),_=M(()=>e.color&&!$.value?{background:e.color,color:e.color}:{}),w=M(()=>({[`${r.value}-dot`]:b.value,[`${r.value}-count`]:!b.value,[`${r.value}-count-sm`]:e.size==="small",[`${r.value}-multiple-words`]:!b.value&&y.value&&y.value.toString().length>1,[`${r.value}-status-${e.status}`]:!!e.status,[`${r.value}-color-${e.color}`]:$.value}));return()=>{var I,O;const{offset:P,title:E,color:R}=e,A=o.style,N=lo(n,e,"text"),F=r.value,W=v.value;let D=ln((I=n.default)===null||I===void 0?void 0:I.call(n));D=D.length?D:null;const B=!!(!m.value||n.count),k=(()=>{if(!P)return S({},A);const re={marginTop:O0(P[1])?`${P[1]}px`:P[1]};return i.value==="rtl"?re.left=`${parseInt(P[0],10)}px`:re.right=`${-parseInt(P[0],10)}px`,S(S({},re),A)})(),L=E??(typeof W=="string"||typeof W=="number"?W:void 0),z=B||!N?null:g("span",{class:`${F}-status-text`},[N]),K=typeof W=="object"||W===void 0&&n.count?Gt(W??((O=n.count)===null||O===void 0?void 0:O.call(n)),{style:k},!1):null,G=me(F,{[`${F}-status`]:d.value,[`${F}-not-a-wrapper`]:!D,[`${F}-rtl`]:i.value==="rtl"},o.class,l.value);if(!D&&d.value){const re=k.color;return a(g("span",V(V({},o),{},{class:G,style:k}),[g("span",{class:x.value,style:_.value},null),g("span",{style:{color:re},class:`${F}-status-text`},[N])]))}const Y=Hi(D?`${F}-zoom`:"",{appear:!1});let ne=S(S({},k),e.numberStyle);return R&&!$.value&&(ne=ne||{},ne.background=R),a(g("span",V(V({},o),{},{class:G}),[D,g(so,Y,{default:()=>[Ln(g(nge,{prefixCls:e.scrollNumberPrefixCls,show:B,class:w.value,count:y.value,title:L,style:ne,key:"scrollNumber"},{default:()=>[K]}),[[Bo,B]])]}),z]))}}});xp.install=function(e){return e.component(xp.name,xp),e.component(_0.name,_0),e};const Eu={adjustX:1,adjustY:1},Au=[0,0],pge={topLeft:{points:["bl","tl"],overflow:Eu,offset:[0,-4],targetOffset:Au},topCenter:{points:["bc","tc"],overflow:Eu,offset:[0,-4],targetOffset:Au},topRight:{points:["br","tr"],overflow:Eu,offset:[0,-4],targetOffset:Au},bottomLeft:{points:["tl","bl"],overflow:Eu,offset:[0,4],targetOffset:Au},bottomCenter:{points:["tc","bc"],overflow:Eu,offset:[0,4],targetOffset:Au},bottomRight:{points:["tr","br"],overflow:Eu,offset:[0,4],targetOffset:Au}},hge=pge;var gge=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.visible,h=>{h!==void 0&&(i.value=h)});const a=he();r({triggerRef:a});const l=h=>{e.visible===void 0&&(i.value=!1),o("overlayClick",h)},s=h=>{e.visible===void 0&&(i.value=h),o("visibleChange",h)},c=()=>{var h;const m=(h=n.overlay)===null||h===void 0?void 0:h.call(n),v={prefixCls:`${e.prefixCls}-menu`,onClick:l};return g(Je,{key:kN},[e.arrow&&g("div",{class:`${e.prefixCls}-arrow`},null),Gt(m,v,!1)])},u=M(()=>{const{minOverlayWidthMatchTrigger:h=!e.alignPoint}=e;return h}),d=()=>{var h;const m=(h=n.default)===null||h===void 0?void 0:h.call(n);return i.value&&m?Gt(m[0],{class:e.openClassName||`${e.prefixCls}-open`},!1):m},f=M(()=>!e.hideAction&&e.trigger.indexOf("contextmenu")!==-1?["click"]:e.hideAction);return()=>{const{prefixCls:h,arrow:m,showAction:v,overlayStyle:y,trigger:b,placement:$,align:x,getPopupContainer:_,transitionName:w,animation:I,overlayClassName:O}=e,P=gge(e,["prefixCls","arrow","showAction","overlayStyle","trigger","placement","align","getPopupContainer","transitionName","animation","overlayClassName"]);return g(tu,V(V({},P),{},{prefixCls:h,ref:a,popupClassName:me(O,{[`${h}-show-arrow`]:m}),popupStyle:y,builtinPlacements:hge,action:b,showAction:v,hideAction:f.value||[],popupPlacement:$,popupAlign:x,popupTransitionName:w,popupAnimation:I,popupVisible:i.value,stretch:u.value?"minWidth":"",onPopupVisibleChange:s,getPopupContainer:_}),{popup:c,default:d})}}}),vge=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},mge=pt("Wave",e=>[vge(e)]);function bge(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}function uC(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&bge(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function yge(e){const{borderTopColor:t,borderColor:n,backgroundColor:o}=getComputedStyle(e);return uC(t)?t:uC(n)?n:uC(o)?o:null}function dC(e){return Number.isNaN(e)?0:e}const Sge=pe({props:{target:qe(),className:String},setup(e){const t=ve(null),[n,o]=nn(null),[r,i]=nn([]),[a,l]=nn(0),[s,c]=nn(0),[u,d]=nn(0),[f,h]=nn(0),[m,v]=nn(!1);function y(){const{target:O}=e,P=getComputedStyle(O);o(yge(O));const E=P.position==="static",{borderLeftWidth:R,borderTopWidth:A}=P;l(E?O.offsetLeft:dC(-parseFloat(R))),c(E?O.offsetTop:dC(-parseFloat(A))),d(O.offsetWidth),h(O.offsetHeight);const{borderTopLeftRadius:N,borderTopRightRadius:F,borderBottomLeftRadius:W,borderBottomRightRadius:D}=P;i([N,F,D,W].map(B=>dC(parseFloat(B))))}let b,$,x;const _=()=>{clearTimeout(x),mt.cancel($),b==null||b.disconnect()},w=()=>{var O;const P=(O=t.value)===null||O===void 0?void 0:O.parentElement;P&&(Ec(null,P),P.parentElement&&P.parentElement.removeChild(P))};lt(()=>{_(),x=setTimeout(()=>{w()},5e3);const{target:O}=e;O&&($=mt(()=>{y(),v(!0)}),typeof ResizeObserver<"u"&&(b=new ResizeObserver(y),b.observe(O)))}),Ct(()=>{_()});const I=O=>{O.propertyName==="opacity"&&w()};return()=>{if(!m.value)return null;const O={left:`${a.value}px`,top:`${s.value}px`,width:`${u.value}px`,height:`${f.value}px`,borderRadius:r.value.map(P=>`${P}px`).join(" ")};return n&&(O["--wave-color"]=n.value),g(so,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[g("div",{ref:t,class:e.className,style:O,onTransitionend:I},null)]})}}});function Cge(e,t){const n=document.createElement("div");n.style.position="absolute",n.style.left="0px",n.style.top="0px",e==null||e.insertBefore(n,e==null?void 0:e.firstChild),Ec(g(Sge,{target:e,className:t},null),n)}function $ge(e,t,n){function o(){var r;const i=Nr(e);!((r=n==null?void 0:n.value)===null||r===void 0)&&r.disabled||!i||Cge(i,t.value)}return o}const Y_=pe({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:n}=t;const o=Nn(),{prefixCls:r,wave:i}=Ve("wave",e),[,a]=mge(r),l=$ge(o,M(()=>me(r.value,a.value)),i);let s;const c=()=>{Nr(o).removeEventListener("click",s,!0)};return lt(()=>{Ie(()=>e.disabled,()=>{c(),wt(()=>{const u=Nr(o);u==null||u.removeEventListener("click",s,!0),!(!u||u.nodeType!==1||e.disabled)&&(s=d=>{d.target.tagName==="INPUT"||!Yb(d.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||l()},u.addEventListener("click",s,!0))})},{immediate:!0,flush:"post"})}),Ct(()=>{c()}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});function I0(e){return e==="danger"?{danger:!0}:{type:e}}const T9=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:Z.any,href:String,target:String,title:String,onClick:Ac(),onMousedown:Ac()}),bM=e=>{e&&(e.style.width="0px",e.style.opacity="0",e.style.transform="scale(0)")},yM=e=>{wt(()=>{e&&(e.style.width=`${e.scrollWidth}px`,e.style.opacity="1",e.style.transform="scale(1)")})},SM=e=>{e&&e.style&&(e.style.width=null,e.style.opacity=null,e.style.transform=null)},xge=pe({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(e){return()=>{const{existIcon:t,prefixCls:n,loading:o}=e;if(t)return g("span",{class:`${n}-loading-icon`},[g(di,null,null)]);const r=!!o;return g(so,{name:`${n}-loading-icon-motion`,onBeforeEnter:bM,onEnter:yM,onAfterEnter:SM,onBeforeLeave:yM,onLeave:i=>{setTimeout(()=>{bM(i)})},onAfterLeave:SM},{default:()=>[r?g("span",{class:`${n}-loading-icon`},[g(di,null,null)]):null]})}}}),CM=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),wge=e=>{const{componentCls:t,fontSize:n,lineWidth:o,colorPrimaryHover:r,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-o,[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},CM(`${t}-primary`,r),CM(`${t}-danger`,i)]}},_ge=wge;function Oge(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:-e.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Ige(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Pge(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:S(S({},Oge(e,t)),Ige(e.componentCls,t))}}const Tge=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:e.lineHeight,color:e.colorText,"> span":{display:"inline-block"},[`> ${n} + span, > span + ${n}`]:{marginInlineStart:e.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":S({},Sl(e)),[`&-icon-only${t}-compact-item`]:{flex:"none"},[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:e.lineWidth,height:`calc(100% + ${e.lineWidth*2}px)`,backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:`calc(100% + ${e.lineWidth*2}px)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},$l=(e,t)=>({"&:not(:disabled)":{"&:hover":e,"&:active":t}}),Ege=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Age=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.controlHeight/2,paddingInlineEnd:e.controlHeight/2}),Sx=e=>({cursor:"not-allowed",borderColor:e.colorBorder,color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,boxShadow:"none"}),P0=(e,t,n,o,r,i,a)=>({[`&${e}-background-ghost`]:S(S({color:t||void 0,backgroundColor:"transparent",borderColor:n||void 0,boxShadow:"none"},$l(S({backgroundColor:"transparent"},i),S({backgroundColor:"transparent"},a))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:r||void 0}})}),X_=e=>({"&:disabled":S({},Sx(e))}),E9=e=>S({},X_(e)),T0=e=>({"&:disabled":{cursor:"not-allowed",color:e.colorTextDisabled}}),A9=e=>S(S(S(S(S({},E9(e)),{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`}),$l({color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),P0(e.componentCls,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)),{[`&${e.componentCls}-dangerous`]:S(S(S({color:e.colorError,borderColor:e.colorError},$l({color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),P0(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),X_(e))}),Mge=e=>S(S(S(S(S({},E9(e)),{color:e.colorTextLightSolid,backgroundColor:e.colorPrimary,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`}),$l({color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryHover},{color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryActive})),P0(e.componentCls,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{[`&${e.componentCls}-dangerous`]:S(S(S({backgroundColor:e.colorError,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`},$l({backgroundColor:e.colorErrorHover},{backgroundColor:e.colorErrorActive})),P0(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),X_(e))}),Rge=e=>S(S({},A9(e)),{borderStyle:"dashed"}),Dge=e=>S(S(S({color:e.colorLink},$l({color:e.colorLinkHover},{color:e.colorLinkActive})),T0(e)),{[`&${e.componentCls}-dangerous`]:S(S({color:e.colorError},$l({color:e.colorErrorHover},{color:e.colorErrorActive})),T0(e))}),Lge=e=>S(S(S({},$l({color:e.colorText,backgroundColor:e.colorBgTextHover},{color:e.colorText,backgroundColor:e.colorBgTextActive})),T0(e)),{[`&${e.componentCls}-dangerous`]:S(S({color:e.colorError},T0(e)),$l({color:e.colorErrorHover,backgroundColor:e.colorErrorBg},{color:e.colorErrorHover,backgroundColor:e.colorErrorBg}))}),Nge=e=>S(S({},Sx(e)),{[`&${e.componentCls}:hover`]:S({},Sx(e))}),kge=e=>{const{componentCls:t}=e;return{[`${t}-default`]:A9(e),[`${t}-primary`]:Mge(e),[`${t}-dashed`]:Rge(e),[`${t}-link`]:Dge(e),[`${t}-text`]:Lge(e),[`${t}-disabled`]:Nge(e)}},q_=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,iconCls:o,controlHeight:r,fontSize:i,lineHeight:a,lineWidth:l,borderRadius:s,buttonPaddingHorizontal:c}=e,u=Math.max(0,(r-i*a)/2-l),d=c-l,f=`${n}-icon-only`;return[{[`${n}${t}`]:{fontSize:i,height:r,padding:`${u}px ${d}px`,borderRadius:s,[`&${f}`]:{width:r,paddingInlineStart:0,paddingInlineEnd:0,[`&${n}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${n}-loading`]:{opacity:e.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`&:not(${f}) ${n}-loading-icon > ${o}`]:{marginInlineEnd:e.marginXS}}},{[`${n}${n}-circle${t}`]:Ege(e)},{[`${n}${n}-round${t}`]:Age(e)}]},Bge=e=>q_(e),Fge=e=>{const t=nt(e,{controlHeight:e.controlHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:8,borderRadius:e.borderRadiusSM});return q_(t,`${e.componentCls}-sm`)},Hge=e=>{const t=nt(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG});return q_(t,`${e.componentCls}-lg`)},zge=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},jge=pt("Button",e=>{const{controlTmpOutline:t,paddingContentHorizontal:n}=e,o=nt(e,{colorOutlineDefault:t,buttonPaddingHorizontal:n});return[Tge(o),Fge(o),Bge(o),Hge(o),zge(o),kge(o),_ge(o),uf(e,{focus:!1}),Pge(e)]}),Wge=()=>({prefixCls:String,size:{type:String}}),M9=S_(),E0=pe({compatConfig:{MODE:3},name:"AButtonGroup",props:Wge(),setup(e,t){let{slots:n}=t;const{prefixCls:o,direction:r}=Ve("btn-group",e),[,,i]=Ol();M9.useProvide(St({size:M(()=>e.size)}));const a=M(()=>{const{size:l}=e;let s="";switch(l){case"large":s="lg";break;case"small":s="sm";break;case"middle":case void 0:break;default:pn(!l,"Button.Group","Invalid prop `size`.")}return{[`${o.value}`]:!0,[`${o.value}-${s}`]:s,[`${o.value}-rtl`]:r.value==="rtl",[i.value]:!0}});return()=>{var l;return g("div",{class:a.value},[ln((l=n.default)===null||l===void 0?void 0:l.call(n))])}}}),$M=/^[\u4e00-\u9fa5]{2}$/,xM=$M.test.bind($M);function Pv(e){return e==="text"||e==="link"}const Un=pe({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:bt(T9(),{type:"default"}),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r,expose:i}=t;const{prefixCls:a,autoInsertSpaceInButton:l,direction:s,size:c}=Ve("btn",e),[u,d]=jge(a),f=M9.useInject(),h=jr(),m=M(()=>{var D;return(D=e.disabled)!==null&&D!==void 0?D:h.value}),v=ve(null),y=ve(void 0);let b=!1;const $=ve(!1),x=ve(!1),_=M(()=>l.value!==!1),{compactSize:w,compactItemClassnames:I}=Ms(a,s),O=M(()=>typeof e.loading=="object"&&e.loading.delay?e.loading.delay||!0:!!e.loading);Ie(O,D=>{clearTimeout(y.value),typeof O.value=="number"?y.value=setTimeout(()=>{$.value=D},O.value):$.value=D},{immediate:!0});const P=M(()=>{const{type:D,shape:B="default",ghost:k,block:L,danger:z}=e,K=a.value,G={large:"lg",small:"sm",middle:void 0},Y=w.value||(f==null?void 0:f.size)||c.value,ne=Y&&G[Y]||"";return[I.value,{[d.value]:!0,[`${K}`]:!0,[`${K}-${B}`]:B!=="default"&&B,[`${K}-${D}`]:D,[`${K}-${ne}`]:ne,[`${K}-loading`]:$.value,[`${K}-background-ghost`]:k&&!Pv(D),[`${K}-two-chinese-chars`]:x.value&&_.value,[`${K}-block`]:L,[`${K}-dangerous`]:!!z,[`${K}-rtl`]:s.value==="rtl"}]}),E=()=>{const D=v.value;if(!D||l.value===!1)return;const B=D.textContent;b&&xM(B)?x.value||(x.value=!0):x.value&&(x.value=!1)},R=D=>{if($.value||m.value){D.preventDefault();return}r("click",D)},A=D=>{r("mousedown",D)},N=(D,B)=>{const k=B?" ":"";if(D.type===_l){let L=D.children.trim();return xM(L)&&(L=L.split("").join(k)),g("span",null,[L])}return D};return ct(()=>{pn(!(e.ghost&&Pv(e.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),lt(E),fr(E),Ct(()=>{y.value&&clearTimeout(y.value)}),i({focus:()=>{var D;(D=v.value)===null||D===void 0||D.focus()},blur:()=>{var D;(D=v.value)===null||D===void 0||D.blur()}}),()=>{var D,B;const{icon:k=(D=n.icon)===null||D===void 0?void 0:D.call(n)}=e,L=ln((B=n.default)===null||B===void 0?void 0:B.call(n));b=L.length===1&&!k&&!Pv(e.type);const{type:z,htmlType:K,href:G,title:Y,target:ne}=e,re=$.value?"loading":k,J=S(S({},o),{title:Y,disabled:m.value,class:[P.value,o.class,{[`${a.value}-icon-only`]:L.length===0&&!!re}],onClick:R,onMousedown:A});m.value||delete J.disabled;const te=k&&!$.value?k:g(xge,{existIcon:!!k,prefixCls:a.value,loading:!!$.value},null),ee=L.map(ie=>N(ie,b&&_.value));if(G!==void 0)return u(g("a",V(V({},J),{},{href:G,target:ne,ref:v}),[te,ee]));let fe=g("button",V(V({},J),{},{ref:v,type:K}),[te,ee]);if(!Pv(z)){const ie=function(){return fe}();fe=g(Y_,{ref:"wave",disabled:!!$.value},{default:()=>[ie]})}return u(fe)}}});Un.Group=E0;Un.install=function(e){return e.component(Un.name,Un),e.component(E0.name,E0),e};const R9=()=>({arrow:rt([Boolean,Object]),trigger:{type:[Array,String]},menu:qe(),overlay:Z.any,visible:De(),open:De(),disabled:De(),danger:De(),autofocus:De(),align:qe(),getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:qe(),forceRender:De(),mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:De(),destroyPopupOnHide:De(),onVisibleChange:{type:Function},"onUpdate:visible":{type:Function},onOpenChange:{type:Function},"onUpdate:open":{type:Function}}),fC=T9(),Vge=()=>S(S({},R9()),{type:fC.type,size:String,htmlType:fC.htmlType,href:String,disabled:De(),prefixCls:String,icon:Z.any,title:String,loading:fC.loading,onClick:Ac()});var Kge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};const Uge=Kge;function wM(e){for(var t=1;t{const{componentCls:t,antCls:n,paddingXS:o,opacityLoading:r}=e;return{[`${t}-button`]:{whiteSpace:"nowrap",[`&${n}-btn-group > ${n}-btn`]:{[`&-loading, &-loading + ${n}-btn`]:{cursor:"default",pointerEvents:"none",opacity:r},[`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]:{paddingInline:o}}}}},Xge=Yge,qge=e=>{const{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:r}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:o,"&:hover":{color:r,backgroundColor:o}}}}}},Zge=qge,Qge=e=>{const{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:r,dropdownArrowOffset:i,sizePopupArrow:a,antCls:l,iconCls:s,motionDurationMid:c,dropdownPaddingVertical:u,fontSize:d,dropdownEdgeChildPadding:f,colorTextDisabled:h,fontSizeIcon:m,controlPaddingHorizontal:v,colorBgElevated:y,boxShadowPopoverArrow:b}=e;return[{[t]:S(S({},vt(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:-r+a/2,zIndex:-9999,opacity:1e-4,content:'""'},[`${t}-wrap`]:{position:"relative",[`${l}-btn > ${s}-down`]:{fontSize:m},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[` + &-show-arrow${t}-placement-topLeft, + &-show-arrow${t}-placement-top, + &-show-arrow${t}-placement-topRight + `]:{paddingBottom:r},[` + &-show-arrow${t}-placement-bottomLeft, + &-show-arrow${t}-placement-bottom, + &-show-arrow${t}-placement-bottomRight + `]:{paddingTop:r},[`${t}-arrow`]:S({position:"absolute",zIndex:1,display:"block"},L2(a,e.borderRadiusXS,e.borderRadiusOuter,y,b)),[` + &-placement-top > ${t}-arrow, + &-placement-topLeft > ${t}-arrow, + &-placement-topRight > ${t}-arrow + `]:{bottom:r,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${t}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft > ${t}-arrow`]:{left:{_skip_check_:!0,value:i}},[`&-placement-topRight > ${t}-arrow`]:{right:{_skip_check_:!0,value:i}},[` + &-placement-bottom > ${t}-arrow, + &-placement-bottomLeft > ${t}-arrow, + &-placement-bottomRight > ${t}-arrow + `]:{top:r,transform:"translateY(-100%)"},[`&-placement-bottom > ${t}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateY(-100%) translateX(-50%)"},[`&-placement-bottomLeft > ${t}-arrow`]:{left:{_skip_check_:!0,value:i}},[`&-placement-bottomRight > ${t}-arrow`]:{right:{_skip_check_:!0,value:i}},[`&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomLeft, + &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomLeft, + &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom, + &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom, + &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight, + &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:vy},[`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft, + &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft, + &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top, + &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top, + &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight, + &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]:{animationName:by},[`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft, + &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom, + &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:my},[`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft, + &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top, + &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]:{animationName:yy}})},{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}},[`${t}, ${t}-menu-submenu`]:{[n]:S(S({padding:f,listStyleType:"none",backgroundColor:y,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},Sl(e)),{[`${n}-item-group-title`]:{padding:`${u}px ${v}px`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center",borderRadius:e.borderRadiusSM},[`${n}-item-icon`]:{minWidth:d,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${c}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${n}-item, ${n}-submenu-title`]:S(S({clear:"both",margin:0,padding:`${u}px ${v}px`,color:e.colorText,fontWeight:"normal",fontSize:d,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${c}`,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},Sl(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:y,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${e.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:m,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${e.marginXS}px`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:v+e.fontSizeSM},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:y,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})}},[Na(e,"slide-up"),Na(e,"slide-down"),Dd(e,"move-up"),Dd(e,"move-down"),cf(e,"zoom-big")]]},D9=pt("Dropdown",(e,t)=>{let{rootPrefixCls:n}=t;const{marginXXS:o,sizePopupArrow:r,controlHeight:i,fontSize:a,lineHeight:l,paddingXXS:s,componentCls:c,borderRadiusOuter:u,borderRadiusLG:d}=e,f=(i-a*l)/2,{dropdownArrowOffset:h}=w9({sizePopupArrow:r,contentRadius:d,borderRadiusOuter:u}),m=nt(e,{menuCls:`${c}-menu`,rootPrefixCls:n,dropdownArrowDistance:r/2+o,dropdownArrowOffset:h,dropdownPaddingVertical:f,dropdownEdgeChildPadding:s});return[Qge(m),Xge(m),Zge(m)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));var Jge=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{r("update:visible",f),r("visibleChange",f),r("update:open",f),r("openChange",f)},{prefixCls:a,direction:l,getPopupContainer:s}=Ve("dropdown",e),c=M(()=>`${a.value}-button`),[u,d]=D9(a);return()=>{var f,h;const m=S(S({},e),o),{type:v="default",disabled:y,danger:b,loading:$,htmlType:x,class:_="",overlay:w=(f=n.overlay)===null||f===void 0?void 0:f.call(n),trigger:I,align:O,open:P,visible:E,onVisibleChange:R,placement:A=l.value==="rtl"?"bottomLeft":"bottomRight",href:N,title:F,icon:W=((h=n.icon)===null||h===void 0?void 0:h.call(n))||g(Q_,null,null),mouseEnterDelay:D,mouseLeaveDelay:B,overlayClassName:k,overlayStyle:L,destroyPopupOnHide:z,onClick:K,"onUpdate:open":G}=m,Y=Jge(m,["type","disabled","danger","loading","htmlType","class","overlay","trigger","align","open","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:open"]),ne={align:O,disabled:y,trigger:y?[]:I,placement:A,getPopupContainer:s==null?void 0:s.value,onOpenChange:i,mouseEnterDelay:D,mouseLeaveDelay:B,open:P??E,overlayClassName:k,overlayStyle:L,destroyPopupOnHide:z},re=g(Un,{danger:b,type:v,disabled:y,loading:$,onClick:K,htmlType:x,href:N,title:F},{default:n.default}),J=g(Un,{danger:b,type:v,icon:W},null);return u(g(eve,V(V({},Y),{},{class:me(c.value,_,d.value)}),{default:()=>[n.leftButton?n.leftButton({button:re}):re,g(Ta,ne,{default:()=>[n.rightButton?n.rightButton({button:J}):J],overlay:()=>w})]}))}}});var tve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const nve=tve;function _M(e){for(var t=1;tit(L9,void 0),eO=e=>{var t,n,o;const{prefixCls:r,mode:i,selectable:a,validator:l,onClick:s,expandIcon:c}=N9()||{};ft(L9,{prefixCls:M(()=>{var u,d;return(d=(u=e.prefixCls)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:r==null?void 0:r.value}),mode:M(()=>{var u,d;return(d=(u=e.mode)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:i==null?void 0:i.value}),selectable:M(()=>{var u,d;return(d=(u=e.selectable)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:a==null?void 0:a.value}),validator:(t=e.validator)!==null&&t!==void 0?t:l,onClick:(n=e.onClick)!==null&&n!==void 0?n:s,expandIcon:(o=e.expandIcon)!==null&&o!==void 0?o:c==null?void 0:c.value})},k9=pe({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:bt(R9(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,rootPrefixCls:a,direction:l,getPopupContainer:s}=Ve("dropdown",e),[c,u]=D9(i),d=M(()=>{const{placement:y="",transitionName:b}=e;return b!==void 0?b:y.includes("top")?`${a.value}-slide-down`:`${a.value}-slide-up`});eO({prefixCls:M(()=>`${i.value}-menu`),expandIcon:M(()=>g("span",{class:`${i.value}-menu-submenu-arrow`},[g(sa,{class:`${i.value}-menu-submenu-arrow-icon`},null)])),mode:M(()=>"vertical"),selectable:M(()=>!1),onClick:()=>{},validator:y=>{Sn()}});const f=()=>{var y,b,$;const x=e.overlay||((y=n.overlay)===null||y===void 0?void 0:y.call(n)),_=Array.isArray(x)?x[0]:x;if(!_)return null;const w=_.props||{};pn(!w.mode||w.mode==="vertical","Dropdown",`mode="${w.mode}" is not supported for Dropdown's Menu.`);const{selectable:I=!1,expandIcon:O=($=(b=_.children)===null||b===void 0?void 0:b.expandIcon)===null||$===void 0?void 0:$.call(b)}=w,P=typeof O<"u"&&Jn(O)?O:g("span",{class:`${i.value}-menu-submenu-arrow`},[g(sa,{class:`${i.value}-menu-submenu-arrow-icon`},null)]);return Jn(_)?Gt(_,{mode:"vertical",selectable:I,expandIcon:()=>P}):_},h=M(()=>{const y=e.placement;if(!y)return l.value==="rtl"?"bottomRight":"bottomLeft";if(y.includes("Center")){const b=y.slice(0,y.indexOf("Center"));return pn(!y.includes("Center"),"Dropdown",`You are using '${y}' placement in Dropdown, which is deprecated. Try to use '${b}' instead.`),b}return y}),m=M(()=>typeof e.visible=="boolean"?e.visible:e.open),v=y=>{r("update:visible",y),r("visibleChange",y),r("update:open",y),r("openChange",y)};return()=>{var y,b;const{arrow:$,trigger:x,disabled:_,overlayClassName:w}=e,I=(y=n.default)===null||y===void 0?void 0:y.call(n)[0],O=Gt(I,S({class:me((b=I==null?void 0:I.props)===null||b===void 0?void 0:b.class,{[`${i.value}-rtl`]:l.value==="rtl"},`${i.value}-trigger`)},_?{disabled:_}:{})),P=me(w,u.value,{[`${i.value}-rtl`]:l.value==="rtl"}),E=_?[]:x;let R;E&&E.includes("contextmenu")&&(R=!0);const A=V_({arrowPointAtCenter:typeof $=="object"&&$.pointAtCenter,autoAdjustOverflow:!0}),N=_t(S(S(S({},e),o),{visible:m.value,builtinPlacements:A,overlayClassName:P,arrow:!!$,alignPoint:R,prefixCls:i.value,getPopupContainer:s==null?void 0:s.value,transitionName:d.value,trigger:E,onVisibleChange:v,placement:h.value}),["overlay","onUpdate:visible"]);return c(g(P9,N,{default:()=>[O],overlay:f}))}}});k9.Button=fh;const Ta=k9;var rve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,href:String,separator:Z.any,dropdownProps:qe(),overlay:Z.any,onClick:Ac()}),ph=pe({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:ive(),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i}=Ve("breadcrumb",e),a=(s,c)=>{const u=lo(n,e,"overlay");return u?g(Ta,V(V({},e.dropdownProps),{},{overlay:u,placement:"bottom"}),{default:()=>[g("span",{class:`${c}-overlay-link`},[s,g(jh,null,null)])]}):s},l=s=>{r("click",s)};return()=>{var s;const c=(s=lo(n,e,"separator"))!==null&&s!==void 0?s:"/",u=lo(n,e),{class:d,style:f}=o,h=rve(o,["class","style"]);let m;return e.href!==void 0?m=g("a",V({class:`${i.value}-link`,onClick:l},h),[u]):m=g("span",V({class:`${i.value}-link`,onClick:l},h),[u]),m=a(m,i.value),u!=null?g("li",{class:d,style:f},[m,c&&g("span",{class:`${i.value}-separator`},[c])]):null}}});function ave(e,t,n,o){let r=n?n.call(o,e,t):void 0;if(r!==void 0)return!!r;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let s=0;s{ft(B9,e)},Al=()=>it(B9),H9=Symbol("ForceRenderKey"),lve=e=>{ft(H9,e)},z9=()=>it(H9,!1),j9=Symbol("menuFirstLevelContextKey"),W9=e=>{ft(j9,e)},sve=()=>it(j9,!0),A0=pe({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(e,t){let{slots:n}=t;const o=Al(),r=S({},o);return e.mode!==void 0&&(r.mode=st(e,"mode")),e.overflowDisabled!==void 0&&(r.overflowDisabled=st(e,"overflowDisabled")),F9(r),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),cve=F9,V9=Symbol("siderCollapsed"),K9=Symbol("siderHookProvider"),Tv="$$__vc-menu-more__key",U9=Symbol("KeyPathContext"),tO=()=>it(U9,{parentEventKeys:M(()=>[]),parentKeys:M(()=>[]),parentInfo:{}}),uve=(e,t,n)=>{const{parentEventKeys:o,parentKeys:r}=tO(),i=M(()=>[...o.value,e]),a=M(()=>[...r.value,t]);return ft(U9,{parentEventKeys:i,parentKeys:a,parentInfo:n}),a},G9=Symbol("measure"),OM=pe({compatConfig:{MODE:3},setup(e,t){let{slots:n}=t;return ft(G9,!0),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),nO=()=>it(G9,!1),dve=uve;function Y9(e){const{mode:t,rtl:n,inlineIndent:o}=Al();return M(()=>t.value!=="inline"?null:n.value?{paddingRight:`${e.value*o.value}px`}:{paddingLeft:`${e.value*o.value}px`})}let fve=0;const pve=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:Z.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:qe()}),Ea=pe({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:pve(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=Nn(),a=nO(),l=typeof i.vnode.key=="symbol"?String(i.vnode.key):i.vnode.key;pn(typeof i.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(l)}"\` not support Symbol type`);const s=`menu_item_${++fve}_$$_${l}`,{parentEventKeys:c,parentKeys:u}=tO(),{prefixCls:d,activeKeys:f,disabled:h,changeActiveKeys:m,rtl:v,inlineCollapsed:y,siderCollapsed:b,onItemClick:$,selectedKeys:x,registerMenuInfo:_,unRegisterMenuInfo:w}=Al(),I=sve(),O=ve(!1),P=M(()=>[...u.value,l]);_(s,{eventKey:s,key:l,parentEventKeys:c,parentKeys:u,isLeaf:!0}),Ct(()=>{w(s)}),Ie(f,()=>{O.value=!!f.value.find(G=>G===l)},{immediate:!0});const R=M(()=>h.value||e.disabled),A=M(()=>x.value.includes(l)),N=M(()=>{const G=`${d.value}-item`;return{[`${G}`]:!0,[`${G}-danger`]:e.danger,[`${G}-active`]:O.value,[`${G}-selected`]:A.value,[`${G}-disabled`]:R.value}}),F=G=>({key:l,eventKey:s,keyPath:P.value,eventKeyPath:[...c.value,s],domEvent:G,item:S(S({},e),r)}),W=G=>{if(R.value)return;const Y=F(G);o("click",G),$(Y)},D=G=>{R.value||(m(P.value),o("mouseenter",G))},B=G=>{R.value||(m([]),o("mouseleave",G))},k=G=>{if(o("keydown",G),G.which===Fe.ENTER){const Y=F(G);o("click",G),$(Y)}},L=G=>{m(P.value),o("focus",G)},z=(G,Y)=>{const ne=g("span",{class:`${d.value}-title-content`},[Y]);return(!G||Jn(Y)&&Y.type==="span")&&Y&&y.value&&I&&typeof Y=="string"?g("div",{class:`${d.value}-inline-collapsed-noicon`},[Y.charAt(0)]):ne},K=Y9(M(()=>P.value.length));return()=>{var G,Y,ne,re,J;if(a)return null;const te=(G=e.title)!==null&&G!==void 0?G:(Y=n.title)===null||Y===void 0?void 0:Y.call(n),ee=ln((ne=n.default)===null||ne===void 0?void 0:ne.call(n)),fe=ee.length;let ie=te;typeof te>"u"?ie=I&&fe?ee:"":te===!1&&(ie="");const X={title:ie};!b.value&&!y.value&&(X.title=null,X.open=!1);const ue={};e.role==="option"&&(ue["aria-selected"]=A.value);const ye=(re=e.icon)!==null&&re!==void 0?re:(J=n.icon)===null||J===void 0?void 0:J.call(n,e);return g(Br,V(V({},X),{},{placement:v.value?"left":"right",overlayClassName:`${d.value}-inline-collapsed-tooltip`}),{default:()=>[g(ud.Item,V(V(V({component:"li"},r),{},{id:e.id,style:S(S({},r.style||{}),K.value),class:[N.value,{[`${r.class}`]:!!r.class,[`${d.value}-item-only-child`]:(ye?fe+1:fe)===1}],role:e.role||"menuitem",tabindex:e.disabled?null:-1,"data-menu-id":l,"aria-disabled":e.disabled},ue),{},{onMouseenter:D,onMouseleave:B,onClick:W,onKeydown:k,onFocus:L,title:typeof te=="string"?te:void 0}),{default:()=>[Gt(typeof ye=="function"?ye(e.originItemValue):ye,{class:`${d.value}-item-icon`},!1),z(ye,ee)]})]})}}}),fs={adjustX:1,adjustY:1},hve={topLeft:{points:["bl","tl"],overflow:fs,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:fs,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:fs,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:fs,offset:[4,0]}},gve={topLeft:{points:["bl","tl"],overflow:fs,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:fs,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:fs,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:fs,offset:[4,0]}},vve={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},IM=pe({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(e,t){let{slots:n,emit:o}=t;const r=ve(!1),{getPopupContainer:i,rtl:a,subMenuOpenDelay:l,subMenuCloseDelay:s,builtinPlacements:c,triggerSubMenuAction:u,forceSubMenuRender:d,motion:f,defaultMotions:h,rootClassName:m}=Al(),v=z9(),y=M(()=>a.value?S(S({},gve),c.value):S(S({},hve),c.value)),b=M(()=>vve[e.mode]),$=ve();Ie(()=>e.visible,w=>{mt.cancel($.value),$.value=mt(()=>{r.value=w})},{immediate:!0}),Ct(()=>{mt.cancel($.value)});const x=w=>{o("visibleChange",w)},_=M(()=>{var w,I;const O=f.value||((w=h.value)===null||w===void 0?void 0:w[e.mode])||((I=h.value)===null||I===void 0?void 0:I.other),P=typeof O=="function"?O():O;return P?Hi(P.name,{css:!0}):void 0});return()=>{const{prefixCls:w,popupClassName:I,mode:O,popupOffset:P,disabled:E}=e;return g(tu,{prefixCls:w,popupClassName:me(`${w}-popup`,{[`${w}-rtl`]:a.value},I,m.value),stretch:O==="horizontal"?"minWidth":null,getPopupContainer:i.value,builtinPlacements:y.value,popupPlacement:b.value,popupVisible:r.value,popupAlign:P&&{offset:P},action:E?[]:[u.value],mouseEnterDelay:l.value,mouseLeaveDelay:s.value,onPopupVisibleChange:x,forceRender:v||d.value,popupAnimation:_.value},{popup:n.popup,default:n.default})}}}),X9=(e,t)=>{let{slots:n,attrs:o}=t;var r;const{prefixCls:i,mode:a}=Al();return g("ul",V(V({},o),{},{class:me(i.value,`${i.value}-sub`,`${i.value}-${a.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(r=n.default)===null||r===void 0?void 0:r.call(n)])};X9.displayName="SubMenuList";const q9=X9,mve=pe({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(e,t){let{slots:n}=t;const o=M(()=>"inline"),{motion:r,mode:i,defaultMotions:a}=Al(),l=M(()=>i.value===o.value),s=he(!l.value),c=M(()=>l.value?e.open:!1);Ie(i,()=>{l.value&&(s.value=!1)},{flush:"post"});const u=M(()=>{var d,f;const h=r.value||((d=a.value)===null||d===void 0?void 0:d[o.value])||((f=a.value)===null||f===void 0?void 0:f.other),m=typeof h=="function"?h():h;return S(S({},m),{appear:e.keyPath.length<=1})});return()=>{var d;return s.value?null:g(A0,{mode:o.value},{default:()=>[g(so,u.value,{default:()=>[Ln(g(q9,{id:e.id},{default:()=>[(d=n.default)===null||d===void 0?void 0:d.call(n)]}),[[Bo,c.value]])]})]})}}});let PM=0;const bve=()=>({icon:Z.any,title:Z.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:qe()}),Lc=pe({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:bve(),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;var i,a;W9(!1);const l=nO(),s=Nn(),c=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;pn(typeof s.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(c)}"\` not support Symbol type`);const u=W$(c)?c:`sub_menu_${++PM}_$$_not_set_key`,d=(i=e.eventKey)!==null&&i!==void 0?i:W$(c)?`sub_menu_${++PM}_$$_${c}`:u,{parentEventKeys:f,parentInfo:h,parentKeys:m}=tO(),v=M(()=>[...m.value,u]),y=ve([]),b={eventKey:d,key:u,parentEventKeys:f,childrenEventKeys:y,parentKeys:m};(a=h.childrenEventKeys)===null||a===void 0||a.value.push(d),Ct(()=>{var Se;h.childrenEventKeys&&(h.childrenEventKeys.value=(Se=h.childrenEventKeys)===null||Se===void 0?void 0:Se.value.filter($e=>$e!=d))}),dve(d,u,b);const{prefixCls:$,activeKeys:x,disabled:_,changeActiveKeys:w,mode:I,inlineCollapsed:O,openKeys:P,overflowDisabled:E,onOpenChange:R,registerMenuInfo:A,unRegisterMenuInfo:N,selectedSubMenuKeys:F,expandIcon:W,theme:D}=Al(),B=c!=null,k=!l&&(z9()||!B);lve(k),(l&&B||!l&&!B||k)&&(A(d,b),Ct(()=>{N(d)}));const L=M(()=>`${$.value}-submenu`),z=M(()=>_.value||e.disabled),K=ve(),G=ve(),Y=M(()=>P.value.includes(u)),ne=M(()=>!E.value&&Y.value),re=M(()=>F.value.includes(u)),J=ve(!1);Ie(x,()=>{J.value=!!x.value.find(Se=>Se===u)},{immediate:!0});const te=Se=>{z.value||(r("titleClick",Se,u),I.value==="inline"&&R(u,!Y.value))},ee=Se=>{z.value||(w(v.value),r("mouseenter",Se))},fe=Se=>{z.value||(w([]),r("mouseleave",Se))},ie=Y9(M(()=>v.value.length)),X=Se=>{I.value!=="inline"&&R(u,Se)},ue=()=>{w(v.value)},ye=d&&`${d}-popup`,H=M(()=>me($.value,`${$.value}-${e.theme||D.value}`,e.popupClassName)),j=(Se,$e)=>{if(!$e)return O.value&&!m.value.length&&Se&&typeof Se=="string"?g("div",{class:`${$.value}-inline-collapsed-noicon`},[Se.charAt(0)]):g("span",{class:`${$.value}-title-content`},[Se]);const _e=Jn(Se)&&Se.type==="span";return g(Je,null,[Gt(typeof $e=="function"?$e(e.originItemValue):$e,{class:`${$.value}-item-icon`},!1),_e?Se:g("span",{class:`${$.value}-title-content`},[Se])])},q=M(()=>I.value!=="inline"&&v.value.length>1?"vertical":I.value),se=M(()=>I.value==="horizontal"?"vertical":I.value),ae=M(()=>q.value==="horizontal"?"vertical":q.value),ge=()=>{var Se,$e;const _e=L.value,be=(Se=e.icon)!==null&&Se!==void 0?Se:($e=n.icon)===null||$e===void 0?void 0:$e.call(n,e),Te=e.expandIcon||n.expandIcon||W.value,Pe=j(lo(n,e,"title"),be);return g("div",{style:ie.value,class:`${_e}-title`,tabindex:z.value?null:-1,ref:K,title:typeof Pe=="string"?Pe:null,"data-menu-id":u,"aria-expanded":ne.value,"aria-haspopup":!0,"aria-controls":ye,"aria-disabled":z.value,onClick:te,onFocus:ue},[Pe,I.value!=="horizontal"&&Te?Te(S(S({},e),{isOpen:ne.value})):g("i",{class:`${_e}-arrow`},null)])};return()=>{var Se;if(l)return B?(Se=n.default)===null||Se===void 0?void 0:Se.call(n):null;const $e=L.value;let _e=()=>null;if(!E.value&&I.value!=="inline"){const be=I.value==="horizontal"?[0,8]:[10,0];_e=()=>g(IM,{mode:q.value,prefixCls:$e,visible:!e.internalPopupClose&&ne.value,popupClassName:H.value,popupOffset:e.popupOffset||be,disabled:z.value,onVisibleChange:X},{default:()=>[ge()],popup:()=>g(A0,{mode:ae.value},{default:()=>[g(q9,{id:ye,ref:G},{default:n.default})]})})}else _e=()=>g(IM,null,{default:ge});return g(A0,{mode:se.value},{default:()=>[g(ud.Item,V(V({component:"li"},o),{},{role:"none",class:me($e,`${$e}-${I.value}`,o.class,{[`${$e}-open`]:ne.value,[`${$e}-active`]:J.value,[`${$e}-selected`]:re.value,[`${$e}-disabled`]:z.value}),onMouseenter:ee,onMouseleave:fe,"data-submenu-id":u}),{default:()=>g(Je,null,[_e(),!E.value&&g(mve,{id:ye,open:ne.value,keyPath:v.value},{default:n.default})])})]})}}});function Z9(e,t){return e.classList?e.classList.contains(t):` ${e.className} `.indexOf(` ${t} `)>-1}function Cx(e,t){e.classList?e.classList.add(t):Z9(e,t)||(e.className=`${e.className} ${t}`)}function $x(e,t){if(e.classList)e.classList.remove(t);else if(Z9(e,t)){const n=e.className;e.className=` ${n} `.replace(` ${t} `," ")}}const Uh=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:e,appear:t,css:!0,onBeforeEnter:n=>{n.style.height="0px",n.style.opacity="0",Cx(n,e)},onEnter:n=>{wt(()=>{n.style.height=`${n.scrollHeight}px`,n.style.opacity="1"})},onAfterEnter:n=>{n&&($x(n,e),n.style.height=null,n.style.opacity=null)},onBeforeLeave:n=>{Cx(n,e),n.style.height=`${n.offsetHeight}px`,n.style.opacity=null},onLeave:n=>{setTimeout(()=>{n.style.height="0px",n.style.opacity="0"})},onAfterLeave:n=>{n&&($x(n,e),n.style&&(n.style.height=null,n.style.opacity=null))}}},yve=()=>({title:Z.any,originItemValue:qe()}),hh=pe({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:yve(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=Al(),i=M(()=>`${r.value}-item-group`),a=nO();return()=>{var l,s;return a?(l=n.default)===null||l===void 0?void 0:l.call(n):g("li",V(V({},o),{},{onClick:c=>c.stopPropagation(),class:i.value}),[g("div",{title:typeof e.title=="string"?e.title:void 0,class:`${i.value}-title`},[lo(n,e,"title")]),g("ul",{class:`${i.value}-list`},[(s=n.default)===null||s===void 0?void 0:s.call(n)])])}}}),Sve=()=>({prefixCls:String,dashed:Boolean}),gh=pe({compatConfig:{MODE:3},name:"AMenuDivider",props:Sve(),setup(e){const{prefixCls:t}=Al(),n=M(()=>({[`${t.value}-item-divider`]:!0,[`${t.value}-item-divider-dashed`]:!!e.dashed}));return()=>g("li",{class:n.value},null)}});var Cve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{if(o&&typeof o=="object"){const i=o,{label:a,children:l,key:s,type:c}=i,u=Cve(i,["label","children","key","type"]),d=s??`tmp-${r}`,f=n?n.parentKeys.slice():[],h=[],m={eventKey:d,key:d,parentEventKeys:he(f),parentKeys:he(f),childrenEventKeys:he(h),isLeaf:!1};if(l||c==="group"){if(c==="group"){const y=xx(l,t,n);return g(hh,V(V({key:d},u),{},{title:a,originItemValue:o}),{default:()=>[y]})}t.set(d,m),n&&n.childrenEventKeys.push(d);const v=xx(l,t,{childrenEventKeys:h,parentKeys:[].concat(f,d)});return g(Lc,V(V({key:d},u),{},{title:a,originItemValue:o}),{default:()=>[v]})}return c==="divider"?g(gh,V({key:d},u),null):(m.isLeaf=!0,t.set(d,m),g(Ea,V(V({key:d},u),{},{originItemValue:o}),{default:()=>[a]}))}return null}).filter(o=>o)}function $ve(e){const t=ve([]),n=ve(!1),o=ve(new Map);return Ie(()=>e.items,()=>{const r=new Map;n.value=!1,e.items?(n.value=!0,t.value=xx(e.items,r)):t.value=void 0,o.value=r},{immediate:!0,deep:!0}),{itemsNodes:t,store:o,hasItmes:n}}const xve=e=>{const{componentCls:t,motionDurationSlow:n,menuHorizontalHeight:o,colorSplit:r,lineWidth:i,lineType:a,menuItemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:`${o}px`,border:0,borderBottom:`${i}px ${a} ${r}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover, + > ${t}-item-active, + > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},wve=xve,_ve=e=>{let{componentCls:t,menuArrowOffset:n}=e;return{[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical, + ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${n})`},"&::after":{transform:`rotate(45deg) translateY(${n})`}}}}},Ove=_ve,TM=e=>S({},yl(e)),Ive=(e,t)=>{const{componentCls:n,colorItemText:o,colorItemTextSelected:r,colorGroupTitle:i,colorItemBg:a,colorSubItemBg:l,colorItemBgSelected:s,colorActiveBarHeight:c,colorActiveBarWidth:u,colorActiveBarBorderSize:d,motionDurationSlow:f,motionEaseInOut:h,motionEaseOut:m,menuItemPaddingInline:v,motionDurationMid:y,colorItemTextHover:b,lineType:$,colorSplit:x,colorItemTextDisabled:_,colorDangerItemText:w,colorDangerItemTextHover:I,colorDangerItemTextSelected:O,colorDangerItemBgActive:P,colorDangerItemBgSelected:E,colorItemBgHover:R,menuSubMenuBg:A,colorItemTextSelectedHorizontal:N,colorItemBgSelectedHorizontal:F}=e;return{[`${n}-${t}`]:{color:o,background:a,[`&${n}-root:focus-visible`]:S({},TM(e)),[`${n}-item-group-title`]:{color:i},[`${n}-submenu-selected`]:{[`> ${n}-submenu-title`]:{color:r}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${_} !important`},[`${n}-item:hover, ${n}-submenu-title:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:b}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:R},"&:active":{backgroundColor:s}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:R},"&:active":{backgroundColor:s}}},[`${n}-item-danger`]:{color:w,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:I}},[`&${n}-item:active`]:{background:P}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:r,[`&${n}-item-danger`]:{color:O},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:s,[`&${n}-item-danger`]:{backgroundColor:E}},[`${n}-item, ${n}-submenu-title`]:{[`&:not(${n}-item-disabled):focus-visible`]:S({},TM(e))},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:a},[`&${n}-horizontal`]:S(S({},t==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:d,marginTop:-d,marginBottom:0,borderRadius:0,"&::after":{position:"absolute",insetInline:v,bottom:0,borderBottom:`${c}px solid transparent`,transition:`border-color ${f} ${h}`,content:'""'},"&:hover, &-active, &-open":{"&::after":{borderBottomWidth:c,borderBottomColor:N}},"&-selected":{color:N,backgroundColor:F,"&::after":{borderBottomWidth:c,borderBottomColor:N}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${d}px ${$} ${x}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item, ${n}-submenu-title`]:d&&u?{width:`calc(100% + ${d}px)`}:{},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${u}px solid ${r}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${y} ${m}`,`opacity ${y} ${m}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:O}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${y} ${h}`,`opacity ${y} ${h}`].join(",")}}}}}},EM=Ive,AM=e=>{const{componentCls:t,menuItemHeight:n,itemMarginInline:o,padding:r,menuArrowSize:i,marginXS:a,marginXXS:l}=e,s=r+i+a;return{[`${t}-item`]:{position:"relative"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:`${n}px`,paddingInline:r,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:l,width:`calc(100% - ${o*2}px)`},[`${t}-submenu`]:{paddingBottom:.02},[`> ${t}-item, + > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:`${n}px`},[`${t}-item-group-list ${t}-submenu-title, + ${t}-submenu-title`]:{paddingInlineEnd:s}}},Pve=e=>{const{componentCls:t,iconCls:n,menuItemHeight:o,colorTextLightSolid:r,dropdownWidth:i,controlHeightLG:a,motionDurationMid:l,motionEaseOut:s,paddingXL:c,fontSizeSM:u,fontSizeLG:d,motionDurationSlow:f,paddingXS:h,boxShadowSecondary:m}=e,v={height:o,lineHeight:`${o}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":S({[`&${t}-root`]:{boxShadow:"none"}},AM(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:S(S({},AM(e)),{boxShadow:m})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${a*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${l} ${s}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:v,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:v}},{[`${t}-inline-collapsed`]:{width:o*2,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:d,textAlign:"center"}}},[`> ${t}-item, + > ${t}-item-group > ${t}-item-group-list > ${t}-item, + > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, + > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${u}px)`,textOverflow:"clip",[` + ${t}-submenu-arrow, + ${t}-submenu-expand-icon + `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:d,lineHeight:`${o}px`,"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:r}},[`${t}-item-group-title`]:S(S({},eo),{paddingInline:h})}}]},Tve=Pve,MM=e=>{const{componentCls:t,fontSize:n,motionDurationSlow:o,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:a,iconCls:l,controlHeightSM:s}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${o}`,`background ${o}`,`padding ${o} ${i}`].join(","),[`${t}-item-icon, ${l}`]:{minWidth:n,fontSize:n,transition:[`font-size ${r} ${a}`,`margin ${o} ${i}`,`color ${o}`].join(","),"+ span":{marginInlineStart:s-n,opacity:1,transition:[`opacity ${o} ${i}`,`margin ${o}`,`color ${o}`].join(",")}},[`${t}-item-icon`]:S({},Xc()),[`&${t}-item-only-child`]:{[`> ${l}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},RM=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:o,borderRadius:r,menuArrowSize:i,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${o}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:i*.6,height:i*.15,backgroundColor:"currentcolor",borderRadius:r,transition:[`background ${n} ${o}`,`transform ${n} ${o}`,`top ${n} ${o}`,`color ${n} ${o}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${a})`},"&::after":{transform:`rotate(-45deg) translateY(${a})`}}}}},Eve=e=>{const{antCls:t,componentCls:n,fontSize:o,motionDurationSlow:r,motionDurationMid:i,motionEaseInOut:a,lineHeight:l,paddingXS:s,padding:c,colorSplit:u,lineWidth:d,zIndexPopup:f,borderRadiusLG:h,radiusSubMenuItem:m,menuArrowSize:v,menuArrowOffset:y,lineType:b,menuPanelMaskInset:$}=e;return[{"":{[`${n}`]:S(S({},aa()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:S(S(S(S(S(S(S({},vt(e)),aa()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${r} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.radiusItem},[`${n}-item-group-title`]:{padding:`${s}px ${c}px`,fontSize:o,lineHeight:l,transition:`all ${r}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${r} ${a}`,`background ${r} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${r} ${a}`,`background ${r} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${r} ${a}`,`padding ${r} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${r}`},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:u,borderStyle:b,borderWidth:0,borderTopWidth:d,marginBlock:d,padding:0,"&-dashed":{borderStyle:"dashed"}}}),MM(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${o*2}px ${c}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,background:"transparent",borderRadius:h,boxShadow:"none",transformOrigin:"0 0","&::before":{position:"absolute",inset:`${$}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:$},[`> ${n}`]:S(S(S({borderRadius:h},MM(e)),RM(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:m},[`${n}-submenu-title::after`]:{transition:`transform ${r} ${a}`}})}}),RM(e)),{[`&-inline-collapsed ${n}-submenu-arrow, + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${y})`},"&::after":{transform:`rotate(45deg) translateX(-${y})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(-${v*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${y})`},"&::before":{transform:`rotate(45deg) translateX(${y})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Ave=(e,t)=>pt("Menu",(o,r)=>{let{overrideComponentToken:i}=r;if((t==null?void 0:t.value)===!1)return[];const{colorBgElevated:a,colorPrimary:l,colorError:s,colorErrorHover:c,colorTextLightSolid:u}=o,{controlHeightLG:d,fontSize:f}=o,h=f/7*5,m=nt(o,{menuItemHeight:d,menuItemPaddingInline:o.margin,menuArrowSize:h,menuHorizontalHeight:d*1.15,menuArrowOffset:`${h*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:a}),v=new Zt(u).setAlpha(.65).toRgbString(),y=nt(m,{colorItemText:v,colorItemTextHover:u,colorGroupTitle:v,colorItemTextSelected:u,colorItemBg:"#001529",colorSubItemBg:"#000c17",colorItemBgActive:"transparent",colorItemBgSelected:l,colorActiveBarWidth:0,colorActiveBarHeight:0,colorActiveBarBorderSize:0,colorItemTextDisabled:new Zt(u).setAlpha(.25).toRgbString(),colorDangerItemText:s,colorDangerItemTextHover:c,colorDangerItemTextSelected:u,colorDangerItemBgActive:s,colorDangerItemBgSelected:s,menuSubMenuBg:"#001529",colorItemTextSelectedHorizontal:u,colorItemBgSelectedHorizontal:l},S({},i));return[Eve(m),wve(m),Tve(m),EM(m,"light"),EM(y,"dark"),Ove(m),Kh(m),Na(m,"slide-up"),Na(m,"slide-down"),cf(m,"zoom-big")]},o=>{const{colorPrimary:r,colorError:i,colorTextDisabled:a,colorErrorBg:l,colorText:s,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:m,controlItemBgActive:v,colorBgTextHover:y}=o;return{dropdownWidth:160,zIndexPopup:o.zIndexPopupBase+50,radiusItem:o.borderRadiusLG,radiusSubMenuItem:o.borderRadiusSM,colorItemText:s,colorItemTextHover:s,colorItemTextHoverHorizontal:r,colorGroupTitle:c,colorItemTextSelected:r,colorItemTextSelectedHorizontal:r,colorItemBg:u,colorItemBgHover:y,colorItemBgActive:f,colorSubItemBg:d,colorItemBgSelected:v,colorItemBgSelectedHorizontal:"transparent",colorActiveBarWidth:0,colorActiveBarHeight:m,colorActiveBarBorderSize:h,colorItemTextDisabled:a,colorDangerItemText:i,colorDangerItemTextHover:i,colorDangerItemTextSelected:i,colorDangerItemBgActive:l,colorDangerItemBgSelected:l,itemMarginInline:o.marginXXS}})(e),Mve=()=>({id:String,prefixCls:String,items:Array,disabled:Boolean,inlineCollapsed:Boolean,disabledOverflow:Boolean,forceSubMenuRender:Boolean,openKeys:Array,selectedKeys:Array,activeKey:String,selectable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},tabindex:{type:[Number,String]},motion:Object,role:String,theme:{type:String,default:"light"},mode:{type:String,default:"vertical"},inlineIndent:{type:Number,default:24},subMenuOpenDelay:{type:Number,default:0},subMenuCloseDelay:{type:Number,default:.1},builtinPlacements:{type:Object},triggerSubMenuAction:{type:String,default:"hover"},getPopupContainer:Function,expandIcon:Function,onOpenChange:Function,onSelect:Function,onDeselect:Function,onClick:[Function,Array],onFocus:Function,onBlur:Function,onMousedown:Function,"onUpdate:openKeys":Function,"onUpdate:selectedKeys":Function,"onUpdate:activeKey":Function}),DM=[],qn=pe({compatConfig:{MODE:3},name:"AMenu",inheritAttrs:!1,props:Mve(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{direction:i,getPrefixCls:a}=Ve("menu",e),l=N9(),s=M(()=>{var te;return a("menu",e.prefixCls||((te=l==null?void 0:l.prefixCls)===null||te===void 0?void 0:te.value))}),[c,u]=Ave(s,M(()=>!l)),d=ve(new Map),f=it(V9,he(void 0)),h=M(()=>f.value!==void 0?f.value:e.inlineCollapsed),{itemsNodes:m}=$ve(e),v=ve(!1);lt(()=>{v.value=!0}),ct(()=>{pn(!(e.inlineCollapsed===!0&&e.mode!=="inline"),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),pn(!(f.value!==void 0&&e.inlineCollapsed===!0),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.")});const y=he([]),b=he([]),$=he({});Ie(d,()=>{const te={};for(const ee of d.value.values())te[ee.key]=ee;$.value=te},{flush:"post"}),ct(()=>{if(e.activeKey!==void 0){let te=[];const ee=e.activeKey?$.value[e.activeKey]:void 0;ee&&e.activeKey!==void 0?te=iC([].concat(It(ee.parentKeys),e.activeKey)):te=[],Vu(y.value,te)||(y.value=te)}}),Ie(()=>e.selectedKeys,te=>{te&&(b.value=te.slice())},{immediate:!0,deep:!0});const x=he([]);Ie([$,b],()=>{let te=[];b.value.forEach(ee=>{const fe=$.value[ee];fe&&(te=te.concat(It(fe.parentKeys)))}),te=iC(te),Vu(x.value,te)||(x.value=te)},{immediate:!0});const _=te=>{if(e.selectable){const{key:ee}=te,fe=b.value.includes(ee);let ie;e.multiple?fe?ie=b.value.filter(ue=>ue!==ee):ie=[...b.value,ee]:ie=[ee];const X=S(S({},te),{selectedKeys:ie});Vu(ie,b.value)||(e.selectedKeys===void 0&&(b.value=ie),o("update:selectedKeys",ie),fe&&e.multiple?o("deselect",X):o("select",X))}R.value!=="inline"&&!e.multiple&&w.value.length&&F(DM)},w=he([]);Ie(()=>e.openKeys,function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w.value;Vu(w.value,te)||(w.value=te.slice())},{immediate:!0,deep:!0});let I;const O=te=>{clearTimeout(I),I=setTimeout(()=>{e.activeKey===void 0&&(y.value=te),o("update:activeKey",te[te.length-1])})},P=M(()=>!!e.disabled),E=M(()=>i.value==="rtl"),R=he("vertical"),A=ve(!1);ct(()=>{var te;(e.mode==="inline"||e.mode==="vertical")&&h.value?(R.value="vertical",A.value=h.value):(R.value=e.mode,A.value=!1),!((te=l==null?void 0:l.mode)===null||te===void 0)&&te.value&&(R.value=l.mode.value)});const N=M(()=>R.value==="inline"),F=te=>{w.value=te,o("update:openKeys",te),o("openChange",te)},W=he(w.value),D=ve(!1);Ie(w,()=>{N.value&&(W.value=w.value)},{immediate:!0}),Ie(N,()=>{if(!D.value){D.value=!0;return}N.value?w.value=W.value:F(DM)},{immediate:!0});const B=M(()=>({[`${s.value}`]:!0,[`${s.value}-root`]:!0,[`${s.value}-${R.value}`]:!0,[`${s.value}-inline-collapsed`]:A.value,[`${s.value}-rtl`]:E.value,[`${s.value}-${e.theme}`]:!0})),k=M(()=>a()),L=M(()=>({horizontal:{name:`${k.value}-slide-up`},inline:Uh(`${k.value}-motion-collapse`),other:{name:`${k.value}-zoom-big`}}));W9(!0);const z=function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const ee=[],fe=d.value;return te.forEach(ie=>{const{key:X,childrenEventKeys:ue}=fe.get(ie);ee.push(X,...z(It(ue)))}),ee},K=te=>{var ee;o("click",te),_(te),(ee=l==null?void 0:l.onClick)===null||ee===void 0||ee.call(l)},G=(te,ee)=>{var fe;const ie=((fe=$.value[te])===null||fe===void 0?void 0:fe.childrenEventKeys)||[];let X=w.value.filter(ue=>ue!==te);if(ee)X.push(te);else if(R.value!=="inline"){const ue=z(It(ie));X=iC(X.filter(ye=>!ue.includes(ye)))}Vu(w,X)||F(X)},Y=(te,ee)=>{d.value.set(te,ee),d.value=new Map(d.value)},ne=te=>{d.value.delete(te),d.value=new Map(d.value)},re=he(0),J=M(()=>{var te;return e.expandIcon||n.expandIcon||!((te=l==null?void 0:l.expandIcon)===null||te===void 0)&&te.value?ee=>{let fe=e.expandIcon||n.expandIcon;return fe=typeof fe=="function"?fe(ee):fe,Gt(fe,{class:`${s.value}-submenu-expand-icon`},!1)}:null});return cve({prefixCls:s,activeKeys:y,openKeys:w,selectedKeys:b,changeActiveKeys:O,disabled:P,rtl:E,mode:R,inlineIndent:M(()=>e.inlineIndent),subMenuCloseDelay:M(()=>e.subMenuCloseDelay),subMenuOpenDelay:M(()=>e.subMenuOpenDelay),builtinPlacements:M(()=>e.builtinPlacements),triggerSubMenuAction:M(()=>e.triggerSubMenuAction),getPopupContainer:M(()=>e.getPopupContainer),inlineCollapsed:A,theme:M(()=>e.theme),siderCollapsed:f,defaultMotions:M(()=>v.value?L.value:null),motion:M(()=>v.value?e.motion:null),overflowDisabled:ve(void 0),onOpenChange:G,onItemClick:K,registerMenuInfo:Y,unRegisterMenuInfo:ne,selectedSubMenuKeys:x,expandIcon:J,forceSubMenuRender:M(()=>e.forceSubMenuRender),rootClassName:u}),()=>{var te,ee;const fe=m.value||ln((te=n.default)===null||te===void 0?void 0:te.call(n)),ie=re.value>=fe.length-1||R.value!=="horizontal"||e.disabledOverflow,X=R.value!=="horizontal"||e.disabledOverflow?fe:fe.map((ye,H)=>g(A0,{key:ye.key,overflowDisabled:H>re.value},{default:()=>ye})),ue=((ee=n.overflowedIndicator)===null||ee===void 0?void 0:ee.call(n))||g(Q_,null,null);return c(g(ud,V(V({},r),{},{onMousedown:e.onMousedown,prefixCls:`${s.value}-overflow`,component:"ul",itemComponent:Ea,class:[B.value,r.class,u.value],role:"menu",id:e.id,data:X,renderRawItem:ye=>ye,renderRawRest:ye=>{const H=ye.length,j=H?fe.slice(-H):null;return g(Je,null,[g(Lc,{eventKey:Tv,key:Tv,title:ue,disabled:ie,internalPopupClose:H===0},{default:()=>j}),g(OM,null,{default:()=>[g(Lc,{eventKey:Tv,key:Tv,title:ue,disabled:ie,internalPopupClose:H===0},{default:()=>j})]})])},maxCount:R.value!=="horizontal"||e.disabledOverflow?ud.INVALIDATE:ud.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:ye=>{re.value=ye}}),{default:()=>[g(Ab,{to:"body"},{default:()=>[g("div",{style:{display:"none"},"aria-hidden":!0},[g(OM,null,{default:()=>[X]})])]})]}))}}});qn.install=function(e){return e.component(qn.name,qn),e.component(Ea.name,Ea),e.component(Lc.name,Lc),e.component(gh.name,gh),e.component(hh.name,hh),e};qn.Item=Ea;qn.Divider=gh;qn.SubMenu=Lc;qn.ItemGroup=hh;const Rve=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:S(S({},vt(e)),{color:e.breadcrumbBaseColor,fontSize:e.breadcrumbFontSize,[n]:{fontSize:e.breadcrumbIconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:S({color:e.breadcrumbLinkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.breadcrumbLinkColorHover,backgroundColor:e.colorBgTextHover}},Sl(e)),"li:last-child":{color:e.breadcrumbLastItemColor,[`& > ${t}-separator`]:{display:"none"}},[`${t}-separator`]:{marginInline:e.breadcrumbSeparatorMargin,color:e.breadcrumbSeparatorColor},[`${t}-link`]:{[` + > ${n} + span, + > ${n} + a + `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.breadcrumbLinkColorHover,backgroundColor:e.colorBgTextHover,a:{color:e.breadcrumbLinkColorHover}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}},Dve=pt("Breadcrumb",e=>{const t=nt(e,{breadcrumbBaseColor:e.colorTextDescription,breadcrumbFontSize:e.fontSize,breadcrumbIconFontSize:e.fontSize,breadcrumbLinkColor:e.colorTextDescription,breadcrumbLinkColorHover:e.colorText,breadcrumbLastItemColor:e.colorText,breadcrumbSeparatorMargin:e.marginXS,breadcrumbSeparatorColor:e.colorTextDescription});return[Rve(t)]}),Lve=()=>({prefixCls:String,routes:{type:Array},params:Z.any,separator:Z.any,itemRender:{type:Function}});function Nve(e,t){if(!e.breadcrumbName)return null;const n=Object.keys(t).join("|");return e.breadcrumbName.replace(new RegExp(`:(${n})`,"g"),(r,i)=>t[i]||r)}function LM(e){const{route:t,params:n,routes:o,paths:r}=e,i=o.indexOf(t)===o.length-1,a=Nve(t,n);return i?g("span",null,[a]):g("a",{href:`#/${r.join("/")}`},[a])}const _c=pe({compatConfig:{MODE:3},name:"ABreadcrumb",inheritAttrs:!1,props:Lve(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("breadcrumb",e),[a,l]=Dve(r),s=(d,f)=>(d=(d||"").replace(/^\//,""),Object.keys(f).forEach(h=>{d=d.replace(`:${h}`,f[h])}),d),c=(d,f,h)=>{const m=[...d],v=s(f||"",h);return v&&m.push(v),m},u=d=>{let{routes:f=[],params:h={},separator:m,itemRender:v=LM}=d;const y=[];return f.map(b=>{const $=s(b.path,h);$&&y.push($);const x=[...y];let _=null;b.children&&b.children.length&&(_=g(qn,{items:b.children.map(I=>({key:I.path||I.breadcrumbName,label:v({route:I,params:h,routes:f,paths:c(x,I.path,h)})}))},null));const w={separator:m};return _&&(w.overlay=_),g(ph,V(V({},w),{},{key:$||b.breadcrumbName}),{default:()=>[v({route:b,params:h,routes:f,paths:x})]})})};return()=>{var d;let f;const{routes:h,params:m={}}=e,v=ln(lo(n,e)),y=(d=lo(n,e,"separator"))!==null&&d!==void 0?d:"/",b=e.itemRender||n.itemRender||LM;h&&h.length>0?f=u({routes:h,params:m,separator:y,itemRender:b}):v.length&&(f=v.map((x,_)=>(Sn(typeof x.type=="object"&&(x.type.__ANT_BREADCRUMB_ITEM||x.type.__ANT_BREADCRUMB_SEPARATOR)),ko(x,{separator:y,key:_}))));const $={[r.value]:!0,[`${r.value}-rtl`]:i.value==="rtl",[`${o.class}`]:!!o.class,[l.value]:!0};return a(g("nav",V(V({},o),{},{class:$}),[g("ol",null,[f])]))}}});var kve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String}),M0=pe({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:Bve(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=Ve("breadcrumb",e);return()=>{var i;const{separator:a,class:l}=o,s=kve(o,["separator","class"]),c=ln((i=n.default)===null||i===void 0?void 0:i.call(n));return g("span",V({class:[`${r.value}-separator`,l]},s),[c.length>0?c:"/"])}}});_c.Item=ph;_c.Separator=M0;_c.install=function(e){return e.component(_c.name,_c),e.component(ph.name,ph),e.component(M0.name,M0),e};var Lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ba(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Q9={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Lr,function(){var n=1e3,o=6e4,r=36e5,i="millisecond",a="second",l="minute",s="hour",c="day",u="week",d="month",f="quarter",h="year",m="date",v="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var D=["th","st","nd","rd"],B=W%100;return"["+W+(D[(B-20)%10]||D[B]||D[0])+"]"}},x=function(W,D,B){var k=String(W);return!k||k.length>=D?W:""+Array(D+1-k.length).join(B)+W},_={s:x,z:function(W){var D=-W.utcOffset(),B=Math.abs(D),k=Math.floor(B/60),L=B%60;return(D<=0?"+":"-")+x(k,2,"0")+":"+x(L,2,"0")},m:function W(D,B){if(D.date()1)return W(K[0])}else{var G=D.name;I[G]=D,L=G}return!k&&L&&(w=L),L||!k&&w},R=function(W,D){if(P(W))return W.clone();var B=typeof D=="object"?D:{};return B.date=W,B.args=arguments,new N(B)},A=_;A.l=E,A.i=P,A.w=function(W,D){return R(W,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var N=function(){function W(B){this.$L=E(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[O]=!0}var D=W.prototype;return D.parse=function(B){this.$d=function(k){var L=k.date,z=k.utc;if(L===null)return new Date(NaN);if(A.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var K=L.match(y);if(K){var G=K[2]-1||0,Y=(K[7]||"0").substring(0,3);return z?new Date(Date.UTC(K[1],G,K[3]||1,K[4]||0,K[5]||0,K[6]||0,Y)):new Date(K[1],G,K[3]||1,K[4]||0,K[5]||0,K[6]||0,Y)}}return new Date(L)}(B),this.init()},D.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},D.$utils=function(){return A},D.isValid=function(){return this.$d.toString()!==v},D.isSame=function(B,k){var L=R(B);return this.startOf(k)<=L&&L<=this.endOf(k)},D.isAfter=function(B,k){return R(B)25){var u=a(this).startOf(o).add(1,o).date(c),d=a(this).endOf(n);if(u.isBefore(d))return 1}var f=a(this).startOf(o).date(c).startOf(n).subtract(1,"millisecond"),h=this.diff(f,n,!0);return h<0?a(this).startOf("week").week():Math.ceil(h)},l.weeks=function(s){return s===void 0&&(s=null),this.week(s)}}})})(tB);var Vve=tB.exports;const Kve=Ba(Vve);var nB={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Lr,function(){return function(n,o){o.prototype.weekYear=function(){var r=this.month(),i=this.week(),a=this.year();return i===1&&r===11?a+1:r===0&&i>=52?a-1:a}}})})(nB);var Uve=nB.exports;const Gve=Ba(Uve);var oB={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Lr,function(){var n="month",o="quarter";return function(r,i){var a=i.prototype;a.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var l=a.add;a.add=function(c,u){return c=Number(c),this.$utils().p(u)===o?this.add(3*c,n):l.bind(this)(c,u)};var s=a.startOf;a.startOf=function(c,u){var d=this.$utils(),f=!!d.u(u)||u;if(d.p(c)===o){var h=this.quarter()-1;return f?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return s.bind(this)(c,u)}}})})(oB);var Yve=oB.exports;const Xve=Ba(Yve);var rB={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Lr,function(){return function(n,o){var r=o.prototype,i=r.format;r.format=function(a){var l=this,s=this.$locale();if(!this.isValid())return i.bind(this)(a);var c=this.$utils(),u=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return s.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return s.ordinal(l.week(),"W");case"w":case"ww":return c.s(l.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(l.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(l.$H===0?24:l.$H),d==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return d}});return i.bind(this)(u)}}})})(rB);var qve=rB.exports;const Zve=Ba(qve);var iB={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Lr,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},s=function(v){return(v=+v)+(v>68?1900:2e3)},c=function(v){return function(y){this[v]=+y}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var b=y.match(/([+-]|\d\d)/g),$=60*b[1]+(+b[2]||0);return $===0?0:b[0]==="+"?-$:$}(v)}],d=function(v){var y=l[v];return y&&(y.indexOf?y:y.s.concat(y.f))},f=function(v,y){var b,$=l.meridiem;if($){for(var x=1;x<=24;x+=1)if(v.indexOf($(x,0,y))>-1){b=x>12;break}}else b=v===(y?"pm":"PM");return b},h={A:[a,function(v){this.afternoon=f(v,!1)}],a:[a,function(v){this.afternoon=f(v,!0)}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[r,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[i,c("seconds")],ss:[i,c("seconds")],m:[i,c("minutes")],mm:[i,c("minutes")],H:[i,c("hours")],h:[i,c("hours")],HH:[i,c("hours")],hh:[i,c("hours")],D:[i,c("day")],DD:[r,c("day")],Do:[a,function(v){var y=l.ordinal,b=v.match(/\d+/);if(this.day=b[0],y)for(var $=1;$<=31;$+=1)y($).replace(/\[|\]/g,"")===v&&(this.day=$)}],M:[i,c("month")],MM:[r,c("month")],MMM:[a,function(v){var y=d("months"),b=(d("monthsShort")||y.map(function($){return $.slice(0,3)})).indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[a,function(v){var y=d("months").indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,c("year")],YY:[r,function(v){this.year=s(v)}],YYYY:[/\d{4}/,c("year")],Z:u,ZZ:u};function m(v){var y,b;y=v,b=l&&l.formats;for(var $=(v=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(E,R,A){var N=A&&A.toUpperCase();return R||b[A]||n[A]||b[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,W,D){return W||D.slice(1)})})).match(o),x=$.length,_=0;_-1)return new Date((k==="X"?1e3:1)*B);var z=m(k)(B),K=z.year,G=z.month,Y=z.day,ne=z.hours,re=z.minutes,J=z.seconds,te=z.milliseconds,ee=z.zone,fe=new Date,ie=Y||(K||G?1:fe.getDate()),X=K||fe.getFullYear(),ue=0;K&&!G||(ue=G>0?G-1:fe.getMonth());var ye=ne||0,H=re||0,j=J||0,q=te||0;return ee?new Date(Date.UTC(X,ue,ie,ye,H,j,q+60*ee.offset*1e3)):L?new Date(Date.UTC(X,ue,ie,ye,H,j,q)):new Date(X,ue,ie,ye,H,j,q)}catch{return new Date("")}}(w,P,I),this.init(),N&&N!==!0&&(this.$L=this.locale(N).$L),A&&w!=this.format(P)&&(this.$d=new Date("")),l={}}else if(P instanceof Array)for(var F=P.length,W=1;W<=F;W+=1){O[1]=P[W-1];var D=b.apply(this,O);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}W===F&&(this.$d=new Date(""))}else x.call(this,_)}}})})(iB);var Qve=iB.exports;const Jve=Ba(Qve);xo.extend(Jve);xo.extend(Zve);xo.extend(zve);xo.extend(Wve);xo.extend(Kve);xo.extend(Gve);xo.extend(Xve);xo.extend((e,t)=>{const n=t.prototype,o=n.format;n.format=function(i){const a=(i||"").replace("Wo","wo");return o.bind(this)(a)}});const eme={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},ec=e=>eme[e]||e.split("_")[0],NM=()=>{pte(!1,"Not match any format. Please help to fire a issue about this.")},tme=/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;function kM(e,t,n){const o=[...new Set(e.split(n))];let r=0;for(let i=0;it)return a;r+=n.length}}const BM=(e,t)=>{if(!e)return null;if(xo.isDayjs(e))return e;const n=t.matchAll(tme);let o=xo(e,t);if(n===null)return o;for(const r of n){const i=r[0],a=r.index;if(i==="Q"){const l=e.slice(a-1,a),s=kM(e,a,l).match(/\d+/)[0];o=o.quarter(parseInt(s))}if(i.toLowerCase()==="wo"){const l=e.slice(a-1,a),s=kM(e,a,l).match(/\d+/)[0];o=o.week(parseInt(s))}i.toLowerCase()==="ww"&&(o=o.week(parseInt(e.slice(a,a+i.length)))),i.toLowerCase()==="w"&&(o=o.week(parseInt(e.slice(a,a+i.length+1))))}return o},nme={getNow:()=>xo(),getFixedDate:e=>xo(e,["YYYY-M-DD","YYYY-MM-DD"]),getEndDate:e=>e.endOf("month"),getWeekDay:e=>{const t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:e=>e.year(),getMonth:e=>e.month(),getDate:e=>e.date(),getHour:e=>e.hour(),getMinute:e=>e.minute(),getSecond:e=>e.second(),addYear:(e,t)=>e.add(t,"year"),addMonth:(e,t)=>e.add(t,"month"),addDate:(e,t)=>e.add(t,"day"),setYear:(e,t)=>e.year(t),setMonth:(e,t)=>e.month(t),setDate:(e,t)=>e.date(t),setHour:(e,t)=>e.hour(t),setMinute:(e,t)=>e.minute(t),setSecond:(e,t)=>e.second(t),isAfter:(e,t)=>e.isAfter(t),isValidate:e=>e.isValid(),locale:{getWeekFirstDay:e=>xo().locale(ec(e)).localeData().firstDayOfWeek(),getWeekFirstDate:(e,t)=>t.locale(ec(e)).weekday(0),getWeek:(e,t)=>t.locale(ec(e)).week(),getShortWeekDays:e=>xo().locale(ec(e)).localeData().weekdaysMin(),getShortMonths:e=>xo().locale(ec(e)).localeData().monthsShort(),format:(e,t,n)=>t.locale(ec(e)).format(n),parse:(e,t,n)=>{const o=ec(e);for(let r=0;rArray.isArray(e)?e.map(n=>BM(n,t)):BM(e,t),toString:(e,t)=>Array.isArray(e)?e.map(n=>xo.isDayjs(n)?n.format(t):n):xo.isDayjs(e)?e.format(t):e},oO=nme;function to(e){const t=XQ();return S(S({},e),t)}const aB=Symbol("PanelContextProps"),rO=e=>{ft(aB,e)},Fa=()=>it(aB,{}),Ev={visibility:"hidden"};function Rs(e,t){let{slots:n}=t;var o;const r=to(e),{prefixCls:i,prevIcon:a="‹",nextIcon:l="›",superPrevIcon:s="«",superNextIcon:c="»",onSuperPrev:u,onSuperNext:d,onPrev:f,onNext:h}=r,{hideNextBtn:m,hidePrevBtn:v}=Fa();return g("div",{class:i},[u&&g("button",{type:"button",onClick:u,tabindex:-1,class:`${i}-super-prev-btn`,style:v.value?Ev:{}},[s]),f&&g("button",{type:"button",onClick:f,tabindex:-1,class:`${i}-prev-btn`,style:v.value?Ev:{}},[a]),g("div",{class:`${i}-view`},[(o=n.default)===null||o===void 0?void 0:o.call(n)]),h&&g("button",{type:"button",onClick:h,tabindex:-1,class:`${i}-next-btn`,style:m.value?Ev:{}},[l]),d&&g("button",{type:"button",onClick:d,tabindex:-1,class:`${i}-super-next-btn`,style:m.value?Ev:{}},[c])])}Rs.displayName="Header";Rs.inheritAttrs=!1;function iO(e){const t=to(e),{prefixCls:n,generateConfig:o,viewDate:r,onPrevDecades:i,onNextDecades:a}=t,{hideHeader:l}=Fa();if(l)return null;const s=`${n}-header`,c=o.getYear(r),u=Math.floor(c/hl)*hl,d=u+hl-1;return g(Rs,V(V({},t),{},{prefixCls:s,onSuperPrev:i,onSuperNext:a}),{default:()=>[u,Do("-"),d]})}iO.displayName="DecadeHeader";iO.inheritAttrs=!1;function lB(e,t,n,o,r){let i=e.setHour(t,n);return i=e.setMinute(i,o),i=e.setSecond(i,r),i}function hm(e,t,n){if(!n)return t;let o=t;return o=e.setHour(o,e.getHour(n)),o=e.setMinute(o,e.getMinute(n)),o=e.setSecond(o,e.getSecond(n)),o}function ome(e,t,n,o,r,i){const a=Math.floor(e/o)*o;if(a{W.stopPropagation(),N||o(A)},onMouseenter:()=>{!N&&b&&b(A)},onMouseleave:()=>{!N&&$&&$(A)}},[f?f(A):g("div",{class:`${_}-inner`},[d(A)])]))}w.push(g("tr",{key:I,class:s&&s(P)},[O]))}return g("div",{class:`${t}-body`},[g("table",{class:`${t}-content`},[y&&g("thead",null,[g("tr",null,[y])]),g("tbody",null,[w])])])}nu.displayName="PanelBody";nu.inheritAttrs=!1;const wx=3,FM=4;function aO(e){const t=to(e),n=Ji-1,{prefixCls:o,viewDate:r,generateConfig:i}=t,a=`${o}-cell`,l=i.getYear(r),s=Math.floor(l/Ji)*Ji,c=Math.floor(l/hl)*hl,u=c+hl-1,d=i.setYear(r,c-Math.ceil((wx*FM*Ji-hl)/2)),f=h=>{const m=i.getYear(h),v=m+n;return{[`${a}-in-view`]:c<=m&&v<=u,[`${a}-selected`]:m===s}};return g(nu,V(V({},t),{},{rowNum:FM,colNum:wx,baseDate:d,getCellText:h=>{const m=i.getYear(h);return`${m}-${m+n}`},getCellClassName:f,getCellDate:(h,m)=>i.addYear(h,m*Ji)}),null)}aO.displayName="DecadeBody";aO.inheritAttrs=!1;const Av=new Map;function ime(e,t){let n;function o(){Yb(e)?t():n=mt(()=>{o()})}return o(),()=>{mt.cancel(n)}}function _x(e,t,n){if(Av.get(e)&&mt.cancel(Av.get(e)),n<=0){Av.set(e,mt(()=>{e.scrollTop=t}));return}const r=(t-e.scrollTop)/n*10;Av.set(e,mt(()=>{e.scrollTop+=r,e.scrollTop!==t&&_x(e,t,n-10)}))}function pf(e,t){let{onLeftRight:n,onCtrlLeftRight:o,onUpDown:r,onPageUpDown:i,onEnter:a}=t;const{which:l,ctrlKey:s,metaKey:c}=e;switch(l){case Fe.LEFT:if(s||c){if(o)return o(-1),!0}else if(n)return n(-1),!0;break;case Fe.RIGHT:if(s||c){if(o)return o(1),!0}else if(n)return n(1),!0;break;case Fe.UP:if(r)return r(-1),!0;break;case Fe.DOWN:if(r)return r(1),!0;break;case Fe.PAGE_UP:if(i)return i(-1),!0;break;case Fe.PAGE_DOWN:if(i)return i(1),!0;break;case Fe.ENTER:if(a)return a(),!0;break}return!1}function sB(e,t,n,o){let r=e;if(!r)switch(t){case"time":r=o?"hh:mm:ss a":"HH:mm:ss";break;case"week":r="gggg-wo";break;case"month":r="YYYY-MM";break;case"quarter":r="YYYY-[Q]Q";break;case"year":r="YYYY";break;default:r=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return r}function cB(e,t,n){const o=e==="time"?8:10,r=typeof t=="function"?t(n.getNow()).length:t.length;return Math.max(o,r)+2}let Kf=null;const Mv=new Set;function ame(e){return!Kf&&typeof window<"u"&&window.addEventListener&&(Kf=t=>{[...Mv].forEach(n=>{n(t)})},window.addEventListener("mousedown",Kf)),Mv.add(e),()=>{Mv.delete(e),Mv.size===0&&(window.removeEventListener("mousedown",Kf),Kf=null)}}function lme(e){var t;const n=e.target;return e.composed&&n.shadowRoot&&((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||n}const sme=e=>e==="month"||e==="date"?"year":e,cme=e=>e==="date"?"month":e,ume=e=>e==="month"||e==="date"?"quarter":e,dme=e=>e==="date"?"week":e,fme={year:sme,month:cme,quarter:ume,week:dme,time:null,date:null};function uB(e,t){return e.some(n=>n&&n.contains(t))}const Ji=10,hl=Ji*10;function lO(e){const t=to(e),{prefixCls:n,onViewDateChange:o,generateConfig:r,viewDate:i,operationRef:a,onSelect:l,onPanelChange:s}=t,c=`${n}-decade-panel`;a.value={onKeydown:f=>pf(f,{onLeftRight:h=>{l(r.addYear(i,h*Ji),"key")},onCtrlLeftRight:h=>{l(r.addYear(i,h*hl),"key")},onUpDown:h=>{l(r.addYear(i,h*Ji*wx),"key")},onEnter:()=>{s("year",i)}})};const u=f=>{const h=r.addYear(i,f*hl);o(h),s(null,h)},d=f=>{l(f,"mouse"),s("year",f)};return g("div",{class:c},[g(iO,V(V({},t),{},{prefixCls:n,onPrevDecades:()=>{u(-1)},onNextDecades:()=>{u(1)}}),null),g(aO,V(V({},t),{},{prefixCls:n,onSelect:d}),null)])}lO.displayName="DecadePanel";lO.inheritAttrs=!1;const gm=7;function ou(e,t){if(!e&&!t)return!0;if(!e||!t)return!1}function pme(e,t,n){const o=ou(t,n);if(typeof o=="boolean")return o;const r=Math.floor(e.getYear(t)/10),i=Math.floor(e.getYear(n)/10);return r===i}function $y(e,t,n){const o=ou(t,n);return typeof o=="boolean"?o:e.getYear(t)===e.getYear(n)}function Ox(e,t){return Math.floor(e.getMonth(t)/3)+1}function dB(e,t,n){const o=ou(t,n);return typeof o=="boolean"?o:$y(e,t,n)&&Ox(e,t)===Ox(e,n)}function sO(e,t,n){const o=ou(t,n);return typeof o=="boolean"?o:$y(e,t,n)&&e.getMonth(t)===e.getMonth(n)}function gl(e,t,n){const o=ou(t,n);return typeof o=="boolean"?o:e.getYear(t)===e.getYear(n)&&e.getMonth(t)===e.getMonth(n)&&e.getDate(t)===e.getDate(n)}function hme(e,t,n){const o=ou(t,n);return typeof o=="boolean"?o:e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n)}function fB(e,t,n,o){const r=ou(n,o);return typeof r=="boolean"?r:e.locale.getWeek(t,n)===e.locale.getWeek(t,o)}function fd(e,t,n){return gl(e,t,n)&&hme(e,t,n)}function Rv(e,t,n,o){return!t||!n||!o?!1:!gl(e,t,o)&&!gl(e,n,o)&&e.isAfter(o,t)&&e.isAfter(n,o)}function gme(e,t,n){const o=t.locale.getWeekFirstDay(e),r=t.setDate(n,1),i=t.getWeekDay(r);let a=t.addDate(r,o-i);return t.getMonth(a)===t.getMonth(n)&&t.getDate(a)>1&&(a=t.addDate(a,-7)),a}function wp(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(t){case"year":return n.addYear(e,o*10);case"quarter":case"month":return n.addYear(e,o);default:return n.addMonth(e,o)}}function Wo(e,t){let{generateConfig:n,locale:o,format:r}=t;return typeof r=="function"?r(e):n.locale.format(o.locale,e,r)}function pB(e,t){let{generateConfig:n,locale:o,formatList:r}=t;return!e||typeof r[0]=="function"?null:n.locale.parse(o.locale,e,r)}function Ix(e){let{cellDate:t,mode:n,disabledDate:o,generateConfig:r}=e;if(!o)return!1;const i=(a,l,s)=>{let c=l;for(;c<=s;){let u;switch(a){case"date":{if(u=r.setDate(t,c),!o(u))return!1;break}case"month":{if(u=r.setMonth(t,c),!Ix({cellDate:u,mode:"month",generateConfig:r,disabledDate:o}))return!1;break}case"year":{if(u=r.setYear(t,c),!Ix({cellDate:u,mode:"year",generateConfig:r,disabledDate:o}))return!1;break}}c+=1}return!0};switch(n){case"date":case"week":return o(t);case"month":{const l=r.getDate(r.getEndDate(t));return i("date",1,l)}case"quarter":{const a=Math.floor(r.getMonth(t)/3)*3,l=a+2;return i("month",a,l)}case"year":return i("month",0,11);case"decade":{const a=r.getYear(t),l=Math.floor(a/Ji)*Ji,s=l+Ji-1;return i("year",l,s)}}}function cO(e){const t=to(e),{hideHeader:n}=Fa();if(n.value)return null;const{prefixCls:o,generateConfig:r,locale:i,value:a,format:l}=t,s=`${o}-header`;return g(Rs,{prefixCls:s},{default:()=>[a?Wo(a,{locale:i,format:l,generateConfig:r}):" "]})}cO.displayName="TimeHeader";cO.inheritAttrs=!1;const Dv=pe({name:"TimeUnitColumn",props:["prefixCls","units","onSelect","value","active","hideDisabledOptions"],setup(e){const{open:t}=Fa(),n=ve(null),o=he(new Map),r=he();return Ie(()=>e.value,()=>{const i=o.value.get(e.value);i&&t.value!==!1&&_x(n.value,i.offsetTop,120)}),Ct(()=>{var i;(i=r.value)===null||i===void 0||i.call(r)}),Ie(t,()=>{var i;(i=r.value)===null||i===void 0||i.call(r),wt(()=>{if(t.value){const a=o.value.get(e.value);a&&(r.value=ime(a,()=>{_x(n.value,a.offsetTop,0)}))}})},{immediate:!0,flush:"post"}),()=>{const{prefixCls:i,units:a,onSelect:l,value:s,active:c,hideDisabledOptions:u}=e,d=`${i}-cell`;return g("ul",{class:me(`${i}-column`,{[`${i}-column-active`]:c}),ref:n,style:{position:"relative"}},[a.map(f=>u&&f.disabled?null:g("li",{key:f.value,ref:h=>{o.value.set(f.value,h)},class:me(d,{[`${d}-disabled`]:f.disabled,[`${d}-selected`]:s===f.value}),onClick:()=>{f.disabled||l(f.value)}},[g("div",{class:`${d}-inner`},[f.label])]))])}}});function hB(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",o=String(e);for(;o.length{(n.startsWith("data-")||n.startsWith("aria-")||n==="role"||n==="name")&&!n.startsWith("data-__")&&(t[n]=e[n])}),t}function rn(e,t){return e?e[t]:null}function Ii(e,t,n){const o=[rn(e,0),rn(e,1)];return o[n]=typeof t=="function"?t(o[n]):t,!o[0]&&!o[1]?null:o}function pC(e,t,n,o){const r=[];for(let i=e;i<=t;i+=n)r.push({label:hB(i,2),value:i,disabled:(o||[]).includes(i)});return r}const mme=pe({compatConfig:{MODE:3},name:"TimeBody",inheritAttrs:!1,props:["generateConfig","prefixCls","operationRef","activeColumnIndex","value","showHour","showMinute","showSecond","use12Hours","hourStep","minuteStep","secondStep","disabledHours","disabledMinutes","disabledSeconds","disabledTime","hideDisabledOptions","onSelect"],setup(e){const t=M(()=>e.value?e.generateConfig.getHour(e.value):-1),n=M(()=>e.use12Hours?t.value>=12:!1),o=M(()=>e.use12Hours?t.value%12:t.value),r=M(()=>e.value?e.generateConfig.getMinute(e.value):-1),i=M(()=>e.value?e.generateConfig.getSecond(e.value):-1),a=he(e.generateConfig.getNow()),l=he(),s=he(),c=he();Eb(()=>{a.value=e.generateConfig.getNow()}),ct(()=>{if(e.disabledTime){const y=e.disabledTime(a);[l.value,s.value,c.value]=[y.disabledHours,y.disabledMinutes,y.disabledSeconds]}else[l.value,s.value,c.value]=[e.disabledHours,e.disabledMinutes,e.disabledSeconds]});const u=(y,b,$,x)=>{let _=e.value||e.generateConfig.getNow();const w=Math.max(0,b),I=Math.max(0,$),O=Math.max(0,x);return _=lB(e.generateConfig,_,!e.use12Hours||!y?w:w+12,I,O),_},d=M(()=>{var y;return pC(0,23,(y=e.hourStep)!==null&&y!==void 0?y:1,l.value&&l.value())}),f=M(()=>{if(!e.use12Hours)return[!1,!1];const y=[!0,!0];return d.value.forEach(b=>{let{disabled:$,value:x}=b;$||(x>=12?y[1]=!1:y[0]=!1)}),y}),h=M(()=>e.use12Hours?d.value.filter(n.value?y=>y.value>=12:y=>y.value<12).map(y=>{const b=y.value%12,$=b===0?"12":hB(b,2);return S(S({},y),{label:$,value:b})}):d.value),m=M(()=>{var y;return pC(0,59,(y=e.minuteStep)!==null&&y!==void 0?y:1,s.value&&s.value(t.value))}),v=M(()=>{var y;return pC(0,59,(y=e.secondStep)!==null&&y!==void 0?y:1,c.value&&c.value(t.value,r.value))});return()=>{const{prefixCls:y,operationRef:b,activeColumnIndex:$,showHour:x,showMinute:_,showSecond:w,use12Hours:I,hideDisabledOptions:O,onSelect:P}=e,E=[],R=`${y}-content`,A=`${y}-time-panel`;b.value={onUpDown:W=>{const D=E[$];if(D){const B=D.units.findIndex(L=>L.value===D.value),k=D.units.length;for(let L=1;L{P(u(n.value,W,r.value,i.value),"mouse")}),N(_,g(Dv,{key:"minute"},null),r.value,m.value,W=>{P(u(n.value,o.value,W,i.value),"mouse")}),N(w,g(Dv,{key:"second"},null),i.value,v.value,W=>{P(u(n.value,o.value,r.value,W),"mouse")});let F=-1;return typeof n.value=="boolean"&&(F=n.value?1:0),N(I===!0,g(Dv,{key:"12hours"},null),F,[{label:"AM",value:0,disabled:f.value[0]},{label:"PM",value:1,disabled:f.value[1]}],W=>{P(u(!!W,o.value,r.value,i.value),"mouse")}),g("div",{class:R},[E.map(W=>{let{node:D}=W;return D})])}}}),bme=mme,yme=e=>e.filter(t=>t!==!1).length;function xy(e){const t=to(e),{generateConfig:n,format:o="HH:mm:ss",prefixCls:r,active:i,operationRef:a,showHour:l,showMinute:s,showSecond:c,use12Hours:u=!1,onSelect:d,value:f}=t,h=`${r}-time-panel`,m=he(),v=he(-1),y=yme([l,s,c,u]);return a.value={onKeydown:b=>pf(b,{onLeftRight:$=>{v.value=(v.value+$+y)%y},onUpDown:$=>{v.value===-1?v.value=0:m.value&&m.value.onUpDown($)},onEnter:()=>{d(f||n.getNow(),"key"),v.value=-1}}),onBlur:()=>{v.value=-1}},g("div",{class:me(h,{[`${h}-active`]:i})},[g(cO,V(V({},t),{},{format:o,prefixCls:r}),null),g(bme,V(V({},t),{},{prefixCls:r,activeColumnIndex:v.value,operationRef:m}),null)])}xy.displayName="TimePanel";xy.inheritAttrs=!1;function wy(e){let{cellPrefixCls:t,generateConfig:n,rangedValue:o,hoverRangedValue:r,isInView:i,isSameCell:a,offsetCell:l,today:s,value:c}=e;function u(d){const f=l(d,-1),h=l(d,1),m=rn(o,0),v=rn(o,1),y=rn(r,0),b=rn(r,1),$=Rv(n,y,b,d);function x(E){return a(m,E)}function _(E){return a(v,E)}const w=a(y,d),I=a(b,d),O=($||I)&&(!i(f)||_(f)),P=($||w)&&(!i(h)||x(h));return{[`${t}-in-view`]:i(d),[`${t}-in-range`]:Rv(n,m,v,d),[`${t}-range-start`]:x(d),[`${t}-range-end`]:_(d),[`${t}-range-start-single`]:x(d)&&!v,[`${t}-range-end-single`]:_(d)&&!m,[`${t}-range-start-near-hover`]:x(d)&&(a(f,y)||Rv(n,y,b,f)),[`${t}-range-end-near-hover`]:_(d)&&(a(h,b)||Rv(n,y,b,h)),[`${t}-range-hover`]:$,[`${t}-range-hover-start`]:w,[`${t}-range-hover-end`]:I,[`${t}-range-hover-edge-start`]:O,[`${t}-range-hover-edge-end`]:P,[`${t}-range-hover-edge-start-near-range`]:O&&a(f,v),[`${t}-range-hover-edge-end-near-range`]:P&&a(h,m),[`${t}-today`]:a(s,d),[`${t}-selected`]:a(c,d)}}return u}const mB=Symbol("RangeContextProps"),Sme=e=>{ft(mB,e)},Gh=()=>it(mB,{rangedValue:he(),hoverRangedValue:he(),inRange:he(),panelPosition:he()}),Cme=pe({compatConfig:{MODE:3},name:"PanelContextProvider",inheritAttrs:!1,props:{value:{type:Object,default:()=>({})}},setup(e,t){let{slots:n}=t;const o={rangedValue:he(e.value.rangedValue),hoverRangedValue:he(e.value.hoverRangedValue),inRange:he(e.value.inRange),panelPosition:he(e.value.panelPosition)};return Sme(o),Ie(()=>e.value,()=>{Object.keys(e.value).forEach(r=>{o[r]&&(o[r].value=e.value[r])})}),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});function _y(e){const t=to(e),{prefixCls:n,generateConfig:o,prefixColumn:r,locale:i,rowCount:a,viewDate:l,value:s,dateRender:c}=t,{rangedValue:u,hoverRangedValue:d}=Gh(),f=gme(i.locale,o,l),h=`${n}-cell`,m=o.locale.getWeekFirstDay(i.locale),v=o.getNow(),y=[],b=i.shortWeekDays||(o.locale.getShortWeekDays?o.locale.getShortWeekDays(i.locale):[]);r&&y.push(g("th",{key:"empty","aria-label":"empty cell"},null));for(let _=0;_gl(o,_,w),isInView:_=>sO(o,_,l),offsetCell:(_,w)=>o.addDate(_,w)}),x=c?_=>c({current:_,today:v}):void 0;return g(nu,V(V({},t),{},{rowNum:a,colNum:gm,baseDate:f,getCellNode:x,getCellText:o.getDate,getCellClassName:$,getCellDate:o.addDate,titleCell:_=>Wo(_,{locale:i,format:"YYYY-MM-DD",generateConfig:o}),headerCells:y}),null)}_y.displayName="DateBody";_y.inheritAttrs=!1;_y.props=["prefixCls","generateConfig","value?","viewDate","locale","rowCount","onSelect","dateRender?","disabledDate?","prefixColumn?","rowClassName?"];function uO(e){const t=to(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextMonth:a,onPrevMonth:l,onNextYear:s,onPrevYear:c,onYearClick:u,onMonthClick:d}=t,{hideHeader:f}=Fa();if(f.value)return null;const h=`${n}-header`,m=r.shortMonths||(o.locale.getShortMonths?o.locale.getShortMonths(r.locale):[]),v=o.getMonth(i),y=g("button",{type:"button",key:"year",onClick:u,tabindex:-1,class:`${n}-year-btn`},[Wo(i,{locale:r,format:r.yearFormat,generateConfig:o})]),b=g("button",{type:"button",key:"month",onClick:d,tabindex:-1,class:`${n}-month-btn`},[r.monthFormat?Wo(i,{locale:r,format:r.monthFormat,generateConfig:o}):m[v]]),$=r.monthBeforeYear?[b,y]:[y,b];return g(Rs,V(V({},t),{},{prefixCls:h,onSuperPrev:c,onPrev:l,onNext:a,onSuperNext:s}),{default:()=>[$]})}uO.displayName="DateHeader";uO.inheritAttrs=!1;const $me=6;function Yh(e){const t=to(e),{prefixCls:n,panelName:o="date",keyboardConfig:r,active:i,operationRef:a,generateConfig:l,value:s,viewDate:c,onViewDateChange:u,onPanelChange:d,onSelect:f}=t,h=`${n}-${o}-panel`;a.value={onKeydown:y=>pf(y,S({onLeftRight:b=>{f(l.addDate(s||c,b),"key")},onCtrlLeftRight:b=>{f(l.addYear(s||c,b),"key")},onUpDown:b=>{f(l.addDate(s||c,b*gm),"key")},onPageUpDown:b=>{f(l.addMonth(s||c,b),"key")}},r))};const m=y=>{const b=l.addYear(c,y);u(b),d(null,b)},v=y=>{const b=l.addMonth(c,y);u(b),d(null,b)};return g("div",{class:me(h,{[`${h}-active`]:i})},[g(uO,V(V({},t),{},{prefixCls:n,value:s,viewDate:c,onPrevYear:()=>{m(-1)},onNextYear:()=>{m(1)},onPrevMonth:()=>{v(-1)},onNextMonth:()=>{v(1)},onMonthClick:()=>{d("month",c)},onYearClick:()=>{d("year",c)}}),null),g(_y,V(V({},t),{},{onSelect:y=>f(y,"mouse"),prefixCls:n,value:s,viewDate:c,rowCount:$me}),null)])}Yh.displayName="DatePanel";Yh.inheritAttrs=!1;const HM=vme("date","time");function dO(e){const t=to(e),{prefixCls:n,operationRef:o,generateConfig:r,value:i,defaultValue:a,disabledTime:l,showTime:s,onSelect:c}=t,u=`${n}-datetime-panel`,d=he(null),f=he({}),h=he({}),m=typeof s=="object"?S({},s):{};function v(x){const _=HM.indexOf(d.value)+x;return HM[_]||null}const y=x=>{h.value.onBlur&&h.value.onBlur(x),d.value=null};o.value={onKeydown:x=>{if(x.which===Fe.TAB){const _=v(x.shiftKey?-1:1);return d.value=_,_&&x.preventDefault(),!0}if(d.value){const _=d.value==="date"?f:h;return _.value&&_.value.onKeydown&&_.value.onKeydown(x),!0}return[Fe.LEFT,Fe.RIGHT,Fe.UP,Fe.DOWN].includes(x.which)?(d.value="date",!0):!1},onBlur:y,onClose:y};const b=(x,_)=>{let w=x;_==="date"&&!i&&m.defaultValue?(w=r.setHour(w,r.getHour(m.defaultValue)),w=r.setMinute(w,r.getMinute(m.defaultValue)),w=r.setSecond(w,r.getSecond(m.defaultValue))):_==="time"&&!i&&a&&(w=r.setYear(w,r.getYear(a)),w=r.setMonth(w,r.getMonth(a)),w=r.setDate(w,r.getDate(a))),c&&c(w,"mouse")},$=l?l(i||null):{};return g("div",{class:me(u,{[`${u}-active`]:d.value})},[g(Yh,V(V({},t),{},{operationRef:f,active:d.value==="date",onSelect:x=>{b(hm(r,x,!i&&typeof s=="object"?s.defaultValue:null),"date")}}),null),g(xy,V(V(V(V({},t),{},{format:void 0},m),$),{},{disabledTime:null,defaultValue:void 0,operationRef:h,active:d.value==="time",onSelect:x=>{b(x,"time")}}),null)])}dO.displayName="DatetimePanel";dO.inheritAttrs=!1;function fO(e){const t=to(e),{prefixCls:n,generateConfig:o,locale:r,value:i}=t,a=`${n}-cell`,l=u=>g("td",{key:"week",class:me(a,`${a}-week`)},[o.locale.getWeek(r.locale,u)]),s=`${n}-week-panel-row`,c=u=>me(s,{[`${s}-selected`]:fB(o,r.locale,i,u)});return g(Yh,V(V({},t),{},{panelName:"week",prefixColumn:l,rowClassName:c,keyboardConfig:{onLeftRight:null}}),null)}fO.displayName="WeekPanel";fO.inheritAttrs=!1;function pO(e){const t=to(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextYear:a,onPrevYear:l,onYearClick:s}=t,{hideHeader:c}=Fa();if(c.value)return null;const u=`${n}-header`;return g(Rs,V(V({},t),{},{prefixCls:u,onSuperPrev:l,onSuperNext:a}),{default:()=>[g("button",{type:"button",onClick:s,class:`${n}-year-btn`},[Wo(i,{locale:r,format:r.yearFormat,generateConfig:o})])]})}pO.displayName="MonthHeader";pO.inheritAttrs=!1;const bB=3,xme=4;function hO(e){const t=to(e),{prefixCls:n,locale:o,value:r,viewDate:i,generateConfig:a,monthCellRender:l}=t,{rangedValue:s,hoverRangedValue:c}=Gh(),u=`${n}-cell`,d=wy({cellPrefixCls:u,value:r,generateConfig:a,rangedValue:s.value,hoverRangedValue:c.value,isSameCell:(v,y)=>sO(a,v,y),isInView:()=>!0,offsetCell:(v,y)=>a.addMonth(v,y)}),f=o.shortMonths||(a.locale.getShortMonths?a.locale.getShortMonths(o.locale):[]),h=a.setMonth(i,0),m=l?v=>l({current:v,locale:o}):void 0;return g(nu,V(V({},t),{},{rowNum:xme,colNum:bB,baseDate:h,getCellNode:m,getCellText:v=>o.monthFormat?Wo(v,{locale:o,format:o.monthFormat,generateConfig:a}):f[a.getMonth(v)],getCellClassName:d,getCellDate:a.addMonth,titleCell:v=>Wo(v,{locale:o,format:"YYYY-MM",generateConfig:a})}),null)}hO.displayName="MonthBody";hO.inheritAttrs=!1;function gO(e){const t=to(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:a,viewDate:l,onPanelChange:s,onSelect:c}=t,u=`${n}-month-panel`;o.value={onKeydown:f=>pf(f,{onLeftRight:h=>{c(i.addMonth(a||l,h),"key")},onCtrlLeftRight:h=>{c(i.addYear(a||l,h),"key")},onUpDown:h=>{c(i.addMonth(a||l,h*bB),"key")},onEnter:()=>{s("date",a||l)}})};const d=f=>{const h=i.addYear(l,f);r(h),s(null,h)};return g("div",{class:u},[g(pO,V(V({},t),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{s("year",l)}}),null),g(hO,V(V({},t),{},{prefixCls:n,onSelect:f=>{c(f,"mouse"),s("date",f)}}),null)])}gO.displayName="MonthPanel";gO.inheritAttrs=!1;function vO(e){const t=to(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextYear:a,onPrevYear:l,onYearClick:s}=t,{hideHeader:c}=Fa();if(c.value)return null;const u=`${n}-header`;return g(Rs,V(V({},t),{},{prefixCls:u,onSuperPrev:l,onSuperNext:a}),{default:()=>[g("button",{type:"button",onClick:s,class:`${n}-year-btn`},[Wo(i,{locale:r,format:r.yearFormat,generateConfig:o})])]})}vO.displayName="QuarterHeader";vO.inheritAttrs=!1;const wme=4,_me=1;function mO(e){const t=to(e),{prefixCls:n,locale:o,value:r,viewDate:i,generateConfig:a}=t,{rangedValue:l,hoverRangedValue:s}=Gh(),c=`${n}-cell`,u=wy({cellPrefixCls:c,value:r,generateConfig:a,rangedValue:l.value,hoverRangedValue:s.value,isSameCell:(f,h)=>dB(a,f,h),isInView:()=>!0,offsetCell:(f,h)=>a.addMonth(f,h*3)}),d=a.setDate(a.setMonth(i,0),1);return g(nu,V(V({},t),{},{rowNum:_me,colNum:wme,baseDate:d,getCellText:f=>Wo(f,{locale:o,format:o.quarterFormat||"[Q]Q",generateConfig:a}),getCellClassName:u,getCellDate:(f,h)=>a.addMonth(f,h*3),titleCell:f=>Wo(f,{locale:o,format:"YYYY-[Q]Q",generateConfig:a})}),null)}mO.displayName="QuarterBody";mO.inheritAttrs=!1;function bO(e){const t=to(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:a,viewDate:l,onPanelChange:s,onSelect:c}=t,u=`${n}-quarter-panel`;o.value={onKeydown:f=>pf(f,{onLeftRight:h=>{c(i.addMonth(a||l,h*3),"key")},onCtrlLeftRight:h=>{c(i.addYear(a||l,h),"key")},onUpDown:h=>{c(i.addYear(a||l,h),"key")}})};const d=f=>{const h=i.addYear(l,f);r(h),s(null,h)};return g("div",{class:u},[g(vO,V(V({},t),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{s("year",l)}}),null),g(mO,V(V({},t),{},{prefixCls:n,onSelect:f=>{c(f,"mouse")}}),null)])}bO.displayName="QuarterPanel";bO.inheritAttrs=!1;function yO(e){const t=to(e),{prefixCls:n,generateConfig:o,viewDate:r,onPrevDecade:i,onNextDecade:a,onDecadeClick:l}=t,{hideHeader:s}=Fa();if(s.value)return null;const c=`${n}-header`,u=o.getYear(r),d=Math.floor(u/ps)*ps,f=d+ps-1;return g(Rs,V(V({},t),{},{prefixCls:c,onSuperPrev:i,onSuperNext:a}),{default:()=>[g("button",{type:"button",onClick:l,class:`${n}-decade-btn`},[d,Do("-"),f])]})}yO.displayName="YearHeader";yO.inheritAttrs=!1;const Px=3,zM=4;function SO(e){const t=to(e),{prefixCls:n,value:o,viewDate:r,locale:i,generateConfig:a}=t,{rangedValue:l,hoverRangedValue:s}=Gh(),c=`${n}-cell`,u=a.getYear(r),d=Math.floor(u/ps)*ps,f=d+ps-1,h=a.setYear(r,d-Math.ceil((Px*zM-ps)/2)),m=y=>{const b=a.getYear(y);return d<=b&&b<=f},v=wy({cellPrefixCls:c,value:o,generateConfig:a,rangedValue:l.value,hoverRangedValue:s.value,isSameCell:(y,b)=>$y(a,y,b),isInView:m,offsetCell:(y,b)=>a.addYear(y,b)});return g(nu,V(V({},t),{},{rowNum:zM,colNum:Px,baseDate:h,getCellText:a.getYear,getCellClassName:v,getCellDate:a.addYear,titleCell:y=>Wo(y,{locale:i,format:"YYYY",generateConfig:a})}),null)}SO.displayName="YearBody";SO.inheritAttrs=!1;const ps=10;function CO(e){const t=to(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:a,viewDate:l,sourceMode:s,onSelect:c,onPanelChange:u}=t,d=`${n}-year-panel`;o.value={onKeydown:h=>pf(h,{onLeftRight:m=>{c(i.addYear(a||l,m),"key")},onCtrlLeftRight:m=>{c(i.addYear(a||l,m*ps),"key")},onUpDown:m=>{c(i.addYear(a||l,m*Px),"key")},onEnter:()=>{u(s==="date"?"date":"month",a||l)}})};const f=h=>{const m=i.addYear(l,h*10);r(m),u(null,m)};return g("div",{class:d},[g(yO,V(V({},t),{},{prefixCls:n,onPrevDecade:()=>{f(-1)},onNextDecade:()=>{f(1)},onDecadeClick:()=>{u("decade",l)}}),null),g(SO,V(V({},t),{},{prefixCls:n,onSelect:h=>{u(s==="date"?"date":"month",h),c(h,"mouse")}}),null)])}CO.displayName="YearPanel";CO.inheritAttrs=!1;function yB(e,t,n){return n?g("div",{class:`${e}-footer-extra`},[n(t)]):null}function SB(e){let{prefixCls:t,components:n={},needConfirmButton:o,onNow:r,onOk:i,okDisabled:a,showNow:l,locale:s}=e,c,u;if(o){const d=n.button||"button";r&&l!==!1&&(c=g("li",{class:`${t}-now`},[g("a",{class:`${t}-now-btn`,onClick:r},[s.now])])),u=o&&g("li",{class:`${t}-ok`},[g(d,{disabled:a,onClick:f=>{f.stopPropagation(),i&&i()}},{default:()=>[s.ok]})])}return!c&&!u?null:g("ul",{class:`${t}-ranges`},[c,u])}function Ome(){return pe({name:"PickerPanel",inheritAttrs:!1,props:{prefixCls:String,locale:Object,generateConfig:Object,value:Object,defaultValue:Object,pickerValue:Object,defaultPickerValue:Object,disabledDate:Function,mode:String,picker:{type:String,default:"date"},tabindex:{type:[Number,String],default:0},showNow:{type:Boolean,default:void 0},showTime:[Boolean,Object],showToday:Boolean,renderExtraFooter:Function,dateRender:Function,hideHeader:{type:Boolean,default:void 0},onSelect:Function,onChange:Function,onPanelChange:Function,onMousedown:Function,onPickerValueChange:Function,onOk:Function,components:Object,direction:String,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1}},setup(e,t){let{attrs:n}=t;const o=M(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),r=M(()=>24%e.hourStep===0),i=M(()=>60%e.minuteStep===0),a=M(()=>60%e.secondStep===0),l=Fa(),{operationRef:s,onSelect:c,hideRanges:u,defaultOpenValue:d}=l,{inRange:f,panelPosition:h,rangedValue:m,hoverRangedValue:v}=Gh(),y=he({}),[b,$]=yn(null,{value:st(e,"value"),defaultValue:e.defaultValue,postState:k=>!k&&(d!=null&&d.value)&&e.picker==="time"?d.value:k}),[x,_]=yn(null,{value:st(e,"pickerValue"),defaultValue:e.defaultPickerValue||b.value,postState:k=>{const{generateConfig:L,showTime:z,defaultValue:K}=e,G=L.getNow();return k?!b.value&&e.showTime?typeof z=="object"?hm(L,Array.isArray(k)?k[0]:k,z.defaultValue||G):K?hm(L,Array.isArray(k)?k[0]:k,K):hm(L,Array.isArray(k)?k[0]:k,G):k:G}}),w=k=>{_(k),e.onPickerValueChange&&e.onPickerValueChange(k)},I=k=>{const L=fme[e.picker];return L?L(k):k},[O,P]=yn(()=>e.picker==="time"?"time":I("date"),{value:st(e,"mode")});Ie(()=>e.picker,()=>{P(e.picker)});const E=he(O.value),R=k=>{E.value=k},A=(k,L)=>{const{onPanelChange:z,generateConfig:K}=e,G=I(k||O.value);R(O.value),P(G),z&&(O.value!==G||fd(K,x.value,x.value))&&z(L,G)},N=function(k,L){let z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{picker:K,generateConfig:G,onSelect:Y,onChange:ne,disabledDate:re}=e;(O.value===K||z)&&($(k),Y&&Y(k),c&&c(k,L),ne&&!fd(G,k,b.value)&&!(re!=null&&re(k))&&ne(k))},F=k=>y.value&&y.value.onKeydown?([Fe.LEFT,Fe.RIGHT,Fe.UP,Fe.DOWN,Fe.PAGE_UP,Fe.PAGE_DOWN,Fe.ENTER].includes(k.which)&&k.preventDefault(),y.value.onKeydown(k)):!1,W=k=>{y.value&&y.value.onBlur&&y.value.onBlur(k)},D=()=>{const{generateConfig:k,hourStep:L,minuteStep:z,secondStep:K}=e,G=k.getNow(),Y=ome(k.getHour(G),k.getMinute(G),k.getSecond(G),r.value?L:1,i.value?z:1,a.value?K:1),ne=lB(k,G,Y[0],Y[1],Y[2]);N(ne,"submit")},B=M(()=>{const{prefixCls:k,direction:L}=e;return me(`${k}-panel`,{[`${k}-panel-has-range`]:m&&m.value&&m.value[0]&&m.value[1],[`${k}-panel-has-range-hover`]:v&&v.value&&v.value[0]&&v.value[1],[`${k}-panel-rtl`]:L==="rtl"})});return rO(S(S({},l),{mode:O,hideHeader:M(()=>{var k;return e.hideHeader!==void 0?e.hideHeader:(k=l.hideHeader)===null||k===void 0?void 0:k.value}),hidePrevBtn:M(()=>f.value&&h.value==="right"),hideNextBtn:M(()=>f.value&&h.value==="left")})),Ie(()=>e.value,()=>{e.value&&_(e.value)}),()=>{const{prefixCls:k="ant-picker",locale:L,generateConfig:z,disabledDate:K,picker:G="date",tabindex:Y=0,showNow:ne,showTime:re,showToday:J,renderExtraFooter:te,onMousedown:ee,onOk:fe,components:ie}=e;s&&h.value!=="right"&&(s.value={onKeydown:F,onClose:()=>{y.value&&y.value.onClose&&y.value.onClose()}});let X;const ue=S(S(S({},n),e),{operationRef:y,prefixCls:k,viewDate:x.value,value:b.value,onViewDateChange:w,sourceMode:E.value,onPanelChange:A,disabledDate:K});switch(delete ue.onChange,delete ue.onSelect,O.value){case"decade":X=g(lO,V(V({},ue),{},{onSelect:(q,se)=>{w(q),N(q,se)}}),null);break;case"year":X=g(CO,V(V({},ue),{},{onSelect:(q,se)=>{w(q),N(q,se)}}),null);break;case"month":X=g(gO,V(V({},ue),{},{onSelect:(q,se)=>{w(q),N(q,se)}}),null);break;case"quarter":X=g(bO,V(V({},ue),{},{onSelect:(q,se)=>{w(q),N(q,se)}}),null);break;case"week":X=g(fO,V(V({},ue),{},{onSelect:(q,se)=>{w(q),N(q,se)}}),null);break;case"time":delete ue.showTime,X=g(xy,V(V(V({},ue),typeof re=="object"?re:null),{},{onSelect:(q,se)=>{w(q),N(q,se)}}),null);break;default:re?X=g(dO,V(V({},ue),{},{onSelect:(q,se)=>{w(q),N(q,se)}}),null):X=g(Yh,V(V({},ue),{},{onSelect:(q,se)=>{w(q),N(q,se)}}),null)}let ye,H;u!=null&&u.value||(ye=yB(k,O.value,te),H=SB({prefixCls:k,components:ie,needConfirmButton:o.value,okDisabled:!b.value||K&&K(b.value),locale:L,showNow:ne,onNow:o.value&&D,onOk:()=>{b.value&&(N(b.value,"submit",!0),fe&&fe(b.value))}}));let j;if(J&&O.value==="date"&&G==="date"&&!re){const q=z.getNow(),se=`${k}-today-btn`,ae=K&&K(q);j=g("a",{class:me(se,ae&&`${se}-disabled`),"aria-disabled":ae,onClick:()=>{ae||N(q,"mouse",!0)}},[L.today])}return g("div",{tabindex:Y,class:me(B.value,n.class),style:n.style,onKeydown:F,onBlur:W,onMousedown:ee},[X,ye||H||j?g("div",{class:`${k}-footer`},[ye,H,j]):null])}}})}const Ime=Ome(),$O=e=>g(Ime,e),Pme={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function CB(e,t){let{slots:n}=t;const{prefixCls:o,popupStyle:r,visible:i,dropdownClassName:a,dropdownAlign:l,transitionName:s,getPopupContainer:c,range:u,popupPlacement:d,direction:f}=to(e),h=`${o}-dropdown`;return g(tu,{showAction:[],hideAction:[],popupPlacement:d!==void 0?d:f==="rtl"?"bottomRight":"bottomLeft",builtinPlacements:Pme,prefixCls:h,popupTransitionName:s,popupAlign:l,popupVisible:i,popupClassName:me(a,{[`${h}-range`]:u,[`${h}-rtl`]:f==="rtl"}),popupStyle:r,getPopupContainer:c},{default:n.default,popup:n.popupElement})}const $B=pe({name:"PresetPanel",props:{prefixCls:String,presets:{type:Array,default:()=>[]},onClick:Function,onHover:Function},setup(e){return()=>e.presets.length?g("div",{class:`${e.prefixCls}-presets`},[g("ul",null,[e.presets.map((t,n)=>{let{label:o,value:r}=t;return g("li",{key:n,onClick:()=>{e.onClick(r)},onMouseenter:()=>{var i;(i=e.onHover)===null||i===void 0||i.call(e,r)},onMouseleave:()=>{var i;(i=e.onHover)===null||i===void 0||i.call(e,null)}},[o])})])]):null}});function Tx(e){let{open:t,value:n,isClickOutside:o,triggerOpen:r,forwardKeydown:i,onKeydown:a,blurToCancel:l,onSubmit:s,onCancel:c,onFocus:u,onBlur:d}=e;const f=ve(!1),h=ve(!1),m=ve(!1),v=ve(!1),y=ve(!1),b=M(()=>({onMousedown:()=>{f.value=!0,r(!0)},onKeydown:x=>{if(a(x,()=>{y.value=!0}),!y.value){switch(x.which){case Fe.ENTER:{t.value?s()!==!1&&(f.value=!0):r(!0),x.preventDefault();return}case Fe.TAB:{f.value&&t.value&&!x.shiftKey?(f.value=!1,x.preventDefault()):!f.value&&t.value&&!i(x)&&x.shiftKey&&(f.value=!0,x.preventDefault());return}case Fe.ESC:{f.value=!0,c();return}}!t.value&&![Fe.SHIFT].includes(x.which)?r(!0):f.value||i(x)}},onFocus:x=>{f.value=!0,h.value=!0,u&&u(x)},onBlur:x=>{if(m.value||!o(document.activeElement)){m.value=!1;return}l.value?setTimeout(()=>{let{activeElement:_}=document;for(;_&&_.shadowRoot;)_=_.shadowRoot.activeElement;o(_)&&c()},0):t.value&&(r(!1),v.value&&s()),h.value=!1,d&&d(x)}}));Ie(t,()=>{v.value=!1}),Ie(n,()=>{v.value=!0});const $=ve();return lt(()=>{$.value=ame(x=>{const _=lme(x);if(t.value){const w=o(_);w?(!h.value||w)&&r(!1):(m.value=!0,mt(()=>{m.value=!1}))}})}),Ct(()=>{$.value&&$.value()}),[b,{focused:h,typing:f}]}function Ex(e){let{valueTexts:t,onTextChange:n}=e;const o=he("");function r(a){o.value=a,n(a)}function i(){o.value=t.value[0]}return Ie(()=>[...t.value],function(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];a.join("||")!==l.join("||")&&t.value.every(s=>s!==o.value)&&i()},{immediate:!0}),[o,r,i]}function R0(e,t){let{formatList:n,generateConfig:o,locale:r}=t;const i=a_(()=>{if(!e.value)return[[""],""];let s="";const c=[];for(let u=0;uc[0]!==s[0]||!Vu(c[1],s[1])),a=M(()=>i.value[0]),l=M(()=>i.value[1]);return[a,l]}function Ax(e,t){let{formatList:n,generateConfig:o,locale:r}=t;const i=he(null);let a;function l(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(mt.cancel(a),f){i.value=d;return}a=mt(()=>{i.value=d})}const[,s]=R0(i,{formatList:n,generateConfig:o,locale:r});function c(d){l(d)}function u(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;l(null,d)}return Ie(e,()=>{u(!0)}),Ct(()=>{mt.cancel(a)}),[s,c,u]}function xB(e,t){return M(()=>e!=null&&e.value?e.value:t!=null&&t.value?(Hb(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.keys(t.value).map(o=>{const r=t.value[o],i=typeof r=="function"?r():r;return{label:o,value:i}})):[])}function Tme(){return pe({name:"Picker",inheritAttrs:!1,props:["prefixCls","id","tabindex","dropdownClassName","dropdownAlign","popupStyle","transitionName","generateConfig","locale","inputReadOnly","allowClear","autofocus","showTime","showNow","showHour","showMinute","showSecond","picker","format","use12Hours","value","defaultValue","open","defaultOpen","defaultOpenValue","suffixIcon","presets","clearIcon","disabled","disabledDate","placeholder","getPopupContainer","panelRender","inputRender","onChange","onOpenChange","onPanelChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu","onClick","onKeydown","onSelect","direction","autocomplete","showToday","renderExtraFooter","dateRender","minuteStep","hourStep","secondStep","hideDisabledOptions"],setup(e,t){let{attrs:n,expose:o}=t;const r=he(null),i=M(()=>e.presets),a=xB(i),l=M(()=>{var K;return(K=e.picker)!==null&&K!==void 0?K:"date"}),s=M(()=>l.value==="date"&&!!e.showTime||l.value==="time"),c=M(()=>gB(sB(e.format,l.value,e.showTime,e.use12Hours))),u=he(null),d=he(null),f=he(null),[h,m]=yn(null,{value:st(e,"value"),defaultValue:e.defaultValue}),v=he(h.value),y=K=>{v.value=K},b=he(null),[$,x]=yn(!1,{value:st(e,"open"),defaultValue:e.defaultOpen,postState:K=>e.disabled?!1:K,onChange:K=>{e.onOpenChange&&e.onOpenChange(K),!K&&b.value&&b.value.onClose&&b.value.onClose()}}),[_,w]=R0(v,{formatList:c,generateConfig:st(e,"generateConfig"),locale:st(e,"locale")}),[I,O,P]=Ex({valueTexts:_,onTextChange:K=>{const G=pB(K,{locale:e.locale,formatList:c.value,generateConfig:e.generateConfig});G&&(!e.disabledDate||!e.disabledDate(G))&&y(G)}}),E=K=>{const{onChange:G,generateConfig:Y,locale:ne}=e;y(K),m(K),G&&!fd(Y,h.value,K)&&G(K,K?Wo(K,{generateConfig:Y,locale:ne,format:c.value[0]}):"")},R=K=>{e.disabled&&K||x(K)},A=K=>$.value&&b.value&&b.value.onKeydown?b.value.onKeydown(K):!1,N=function(){e.onMouseup&&e.onMouseup(...arguments),r.value&&(r.value.focus(),R(!0))},[F,{focused:W,typing:D}]=Tx({blurToCancel:s,open:$,value:I,triggerOpen:R,forwardKeydown:A,isClickOutside:K=>!uB([u.value,d.value,f.value],K),onSubmit:()=>!v.value||e.disabledDate&&e.disabledDate(v.value)?!1:(E(v.value),R(!1),P(),!0),onCancel:()=>{R(!1),y(h.value),P()},onKeydown:(K,G)=>{var Y;(Y=e.onKeydown)===null||Y===void 0||Y.call(e,K,G)},onFocus:K=>{var G;(G=e.onFocus)===null||G===void 0||G.call(e,K)},onBlur:K=>{var G;(G=e.onBlur)===null||G===void 0||G.call(e,K)}});Ie([$,_],()=>{$.value||(y(h.value),!_.value.length||_.value[0]===""?O(""):w.value!==I.value&&P())}),Ie(l,()=>{$.value||P()}),Ie(h,()=>{y(h.value)});const[B,k,L]=Ax(I,{formatList:c,generateConfig:st(e,"generateConfig"),locale:st(e,"locale")}),z=(K,G)=>{(G==="submit"||G!=="key"&&!s.value)&&(E(K),R(!1))};return rO({operationRef:b,hideHeader:M(()=>l.value==="time"),onSelect:z,open:$,defaultOpenValue:st(e,"defaultOpenValue"),onDateMouseenter:k,onDateMouseleave:L}),o({focus:()=>{r.value&&r.value.focus()},blur:()=>{r.value&&r.value.blur()}}),()=>{const{prefixCls:K="rc-picker",id:G,tabindex:Y,dropdownClassName:ne,dropdownAlign:re,popupStyle:J,transitionName:te,generateConfig:ee,locale:fe,inputReadOnly:ie,allowClear:X,autofocus:ue,picker:ye="date",defaultOpenValue:H,suffixIcon:j,clearIcon:q,disabled:se,placeholder:ae,getPopupContainer:ge,panelRender:Se,onMousedown:$e,onMouseenter:_e,onMouseleave:be,onContextmenu:Te,onClick:Pe,onSelect:oe,direction:le,autocomplete:xe="off"}=e,Ae=S(S(S({},e),n),{class:me({[`${K}-panel-focused`]:!D.value}),style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null});let Be=g("div",{class:`${K}-panel-layout`},[g($B,{prefixCls:K,presets:a.value,onClick:Ue=>{E(Ue),R(!1)}},null),g($O,V(V({},Ae),{},{generateConfig:ee,value:v.value,locale:fe,tabindex:-1,onSelect:Ue=>{oe==null||oe(Ue),y(Ue)},direction:le,onPanelChange:(Ue,Xe)=>{const{onPanelChange:xt}=e;L(!0),xt==null||xt(Ue,Xe)}}),null)]);Se&&(Be=Se(Be));const Ye=g("div",{class:`${K}-panel-container`,ref:u,onMousedown:Ue=>{Ue.preventDefault()}},[Be]);let Re;j&&(Re=g("span",{class:`${K}-suffix`},[j]));let Le;X&&h.value&&!se&&(Le=g("span",{onMousedown:Ue=>{Ue.preventDefault(),Ue.stopPropagation()},onMouseup:Ue=>{Ue.preventDefault(),Ue.stopPropagation(),E(null),R(!1)},class:`${K}-clear`,role:"button"},[q||g("span",{class:`${K}-clear-btn`},null)]));const Ne=S(S(S(S({id:G,tabindex:Y,disabled:se,readonly:ie||typeof c.value[0]=="function"||!D.value,value:B.value||I.value,onInput:Ue=>{O(Ue.target.value)},autofocus:ue,placeholder:ae,ref:r,title:I.value},F.value),{size:cB(ye,c.value[0],ee)}),vB(e)),{autocomplete:xe}),Ke=e.inputRender?e.inputRender(Ne):g("input",Ne,null),Ze=le==="rtl"?"bottomRight":"bottomLeft";return g("div",{ref:f,class:me(K,n.class,{[`${K}-disabled`]:se,[`${K}-focused`]:W.value,[`${K}-rtl`]:le==="rtl"}),style:n.style,onMousedown:$e,onMouseup:N,onMouseenter:_e,onMouseleave:be,onContextmenu:Te,onClick:Pe},[g("div",{class:me(`${K}-input`,{[`${K}-input-placeholder`]:!!B.value}),ref:d},[Ke,Re,Le]),g(CB,{visible:$.value,popupStyle:J,prefixCls:K,dropdownClassName:ne,dropdownAlign:re,getPopupContainer:ge,transitionName:te,popupPlacement:Ze,direction:le},{default:()=>[g("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>Ye})])}}})}const Eme=Tme();function Ame(e,t){let{picker:n,locale:o,selectedValue:r,disabledDate:i,disabled:a,generateConfig:l}=e;const s=M(()=>rn(r.value,0)),c=M(()=>rn(r.value,1));function u(v){return l.value.locale.getWeekFirstDate(o.value.locale,v)}function d(v){const y=l.value.getYear(v),b=l.value.getMonth(v);return y*100+b}function f(v){const y=l.value.getYear(v),b=Ox(l.value,v);return y*10+b}return[v=>{var y;if(i&&(!((y=i==null?void 0:i.value)===null||y===void 0)&&y.call(i,v)))return!0;if(a[1]&&c)return!gl(l.value,v,c.value)&&l.value.isAfter(v,c.value);if(t.value[1]&&c.value)switch(n.value){case"quarter":return f(v)>f(c.value);case"month":return d(v)>d(c.value);case"week":return u(v)>u(c.value);default:return!gl(l.value,v,c.value)&&l.value.isAfter(v,c.value)}return!1},v=>{var y;if(!((y=i.value)===null||y===void 0)&&y.call(i,v))return!0;if(a[0]&&s)return!gl(l.value,v,c.value)&&l.value.isAfter(s.value,v);if(t.value[0]&&s.value)switch(n.value){case"quarter":return f(v)pme(o,a,l));case"quarter":case"month":return i((a,l)=>$y(o,a,l));default:return i((a,l)=>sO(o,a,l))}}function Rme(e,t,n,o){const r=rn(e,0),i=rn(e,1);if(t===0)return r;if(r&&i)switch(Mme(r,i,n,o)){case"same":return r;case"closing":return r;default:return wp(i,n,o,-1)}return r}function Dme(e){let{values:t,picker:n,defaultDates:o,generateConfig:r}=e;const i=he([rn(o,0),rn(o,1)]),a=he(null),l=M(()=>rn(t.value,0)),s=M(()=>rn(t.value,1)),c=h=>i.value[h]?i.value[h]:rn(a.value,h)||Rme(t.value,h,n.value,r.value)||l.value||s.value||r.value.getNow(),u=he(null),d=he(null);ct(()=>{u.value=c(0),d.value=c(1)});function f(h,m){if(h){let v=Ii(a.value,h,m);i.value=Ii(i.value,null,m)||[null,null];const y=(m+1)%2;rn(t.value,y)||(v=Ii(v,h,y)),a.value=v}else(l.value||s.value)&&(a.value=null)}return[u,d,f]}function wB(e){return Sb()?(r2(e),!0):!1}function Lme(e){return typeof e=="function"?e():It(e)}function xO(e){var t;const n=Lme(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function Nme(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Nn()?lt(e):t?e():wt(e)}function _B(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=ve(),o=()=>n.value=!!e();return o(),Nme(o,t),n}var hC;const OB=typeof window<"u";OB&&(!((hC=window==null?void 0:window.navigator)===null||hC===void 0)&&hC.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const IB=OB?window:void 0;var kme=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=IB}=n,r=kme(n,["window"]);let i;const a=_B(()=>o&&"ResizeObserver"in o),l=()=>{i&&(i.disconnect(),i=void 0)},s=Ie(()=>xO(e),u=>{l(),a.value&&o&&u&&(i=new ResizeObserver(t),i.observe(u,r))},{immediate:!0,flush:"post"}),c=()=>{l(),s()};return wB(c),{isSupported:a,stop:c}}function Uf(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{width:0,height:0},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{box:o="content-box"}=n,r=ve(t.width),i=ve(t.height);return Bme(e,a=>{let[l]=a;const s=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;s?(r.value=s.reduce((c,u)=>{let{inlineSize:d}=u;return c+d},0),i.value=s.reduce((c,u)=>{let{blockSize:d}=u;return c+d},0)):(r.value=l.contentRect.width,i.value=l.contentRect.height)},n),Ie(()=>xO(e),a=>{r.value=a?t.width:0,i.value=a?t.height:0}),{width:r,height:i}}function jM(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function WM(e,t,n,o){return!!(e||o&&o[t]||n[(t+1)%2])}function Fme(){return pe({name:"RangerPicker",inheritAttrs:!1,props:["prefixCls","id","popupStyle","dropdownClassName","transitionName","dropdownAlign","getPopupContainer","generateConfig","locale","placeholder","autofocus","disabled","format","picker","showTime","showNow","showHour","showMinute","showSecond","use12Hours","separator","value","defaultValue","defaultPickerValue","open","defaultOpen","disabledDate","disabledTime","dateRender","panelRender","ranges","allowEmpty","allowClear","suffixIcon","clearIcon","pickerRef","inputReadOnly","mode","renderExtraFooter","onChange","onOpenChange","onPanelChange","onCalendarChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onClick","onOk","onKeydown","components","order","direction","activePickerIndex","autocomplete","minuteStep","hourStep","secondStep","hideDisabledOptions","disabledMinutes","presets","prevIcon","nextIcon","superPrevIcon","superNextIcon"],setup(e,t){let{attrs:n,expose:o}=t;const r=M(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),i=M(()=>e.presets),a=M(()=>e.ranges),l=xB(i,a),s=he({}),c=he(null),u=he(null),d=he(null),f=he(null),h=he(null),m=he(null),v=he(null),y=he(null),b=M(()=>gB(sB(e.format,e.picker,e.showTime,e.use12Hours))),[$,x]=yn(0,{value:st(e,"activePickerIndex")}),_=he(null),w=M(()=>{const{disabled:We}=e;return Array.isArray(We)?We:[We||!1,We||!1]}),[I,O]=yn(null,{value:st(e,"value"),defaultValue:e.defaultValue,postState:We=>e.picker==="time"&&!e.order?We:jM(We,e.generateConfig)}),[P,E,R]=Dme({values:I,picker:st(e,"picker"),defaultDates:e.defaultPickerValue,generateConfig:st(e,"generateConfig")}),[A,N]=yn(I.value,{postState:We=>{let gt=We;if(w.value[0]&&w.value[1])return gt;for(let ut=0;ut<2;ut+=1)w.value[ut]&&!rn(gt,ut)&&!rn(e.allowEmpty,ut)&&(gt=Ii(gt,e.generateConfig.getNow(),ut));return gt}}),[F,W]=yn([e.picker,e.picker],{value:st(e,"mode")});Ie(()=>e.picker,()=>{W([e.picker,e.picker])});const D=(We,gt)=>{var ut;W(We),(ut=e.onPanelChange)===null||ut===void 0||ut.call(e,gt,We)},[B,k]=Ame({picker:st(e,"picker"),selectedValue:A,locale:st(e,"locale"),disabled:w,disabledDate:st(e,"disabledDate"),generateConfig:st(e,"generateConfig")},s),[L,z]=yn(!1,{value:st(e,"open"),defaultValue:e.defaultOpen,postState:We=>w.value[$.value]?!1:We,onChange:We=>{var gt;(gt=e.onOpenChange)===null||gt===void 0||gt.call(e,We),!We&&_.value&&_.value.onClose&&_.value.onClose()}}),K=M(()=>L.value&&$.value===0),G=M(()=>L.value&&$.value===1),Y=he(0),ne=he(0),re=he(0),{width:J}=Uf(c);Ie([L,J],()=>{!L.value&&c.value&&(re.value=J.value)});const{width:te}=Uf(u),{width:ee}=Uf(y),{width:fe}=Uf(d),{width:ie}=Uf(h);Ie([$,L,te,ee,fe,ie,()=>e.direction],()=>{ne.value=0,$.value?d.value&&h.value&&(ne.value=fe.value+ie.value,te.value&&ee.value&&ne.value>te.value-ee.value-(e.direction==="rtl"||y.value.offsetLeft>ne.value?0:y.value.offsetLeft)&&(Y.value=ne.value)):$.value===0&&(Y.value=0)},{immediate:!0});const X=he();function ue(We,gt){if(We)clearTimeout(X.value),s.value[gt]=!0,x(gt),z(We),L.value||R(null,gt);else if($.value===gt){z(We);const ut=s.value;X.value=setTimeout(()=>{ut===s.value&&(s.value={})})}}function ye(We){ue(!0,We),setTimeout(()=>{const gt=[m,v][We];gt.value&>.value.focus()},0)}function H(We,gt){let ut=We,un=rn(ut,0),Yn=rn(ut,1);const{generateConfig:Bn,locale:Xo,picker:So,order:hi,onCalendarChange:qo,allowEmpty:_r,onChange:Cn,showTime:Gr}=e;un&&Yn&&Bn.isAfter(un,Yn)&&(So==="week"&&!fB(Bn,Xo.locale,un,Yn)||So==="quarter"&&!dB(Bn,un,Yn)||So!=="week"&&So!=="quarter"&&So!=="time"&&!(Gr?fd(Bn,un,Yn):gl(Bn,un,Yn))?(gt===0?(ut=[un,null],Yn=null):(un=null,ut=[null,Yn]),s.value={[gt]:!0}):(So!=="time"||hi!==!1)&&(ut=jM(ut,Bn))),N(ut);const Or=ut&&ut[0]?Wo(ut[0],{generateConfig:Bn,locale:Xo,format:b.value[0]}):"",pa=ut&&ut[1]?Wo(ut[1],{generateConfig:Bn,locale:Xo,format:b.value[0]}):"";qo&&qo(ut,[Or,pa],{range:gt===0?"start":"end"});const ha=WM(un,0,w.value,_r),Zo=WM(Yn,1,w.value,_r);(ut===null||ha&&Zo)&&(O(ut),Cn&&(!fd(Bn,rn(I.value,0),un)||!fd(Bn,rn(I.value,1),Yn))&&Cn(ut,[Or,pa]));let Qo=null;gt===0&&!w.value[1]?Qo=1:gt===1&&!w.value[0]&&(Qo=0),Qo!==null&&Qo!==$.value&&(!s.value[Qo]||!rn(ut,Qo))&&rn(ut,gt)?ye(Qo):ue(!1,gt)}const j=We=>L&&_.value&&_.value.onKeydown?_.value.onKeydown(We):!1,q={formatList:b,generateConfig:st(e,"generateConfig"),locale:st(e,"locale")},[se,ae]=R0(M(()=>rn(A.value,0)),q),[ge,Se]=R0(M(()=>rn(A.value,1)),q),$e=(We,gt)=>{const ut=pB(We,{locale:e.locale,formatList:b.value,generateConfig:e.generateConfig});ut&&!(gt===0?B:k)(ut)&&(N(Ii(A.value,ut,gt)),R(ut,gt))},[_e,be,Te]=Ex({valueTexts:se,onTextChange:We=>$e(We,0)}),[Pe,oe,le]=Ex({valueTexts:ge,onTextChange:We=>$e(We,1)}),[xe,Ae]=nn(null),[Be,Ye]=nn(null),[Re,Le,Ne]=Ax(_e,q),[Ke,Ze,Ue]=Ax(Pe,q),Xe=We=>{Ye(Ii(A.value,We,$.value)),$.value===0?Le(We):Ze(We)},xt=()=>{Ye(Ii(A.value,null,$.value)),$.value===0?Ne():Ue()},Mt=(We,gt)=>({forwardKeydown:j,onBlur:ut=>{var un;(un=e.onBlur)===null||un===void 0||un.call(e,ut)},isClickOutside:ut=>!uB([u.value,d.value,f.value,c.value],ut),onFocus:ut=>{var un;x(We),(un=e.onFocus)===null||un===void 0||un.call(e,ut)},triggerOpen:ut=>{ue(ut,We)},onSubmit:()=>{if(!A.value||e.disabledDate&&e.disabledDate(A.value[We]))return!1;H(A.value,We),gt()},onCancel:()=>{ue(!1,We),N(I.value),gt()}}),[Ft,{focused:jt,typing:Yt}]=Tx(S(S({},Mt(0,Te)),{blurToCancel:r,open:K,value:_e,onKeydown:(We,gt)=>{var ut;(ut=e.onKeydown)===null||ut===void 0||ut.call(e,We,gt)}})),[Vn,{focused:Gn,typing:oo}]=Tx(S(S({},Mt(1,le)),{blurToCancel:r,open:G,value:Pe,onKeydown:(We,gt)=>{var ut;(ut=e.onKeydown)===null||ut===void 0||ut.call(e,We,gt)}})),kn=We=>{var gt;(gt=e.onClick)===null||gt===void 0||gt.call(e,We),!L.value&&!m.value.contains(We.target)&&!v.value.contains(We.target)&&(w.value[0]?w.value[1]||ye(1):ye(0))},yo=We=>{var gt;(gt=e.onMousedown)===null||gt===void 0||gt.call(e,We),L.value&&(jt.value||Gn.value)&&!m.value.contains(We.target)&&!v.value.contains(We.target)&&We.preventDefault()},Yo=M(()=>{var We;return!((We=I.value)===null||We===void 0)&&We[0]?Wo(I.value[0],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""}),wr=M(()=>{var We;return!((We=I.value)===null||We===void 0)&&We[1]?Wo(I.value[1],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""});Ie([L,se,ge],()=>{L.value||(N(I.value),!se.value.length||se.value[0]===""?be(""):ae.value!==_e.value&&Te(),!ge.value.length||ge.value[0]===""?oe(""):Se.value!==Pe.value&&le())}),Ie([Yo,wr],()=>{N(I.value)}),o({focus:()=>{m.value&&m.value.focus()},blur:()=>{m.value&&m.value.blur(),v.value&&v.value.blur()}});const Ur=M(()=>L.value&&Be.value&&Be.value[0]&&Be.value[1]&&e.generateConfig.isAfter(Be.value[1],Be.value[0])?Be.value:null);function Ao(){let We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{generateConfig:ut,showTime:un,dateRender:Yn,direction:Bn,disabledTime:Xo,prefixCls:So,locale:hi}=e;let qo=un;if(un&&typeof un=="object"&&un.defaultValue){const Cn=un.defaultValue;qo=S(S({},un),{defaultValue:rn(Cn,$.value)||void 0})}let _r=null;return Yn&&(_r=Cn=>{let{current:Gr,today:Or}=Cn;return Yn({current:Gr,today:Or,info:{range:$.value?"end":"start"}})}),g(Cme,{value:{inRange:!0,panelPosition:We,rangedValue:xe.value||A.value,hoverRangedValue:Ur.value}},{default:()=>[g($O,V(V(V({},e),gt),{},{dateRender:_r,showTime:qo,mode:F.value[$.value],generateConfig:ut,style:void 0,direction:Bn,disabledDate:$.value===0?B:k,disabledTime:Cn=>Xo?Xo(Cn,$.value===0?"start":"end"):!1,class:me({[`${So}-panel-focused`]:$.value===0?!Yt.value:!oo.value}),value:rn(A.value,$.value),locale:hi,tabIndex:-1,onPanelChange:(Cn,Gr)=>{$.value===0&&Ne(!0),$.value===1&&Ue(!0),D(Ii(F.value,Gr,$.value),Ii(A.value,Cn,$.value));let Or=Cn;We==="right"&&F.value[$.value]===Gr&&(Or=wp(Or,Gr,ut,-1)),R(Or,$.value)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:$.value===0?rn(A.value,1):rn(A.value,0)}),null)]})}const za=(We,gt)=>{const ut=Ii(A.value,We,$.value);gt==="submit"||gt!=="key"&&!r.value?(H(ut,$.value),$.value===0?Ne():Ue()):N(ut)};return rO({operationRef:_,hideHeader:M(()=>e.picker==="time"),onDateMouseenter:Xe,onDateMouseleave:xt,hideRanges:M(()=>!0),onSelect:za,open:L}),()=>{const{prefixCls:We="rc-picker",id:gt,popupStyle:ut,dropdownClassName:un,transitionName:Yn,dropdownAlign:Bn,getPopupContainer:Xo,generateConfig:So,locale:hi,placeholder:qo,autofocus:_r,picker:Cn="date",showTime:Gr,separator:Or="~",disabledDate:pa,panelRender:ha,allowClear:Zo,suffixIcon:Ll,clearIcon:Qo,inputReadOnly:yf,renderExtraFooter:m1,onMouseenter:b1,onMouseleave:cg,onMouseup:ug,onOk:Sf,components:y1,direction:ks,autocomplete:dg="off"}=e,S1=ks==="rtl"?{right:`${ne.value}px`}:{left:`${ne.value}px`};function fg(){let Jo;const Ki=yB(We,F.value[$.value],m1),$f=SB({prefixCls:We,components:y1,needConfirmButton:r.value,okDisabled:!rn(A.value,$.value)||pa&&pa(A.value[$.value]),locale:hi,onOk:()=>{rn(A.value,$.value)&&(H(A.value,$.value),Sf&&Sf(A.value))}});if(Cn!=="time"&&!Gr){const ga=$.value===0?P.value:E.value,vg=wp(ga,Cn,So),Fs=F.value[$.value]===Cn,ja=Ao(Fs?"left":!1,{pickerValue:ga,onPickerValueChange:pu=>{R(pu,$.value)}}),xf=Ao("right",{pickerValue:vg,onPickerValueChange:pu=>{R(wp(pu,Cn,So,-1),$.value)}});ks==="rtl"?Jo=g(Je,null,[xf,Fs&&ja]):Jo=g(Je,null,[ja,Fs&&xf])}else Jo=Ao();let Bs=g("div",{class:`${We}-panel-layout`},[g($B,{prefixCls:We,presets:l.value,onClick:ga=>{H(ga,null),ue(!1,$.value)},onHover:ga=>{Ae(ga)}},null),g("div",null,[g("div",{class:`${We}-panels`},[Jo]),(Ki||$f)&&g("div",{class:`${We}-footer`},[Ki,$f])])]);return ha&&(Bs=ha(Bs)),g("div",{class:`${We}-panel-container`,style:{marginLeft:`${Y.value}px`},ref:u,onMousedown:ga=>{ga.preventDefault()}},[Bs])}const pg=g("div",{class:me(`${We}-range-wrapper`,`${We}-${Cn}-range-wrapper`),style:{minWidth:`${re.value}px`}},[g("div",{ref:y,class:`${We}-range-arrow`,style:S1},null),fg()]);let Cf;Ll&&(Cf=g("span",{class:`${We}-suffix`},[Ll]));let du;Zo&&(rn(I.value,0)&&!w.value[0]||rn(I.value,1)&&!w.value[1])&&(du=g("span",{onMousedown:Jo=>{Jo.preventDefault(),Jo.stopPropagation()},onMouseup:Jo=>{Jo.preventDefault(),Jo.stopPropagation();let Ki=I.value;w.value[0]||(Ki=Ii(Ki,null,0)),w.value[1]||(Ki=Ii(Ki,null,1)),H(Ki,null),ue(!1,$.value)},class:`${We}-clear`},[Qo||g("span",{class:`${We}-clear-btn`},null)]));const hg={size:cB(Cn,b.value[0],So)};let fu=0,Nl=0;d.value&&f.value&&h.value&&($.value===0?Nl=d.value.offsetWidth:(fu=ne.value,Nl=f.value.offsetWidth));const gg=ks==="rtl"?{right:`${fu}px`}:{left:`${fu}px`};return g("div",V({ref:c,class:me(We,`${We}-range`,n.class,{[`${We}-disabled`]:w.value[0]&&w.value[1],[`${We}-focused`]:$.value===0?jt.value:Gn.value,[`${We}-rtl`]:ks==="rtl"}),style:n.style,onClick:kn,onMouseenter:b1,onMouseleave:cg,onMousedown:yo,onMouseup:ug},vB(e)),[g("div",{class:me(`${We}-input`,{[`${We}-input-active`]:$.value===0,[`${We}-input-placeholder`]:!!Re.value}),ref:d},[g("input",V(V(V({id:gt,disabled:w.value[0],readonly:yf||typeof b.value[0]=="function"||!Yt.value,value:Re.value||_e.value,onInput:Jo=>{be(Jo.target.value)},autofocus:_r,placeholder:rn(qo,0)||"",ref:m},Ft.value),hg),{},{autocomplete:dg}),null)]),g("div",{class:`${We}-range-separator`,ref:h},[Or]),g("div",{class:me(`${We}-input`,{[`${We}-input-active`]:$.value===1,[`${We}-input-placeholder`]:!!Ke.value}),ref:f},[g("input",V(V(V({disabled:w.value[1],readonly:yf||typeof b.value[0]=="function"||!oo.value,value:Ke.value||Pe.value,onInput:Jo=>{oe(Jo.target.value)},placeholder:rn(qo,1)||"",ref:v},Vn.value),hg),{},{autocomplete:dg}),null)]),g("div",{class:`${We}-active-bar`,style:S(S({},gg),{width:`${Nl}px`,position:"absolute"})},null),Cf,du,g(CB,{visible:L.value,popupStyle:ut,prefixCls:We,dropdownClassName:un,dropdownAlign:Bn,getPopupContainer:Xo,transitionName:Yn,range:!0,direction:ks},{default:()=>[g("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>pg})])}}})}const Hme=Fme(),zme=Hme;var jme=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.checked,()=>{i.value=e.checked}),r({focus(){var u;(u=a.value)===null||u===void 0||u.focus()},blur(){var u;(u=a.value)===null||u===void 0||u.blur()}});const l=he(),s=u=>{if(e.disabled)return;e.checked===void 0&&(i.value=u.target.checked),u.shiftKey=l.value;const d={target:S(S({},e),{checked:u.target.checked}),stopPropagation(){u.stopPropagation()},preventDefault(){u.preventDefault()},nativeEvent:u};e.checked!==void 0&&(a.value.checked=!!e.checked),o("change",d),l.value=!1},c=u=>{o("click",u),l.value=u.shiftKey};return()=>{const{prefixCls:u,name:d,id:f,type:h,disabled:m,readonly:v,tabindex:y,autofocus:b,value:$,required:x}=e,_=jme(e,["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"]),{class:w,onFocus:I,onBlur:O,onKeydown:P,onKeypress:E,onKeyup:R}=n,A=S(S({},_),n),N=Object.keys(A).reduce((D,B)=>((B.startsWith("data-")||B.startsWith("aria-")||B==="role")&&(D[B]=A[B]),D),{}),F=me(u,w,{[`${u}-checked`]:i.value,[`${u}-disabled`]:m}),W=S(S({name:d,id:f,type:h,readonly:v,disabled:m,tabindex:y,class:`${u}-input`,checked:!!i.value,autofocus:b,value:$},N),{onChange:s,onClick:c,onFocus:I,onBlur:O,onKeydown:P,onKeypress:E,onKeyup:R,required:x});return g("span",{class:F},[g("input",V({ref:a},W),null),g("span",{class:`${u}-inner`},null)])}}}),TB=Symbol("radioGroupContextKey"),Vme=e=>{ft(TB,e)},Kme=()=>it(TB,void 0),EB=Symbol("radioOptionTypeContextKey"),Ume=e=>{ft(EB,e)},Gme=()=>it(EB,void 0),Yme=new Pt("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),Xme=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-group`;return{[o]:S(S({},vt(e)),{display:"inline-block",fontSize:0,[`&${o}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},qme=e=>{const{componentCls:t,radioWrapperMarginRight:n,radioCheckedColor:o,radioSize:r,motionDurationSlow:i,motionDurationMid:a,motionEaseInOut:l,motionEaseInOutCirc:s,radioButtonBg:c,colorBorder:u,lineWidth:d,radioDotSize:f,colorBgContainerDisabled:h,colorTextDisabled:m,paddingXS:v,radioDotDisabledColor:y,lineType:b,radioDotDisabledSize:$,wireframe:x,colorWhite:_}=e,w=`${t}-inner`;return{[`${t}-wrapper`]:S(S({},vt(e)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${d}px ${b} ${o}`,borderRadius:"50%",visibility:"hidden",animationName:Yme,animationDuration:i,animationTimingFunction:l,animationFillMode:"both",content:'""'},[t]:S(S({},vt(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${t}-wrapper:hover &, + &:hover ${w}`]:{borderColor:o},[`${t}-input:focus-visible + ${w}`]:S({},yl(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:r,height:r,marginBlockStart:r/-2,marginInlineStart:r/-2,backgroundColor:x?o:_,borderBlockStart:0,borderInlineStart:0,borderRadius:r,transform:"scale(0)",opacity:0,transition:`all ${i} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:r,height:r,backgroundColor:c,borderColor:u,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[w]:{borderColor:o,backgroundColor:x?c:o,"&::after":{transform:`scale(${f/r})`,opacity:1,transition:`all ${i} ${s}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[w]:{backgroundColor:h,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:y}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:m,cursor:"not-allowed"},[`&${t}-checked`]:{[w]:{"&::after":{transform:`scale(${$/r})`}}}},[`span${t} + *`]:{paddingInlineStart:v,paddingInlineEnd:v}})}},Zme=e=>{const{radioButtonColor:t,controlHeight:n,componentCls:o,lineWidth:r,lineType:i,colorBorder:a,motionDurationSlow:l,motionDurationMid:s,radioButtonPaddingHorizontal:c,fontSize:u,radioButtonBg:d,fontSizeLG:f,controlHeightLG:h,controlHeightSM:m,paddingXS:v,borderRadius:y,borderRadiusSM:b,borderRadiusLG:$,radioCheckedColor:x,radioButtonCheckedBg:_,radioButtonHoverColor:w,radioButtonActiveColor:I,radioSolidCheckedColor:O,colorTextDisabled:P,colorBgContainerDisabled:E,radioDisabledButtonCheckedColor:R,radioDisabledButtonCheckedBg:A}=e;return{[`${o}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:`${n-r*2}px`,background:d,border:`${r}px ${i} ${a}`,borderBlockStartWidth:r+.02,borderInlineStartWidth:0,borderInlineEndWidth:r,cursor:"pointer",transition:[`color ${s}`,`background ${s}`,`border-color ${s}`,`box-shadow ${s}`].join(","),a:{color:t},[`> ${o}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-r,insetInlineStart:-r,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:r,paddingInline:0,backgroundColor:a,transition:`background-color ${l}`,content:'""'}},"&:first-child":{borderInlineStart:`${r}px ${i} ${a}`,borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y},"&:first-child:last-child":{borderRadius:y},[`${o}-group-large &`]:{height:h,fontSize:f,lineHeight:`${h-r*2}px`,"&:first-child":{borderStartStartRadius:$,borderEndStartRadius:$},"&:last-child":{borderStartEndRadius:$,borderEndEndRadius:$}},[`${o}-group-small &`]:{height:m,paddingInline:v-r,paddingBlock:0,lineHeight:`${m-r*2}px`,"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:x},"&:has(:focus-visible)":S({},yl(e)),[`${o}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${o}-button-wrapper-disabled)`]:{zIndex:1,color:x,background:_,borderColor:x,"&::before":{backgroundColor:x},"&:first-child":{borderColor:x},"&:hover":{color:w,borderColor:w,"&::before":{backgroundColor:w}},"&:active":{color:I,borderColor:I,"&::before":{backgroundColor:I}}},[`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]:{color:O,background:x,borderColor:x,"&:hover":{color:O,background:w,borderColor:w},"&:active":{color:O,background:I,borderColor:I}},"&-disabled":{color:P,backgroundColor:E,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:P,backgroundColor:E,borderColor:a}},[`&-disabled${o}-button-wrapper-checked`]:{color:R,backgroundColor:A,borderColor:a,boxShadow:"none"}}}},AB=pt("Radio",e=>{const{padding:t,lineWidth:n,controlItemBgActiveDisabled:o,colorTextDisabled:r,colorBgContainer:i,fontSizeLG:a,controlOutline:l,colorPrimaryHover:s,colorPrimaryActive:c,colorText:u,colorPrimary:d,marginXS:f,controlOutlineWidth:h,colorTextLightSolid:m,wireframe:v}=e,y=`0 0 0 ${h}px ${l}`,b=y,$=a,x=4,_=$-x*2,w=v?_:$-(x+n)*2,I=d,O=u,P=s,E=c,R=t-n,F=nt(e,{radioFocusShadow:y,radioButtonFocusShadow:b,radioSize:$,radioDotSize:w,radioDotDisabledSize:_,radioCheckedColor:I,radioDotDisabledColor:r,radioSolidCheckedColor:m,radioButtonBg:i,radioButtonCheckedBg:i,radioButtonColor:O,radioButtonHoverColor:P,radioButtonActiveColor:E,radioButtonPaddingHorizontal:R,radioDisabledButtonCheckedBg:o,radioDisabledButtonCheckedColor:r,radioWrapperMarginRight:f});return[Xme(F),qme(F),Zme(F)]});var Qme=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,checked:De(),disabled:De(),isGroup:De(),value:Z.any,name:String,id:String,autofocus:De(),onChange:Oe(),onFocus:Oe(),onBlur:Oe(),onClick:Oe(),"onUpdate:checked":Oe(),"onUpdate:value":Oe()}),yr=pe({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:MB(),setup(e,t){let{emit:n,expose:o,slots:r,attrs:i}=t;const a=co(),l=To.useInject(),s=Gme(),c=Kme(),u=jr(),d=M(()=>{var P;return(P=v.value)!==null&&P!==void 0?P:u.value}),f=he(),{prefixCls:h,direction:m,disabled:v}=Ve("radio",e),y=M(()=>(c==null?void 0:c.optionType.value)==="button"||s==="button"?`${h.value}-button`:h.value),b=jr(),[$,x]=AB(h);o({focus:()=>{f.value.focus()},blur:()=>{f.value.blur()}});const I=P=>{const E=P.target.checked;n("update:checked",E),n("update:value",E),n("change",P),a.onFieldChange()},O=P=>{n("change",P),c&&c.onChange&&c.onChange(P)};return()=>{var P;const E=c,{prefixCls:R,id:A=a.id.value}=e,N=Qme(e,["prefixCls","id"]),F=S(S({prefixCls:y.value,id:A},_t(N,["onUpdate:checked","onUpdate:value"])),{disabled:(P=v.value)!==null&&P!==void 0?P:b.value});E?(F.name=E.name.value,F.onChange=O,F.checked=e.value===E.value.value,F.disabled=d.value||E.disabled.value):F.onChange=I;const W=me({[`${y.value}-wrapper`]:!0,[`${y.value}-wrapper-checked`]:F.checked,[`${y.value}-wrapper-disabled`]:F.disabled,[`${y.value}-wrapper-rtl`]:m.value==="rtl",[`${y.value}-wrapper-in-form-item`]:l.isFormItemInput},i.class,x.value);return $(g("label",V(V({},i),{},{class:W}),[g(PB,V(V({},F),{},{type:"radio",ref:f}),null),r.default&&g("span",null,[r.default()])]))}}}),Jme=()=>({prefixCls:String,value:Z.any,size:Qe(),options:kt(),disabled:De(),name:String,buttonStyle:Qe("outline"),id:String,optionType:Qe("default"),onChange:Oe(),"onUpdate:value":Oe()}),wO=pe({compatConfig:{MODE:3},name:"ARadioGroup",inheritAttrs:!1,props:Jme(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=co(),{prefixCls:a,direction:l,size:s}=Ve("radio",e),[c,u]=AB(a),d=he(e.value),f=he(!1);return Ie(()=>e.value,m=>{d.value=m,f.value=!1}),Vme({onChange:m=>{const v=d.value,{value:y}=m.target;"value"in e||(d.value=y),!f.value&&y!==v&&(f.value=!0,o("update:value",y),o("change",m),i.onFieldChange()),wt(()=>{f.value=!1})},value:d,disabled:M(()=>e.disabled),name:M(()=>e.name),optionType:M(()=>e.optionType)}),()=>{var m;const{options:v,buttonStyle:y,id:b=i.id.value}=e,$=`${a.value}-group`,x=me($,`${$}-${y}`,{[`${$}-${s.value}`]:s.value,[`${$}-rtl`]:l.value==="rtl"},r.class,u.value);let _=null;return v&&v.length>0?_=v.map(w=>{if(typeof w=="string"||typeof w=="number")return g(yr,{key:w,prefixCls:a.value,disabled:e.disabled,value:w,checked:d.value===w},{default:()=>[w]});const{value:I,disabled:O,label:P}=w;return g(yr,{key:`radio-group-value-options-${I}`,prefixCls:a.value,disabled:O||e.disabled,value:I,checked:d.value===I},{default:()=>[P]})}):_=(m=n.default)===null||m===void 0?void 0:m.call(n),c(g("div",V(V({},r),{},{class:x,id:b}),[_]))}}}),D0=pe({compatConfig:{MODE:3},name:"ARadioButton",inheritAttrs:!1,props:MB(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=Ve("radio",e);return Ume("button"),()=>{var i;return g(yr,V(V(V({},o),e),{},{prefixCls:r.value}),{default:()=>[(i=n.default)===null||i===void 0?void 0:i.call(n)]})}}});yr.Group=wO;yr.Button=D0;yr.install=function(e){return e.component(yr.name,yr),e.component(yr.Group.name,yr.Group),e.component(yr.Button.name,yr.Button),e};const e0e=10,t0e=20;function RB(e){const{fullscreen:t,validRange:n,generateConfig:o,locale:r,prefixCls:i,value:a,onChange:l,divRef:s}=e,c=o.getYear(a||o.getNow());let u=c-e0e,d=u+t0e;n&&(u=o.getYear(n[0]),d=o.getYear(n[1])+1);const f=r&&r.year==="年"?"年":"",h=[];for(let m=u;m{let v=o.setYear(a,m);if(n){const[y,b]=n,$=o.getYear(v),x=o.getMonth(v);$===o.getYear(b)&&x>o.getMonth(b)&&(v=o.setMonth(v,o.getMonth(b))),$===o.getYear(y)&&xs.value},null)}RB.inheritAttrs=!1;function DB(e){const{prefixCls:t,fullscreen:n,validRange:o,value:r,generateConfig:i,locale:a,onChange:l,divRef:s}=e,c=i.getMonth(r||i.getNow());let u=0,d=11;if(o){const[m,v]=o,y=i.getYear(r);i.getYear(v)===y&&(d=i.getMonth(v)),i.getYear(m)===y&&(u=i.getMonth(m))}const f=a.shortMonths||i.locale.getShortMonths(a.locale),h=[];for(let m=u;m<=d;m+=1)h.push({label:f[m],value:m});return g(Cl,{size:n?void 0:"small",class:`${t}-month-select`,value:c,options:h,onChange:m=>{l(i.setMonth(r,m))},getPopupContainer:()=>s.value},null)}DB.inheritAttrs=!1;function LB(e){const{prefixCls:t,locale:n,mode:o,fullscreen:r,onModeChange:i}=e;return g(wO,{onChange:a=>{let{target:{value:l}}=a;i(l)},value:o,size:r?void 0:"small",class:`${t}-mode-switch`},{default:()=>[g(D0,{value:"month"},{default:()=>[n.month]}),g(D0,{value:"year"},{default:()=>[n.year]})]})}LB.inheritAttrs=!1;const n0e=pe({name:"CalendarHeader",inheritAttrs:!1,props:["mode","prefixCls","value","validRange","generateConfig","locale","mode","fullscreen"],setup(e,t){let{attrs:n}=t;const o=he(null),r=To.useInject();return To.useProvide(r,{isFormItemInput:!1}),()=>{const i=S(S({},e),n),{prefixCls:a,fullscreen:l,mode:s,onChange:c,onModeChange:u}=i,d=S(S({},i),{fullscreen:l,divRef:o});return g("div",{class:`${a}-header`,ref:o},[g(RB,V(V({},d),{},{onChange:f=>{c(f,"year")}}),null),s==="month"&&g(DB,V(V({},d),{},{onChange:f=>{c(f,"month")}}),null),g(LB,V(V({},d),{},{onModeChange:u}),null)])}}}),_O=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),hf=e=>({borderColor:e.inputBorderHoverColor,borderInlineEndWidth:e.lineWidth}),$s=e=>({borderColor:e.inputBorderHoverColor,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,borderInlineEndWidth:e.lineWidth,outline:0}),OO=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":S({},hf(nt(e,{inputBorderHoverColor:e.colorBorder})))}),NB=e=>{const{inputPaddingVerticalLG:t,fontSizeLG:n,lineHeightLG:o,borderRadiusLG:r,inputPaddingHorizontalLG:i}=e;return{padding:`${t}px ${i}px`,fontSize:n,lineHeight:o,borderRadius:r}},IO=e=>({padding:`${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM-1}px`,borderRadius:e.borderRadiusSM}),Xh=(e,t)=>{const{componentCls:n,colorError:o,colorWarning:r,colorErrorOutline:i,colorWarningOutline:a,colorErrorBorderHover:l,colorWarningBorderHover:s}=e;return{[`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:o,"&:hover":{borderColor:l},"&:focus, &-focused":S({},$s(nt(e,{inputBorderActiveColor:o,inputBorderHoverColor:o,controlOutline:i}))),[`${n}-prefix`]:{color:o}},[`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:r,"&:hover":{borderColor:s},"&:focus, &-focused":S({},$s(nt(e,{inputBorderActiveColor:r,inputBorderHoverColor:r,controlOutline:a}))),[`${n}-prefix`]:{color:r}}}},ru=e=>S(S({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}px`,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,backgroundColor:e.colorBgContainer,backgroundImage:"none",borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:e.colorBorder,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},_O(e.colorTextPlaceholder)),{"&:hover":S({},hf(e)),"&:focus, &-focused":S({},$s(e)),"&-disabled, &[disabled]":S({},OO(e)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":S({},NB(e)),"&-sm":S({},IO(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),kB=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:S({},NB(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:S({},IO(e)),[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${e.inputPaddingHorizontal}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,textAlign:"center",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`-${e.inputPaddingVertical+1}px -${e.inputPaddingHorizontal}px`,[`&${n}-select-single:not(${n}-select-customize-input)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${e.lineWidth}px ${e.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${n}-select-selector`]:{color:e.colorPrimary}}},[`${n}-cascader-picker`]:{margin:`-9px -${e.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${t}`]:{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:S(S({display:"block"},aa()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${t}-affix-wrapper`]:{display:"inline-flex"},[`& > ${n}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-e.lineWidth,borderInlineEndWidth:e.lineWidth},[`${t}`]:{float:"none"},[`& > ${n}-select > ${n}-select-selector, + & > ${n}-select-auto-complete ${t}, + & > ${n}-cascader-picker ${t}, + & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child, + & > ${n}-select:first-child > ${n}-select-selector, + & > ${n}-select-auto-complete:first-child ${t}, + & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, + & > ${n}-select:last-child > ${n}-select-selector, + & > ${n}-cascader-picker:last-child ${t}, + & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:-e.lineWidth,[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}}),[`&&-sm ${n}-btn`]:{fontSize:e.fontSizeSM,height:e.controlHeightSM,lineHeight:"normal"},[`&&-lg ${n}-btn`]:{fontSize:e.fontSizeLG,height:e.controlHeightLG,lineHeight:"normal"},[`&&-lg ${n}-select-single ${n}-select-selector`]:{height:`${e.controlHeightLG}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${e.controlHeightLG-2}px`},[`${n}-select-selection-search-input`]:{height:`${e.controlHeightLG}px`}},[`&&-sm ${n}-select-single ${n}-select-selector`]:{height:`${e.controlHeightSM}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${e.controlHeightSM-2}px`},[`${n}-select-selection-search-input`]:{height:`${e.controlHeightSM}px`}}}},o0e=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:o}=e,i=(n-o*2-16)/2;return{[t]:S(S(S(S({},vt(e)),ru(e)),Xh(e,t)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:i,paddingBottom:i}}})}},r0e=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${e.inputAffixPadding}px`}},"&-textarea-with-clear-btn":{padding:"0 !important",border:"0 !important",[`${t}-clear-icon`]:{position:"absolute",insetBlockStart:e.paddingXS,insetInlineEnd:e.paddingXS,zIndex:1}}}},i0e=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:o,motionDurationSlow:r,colorIcon:i,colorIconHover:a,iconCls:l}=e;return{[`${t}-affix-wrapper`]:S(S(S(S(S({},ru(e)),{display:"inline-flex",[`&:not(${t}-affix-wrapper-disabled):hover`]:S(S({},hf(e)),{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> input${t}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&:focus":{boxShadow:"none !important"}},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${t}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:o},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),r0e(e)),{[`${l}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${r}`,"&:hover":{color:a}}}),Xh(e,`${t}-affix-wrapper`))}},a0e=e=>{const{componentCls:t,colorError:n,colorSuccess:o,borderRadiusLG:r,borderRadiusSM:i}=e;return{[`${t}-group`]:S(S(S({},vt(e)),kB(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r}},"&-sm":{[`${t}-group-addon`]:{borderRadius:i}},"&-status-error":{[`${t}-group-addon`]:{color:n,borderColor:n}},"&-status-warning":{[`${t}-group-addon:last-child`]:{color:o,borderColor:o}}}})}},l0e=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-search`;return{[o]:{[`${t}`]:{"&:hover, &:focus":{borderColor:e.colorPrimaryHover,[`+ ${t}-group-addon ${o}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{borderRadius:0},[`${t}-lg`]:{lineHeight:e.lineHeightLG-2e-4},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${o}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius,borderEndStartRadius:0},[`${o}-button:not(${n}-btn-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${o}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${o}-button`]:{height:e.controlHeightLG},[`&-small ${o}-button`]:{height:e.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:-e.lineWidth,borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button, + > ${t}, + ${t}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}};function iu(e){return nt(e,{inputAffixPadding:e.paddingXXS,inputPaddingVertical:Math.max(Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,3),inputPaddingVerticalLG:Math.ceil((e.controlHeightLG-e.fontSizeLG*e.lineHeightLG)/2*10)/10-e.lineWidth,inputPaddingVerticalSM:Math.max(Math.round((e.controlHeightSM-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,0),inputPaddingHorizontal:e.paddingSM-e.lineWidth,inputPaddingHorizontalSM:e.paddingXS-e.lineWidth,inputPaddingHorizontalLG:e.controlPaddingHorizontal-e.lineWidth,inputBorderHoverColor:e.colorPrimaryHover,inputBorderActiveColor:e.colorPrimaryHover})}const s0e=e=>{const{componentCls:t,inputPaddingHorizontal:n,paddingLG:o}=e,r=`${t}-textarea`;return{[r]:{position:"relative",[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:n,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},"&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating":{[`&${r}-has-feedback`]:{[`${t}`]:{paddingInlineEnd:o}}},"&-show-count":{[`> ${t}`]:{height:"100%"},"&::after":{color:e.colorTextDescription,whiteSpace:"nowrap",content:"attr(data-count)",pointerEvents:"none",float:"right"}},"&-rtl":{"&::after":{float:"left"}}}}},PO=pt("Input",e=>{const t=iu(e);return[o0e(t),s0e(t),i0e(t),a0e(t),l0e(t),uf(t)]}),gC=(e,t,n,o)=>{const{lineHeight:r}=e,i=Math.floor(n*r)+2,a=Math.max((t-i)/2,0),l=Math.max(t-i-a,0);return{padding:`${a}px ${o}px ${l}px`}},c0e=e=>{const{componentCls:t,pickerCellCls:n,pickerCellInnerCls:o,pickerPanelCellHeight:r,motionDurationSlow:i,borderRadiusSM:a,motionDurationMid:l,controlItemBgHover:s,lineWidth:c,lineType:u,colorPrimary:d,controlItemBgActive:f,colorTextLightSolid:h,controlHeightSM:m,pickerDateHoverRangeBorderColor:v,pickerCellBorderGap:y,pickerBasicCellHoverWithRangeColor:b,pickerPanelCellWidth:$,colorTextDisabled:x,colorBgContainerDisabled:_}=e;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:"translateY(-50%)",transition:`all ${i}`,content:'""'},[o]:{position:"relative",zIndex:2,display:"inline-block",minWidth:r,height:r,lineHeight:`${r}px`,borderRadius:a,transition:`background ${l}, border ${l}`},[`&:hover:not(${n}-in-view), + &:hover:not(${n}-selected):not(${n}-range-start):not(${n}-range-end):not(${n}-range-hover-start):not(${n}-range-hover-end)`]:{[o]:{background:s}},[`&-in-view${n}-today ${o}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${c}px ${u} ${d}`,borderRadius:a,content:'""'}},[`&-in-view${n}-in-range`]:{position:"relative","&::before":{background:f}},[`&-in-view${n}-selected ${o}, + &-in-view${n}-range-start ${o}, + &-in-view${n}-range-end ${o}`]:{color:h,background:d},[`&-in-view${n}-range-start:not(${n}-range-start-single), + &-in-view${n}-range-end:not(${n}-range-end-single)`]:{"&::before":{background:f}},[`&-in-view${n}-range-start::before`]:{insetInlineStart:"50%"},[`&-in-view${n}-range-end::before`]:{insetInlineEnd:"50%"},[`&-in-view${n}-range-hover-start:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end), + &-in-view${n}-range-hover-end:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end), + &-in-view${n}-range-hover-start${n}-range-start-single, + &-in-view${n}-range-hover-start${n}-range-start${n}-range-end${n}-range-end-near-hover, + &-in-view${n}-range-hover-end${n}-range-start${n}-range-end${n}-range-start-near-hover, + &-in-view${n}-range-hover-end${n}-range-end-single, + &-in-view${n}-range-hover:not(${n}-in-range)`]:{"&::after":{position:"absolute",top:"50%",zIndex:0,height:m,borderTop:`${c}px dashed ${v}`,borderBottom:`${c}px dashed ${v}`,transform:"translateY(-50%)",transition:`all ${i}`,content:'""'}},"&-range-hover-start::after,\n &-range-hover-end::after,\n &-range-hover::after":{insetInlineEnd:0,insetInlineStart:y},[`&-in-view${n}-in-range${n}-range-hover::before, + &-in-view${n}-range-start${n}-range-hover::before, + &-in-view${n}-range-end${n}-range-hover::before, + &-in-view${n}-range-start:not(${n}-range-start-single)${n}-range-hover-start::before, + &-in-view${n}-range-end:not(${n}-range-end-single)${n}-range-hover-end::before, + ${t}-panel + > :not(${t}-date-panel) + &-in-view${n}-in-range${n}-range-hover-start::before, + ${t}-panel + > :not(${t}-date-panel) + &-in-view${n}-in-range${n}-range-hover-end::before`]:{background:b},[`&-in-view${n}-range-start:not(${n}-range-start-single):not(${n}-range-end) ${o}`]:{borderStartStartRadius:a,borderEndStartRadius:a,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${n}-range-end:not(${n}-range-end-single):not(${n}-range-start) ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:a,borderEndEndRadius:a},[`&-range-hover${n}-range-end::after`]:{insetInlineStart:"50%"},[`tr > &-in-view${n}-range-hover:first-child::after, + tr > &-in-view${n}-range-hover-end:first-child::after, + &-in-view${n}-start${n}-range-hover-edge-start${n}-range-hover-edge-start-near-range::after, + &-in-view${n}-range-hover-edge-start:not(${n}-range-hover-edge-start-near-range)::after, + &-in-view${n}-range-hover-start::after`]:{insetInlineStart:($-r)/2,borderInlineStart:`${c}px dashed ${v}`,borderStartStartRadius:c,borderEndStartRadius:c},[`tr > &-in-view${n}-range-hover:last-child::after, + tr > &-in-view${n}-range-hover-start:last-child::after, + &-in-view${n}-end${n}-range-hover-edge-end${n}-range-hover-edge-end-near-range::after, + &-in-view${n}-range-hover-edge-end:not(${n}-range-hover-edge-end-near-range)::after, + &-in-view${n}-range-hover-end::after`]:{insetInlineEnd:($-r)/2,borderInlineEnd:`${c}px dashed ${v}`,borderStartEndRadius:c,borderEndEndRadius:c},"&-disabled":{color:x,pointerEvents:"none",[o]:{background:"transparent"},"&::before":{background:_}},[`&-disabled${n}-today ${o}::before`]:{borderColor:x}}},BB=e=>{const{componentCls:t,pickerCellInnerCls:n,pickerYearMonthCellWidth:o,pickerControlIconSize:r,pickerPanelCellWidth:i,paddingSM:a,paddingXS:l,paddingXXS:s,colorBgContainer:c,lineWidth:u,lineType:d,borderRadiusLG:f,colorPrimary:h,colorTextHeading:m,colorSplit:v,pickerControlIconBorderWidth:y,colorIcon:b,pickerTextHeight:$,motionDurationMid:x,colorIconHover:_,fontWeightStrong:w,pickerPanelCellHeight:I,pickerCellPaddingVertical:O,colorTextDisabled:P,colorText:E,fontSize:R,pickerBasicCellHoverWithRangeColor:A,motionDurationSlow:N,pickerPanelWithoutTimeCellHeight:F,pickerQuarterPanelContentHeight:W,colorLink:D,colorLinkActive:B,colorLinkHover:k,pickerDateHoverRangeBorderColor:L,borderRadiusSM:z,colorTextLightSolid:K,borderRadius:G,controlItemBgHover:Y,pickerTimePanelColumnHeight:ne,pickerTimePanelColumnWidth:re,pickerTimePanelCellHeight:J,controlItemBgActive:te,marginXXS:ee}=e,fe=i*7+a*2+4,ie=(fe-l*2)/3-o-a;return{[t]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:c,border:`${u}px ${d} ${v}`,borderRadius:f,outline:"none","&-focused":{borderColor:h},"&-rtl":{direction:"rtl",[`${t}-prev-icon, + ${t}-super-prev-icon`]:{transform:"rotate(45deg)"},[`${t}-next-icon, + ${t}-super-next-icon`]:{transform:"rotate(-135deg)"}}},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel,\n &-week-panel,\n &-date-panel,\n &-time-panel":{display:"flex",flexDirection:"column",width:fe},"&-header":{display:"flex",padding:`0 ${l}px`,color:m,borderBottom:`${u}px ${d} ${v}`,"> *":{flex:"none"},button:{padding:0,color:b,lineHeight:`${$}px`,background:"transparent",border:0,cursor:"pointer",transition:`color ${x}`},"> button":{minWidth:"1.6em",fontSize:R,"&:hover":{color:_}},"&-view":{flex:"auto",fontWeight:w,lineHeight:`${$}px`,button:{color:"inherit",fontWeight:"inherit",verticalAlign:"top","&:not(:first-child)":{marginInlineStart:l},"&:hover":{color:h}}}},"&-prev-icon,\n &-next-icon,\n &-super-prev-icon,\n &-super-next-icon":{position:"relative",display:"inline-block",width:r,height:r,"&::before":{position:"absolute",top:0,insetInlineStart:0,display:"inline-block",width:r,height:r,border:"0 solid currentcolor",borderBlockStartWidth:y,borderBlockEndWidth:0,borderInlineStartWidth:y,borderInlineEndWidth:0,content:'""'}},"&-super-prev-icon,\n &-super-next-icon":{"&::after":{position:"absolute",top:Math.ceil(r/2),insetInlineStart:Math.ceil(r/2),display:"inline-block",width:r,height:r,border:"0 solid currentcolor",borderBlockStartWidth:y,borderBlockEndWidth:0,borderInlineStartWidth:y,borderInlineEndWidth:0,content:'""'}},"&-prev-icon,\n &-super-prev-icon":{transform:"rotate(-45deg)"},"&-next-icon,\n &-super-next-icon":{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:I,fontWeight:"normal"},th:{height:I+O*2,color:E,verticalAlign:"middle"}},"&-cell":S({padding:`${O}px 0`,color:P,cursor:"pointer","&-in-view":{color:E}},c0e(e)),[`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start ${n}, + &-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}`]:{"&::after":{position:"absolute",top:0,bottom:0,zIndex:-1,background:A,transition:`all ${N}`,content:'""'}},[`&-date-panel + ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start + ${n}::after`]:{insetInlineEnd:-(i-I)/2,insetInlineStart:0},[`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}::after`]:{insetInlineEnd:0,insetInlineStart:-(i-I)/2},[`&-range-hover${t}-range-start::after`]:{insetInlineEnd:"50%"},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-content`]:{height:F*4},[n]:{padding:`0 ${l}px`}},"&-quarter-panel":{[`${t}-content`]:{height:W}},[`&-panel ${t}-footer`]:{borderTop:`${u}px ${d} ${v}`},"&-footer":{width:"min-content",minWidth:"100%",lineHeight:`${$-2*u}px`,textAlign:"center","&-extra":{padding:`0 ${a}`,lineHeight:`${$-2*u}px`,textAlign:"start","&:not(:last-child)":{borderBottom:`${u}px ${d} ${v}`}}},"&-now":{textAlign:"start"},"&-today-btn":{color:D,"&:hover":{color:k},"&:active":{color:B},[`&${t}-today-btn-disabled`]:{color:P,cursor:"not-allowed"}},"&-decade-panel":{[n]:{padding:`0 ${l/2}px`},[`${t}-cell::before`]:{display:"none"}},"&-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-body`]:{padding:`0 ${l}px`},[n]:{width:o},[`${t}-cell-range-hover-start::after`]:{insetInlineStart:ie,borderInlineStart:`${u}px dashed ${L}`,borderStartStartRadius:z,borderBottomStartRadius:z,borderStartEndRadius:0,borderBottomEndRadius:0,[`${t}-panel-rtl &`]:{insetInlineEnd:ie,borderInlineEnd:`${u}px dashed ${L}`,borderStartStartRadius:0,borderBottomStartRadius:0,borderStartEndRadius:z,borderBottomEndRadius:z}},[`${t}-cell-range-hover-end::after`]:{insetInlineEnd:ie,borderInlineEnd:`${u}px dashed ${L}`,borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:G,borderEndEndRadius:G,[`${t}-panel-rtl &`]:{insetInlineStart:ie,borderInlineStart:`${u}px dashed ${L}`,borderStartStartRadius:G,borderEndStartRadius:G,borderStartEndRadius:0,borderEndEndRadius:0}}},"&-week-panel":{[`${t}-body`]:{padding:`${l}px ${a}px`},[`${t}-cell`]:{[`&:hover ${n}, + &-selected ${n}, + ${n}`]:{background:"transparent !important"}},"&-row":{td:{transition:`background ${x}`,"&:first-child":{borderStartStartRadius:z,borderEndStartRadius:z},"&:last-child":{borderStartEndRadius:z,borderEndEndRadius:z}},"&:hover td":{background:Y},"&-selected td,\n &-selected:hover td":{background:h,[`&${t}-cell-week`]:{color:new Zt(K).setAlpha(.5).toHexString()},[`&${t}-cell-today ${n}::before`]:{borderColor:K},[n]:{color:K}}}},"&-date-panel":{[`${t}-body`]:{padding:`${l}px ${a}px`},[`${t}-content`]:{width:i*7,th:{width:i}}},"&-datetime-panel":{display:"flex",[`${t}-time-panel`]:{borderInlineStart:`${u}px ${d} ${v}`},[`${t}-date-panel, + ${t}-time-panel`]:{transition:`opacity ${N}`},"&-active":{[`${t}-date-panel, + ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",direction:"ltr",[`${t}-content`]:{display:"flex",flex:"auto",height:ne},"&-column":{flex:"1 0 auto",width:re,margin:`${s}px 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${x}`,overflowX:"hidden","&::after":{display:"block",height:ne-J,content:'""'},"&:not(:first-child)":{borderInlineStart:`${u}px ${d} ${v}`},"&-active":{background:new Zt(te).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:ee,[`${t}-time-panel-cell-inner`]:{display:"block",width:re-2*ee,height:J,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:(re-J)/2,color:E,lineHeight:`${J}px`,borderRadius:z,cursor:"pointer",transition:`background ${x}`,"&:hover":{background:Y}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:te}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:P,background:"transparent",cursor:"not-allowed"}}}}}},[`&-datetime-panel ${t}-time-panel-column:after`]:{height:ne-J+s*2}}}},u0e=e=>{const{componentCls:t,colorBgContainer:n,colorError:o,colorErrorOutline:r,colorWarning:i,colorWarningOutline:a}=e;return{[t]:{[`&-status-error${t}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:o},"&-focused, &:focus":S({},$s(nt(e,{inputBorderActiveColor:o,inputBorderHoverColor:o,controlOutline:r}))),[`${t}-active-bar`]:{background:o}},[`&-status-warning${t}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:i},"&-focused, &:focus":S({},$s(nt(e,{inputBorderActiveColor:i,inputBorderHoverColor:i,controlOutline:a}))),[`${t}-active-bar`]:{background:i}}}}},d0e=e=>{const{componentCls:t,antCls:n,boxShadowPopoverArrow:o,controlHeight:r,fontSize:i,inputPaddingHorizontal:a,colorBgContainer:l,lineWidth:s,lineType:c,colorBorder:u,borderRadius:d,motionDurationMid:f,colorBgContainerDisabled:h,colorTextDisabled:m,colorTextPlaceholder:v,controlHeightLG:y,fontSizeLG:b,controlHeightSM:$,inputPaddingHorizontalSM:x,paddingXS:_,marginXS:w,colorTextDescription:I,lineWidthBold:O,lineHeight:P,colorPrimary:E,motionDurationSlow:R,zIndexPopup:A,paddingXXS:N,paddingSM:F,pickerTextHeight:W,controlItemBgActive:D,colorPrimaryBorder:B,sizePopupArrow:k,borderRadiusXS:L,borderRadiusOuter:z,colorBgElevated:K,borderRadiusLG:G,boxShadowSecondary:Y,borderRadiusSM:ne,colorSplit:re,controlItemBgHover:J,presetsWidth:te,presetsMaxWidth:ee}=e;return[{[t]:S(S(S({},vt(e)),gC(e,r,i,a)),{position:"relative",display:"inline-flex",alignItems:"center",background:l,lineHeight:1,border:`${s}px ${c} ${u}`,borderRadius:d,transition:`border ${f}, box-shadow ${f}`,"&:hover, &-focused":S({},hf(e)),"&-focused":S({},$s(e)),[`&${t}-disabled`]:{background:h,borderColor:u,cursor:"not-allowed",[`${t}-suffix`]:{color:m}},[`&${t}-borderless`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`${t}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":S(S({},ru(e)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,"&:focus":{boxShadow:"none"},"&[disabled]":{background:"transparent"}}),"&:hover":{[`${t}-clear`]:{opacity:1}},"&-placeholder":{"> input":{color:v}}},"&-large":S(S({},gC(e,y,b,a)),{[`${t}-input > input`]:{fontSize:b}}),"&-small":S({},gC(e,$,i,x)),[`${t}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:_/2,color:m,lineHeight:1,pointerEvents:"none","> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:w}}},[`${t}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:m,lineHeight:1,background:l,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${f}, color ${f}`,"> *":{verticalAlign:"top"},"&:hover":{color:I}},[`${t}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:b,color:m,fontSize:b,verticalAlign:"top",cursor:"default",[`${t}-focused &`]:{color:I},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${t}-clear`]:{insetInlineEnd:a},"&:hover":{[`${t}-clear`]:{opacity:1}},[`${t}-active-bar`]:{bottom:-s,height:O,marginInlineStart:a,background:E,opacity:0,transition:`all ${R} ease-out`,pointerEvents:"none"},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:"center",padding:`0 ${_}px`,lineHeight:1},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:x},[`${t}-active-bar`]:{marginInlineStart:x}}},"&-dropdown":S(S(S({},vt(e)),BB(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:A,[`&${t}-dropdown-hidden`]:{display:"none"},[`&${t}-dropdown-placement-bottomLeft`]:{[`${t}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${t}-dropdown-placement-topLeft`]:{[`${t}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]:{animationName:by},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:vy},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:yy},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:my},[`${t}-panel > ${t}-time-panel`]:{paddingTop:N},[`${t}-ranges`]:{marginBottom:0,padding:`${N}px ${F}px`,overflow:"hidden",lineHeight:`${W-2*s-_/2}px`,textAlign:"start",listStyle:"none",display:"flex",justifyContent:"space-between","> li":{display:"inline-block"},[`${t}-preset > ${n}-tag-blue`]:{color:E,background:D,borderColor:B,cursor:"pointer"},[`${t}-ok`]:{marginInlineStart:"auto"}},[`${t}-range-wrapper`]:{display:"flex",position:"relative"},[`${t}-range-arrow`]:S({position:"absolute",zIndex:1,display:"none",marginInlineStart:a*1.5,transition:`left ${R} ease-out`},L2(k,L,z,K,o)),[`${t}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:K,borderRadius:G,boxShadow:Y,transition:`margin ${R}`,[`${t}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${t}-presets`]:{display:"flex",flexDirection:"column",minWidth:te,maxWidth:ee,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:_,borderInlineEnd:`${s}px ${c} ${re}`,li:S(S({},eo),{borderRadius:ne,paddingInline:_,paddingBlock:($-Math.round(i*P))/2,cursor:"pointer",transition:`all ${R}`,"+ li":{marginTop:w},"&:hover":{background:J}})}},[`${t}-panels`]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr",[`${t}-panel`]:{borderWidth:`0 0 ${s}px`},"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${t}-content, + table`]:{textAlign:"center"},"&-focused":{borderColor:u}}}}),"&-dropdown-range":{padding:`${k*2/3}px 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${t}-separator`]:{transform:"rotate(180deg)"},[`${t}-footer`]:{"&-extra":{direction:"rtl"}}}})},Na(e,"slide-up"),Na(e,"slide-down"),Dd(e,"move-up"),Dd(e,"move-down")]},FB=e=>{const{componentCls:n,controlHeightLG:o,controlHeightSM:r,colorPrimary:i,paddingXXS:a}=e;return{pickerCellCls:`${n}-cell`,pickerCellInnerCls:`${n}-cell-inner`,pickerTextHeight:o,pickerPanelCellWidth:r*1.5,pickerPanelCellHeight:r,pickerDateHoverRangeBorderColor:new Zt(i).lighten(20).toHexString(),pickerBasicCellHoverWithRangeColor:new Zt(i).lighten(35).toHexString(),pickerPanelWithoutTimeCellHeight:o*1.65,pickerYearMonthCellWidth:o*1.5,pickerTimePanelColumnHeight:28*8,pickerTimePanelColumnWidth:o*1.4,pickerTimePanelCellHeight:28,pickerQuarterPanelContentHeight:o*1.4,pickerCellPaddingVertical:a,pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconBorderWidth:1.5}},HB=pt("DatePicker",e=>{const t=nt(iu(e),FB(e));return[d0e(t),u0e(t),uf(e,{focusElCls:`${e.componentCls}-focused`})]},e=>({presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50})),f0e=e=>{const{calendarCls:t,componentCls:n,calendarFullBg:o,calendarFullPanelBg:r,calendarItemActiveBg:i}=e;return{[t]:S(S(S({},BB(e)),vt(e)),{background:o,"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",justifyContent:"flex-end",padding:`${e.paddingSM}px 0`,[`${t}-year-select`]:{minWidth:e.yearControlWidth},[`${t}-month-select`]:{minWidth:e.monthControlWidth,marginInlineStart:e.marginXS},[`${t}-mode-switch`]:{marginInlineStart:e.marginXS}}}),[`${t} ${n}-panel`]:{background:r,border:0,borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,[`${n}-month-panel, ${n}-date-panel`]:{width:"auto"},[`${n}-body`]:{padding:`${e.paddingXS}px 0`},[`${n}-content`]:{width:"100%"}},[`${t}-mini`]:{borderRadius:e.borderRadiusLG,[`${t}-header`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS},[`${n}-panel`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${n}-content`]:{height:e.miniContentHeight,th:{height:"auto",padding:0,lineHeight:`${e.weekHeight}px`}},[`${n}-cell::before`]:{pointerEvents:"none"}},[`${t}${t}-full`]:{[`${n}-panel`]:{display:"block",width:"100%",textAlign:"end",background:o,border:0,[`${n}-body`]:{"th, td":{padding:0},th:{height:"auto",paddingInlineEnd:e.paddingSM,paddingBottom:e.paddingXXS,lineHeight:`${e.weekHeight}px`}}},[`${n}-cell`]:{"&::before":{display:"none"},"&:hover":{[`${t}-date`]:{background:e.controlItemBgHover}},[`${t}-date-today::before`]:{display:"none"},[`&-in-view${n}-cell-selected`]:{[`${t}-date, ${t}-date-today`]:{background:i}},"&-selected, &-selected:hover":{[`${t}-date, ${t}-date-today`]:{[`${t}-date-value`]:{color:e.colorPrimary}}}},[`${t}-date`]:{display:"block",width:"auto",height:"auto",margin:`0 ${e.marginXS/2}px`,padding:`${e.paddingXS/2}px ${e.paddingXS}px 0`,border:0,borderTop:`${e.lineWidthBold}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,transition:`background ${e.motionDurationSlow}`,"&-value":{lineHeight:`${e.dateValueHeight}px`,transition:`color ${e.motionDurationSlow}`},"&-content":{position:"static",width:"auto",height:e.dateContentHeight,overflowY:"auto",color:e.colorText,lineHeight:e.lineHeight,textAlign:"start"},"&-today":{borderColor:e.colorPrimary,[`${t}-date-value`]:{color:e.colorText}}}},[`@media only screen and (max-width: ${e.screenXS}px) `]:{[`${t}`]:{[`${t}-header`]:{display:"block",[`${t}-year-select`]:{width:"50%"},[`${t}-month-select`]:{width:`calc(50% - ${e.paddingXS}px)`},[`${t}-mode-switch`]:{width:"100%",marginTop:e.marginXS,marginInlineStart:0,"> label":{width:"50%",textAlign:"center"}}}}}}},p0e=pt("Calendar",e=>{const t=`${e.componentCls}-calendar`,n=nt(iu(e),FB(e),{calendarCls:t,pickerCellInnerCls:`${e.componentCls}-cell-inner`,calendarFullBg:e.colorBgContainer,calendarFullPanelBg:e.colorBgContainer,calendarItemActiveBg:e.controlItemBgActive,dateValueHeight:e.controlHeightSM,weekHeight:e.controlHeightSM*.75,dateContentHeight:(e.fontSizeSM*e.lineHeightSM+e.marginXS)*3+e.lineWidth*2});return[f0e(n)]},{yearControlWidth:80,monthControlWidth:70,miniContentHeight:256});function h0e(e){function t(i,a){return i&&a&&e.getYear(i)===e.getYear(a)}function n(i,a){return t(i,a)&&e.getMonth(i)===e.getMonth(a)}function o(i,a){return n(i,a)&&e.getDate(i)===e.getDate(a)}const r=pe({name:"ACalendar",inheritAttrs:!1,props:{prefixCls:String,locale:{type:Object,default:void 0},validRange:{type:Array,default:void 0},disabledDate:{type:Function,default:void 0},dateFullCellRender:{type:Function,default:void 0},dateCellRender:{type:Function,default:void 0},monthFullCellRender:{type:Function,default:void 0},monthCellRender:{type:Function,default:void 0},headerRender:{type:Function,default:void 0},value:{type:[Object,String],default:void 0},defaultValue:{type:[Object,String],default:void 0},mode:{type:String,default:void 0},fullscreen:{type:Boolean,default:void 0},onChange:{type:Function,default:void 0},"onUpdate:value":{type:Function,default:void 0},onPanelChange:{type:Function,default:void 0},onSelect:{type:Function,default:void 0},valueFormat:{type:String,default:void 0}},slots:Object,setup(i,a){let{emit:l,slots:s,attrs:c}=a;const u=i,{prefixCls:d,direction:f}=Ve("picker",u),[h,m]=p0e(d),v=M(()=>`${d.value}-calendar`),y=D=>u.valueFormat?e.toString(D,u.valueFormat):D,b=M(()=>u.value?u.valueFormat?e.toDate(u.value,u.valueFormat):u.value:u.value===""?void 0:u.value),$=M(()=>u.defaultValue?u.valueFormat?e.toDate(u.defaultValue,u.valueFormat):u.defaultValue:u.defaultValue===""?void 0:u.defaultValue),[x,_]=yn(()=>b.value||e.getNow(),{defaultValue:$.value,value:b}),[w,I]=yn("month",{value:st(u,"mode")}),O=M(()=>w.value==="year"?"month":"date"),P=M(()=>D=>{var B;return(u.validRange?e.isAfter(u.validRange[0],D)||e.isAfter(D,u.validRange[1]):!1)||!!(!((B=u.disabledDate)===null||B===void 0)&&B.call(u,D))}),E=(D,B)=>{l("panelChange",y(D),B)},R=D=>{if(_(D),!o(D,x.value)){(O.value==="date"&&!n(D,x.value)||O.value==="month"&&!t(D,x.value))&&E(D,w.value);const B=y(D);l("update:value",B),l("change",B)}},A=D=>{I(D),E(x.value,D)},N=(D,B)=>{R(D),l("select",y(D),{source:B})},F=M(()=>{const{locale:D}=u,B=S(S({},th),D);return B.lang=S(S({},B.lang),(D||{}).lang),B}),[W]=Wi("Calendar",F);return()=>{const D=e.getNow(),{dateFullCellRender:B=s==null?void 0:s.dateFullCellRender,dateCellRender:k=s==null?void 0:s.dateCellRender,monthFullCellRender:L=s==null?void 0:s.monthFullCellRender,monthCellRender:z=s==null?void 0:s.monthCellRender,headerRender:K=s==null?void 0:s.headerRender,fullscreen:G=!0,validRange:Y}=u,ne=J=>{let{current:te}=J;return B?B({current:te}):g("div",{class:me(`${d.value}-cell-inner`,`${v.value}-date`,{[`${v.value}-date-today`]:o(D,te)})},[g("div",{class:`${v.value}-date-value`},[String(e.getDate(te)).padStart(2,"0")]),g("div",{class:`${v.value}-date-content`},[k&&k({current:te})])])},re=(J,te)=>{let{current:ee}=J;if(L)return L({current:ee});const fe=te.shortMonths||e.locale.getShortMonths(te.locale);return g("div",{class:me(`${d.value}-cell-inner`,`${v.value}-date`,{[`${v.value}-date-today`]:n(D,ee)})},[g("div",{class:`${v.value}-date-value`},[fe[e.getMonth(ee)]]),g("div",{class:`${v.value}-date-content`},[z&&z({current:ee})])])};return h(g("div",V(V({},c),{},{class:me(v.value,{[`${v.value}-full`]:G,[`${v.value}-mini`]:!G,[`${v.value}-rtl`]:f.value==="rtl"},c.class,m.value)}),[K?K({value:x.value,type:w.value,onChange:J=>{N(J,"customize")},onTypeChange:A}):g(n0e,{prefixCls:v.value,value:x.value,generateConfig:e,mode:w.value,fullscreen:G,locale:W.value.lang,validRange:Y,onChange:N,onModeChange:A},null),g($O,{value:x.value,prefixCls:d.value,locale:W.value.lang,generateConfig:e,dateRender:ne,monthCellRender:J=>re(J,W.value.lang),onSelect:J=>{N(J,O.value)},mode:O.value,picker:O.value,disabledDate:P.value,hideHeader:!0},null)]))}}});return r.install=function(i){return i.component(r.name,r),i},r}const g0e=h0e(oO),v0e=$n(g0e);function m0e(e){const t=ve(),n=ve(!1);function o(){for(var r=arguments.length,i=new Array(r),a=0;a{e(...i)}))}return Ct(()=>{n.value=!0,mt.cancel(t.value)}),o}function b0e(e){const t=ve([]),n=ve(typeof e=="function"?e():e),o=m0e(()=>{let i=n.value;t.value.forEach(a=>{i=a(i)}),t.value=[],n.value=i});function r(i){t.value.push(i),o()}return[n,r]}const y0e=pe({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:n,attrs:o}=t;const r=he();function i(s){var c;!((c=e.tab)===null||c===void 0)&&c.disabled||e.onClick(s)}n({domRef:r});function a(s){var c;s.preventDefault(),s.stopPropagation(),e.editable.onEdit("remove",{key:(c=e.tab)===null||c===void 0?void 0:c.key,event:s})}const l=M(()=>{var s;return e.editable&&e.closable!==!1&&!(!((s=e.tab)===null||s===void 0)&&s.disabled)});return()=>{var s;const{prefixCls:c,id:u,active:d,tab:{key:f,tab:h,disabled:m,closeIcon:v},renderWrapper:y,removeAriaLabel:b,editable:$,onFocus:x}=e,_=`${c}-tab`,w=g("div",{key:f,ref:r,class:me(_,{[`${_}-with-remove`]:l.value,[`${_}-active`]:d,[`${_}-disabled`]:m}),style:o.style,onClick:i},[g("div",{role:"tab","aria-selected":d,id:u&&`${u}-tab-${f}`,class:`${_}-btn`,"aria-controls":u&&`${u}-panel-${f}`,"aria-disabled":m,tabindex:m?null:0,onClick:I=>{I.stopPropagation(),i(I)},onKeydown:I=>{[Fe.SPACE,Fe.ENTER].includes(I.which)&&(I.preventDefault(),i(I))},onFocus:x},[typeof h=="function"?h():h]),l.value&&g("button",{type:"button","aria-label":b||"remove",tabindex:0,class:`${_}-remove`,onClick:I=>{I.stopPropagation(),a(I)}},[(v==null?void 0:v())||((s=$.removeIcon)===null||s===void 0?void 0:s.call($))||"×"])]);return y?y(w):w}}}),VM={width:0,height:0,left:0,top:0};function S0e(e,t){const n=he(new Map);return ct(()=>{var o,r;const i=new Map,a=e.value,l=t.value.get((o=a[0])===null||o===void 0?void 0:o.key)||VM,s=l.left+l.width;for(let c=0;c{const{prefixCls:i,editable:a,locale:l}=e;return!a||a.showAdd===!1?null:g("button",{ref:r,type:"button",class:`${i}-nav-add`,style:o.style,"aria-label":(l==null?void 0:l.addAriaLabel)||"Add tab",onClick:s=>{a.onEdit("add",{event:s})}},[a.addIcon?a.addIcon():"+"])}}}),C0e={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:Z.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:Oe()},$0e=pe({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:C0e,emits:["tabClick"],slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const[r,i]=nn(!1),[a,l]=nn(null),s=h=>{const m=e.tabs.filter(b=>!b.disabled);let v=m.findIndex(b=>b.key===a.value)||0;const y=m.length;for(let b=0;b{const{which:m}=h;if(!r.value){[Fe.DOWN,Fe.SPACE,Fe.ENTER].includes(m)&&(i(!0),h.preventDefault());return}switch(m){case Fe.UP:s(-1),h.preventDefault();break;case Fe.DOWN:s(1),h.preventDefault();break;case Fe.ESC:i(!1);break;case Fe.SPACE:case Fe.ENTER:a.value!==null&&e.onTabClick(a.value,h);break}},u=M(()=>`${e.id}-more-popup`),d=M(()=>a.value!==null?`${u.value}-${a.value}`:null),f=(h,m)=>{h.preventDefault(),h.stopPropagation(),e.editable.onEdit("remove",{key:m,event:h})};return lt(()=>{Ie(a,()=>{const h=document.getElementById(d.value);h&&h.scrollIntoView&&h.scrollIntoView(!1)},{flush:"post",immediate:!0})}),Ie(r,()=>{r.value||l(null)}),eO({}),()=>{var h;const{prefixCls:m,id:v,tabs:y,locale:b,mobile:$,moreIcon:x=((h=o.moreIcon)===null||h===void 0?void 0:h.call(o))||g(Q_,null,null),moreTransitionName:_,editable:w,tabBarGutter:I,rtl:O,onTabClick:P,popupClassName:E}=e;if(!y.length)return null;const R=`${m}-dropdown`,A=b==null?void 0:b.dropdownAriaLabel,N={[O?"marginRight":"marginLeft"]:I};y.length||(N.visibility="hidden",N.order=1);const F=me({[`${R}-rtl`]:O,[`${E}`]:!0}),W=$?null:g(P9,{prefixCls:R,trigger:["hover"],visible:r.value,transitionName:_,onVisibleChange:i,overlayClassName:F,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:e.getPopupContainer},{overlay:()=>g(qn,{onClick:D=>{let{key:B,domEvent:k}=D;P(B,k),i(!1)},id:u.value,tabindex:-1,role:"listbox","aria-activedescendant":d.value,selectedKeys:[a.value],"aria-label":A!==void 0?A:"expanded dropdown"},{default:()=>[y.map(D=>{var B,k;const L=w&&D.closable!==!1&&!D.disabled;return g(Ea,{key:D.key,id:`${u.value}-${D.key}`,role:"option","aria-controls":v&&`${v}-panel-${D.key}`,disabled:D.disabled},{default:()=>[g("span",null,[typeof D.tab=="function"?D.tab():D.tab]),L&&g("button",{type:"button","aria-label":e.removeAriaLabel||"remove",tabindex:0,class:`${R}-menu-item-remove`,onClick:z=>{z.stopPropagation(),f(z,D.key)}},[((B=D.closeIcon)===null||B===void 0?void 0:B.call(D))||((k=w.removeIcon)===null||k===void 0?void 0:k.call(w))||"×"])]})})]}),default:()=>g("button",{type:"button",class:`${m}-nav-more`,style:N,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":u.value,id:`${v}-more`,"aria-expanded":r.value,onKeydown:c},[x])});return g("div",{class:me(`${m}-nav-operations`,n.class),style:n.style},[W,g(zB,{prefixCls:m,locale:b,editable:w},null)])}}}),jB=Symbol("tabsContextKey"),x0e=e=>{ft(jB,e)},WB=()=>it(jB,{tabs:he([]),prefixCls:he()}),w0e=.1,KM=.01,vm=20,UM=Math.pow(.995,vm);function _0e(e,t){const[n,o]=nn(),[r,i]=nn(0),[a,l]=nn(0),[s,c]=nn(),u=he();function d(w){const{screenX:I,screenY:O}=w.touches[0];o({x:I,y:O}),clearInterval(u.value)}function f(w){if(!n.value)return;w.preventDefault();const{screenX:I,screenY:O}=w.touches[0],P=I-n.value.x,E=O-n.value.y;t(P,E),o({x:I,y:O});const R=Date.now();l(R-r.value),i(R),c({x:P,y:E})}function h(){if(!n.value)return;const w=s.value;if(o(null),c(null),w){const I=w.x/a.value,O=w.y/a.value,P=Math.abs(I),E=Math.abs(O);if(Math.max(P,E){if(Math.abs(R)R?(P=I,m.value="x"):(P=O,m.value="y"),t(-P,-P)&&w.preventDefault()}const y=he({onTouchStart:d,onTouchMove:f,onTouchEnd:h,onWheel:v});function b(w){y.value.onTouchStart(w)}function $(w){y.value.onTouchMove(w)}function x(w){y.value.onTouchEnd(w)}function _(w){y.value.onWheel(w)}lt(()=>{var w,I;document.addEventListener("touchmove",$,{passive:!1}),document.addEventListener("touchend",x,{passive:!1}),(w=e.value)===null||w===void 0||w.addEventListener("touchstart",b,{passive:!1}),(I=e.value)===null||I===void 0||I.addEventListener("wheel",_,{passive:!1})}),Ct(()=>{document.removeEventListener("touchmove",$),document.removeEventListener("touchend",x)})}function GM(e,t){const n=he(e);function o(r){const i=typeof r=="function"?r(n.value):r;i!==n.value&&t(i,n.value),n.value=i}return[n,o]}const TO=()=>{const e=he(new Map),t=n=>o=>{e.value.set(n,o)};return Eb(()=>{e.value=new Map}),[t,e]},YM={width:0,height:0,left:0,top:0,right:0},O0e=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:qe(),editable:qe(),moreIcon:Z.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:qe(),popupClassName:String,getPopupContainer:Oe(),onTabClick:{type:Function},onTabScroll:{type:Function}}),XM=pe({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:O0e(),slots:Object,emits:["tabClick","tabScroll"],setup(e,t){let{attrs:n,slots:o}=t;const{tabs:r,prefixCls:i}=WB(),a=ve(),l=ve(),s=ve(),c=ve(),[u,d]=TO(),f=M(()=>e.tabPosition==="top"||e.tabPosition==="bottom"),[h,m]=GM(0,(ae,ge)=>{f.value&&e.onTabScroll&&e.onTabScroll({direction:ae>ge?"left":"right"})}),[v,y]=GM(0,(ae,ge)=>{!f.value&&e.onTabScroll&&e.onTabScroll({direction:ae>ge?"top":"bottom"})}),[b,$]=nn(0),[x,_]=nn(0),[w,I]=nn(null),[O,P]=nn(null),[E,R]=nn(0),[A,N]=nn(0),[F,W]=b0e(new Map),D=S0e(r,F),B=M(()=>`${i.value}-nav-operations-hidden`),k=ve(0),L=ve(0);ct(()=>{f.value?e.rtl?(k.value=0,L.value=Math.max(0,b.value-w.value)):(k.value=Math.min(0,w.value-b.value),L.value=0):(k.value=Math.min(0,O.value-x.value),L.value=0)});const z=ae=>aeL.value?L.value:ae,K=ve(),[G,Y]=nn(),ne=()=>{Y(Date.now())},re=()=>{clearTimeout(K.value)},J=(ae,ge)=>{ae(Se=>z(Se+ge))};_0e(a,(ae,ge)=>{if(f.value){if(w.value>=b.value)return!1;J(m,ae)}else{if(O.value>=x.value)return!1;J(y,ge)}return re(),ne(),!0}),Ie(G,()=>{re(),G.value&&(K.value=setTimeout(()=>{Y(0)},100))});const te=function(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey;const ge=D.value.get(ae)||{width:0,height:0,left:0,right:0,top:0};if(f.value){let Se=h.value;e.rtl?ge.righth.value+w.value&&(Se=ge.right+ge.width-w.value):ge.left<-h.value?Se=-ge.left:ge.left+ge.width>-h.value+w.value&&(Se=-(ge.left+ge.width-w.value)),y(0),m(z(Se))}else{let Se=v.value;ge.top<-v.value?Se=-ge.top:ge.top+ge.height>-v.value+O.value&&(Se=-(ge.top+ge.height-O.value)),m(0),y(z(Se))}},ee=ve(0),fe=ve(0);ct(()=>{let ae,ge,Se,$e,_e,be;const Te=D.value;["top","bottom"].includes(e.tabPosition)?(ae="width",$e=w.value,_e=b.value,be=E.value,ge=e.rtl?"right":"left",Se=Math.abs(h.value)):(ae="height",$e=O.value,_e=b.value,be=A.value,ge="top",Se=-v.value);let Pe=$e;_e+be>$e&&_e<$e&&(Pe=$e-be);const oe=r.value;if(!oe.length)return[ee.value,fe.value]=[0,0];const le=oe.length;let xe=le;for(let Be=0;BeSe+Pe){xe=Be-1;break}}let Ae=0;for(let Be=le-1;Be>=0;Be-=1)if((Te.get(oe[Be].key)||YM)[ge]{var ae,ge,Se,$e,_e;const be=((ae=a.value)===null||ae===void 0?void 0:ae.offsetWidth)||0,Te=((ge=a.value)===null||ge===void 0?void 0:ge.offsetHeight)||0,Pe=((Se=c.value)===null||Se===void 0?void 0:Se.$el)||{},oe=Pe.offsetWidth||0,le=Pe.offsetHeight||0;I(be),P(Te),R(oe),N(le);const xe=((($e=l.value)===null||$e===void 0?void 0:$e.offsetWidth)||0)-oe,Ae=(((_e=l.value)===null||_e===void 0?void 0:_e.offsetHeight)||0)-le;$(xe),_(Ae),W(()=>{const Be=new Map;return r.value.forEach(Ye=>{let{key:Re}=Ye;const Le=d.value.get(Re),Ne=(Le==null?void 0:Le.$el)||Le;Ne&&Be.set(Re,{width:Ne.offsetWidth,height:Ne.offsetHeight,left:Ne.offsetLeft,top:Ne.offsetTop})}),Be})},X=M(()=>[...r.value.slice(0,ee.value),...r.value.slice(fe.value+1)]),[ue,ye]=nn(),H=M(()=>D.value.get(e.activeKey)),j=ve(),q=()=>{mt.cancel(j.value)};Ie([H,f,()=>e.rtl],()=>{const ae={};H.value&&(f.value?(e.rtl?ae.right=uc(H.value.right):ae.left=uc(H.value.left),ae.width=uc(H.value.width)):(ae.top=uc(H.value.top),ae.height=uc(H.value.height))),q(),j.value=mt(()=>{ye(ae)})}),Ie([()=>e.activeKey,H,D,f],()=>{te()},{flush:"post"}),Ie([()=>e.rtl,()=>e.tabBarGutter,()=>e.activeKey,()=>r.value],()=>{ie()},{flush:"post"});const se=ae=>{let{position:ge,prefixCls:Se,extra:$e}=ae;if(!$e)return null;const _e=$e==null?void 0:$e({position:ge});return _e?g("div",{class:`${Se}-extra-content`},[_e]):null};return Ct(()=>{re(),q()}),()=>{const{id:ae,animated:ge,activeKey:Se,rtl:$e,editable:_e,locale:be,tabPosition:Te,tabBarGutter:Pe,onTabClick:oe}=e,{class:le,style:xe}=n,Ae=i.value,Be=!!X.value.length,Ye=`${Ae}-nav-wrap`;let Re,Le,Ne,Ke;f.value?$e?(Le=h.value>0,Re=h.value+w.value{const{key:Mt}=Xe;return g(y0e,{id:ae,prefixCls:Ae,key:Mt,tab:Xe,style:xt===0?void 0:Ze,closable:Xe.closable,editable:_e,active:Mt===Se,removeAriaLabel:be==null?void 0:be.removeAriaLabel,ref:u(Mt),onClick:Ft=>{oe(Mt,Ft)},onFocus:()=>{te(Mt),ne(),a.value&&($e||(a.value.scrollLeft=0),a.value.scrollTop=0)}},o)});return g("div",{role:"tablist",class:me(`${Ae}-nav`,le),style:xe,onKeydown:()=>{ne()}},[g(se,{position:"left",prefixCls:Ae,extra:o.leftExtra},null),g(ki,{onResize:ie},{default:()=>[g("div",{class:me(Ye,{[`${Ye}-ping-left`]:Re,[`${Ye}-ping-right`]:Le,[`${Ye}-ping-top`]:Ne,[`${Ye}-ping-bottom`]:Ke}),ref:a},[g(ki,{onResize:ie},{default:()=>[g("div",{ref:l,class:`${Ae}-nav-list`,style:{transform:`translate(${h.value}px, ${v.value}px)`,transition:G.value?"none":void 0}},[Ue,g(zB,{ref:c,prefixCls:Ae,locale:be,editable:_e,style:S(S({},Ue.length===0?void 0:Ze),{visibility:Be?"hidden":null})},null),g("div",{class:me(`${Ae}-ink-bar`,{[`${Ae}-ink-bar-animated`]:ge.inkBar}),style:ue.value},null)])]})])]}),g($0e,V(V({},e),{},{removeAriaLabel:be==null?void 0:be.removeAriaLabel,ref:s,prefixCls:Ae,tabs:X.value,class:!Be&&B.value}),g9(o,["moreIcon"])),g(se,{position:"right",prefixCls:Ae,extra:o.rightExtra},null),g(se,{position:"right",prefixCls:Ae,extra:o.tabBarExtraContent},null)])}}}),I0e=pe({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(e){const{tabs:t,prefixCls:n}=WB();return()=>{const{id:o,activeKey:r,animated:i,tabPosition:a,rtl:l,destroyInactiveTabPane:s}=e,c=i.tabPane,u=n.value,d=t.value.findIndex(f=>f.key===r);return g("div",{class:`${u}-content-holder`},[g("div",{class:[`${u}-content`,`${u}-content-${a}`,{[`${u}-content-animated`]:c}],style:d&&c?{[l?"marginRight":"marginLeft"]:`-${d}00%`}:null},[t.value.map(f=>Gt(f.node,{key:f.key,prefixCls:u,tabKey:f.key,id:o,animated:c,active:f.key===r,destroyInactiveTabPane:s}))])])}}});var P0e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const T0e=P0e;function qM(e){for(var t=1;t{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[Na(e,"slide-up"),Na(e,"slide-down")]]},R0e=M0e,D0e=e=>{const{componentCls:t,tabsCardHorizontalPadding:n,tabsCardHeadBackground:o,tabsCardGutter:r,colorSplit:i}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:o,border:`${e.lineWidth}px ${e.lineType} ${i}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:e.colorPrimary,background:e.colorBgContainer},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:`${r}px`}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:`${r}px`}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},L0e=e=>{const{componentCls:t,tabsHoverColor:n,dropdownEdgeChildVerticalPadding:o}=e;return{[`${t}-dropdown`]:S(S({},vt(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${o}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":S(S({},eo),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${e.paddingXXS}px ${e.paddingSM}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},N0e=e=>{const{componentCls:t,margin:n,colorSplit:o}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:`0 0 ${n}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${e.lineWidth}px ${e.lineType} ${o}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow}, + right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, + > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:`${n}px`,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:e.controlHeight*1.25,[`${t}-tab`]:{padding:`${e.paddingXS}px ${e.paddingLG}px`,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:`${e.margin}px 0 0 0`},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${e.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-e.lineWidth},borderRight:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},k0e=e=>{const{componentCls:t,padding:n}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px 0`,fontSize:e.fontSize}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${n}px 0`,fontSize:e.fontSizeLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXXS*1.5}px ${n}px`}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${e.borderRadius}px ${e.borderRadius}px`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${e.borderRadius}px ${e.borderRadius}px 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadius}px ${e.borderRadius}px 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadius}px 0 0 ${e.borderRadius}px`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px ${n}px ${e.paddingXXS*1.5}px`}}}}}},B0e=e=>{const{componentCls:t,tabsActiveColor:n,tabsHoverColor:o,iconCls:r,tabsHorizontalGutter:i}=e,a=`${t}-tab`;return{[a]:{position:"relative",display:"inline-flex",alignItems:"center",padding:`${e.paddingSM}px 0`,fontSize:`${e.fontSize}px`,background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":S({"&:focus:not(:focus-visible), &:active":{color:n}},Sl(e)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-e.marginXXS},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},"&:hover":{color:o},[`&${a}-active ${a}-btn`]:{color:e.colorPrimary,textShadow:e.tabsActiveTextShadow},[`&${a}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${a}-disabled ${a}-btn, &${a}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${a}-remove ${r}`]:{margin:0},[r]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${a} + ${a}`]:{margin:{_skip_check_:!0,value:`0 0 0 ${i}px`}}}},F0e=e=>{const{componentCls:t,tabsHorizontalGutter:n,iconCls:o,tabsCardGutter:r}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:`0 0 0 ${n}px`},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[o]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${e.marginSM}px`}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${e.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${e.marginXXS}px`},[o]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:`${r}px`},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},H0e=e=>{const{componentCls:t,tabsCardHorizontalPadding:n,tabsCardHeight:o,tabsCardGutter:r,tabsHoverColor:i,tabsActiveColor:a,colorSplit:l}=e;return{[t]:S(S(S(S({},vt(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:S({minWidth:`${o}px`,marginLeft:{_skip_check_:!0,value:`${r}px`},padding:`0 ${e.paddingXS}px`,background:"transparent",border:`${e.lineWidth}px ${e.lineType} ${l}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:a}},Sl(e))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.colorPrimary,pointerEvents:"none"}}),B0e(e)),{[`${t}-content`]:{position:"relative",display:"flex",width:"100%","&-animated":{transition:"margin 0.3s"}},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{outline:"none",flex:"none",width:"100%"}}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},z0e=pt("Tabs",e=>{const t=e.controlHeightLG,n=nt(e,{tabsHoverColor:e.colorPrimaryHover,tabsActiveColor:e.colorPrimaryActive,tabsCardHorizontalPadding:`${(t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth}px ${e.padding}px`,tabsCardHeight:t,tabsCardGutter:e.marginXXS/2,tabsHorizontalGutter:32,tabsCardHeadBackground:e.colorFillAlter,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120});return[k0e(n),F0e(n),N0e(n),L0e(n),D0e(n),H0e(n),R0e(n)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));let ZM=0;const VB=()=>({prefixCls:{type:String},id:{type:String},popupClassName:String,getPopupContainer:Oe(),activeKey:{type:[String,Number]},defaultActiveKey:{type:[String,Number]},direction:Qe(),animated:rt([Boolean,Object]),renderTabBar:Oe(),tabBarGutter:{type:Number},tabBarStyle:qe(),tabPosition:Qe(),destroyInactiveTabPane:De(),hideAdd:Boolean,type:Qe(),size:Qe(),centered:Boolean,onEdit:Oe(),onChange:Oe(),onTabClick:Oe(),onTabScroll:Oe(),"onUpdate:activeKey":Oe(),locale:qe(),onPrevClick:Oe(),onNextClick:Oe(),tabBarExtraContent:Z.any});function j0e(e){return e.map(t=>{if(Jn(t)){const n=S({},t.props||{});for(const[f,h]of Object.entries(n))delete n[f],n[Gc(f)]=h;const o=t.children||{},r=t.key!==void 0?t.key:void 0,{tab:i=o.tab,disabled:a,forceRender:l,closable:s,animated:c,active:u,destroyInactiveTabPane:d}=n;return S(S({key:r},n),{node:t,closeIcon:o.closeIcon,tab:i,disabled:a===""||a,forceRender:l===""||l,closable:s===""||s,animated:c===""||c,active:u===""||u,destroyInactiveTabPane:d===""||d})}return null}).filter(t=>t)}const W0e=pe({compatConfig:{MODE:3},name:"InternalTabs",inheritAttrs:!1,props:S(S({},bt(VB(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}})),{tabs:kt()}),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;pn(e.onPrevClick===void 0&&e.onNextClick===void 0,"Tabs","`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."),pn(e.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."),pn(o.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");const{prefixCls:r,direction:i,size:a,rootPrefixCls:l,getPopupContainer:s}=Ve("tabs",e),[c,u]=z0e(r),d=M(()=>i.value==="rtl"),f=M(()=>{const{animated:O,tabPosition:P}=e;return O===!1||["left","right"].includes(P)?{inkBar:!1,tabPane:!1}:O===!0?{inkBar:!0,tabPane:!0}:S({inkBar:!0,tabPane:!1},typeof O=="object"?O:{})}),[h,m]=nn(!1);lt(()=>{m(r_())});const[v,y]=yn(()=>{var O;return(O=e.tabs[0])===null||O===void 0?void 0:O.key},{value:M(()=>e.activeKey),defaultValue:e.defaultActiveKey}),[b,$]=nn(()=>e.tabs.findIndex(O=>O.key===v.value));ct(()=>{var O;let P=e.tabs.findIndex(E=>E.key===v.value);P===-1&&(P=Math.max(0,Math.min(b.value,e.tabs.length-1)),y((O=e.tabs[P])===null||O===void 0?void 0:O.key)),$(P)});const[x,_]=yn(null,{value:M(()=>e.id)}),w=M(()=>h.value&&!["left","right"].includes(e.tabPosition)?"top":e.tabPosition);lt(()=>{e.id||(_(`rc-tabs-${ZM}`),ZM+=1)});const I=(O,P)=>{var E,R;(E=e.onTabClick)===null||E===void 0||E.call(e,O,P);const A=O!==v.value;y(O),A&&((R=e.onChange)===null||R===void 0||R.call(e,O))};return x0e({tabs:M(()=>e.tabs),prefixCls:r}),()=>{const{id:O,type:P,tabBarGutter:E,tabBarStyle:R,locale:A,destroyInactiveTabPane:N,renderTabBar:F=o.renderTabBar,onTabScroll:W,hideAdd:D,centered:B}=e,k={id:x.value,activeKey:v.value,animated:f.value,tabPosition:w.value,rtl:d.value,mobile:h.value};let L;P==="editable-card"&&(L={onEdit:(Y,ne)=>{let{key:re,event:J}=ne;var te;(te=e.onEdit)===null||te===void 0||te.call(e,Y==="add"?J:re,Y)},removeIcon:()=>g(Vr,null,null),addIcon:o.addIcon?o.addIcon:()=>g(A0e,null,null),showAdd:D!==!0});let z;const K=S(S({},k),{moreTransitionName:`${l.value}-slide-up`,editable:L,locale:A,tabBarGutter:E,onTabClick:I,onTabScroll:W,style:R,getPopupContainer:s.value,popupClassName:me(e.popupClassName,u.value)});F?z=F(S(S({},K),{DefaultTabBar:XM})):z=g(XM,K,g9(o,["moreIcon","leftExtra","rightExtra","tabBarExtraContent"]));const G=r.value;return c(g("div",V(V({},n),{},{id:O,class:me(G,`${G}-${w.value}`,{[u.value]:!0,[`${G}-${a.value}`]:a.value,[`${G}-card`]:["card","editable-card"].includes(P),[`${G}-editable-card`]:P==="editable-card",[`${G}-centered`]:B,[`${G}-mobile`]:h.value,[`${G}-editable`]:P==="editable-card",[`${G}-rtl`]:d.value},n.class)}),[z,g(I0e,V(V({destroyInactiveTabPane:N},k),{},{animated:f.value}),null)]))}}}),Oc=pe({compatConfig:{MODE:3},name:"ATabs",inheritAttrs:!1,props:bt(VB(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=a=>{r("update:activeKey",a),r("change",a)};return()=>{var a;const l=j0e(ln((a=o.default)===null||a===void 0?void 0:a.call(o)));return g(W0e,V(V(V({},_t(e,["onUpdate:activeKey"])),n),{},{onChange:i,tabs:l}),o)}}}),V0e=()=>({tab:Z.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}),L0=pe({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:V0e(),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const r=he(e.forceRender);Ie([()=>e.active,()=>e.destroyInactiveTabPane],()=>{e.active?r.value=!0:e.destroyInactiveTabPane&&(r.value=!1)},{immediate:!0});const i=M(()=>e.active?{}:e.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"});return()=>{var a;const{prefixCls:l,forceRender:s,id:c,active:u,tabKey:d}=e;return g("div",{id:c&&`${c}-panel-${d}`,role:"tabpanel",tabindex:u?0:-1,"aria-labelledby":c&&`${c}-tab-${d}`,"aria-hidden":!u,style:[i.value,n.style],class:[`${l}-tabpane`,u&&`${l}-tabpane-active`,n.class]},[(u||r.value||s)&&((a=o.default)===null||a===void 0?void 0:a.call(o))])}}});Oc.TabPane=L0;Oc.install=function(e){return e.component(Oc.name,Oc),e.component(L0.name,L0),e};const K0e=e=>{const{antCls:t,componentCls:n,cardHeadHeight:o,cardPaddingBase:r,cardHeadTabsMarginBottom:i}=e;return S(S({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:o,marginBottom:-1,padding:`0 ${r}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,background:"transparent",borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},aa()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":S(S({display:"inline-block",flex:1},eo),{[` + > ${n}-typography, + > ${n}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:i,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`}}})},U0e=e=>{const{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:o,lineWidth:r}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${r}px 0 0 0 ${n}, + 0 ${r}px 0 0 ${n}, + ${r}px ${r}px 0 0 ${n}, + ${r}px 0 0 0 ${n} inset, + 0 ${r}px 0 0 ${n} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:o}}},G0e=e=>{const{componentCls:t,iconCls:n,cardActionsLiMargin:o,cardActionsIconSize:r,colorBorderSecondary:i}=e;return S(S({margin:0,padding:0,listStyle:"none",background:e.colorBgContainer,borderTop:`${e.lineWidth}px ${e.lineType} ${i}`,display:"flex",borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `},aa()),{"& > li":{margin:o,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.cardActionsIconSize*2,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:`${e.fontSize*e.lineHeight}px`,transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:r,lineHeight:`${r*e.lineHeight}px`}},"&:not(:last-child)":{borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${i}`}}})},Y0e=e=>S(S({margin:`-${e.marginXXS}px 0`,display:"flex"},aa()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":S({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},eo),"&-description":{color:e.colorTextDescription}}),X0e=e=>{const{componentCls:t,cardPaddingBase:n,colorFillAlter:o}=e;return{[`${t}-head`]:{padding:`0 ${n}px`,background:o,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${e.padding}px ${n}px`}}},q0e=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},Z0e=e=>{const{componentCls:t,cardShadow:n,cardHeadPadding:o,colorBorderSecondary:r,boxShadow:i,cardPaddingBase:a}=e;return{[t]:S(S({},vt(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:i},[`${t}-head`]:K0e(e),[`${t}-extra`]:{marginInlineStart:"auto",color:"",fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:S({padding:a,borderRadius:` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},aa()),[`${t}-grid`]:U0e(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%"},img:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`}},[`${t}-actions`]:G0e(e),[`${t}-meta`]:Y0e(e)}),[`${t}-bordered`]:{border:`${e.lineWidth}px ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:-e.lineWidth,marginInlineStart:-e.lineWidth,padding:0}},[`${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:o}}},[`${t}-type-inner`]:X0e(e),[`${t}-loading`]:q0e(e),[`${t}-rtl`]:{direction:"rtl"}}},Q0e=e=>{const{componentCls:t,cardPaddingSM:n,cardHeadHeightSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:o,padding:`0 ${n}px`,fontSize:e.fontSize,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{minHeight:o,paddingTop:0,display:"flex",alignItems:"center"}}}}},J0e=pt("Card",e=>{const t=nt(e,{cardShadow:e.boxShadowCard,cardHeadHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,cardHeadHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardHeadTabsMarginBottom:-e.padding-e.lineWidth,cardActionsLiMargin:`${e.paddingSM}px 0`,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[Z0e(t),Q0e(t)]}),ebe=()=>({prefixCls:String,width:{type:[Number,String]}}),tbe=pe({compatConfig:{MODE:3},name:"SkeletonTitle",props:ebe(),setup(e){return()=>{const{prefixCls:t,width:n}=e,o=typeof n=="number"?`${n}px`:n;return g("h3",{class:t,style:{width:o}},null)}}}),Oy=tbe,nbe=()=>({prefixCls:String,width:{type:[Number,String,Array]},rows:Number}),obe=pe({compatConfig:{MODE:3},name:"SkeletonParagraph",props:nbe(),setup(e){const t=n=>{const{width:o,rows:r=2}=e;if(Array.isArray(o))return o[n];if(r-1===n)return o};return()=>{const{prefixCls:n,rows:o}=e,r=[...Array(o)].map((i,a)=>{const l=t(a);return g("li",{key:a,style:{width:typeof l=="number"?`${l}px`:l}},null)});return g("ul",{class:n},[r])}}}),rbe=obe,Iy=()=>({prefixCls:String,size:[String,Number],shape:String,active:{type:Boolean,default:void 0}}),KB=e=>{const{prefixCls:t,size:n,shape:o}=e,r=me({[`${t}-lg`]:n==="large",[`${t}-sm`]:n==="small"}),i=me({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),a=typeof n=="number"?{width:`${n}px`,height:`${n}px`,lineHeight:`${n}px`}:{};return g("span",{class:me(t,r,i),style:a},null)};KB.displayName="SkeletonElement";const Py=KB,ibe=new Pt("ant-skeleton-loading",{"0%":{transform:"translateX(-37.5%)"},"100%":{transform:"translateX(37.5%)"}}),Ty=e=>({height:e,lineHeight:`${e}px`}),pd=e=>S({width:e},Ty(e)),abe=e=>({position:"relative",zIndex:0,overflow:"hidden",background:"transparent","&::after":{position:"absolute",top:0,insetInlineEnd:"-150%",bottom:0,insetInlineStart:"-150%",background:e.skeletonLoadingBackground,animationName:ibe,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite",content:'""'}}),vC=e=>S({width:e*5,minWidth:e*5},Ty(e)),lbe=e=>{const{skeletonAvatarCls:t,color:n,controlHeight:o,controlHeightLG:r,controlHeightSM:i}=e;return{[`${t}`]:S({display:"inline-block",verticalAlign:"top",background:n},pd(o)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:S({},pd(r)),[`${t}${t}-sm`]:S({},pd(i))}},sbe=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:o,controlHeightLG:r,controlHeightSM:i,color:a}=e;return{[`${o}`]:S({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},vC(t)),[`${o}-lg`]:S({},vC(r)),[`${o}-sm`]:S({},vC(i))}},QM=e=>S({width:e},Ty(e)),cbe=e=>{const{skeletonImageCls:t,imageSizeBase:n,color:o,borderRadiusSM:r}=e;return{[`${t}`]:S(S({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:o,borderRadius:r},QM(n*2)),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:S(S({},QM(n)),{maxWidth:n*4,maxHeight:n*4}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},mC=(e,t,n)=>{const{skeletonButtonCls:o}=e;return{[`${n}${o}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${o}-round`]:{borderRadius:t}}},bC=e=>S({width:e*2,minWidth:e*2},Ty(e)),ube=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:o,controlHeightLG:r,controlHeightSM:i,color:a}=e;return S(S(S(S(S({[`${n}`]:S({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:o*2,minWidth:o*2},bC(o))},mC(e,o,n)),{[`${n}-lg`]:S({},bC(r))}),mC(e,r,`${n}-lg`)),{[`${n}-sm`]:S({},bC(i))}),mC(e,i,`${n}-sm`))},dbe=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:o,skeletonParagraphCls:r,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:l,controlHeight:s,controlHeightLG:c,controlHeightSM:u,color:d,padding:f,marginSM:h,borderRadius:m,skeletonTitleHeight:v,skeletonBlockRadius:y,skeletonParagraphLineHeight:b,controlHeightXS:$,skeletonParagraphMarginTop:x}=e;return{[`${t}`]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[`${n}`]:S({display:"inline-block",verticalAlign:"top",background:d},pd(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:S({},pd(c)),[`${n}-sm`]:S({},pd(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${o}`]:{width:"100%",height:v,background:d,borderRadius:y,[`+ ${r}`]:{marginBlockStart:u}},[`${r}`]:{padding:0,"> li":{width:"100%",height:b,listStyle:"none",background:d,borderRadius:y,"+ li":{marginBlockStart:$}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${o}, ${r} > li`]:{borderRadius:m}}},[`${t}-with-avatar ${t}-content`]:{[`${o}`]:{marginBlockStart:h,[`+ ${r}`]:{marginBlockStart:x}}},[`${t}${t}-element`]:S(S(S(S({display:"inline-block",width:"auto"},ube(e)),lbe(e)),sbe(e)),cbe(e)),[`${t}${t}-block`]:{width:"100%",[`${i}`]:{width:"100%"},[`${a}`]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${o}, + ${r} > li, + ${n}, + ${i}, + ${a}, + ${l} + `]:S({},abe(e))}}},qh=pt("Skeleton",e=>{const{componentCls:t}=e,n=nt(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:e.controlHeight*1.5,skeletonTitleHeight:e.controlHeight/2,skeletonBlockRadius:e.borderRadiusSM,skeletonParagraphLineHeight:e.controlHeight/2,skeletonParagraphMarginTop:e.marginLG+e.marginXXS,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[dbe(n)]},e=>{const{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n}}),fbe=()=>({active:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},prefixCls:String,avatar:{type:[Boolean,Object],default:void 0},title:{type:[Boolean,Object],default:void 0},paragraph:{type:[Boolean,Object],default:void 0},round:{type:Boolean,default:void 0}});function yC(e){return e&&typeof e=="object"?e:{}}function pbe(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function hbe(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function gbe(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const vbe=pe({compatConfig:{MODE:3},name:"ASkeleton",props:bt(fbe(),{avatar:!1,title:!0,paragraph:!0}),setup(e,t){let{slots:n}=t;const{prefixCls:o,direction:r}=Ve("skeleton",e),[i,a]=qh(o);return()=>{var l;const{loading:s,avatar:c,title:u,paragraph:d,active:f,round:h}=e,m=o.value;if(s||e.loading===void 0){const v=!!c||c==="",y=!!u||u==="",b=!!d||d==="";let $;if(v){const w=S(S({prefixCls:`${m}-avatar`},pbe(y,b)),yC(c));$=g("div",{class:`${m}-header`},[g(Py,w,null)])}let x;if(y||b){let w;if(y){const O=S(S({prefixCls:`${m}-title`},hbe(v,b)),yC(u));w=g(Oy,O,null)}let I;if(b){const O=S(S({prefixCls:`${m}-paragraph`},gbe(v,y)),yC(d));I=g(rbe,O,null)}x=g("div",{class:`${m}-content`},[w,I])}const _=me(m,{[`${m}-with-avatar`]:v,[`${m}-active`]:f,[`${m}-rtl`]:r.value==="rtl",[`${m}-round`]:h,[a.value]:!0});return i(g("div",{class:_},[$,x]))}return(l=n.default)===null||l===void 0?void 0:l.call(n)}}}),or=vbe,mbe=()=>S(S({},Iy()),{size:String,block:Boolean}),bbe=pe({compatConfig:{MODE:3},name:"ASkeletonButton",props:bt(mbe(),{size:"default"}),setup(e){const{prefixCls:t}=Ve("skeleton",e),[n,o]=qh(t),r=M(()=>me(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},o.value));return()=>n(g("div",{class:r.value},[g(Py,V(V({},e),{},{prefixCls:`${t.value}-button`}),null)]))}}),AO=bbe,ybe=pe({compatConfig:{MODE:3},name:"ASkeletonInput",props:S(S({},_t(Iy(),["shape"])),{size:String,block:Boolean}),setup(e){const{prefixCls:t}=Ve("skeleton",e),[n,o]=qh(t),r=M(()=>me(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},o.value));return()=>n(g("div",{class:r.value},[g(Py,V(V({},e),{},{prefixCls:`${t.value}-input`}),null)]))}}),MO=ybe,Sbe="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",Cbe=pe({compatConfig:{MODE:3},name:"ASkeletonImage",props:_t(Iy(),["size","shape","active"]),setup(e){const{prefixCls:t}=Ve("skeleton",e),[n,o]=qh(t),r=M(()=>me(t.value,`${t.value}-element`,o.value));return()=>n(g("div",{class:r.value},[g("div",{class:`${t.value}-image`},[g("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",class:`${t.value}-image-svg`},[g("path",{d:Sbe,class:`${t.value}-image-path`},null)])])]))}}),RO=Cbe,$be=()=>S(S({},Iy()),{shape:String}),xbe=pe({compatConfig:{MODE:3},name:"ASkeletonAvatar",props:bt($be(),{size:"default",shape:"circle"}),setup(e){const{prefixCls:t}=Ve("skeleton",e),[n,o]=qh(t),r=M(()=>me(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active},o.value));return()=>n(g("div",{class:r.value},[g(Py,V(V({},e),{},{prefixCls:`${t.value}-avatar`}),null)]))}}),DO=xbe;or.Button=AO;or.Avatar=DO;or.Input=MO;or.Image=RO;or.Title=Oy;or.install=function(e){return e.component(or.name,or),e.component(or.Button.name,AO),e.component(or.Avatar.name,DO),e.component(or.Input.name,MO),e.component(or.Image.name,RO),e.component(or.Title.name,Oy),e};const{TabPane:wbe}=Oc,_be=()=>({prefixCls:String,title:Z.any,extra:Z.any,bordered:{type:Boolean,default:!0},bodyStyle:{type:Object,default:void 0},headStyle:{type:Object,default:void 0},loading:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1},type:{type:String},size:{type:String},actions:Z.any,tabList:{type:Array},tabBarExtraContent:Z.any,activeTabKey:String,defaultActiveTabKey:String,cover:Z.any,onTabChange:{type:Function}}),Obe=pe({compatConfig:{MODE:3},name:"ACard",inheritAttrs:!1,props:_be(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i,size:a}=Ve("card",e),[l,s]=J0e(r),c=f=>f.map((m,v)=>mo(m)&&!Nh(m)||!mo(m)?g("li",{style:{width:`${100/f.length}%`},key:`action-${v}`},[g("span",null,[m])]):null),u=f=>{var h;(h=e.onTabChange)===null||h===void 0||h.call(e,f)},d=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h;return f.forEach(m=>{m&&py(m.type)&&m.type.__ANT_CARD_GRID&&(h=!0)}),h};return()=>{var f,h,m,v,y,b;const{headStyle:$={},bodyStyle:x={},loading:_,bordered:w=!0,type:I,tabList:O,hoverable:P,activeTabKey:E,defaultActiveTabKey:R,tabBarExtraContent:A=zf((f=n.tabBarExtraContent)===null||f===void 0?void 0:f.call(n)),title:N=zf((h=n.title)===null||h===void 0?void 0:h.call(n)),extra:F=zf((m=n.extra)===null||m===void 0?void 0:m.call(n)),actions:W=zf((v=n.actions)===null||v===void 0?void 0:v.call(n)),cover:D=zf((y=n.cover)===null||y===void 0?void 0:y.call(n))}=e,B=ln((b=n.default)===null||b===void 0?void 0:b.call(n)),k=r.value,L={[`${k}`]:!0,[s.value]:!0,[`${k}-loading`]:_,[`${k}-bordered`]:w,[`${k}-hoverable`]:!!P,[`${k}-contain-grid`]:d(B),[`${k}-contain-tabs`]:O&&O.length,[`${k}-${a.value}`]:a.value,[`${k}-type-${I}`]:!!I,[`${k}-rtl`]:i.value==="rtl"},z=g(or,{loading:!0,active:!0,paragraph:{rows:4},title:!1},{default:()=>[B]}),K=E!==void 0,G={size:"large",[K?"activeKey":"defaultActiveKey"]:K?E:R,onChange:u,class:`${k}-head-tabs`};let Y;const ne=O&&O.length?g(Oc,G,{default:()=>[O.map(ee=>{const{tab:fe,slots:ie}=ee,X=ie==null?void 0:ie.tab;pn(!ie,"Card","tabList slots is deprecated, Please use `customTab` instead.");let ue=fe!==void 0?fe:n[X]?n[X](ee):null;return ue=Gb(n,"customTab",ee,()=>[ue]),g(wbe,{tab:ue,key:ee.key,disabled:ee.disabled},null)})],rightExtra:A?()=>A:null}):null;(N||F||ne)&&(Y=g("div",{class:`${k}-head`,style:$},[g("div",{class:`${k}-head-wrapper`},[N&&g("div",{class:`${k}-head-title`},[N]),F&&g("div",{class:`${k}-extra`},[F])]),ne]));const re=D?g("div",{class:`${k}-cover`},[D]):null,J=g("div",{class:`${k}-body`,style:x},[_?z:B]),te=W&&W.length?g("ul",{class:`${k}-actions`},[c(W)]):null;return l(g("div",V(V({ref:"cardContainerRef"},o),{},{class:[L,o.class]}),[Y,re,B&&B.length?J:null,te]))}}}),hd=Obe,Ibe=()=>({prefixCls:String,title:rr(),description:rr(),avatar:rr()}),N0=pe({compatConfig:{MODE:3},name:"ACardMeta",props:Ibe(),slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ve("card",e);return()=>{const r={[`${o.value}-meta`]:!0},i=lo(n,e,"avatar"),a=lo(n,e,"title"),l=lo(n,e,"description"),s=i?g("div",{class:`${o.value}-meta-avatar`},[i]):null,c=a?g("div",{class:`${o.value}-meta-title`},[a]):null,u=l?g("div",{class:`${o.value}-meta-description`},[l]):null,d=c||u?g("div",{class:`${o.value}-meta-detail`},[c,u]):null;return g("div",{class:r},[s,d])}}}),Pbe=()=>({prefixCls:String,hoverable:{type:Boolean,default:!0}}),k0=pe({compatConfig:{MODE:3},name:"ACardGrid",__ANT_CARD_GRID:!0,props:Pbe(),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ve("card",e),r=M(()=>({[`${o.value}-grid`]:!0,[`${o.value}-grid-hoverable`]:e.hoverable}));return()=>{var i;return g("div",{class:r.value},[(i=n.default)===null||i===void 0?void 0:i.call(n)])}}});hd.Meta=N0;hd.Grid=k0;hd.install=function(e){return e.component(hd.name,hd),e.component(N0.name,N0),e.component(k0.name,k0),e};const Tbe=()=>({prefixCls:String,activeKey:rt([Array,Number,String]),defaultActiveKey:rt([Array,Number,String]),accordion:De(),destroyInactivePanel:De(),bordered:De(),expandIcon:Oe(),openAnimation:Z.object,expandIconPosition:Qe(),collapsible:Qe(),ghost:De(),onChange:Oe(),"onUpdate:activeKey":Oe()}),UB=()=>({openAnimation:Z.object,prefixCls:String,header:Z.any,headerClass:String,showArrow:De(),isActive:De(),destroyInactivePanel:De(),disabled:De(),accordion:De(),forceRender:De(),expandIcon:Oe(),extra:Z.any,panelKey:rt(),collapsible:Qe(),role:String,onItemClick:Oe()}),Ebe=e=>{const{componentCls:t,collapseContentBg:n,padding:o,collapseContentPaddingHorizontal:r,collapseHeaderBg:i,collapseHeaderPadding:a,collapsePanelBorderRadius:l,lineWidth:s,lineType:c,colorBorder:u,colorText:d,colorTextHeading:f,colorTextDisabled:h,fontSize:m,lineHeight:v,marginSM:y,paddingSM:b,motionDurationSlow:$,fontSizeIcon:x}=e,_=`${s}px ${c} ${u}`;return{[t]:S(S({},vt(e)),{backgroundColor:i,border:_,borderBottom:0,borderRadius:`${l}px`,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:_,"&:last-child":{[` + &, + & > ${t}-header`]:{borderRadius:`0 0 ${l}px ${l}px`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:a,color:f,lineHeight:v,cursor:"pointer",transition:`all ${$}, visibility 0s`,[`> ${t}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${t}-expand-icon`]:{height:m*v,display:"flex",alignItems:"center",paddingInlineEnd:y},[`${t}-arrow`]:S(S({},Xc()),{fontSize:x,svg:{transition:`transform ${$}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}},[`${t}-header-collapsible-only`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-icon-collapsible-only`]:{cursor:"default",[`${t}-expand-icon`]:{cursor:"pointer"}},[`&${t}-no-arrow`]:{[`> ${t}-header`]:{paddingInlineStart:b}}},[`${t}-content`]:{color:d,backgroundColor:n,borderTop:_,[`& > ${t}-content-box`]:{padding:`${o}px ${r}px`},"&-hidden":{display:"none"}},[`${t}-item:last-child`]:{[`> ${t}-content`]:{borderRadius:`0 0 ${l}px ${l}px`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:h,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:y}}}}})}},Abe=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow svg`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},Mbe=e=>{const{componentCls:t,collapseHeaderBg:n,paddingXXS:o,colorBorder:r}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${r}`},[` + > ${t}-item:last-child, + > ${t}-item:last-child ${t}-header + `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:o}}}},Rbe=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},Dbe=pt("Collapse",e=>{const t=nt(e,{collapseContentBg:e.colorBgContainer,collapseHeaderBg:e.colorFillAlter,collapseHeaderPadding:`${e.paddingSM}px ${e.padding}px`,collapsePanelBorderRadius:e.borderRadiusLG,collapseContentPaddingHorizontal:16});return[Ebe(t),Mbe(t),Rbe(t),Abe(t),Kh(t)]});function JM(e){let t=e;if(!Array.isArray(t)){const n=typeof t;t=n==="number"||n==="string"?[t]:[]}return t.map(n=>String(n))}const _p=pe({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:bt(Tbe(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=he(JM(x0([e.activeKey,e.defaultActiveKey])));Ie(()=>e.activeKey,()=>{i.value=JM(e.activeKey)},{deep:!0});const{prefixCls:a,direction:l,rootPrefixCls:s}=Ve("collapse",e),[c,u]=Dbe(a),d=M(()=>{const{expandIconPosition:b}=e;return b!==void 0?b:l.value==="rtl"?"end":"start"}),f=b=>{const{expandIcon:$=o.expandIcon}=e,x=$?$(b):g(sa,{rotate:b.isActive?90:void 0},null);return g("div",{class:[`${a.value}-expand-icon`,u.value],onClick:()=>["header","icon"].includes(e.collapsible)&&m(b.panelKey)},[Jn(Array.isArray($)?x[0]:x)?Gt(x,{class:`${a.value}-arrow`},!1):x])},h=b=>{e.activeKey===void 0&&(i.value=b);const $=e.accordion?b[0]:b;r("update:activeKey",$),r("change",$)},m=b=>{let $=i.value;if(e.accordion)$=$[0]===b?[]:[b];else{$=[...$];const x=$.indexOf(b);x>-1?$.splice(x,1):$.push(b)}h($)},v=(b,$)=>{var x,_,w;if(Nh(b))return;const I=i.value,{accordion:O,destroyInactivePanel:P,collapsible:E,openAnimation:R}=e,A=R||Uh(`${s.value}-motion-collapse`),N=String((x=b.key)!==null&&x!==void 0?x:$),{header:F=(w=(_=b.children)===null||_===void 0?void 0:_.header)===null||w===void 0?void 0:w.call(_),headerClass:W,collapsible:D,disabled:B}=b.props||{};let k=!1;O?k=I[0]===N:k=I.indexOf(N)>-1;let L=D??E;(B||B==="")&&(L="disabled");const z={key:N,panelKey:N,header:F,headerClass:W,isActive:k,prefixCls:a.value,destroyInactivePanel:P,openAnimation:A,accordion:O,onItemClick:L==="disabled"?null:m,expandIcon:f,collapsible:L};return Gt(b,z)},y=()=>{var b;return ln((b=o.default)===null||b===void 0?void 0:b.call(o)).map(v)};return()=>{const{accordion:b,bordered:$,ghost:x}=e,_=me(a.value,{[`${a.value}-borderless`]:!$,[`${a.value}-icon-position-${d.value}`]:!0,[`${a.value}-rtl`]:l.value==="rtl",[`${a.value}-ghost`]:!!x,[n.class]:!!n.class},u.value);return c(g("div",V(V({class:_},$ee(n)),{},{style:n.style,role:b?"tablist":null}),[y()]))}}}),Lbe=pe({compatConfig:{MODE:3},name:"PanelContent",props:UB(),setup(e,t){let{slots:n}=t;const o=ve(!1);return ct(()=>{(e.isActive||e.forceRender)&&(o.value=!0)}),()=>{var r;if(!o.value)return null;const{prefixCls:i,isActive:a,role:l}=e;return g("div",{class:me(`${i}-content`,{[`${i}-content-active`]:a,[`${i}-content-inactive`]:!a}),role:l},[g("div",{class:`${i}-content-box`},[(r=n.default)===null||r===void 0?void 0:r.call(n)])])}}}),B0=pe({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:bt(UB(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;pn(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:i}=Ve("collapse",e),a=()=>{o("itemClick",e.panelKey)},l=s=>{(s.key==="Enter"||s.keyCode===13||s.which===13)&&a()};return()=>{var s,c;const{header:u=(s=n.header)===null||s===void 0?void 0:s.call(n),headerClass:d,isActive:f,showArrow:h,destroyInactivePanel:m,accordion:v,forceRender:y,openAnimation:b,expandIcon:$=n.expandIcon,extra:x=(c=n.extra)===null||c===void 0?void 0:c.call(n),collapsible:_}=e,w=_==="disabled",I=i.value,O=me(`${I}-header`,{[d]:d,[`${I}-header-collapsible-only`]:_==="header",[`${I}-icon-collapsible-only`]:_==="icon"}),P=me({[`${I}-item`]:!0,[`${I}-item-active`]:f,[`${I}-item-disabled`]:w,[`${I}-no-arrow`]:!h,[`${r.class}`]:!!r.class});let E=g("i",{class:"arrow"},null);h&&typeof $=="function"&&(E=$(e));const R=Ln(g(Lbe,{prefixCls:I,isActive:f,forceRender:y,role:v?"tabpanel":null},{default:n.default}),[[Bo,f]]),A=S({appear:!1,css:!1},b);return g("div",V(V({},r),{},{class:P}),[g("div",{class:O,onClick:()=>!["header","icon"].includes(_)&&a(),role:v?"tab":"button",tabindex:w?-1:0,"aria-expanded":f,onKeypress:l},[h&&E,g("span",{onClick:()=>_==="header"&&a(),class:`${I}-header-text`},[u]),x&&g("div",{class:`${I}-extra`},[x])]),g(so,A,{default:()=>[!m||f?R:null]})])}}});_p.Panel=B0;_p.install=function(e){return e.component(_p.name,_p),e.component(B0.name,B0),e};const Nbe=function(e){return e.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}).toLowerCase()},kbe=function(e){return/[height|width]$/.test(e)},e6=function(e){let t="";const n=Object.keys(e);return n.forEach(function(o,r){let i=e[o];o=Nbe(o),kbe(o)&&typeof i=="number"&&(i=i+"px"),i===!0?t+=o:i===!1?t+="not "+o:t+="("+o+": "+i+")",r{["touchstart","touchmove","wheel"].includes(e.type)||e.preventDefault()},F0=e=>{const t=[],n=YB(e),o=XB(e);for(let r=n;re.currentSlide-zbe(e),XB=e=>e.currentSlide+jbe(e),zbe=e=>e.centerMode?Math.floor(e.slidesToShow/2)+(parseInt(e.centerPadding)>0?1:0):0,jbe=e=>e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow,Rx=e=>e&&e.offsetWidth||0,LO=e=>e&&e.offsetHeight||0,qB=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;const o=e.startX-e.curX,r=e.startY-e.curY,i=Math.atan2(r,o);return n=Math.round(i*180/Math.PI),n<0&&(n=360-Math.abs(n)),n<=45&&n>=0||n<=360&&n>=315?"left":n>=135&&n<=225?"right":t===!0?n>=35&&n<=135?"up":"down":"vertical"},Ey=e=>{let t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1),t},CC=(e,t)=>{const n={};return t.forEach(o=>n[o]=e[o]),n},Wbe=e=>{const t=e.children.length,n=e.listRef,o=Math.ceil(Rx(n)),r=e.trackRef,i=Math.ceil(Rx(r));let a;if(e.vertical)a=o;else{let h=e.centerMode&&parseInt(e.centerPadding)*2;typeof e.centerPadding=="string"&&e.centerPadding.slice(-1)==="%"&&(h*=o/100),a=Math.ceil((o-h)/e.slidesToShow)}const l=n&&LO(n.querySelector('[data-index="0"]')),s=l*e.slidesToShow;let c=e.currentSlide===void 0?e.initialSlide:e.currentSlide;e.rtl&&e.currentSlide===void 0&&(c=t-1-e.initialSlide);let u=e.lazyLoadedList||[];const d=F0(S(S({},e),{currentSlide:c,lazyLoadedList:u}));u=u.concat(d);const f={slideCount:t,slideWidth:a,listWidth:o,trackWidth:i,currentSlide:c,slideHeight:l,listHeight:s,lazyLoadedList:u};return e.autoplaying===null&&e.autoplay&&(f.autoplaying="playing"),f},Vbe=e=>{const{waitForAnimate:t,animating:n,fade:o,infinite:r,index:i,slideCount:a,lazyLoad:l,currentSlide:s,centerMode:c,slidesToScroll:u,slidesToShow:d,useCSS:f}=e;let{lazyLoadedList:h}=e;if(t&&n)return{};let m=i,v,y,b,$={},x={};const _=r?i:Mx(i,0,a-1);if(o){if(!r&&(i<0||i>=a))return{};i<0?m=i+a:i>=a&&(m=i-a),l&&h.indexOf(m)<0&&(h=h.concat(m)),$={animating:!0,currentSlide:m,lazyLoadedList:h,targetSlide:m},x={animating:!1,targetSlide:m}}else v=m,m<0?(v=m+a,r?a%u!==0&&(v=a-a%u):v=0):!Ey(e)&&m>s?m=v=s:c&&m>=a?(m=r?a:a-1,v=r?0:a-1):m>=a&&(v=m-a,r?a%u!==0&&(v=0):v=a-d),!r&&m+d>=a&&(v=a-d),y=mh(S(S({},e),{slideIndex:m})),b=mh(S(S({},e),{slideIndex:v})),r||(y===b&&(m=v),y=b),l&&(h=h.concat(F0(S(S({},e),{currentSlide:m})))),f?($={animating:!0,currentSlide:v,trackStyle:ZB(S(S({},e),{left:y})),lazyLoadedList:h,targetSlide:_},x={animating:!1,currentSlide:v,trackStyle:vh(S(S({},e),{left:b})),swipeLeft:null,targetSlide:_}):$={currentSlide:v,trackStyle:vh(S(S({},e),{left:b})),lazyLoadedList:h,targetSlide:_};return{state:$,nextState:x}},Kbe=(e,t)=>{let n,o,r;const{slidesToScroll:i,slidesToShow:a,slideCount:l,currentSlide:s,targetSlide:c,lazyLoad:u,infinite:d}=e,h=l%i!==0?0:(l-s)%i;if(t.message==="previous")o=h===0?i:a-h,r=s-o,u&&!d&&(n=s-o,r=n===-1?l-1:n),d||(r=c-i);else if(t.message==="next")o=h===0?i:h,r=s+o,u&&!d&&(r=(s+i)%l+h),d||(r=c+i);else if(t.message==="dots")r=t.index*t.slidesToScroll;else if(t.message==="children"){if(r=t.index,d){const m=Qbe(S(S({},e),{targetSlide:r}));r>t.currentSlide&&m==="left"?r=r-l:re.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":e.keyCode===37?n?"next":"previous":e.keyCode===39?n?"previous":"next":"",Gbe=(e,t,n)=>(e.target.tagName==="IMG"&&gd(e),!t||!n&&e.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}),Ybe=(e,t)=>{const{scrolling:n,animating:o,vertical:r,swipeToSlide:i,verticalSwiping:a,rtl:l,currentSlide:s,edgeFriction:c,edgeDragged:u,onEdge:d,swiped:f,swiping:h,slideCount:m,slidesToScroll:v,infinite:y,touchObject:b,swipeEvent:$,listHeight:x,listWidth:_}=t;if(n)return;if(o)return gd(e);r&&i&&a&&gd(e);let w,I={};const O=mh(t);b.curX=e.touches?e.touches[0].pageX:e.clientX,b.curY=e.touches?e.touches[0].pageY:e.clientY,b.swipeLength=Math.round(Math.sqrt(Math.pow(b.curX-b.startX,2)));const P=Math.round(Math.sqrt(Math.pow(b.curY-b.startY,2)));if(!a&&!h&&P>10)return{scrolling:!0};a&&(b.swipeLength=P);let E=(l?-1:1)*(b.curX>b.startX?1:-1);a&&(E=b.curY>b.startY?1:-1);const R=Math.ceil(m/v),A=qB(t.touchObject,a);let N=b.swipeLength;return y||(s===0&&(A==="right"||A==="down")||s+1>=R&&(A==="left"||A==="up")||!Ey(t)&&(A==="left"||A==="up"))&&(N=b.swipeLength*c,u===!1&&d&&(d(A),I.edgeDragged=!0)),!f&&$&&($(A),I.swiped=!0),r?w=O+N*(x/_)*E:l?w=O-N*E:w=O+N*E,a&&(w=O+N*E),I=S(S({},I),{touchObject:b,swipeLeft:w,trackStyle:vh(S(S({},t),{left:w}))}),Math.abs(b.curX-b.startX)10&&(I.swiping=!0,gd(e)),I},Xbe=(e,t)=>{const{dragging:n,swipe:o,touchObject:r,listWidth:i,touchThreshold:a,verticalSwiping:l,listHeight:s,swipeToSlide:c,scrolling:u,onSwipe:d,targetSlide:f,currentSlide:h,infinite:m}=t;if(!n)return o&&gd(e),{};const v=l?s/a:i/a,y=qB(r,l),b={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(u||!r.swipeLength)return b;if(r.swipeLength>v){gd(e),d&&d(y);let $,x;const _=m?h:f;switch(y){case"left":case"up":x=_+n6(t),$=c?t6(t,x):x,b.currentDirection=0;break;case"right":case"down":x=_-n6(t),$=c?t6(t,x):x,b.currentDirection=1;break;default:$=_}b.triggerSlideHandler=$}else{const $=mh(t);b.trackStyle=ZB(S(S({},t),{left:$}))}return b},qbe=e=>{const t=e.infinite?e.slideCount*2:e.slideCount;let n=e.infinite?e.slidesToShow*-1:0,o=e.infinite?e.slidesToShow*-1:0;const r=[];for(;n{const n=qbe(e);let o=0;if(t>n[n.length-1])t=n[n.length-1];else for(const r in n){if(t{const t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){let n;const o=e.listRef,r=o.querySelectorAll&&o.querySelectorAll(".slick-slide")||[];if(Array.from(r).every(l=>{if(e.vertical){if(l.offsetTop+LO(l)/2>e.swipeLeft*-1)return n=l,!1}else if(l.offsetLeft-t+Rx(l)/2>e.swipeLeft*-1)return n=l,!1;return!0}),!n)return 0;const i=e.rtl===!0?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-i)||1}else return e.slidesToScroll},NO=(e,t)=>t.reduce((n,o)=>n&&e.hasOwnProperty(o),!0)?null:console.error("Keys Missing:",e),vh=e=>{NO(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);let t,n;const o=e.slideCount+2*e.slidesToShow;e.vertical?n=o*e.slideHeight:t=Zbe(e)*e.slideWidth;let r={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){const i=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",l=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";r=S(S({},r),{WebkitTransform:i,transform:a,msTransform:l})}else e.vertical?r.top=e.left:r.left=e.left;return e.fade&&(r={opacity:1}),t&&(r.width=t+"px"),n&&(r.height=n+"px"),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?r.marginTop=e.left+"px":r.marginLeft=e.left+"px"),r},ZB=e=>{NO(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);const t=vh(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},mh=e=>{if(e.unslick)return 0;NO(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);const{slideIndex:t,trackRef:n,infinite:o,centerMode:r,slideCount:i,slidesToShow:a,slidesToScroll:l,slideWidth:s,listWidth:c,variableWidth:u,slideHeight:d,fade:f,vertical:h}=e;let m=0,v,y,b=0;if(f||e.slideCount===1)return 0;let $=0;if(o?($=-vl(e),i%l!==0&&t+l>i&&($=-(t>i?a-(t-i):i%l)),r&&($+=parseInt(a/2))):(i%l!==0&&t+l>i&&($=a-i%l),r&&($=parseInt(a/2))),m=$*s,b=$*d,h?v=t*d*-1+b:v=t*s*-1+m,u===!0){let x;const _=n;if(x=t+vl(e),y=_&&_.childNodes[x],v=y?y.offsetLeft*-1:0,r===!0){x=o?t+vl(e):t,y=_&&_.children[x],v=0;for(let w=0;we.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0),mm=e=>e.unslick||!e.infinite?0:e.slideCount,Zbe=e=>e.slideCount===1?1:vl(e)+e.slideCount+mm(e),Qbe=e=>e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+Jbe(e)?"left":"right":e.targetSlide{let{slidesToShow:t,centerMode:n,rtl:o,centerPadding:r}=e;if(n){let i=(t-1)/2+1;return parseInt(r)>0&&(i+=1),o&&t%2===0&&(i+=1),i}return o?0:t-1},eye=e=>{let{slidesToShow:t,centerMode:n,rtl:o,centerPadding:r}=e;if(n){let i=(t-1)/2+1;return parseInt(r)>0&&(i+=1),!o&&t%2===0&&(i+=1),i}return o?t-1:0},o6=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),$C=e=>{let t,n,o,r;e.rtl?r=e.slideCount-1-e.index:r=e.index;const i=r<0||r>=e.slideCount;e.centerMode?(o=Math.floor(e.slidesToShow/2),n=(r-e.currentSlide)%e.slideCount===0,r>e.currentSlide-o-1&&r<=e.currentSlide+o&&(t=!0)):t=e.currentSlide<=r&&r=e.slideCount?a=e.targetSlide-e.slideCount:a=e.targetSlide,{"slick-slide":!0,"slick-active":t,"slick-center":n,"slick-cloned":i,"slick-current":r===a}},tye=function(e){const t={};return(e.variableWidth===void 0||e.variableWidth===!1)&&(t.width=e.slideWidth+(typeof e.slideWidth=="number"?"px":"")),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight)+"px":t.left=-e.index*parseInt(e.slideWidth)+"px",t.opacity=e.currentSlide===e.index?1:0,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t},xC=(e,t)=>e.key+"-"+t,nye=function(e,t){let n;const o=[],r=[],i=[],a=t.length,l=YB(e),s=XB(e);return t.forEach((c,u)=>{let d;const f={message:"children",index:u,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(u)>=0?d=c:d=g("div");const h=tye(S(S({},e),{index:u})),m=d.props.class||"";let v=$C(S(S({},e),{index:u}));if(o.push(yp(d,{key:"original"+xC(d,u),tabindex:"-1","data-index":u,"aria-hidden":!v["slick-active"],class:me(v,m),style:S(S({outline:"none"},d.props.style||{}),h),onClick:()=>{e.focusOnSelect&&e.focusOnSelect(f)}})),e.infinite&&e.fade===!1){const y=a-u;y<=vl(e)&&a!==e.slidesToShow&&(n=-y,n>=l&&(d=c),v=$C(S(S({},e),{index:n})),r.push(yp(d,{key:"precloned"+xC(d,n),class:me(v,m),tabindex:"-1","data-index":n,"aria-hidden":!v["slick-active"],style:S(S({},d.props.style||{}),h),onClick:()=>{e.focusOnSelect&&e.focusOnSelect(f)}}))),a!==e.slidesToShow&&(n=a+u,n{e.focusOnSelect&&e.focusOnSelect(f)}})))}}),e.rtl?r.concat(o,i).reverse():r.concat(o,i)},QB=(e,t)=>{let{attrs:n,slots:o}=t;const r=nye(n,ln(o==null?void 0:o.default())),{onMouseenter:i,onMouseover:a,onMouseleave:l}=n,s={onMouseenter:i,onMouseover:a,onMouseleave:l},c=S({class:"slick-track",style:n.trackStyle},s);return g("div",c,[r])};QB.inheritAttrs=!1;const oye=QB,rye=function(e){let t;return e.infinite?t=Math.ceil(e.slideCount/e.slidesToScroll):t=Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1,t},JB=(e,t)=>{let{attrs:n}=t;const{slideCount:o,slidesToScroll:r,slidesToShow:i,infinite:a,currentSlide:l,appendDots:s,customPaging:c,clickHandler:u,dotsClass:d,onMouseenter:f,onMouseover:h,onMouseleave:m}=n,v=rye({slideCount:o,slidesToScroll:r,slidesToShow:i,infinite:a}),y={onMouseenter:f,onMouseover:h,onMouseleave:m};let b=[];for(let $=0;$=I&&l<=_:l===I}),P={message:"dots",index:$,slidesToScroll:r,currentSlide:l};b=b.concat(g("li",{key:$,class:O},[Gt(c({i:$}),{onClick:E})]))}return Gt(s({dots:b}),S({class:d},y))};JB.inheritAttrs=!1;const iye=JB;function eF(){}function tF(e,t,n){n&&n.preventDefault(),t(e,n)}const nF=(e,t)=>{let{attrs:n}=t;const{clickHandler:o,infinite:r,currentSlide:i,slideCount:a,slidesToShow:l}=n,s={"slick-arrow":!0,"slick-prev":!0};let c=function(h){tF({message:"previous"},o,h)};!r&&(i===0||a<=l)&&(s["slick-disabled"]=!0,c=eF);const u={key:"0","data-role":"none",class:s,style:{display:"block"},onClick:c},d={currentSlide:i,slideCount:a};let f;return n.prevArrow?f=Gt(n.prevArrow(S(S({},u),d)),{key:"0",class:s,style:{display:"block"},onClick:c},!1):f=g("button",V({key:"0",type:"button"},u),[" ",Do("Previous")]),f};nF.inheritAttrs=!1;const oF=(e,t)=>{let{attrs:n}=t;const{clickHandler:o,currentSlide:r,slideCount:i}=n,a={"slick-arrow":!0,"slick-next":!0};let l=function(d){tF({message:"next"},o,d)};Ey(n)||(a["slick-disabled"]=!0,l=eF);const s={key:"1","data-role":"none",class:me(a),style:{display:"block"},onClick:l},c={currentSlide:r,slideCount:i};let u;return n.nextArrow?u=Gt(n.nextArrow(S(S({},s),c)),{key:"1",class:me(a),style:{display:"block"},onClick:l},!1):u=g("button",V({key:"1",type:"button"},s),[" ",Do("Next")]),u};oF.inheritAttrs=!1;var aye=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{this.currentSlide>=e.children.length&&this.changeSlide({message:"index",index:e.children.length-e.slidesToShow,currentSlide:this.currentSlide}),!this.preProps.autoplay&&e.autoplay?this.handleAutoPlay("playing"):e.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.preProps=S({},e)}},mounted(){if(this.__emit("init"),this.lazyLoad){const e=F0(S(S({},this.$props),this.$data));e.length>0&&(this.setState(t=>({lazyLoadedList:t.lazyLoadedList.concat(e)})),this.__emit("lazyLoad",e))}this.$nextTick(()=>{const e=S({listRef:this.list,trackRef:this.track,children:this.children},this.$props);this.updateState(e,!0,()=>{this.adaptHeight(),this.autoplay&&this.handleAutoPlay("playing")}),this.lazyLoad==="progressive"&&(this.lazyLoadTimer=setInterval(this.progressiveLazyLoad,1e3)),this.ro=new w2(()=>{this.animating?(this.onWindowResized(!1),this.callbackTimers.push(setTimeout(()=>this.onWindowResized(),this.speed))):this.onWindowResized()}),this.ro.observe(this.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),t=>{t.onfocus=this.$props.pauseOnFocus?this.onSlideFocus:null,t.onblur=this.$props.pauseOnFocus?this.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",this.onWindowResized):window.attachEvent("onresize",this.onWindowResized)})},beforeUnmount(){var e;this.animationEndCallback&&clearTimeout(this.animationEndCallback),this.lazyLoadTimer&&clearInterval(this.lazyLoadTimer),this.callbackTimers.length&&(this.callbackTimers.forEach(t=>clearTimeout(t)),this.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",this.onWindowResized):window.detachEvent("onresize",this.onWindowResized),this.autoplayTimer&&clearInterval(this.autoplayTimer),(e=this.ro)===null||e===void 0||e.disconnect()},updated(){if(this.checkImagesLoad(),this.__emit("reInit"),this.lazyLoad){const e=F0(S(S({},this.$props),this.$data));e.length>0&&(this.setState(t=>({lazyLoadedList:t.lazyLoadedList.concat(e)})),this.__emit("lazyLoad"))}this.adaptHeight()},methods:{listRefHandler(e){this.list=e},trackRefHandler(e){this.track=e},adaptHeight(){if(this.adaptiveHeight&&this.list){const e=this.list.querySelector(`[data-index="${this.currentSlide}"]`);this.list.style.height=LO(e)+"px"}},onWindowResized(e){this.debouncedResize&&this.debouncedResize.cancel(),this.debouncedResize=T_(()=>this.resizeWindow(e),50),this.debouncedResize()},resizeWindow(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(!!!this.track)return;const n=S(S({listRef:this.list,trackRef:this.track,children:this.children},this.$props),this.$data);this.updateState(n,e,()=>{this.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.setState({animating:!1}),clearTimeout(this.animationEndCallback),delete this.animationEndCallback},updateState(e,t,n){const o=Wbe(e);e=S(S(S({},e),o),{slideIndex:o.currentSlide});const r=mh(e);e=S(S({},e),{left:r});const i=vh(e);(t||this.children.length!==e.children.length)&&(o.trackStyle=i),this.setState(o,n)},ssrInit(){const e=this.children;if(this.variableWidth){let s=0,c=0;const u=[],d=vl(S(S(S({},this.$props),this.$data),{slideCount:e.length})),f=mm(S(S(S({},this.$props),this.$data),{slideCount:e.length}));e.forEach(m=>{var v,y;const b=((y=(v=m.props.style)===null||v===void 0?void 0:v.width)===null||y===void 0?void 0:y.split("px")[0])||0;u.push(b),s+=b});for(let m=0;m{const r=()=>++n&&n>=t&&this.onWindowResized();if(!o.onclick)o.onclick=()=>o.parentNode.focus();else{const i=o.onclick;o.onclick=()=>{i(),o.parentNode.focus()}}o.onload||(this.$props.lazyLoad?o.onload=()=>{this.adaptHeight(),this.callbackTimers.push(setTimeout(this.onWindowResized,this.speed))}:(o.onload=r,o.onerror=()=>{r(),this.__emit("lazyLoadError")}))})},progressiveLazyLoad(){const e=[],t=S(S({},this.$props),this.$data);for(let n=this.currentSlide;n=-vl(t);n--)if(this.lazyLoadedList.indexOf(n)<0){e.push(n);break}e.length>0?(this.setState(n=>({lazyLoadedList:n.lazyLoadedList.concat(e)})),this.__emit("lazyLoad",e)):this.lazyLoadTimer&&(clearInterval(this.lazyLoadTimer),delete this.lazyLoadTimer)},slideHandler(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{asNavFor:n,currentSlide:o,beforeChange:r,speed:i,afterChange:a}=this.$props,{state:l,nextState:s}=Vbe(S(S(S({index:e},this.$props),this.$data),{trackRef:this.track,useCSS:this.useCSS&&!t}));if(!l)return;r&&r(o,l.currentSlide);const c=l.lazyLoadedList.filter(u=>this.lazyLoadedList.indexOf(u)<0);this.$attrs.onLazyLoad&&c.length>0&&this.__emit("lazyLoad",c),!this.$props.waitForAnimate&&this.animationEndCallback&&(clearTimeout(this.animationEndCallback),a&&a(o),delete this.animationEndCallback),this.setState(l,()=>{n&&this.asNavForIndex!==e&&(this.asNavForIndex=e,n.innerSlider.slideHandler(e)),s&&(this.animationEndCallback=setTimeout(()=>{const{animating:u}=s,d=aye(s,["animating"]);this.setState(d,()=>{this.callbackTimers.push(setTimeout(()=>this.setState({animating:u}),10)),a&&a(l.currentSlide),delete this.animationEndCallback})},i))})},changeSlide(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=S(S({},this.$props),this.$data),o=Kbe(n,e);if(!(o!==0&&!o)&&(t===!0?this.slideHandler(o,t):this.slideHandler(o),this.$props.autoplay&&this.handleAutoPlay("update"),this.$props.focusOnSelect)){const r=this.list.querySelectorAll(".slick-current");r[0]&&r[0].focus()}},clickHandler(e){this.clickable===!1&&(e.stopPropagation(),e.preventDefault()),this.clickable=!0},keyHandler(e){const t=Ube(e,this.accessibility,this.rtl);t!==""&&this.changeSlide({message:t})},selectHandler(e){this.changeSlide(e)},disableBodyScroll(){const e=t=>{t=t||window.event,t.preventDefault&&t.preventDefault(),t.returnValue=!1};window.ontouchmove=e},enableBodyScroll(){window.ontouchmove=null},swipeStart(e){this.verticalSwiping&&this.disableBodyScroll();const t=Gbe(e,this.swipe,this.draggable);t!==""&&this.setState(t)},swipeMove(e){const t=Ybe(e,S(S(S({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));t&&(t.swiping&&(this.clickable=!1),this.setState(t))},swipeEnd(e){const t=Xbe(e,S(S(S({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));if(!t)return;const n=t.triggerSlideHandler;delete t.triggerSlideHandler,this.setState(t),n!==void 0&&(this.slideHandler(n),this.$props.verticalSwiping&&this.enableBodyScroll())},touchEnd(e){this.swipeEnd(e),this.clickable=!0},slickPrev(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"previous"}),0))},slickNext(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"next"}),0))},slickGoTo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e=Number(e),isNaN(e))return"";this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"index",index:e,currentSlide:this.currentSlide},t),0))},play(){let e;if(this.rtl)e=this.currentSlide-this.slidesToScroll;else if(Ey(S(S({},this.$props),this.$data)))e=this.currentSlide+this.slidesToScroll;else return!1;this.slideHandler(e)},handleAutoPlay(e){this.autoplayTimer&&clearInterval(this.autoplayTimer);const t=this.autoplaying;if(e==="update"){if(t==="hovered"||t==="focused"||t==="paused")return}else if(e==="leave"){if(t==="paused"||t==="focused")return}else if(e==="blur"&&(t==="paused"||t==="hovered"))return;this.autoplayTimer=setInterval(this.play,this.autoplaySpeed+50),this.setState({autoplaying:"playing"})},pause(e){this.autoplayTimer&&(clearInterval(this.autoplayTimer),this.autoplayTimer=null);const t=this.autoplaying;e==="paused"?this.setState({autoplaying:"paused"}):e==="focused"?(t==="hovered"||t==="playing")&&this.setState({autoplaying:"focused"}):t==="playing"&&this.setState({autoplaying:"hovered"})},onDotsOver(){this.autoplay&&this.pause("hovered")},onDotsLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onTrackOver(){this.autoplay&&this.pause("hovered")},onTrackLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onSlideFocus(){this.autoplay&&this.pause("focused")},onSlideBlur(){this.autoplay&&this.autoplaying==="focused"&&this.handleAutoPlay("blur")},customPaging(e){let{i:t}=e;return g("button",null,[t+1])},appendDots(e){let{dots:t}=e;return g("ul",{style:{display:"block"}},[t])}},render(){const e=me("slick-slider",this.$attrs.class,{"slick-vertical":this.vertical,"slick-initialized":!0}),t=S(S({},this.$props),this.$data);let n=CC(t,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]);const{pauseOnHover:o}=this.$props;n=S(S({},n),{focusOnSelect:this.focusOnSelect&&this.clickable?this.selectHandler:null,ref:this.trackRefHandler,onMouseleave:o?this.onTrackLeave:ti,onMouseover:o?this.onTrackOver:ti});let r;if(this.dots===!0&&this.slideCount>=this.slidesToShow){let y=CC(t,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","infinite","appendDots"]);y.customPaging=this.customPaging,y.appendDots=this.appendDots;const{customPaging:b,appendDots:$}=this.$slots;b&&(y.customPaging=b),$&&(y.appendDots=$);const{pauseOnDotsHover:x}=this.$props;y=S(S({},y),{clickHandler:this.changeSlide,onMouseover:x?this.onDotsOver:ti,onMouseleave:x?this.onDotsLeave:ti}),r=g(iye,y,null)}let i,a;const l=CC(t,["infinite","centerMode","currentSlide","slideCount","slidesToShow"]);l.clickHandler=this.changeSlide;const{prevArrow:s,nextArrow:c}=this.$slots;s&&(l.prevArrow=s),c&&(l.nextArrow=c),this.arrows&&(i=g(nF,l,null),a=g(oF,l,null));let u=null;this.vertical&&(u={height:typeof this.listHeight=="number"?`${this.listHeight}px`:this.listHeight});let d=null;this.vertical===!1?this.centerMode===!0&&(d={padding:"0px "+this.centerPadding}):this.centerMode===!0&&(d={padding:this.centerPadding+" 0px"});const f=S(S({},u),d),h=this.touchMove;let m={ref:this.listRefHandler,class:"slick-list",style:f,onClick:this.clickHandler,onMousedown:h?this.swipeStart:ti,onMousemove:this.dragging&&h?this.swipeMove:ti,onMouseup:h?this.swipeEnd:ti,onMouseleave:this.dragging&&h?this.swipeEnd:ti,[fo?"onTouchstartPassive":"onTouchstart"]:h?this.swipeStart:ti,[fo?"onTouchmovePassive":"onTouchmove"]:this.dragging&&h?this.swipeMove:ti,onTouchend:h?this.touchEnd:ti,onTouchcancel:this.dragging&&h?this.swipeEnd:ti,onKeydown:this.accessibility?this.keyHandler:ti},v={class:e,dir:"ltr",style:this.$attrs.style};return this.unslick&&(m={class:"slick-list",ref:this.listRefHandler},v={class:e}),g("div",v,[this.unslick?"":i,g("div",m,[g(oye,n,{default:()=>[this.children]})]),this.unslick?"":a,this.unslick?"":r])}},sye=pe({name:"Slider",mixins:[eu],inheritAttrs:!1,props:S({},GB),data(){return this._responsiveMediaHandlers=[],{breakpoint:null}},mounted(){if(this.responsive){const e=this.responsive.map(n=>n.breakpoint);e.sort((n,o)=>n-o),e.forEach((n,o)=>{let r;o===0?r=SC({minWidth:0,maxWidth:n}):r=SC({minWidth:e[o-1]+1,maxWidth:n}),o6()&&this.media(r,()=>{this.setState({breakpoint:n})})});const t=SC({minWidth:e.slice(-1)[0]});o6()&&this.media(t,()=>{this.setState({breakpoint:null})})}},beforeUnmount(){this._responsiveMediaHandlers.forEach(function(e){e.mql.removeListener(e.listener)})},methods:{innerSliderRefHandler(e){this.innerSlider=e},media(e,t){const n=window.matchMedia(e),o=r=>{let{matches:i}=r;i&&t()};n.addListener(o),o(n),this._responsiveMediaHandlers.push({mql:n,query:e,listener:o})},slickPrev(){var e;(e=this.innerSlider)===null||e===void 0||e.slickPrev()},slickNext(){var e;(e=this.innerSlider)===null||e===void 0||e.slickNext()},slickGoTo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var n;(n=this.innerSlider)===null||n===void 0||n.slickGoTo(e,t)},slickPause(){var e;(e=this.innerSlider)===null||e===void 0||e.pause("paused")},slickPlay(){var e;(e=this.innerSlider)===null||e===void 0||e.handleAutoPlay("play")}},render(){var e;let t,n;this.breakpoint?(n=this.responsive.filter(l=>l.breakpoint===this.breakpoint),t=n[0].settings==="unslick"?"unslick":S(S({},this.$props),n[0].settings)):t=S({},this.$props),t.centerMode&&(t.slidesToScroll>1,t.slidesToScroll=1),t.fade&&(t.slidesToShow>1,t.slidesToScroll>1,t.slidesToShow=1,t.slidesToScroll=1);let o=kb(this)||[];o=o.filter(l=>typeof l=="string"?!!l.trim():!!l),t.variableWidth&&(t.rows>1||t.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),t.variableWidth=!1);const r=[];let i=null;for(let l=0;l=o.length));d+=1)u.push(Gt(o[d],{key:100*l+10*c+d,tabindex:-1,style:{width:`${100/t.slidesPerRow}%`,display:"inline-block"}}));s.push(g("div",{key:10*l+c},[u]))}t.variableWidth?r.push(g("div",{key:l,style:{width:i}},[s])):r.push(g("div",{key:l},[s]))}if(t==="unslick"){const l="regular slider "+(this.className||"");return g("div",{class:l},[o])}else r.length<=t.slidesToShow&&(t.unslick=!0);const a=S(S(S({},this.$attrs),t),{children:r,ref:this.innerSliderRefHandler});return g(lye,V(V({},a),{},{__propsSymbol__:[]}),this.$slots)}}),cye=e=>{const{componentCls:t,antCls:n,carouselArrowSize:o,carouselDotOffset:r,marginXXS:i}=e,a=-o*1.25,l=i;return{[t]:S(S({},vt(e)),{".slick-slider":{position:"relative",display:"block",boxSizing:"border-box",touchAction:"pan-y",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",".slick-track, .slick-list":{transform:"translate3d(0, 0, 0)",touchAction:"pan-y"}},".slick-list":{position:"relative",display:"block",margin:0,padding:0,overflow:"hidden","&:focus":{outline:"none"},"&.dragging":{cursor:"pointer"},".slick-slide":{pointerEvents:"none",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"hidden"},"&.slick-active":{pointerEvents:"auto",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"visible"}},"> div > div":{verticalAlign:"bottom"}}},".slick-track":{position:"relative",top:0,insetInlineStart:0,display:"block","&::before, &::after":{display:"table",content:'""'},"&::after":{clear:"both"}},".slick-slide":{display:"none",float:"left",height:"100%",minHeight:1,img:{display:"block"},"&.dragging img":{pointerEvents:"none"}},".slick-initialized .slick-slide":{display:"block"},".slick-vertical .slick-slide":{display:"block",height:"auto"},".slick-arrow.slick-hidden":{display:"none"},".slick-prev, .slick-next":{position:"absolute",top:"50%",display:"block",width:o,height:o,marginTop:-o/2,padding:0,color:"transparent",fontSize:0,lineHeight:0,background:"transparent",border:0,outline:"none",cursor:"pointer","&:hover, &:focus":{color:"transparent",background:"transparent",outline:"none","&::before":{opacity:1}},"&.slick-disabled::before":{opacity:.25}},".slick-prev":{insetInlineStart:a,"&::before":{content:'"←"'}},".slick-next":{insetInlineEnd:a,"&::before":{content:'"→"'}},".slick-dots":{position:"absolute",insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:15,display:"flex !important",justifyContent:"center",paddingInlineStart:0,listStyle:"none","&-bottom":{bottom:r},"&-top":{top:r,bottom:"auto"},li:{position:"relative",display:"inline-block",flex:"0 1 auto",boxSizing:"content-box",width:e.dotWidth,height:e.dotHeight,marginInline:l,padding:0,textAlign:"center",textIndent:-999,verticalAlign:"top",transition:`all ${e.motionDurationSlow}`,button:{position:"relative",display:"block",width:"100%",height:e.dotHeight,padding:0,color:"transparent",fontSize:0,background:e.colorBgContainer,border:0,borderRadius:1,outline:"none",cursor:"pointer",opacity:.3,transition:`all ${e.motionDurationSlow}`,"&: hover, &:focus":{opacity:.75},"&::after":{position:"absolute",inset:-l,content:'""'}},"&.slick-active":{width:e.dotWidthActive,"& button":{background:e.colorBgContainer,opacity:1},"&: hover, &:focus":{opacity:1}}}}})}},uye=e=>{const{componentCls:t,carouselDotOffset:n,marginXXS:o}=e,r={width:e.dotHeight,height:e.dotWidth};return{[`${t}-vertical`]:{".slick-dots":{top:"50%",bottom:"auto",flexDirection:"column",width:e.dotHeight,height:"auto",margin:0,transform:"translateY(-50%)","&-left":{insetInlineEnd:"auto",insetInlineStart:n},"&-right":{insetInlineEnd:n,insetInlineStart:"auto"},li:S(S({},r),{margin:`${o}px 0`,verticalAlign:"baseline",button:r,"&.slick-active":S(S({},r),{button:r})})}}}},dye=e=>{const{componentCls:t}=e;return[{[`${t}-rtl`]:{direction:"rtl",".slick-dots":{[`${t}-rtl&`]:{flexDirection:"row-reverse"}}}},{[`${t}-vertical`]:{".slick-dots":{[`${t}-rtl&`]:{flexDirection:"column"}}}}]},fye=pt("Carousel",e=>{const{controlHeightLG:t,controlHeightSM:n}=e,o=nt(e,{carouselArrowSize:t/2,carouselDotOffset:n/2});return[cye(o),uye(o),dye(o)]},{dotWidth:16,dotHeight:3,dotWidthActive:24});var pye=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({effect:Qe(),dots:De(!0),vertical:De(),autoplay:De(),easing:String,beforeChange:Oe(),afterChange:Oe(),prefixCls:String,accessibility:De(),nextArrow:Z.any,prevArrow:Z.any,pauseOnHover:De(),adaptiveHeight:De(),arrows:De(!1),autoplaySpeed:Number,centerMode:De(),centerPadding:String,cssEase:String,dotsClass:String,draggable:De(!1),fade:De(),focusOnSelect:De(),infinite:De(),initialSlide:Number,lazyLoad:Qe(),rtl:De(),slide:String,slidesToShow:Number,slidesToScroll:Number,speed:Number,swipe:De(),swipeToSlide:De(),swipeEvent:Oe(),touchMove:De(),touchThreshold:Number,variableWidth:De(),useCSS:De(),slickGoTo:Number,responsive:Array,dotPosition:Qe(),verticalSwiping:De(!1)}),gye=pe({compatConfig:{MODE:3},name:"ACarousel",inheritAttrs:!1,props:hye(),setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=he();r({goTo:function(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var y;(y=i.value)===null||y===void 0||y.slickGoTo(m,v)},autoplay:m=>{var v,y;(y=(v=i.value)===null||v===void 0?void 0:v.innerSlider)===null||y===void 0||y.handleAutoPlay(m)},prev:()=>{var m;(m=i.value)===null||m===void 0||m.slickPrev()},next:()=>{var m;(m=i.value)===null||m===void 0||m.slickNext()},innerSlider:M(()=>{var m;return(m=i.value)===null||m===void 0?void 0:m.innerSlider})}),ct(()=>{Sn(e.vertical===void 0)});const{prefixCls:l,direction:s}=Ve("carousel",e),[c,u]=fye(l),d=M(()=>e.dotPosition?e.dotPosition:e.vertical!==void 0&&e.vertical?"right":"bottom"),f=M(()=>d.value==="left"||d.value==="right"),h=M(()=>{const m="slick-dots";return me({[m]:!0,[`${m}-${d.value}`]:!0,[`${e.dotsClass}`]:!!e.dotsClass})});return()=>{const{dots:m,arrows:v,draggable:y,effect:b}=e,{class:$,style:x}=o,_=pye(o,["class","style"]),w=b==="fade"?!0:e.fade,I=me(l.value,{[`${l.value}-rtl`]:s.value==="rtl",[`${l.value}-vertical`]:f.value,[`${$}`]:!!$},u.value);return c(g("div",{class:I,style:x},[g(sye,V(V(V({ref:i},e),_),{},{dots:!!m,dotsClass:h.value,arrows:v,draggable:y,fade:w,vertical:f.value}),n)]))}}}),vye=$n(gye),kO="__RC_CASCADER_SPLIT__",rF="SHOW_PARENT",iF="SHOW_CHILD";function bs(e){return e.join(kO)}function Ju(e){return e.map(bs)}function mye(e){return e.split(kO)}function bye(e){const{label:t,value:n,children:o}=e||{},r=n||"value";return{label:t||"label",value:r,key:r,children:o||"children"}}function rp(e,t){var n,o;return(n=e.isLeaf)!==null&&n!==void 0?n:!(!((o=e[t.children])===null||o===void 0)&&o.length)}function yye(e){const t=e.parentElement;if(!t)return;const n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}const aF=Symbol("TreeContextKey"),Sye=pe({compatConfig:{MODE:3},name:"TreeContext",props:{value:{type:Object}},setup(e,t){let{slots:n}=t;return ft(aF,M(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),BO=()=>it(aF,M(()=>({}))),lF=Symbol("KeysStateKey"),Cye=e=>{ft(lF,e)},sF=()=>it(lF,{expandedKeys:ve([]),selectedKeys:ve([]),loadedKeys:ve([]),loadingKeys:ve([]),checkedKeys:ve([]),halfCheckedKeys:ve([]),expandedKeysSet:M(()=>new Set),selectedKeysSet:M(()=>new Set),loadedKeysSet:M(()=>new Set),loadingKeysSet:M(()=>new Set),checkedKeysSet:M(()=>new Set),halfCheckedKeysSet:M(()=>new Set),flattenNodes:ve([])}),$ye=e=>{let{prefixCls:t,level:n,isStart:o,isEnd:r}=e;const i=`${t}-indent-unit`,a=[];for(let l=0;l({prefixCls:String,focusable:{type:Boolean,default:void 0},activeKey:[Number,String],tabindex:Number,children:Z.any,treeData:{type:Array},fieldNames:{type:Object},showLine:{type:[Boolean,Object],default:void 0},showIcon:{type:Boolean,default:void 0},icon:Z.any,selectable:{type:Boolean,default:void 0},expandAction:[String,Boolean],disabled:{type:Boolean,default:void 0},multiple:{type:Boolean,default:void 0},checkable:{type:Boolean,default:void 0},checkStrictly:{type:Boolean,default:void 0},draggable:{type:[Function,Boolean]},defaultExpandParent:{type:Boolean,default:void 0},autoExpandParent:{type:Boolean,default:void 0},defaultExpandAll:{type:Boolean,default:void 0},defaultExpandedKeys:{type:Array},expandedKeys:{type:Array},defaultCheckedKeys:{type:Array},checkedKeys:{type:[Object,Array]},defaultSelectedKeys:{type:Array},selectedKeys:{type:Array},allowDrop:{type:Function},dropIndicatorRender:{type:Function},onFocus:{type:Function},onBlur:{type:Function},onKeydown:{type:Function},onContextmenu:{type:Function},onClick:{type:Function},onDblclick:{type:Function},onScroll:{type:Function},onExpand:{type:Function},onCheck:{type:Function},onSelect:{type:Function},onLoad:{type:Function},loadData:{type:Function},loadedKeys:{type:Array},onMouseenter:{type:Function},onMouseleave:{type:Function},onRightClick:{type:Function},onDragstart:{type:Function},onDragenter:{type:Function},onDragover:{type:Function},onDragleave:{type:Function},onDragend:{type:Function},onDrop:{type:Function},onActiveChange:{type:Function},filterTreeNode:{type:Function},motion:Z.any,switcherIcon:Z.any,height:Number,itemHeight:Number,virtual:{type:Boolean,default:void 0},direction:{type:String},rootClassName:String,rootStyle:Object});var _ye=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r"`v-slot:"+oe+"` ")}`;const i=ve(!1),a=BO(),{expandedKeysSet:l,selectedKeysSet:s,loadedKeysSet:c,loadingKeysSet:u,checkedKeysSet:d,halfCheckedKeysSet:f}=sF(),{dragOverNodeKey:h,dropPosition:m,keyEntities:v}=a.value,y=M(()=>bm(e.eventKey,{expandedKeysSet:l.value,selectedKeysSet:s.value,loadedKeysSet:c.value,loadingKeysSet:u.value,checkedKeysSet:d.value,halfCheckedKeysSet:f.value,dragOverNodeKey:h,dropPosition:m,keyEntities:v})),b=ai(()=>y.value.expanded),$=ai(()=>y.value.selected),x=ai(()=>y.value.checked),_=ai(()=>y.value.loaded),w=ai(()=>y.value.loading),I=ai(()=>y.value.halfChecked),O=ai(()=>y.value.dragOver),P=ai(()=>y.value.dragOverGapTop),E=ai(()=>y.value.dragOverGapBottom),R=ai(()=>y.value.pos),A=ve(),N=M(()=>{const{eventKey:oe}=e,{keyEntities:le}=a.value,{children:xe}=le[oe]||{};return!!(xe||[]).length}),F=M(()=>{const{isLeaf:oe}=e,{loadData:le}=a.value,xe=N.value;return oe===!1?!1:oe||!le&&!xe||le&&_.value&&!xe}),W=M(()=>F.value?null:b.value?r6:i6),D=M(()=>{const{disabled:oe}=e,{disabled:le}=a.value;return!!(le||oe)}),B=M(()=>{const{checkable:oe}=e,{checkable:le}=a.value;return!le||oe===!1?!1:le}),k=M(()=>{const{selectable:oe}=e,{selectable:le}=a.value;return typeof oe=="boolean"?oe:le}),L=M(()=>{const{data:oe,active:le,checkable:xe,disableCheckbox:Ae,disabled:Be,selectable:Ye}=e;return S(S({active:le,checkable:xe,disableCheckbox:Ae,disabled:Be,selectable:Ye},oe),{dataRef:oe,data:oe,isLeaf:F.value,checked:x.value,expanded:b.value,loading:w.value,selected:$.value,halfChecked:I.value})}),z=Nn(),K=M(()=>{const{eventKey:oe}=e,{keyEntities:le}=a.value,{parent:xe}=le[oe]||{};return S(S({},ym(S({},e,y.value))),{parent:xe})}),G=St({eventData:K,eventKey:M(()=>e.eventKey),selectHandle:A,pos:R,key:z.vnode.key});r(G);const Y=oe=>{const{onNodeDoubleClick:le}=a.value;le(oe,K.value)},ne=oe=>{if(D.value)return;const{onNodeSelect:le}=a.value;oe.preventDefault(),le(oe,K.value)},re=oe=>{if(D.value)return;const{disableCheckbox:le}=e,{onNodeCheck:xe}=a.value;if(!B.value||le)return;oe.preventDefault();const Ae=!x.value;xe(oe,K.value,Ae)},J=oe=>{const{onNodeClick:le}=a.value;le(oe,K.value),k.value?ne(oe):re(oe)},te=oe=>{const{onNodeMouseEnter:le}=a.value;le(oe,K.value)},ee=oe=>{const{onNodeMouseLeave:le}=a.value;le(oe,K.value)},fe=oe=>{const{onNodeContextMenu:le}=a.value;le(oe,K.value)},ie=oe=>{const{onNodeDragStart:le}=a.value;oe.stopPropagation(),i.value=!0,le(oe,G);try{oe.dataTransfer.setData("text/plain","")}catch{}},X=oe=>{const{onNodeDragEnter:le}=a.value;oe.preventDefault(),oe.stopPropagation(),le(oe,G)},ue=oe=>{const{onNodeDragOver:le}=a.value;oe.preventDefault(),oe.stopPropagation(),le(oe,G)},ye=oe=>{const{onNodeDragLeave:le}=a.value;oe.stopPropagation(),le(oe,G)},H=oe=>{const{onNodeDragEnd:le}=a.value;oe.stopPropagation(),i.value=!1,le(oe,G)},j=oe=>{const{onNodeDrop:le}=a.value;oe.preventDefault(),oe.stopPropagation(),i.value=!1,le(oe,G)},q=oe=>{const{onNodeExpand:le}=a.value;w.value||le(oe,K.value)},se=()=>{const{data:oe}=e,{draggable:le}=a.value;return!!(le&&(!le.nodeDraggable||le.nodeDraggable(oe)))},ae=()=>{const{draggable:oe,prefixCls:le}=a.value;return oe&&(oe!=null&&oe.icon)?g("span",{class:`${le}-draggable-icon`},[oe.icon]):null},ge=()=>{var oe,le,xe;const{switcherIcon:Ae=o.switcherIcon||((oe=a.value.slots)===null||oe===void 0?void 0:oe[(xe=(le=e.data)===null||le===void 0?void 0:le.slots)===null||xe===void 0?void 0:xe.switcherIcon])}=e,{switcherIcon:Be}=a.value,Ye=Ae||Be;return typeof Ye=="function"?Ye(L.value):Ye},Se=()=>{const{loadData:oe,onNodeLoad:le}=a.value;w.value||oe&&b.value&&!F.value&&!N.value&&!_.value&&le(K.value)};lt(()=>{Se()}),fr(()=>{Se()});const $e=()=>{const{prefixCls:oe}=a.value,le=ge();if(F.value)return le!==!1?g("span",{class:me(`${oe}-switcher`,`${oe}-switcher-noop`)},[le]):null;const xe=me(`${oe}-switcher`,`${oe}-switcher_${b.value?r6:i6}`);return le!==!1?g("span",{onClick:q,class:xe},[le]):null},_e=()=>{var oe,le;const{disableCheckbox:xe}=e,{prefixCls:Ae}=a.value,Be=D.value;return B.value?g("span",{class:me(`${Ae}-checkbox`,x.value&&`${Ae}-checkbox-checked`,!x.value&&I.value&&`${Ae}-checkbox-indeterminate`,(Be||xe)&&`${Ae}-checkbox-disabled`),onClick:re},[(le=(oe=a.value).customCheckable)===null||le===void 0?void 0:le.call(oe)]):null},be=()=>{const{prefixCls:oe}=a.value;return g("span",{class:me(`${oe}-iconEle`,`${oe}-icon__${W.value||"docu"}`,w.value&&`${oe}-icon_loading`)},null)},Te=()=>{const{disabled:oe,eventKey:le}=e,{draggable:xe,dropLevelOffset:Ae,dropPosition:Be,prefixCls:Ye,indent:Re,dropIndicatorRender:Le,dragOverNodeKey:Ne,direction:Ke}=a.value;return!oe&&xe!==!1&&Ne===le?Le({dropPosition:Be,dropLevelOffset:Ae,indent:Re,prefixCls:Ye,direction:Ke}):null},Pe=()=>{var oe,le,xe,Ae,Be,Ye;const{icon:Re=o.icon,data:Le}=e,Ne=o.title||((oe=a.value.slots)===null||oe===void 0?void 0:oe[(xe=(le=e.data)===null||le===void 0?void 0:le.slots)===null||xe===void 0?void 0:xe.title])||((Ae=a.value.slots)===null||Ae===void 0?void 0:Ae.title)||e.title,{prefixCls:Ke,showIcon:Ze,icon:Ue,loadData:Xe}=a.value,xt=D.value,Mt=`${Ke}-node-content-wrapper`;let Ft;if(Ze){const Vn=Re||((Be=a.value.slots)===null||Be===void 0?void 0:Be[(Ye=Le==null?void 0:Le.slots)===null||Ye===void 0?void 0:Ye.icon])||Ue;Ft=Vn?g("span",{class:me(`${Ke}-iconEle`,`${Ke}-icon__customize`)},[typeof Vn=="function"?Vn(L.value):Vn]):be()}else Xe&&w.value&&(Ft=be());let jt;typeof Ne=="function"?jt=Ne(L.value):jt=Ne,jt=jt===void 0?Oye:jt;const Yt=g("span",{class:`${Ke}-title`},[jt]);return g("span",{ref:A,title:typeof Ne=="string"?Ne:"",class:me(`${Mt}`,`${Mt}-${W.value||"normal"}`,!xt&&($.value||i.value)&&`${Ke}-node-selected`),onMouseenter:te,onMouseleave:ee,onContextmenu:fe,onClick:J,onDblclick:Y},[Ft,Yt,Te()])};return()=>{const oe=S(S({},e),n),{eventKey:le,isLeaf:xe,isStart:Ae,isEnd:Be,domRef:Ye,active:Re,data:Le,onMousemove:Ne,selectable:Ke}=oe,Ze=_ye(oe,["eventKey","isLeaf","isStart","isEnd","domRef","active","data","onMousemove","selectable"]),{prefixCls:Ue,filterTreeNode:Xe,keyEntities:xt,dropContainerKey:Mt,dropTargetKey:Ft,draggingNodeKey:jt}=a.value,Yt=D.value,Vn=As(Ze,{aria:!0,data:!0}),{level:Gn}=xt[le]||{},oo=Be[Be.length-1],kn=se(),yo=!Yt&&kn,Yo=jt===le,wr=Ke!==void 0?{"aria-selected":!!Ke}:void 0;return g("div",V(V({ref:Ye,class:me(n.class,`${Ue}-treenode`,{[`${Ue}-treenode-disabled`]:Yt,[`${Ue}-treenode-switcher-${b.value?"open":"close"}`]:!xe,[`${Ue}-treenode-checkbox-checked`]:x.value,[`${Ue}-treenode-checkbox-indeterminate`]:I.value,[`${Ue}-treenode-selected`]:$.value,[`${Ue}-treenode-loading`]:w.value,[`${Ue}-treenode-active`]:Re,[`${Ue}-treenode-leaf-last`]:oo,[`${Ue}-treenode-draggable`]:yo,dragging:Yo,"drop-target":Ft===le,"drop-container":Mt===le,"drag-over":!Yt&&O.value,"drag-over-gap-top":!Yt&&P.value,"drag-over-gap-bottom":!Yt&&E.value,"filter-node":Xe&&Xe(K.value)}),style:n.style,draggable:yo,"aria-grabbed":Yo,onDragstart:yo?ie:void 0,onDragenter:kn?X:void 0,onDragover:kn?ue:void 0,onDragleave:kn?ye:void 0,onDrop:kn?j:void 0,onDragend:kn?H:void 0,onMousemove:Ne},wr),Vn),[g(xye,{prefixCls:Ue,level:Gn,isStart:Ae,isEnd:Be},null),ae(),$e(),_e(),Pe()])}}});function $a(e,t){if(!e)return[];const n=e.slice(),o=n.indexOf(t);return o>=0&&n.splice(o,1),n}function al(e,t){const n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function FO(e){return e.split("-")}function dF(e,t){return`${e}-${t}`}function Iye(e){return e&&e.type&&e.type.isTreeNode}function Pye(e,t){const n=[],o=t[e];function r(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(a=>{let{key:l,children:s}=a;n.push(l),r(s)})}return r(o.children),n}function Tye(e){if(e.parent){const t=FO(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function Eye(e){const t=FO(e.pos);return Number(t[t.length-1])===0}function a6(e,t,n,o,r,i,a,l,s,c){var u;const{clientX:d,clientY:f}=e,{top:h,height:m}=e.target.getBoundingClientRect(),y=((c==="rtl"?-1:1)*(((r==null?void 0:r.x)||0)-d)-12)/o;let b=l[n.eventKey];if(fF.key===b.key),A=R<=0?0:R-1,N=a[A].key;b=l[N]}const $=b.key,x=b,_=b.key;let w=0,I=0;if(!s.has($))for(let R=0;R-1.5?i({dragNode:O,dropNode:P,dropPosition:1})?w=1:E=!1:i({dragNode:O,dropNode:P,dropPosition:0})?w=0:i({dragNode:O,dropNode:P,dropPosition:1})?w=1:E=!1:i({dragNode:O,dropNode:P,dropPosition:1})?w=1:E=!1,{dropPosition:w,dropLevelOffset:I,dropTargetKey:b.key,dropTargetPos:b.pos,dragOverNodeKey:_,dropContainerKey:w===0?null:((u=b.parent)===null||u===void 0?void 0:u.key)||null,dropAllowed:E}}function l6(e,t){if(!e)return;const{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function wC(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e=="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return null;return t}function Lx(e,t){const n=new Set;function o(r){if(n.has(r))return;const i=t[r];if(!i)return;n.add(r);const{parent:a,node:l}=i;l.disabled||a&&o(a.key)}return(e||[]).forEach(r=>{o(r)}),[...n]}var Aye=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:[];return _n(n).map(r=>{var i,a,l,s;if(!Iye(r))return null;const c=r.children||{},u=r.key,d={};for(const[R,A]of Object.entries(r.props))d[Gc(R)]=A;const{isLeaf:f,checkable:h,selectable:m,disabled:v,disableCheckbox:y}=d,b={isLeaf:f||f===""||void 0,checkable:h||h===""||void 0,selectable:m||m===""||void 0,disabled:v||v===""||void 0,disableCheckbox:y||y===""||void 0},$=S(S({},d),b),{title:x=(i=c.title)===null||i===void 0?void 0:i.call(c,$),icon:_=(a=c.icon)===null||a===void 0?void 0:a.call(c,$),switcherIcon:w=(l=c.switcherIcon)===null||l===void 0?void 0:l.call(c,$)}=d,I=Aye(d,["title","icon","switcherIcon"]),O=(s=c.default)===null||s===void 0?void 0:s.call(c),P=S(S(S({},I),{title:x,icon:_,switcherIcon:w,key:u,isLeaf:f}),b),E=t(O);return E.length&&(P.children=E),P})}return t(e)}function Mye(e,t,n){const{_title:o,key:r,children:i}=Ay(n),a=new Set(t===!0?[]:t),l=[];function s(c){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map((d,f)=>{const h=dF(u?u.pos:"0",f),m=Zh(d[r],h);let v;for(let b=0;bf[i]:typeof i=="function"&&(u=f=>i(f)):u=(f,h)=>Zh(f[l],h);function d(f,h,m,v){const y=f?f[c]:e,b=f?dF(m.pos,h):"0",$=f?[...v,f]:[];if(f){const x=u(f,b),_={node:f,index:h,pos:b,key:x,parentPos:m.node?m.pos:null,level:m.level+1,nodes:$};t(_)}y&&y.forEach((x,_)=>{d(x,_,{node:f,pos:b,level:m?m.level+1:-1},$)})}d(null)}function Qh(e){let{initWrapper:t,processEntity:n,onProcessFinished:o,externalGetKey:r,childrenPropName:i,fieldNames:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2?arguments[2]:void 0;const s=r||l,c={},u={};let d={posEntities:c,keyEntities:u};return t&&(d=t(d)||d),Rye(e,f=>{const{node:h,index:m,pos:v,key:y,parentPos:b,level:$,nodes:x}=f,_={node:h,nodes:x,index:m,key:y,pos:v,level:$},w=Zh(y,v);c[v]=_,u[w]=_,_.parent=c[b],_.parent&&(_.parent.children=_.parent.children||[],_.parent.children.push(_)),n&&n(_,d)},{externalGetKey:s,childrenPropName:i,fieldNames:a}),o&&o(d),d}function bm(e,t){let{expandedKeysSet:n,selectedKeysSet:o,loadedKeysSet:r,loadingKeysSet:i,checkedKeysSet:a,halfCheckedKeysSet:l,dragOverNodeKey:s,dropPosition:c,keyEntities:u}=t;const d=u[e];return{eventKey:e,expanded:n.has(e),selected:o.has(e),loaded:r.has(e),loading:i.has(e),checked:a.has(e),halfChecked:l.has(e),pos:String(d?d.pos:""),parent:d.parent,dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function ym(e){const{data:t,expanded:n,selected:o,checked:r,loaded:i,loading:a,halfChecked:l,dragOver:s,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,eventKey:h}=e,m=S(S({dataRef:t},t),{expanded:n,selected:o,checked:r,loaded:i,loading:a,halfChecked:l,dragOver:s,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,eventKey:h,key:h});return"props"in m||Object.defineProperty(m,"props",{get(){return e}}),m}const Dye=(e,t)=>M(()=>Qh(e.value,{fieldNames:t.value,initWrapper:o=>S(S({},o),{pathKeyEntities:{}}),processEntity:(o,r)=>{const i=o.nodes.map(a=>a[t.value.value]).join(kO);r.pathKeyEntities[i]=o,o.key=i}}).pathKeyEntities);function Lye(e){const t=ve(!1),n=he({});return ct(()=>{if(!e.value){t.value=!1,n.value={};return}let o={matchInputWidth:!0,limit:50};e.value&&typeof e.value=="object"&&(o=S(S({},o),e.value)),o.limit<=0&&delete o.limit,t.value=!0,n.value=o}),{showSearch:t,searchConfig:n}}const Op="__rc_cascader_search_mark__",Nye=(e,t,n)=>{let{label:o}=n;return t.some(r=>String(r[o]).toLowerCase().includes(e.toLowerCase()))},kye=e=>{let{path:t,fieldNames:n}=e;return t.map(o=>o[n.label]).join(" / ")},Bye=(e,t,n,o,r,i)=>M(()=>{const{filter:a=Nye,render:l=kye,limit:s=50,sort:c}=r.value,u=[];if(!e.value)return[];function d(f,h){f.forEach(m=>{if(!c&&s>0&&u.length>=s)return;const v=[...h,m],y=m[n.value.children];(!y||y.length===0||i.value)&&a(e.value,v,{label:n.value.label})&&u.push(S(S({},m),{[n.value.label]:l({inputValue:e.value,path:v,prefixCls:o.value,fieldNames:n.value}),[Op]:v})),y&&d(m[n.value.children],v)})}return d(t.value,[]),c&&u.sort((f,h)=>c(f[Op],h[Op],e.value,n.value)),s>0?u.slice(0,s):u});function s6(e,t,n){const o=new Set(e);return e.filter(r=>{const i=t[r],a=i?i.parent:null,l=i?i.children:null;return n===iF?!(l&&l.some(s=>s.key&&o.has(s.key))):!(a&&!a.node.disabled&&o.has(a.key))})}function bh(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;var r;let i=t;const a=[];for(let l=0;l{const f=d[n.value];return o?String(f)===String(s):f===s}),u=c!==-1?i==null?void 0:i[c]:null;a.push({value:(r=u==null?void 0:u[n.value])!==null&&r!==void 0?r:s,index:c,option:u}),i=u==null?void 0:u[n.children]}return a}const Fye=(e,t,n)=>M(()=>{const o=[],r=[];return n.value.forEach(i=>{bh(i,e.value,t.value).every(l=>l.option)?r.push(i):o.push(i)}),[r,o]});function fF(e,t){const n=new Set;return e.forEach(o=>{t.has(o)||n.add(o)}),n}function Hye(e){const{disabled:t,disableCheckbox:n,checkable:o}=e||{};return!!(t||n)||o===!1}function zye(e,t,n,o){const r=new Set(e),i=new Set;for(let l=0;l<=n;l+=1)(t.get(l)||new Set).forEach(c=>{const{key:u,node:d,children:f=[]}=c;r.has(u)&&!o(d)&&f.filter(h=>!o(h.node)).forEach(h=>{r.add(h.key)})});const a=new Set;for(let l=n;l>=0;l-=1)(t.get(l)||new Set).forEach(c=>{const{parent:u,node:d}=c;if(o(d)||!c.parent||a.has(c.parent.key))return;if(o(c.parent.node)){a.add(u.key);return}let f=!0,h=!1;(u.children||[]).filter(m=>!o(m.node)).forEach(m=>{let{key:v}=m;const y=r.has(v);f&&!y&&(f=!1),!h&&(y||i.has(v))&&(h=!0)}),f&&r.add(u.key),h&&i.add(u.key),a.add(u.key)});return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(fF(i,r))}}function jye(e,t,n,o,r){const i=new Set(e);let a=new Set(t);for(let s=0;s<=o;s+=1)(n.get(s)||new Set).forEach(u=>{const{key:d,node:f,children:h=[]}=u;!i.has(d)&&!a.has(d)&&!r(f)&&h.filter(m=>!r(m.node)).forEach(m=>{i.delete(m.key)})});a=new Set;const l=new Set;for(let s=o;s>=0;s-=1)(n.get(s)||new Set).forEach(u=>{const{parent:d,node:f}=u;if(r(f)||!u.parent||l.has(u.parent.key))return;if(r(u.parent.node)){l.add(d.key);return}let h=!0,m=!1;(d.children||[]).filter(v=>!r(v.node)).forEach(v=>{let{key:y}=v;const b=i.has(y);h&&!b&&(h=!1),!m&&(b||a.has(y))&&(m=!0)}),h||i.delete(d.key),m&&a.add(d.key),l.add(d.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(fF(a,i))}}function Mi(e,t,n,o,r,i){let a;i?a=i:a=Hye;const l=new Set(e.filter(c=>!!n[c]));let s;return t===!0?s=zye(l,r,o,a):s=jye(l,t.halfCheckedKeys,r,o,a),s}const Wye=(e,t,n,o,r)=>M(()=>{const i=r.value||(a=>{let{labels:l}=a;const s=o.value?l.slice(-1):l,c=" / ";return s.every(u=>["string","number"].includes(typeof u))?s.join(c):s.reduce((u,d,f)=>{const h=Jn(d)?Gt(d,{key:f}):d;return f===0?[h]:[...u,c,h]},[])});return e.value.map(a=>{const l=bh(a,t.value,n.value),s=i({labels:l.map(u=>{let{option:d,value:f}=u;var h;return(h=d==null?void 0:d[n.value.label])!==null&&h!==void 0?h:f}),selectedOptions:l.map(u=>{let{option:d}=u;return d})}),c=bs(a);return{label:s,value:c,key:c,valueCells:a}})}),pF=Symbol("CascaderContextKey"),Vye=e=>{ft(pF,e)},My=()=>it(pF),Kye=()=>{const e=zh(),{values:t}=My(),[n,o]=nn([]);return Ie(()=>e.open,()=>{if(e.open&&!e.multiple){const r=t.value[0];o(r||[])}},{immediate:!0}),[n,o]},Uye=(e,t,n,o,r,i)=>{const a=zh(),l=M(()=>a.direction==="rtl"),[s,c,u]=[he([]),he(),he([])];ct(()=>{let v=-1,y=t.value;const b=[],$=[],x=o.value.length;for(let w=0;wO[n.value.value]===o.value[w]);if(I===-1)break;v=I,b.push(v),$.push(o.value[w]),y=y[v][n.value.children]}let _=t.value;for(let w=0;w{r(v)},f=v=>{const y=u.value.length;let b=c.value;b===-1&&v<0&&(b=y);for(let $=0;${if(s.value.length>1){const v=s.value.slice(0,-1);d(v)}else a.toggleOpen(!1)},m=()=>{var v;const b=(((v=u.value[c.value])===null||v===void 0?void 0:v[n.value.children])||[]).find($=>!$.disabled);if(b){const $=[...s.value,b[n.value.value]];d($)}};e.expose({onKeydown:v=>{const{which:y}=v;switch(y){case Fe.UP:case Fe.DOWN:{let b=0;y===Fe.UP?b=-1:y===Fe.DOWN&&(b=1),b!==0&&f(b);break}case Fe.LEFT:{l.value?m():h();break}case Fe.RIGHT:{l.value?h():m();break}case Fe.BACKSPACE:{a.searchValue||h();break}case Fe.ENTER:{if(s.value.length){const b=u.value[c.value],$=(b==null?void 0:b[Op])||[];$.length?i($.map(x=>x[n.value.value]),$[$.length-1]):i(s.value,b)}break}case Fe.ESC:a.toggleOpen(!1),open&&v.stopPropagation()}},onKeyup:()=>{}})};function Ry(e){let{prefixCls:t,checked:n,halfChecked:o,disabled:r,onClick:i}=e;const{customSlots:a,checkable:l}=My(),s=l.value!==!1?a.value.checkable:l.value,c=typeof s=="function"?s():typeof s=="boolean"?null:s;return g("span",{class:{[t]:!0,[`${t}-checked`]:n,[`${t}-indeterminate`]:!n&&o,[`${t}-disabled`]:r},onClick:i},[c])}Ry.props=["prefixCls","checked","halfChecked","disabled","onClick"];Ry.displayName="Checkbox";Ry.inheritAttrs=!1;const hF="__cascader_fix_label__";function Dy(e){let{prefixCls:t,multiple:n,options:o,activeValue:r,prevValuePath:i,onToggleOpen:a,onSelect:l,onActive:s,checkedSet:c,halfCheckedSet:u,loadingKeys:d,isSelectable:f}=e;var h,m,v,y,b,$;const x=`${t}-menu`,_=`${t}-menu-item`,{fieldNames:w,changeOnSelect:I,expandTrigger:O,expandIcon:P,loadingIcon:E,dropdownMenuColumnStyle:R,customSlots:A}=My(),N=(h=P.value)!==null&&h!==void 0?h:(v=(m=A.value).expandIcon)===null||v===void 0?void 0:v.call(m),F=(y=E.value)!==null&&y!==void 0?y:($=(b=A.value).loadingIcon)===null||$===void 0?void 0:$.call(b),W=O.value==="hover";return g("ul",{class:x,role:"menu"},[o.map(D=>{var B;const{disabled:k}=D,L=D[Op],z=(B=D[hF])!==null&&B!==void 0?B:D[w.value.label],K=D[w.value.value],G=rp(D,w.value),Y=L?L.map(X=>X[w.value.value]):[...i,K],ne=bs(Y),re=d.includes(ne),J=c.has(ne),te=u.has(ne),ee=()=>{!k&&(!W||!G)&&s(Y)},fe=()=>{f(D)&&l(Y,G)};let ie;return typeof D.title=="string"?ie=D.title:typeof z=="string"&&(ie=z),g("li",{key:ne,class:[_,{[`${_}-expand`]:!G,[`${_}-active`]:r===K,[`${_}-disabled`]:k,[`${_}-loading`]:re}],style:R.value,role:"menuitemcheckbox",title:ie,"aria-checked":J,"data-path-key":ne,onClick:()=>{ee(),(!n||G)&&fe()},onDblclick:()=>{I.value&&a(!1)},onMouseenter:()=>{W&&ee()},onMousedown:X=>{X.preventDefault()}},[n&&g(Ry,{prefixCls:`${t}-checkbox`,checked:J,halfChecked:te,disabled:k,onClick:X=>{X.stopPropagation(),fe()}},null),g("div",{class:`${_}-content`},[z]),!re&&N&&!G&&g("div",{class:`${_}-expand-icon`},[N]),re&&F&&g("div",{class:`${_}-loading-icon`},[F])])})])}Dy.props=["prefixCls","multiple","options","activeValue","prevValuePath","onToggleOpen","onSelect","onActive","checkedSet","halfCheckedSet","loadingKeys","isSelectable"];Dy.displayName="Column";Dy.inheritAttrs=!1;const Gye=pe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){const{attrs:n,slots:o}=t,r=zh(),i=he(),a=M(()=>r.direction==="rtl"),{options:l,values:s,halfValues:c,fieldNames:u,changeOnSelect:d,onSelect:f,searchOptions:h,dropdownPrefixCls:m,loadData:v,expandTrigger:y,customSlots:b}=My(),$=M(()=>m.value||r.prefixCls),x=ve([]),_=B=>{if(!v.value||r.searchValue)return;const L=bh(B,l.value,u.value).map(K=>{let{option:G}=K;return G}),z=L[L.length-1];if(z&&!rp(z,u.value)){const K=bs(B);x.value=[...x.value,K],v.value(L)}};ct(()=>{x.value.length&&x.value.forEach(B=>{const k=mye(B),L=bh(k,l.value,u.value,!0).map(K=>{let{option:G}=K;return G}),z=L[L.length-1];(!z||z[u.value.children]||rp(z,u.value))&&(x.value=x.value.filter(K=>K!==B))})});const w=M(()=>new Set(Ju(s.value))),I=M(()=>new Set(Ju(c.value))),[O,P]=Kye(),E=B=>{P(B),_(B)},R=B=>{const{disabled:k}=B,L=rp(B,u.value);return!k&&(L||d.value||r.multiple)},A=function(B,k){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;f(B),!r.multiple&&(k||d.value&&(y.value==="hover"||L))&&r.toggleOpen(!1)},N=M(()=>r.searchValue?h.value:l.value),F=M(()=>{const B=[{options:N.value}];let k=N.value;for(let L=0;LY[u.value.value]===z),G=K==null?void 0:K[u.value.children];if(!(G!=null&&G.length))break;k=G,B.push({options:G})}return B});Uye(t,N,u,O,E,(B,k)=>{R(k)&&A(B,rp(k,u.value),!0)});const D=B=>{B.preventDefault()};return lt(()=>{Ie(O,B=>{var k;for(let L=0;L{var B,k,L,z,K;const{notFoundContent:G=((B=o.notFoundContent)===null||B===void 0?void 0:B.call(o))||((L=(k=b.value).notFoundContent)===null||L===void 0?void 0:L.call(k)),multiple:Y,toggleOpen:ne}=r,re=!(!((K=(z=F.value[0])===null||z===void 0?void 0:z.options)===null||K===void 0)&&K.length),J=[{[u.value.value]:"__EMPTY__",[hF]:G,disabled:!0}],te=S(S({},n),{multiple:!re&&Y,onSelect:A,onActive:E,onToggleOpen:ne,checkedSet:w.value,halfCheckedSet:I.value,loadingKeys:x.value,isSelectable:R}),fe=(re?[{options:J}]:F.value).map((ie,X)=>{const ue=O.value.slice(0,X),ye=O.value[X];return g(Dy,V(V({key:X},te),{},{prefixCls:$.value,options:ie.options,prevValuePath:ue,activeValue:ye}),null)});return g("div",{class:[`${$.value}-menus`,{[`${$.value}-menu-empty`]:re,[`${$.value}-rtl`]:a.value}],onMousedown:D,ref:i},[fe])}}});function Ly(e){const t=he(0),n=ve();return ct(()=>{const o=new Map;let r=0;const i=e.value||{};for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=i[a],{level:s}=l;let c=o.get(s);c||(c=new Set,o.set(s,c)),c.add(l),r=Math.max(r,s)}t.value=r,n.value=o}),{maxLevel:t,levelEntities:n}}function Yye(){return S(S({},_t(ay(),["tokenSeparators","mode","showSearch"])),{id:String,prefixCls:String,fieldNames:qe(),children:Array,value:{type:[String,Number,Array]},defaultValue:{type:[String,Number,Array]},changeOnSelect:{type:Boolean,default:void 0},displayRender:Function,checkable:{type:Boolean,default:void 0},showCheckedStrategy:{type:String,default:rF},showSearch:{type:[Boolean,Object],default:void 0},searchValue:String,onSearch:Function,expandTrigger:String,options:Array,dropdownPrefixCls:String,loadData:Function,popupVisible:{type:Boolean,default:void 0},popupClassName:String,dropdownClassName:String,dropdownMenuColumnStyle:{type:Object,default:void 0},popupStyle:{type:Object,default:void 0},dropdownStyle:{type:Object,default:void 0},popupPlacement:String,placement:String,onPopupVisibleChange:Function,onDropdownVisibleChange:Function,expandIcon:Z.any,loadingIcon:Z.any})}function gF(){return S(S({},Yye()),{onChange:Function,customSlots:Object})}function Xye(e){return Array.isArray(e)&&Array.isArray(e[0])}function c6(e){return e?Xye(e)?e:(e.length===0?[]:[e]).map(t=>Array.isArray(t)?t:[t]):[]}const qye=pe({compatConfig:{MODE:3},name:"Cascader",inheritAttrs:!1,props:bt(gF(),{}),setup(e,t){let{attrs:n,expose:o,slots:r}=t;const i=l_(st(e,"id")),a=M(()=>!!e.checkable),[l,s]=yn(e.defaultValue,{value:M(()=>e.value),postState:c6}),c=M(()=>bye(e.fieldNames)),u=M(()=>e.options||[]),d=Dye(u,c),f=X=>{const ue=d.value;return X.map(ye=>{const{nodes:H}=ue[ye];return H.map(j=>j[c.value.value])})},[h,m]=yn("",{value:M(()=>e.searchValue),postState:X=>X||""}),v=(X,ue)=>{m(X),ue.source!=="blur"&&e.onSearch&&e.onSearch(X)},{showSearch:y,searchConfig:b}=Lye(st(e,"showSearch")),$=Bye(h,u,c,M(()=>e.dropdownPrefixCls||e.prefixCls),b,st(e,"changeOnSelect")),x=Fye(u,c,l),[_,w,I]=[he([]),he([]),he([])],{maxLevel:O,levelEntities:P}=Ly(d);ct(()=>{const[X,ue]=x.value;if(!a.value||!l.value.length){[_.value,w.value,I.value]=[X,[],ue];return}const ye=Ju(X),H=d.value,{checkedKeys:j,halfCheckedKeys:q}=Mi(ye,!0,H,O.value,P.value);[_.value,w.value,I.value]=[f(j),f(q),ue]});const E=M(()=>{const X=Ju(_.value),ue=s6(X,d.value,e.showCheckedStrategy);return[...I.value,...f(ue)]}),R=Wye(E,u,c,a,st(e,"displayRender")),A=X=>{if(s(X),e.onChange){const ue=c6(X),ye=ue.map(q=>bh(q,u.value,c.value).map(se=>se.option)),H=a.value?ue:ue[0],j=a.value?ye:ye[0];e.onChange(H,j)}},N=X=>{if(m(""),!a.value)A(X);else{const ue=bs(X),ye=Ju(_.value),H=Ju(w.value),j=ye.includes(ue),q=I.value.some(ge=>bs(ge)===ue);let se=_.value,ae=I.value;if(q&&!j)ae=I.value.filter(ge=>bs(ge)!==ue);else{const ge=j?ye.filter(_e=>_e!==ue):[...ye,ue];let Se;j?{checkedKeys:Se}=Mi(ge,{checked:!1,halfCheckedKeys:H},d.value,O.value,P.value):{checkedKeys:Se}=Mi(ge,!0,d.value,O.value,P.value);const $e=s6(Se,d.value,e.showCheckedStrategy);se=f($e)}A([...ae,...se])}},F=(X,ue)=>{if(ue.type==="clear"){A([]);return}const{valueCells:ye}=ue.values[0];N(ye)},W=M(()=>e.open!==void 0?e.open:e.popupVisible),D=M(()=>e.dropdownClassName||e.popupClassName),B=M(()=>e.dropdownStyle||e.popupStyle||{}),k=M(()=>e.placement||e.popupPlacement),L=X=>{var ue,ye;(ue=e.onDropdownVisibleChange)===null||ue===void 0||ue.call(e,X),(ye=e.onPopupVisibleChange)===null||ye===void 0||ye.call(e,X)},{changeOnSelect:z,checkable:K,dropdownPrefixCls:G,loadData:Y,expandTrigger:ne,expandIcon:re,loadingIcon:J,dropdownMenuColumnStyle:te,customSlots:ee}=oa(e);Vye({options:u,fieldNames:c,values:_,halfValues:w,changeOnSelect:z,onSelect:N,checkable:K,searchOptions:$,dropdownPrefixCls:G,loadData:Y,expandTrigger:ne,expandIcon:re,loadingIcon:J,dropdownMenuColumnStyle:te,customSlots:ee});const fe=he();o({focus(){var X;(X=fe.value)===null||X===void 0||X.focus()},blur(){var X;(X=fe.value)===null||X===void 0||X.blur()},scrollTo(X){var ue;(ue=fe.value)===null||ue===void 0||ue.scrollTo(X)}});const ie=M(()=>_t(e,["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","customSlots","showCheckedStrategy","children"]));return()=>{const X=!(h.value?$.value:u.value).length,{dropdownMatchSelectWidth:ue=!1}=e,ye=h.value&&b.value.matchInputWidth||X?{}:{minWidth:"auto"};return g(i_,V(V(V({},ie.value),n),{},{ref:fe,id:i,prefixCls:e.prefixCls,dropdownMatchSelectWidth:ue,dropdownStyle:S(S({},B.value),ye),displayValues:R.value,onDisplayValuesChange:F,mode:a.value?"multiple":void 0,searchValue:h.value,onSearch:v,showSearch:y.value,OptionList:Gye,emptyOptions:X,open:W.value,dropdownClassName:D.value,placement:k.value,onDropdownVisibleChange:L,getRawInputElement:()=>{var H;return(H=r.default)===null||H===void 0?void 0:H.call(r)}}),r)}}});var Zye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};const Qye=Zye;function u6(e){for(var t=1;tur()&&window.document.documentElement,mF=e=>{if(ur()&&window.document.documentElement){const t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(o=>o in n.style)}return!1},e1e=(e,t)=>{if(!mF(e))return!1;const n=document.createElement("div"),o=n.style[e];return n.style[e]=t,n.style[e]!==o};function zO(e,t){return!Array.isArray(e)&&t!==void 0?e1e(e,t):mF(e)}let Lv;const t1e=()=>{if(!vF())return!1;if(Lv!==void 0)return Lv;const e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),Lv=e.scrollHeight===1,document.body.removeChild(e),Lv},bF=()=>{const e=ve(!1);return lt(()=>{e.value=t1e()}),e},yF=Symbol("rowContextKey"),n1e=e=>{ft(yF,e)},o1e=()=>it(yF,{gutter:M(()=>{}),wrap:M(()=>{}),supportFlexGap:M(()=>{})}),r1e=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},i1e=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},a1e=(e,t)=>{const{componentCls:n,gridColumns:o}=e,r={};for(let i=o;i>=0;i--)i===0?(r[`${n}${t}-${i}`]={display:"none"},r[`${n}-push-${i}`]={insetInlineStart:"auto"},r[`${n}-pull-${i}`]={insetInlineEnd:"auto"},r[`${n}${t}-push-${i}`]={insetInlineStart:"auto"},r[`${n}${t}-pull-${i}`]={insetInlineEnd:"auto"},r[`${n}${t}-offset-${i}`]={marginInlineEnd:0},r[`${n}${t}-order-${i}`]={order:0}):(r[`${n}${t}-${i}`]={display:"block",flex:`0 0 ${i/o*100}%`,maxWidth:`${i/o*100}%`},r[`${n}${t}-push-${i}`]={insetInlineStart:`${i/o*100}%`},r[`${n}${t}-pull-${i}`]={insetInlineEnd:`${i/o*100}%`},r[`${n}${t}-offset-${i}`]={marginInlineStart:`${i/o*100}%`},r[`${n}${t}-order-${i}`]={order:i});return r},kx=(e,t)=>a1e(e,t),l1e=(e,t,n)=>({[`@media (min-width: ${t}px)`]:S({},kx(e,n))}),s1e=pt("Grid",e=>[r1e(e)]),c1e=pt("Grid",e=>{const t=nt(e,{gridColumns:24}),n={"-sm":t.screenSMMin,"-md":t.screenMDMin,"-lg":t.screenLGMin,"-xl":t.screenXLMin,"-xxl":t.screenXXLMin};return[i1e(t),kx(t,""),kx(t,"-xs"),Object.keys(n).map(o=>l1e(t,n[o],o)).reduce((o,r)=>S(S({},o),r),{})]}),u1e=()=>({align:rt([String,Object]),justify:rt([String,Object]),prefixCls:String,gutter:rt([Number,Array,Object],0),wrap:{type:Boolean,default:void 0}}),d1e=pe({compatConfig:{MODE:3},name:"ARow",inheritAttrs:!1,props:u1e(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("row",e),[a,l]=s1e(r);let s;const c=j_(),u=he({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),d=he({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),f=x=>M(()=>{if(typeof e[x]=="string")return e[x];if(typeof e[x]!="object")return"";for(let _=0;_{s=c.value.subscribe(x=>{d.value=x;const _=e.gutter||0;(!Array.isArray(_)&&typeof _=="object"||Array.isArray(_)&&(typeof _[0]=="object"||typeof _[1]=="object"))&&(u.value=x)})}),Ct(()=>{c.value.unsubscribe(s)});const y=M(()=>{const x=[void 0,void 0],{gutter:_=0}=e;return(Array.isArray(_)?_:[_,void 0]).forEach((I,O)=>{if(typeof I=="object")for(let P=0;Pe.wrap)});const b=M(()=>me(r.value,{[`${r.value}-no-wrap`]:e.wrap===!1,[`${r.value}-${m.value}`]:m.value,[`${r.value}-${h.value}`]:h.value,[`${r.value}-rtl`]:i.value==="rtl"},o.class,l.value)),$=M(()=>{const x=y.value,_={},w=x[0]!=null&&x[0]>0?`${x[0]/-2}px`:void 0,I=x[1]!=null&&x[1]>0?`${x[1]/-2}px`:void 0;return w&&(_.marginLeft=w,_.marginRight=w),v.value?_.rowGap=`${x[1]}px`:I&&(_.marginTop=I,_.marginBottom=I),_});return()=>{var x;return a(g("div",V(V({},o),{},{class:b.value,style:S(S({},$.value),o.style)}),[(x=n.default)===null||x===void 0?void 0:x.call(n)]))}}}),jO=d1e;function bc(){return bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sm(e,t,n){return p1e()?Sm=Reflect.construct.bind():Sm=function(r,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(r,l),c=new s;return a&&yh(c,a.prototype),c},Sm.apply(null,arguments)}function h1e(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Fx(e){var t=typeof Map=="function"?new Map:void 0;return Fx=function(o){if(o===null||!h1e(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,r)}function r(){return Sm(o,arguments,Bx(this).constructor)}return r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),yh(r,o)},Fx(e)}var g1e=/%[sdj%]/g,v1e=function(){};function Hx(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function si(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o=i)return l;switch(l){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}break;default:return l}});return a}return e}function m1e(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Eo(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||m1e(t)&&typeof e=="string"&&!e)}function b1e(e,t,n){var o=[],r=0,i=e.length;function a(l){o.push.apply(o,l||[]),r++,r===i&&n(o)}e.forEach(function(l){t(l,a)})}function d6(e,t,n){var o=0,r=e.length;function i(a){if(a&&a.length){n(a);return}var l=o;o=o+1,l()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ip={integer:function(t){return ip.number(t)&&parseInt(t,10)===t},float:function(t){return ip.number(t)&&!ip.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!ip.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(g6.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(w1e())},hex:function(t){return typeof t=="string"&&!!t.match(g6.hex)}},_1e=function(t,n,o,r,i){if(t.required&&n===void 0){SF(t,n,o,r,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=t.type;a.indexOf(l)>-1?ip[l](n)||r.push(si(i.messages.types[l],t.fullField,t.type)):l&&typeof n!==t.type&&r.push(si(i.messages.types[l],t.fullField,t.type))},O1e=function(t,n,o,r,i){var a=typeof t.len=="number",l=typeof t.min=="number",s=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",h=typeof n=="string",m=Array.isArray(n);if(f?d="number":h?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),h&&(u=n.replace(c,"_").length),a?u!==t.len&&r.push(si(i.messages[d].len,t.fullField,t.len)):l&&!s&&ut.max?r.push(si(i.messages[d].max,t.fullField,t.max)):l&&s&&(ut.max)&&r.push(si(i.messages[d].range,t.fullField,t.min,t.max))},Mu="enum",I1e=function(t,n,o,r,i){t[Mu]=Array.isArray(t[Mu])?t[Mu]:[],t[Mu].indexOf(n)===-1&&r.push(si(i.messages[Mu],t.fullField,t[Mu].join(", ")))},P1e=function(t,n,o,r,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||r.push(si(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||r.push(si(i.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},an={required:SF,whitespace:x1e,type:_1e,range:O1e,enum:I1e,pattern:P1e},T1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n,"string")&&!t.required)return o();an.required(t,n,r,a,i,"string"),Eo(n,"string")||(an.type(t,n,r,a,i),an.range(t,n,r,a,i),an.pattern(t,n,r,a,i),t.whitespace===!0&&an.whitespace(t,n,r,a,i))}o(a)},E1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n)&&!t.required)return o();an.required(t,n,r,a,i),n!==void 0&&an.type(t,n,r,a,i)}o(a)},A1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n===""&&(n=void 0),Eo(n)&&!t.required)return o();an.required(t,n,r,a,i),n!==void 0&&(an.type(t,n,r,a,i),an.range(t,n,r,a,i))}o(a)},M1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n)&&!t.required)return o();an.required(t,n,r,a,i),n!==void 0&&an.type(t,n,r,a,i)}o(a)},R1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n)&&!t.required)return o();an.required(t,n,r,a,i),Eo(n)||an.type(t,n,r,a,i)}o(a)},D1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n)&&!t.required)return o();an.required(t,n,r,a,i),n!==void 0&&(an.type(t,n,r,a,i),an.range(t,n,r,a,i))}o(a)},L1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n)&&!t.required)return o();an.required(t,n,r,a,i),n!==void 0&&(an.type(t,n,r,a,i),an.range(t,n,r,a,i))}o(a)},N1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n==null&&!t.required)return o();an.required(t,n,r,a,i,"array"),n!=null&&(an.type(t,n,r,a,i),an.range(t,n,r,a,i))}o(a)},k1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n)&&!t.required)return o();an.required(t,n,r,a,i),n!==void 0&&an.type(t,n,r,a,i)}o(a)},B1e="enum",F1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n)&&!t.required)return o();an.required(t,n,r,a,i),n!==void 0&&an[B1e](t,n,r,a,i)}o(a)},H1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n,"string")&&!t.required)return o();an.required(t,n,r,a,i),Eo(n,"string")||an.pattern(t,n,r,a,i)}o(a)},z1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n,"date")&&!t.required)return o();if(an.required(t,n,r,a,i),!Eo(n,"date")){var s;n instanceof Date?s=n:s=new Date(n),an.type(t,s,r,a,i),s&&an.range(t,s.getTime(),r,a,i)}}o(a)},j1e=function(t,n,o,r,i){var a=[],l=Array.isArray(n)?"array":typeof n;an.required(t,n,r,a,i,l),o(a)},_C=function(t,n,o,r,i){var a=t.type,l=[],s=t.required||!t.required&&r.hasOwnProperty(t.field);if(s){if(Eo(n,a)&&!t.required)return o();an.required(t,n,r,l,i,a),Eo(n,a)||an.type(t,n,r,l,i)}o(l)},W1e=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Eo(n)&&!t.required)return o();an.required(t,n,r,a,i)}o(a)},Ip={string:T1e,method:E1e,number:A1e,boolean:M1e,regexp:R1e,integer:D1e,float:L1e,array:N1e,object:k1e,enum:F1e,pattern:H1e,date:z1e,url:_C,hex:_C,email:_C,required:j1e,any:W1e};function zx(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var jx=zx(),Jh=function(){function e(n){this.rules=null,this._messages=jx,this.define(n)}var t=e.prototype;return t.define=function(o){var r=this;if(!o)throw new Error("Cannot configure a schema with no rules");if(typeof o!="object"||Array.isArray(o))throw new Error("Rules must be an object");this.rules={},Object.keys(o).forEach(function(i){var a=o[i];r.rules[i]=Array.isArray(a)?a:[a]})},t.messages=function(o){return o&&(this._messages=h6(zx(),o)),this._messages},t.validate=function(o,r,i){var a=this;r===void 0&&(r={}),i===void 0&&(i=function(){});var l=o,s=r,c=i;if(typeof s=="function"&&(c=s,s={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,l),Promise.resolve(l);function u(v){var y=[],b={};function $(_){if(Array.isArray(_)){var w;y=(w=y).concat.apply(w,_)}else y.push(_)}for(var x=0;x3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&o&&n===void 0&&!CF(e,t.slice(0,-1))?e:$F(e,t,n,o)}function Wx(e){return ys(e)}function K1e(e,t){return CF(e,t)}function U1e(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return V1e(e,t,n,o)}function G1e(e,t){return e&&e.some(n=>X1e(n,t))}function v6(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function xF(e,t){const n=Array.isArray(e)?[...e]:S({},e);return t&&Object.keys(t).forEach(o=>{const r=n[o],i=t[o],a=v6(r)&&v6(i);n[o]=a?xF(r,i||{}):i}),n}function Y1e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;oxF(r,i),e)}function m6(e,t){let n={};return t.forEach(o=>{const r=K1e(e,o);n=U1e(n,o,r)}),n}function X1e(e,t){return!e||!t||e.length!==t.length?!1:e.every((n,o)=>t[o]===n)}const ni="'${name}' is not a valid ${type}",Ny={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:ni,method:ni,array:ni,object:ni,number:ni,date:ni,boolean:ni,integer:ni,float:ni,regexp:ni,email:ni,url:ni,hex:ni},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};var ky=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(u){try{c(o.next(u))}catch(d){a(d)}}function s(u){try{c(o.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):r(u.value).then(l,s)}c((o=o.apply(e,t||[])).next())})};const q1e=Jh;function Z1e(e,t){return e.replace(/\$\{\w+\}/g,n=>{const o=n.slice(2,-1);return t[o]})}function Vx(e,t,n,o,r){return ky(this,void 0,void 0,function*(){const i=S({},n);delete i.ruleIndex,delete i.trigger;let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const l=new q1e({[e]:[i]}),s=Y1e({},Ny,o.validateMessages);l.messages(s);let c=[];try{yield Promise.resolve(l.validate({[e]:t},S({},o)))}catch(f){f.errors?c=f.errors.map((h,m)=>{let{message:v}=h;return Jn(v)?ko(v,{key:`error_${m}`}):v}):(console.error(f),c=[s.default()])}if(!c.length&&a)return(yield Promise.all(t.map((h,m)=>Vx(`${e}.${m}`,h,a,o,r)))).reduce((h,m)=>[...h,...m],[]);const u=S(S(S({},n),{name:e,enum:(n.enum||[]).join(", ")}),r);return c.map(f=>typeof f=="string"?Z1e(f,u):f)})}function wF(e,t,n,o,r,i){const a=e.join("."),l=n.map((c,u)=>{const d=c.validator,f=S(S({},c),{ruleIndex:u});return d&&(f.validator=(h,m,v)=>{let y=!1;const $=d(h,m,function(){for(var x=arguments.length,_=new Array(x),w=0;w{y||v(..._)})});y=$&&typeof $.then=="function"&&typeof $.catch=="function",y&&$.then(()=>{v()}).catch(x=>{v(x||" ")})}),f}).sort((c,u)=>{let{warningOnly:d,ruleIndex:f}=c,{warningOnly:h,ruleIndex:m}=u;return!!d==!!h?f-m:d?1:-1});let s;if(r===!0)s=new Promise((c,u)=>ky(this,void 0,void 0,function*(){for(let d=0;dVx(a,t,u,o,i).then(d=>({errors:d,rule:u})));s=(r?J1e(c):Q1e(c)).then(u=>Promise.reject(u))}return s.catch(c=>c),s}function Q1e(e){return ky(this,void 0,void 0,function*(){return Promise.all(e).then(t=>[].concat(...t))})}function J1e(e){return ky(this,void 0,void 0,function*(){let t=0;return new Promise(n=>{e.forEach(o=>{o.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})})}const _F=Symbol("formContextKey"),OF=e=>{ft(_F,e)},WO=()=>it(_F,{name:M(()=>{}),labelAlign:M(()=>"right"),vertical:M(()=>!1),addField:(e,t)=>{},removeField:e=>{},model:M(()=>{}),rules:M(()=>{}),colon:M(()=>{}),labelWrap:M(()=>{}),labelCol:M(()=>{}),requiredMark:M(()=>!1),validateTrigger:M(()=>{}),onValidate:()=>{},validateMessages:M(()=>Ny)}),IF=Symbol("formItemPrefixContextKey"),eSe=e=>{ft(IF,e)},tSe=()=>it(IF,{prefixCls:M(()=>"")});function nSe(e){return typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const oSe=()=>({span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}),rSe=["xs","sm","md","lg","xl","xxl"],By=pe({compatConfig:{MODE:3},name:"ACol",inheritAttrs:!1,props:oSe(),setup(e,t){let{slots:n,attrs:o}=t;const{gutter:r,supportFlexGap:i,wrap:a}=o1e(),{prefixCls:l,direction:s}=Ve("col",e),[c,u]=c1e(l),d=M(()=>{const{span:h,order:m,offset:v,push:y,pull:b}=e,$=l.value;let x={};return rSe.forEach(_=>{let w={};const I=e[_];typeof I=="number"?w.span=I:typeof I=="object"&&(w=I||{}),x=S(S({},x),{[`${$}-${_}-${w.span}`]:w.span!==void 0,[`${$}-${_}-order-${w.order}`]:w.order||w.order===0,[`${$}-${_}-offset-${w.offset}`]:w.offset||w.offset===0,[`${$}-${_}-push-${w.push}`]:w.push||w.push===0,[`${$}-${_}-pull-${w.pull}`]:w.pull||w.pull===0,[`${$}-rtl`]:s.value==="rtl"})}),me($,{[`${$}-${h}`]:h!==void 0,[`${$}-order-${m}`]:m,[`${$}-offset-${v}`]:v,[`${$}-push-${y}`]:y,[`${$}-pull-${b}`]:b},x,o.class,u.value)}),f=M(()=>{const{flex:h}=e,m=r.value,v={};if(m&&m[0]>0){const y=`${m[0]/2}px`;v.paddingLeft=y,v.paddingRight=y}if(m&&m[1]>0&&!i.value){const y=`${m[1]/2}px`;v.paddingTop=y,v.paddingBottom=y}return h&&(v.flex=nSe(h),a.value===!1&&!v.minWidth&&(v.minWidth=0)),v});return()=>{var h;return c(g("div",V(V({},o),{},{class:d.value,style:[f.value,o.style]}),[(h=n.default)===null||h===void 0?void 0:h.call(n)]))}}});var iSe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const aSe=iSe;function b6(e){for(var t=1;t{let{slots:n,emit:o,attrs:r}=t;var i,a,l,s,c;const{prefixCls:u,htmlFor:d,labelCol:f,labelAlign:h,colon:m,required:v,requiredMark:y}=S(S({},e),r),[b]=Wi("Form"),$=(i=e.label)!==null&&i!==void 0?i:(a=n.label)===null||a===void 0?void 0:a.call(n);if(!$)return null;const{vertical:x,labelAlign:_,labelCol:w,labelWrap:I,colon:O}=WO(),P=f||(w==null?void 0:w.value)||{},E=h||(_==null?void 0:_.value),R=`${u}-item-label`,A=me(R,E==="left"&&`${R}-left`,P.class,{[`${R}-wrap`]:!!I.value});let N=$;const F=m===!0||(O==null?void 0:O.value)!==!1&&m!==!1;if(F&&!x.value&&typeof $=="string"&&$.trim()!==""&&(N=$.replace(/[:|:]\s*$/,"")),e.tooltip||n.tooltip){const B=g("span",{class:`${u}-item-tooltip`},[g(Br,{title:e.tooltip},{default:()=>[g(PF,null,null)]})]);N=g(Je,null,[N,n.tooltip?(l=n.tooltip)===null||l===void 0?void 0:l.call(n,{class:`${u}-item-tooltip`}):B])}y==="optional"&&!v&&(N=g(Je,null,[N,g("span",{class:`${u}-item-optional`},[((s=b.value)===null||s===void 0?void 0:s.optional)||((c=cr.Form)===null||c===void 0?void 0:c.optional)])]));const D=me({[`${u}-item-required`]:v,[`${u}-item-required-mark-optional`]:y==="optional",[`${u}-item-no-colon`]:!F});return g(By,V(V({},P),{},{class:A}),{default:()=>[g("label",{for:d,class:D,title:typeof $=="string"?$:"",onClick:B=>o("click",B)},[N])]})};KO.displayName="FormItemLabel";KO.inheritAttrs=!1;const sSe=KO,cSe=e=>{const{componentCls:t}=e,n=`${t}-show-help`,o=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[o]:{overflow:"hidden",transition:`height ${e.motionDurationSlow} ${e.motionEaseInOut}, + opacity ${e.motionDurationSlow} ${e.motionEaseInOut}, + transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,[`&${o}-appear, &${o}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${o}-leave-active`]:{transform:"translateY(-5px)"}}}}},uSe=cSe,dSe=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},label:{fontSize:e.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),y6=(e,t)=>{const{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},fSe=e=>{const{componentCls:t}=e;return{[e.componentCls]:S(S(S({},vt(e)),dSe(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":S({},y6(e,e.controlHeightSM)),"&-large":S({},y6(e,e.controlHeightLG))})}},pSe=e=>{const{formItemCls:t,iconCls:n,componentCls:o,rootPrefixCls:r}=e;return{[t]:S(S({},vt(e)),{marginBottom:e.marginLG,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, + &-hidden.${r}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{display:"inline-block",flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${e.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:e.controlHeight,color:e.colorTextHeading,fontSize:e.fontSize,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required:not(${t}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:e.marginXXS,color:e.colorError,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${o}-hide-required-mark &`]:{display:"none"}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`${o}-hide-required-mark &`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:e.marginXXS/2,marginInlineEnd:e.marginXS},[`&${t}-no-colon::after`]:{content:'" "'}}},[`${t}-control`]:{display:"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[t]:{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:A_,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},hSe=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:o}=e;return{[`${t}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label.${o}-col-24 + ${n}-control`]:{minWidth:"unset"}}}},gSe=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",flexWrap:"nowrap",marginInlineEnd:e.margin,marginBottom:0,"&-with-help":{marginBottom:e.marginLG},[`> ${n}-label, + > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},Ku=e=>({margin:0,padding:`0 0 ${e.paddingXS}px`,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{display:"none"}}}),vSe=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${n} ${n}-label`]:Ku(e),[t]:{[n]:{flexWrap:"wrap",[`${n}-label, + ${n}-control`]:{flex:"0 0 100%",maxWidth:"100%"}}}}},mSe=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:o}=e;return{[`${t}-vertical`]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${t}-item-control`]:{width:"100%"}}},[`${t}-vertical ${n}-label, + .${o}-col-24${n}-label, + .${o}-col-xl-24${n}-label`]:Ku(e),[`@media (max-width: ${e.screenXSMax}px)`]:[vSe(e),{[t]:{[`.${o}-col-xs-24${n}-label`]:Ku(e)}}],[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{[`.${o}-col-sm-24${n}-label`]:Ku(e)}},[`@media (max-width: ${e.screenMDMax}px)`]:{[t]:{[`.${o}-col-md-24${n}-label`]:Ku(e)}},[`@media (max-width: ${e.screenLGMax}px)`]:{[t]:{[`.${o}-col-lg-24${n}-label`]:Ku(e)}}}},UO=pt("Form",(e,t)=>{let{rootPrefixCls:n}=t;const o=nt(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:n});return[fSe(o),pSe(o),uSe(o),hSe(o),gSe(o),mSe(o),Kh(o),A_]}),bSe=pe({compatConfig:{MODE:3},name:"ErrorList",inheritAttrs:!1,props:["errors","help","onErrorVisibleChanged","helpStatus","warnings"],setup(e,t){let{attrs:n}=t;const{prefixCls:o,status:r}=tSe(),i=M(()=>`${o.value}-item-explain`),a=M(()=>!!(e.errors&&e.errors.length)),l=he(r.value),[,s]=UO(o);return Ie([a,r],()=>{a.value&&(l.value=r.value)}),()=>{var c,u;const d=Uh(`${o.value}-show-help-item`),f=ny(`${o.value}-show-help-item`,d);return f.role="alert",f.class=[s.value,i.value,n.class,`${o.value}-show-help`],g(so,V(V({},Hi(`${o.value}-show-help`)),{},{onAfterEnter:()=>e.onErrorVisibleChanged(!0),onAfterLeave:()=>e.onErrorVisibleChanged(!1)}),{default:()=>[Ln(g(Lb,V(V({},f),{},{tag:"div"}),{default:()=>[(u=e.errors)===null||u===void 0?void 0:u.map((h,m)=>g("div",{key:m,class:l.value?`${i.value}-${l.value}`:""},[h]))]}),[[Bo,!!(!((c=e.errors)===null||c===void 0)&&c.length)]])]})}}}),ySe=pe({compatConfig:{MODE:3},slots:Object,inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status","marginBottom","onErrorVisibleChanged"],setup(e,t){let{slots:n}=t;const o=WO(),{wrapperCol:r}=o,i=S({},o);return delete i.labelCol,delete i.wrapperCol,OF(i),eSe({prefixCls:M(()=>e.prefixCls),status:M(()=>e.status)}),()=>{var a,l,s;const{prefixCls:c,wrapperCol:u,marginBottom:d,onErrorVisibleChanged:f,help:h=(a=n.help)===null||a===void 0?void 0:a.call(n),errors:m=_n((l=n.errors)===null||l===void 0?void 0:l.call(n)),extra:v=(s=n.extra)===null||s===void 0?void 0:s.call(n)}=e,y=`${c}-item`,b=u||(r==null?void 0:r.value)||{},$=me(`${y}-control`,b.class);return g(By,V(V({},b),{},{class:$}),{default:()=>{var x;return g(Je,null,[g("div",{class:`${y}-control-input`},[g("div",{class:`${y}-control-input-content`},[(x=n.default)===null||x===void 0?void 0:x.call(n)])]),d!==null||m.length?g("div",{style:{display:"flex",flexWrap:"nowrap"}},[g(bSe,{errors:m,help:h,class:`${y}-explain-connected`,onErrorVisibleChanged:f},null),!!d&&g("div",{style:{width:0,height:`${d}px`}},null)]):null,v?g("div",{class:`${y}-extra`},[v]):null])}})}}}),SSe=ySe;function CSe(e){const t=ve(e.value.slice());let n=null;return ct(()=>{clearTimeout(n),n=setTimeout(()=>{t.value=e.value},e.value.length?0:10)}),t}Go("success","warning","error","validating","");const $Se={success:Tl,warning:El,error:Kr,validating:di};function OC(e,t,n){let o=e;const r=t;let i=0;try{for(let a=r.length;i({htmlFor:String,prefixCls:String,label:Z.any,help:Z.any,extra:Z.any,labelCol:{type:Object},wrapperCol:{type:Object},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:String,prop:{type:[String,Number,Array]},name:{type:[String,Number,Array]},rules:[Array,Object],autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:Z.oneOf(Go("","success","warning","error","validating")),validateTrigger:{type:[String,Array]},messageVariables:{type:Object},hidden:Boolean,noStyle:Boolean,tooltip:String});let wSe=0;const _Se="form_item",TF=pe({compatConfig:{MODE:3},name:"AFormItem",inheritAttrs:!1,__ANT_NEW_FORM_ITEM:!0,props:xSe(),slots:Object,setup(e,t){let{slots:n,attrs:o,expose:r}=t;e.prop;const i=`form-item-${++wSe}`,{prefixCls:a}=Ve("form",e),[l,s]=UO(a),c=ve(),u=WO(),d=M(()=>e.name||e.prop),f=ve([]),h=ve(!1),m=ve(),v=M(()=>{const J=d.value;return Wx(J)}),y=M(()=>{if(v.value.length){const J=u.name.value,te=v.value.join("_");return J?`${J}_${te}`:`${_Se}_${te}`}else return}),b=()=>{const J=u.model.value;if(!(!J||!d.value))return OC(J,v.value,!0).v},$=M(()=>b()),x=ve(fm($.value)),_=M(()=>{let J=e.validateTrigger!==void 0?e.validateTrigger:u.validateTrigger.value;return J=J===void 0?"change":J,ys(J)}),w=M(()=>{let J=u.rules.value;const te=e.rules,ee=e.required!==void 0?{required:!!e.required,trigger:_.value}:[],fe=OC(J,v.value);J=J?fe.o[fe.k]||fe.v:[];const ie=[].concat(te||J||[]);return Sfe(ie,X=>X.required)?ie:ie.concat(ee)}),I=M(()=>{const J=w.value;let te=!1;return J&&J.length&&J.every(ee=>ee.required?(te=!0,!1):!0),te||e.required}),O=ve();ct(()=>{O.value=e.validateStatus});const P=M(()=>{let J={};return typeof e.label=="string"?J.label=e.label:e.name&&(J.label=String(e.name)),e.messageVariables&&(J=S(S({},J),e.messageVariables)),J}),E=J=>{if(v.value.length===0)return;const{validateFirst:te=!1}=e,{triggerName:ee}=J||{};let fe=w.value;if(ee&&(fe=fe.filter(X=>{const{trigger:ue}=X;return!ue&&!_.value.length?!0:ys(ue||_.value).includes(ee)})),!fe.length)return Promise.resolve();const ie=wF(v.value,$.value,fe,S({validateMessages:u.validateMessages.value},J),te,P.value);return O.value="validating",f.value=[],ie.catch(X=>X).then(function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(O.value==="validating"){const ue=X.filter(ye=>ye&&ye.errors.length);O.value=ue.length?"error":"success",f.value=ue.map(ye=>ye.errors),u.onValidate(d.value,!f.value.length,f.value.length?$t(f.value[0]):null)}}),ie},R=()=>{E({triggerName:"blur"})},A=()=>{if(h.value){h.value=!1;return}E({triggerName:"change"})},N=()=>{O.value=e.validateStatus,h.value=!1,f.value=[]},F=()=>{var J;O.value=e.validateStatus,h.value=!0,f.value=[];const te=u.model.value||{},ee=$.value,fe=OC(te,v.value,!0);Array.isArray(ee)?fe.o[fe.k]=[].concat((J=x.value)!==null&&J!==void 0?J:[]):fe.o[fe.k]=x.value,wt(()=>{h.value=!1})},W=M(()=>e.htmlFor===void 0?y.value:e.htmlFor),D=()=>{const J=W.value;if(!J||!m.value)return;const te=m.value.$el.querySelector(`[id="${J}"]`);te&&te.focus&&te.focus()};r({onFieldBlur:R,onFieldChange:A,clearValidate:N,resetField:F}),Pce({id:y,onFieldBlur:()=>{e.autoLink&&R()},onFieldChange:()=>{e.autoLink&&A()},clearValidate:N},M(()=>!!(e.autoLink&&u.model.value&&d.value)));let B=!1;Ie(d,J=>{J?B||(B=!0,u.addField(i,{fieldValue:$,fieldId:y,fieldName:d,resetField:F,clearValidate:N,namePath:v,validateRules:E,rules:w})):(B=!1,u.removeField(i))},{immediate:!0}),Ct(()=>{u.removeField(i)});const k=CSe(f),L=M(()=>e.validateStatus!==void 0?e.validateStatus:k.value.length?"error":O.value),z=M(()=>({[`${a.value}-item`]:!0,[s.value]:!0,[`${a.value}-item-has-feedback`]:L.value&&e.hasFeedback,[`${a.value}-item-has-success`]:L.value==="success",[`${a.value}-item-has-warning`]:L.value==="warning",[`${a.value}-item-has-error`]:L.value==="error",[`${a.value}-item-is-validating`]:L.value==="validating",[`${a.value}-item-hidden`]:e.hidden})),K=St({});To.useProvide(K),ct(()=>{let J;if(e.hasFeedback){const te=L.value&&$Se[L.value];J=te?g("span",{class:me(`${a.value}-item-feedback-icon`,`${a.value}-item-feedback-icon-${L.value}`)},[g(te,null,null)]):null}S(K,{status:L.value,hasFeedback:e.hasFeedback,feedbackIcon:J,isFormItemInput:!0})});const G=ve(null),Y=ve(!1),ne=()=>{if(c.value){const J=getComputedStyle(c.value);G.value=parseInt(J.marginBottom,10)}};lt(()=>{Ie(Y,()=>{Y.value&&ne()},{flush:"post",immediate:!0})});const re=J=>{J||(G.value=null)};return()=>{var J,te;if(e.noStyle)return(J=n.default)===null||J===void 0?void 0:J.call(n);const ee=(te=e.help)!==null&&te!==void 0?te:n.help?_n(n.help()):null,fe=!!(ee!=null&&Array.isArray(ee)&&ee.length||k.value.length);return Y.value=fe,l(g("div",{class:[z.value,fe?`${a.value}-item-with-help`:"",o.class],ref:c},[g(jO,V(V({},o),{},{class:`${a.value}-row`,key:"row"}),{default:()=>{var ie,X;return g(Je,null,[g(sSe,V(V({},e),{},{htmlFor:W.value,required:I.value,requiredMark:u.requiredMark.value,prefixCls:a.value,onClick:D,label:e.label}),{label:n.label,tooltip:n.tooltip}),g(SSe,V(V({},e),{},{errors:ee!=null?ys(ee):k.value,marginBottom:G.value,prefixCls:a.value,status:L.value,ref:m,help:ee,extra:(ie=e.extra)!==null&&ie!==void 0?ie:(X=n.extra)===null||X===void 0?void 0:X.call(n),onErrorVisibleChanged:re}),{default:n.default})])}}),!!G.value&&g("div",{class:`${a.value}-margin-offset`,style:{marginBottom:`-${G.value}px`}},null)]))}}});function EF(e){let t=!1,n=e.length;const o=[];return e.length?new Promise((r,i)=>{e.forEach((a,l)=>{a.catch(s=>(t=!0,s)).then(s=>{n-=1,o[l]=s,!(n>0)&&(t&&i(o),r(o))})})}):Promise.resolve([])}function S6(e){let t=!1;return e&&e.length&&e.every(n=>n.required?(t=!0,!1):!0),t}function C6(e){return e==null?[]:Array.isArray(e)?e:[e]}function IC(e,t,n){let o=e;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");const r=t.split(".");let i=0;for(let a=r.length;i1&&arguments[1]!==void 0?arguments[1]:he({}),n=arguments.length>2?arguments[2]:void 0;const o=fm(It(e)),r=St({}),i=ve([]),a=x=>{S(It(e),S(S({},fm(o)),x)),wt(()=>{Object.keys(r).forEach(_=>{r[_]={autoLink:!1,required:S6(It(t)[_])}})})},l=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=arguments.length>1?arguments[1]:void 0;return _.length?x.filter(w=>{const I=C6(w.trigger||"change");return _fe(I,_).length}):x};let s=null;const c=function(x){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=arguments.length>2?arguments[2]:void 0;const I=[],O={};for(let R=0;R({name:A,errors:[],warnings:[]})).catch(W=>{const D=[],B=[];return W.forEach(k=>{let{rule:{warningOnly:L},errors:z}=k;L?B.push(...z):D.push(...z)}),D.length?Promise.reject({name:A,errors:D,warnings:B}):{name:A,errors:D,warnings:B}}))}const P=EF(I);s=P;const E=P.then(()=>s===P?Promise.resolve(O):Promise.reject([])).catch(R=>{const A=R.filter(N=>N&&N.errors.length);return Promise.reject({values:O,errorFields:A,outOfDate:s!==P})});return E.catch(R=>R),E},u=function(x,_,w){let I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const O=wF([x],_,w,S({validateMessages:Ny},I),!!I.validateFirst);return r[x]?(r[x].validateStatus="validating",O.catch(P=>P).then(function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var E;if(r[x].validateStatus==="validating"){const R=P.filter(A=>A&&A.errors.length);r[x].validateStatus=R.length?"error":"success",r[x].help=R.length?R.map(A=>A.errors):null,(E=n==null?void 0:n.onValidate)===null||E===void 0||E.call(n,x,!R.length,R.length?$t(r[x].help[0]):null)}}),O):O.catch(P=>P)},d=(x,_)=>{let w=[],I=!0;x?Array.isArray(x)?w=x:w=[x]:(I=!1,w=i.value);const O=c(w,_||{},I);return O.catch(P=>P),O},f=x=>{let _=[];x?Array.isArray(x)?_=x:_=[x]:_=i.value,_.forEach(w=>{r[w]&&S(r[w],{validateStatus:"",help:null})})},h=x=>{const _={autoLink:!1},w=[],I=Array.isArray(x)?x:[x];for(let O=0;O{const _=[];i.value.forEach(w=>{const I=IC(x,w,!1),O=IC(m,w,!1);(v&&(n==null?void 0:n.immediate)&&I.isValid||!e_(I.v,O.v))&&_.push(w)}),d(_,{trigger:"change"}),v=!1,m=fm($t(x))},b=n==null?void 0:n.debounce;let $=!0;return Ie(t,()=>{i.value=t?Object.keys(It(t)):[],!$&&n&&n.validateOnRuleChange&&d(),$=!1},{deep:!0,immediate:!0}),Ie(i,()=>{const x={};i.value.forEach(_=>{x[_]=S({},r[_],{autoLink:!1,required:S6(It(t)[_])}),delete r[_]});for(const _ in r)Object.prototype.hasOwnProperty.call(r,_)&&delete r[_];S(r,x)},{immediate:!0}),Ie(e,b&&b.wait?T_(y,b.wait,Ffe(b,["wait"])):y,{immediate:n&&!!n.immediate,deep:!0}),{modelRef:e,rulesRef:t,initialModel:o,validateInfos:r,resetFields:a,validate:d,validateField:u,mergeValidateInfo:h,clearValidate:f}}const ISe=()=>({layout:Z.oneOf(Go("horizontal","inline","vertical")),labelCol:qe(),wrapperCol:qe(),colon:De(),labelAlign:Qe(),labelWrap:De(),prefixCls:String,requiredMark:rt([String,Boolean]),hideRequiredMark:De(),model:Z.object,rules:qe(),validateMessages:qe(),validateOnRuleChange:De(),scrollToFirstError:cn(),onSubmit:Oe(),name:String,validateTrigger:rt([String,Array]),size:Qe(),disabled:De(),onValuesChange:Oe(),onFieldsChange:Oe(),onFinish:Oe(),onFinishFailed:Oe(),onValidate:Oe()});function PSe(e,t){return e_(ys(e),ys(t))}const TSe=pe({compatConfig:{MODE:3},name:"AForm",inheritAttrs:!1,props:bt(ISe(),{layout:"horizontal",hideRequiredMark:!1,colon:!0}),Item:TF,useForm:OSe,setup(e,t){let{emit:n,slots:o,expose:r,attrs:i}=t;const{prefixCls:a,direction:l,form:s,size:c,disabled:u}=Ve("form",e),d=M(()=>e.requiredMark===""||e.requiredMark),f=M(()=>{var k;return d.value!==void 0?d.value:s&&((k=s.value)===null||k===void 0?void 0:k.requiredMark)!==void 0?s.value.requiredMark:!e.hideRequiredMark});M7(c),XN(u);const h=M(()=>{var k,L;return(k=e.colon)!==null&&k!==void 0?k:(L=s.value)===null||L===void 0?void 0:L.colon}),{validateMessages:m}=Xee(),v=M(()=>S(S(S({},Ny),m.value),e.validateMessages)),[y,b]=UO(a),$=M(()=>me(a.value,{[`${a.value}-${e.layout}`]:!0,[`${a.value}-hide-required-mark`]:f.value===!1,[`${a.value}-rtl`]:l.value==="rtl",[`${a.value}-${c.value}`]:c.value},b.value)),x=he(),_={},w=(k,L)=>{_[k]=L},I=k=>{delete _[k]},O=k=>{const L=!!k,z=L?ys(k).map(Wx):[];return L?Object.values(_).filter(K=>z.findIndex(G=>PSe(G,K.fieldName.value))>-1):Object.values(_)},P=k=>{if(!e.model){Sn();return}O(k).forEach(L=>{L.resetField()})},E=k=>{O(k).forEach(L=>{L.clearValidate()})},R=k=>{const{scrollToFirstError:L}=e;if(n("finishFailed",k),L&&k.errorFields.length){let z={};typeof L=="object"&&(z=L),N(k.errorFields[0].name,z)}},A=function(){return D(...arguments)},N=function(k){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const z=O(k?[k]:void 0);if(z.length){const K=z[0].fieldId.value,G=K?document.getElementById(K):null;G&&L7(G,S({scrollMode:"if-needed",block:"nearest"},L))}},F=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(k===!0){const L=[];return Object.values(_).forEach(z=>{let{namePath:K}=z;L.push(K.value)}),m6(e.model,L)}else return m6(e.model,k)},W=(k,L)=>{if(Sn(),!e.model)return Sn(),Promise.reject("Form `model` is required for validateFields to work.");const z=!!k,K=z?ys(k).map(Wx):[],G=[];Object.values(_).forEach(re=>{var J;if(z||K.push(re.namePath.value),!(!((J=re.rules)===null||J===void 0)&&J.value.length))return;const te=re.namePath.value;if(!z||G1e(K,te)){const ee=re.validateRules(S({validateMessages:v.value},L));G.push(ee.then(()=>({name:te,errors:[],warnings:[]})).catch(fe=>{const ie=[],X=[];return fe.forEach(ue=>{let{rule:{warningOnly:ye},errors:H}=ue;ye?X.push(...H):ie.push(...H)}),ie.length?Promise.reject({name:te,errors:ie,warnings:X}):{name:te,errors:ie,warnings:X}}))}});const Y=EF(G);x.value=Y;const ne=Y.then(()=>x.value===Y?Promise.resolve(F(K)):Promise.reject([])).catch(re=>{const J=re.filter(te=>te&&te.errors.length);return Promise.reject({values:F(K),errorFields:J,outOfDate:x.value!==Y})});return ne.catch(re=>re),ne},D=function(){return W(...arguments)},B=k=>{k.preventDefault(),k.stopPropagation(),n("submit",k),e.model&&W().then(z=>{n("finish",z)}).catch(z=>{R(z)})};return r({resetFields:P,clearValidate:E,validateFields:W,getFieldsValue:F,validate:A,scrollToField:N}),OF({model:M(()=>e.model),name:M(()=>e.name),labelAlign:M(()=>e.labelAlign),labelCol:M(()=>e.labelCol),labelWrap:M(()=>e.labelWrap),wrapperCol:M(()=>e.wrapperCol),vertical:M(()=>e.layout==="vertical"),colon:h,requiredMark:f,validateTrigger:M(()=>e.validateTrigger),rules:M(()=>e.rules),addField:w,removeField:I,onValidate:(k,L,z)=>{n("validate",k,L,z)},validateMessages:v}),Ie(()=>e.rules,()=>{e.validateOnRuleChange&&W()}),()=>{var k;return y(g("form",V(V({},i),{},{onSubmit:B,class:[$.value,i.class]}),[(k=o.default)===null||k===void 0?void 0:k.call(o)]))}}}),us=TSe;us.useInjectFormItemContext=co;us.ItemRest=y0;us.install=function(e){return e.component(us.name,us),e.component(us.Item.name,us.Item),e.component(y0.name,y0),e};const ESe=new Pt("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ASe=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:S(S({},vt(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:S(S({},vt(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:S(S({},vt(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:S({},yl(e))},[`${t}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[t]:{"&-indeterminate":{[`${t}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${t}:after`]:{visibility:"visible"},[` + ${n}:not(${n}-disabled), + ${t}:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:e.borderRadiusSM,visibility:"hidden",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:ESe,animationDuration:e.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${e.motionDurationSlow}`}},[` + ${n}-checked:not(${n}-disabled), + ${t}-checked:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}:after`]:{borderColor:e.colorPrimaryHover}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function Fy(e,t){const n=nt(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[ASe(n)]}const AF=pt("Checkbox",(e,t)=>{let{prefixCls:n}=t;return[Fy(n,e)]}),MSe=e=>{const{prefixCls:t,componentCls:n,antCls:o}=e,r=`${n}-menu-item`,i=` + &${r}-expand ${r}-expand-icon, + ${r}-loading-icon + `,a=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return[{[n]:{width:e.controlWidth}},{[`${n}-dropdown`]:[Fy(`${t}-checkbox`,e),{[`&${o}-select-dropdown`]:{padding:0}},{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:"100%",height:"auto",[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.paddingXXS,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},"&-item":S(S({},eo),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:`${a}px ${e.paddingSM}px`,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{fontWeight:e.fontWeightStrong,backgroundColor:e.controlItemBgActive}},"&-content":{flex:"auto"},[i]:{marginInlineStart:e.paddingXXS,color:e.colorTextDescription,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}})}}}]},{[`${n}-dropdown-rtl`]:{direction:"rtl"}},uf(e)]},RSe=pt("Cascader",e=>[MSe(e)],{controlWidth:184,controlItemWidth:111,dropdownHeight:180});var DSe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rs===0?[l]:[...a,t,l],[]),r=[];let i=0;return o.forEach((a,l)=>{const s=i+a.length;let c=e.slice(i,s);i=s,l%2===1&&(c=g("span",{class:`${n}-menu-item-keyword`,key:"seperator"},[c])),r.push(c)}),r}const NSe=e=>{let{inputValue:t,path:n,prefixCls:o,fieldNames:r}=e;const i=[],a=t.toLowerCase();return n.forEach((l,s)=>{s!==0&&i.push(" / ");let c=l[r.label];const u=typeof c;(u==="string"||u==="number")&&(c=LSe(String(c),a,o)),i.push(c)}),i};function kSe(){return S(S({},_t(gF(),["customSlots","checkable","options"])),{multiple:{type:Boolean,default:void 0},size:String,bordered:{type:Boolean,default:void 0},placement:{type:String},suffixIcon:Z.any,status:String,options:Array,popupClassName:String,dropdownClassName:String,"onUpdate:value":Function})}const BSe=pe({compatConfig:{MODE:3},name:"ACascader",inheritAttrs:!1,props:bt(kSe(),{bordered:!0,choiceTransitionName:"",allowClear:!0}),setup(e,t){let{attrs:n,expose:o,slots:r,emit:i}=t;const a=co(),l=To.useInject(),s=M(()=>da(l.status,e.status)),{prefixCls:c,rootPrefixCls:u,getPrefixCls:d,direction:f,getPopupContainer:h,renderEmpty:m,size:v,disabled:y}=Ve("cascader",e),b=M(()=>d("select",e.prefixCls)),{compactSize:$,compactItemClassnames:x}=Ms(b,f),_=M(()=>$.value||v.value),w=jr(),I=M(()=>{var L;return(L=y.value)!==null&&L!==void 0?L:w.value}),[O,P]=M_(b),[E]=RSe(c),R=M(()=>f.value==="rtl"),A=M(()=>{if(!e.showSearch)return e.showSearch;let L={render:NSe};return typeof e.showSearch=="object"&&(L=S(S({},L),e.showSearch)),L}),N=M(()=>me(e.popupClassName||e.dropdownClassName,`${c.value}-dropdown`,{[`${c.value}-dropdown-rtl`]:R.value},P.value)),F=he();o({focus(){var L;(L=F.value)===null||L===void 0||L.focus()},blur(){var L;(L=F.value)===null||L===void 0||L.blur()}});const W=function(){for(var L=arguments.length,z=new Array(L),K=0;Ke.showArrow!==void 0?e.showArrow:e.loading||!e.multiple),k=M(()=>e.placement!==void 0?e.placement:f.value==="rtl"?"bottomRight":"bottomLeft");return()=>{var L,z;const{notFoundContent:K=(L=r.notFoundContent)===null||L===void 0?void 0:L.call(r),expandIcon:G=(z=r.expandIcon)===null||z===void 0?void 0:z.call(r),multiple:Y,bordered:ne,allowClear:re,choiceTransitionName:J,transitionName:te,id:ee=a.id.value}=e,fe=DSe(e,["notFoundContent","expandIcon","multiple","bordered","allowClear","choiceTransitionName","transitionName","id"]),ie=K||m("Cascader");let X=G;G||(X=R.value?g(xs,null,null):g(sa,null,null));const ue=g("span",{class:`${b.value}-menu-item-loading-icon`},[g(di,{spin:!0},null)]),{suffixIcon:ye,removeIcon:H,clearIcon:j}=y_(S(S({},e),{hasFeedback:l.hasFeedback,feedbackIcon:l.feedbackIcon,multiple:Y,prefixCls:b.value,showArrow:B.value}),r);return E(O(g(qye,V(V(V({},fe),n),{},{id:ee,prefixCls:b.value,class:[c.value,{[`${b.value}-lg`]:_.value==="large",[`${b.value}-sm`]:_.value==="small",[`${b.value}-rtl`]:R.value,[`${b.value}-borderless`]:!ne,[`${b.value}-in-form-item`]:l.isFormItemInput},sr(b.value,s.value,l.hasFeedback),x.value,n.class,P.value],disabled:I.value,direction:f.value,placement:k.value,notFoundContent:ie,allowClear:re,showSearch:A.value,expandIcon:X,inputIcon:ye,removeIcon:H,clearIcon:j,loadingIcon:ue,checkable:!!Y,dropdownClassName:N.value,dropdownPrefixCls:c.value,choiceTransitionName:dr(u.value,"",J),transitionName:dr(u.value,t_(k.value),te),getPopupContainer:h==null?void 0:h.value,customSlots:S(S({},r),{checkable:()=>g("span",{class:`${c.value}-checkbox-inner`},null)}),tagRender:e.tagRender||r.tagRender,displayRender:e.displayRender||r.displayRender,maxTagPlaceholder:e.maxTagPlaceholder||r.maxTagPlaceholder,showArrow:l.hasFeedback||e.showArrow,onChange:W,onBlur:D,ref:F}),r)))}}}),FSe=$n(S(BSe,{SHOW_CHILD:iF,SHOW_PARENT:rF})),HSe=()=>({name:String,prefixCls:String,options:kt([]),disabled:Boolean,id:String}),zSe=()=>S(S({},HSe()),{defaultValue:kt(),value:kt(),onChange:Oe(),"onUpdate:value":Oe()}),jSe=()=>({prefixCls:String,defaultChecked:De(),checked:De(),disabled:De(),isGroup:De(),value:Z.any,name:String,id:String,indeterminate:De(),type:Qe("checkbox"),autofocus:De(),onChange:Oe(),"onUpdate:checked":Oe(),onClick:Oe(),skipGroup:De(!1)}),WSe=()=>S(S({},jSe()),{indeterminate:De(!1)}),MF=Symbol("CheckboxGroupContext");var $6=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r(m==null?void 0:m.disabled.value)||u.value);ct(()=>{!e.skipGroup&&m&&m.registerValue(v,e.value)}),Ct(()=>{m&&m.cancelValue(v)}),lt(()=>{Sn(!!(e.checked!==void 0||m||e.value===void 0))});const b=w=>{const I=w.target.checked;n("update:checked",I),n("change",w),a.onFieldChange()},$=he();return i({focus:()=>{var w;(w=$.value)===null||w===void 0||w.focus()},blur:()=>{var w;(w=$.value)===null||w===void 0||w.blur()}}),()=>{var w;const I=ln((w=r.default)===null||w===void 0?void 0:w.call(r)),{indeterminate:O,skipGroup:P,id:E=a.id.value}=e,R=$6(e,["indeterminate","skipGroup","id"]),{onMouseenter:A,onMouseleave:N,onInput:F,class:W,style:D}=o,B=$6(o,["onMouseenter","onMouseleave","onInput","class","style"]),k=S(S(S(S({},R),{id:E,prefixCls:s.value}),B),{disabled:y.value});m&&!P?(k.onChange=function(){for(var G=arguments.length,Y=new Array(G),ne=0;ne`${l.value}-group`),[u,d]=AF(c),f=he((e.value===void 0?e.defaultValue:e.value)||[]);Ie(()=>e.value,()=>{f.value=e.value||[]});const h=M(()=>e.options.map(_=>typeof _=="string"||typeof _=="number"?{label:_,value:_}:_)),m=he(Symbol()),v=he(new Map),y=_=>{v.value.delete(_),m.value=Symbol()},b=(_,w)=>{v.value.set(_,w),m.value=Symbol()},$=he(new Map);return Ie(m,()=>{const _=new Map;for(const w of v.value.values())_.set(w,!0);$.value=_}),ft(MF,{cancelValue:y,registerValue:b,toggleOption:_=>{const w=f.value.indexOf(_.value),I=[...f.value];w===-1?I.push(_.value):I.splice(w,1),e.value===void 0&&(f.value=I);const O=I.filter(P=>$.value.has(P)).sort((P,E)=>{const R=h.value.findIndex(N=>N.value===P),A=h.value.findIndex(N=>N.value===E);return R-A});r("update:value",O),r("change",O),a.onFieldChange()},mergedValue:f,name:M(()=>e.name),disabled:M(()=>e.disabled)}),i({mergedValue:f}),()=>{var _;const{id:w=a.id.value}=e;let I=null;return h.value&&h.value.length>0&&(I=h.value.map(O=>{var P;return g(Ri,{prefixCls:l.value,key:O.value.toString(),disabled:"disabled"in O?O.disabled:e.disabled,indeterminate:O.indeterminate,value:O.value,checked:f.value.indexOf(O.value)!==-1,onChange:O.onChange,class:`${c.value}-item`},{default:()=>[n.label!==void 0?(P=n.label)===null||P===void 0?void 0:P.call(n,O):O.label]})})),u(g("div",V(V({},o),{},{class:[c.value,{[`${c.value}-rtl`]:s.value==="rtl"},o.class,d.value],id:w}),[I||((_=n.default)===null||_===void 0?void 0:_.call(n))]))}}});Ri.Group=H0;Ri.install=function(e){return e.component(Ri.name,Ri),e.component(H0.name,H0),e};const VSe={useBreakpoint:ff},KSe=$n(By),USe=e=>{const{componentCls:t,commentBg:n,commentPaddingBase:o,commentNestIndent:r,commentFontSizeBase:i,commentFontSizeSm:a,commentAuthorNameColor:l,commentAuthorTimeColor:s,commentActionColor:c,commentActionHoverColor:u,commentActionsMarginBottom:d,commentActionsMarginTop:f,commentContentDetailPMarginBottom:h}=e;return{[t]:{position:"relative",backgroundColor:n,[`${t}-inner`]:{display:"flex",padding:o},[`${t}-avatar`]:{position:"relative",flexShrink:0,marginRight:e.marginSM,cursor:"pointer",img:{width:"32px",height:"32px",borderRadius:"50%"}},[`${t}-content`]:{position:"relative",flex:"1 1 auto",minWidth:"1px",fontSize:i,wordWrap:"break-word","&-author":{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginBottom:e.marginXXS,fontSize:i,"& > a,& > span":{paddingRight:e.paddingXS,fontSize:a,lineHeight:"18px"},"&-name":{color:l,fontSize:i,transition:`color ${e.motionDurationSlow}`,"> *":{color:l,"&:hover":{color:l}}},"&-time":{color:s,whiteSpace:"nowrap",cursor:"auto"}},"&-detail p":{marginBottom:h,whiteSpace:"pre-wrap"}},[`${t}-actions`]:{marginTop:f,marginBottom:d,paddingLeft:0,"> li":{display:"inline-block",color:c,"> span":{marginRight:"10px",color:c,fontSize:a,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,userSelect:"none","&:hover":{color:u}}}},[`${t}-nested`]:{marginLeft:r},"&-rtl":{direction:"rtl"}}}},GSe=pt("Comment",e=>{const t=nt(e,{commentBg:"inherit",commentPaddingBase:`${e.paddingMD}px 0`,commentNestIndent:"44px",commentFontSizeBase:e.fontSize,commentFontSizeSm:e.fontSizeSM,commentAuthorNameColor:e.colorTextTertiary,commentAuthorTimeColor:e.colorTextPlaceholder,commentActionColor:e.colorTextTertiary,commentActionHoverColor:e.colorTextSecondary,commentActionsMarginBottom:"inherit",commentActionsMarginTop:e.marginSM,commentContentDetailPMarginBottom:"inherit"});return[USe(t)]}),YSe=()=>({actions:Array,author:Z.any,avatar:Z.any,content:Z.any,prefixCls:String,datetime:Z.any}),XSe=pe({compatConfig:{MODE:3},name:"AComment",inheritAttrs:!1,props:YSe(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("comment",e),[a,l]=GSe(r),s=(u,d)=>g("div",{class:`${u}-nested`},[d]),c=u=>!u||!u.length?null:u.map((f,h)=>g("li",{key:`action-${h}`},[f]));return()=>{var u,d,f,h,m,v,y,b,$,x,_;const w=r.value,I=(u=e.actions)!==null&&u!==void 0?u:(d=n.actions)===null||d===void 0?void 0:d.call(n),O=(f=e.author)!==null&&f!==void 0?f:(h=n.author)===null||h===void 0?void 0:h.call(n),P=(m=e.avatar)!==null&&m!==void 0?m:(v=n.avatar)===null||v===void 0?void 0:v.call(n),E=(y=e.content)!==null&&y!==void 0?y:(b=n.content)===null||b===void 0?void 0:b.call(n),R=($=e.datetime)!==null&&$!==void 0?$:(x=n.datetime)===null||x===void 0?void 0:x.call(n),A=g("div",{class:`${w}-avatar`},[typeof P=="string"?g("img",{src:P,alt:"comment-avatar"},null):P]),N=I?g("ul",{class:`${w}-actions`},[c(Array.isArray(I)?I:[I])]):null,F=g("div",{class:`${w}-content-author`},[O&&g("span",{class:`${w}-content-author-name`},[O]),R&&g("span",{class:`${w}-content-author-time`},[R])]),W=g("div",{class:`${w}-content`},[F,g("div",{class:`${w}-content-detail`},[E]),N]),D=g("div",{class:`${w}-inner`},[A,W]),B=ln((_=n.default)===null||_===void 0?void 0:_.call(n));return a(g("div",V(V({},o),{},{class:[w,{[`${w}-rtl`]:i.value==="rtl"},o.class,l.value]}),[D,B&&B.length?s(w,B):null]))}}}),qSe=$n(XSe);let Cm=S({},cr.Modal);function ZSe(e){e?Cm=S(S({},Cm),e):Cm=S({},cr.Modal)}function QSe(){return Cm}const Kx="internalMark",$m=pe({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(e,t){let{slots:n}=t;Sn(e.ANT_MARK__===Kx);const o=St({antLocale:S(S({},e.locale),{exist:!0}),ANT_MARK__:Kx});return ft("localeData",o),Ie(()=>e.locale,r=>{ZSe(r&&r.Modal),o.antLocale=S(S({},r),{exist:!0})},{immediate:!0}),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});$m.install=function(e){return e.component($m.name,$m),e};const RF=$n($m),DF=pe({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(e,t){let{attrs:n,slots:o}=t,r,i=!1;const a=M(()=>e.duration===void 0?4.5:e.duration),l=()=>{a.value&&!i&&(r=setTimeout(()=>{c()},a.value*1e3))},s=()=>{r&&(clearTimeout(r),r=null)},c=d=>{d&&d.stopPropagation(),s();const{onClose:f,noticeKey:h}=e;f&&f(h)},u=()=>{s(),l()};return lt(()=>{l()}),Fo(()=>{i=!0,s()}),Ie([a,()=>e.updateMark,()=>e.visible],(d,f)=>{let[h,m,v]=d,[y,b,$]=f;(h!==y||m!==b||v!==$&&$)&&u()},{flush:"post"}),()=>{var d,f;const{prefixCls:h,closable:m,closeIcon:v=(d=o.closeIcon)===null||d===void 0?void 0:d.call(o),onClick:y,holder:b}=e,{class:$,style:x}=n,_=`${h}-notice`,w=Object.keys(n).reduce((O,P)=>((P.startsWith("data-")||P.startsWith("aria-")||P==="role")&&(O[P]=n[P]),O),{}),I=g("div",V({class:me(_,$,{[`${_}-closable`]:m}),style:x,onMouseenter:s,onMouseleave:l,onClick:y},w),[g("div",{class:`${_}-content`},[(f=o.default)===null||f===void 0?void 0:f.call(o)]),m?g("a",{tabindex:0,onClick:c,class:`${_}-close`},[v||g("span",{class:`${_}-close-x`},null)]):null]);return b?g(Ab,{to:b},{default:()=>I}):I}}});var JSe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{prefixCls:u,animation:d="fade"}=e;let f=e.transitionName;return!f&&d&&(f=`${u}-${d}`),ny(f)}),s=(u,d)=>{const f=u.key||w6(),h=S(S({},u),{key:f}),{maxCount:m}=e,v=a.value.map(b=>b.notice.key).indexOf(f),y=a.value.concat();v!==-1?y.splice(v,1,{notice:h,holderCallback:d}):(m&&a.value.length>=m&&(h.key=y[0].notice.key,h.updateMark=w6(),h.userPassKey=f,y.shift()),y.push({notice:h,holderCallback:d})),a.value=y},c=u=>{a.value=a.value.filter(d=>{let{notice:{key:f,userPassKey:h}}=d;return(h||f)!==u})};return o({add:s,remove:c,notices:a}),()=>{var u;const{prefixCls:d,closeIcon:f=(u=r.closeIcon)===null||u===void 0?void 0:u.call(r,{prefixCls:d})}=e,h=a.value.map((v,y)=>{let{notice:b,holderCallback:$}=v;const x=y===a.value.length-1?b.updateMark:void 0,{key:_,userPassKey:w}=b,{content:I}=b,O=S(S(S({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},b),b.props),{key:_,noticeKey:w||_,updateMark:x,onClose:P=>{var E;c(P),(E=b.onClose)===null||E===void 0||E.call(b)},onClick:b.onClick});return $?g("div",{key:_,class:`${d}-hook-holder`,ref:P=>{typeof _>"u"||(P?(i.set(_,P),$(P,O)):i.delete(_))}},null):g(DF,V(V({},O),{},{class:me(O.class,e.hashId)}),{default:()=>[typeof I=="function"?I({prefixCls:d}):I]})}),m={[d]:1,[n.class]:!!n.class,[e.hashId]:!0};return g("div",{class:m,style:n.style||{top:"65px",left:"50%"}},[g(Lb,V({tag:"div"},l.value),{default:()=>[h]})])}}});Ux.newInstance=function(t,n){const o=t||{},{name:r="notification",getContainer:i,appContext:a,prefixCls:l,rootPrefixCls:s,transitionName:c,hasTransitionName:u,useStyle:d}=o,f=JSe(o,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),h=document.createElement("div");i?i().appendChild(h):document.body.appendChild(h);const v=g(pe({compatConfig:{MODE:3},name:"NotificationWrapper",setup(y,b){let{attrs:$}=b;const x=ve(),_=M(()=>jo.getPrefixCls(r,l)),[,w]=d(_);return lt(()=>{n({notice(I){var O;(O=x.value)===null||O===void 0||O.add(I)},removeNotice(I){var O;(O=x.value)===null||O===void 0||O.remove(I)},destroy(){Ec(null,h),h.parentNode&&h.parentNode.removeChild(h)},component:x})}),()=>{const I=jo,O=I.getRootPrefixCls(s,_.value),P=u?c:`${_.value}-${c}`;return g(qO,V(V({},I),{},{prefixCls:O}),{default:()=>[g(Ux,V(V({ref:x},$),{},{prefixCls:_.value,transitionName:P,hashId:w.value}),null)]})}}}),f);v.appContext=a||v.appContext,Ec(v,h)};const LF=Ux;let _6=0;const tCe=Date.now();function O6(){const e=_6;return _6+=1,`rcNotification_${tCe}_${e}`}const nCe=pe({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(e,t){let{attrs:n,slots:o}=t;const r=new Map,i=M(()=>e.notices),a=M(()=>{let u=e.transitionName;if(!u&&e.animation)switch(typeof e.animation){case"string":u=e.animation;break;case"function":u=e.animation().name;break;case"object":u=e.animation.name;break;default:u=`${e.prefixCls}-fade`;break}return ny(u)}),l=u=>e.remove(u),s=he({});Ie(i,()=>{const u={};Object.keys(s.value).forEach(d=>{u[d]=[]}),e.notices.forEach(d=>{const{placement:f="topRight"}=d.notice;f&&(u[f]=u[f]||[],u[f].push(d))}),s.value=u});const c=M(()=>Object.keys(s.value));return()=>{var u;const{prefixCls:d,closeIcon:f=(u=o.closeIcon)===null||u===void 0?void 0:u.call(o,{prefixCls:d})}=e,h=c.value.map(m=>{var v,y;const b=s.value[m],$=(v=e.getClassName)===null||v===void 0?void 0:v.call(e,m),x=(y=e.getStyles)===null||y===void 0?void 0:y.call(e,m),_=b.map((O,P)=>{let{notice:E,holderCallback:R}=O;const A=P===i.value.length-1?E.updateMark:void 0,{key:N,userPassKey:F}=E,{content:W}=E,D=S(S(S({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},E),E.props),{key:N,noticeKey:F||N,updateMark:A,onClose:B=>{var k;l(B),(k=E.onClose)===null||k===void 0||k.call(E)},onClick:E.onClick});return R?g("div",{key:N,class:`${d}-hook-holder`,ref:B=>{typeof N>"u"||(B?(r.set(N,B),R(B,D)):r.delete(N))}},null):g(DF,V(V({},D),{},{class:me(D.class,e.hashId)}),{default:()=>[typeof W=="function"?W({prefixCls:d}):W]})}),w={[d]:1,[`${d}-${m}`]:1,[n.class]:!!n.class,[e.hashId]:!0,[$]:!!$};function I(){var O;b.length>0||(Reflect.deleteProperty(s.value,m),(O=e.onAllRemoved)===null||O===void 0||O.call(e))}return g("div",{key:m,class:w,style:n.style||x||{top:"65px",left:"50%"}},[g(Lb,V(V({tag:"div"},a.value),{},{onAfterLeave:I}),{default:()=>[_]})])});return g(mk,{getContainer:e.getContainer},{default:()=>[h]})}}}),oCe=nCe;var rCe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rdocument.body;let I6=0;function aCe(){const e={};for(var t=arguments.length,n=new Array(t),o=0;o{r&&Object.keys(r).forEach(i=>{const a=r[i];a!==void 0&&(e[i]=a)})}),e}function NF(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:t=iCe,motion:n,prefixCls:o,maxCount:r,getClassName:i,getStyles:a,onAllRemoved:l}=e,s=rCe(e,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),c=ve([]),u=ve(),d=(b,$)=>{const x=b.key||O6(),_=S(S({},b),{key:x}),w=c.value.map(O=>O.notice.key).indexOf(x),I=c.value.concat();w!==-1?I.splice(w,1,{notice:_,holderCallback:$}):(r&&c.value.length>=r&&(_.key=I[0].notice.key,_.updateMark=O6(),_.userPassKey=x,I.shift()),I.push({notice:_,holderCallback:$})),c.value=I},f=b=>{c.value=c.value.filter($=>{let{notice:{key:x,userPassKey:_}}=$;return(_||x)!==b})},h=()=>{c.value=[]},m=()=>g(oCe,{ref:u,prefixCls:o,maxCount:r,notices:c.value,remove:f,getClassName:i,getStyles:a,animation:n,hashId:e.hashId,onAllRemoved:l,getContainer:t},null),v=ve([]),y={open:b=>{const $=aCe(s,b);($.key===null||$.key===void 0)&&($.key=`vc-notification-${I6}`,I6+=1),v.value=[...v.value,{type:"open",config:$}]},close:b=>{v.value=[...v.value,{type:"close",key:b}]},destroy:()=>{v.value=[...v.value,{type:"destroy"}]}};return Ie(v,()=>{v.value.length&&(v.value.forEach(b=>{switch(b.type){case"open":d(b.config);break;case"close":f(b.key);break;case"destroy":h();break}}),v.value=[])}),[y,m]}const lCe=e=>{const{componentCls:t,iconCls:n,boxShadowSecondary:o,colorBgElevated:r,colorSuccess:i,colorError:a,colorWarning:l,colorInfo:s,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:f,paddingXS:h,borderRadiusLG:m,zIndexPopup:v,messageNoticeContentPadding:y}=e,b=new Pt("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:h,transform:"translateY(0)",opacity:1}}),$=new Pt("MessageMoveOut",{"0%":{maxHeight:e.height,padding:h,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[t]:S(S({},vt(e)),{position:"fixed",top:f,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:v,[`${t}-move-up`]:{animationFillMode:"forwards"},[` + ${t}-move-up-appear, + ${t}-move-up-enter + `]:{animationName:b,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[` + ${t}-move-up-appear${t}-move-up-appear-active, + ${t}-move-up-enter${t}-move-up-enter-active + `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:$,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[`${t}-notice`]:{padding:h,textAlign:"center",[n]:{verticalAlign:"text-bottom",marginInlineEnd:f,fontSize:c},[`${t}-notice-content`]:{display:"inline-block",padding:y,background:r,borderRadius:m,boxShadow:o,pointerEvents:"all"},[`${t}-success ${n}`]:{color:i},[`${t}-error ${n}`]:{color:a},[`${t}-warning ${n}`]:{color:l},[` + ${t}-info ${n}, + ${t}-loading ${n}`]:{color:s}}},{[`${t}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},kF=pt("Message",e=>{const t=nt(e,{messageNoticeContentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`});return[lCe(t)]},e=>({height:150,zIndexPopup:e.zIndexPopupBase+10})),sCe={info:g(df,null,null),success:g(Tl,null,null),error:g(Kr,null,null),warning:g(El,null,null),loading:g(di,null,null)},cCe=pe({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(e,t){let{slots:n}=t;return()=>{var o;return g("div",{class:me(`${e.prefixCls}-custom-content`,`${e.prefixCls}-${e.type}`)},[e.icon||sCe[e.type],g("span",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])])}}});var uCe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ri("message",e.prefixCls)),[,s]=kF(l),c=()=>{var v;const y=(v=e.top)!==null&&v!==void 0?v:dCe;return{left:"50%",transform:"translateX(-50%)",top:typeof y=="number"?`${y}px`:y}},u=()=>me(s.value,e.rtl?`${l.value}-rtl`:""),d=()=>{var v;return W2({prefixCls:l.value,animation:(v=e.animation)!==null&&v!==void 0?v:"move-up",transitionName:e.transitionName})},f=g("span",{class:`${l.value}-close-x`},[g(Vr,{class:`${l.value}-close-icon`},null)]),[h,m]=NF({getStyles:c,prefixCls:l.value,getClassName:u,motion:d,closable:!1,closeIcon:f,duration:(o=e.duration)!==null&&o!==void 0?o:fCe,getContainer:(r=e.staticGetContainer)!==null&&r!==void 0?r:a.value,maxCount:e.maxCount,onAllRemoved:e.onAllRemoved});return n(S(S({},h),{prefixCls:l,hashId:s})),m}});let P6=0;function hCe(e){const t=ve(null),n=Symbol("messageHolderKey"),o=s=>{var c;(c=t.value)===null||c===void 0||c.close(s)},r=s=>{if(!t.value){const w=()=>{};return w.then=()=>{},w}const{open:c,prefixCls:u,hashId:d}=t.value,f=`${u}-notice`,{content:h,icon:m,type:v,key:y,class:b,onClose:$}=s,x=uCe(s,["content","icon","type","key","class","onClose"]);let _=y;return _==null&&(P6+=1,_=`antd-message-${P6}`),xee(w=>(c(S(S({},x),{key:_,content:()=>g(cCe,{prefixCls:u,type:v,icon:typeof m=="function"?m():m},{default:()=>[typeof h=="function"?h():h]}),placement:"top",class:me(v&&`${f}-${v}`,d,b),onClose:()=>{$==null||$(),w()}})),()=>{o(_)}))},a={open:r,destroy:s=>{var c;s!==void 0?o(s):(c=t.value)===null||c===void 0||c.destroy()}};return["info","success","warning","error","loading"].forEach(s=>{const c=(u,d,f)=>{let h;u&&typeof u=="object"&&"content"in u?h=u:h={content:u};let m,v;typeof d=="function"?v=d:(m=d,v=f);const y=S(S({onClose:v,duration:m},h),{type:s});return r(y)};a[s]=c}),[a,()=>g(pCe,V(V({key:n},e),{},{ref:t}),null)]}function BF(e){return hCe(e)}let FF=3,HF,Cr,gCe=1,zF="",jF="move-up",WF=!1,VF=()=>document.body,KF,UF=!1;function vCe(){return gCe++}function mCe(e){e.top!==void 0&&(HF=e.top,Cr=null),e.duration!==void 0&&(FF=e.duration),e.prefixCls!==void 0&&(zF=e.prefixCls),e.getContainer!==void 0&&(VF=e.getContainer,Cr=null),e.transitionName!==void 0&&(jF=e.transitionName,Cr=null,WF=!0),e.maxCount!==void 0&&(KF=e.maxCount,Cr=null),e.rtl!==void 0&&(UF=e.rtl)}function bCe(e,t){if(Cr){t(Cr);return}LF.newInstance({appContext:e.appContext,prefixCls:e.prefixCls||zF,rootPrefixCls:e.rootPrefixCls,transitionName:jF,hasTransitionName:WF,style:{top:HF},getContainer:VF||e.getPopupContainer,maxCount:KF,name:"message",useStyle:kF},n=>{if(Cr){t(Cr);return}Cr=n,t(n)})}const GF={info:df,success:Tl,error:Kr,warning:El,loading:di},yCe=Object.keys(GF);function SCe(e){const t=e.duration!==void 0?e.duration:FF,n=e.key||vCe(),o=new Promise(i=>{const a=()=>(typeof e.onClose=="function"&&e.onClose(),i(!0));bCe(e,l=>{l.notice({key:n,duration:t,style:e.style||{},class:e.class,content:s=>{let{prefixCls:c}=s;const u=GF[e.type],d=u?g(u,null,null):"",f=me(`${c}-custom-content`,{[`${c}-${e.type}`]:e.type,[`${c}-rtl`]:UF===!0});return g("div",{class:f},[typeof e.icon=="function"?e.icon():e.icon||d,g("span",null,[typeof e.content=="function"?e.content():e.content])])},onClose:a,onClick:e.onClick})})}),r=()=>{Cr&&Cr.removeNotice(n)};return r.then=(i,a)=>o.then(i,a),r.promise=o,r}function CCe(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}const Sh={open:SCe,config:mCe,destroy(e){if(Cr)if(e){const{removeNotice:t}=Cr;t(e)}else{const{destroy:t}=Cr;t(),Cr=null}}};function $Ce(e,t){e[t]=(n,o,r)=>CCe(n)?e.open(S(S({},n),{type:t})):(typeof o=="function"&&(r=o,o=void 0),e.open({content:n,duration:o,type:t,onClose:r}))}yCe.forEach(e=>$Ce(Sh,e));Sh.warn=Sh.warning;Sh.useMessage=BF;const GO=Sh,xCe=e=>{const{componentCls:t,width:n,notificationMarginEdge:o}=e,r=new Pt("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),i=new Pt("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),a=new Pt("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:n},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:r}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:o,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}}}},wCe=e=>{const{iconCls:t,componentCls:n,boxShadowSecondary:o,fontSizeLG:r,notificationMarginBottom:i,borderRadiusLG:a,colorSuccess:l,colorInfo:s,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:h,notificationMarginEdge:m,motionDurationMid:v,motionEaseInOut:y,fontSize:b,lineHeight:$,width:x,notificationIconSize:_}=e,w=`${n}-notice`,I=new Pt("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:x},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),O=new Pt("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:i,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[n]:S(S(S(S({},vt(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:m,[`${n}-hook-holder`]:{position:"relative"},[`&${n}-top, &${n}-bottom`]:{[`${n}-notice`]:{marginInline:"auto auto"}},[`&${n}-topLeft, &${n}-bottomLeft`]:{[`${n}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${n}-fade-enter, ${n}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:y,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${n}-fade-leave`]:{animationTimingFunction:y,animationFillMode:"both",animationDuration:v,animationPlayState:"paused"},[`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]:{animationName:I,animationPlayState:"running"},[`${n}-fade-leave${n}-fade-leave-active`]:{animationName:O,animationPlayState:"running"}}),xCe(e)),{"&-rtl":{direction:"rtl",[`${n}-notice-btn`]:{float:"left"}}})},{[w]:{position:"relative",width:x,maxWidth:`calc(100vw - ${m*2}px)`,marginBottom:i,marginInlineStart:"auto",padding:h,overflow:"hidden",lineHeight:$,wordWrap:"break-word",background:f,borderRadius:a,boxShadow:o,[`${n}-close-icon`]:{fontSize:b,cursor:"pointer"},[`${w}-message`]:{marginBottom:e.marginXS,color:d,fontSize:r,lineHeight:e.lineHeightLG},[`${w}-description`]:{fontSize:b},[`&${w}-closable ${w}-message`]:{paddingInlineEnd:e.paddingLG},[`${w}-with-icon ${w}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+_,fontSize:r},[`${w}-with-icon ${w}-description`]:{marginInlineStart:e.marginSM+_,fontSize:b},[`${w}-icon`]:{position:"absolute",fontSize:_,lineHeight:0,[`&-success${t}`]:{color:l},[`&-info${t}`]:{color:s},[`&-warning${t}`]:{color:c},[`&-error${t}`]:{color:u}},[`${w}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${w}-btn`]:{float:"right",marginTop:e.marginSM}}},{[`${w}-pure-panel`]:{margin:0}}]},YF=pt("Notification",e=>{const t=e.paddingMD,n=e.paddingLG,o=nt(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginBottom:e.margin,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:e.controlHeightLG*.55});return[wCe(o)]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384}));function _Ce(e,t){return t||g("span",{class:`${e}-close-x`},[g(Vr,{class:`${e}-close-icon`},null)])}g(df,null,null),g(Tl,null,null),g(Kr,null,null),g(El,null,null),g(di,null,null);const OCe={success:Tl,info:df,error:Kr,warning:El};function ICe(e){let{prefixCls:t,icon:n,type:o,message:r,description:i,btn:a}=e,l=null;if(n)l=g("span",{class:`${t}-icon`},[Xu(n)]);else if(o){const s=OCe[o];l=g(s,{class:`${t}-icon ${t}-icon-${o}`},null)}return g("div",{class:me({[`${t}-with-icon`]:l}),role:"alert"},[l,g("div",{class:`${t}-message`},[r]),g("div",{class:`${t}-description`},[i]),a&&g("div",{class:`${t}-btn`},[a])])}function XF(e,t,n){let o;switch(t=typeof t=="number"?`${t}px`:t,n=typeof n=="number"?`${n}px`:n,e){case"top":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":o={left:0,top:t,bottom:"auto"};break;case"topRight":o={right:0,top:t,bottom:"auto"};break;case"bottom":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":o={left:0,top:"auto",bottom:n};break;default:o={right:0,top:"auto",bottom:n};break}return o}function PCe(e){return{name:`${e}-fade`}}var TCe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.prefixCls||o("notification")),a=f=>{var h,m;return XF(f,(h=e.top)!==null&&h!==void 0?h:T6,(m=e.bottom)!==null&&m!==void 0?m:T6)},[,l]=YF(i),s=()=>me(l.value,{[`${i.value}-rtl`]:e.rtl}),c=()=>PCe(i.value),[u,d]=NF({prefixCls:i.value,getStyles:a,getClassName:s,motion:c,closable:!0,closeIcon:_Ce(i.value),duration:ECe,getContainer:()=>{var f,h;return((f=e.getPopupContainer)===null||f===void 0?void 0:f.call(e))||((h=r.value)===null||h===void 0?void 0:h.call(r))||document.body},maxCount:e.maxCount,hashId:l.value,onAllRemoved:e.onAllRemoved});return n(S(S({},u),{prefixCls:i.value,hashId:l})),d}});function MCe(e){const t=ve(null),n=Symbol("notificationHolderKey"),o=l=>{if(!t.value)return;const{open:s,prefixCls:c,hashId:u}=t.value,d=`${c}-notice`,{message:f,description:h,icon:m,type:v,btn:y,class:b}=l,$=TCe(l,["message","description","icon","type","btn","class"]);return s(S(S({placement:"topRight"},$),{content:()=>g(ICe,{prefixCls:d,icon:typeof m=="function"?m():m,type:v,message:typeof f=="function"?f():f,description:typeof h=="function"?h():h,btn:typeof y=="function"?y():y},null),class:me(v&&`${d}-${v}`,u,b)}))},i={open:o,destroy:l=>{var s,c;l!==void 0?(s=t.value)===null||s===void 0||s.close(l):(c=t.value)===null||c===void 0||c.destroy()}};return["success","info","warning","error"].forEach(l=>{i[l]=s=>o(S(S({},s),{type:l}))}),[i,()=>g(ACe,V(V({key:n},e),{},{ref:t}),null)]}function qF(e){return MCe(e)}const pc={};let ZF=4.5,QF="24px",JF="24px",Gx="",eH="topRight",tH=()=>document.body,nH=null,Yx=!1,oH;function RCe(e){const{duration:t,placement:n,bottom:o,top:r,getContainer:i,closeIcon:a,prefixCls:l}=e;l!==void 0&&(Gx=l),t!==void 0&&(ZF=t),n!==void 0&&(eH=n),o!==void 0&&(JF=typeof o=="number"?`${o}px`:o),r!==void 0&&(QF=typeof r=="number"?`${r}px`:r),i!==void 0&&(tH=i),a!==void 0&&(nH=a),e.rtl!==void 0&&(Yx=e.rtl),e.maxCount!==void 0&&(oH=e.maxCount)}function DCe(e,t){let{prefixCls:n,placement:o=eH,getContainer:r=tH,top:i,bottom:a,closeIcon:l=nH,appContext:s}=e;const{getPrefixCls:c}=UCe(),u=c("notification",n||Gx),d=`${u}-${o}-${Yx}`,f=pc[d];if(f){Promise.resolve(f).then(m=>{t(m)});return}const h=me(`${u}-${o}`,{[`${u}-rtl`]:Yx===!0});LF.newInstance({name:"notification",prefixCls:n||Gx,useStyle:YF,class:h,style:XF(o,i??QF,a??JF),appContext:s,getContainer:r,closeIcon:m=>{let{prefixCls:v}=m;return g("span",{class:`${v}-close-x`},[Xu(l,{},g(Vr,{class:`${v}-close-icon`},null))])},maxCount:oH,hasTransitionName:!0},m=>{pc[d]=m,t(m)})}const LCe={success:m9,info:y9,error:S9,warning:b9};function NCe(e){const{icon:t,type:n,description:o,message:r,btn:i}=e,a=e.duration===void 0?ZF:e.duration;DCe(e,l=>{l.notice({content:s=>{let{prefixCls:c}=s;const u=`${c}-notice`;let d=null;if(t)d=()=>g("span",{class:`${u}-icon`},[Xu(t)]);else if(n){const f=LCe[n];d=()=>g(f,{class:`${u}-icon ${u}-icon-${n}`},null)}return g("div",{class:d?`${u}-with-icon`:""},[d&&d(),g("div",{class:`${u}-message`},[!o&&d?g("span",{class:`${u}-message-single-line-auto-margin`},null):null,Xu(r)]),g("div",{class:`${u}-description`},[Xu(o)]),i?g("span",{class:`${u}-btn`},[Xu(i)]):null])},duration:a,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},class:e.class})})}const Ld={open:NCe,close(e){Object.keys(pc).forEach(t=>Promise.resolve(pc[t]).then(n=>{n.removeNotice(e)}))},config:RCe,destroy(){Object.keys(pc).forEach(e=>{Promise.resolve(pc[e]).then(t=>{t.destroy()}),delete pc[e]})}},kCe=["success","info","warning","error"];kCe.forEach(e=>{Ld[e]=t=>Ld.open(S(S({},t),{type:e}))});Ld.warn=Ld.warning;Ld.useNotification=qF;const YO=Ld,BCe=`-ant-${Date.now()}-${Math.random()}`;function FCe(e,t){const n={},o=(a,l)=>{let s=a.clone();return s=(l==null?void 0:l(s))||s,s.toRgbString()},r=(a,l)=>{const s=new Zt(a),c=Mc(s.toRgbString());n[`${l}-color`]=o(s),n[`${l}-color-disabled`]=c[1],n[`${l}-color-hover`]=c[4],n[`${l}-color-active`]=c[6],n[`${l}-color-outline`]=s.clone().setAlpha(.2).toRgbString(),n[`${l}-color-deprecated-bg`]=c[0],n[`${l}-color-deprecated-border`]=c[2]};if(t.primaryColor){r(t.primaryColor,"primary");const a=new Zt(t.primaryColor),l=Mc(a.toRgbString());l.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=o(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=o(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=o(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=o(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=o(a,c=>c.setAlpha(c.getAlpha()*.12));const s=new Zt(l[0]);n["primary-color-active-deprecated-f-30"]=o(s,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=o(s,c=>c.darken(2))}return t.successColor&&r(t.successColor,"success"),t.warningColor&&r(t.warningColor,"warning"),t.errorColor&&r(t.errorColor,"error"),t.infoColor&&r(t.infoColor,"info"),` + :root { + ${Object.keys(n).map(a=>`--${e}-${a}: ${n[a]};`).join(` +`)} + } + `.trim()}function HCe(e,t){const n=FCe(e,t);ur()?nh(n,`${BCe}-dynamic-theme`):Sn()}const zCe=e=>{const[t,n]=Ol();return s0(M(()=>({theme:t.value,token:n.value,hashId:"",path:["ant-design-icons",e.value]})),()=>[{[`.${e.value}`]:S(S({},Xc()),{[`.${e.value} .${e.value}-icon`]:{display:"block"}})}])};function jCe(e,t){const n=M(()=>(e==null?void 0:e.value)||{}),o=M(()=>n.value.inherit===!1||!(t!=null&&t.value)?w7:t.value);return M(()=>{if(!(e!=null&&e.value))return t==null?void 0:t.value;const i=S({},o.value.components);return Object.keys(e.value.components||{}).forEach(a=>{i[a]=S(S({},i[a]),e.value.components[a])}),S(S(S({},o.value),n.value),{token:S(S({},o.value.token),n.value.token),components:i})})}var WCe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{S(jo,XO),jo.prefixCls=vd(),jo.iconPrefixCls=rH(),jo.getPrefixCls=(e,t)=>t||(e?`${jo.prefixCls}-${e}`:jo.prefixCls),jo.getRootPrefixCls=()=>jo.prefixCls?jo.prefixCls:vd()});let PC;const KCe=e=>{PC&&PC(),PC=ct(()=>{S(XO,St(e)),S(jo,St(e))}),e.theme&&HCe(vd(),e.theme)},UCe=()=>({getPrefixCls:(e,t)=>t||(e?`${vd()}-${e}`:vd()),getIconPrefixCls:rH,getRootPrefixCls:()=>jo.prefixCls?jo.prefixCls:vd()}),Pp=pe({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:qee(),setup(e,t){let{slots:n}=t;const o=Bb(),r=(D,B)=>{const{prefixCls:k="ant"}=e;if(B)return B;const L=k||o.getPrefixCls("");return D?`${L}-${D}`:L},i=M(()=>e.iconPrefixCls||o.iconPrefixCls.value||I2),a=M(()=>i.value!==o.iconPrefixCls.value),l=M(()=>{var D;return e.csp||((D=o.csp)===null||D===void 0?void 0:D.value)}),s=zCe(i),c=jCe(M(()=>e.theme),M(()=>{var D;return(D=o.theme)===null||D===void 0?void 0:D.value})),u=D=>(e.renderEmpty||n.renderEmpty||o.renderEmpty||loe)(D),d=M(()=>{var D,B;return(D=e.autoInsertSpaceInButton)!==null&&D!==void 0?D:(B=o.autoInsertSpaceInButton)===null||B===void 0?void 0:B.value}),f=M(()=>{var D;return e.locale||((D=o.locale)===null||D===void 0?void 0:D.value)});Ie(f,()=>{XO.locale=f.value},{immediate:!0});const h=M(()=>{var D;return e.direction||((D=o.direction)===null||D===void 0?void 0:D.value)}),m=M(()=>{var D,B;return(D=e.space)!==null&&D!==void 0?D:(B=o.space)===null||B===void 0?void 0:B.value}),v=M(()=>{var D,B;return(D=e.virtual)!==null&&D!==void 0?D:(B=o.virtual)===null||B===void 0?void 0:B.value}),y=M(()=>{var D,B;return(D=e.dropdownMatchSelectWidth)!==null&&D!==void 0?D:(B=o.dropdownMatchSelectWidth)===null||B===void 0?void 0:B.value}),b=M(()=>{var D;return e.getTargetContainer!==void 0?e.getTargetContainer:(D=o.getTargetContainer)===null||D===void 0?void 0:D.value}),$=M(()=>{var D;return e.getPopupContainer!==void 0?e.getPopupContainer:(D=o.getPopupContainer)===null||D===void 0?void 0:D.value}),x=M(()=>{var D;return e.pageHeader!==void 0?e.pageHeader:(D=o.pageHeader)===null||D===void 0?void 0:D.value}),_=M(()=>{var D;return e.input!==void 0?e.input:(D=o.input)===null||D===void 0?void 0:D.value}),w=M(()=>{var D;return e.pagination!==void 0?e.pagination:(D=o.pagination)===null||D===void 0?void 0:D.value}),I=M(()=>{var D;return e.form!==void 0?e.form:(D=o.form)===null||D===void 0?void 0:D.value}),O=M(()=>{var D;return e.select!==void 0?e.select:(D=o.select)===null||D===void 0?void 0:D.value}),P=M(()=>e.componentSize),E=M(()=>e.componentDisabled),R=M(()=>{var D,B;return(D=e.wave)!==null&&D!==void 0?D:(B=o.wave)===null||B===void 0?void 0:B.value}),A={csp:l,autoInsertSpaceInButton:d,locale:f,direction:h,space:m,virtual:v,dropdownMatchSelectWidth:y,getPrefixCls:r,iconPrefixCls:i,theme:M(()=>{var D,B;return(D=c.value)!==null&&D!==void 0?D:(B=o.theme)===null||B===void 0?void 0:B.value}),renderEmpty:u,getTargetContainer:b,getPopupContainer:$,pageHeader:x,input:_,pagination:w,form:I,select:O,componentSize:P,componentDisabled:E,transformCellText:M(()=>e.transformCellText),wave:R},N=M(()=>{const D=c.value||{},{algorithm:B,token:k}=D,L=WCe(D,["algorithm","token"]),z=B&&(!Array.isArray(B)||B.length>0)?M2(B):void 0;return S(S({},L),{theme:z,token:S(S({},Wb),k)})}),F=M(()=>{var D,B;let k={};return f.value&&(k=((D=f.value.Form)===null||D===void 0?void 0:D.defaultValidateMessages)||((B=cr.Form)===null||B===void 0?void 0:B.defaultValidateMessages)||{}),e.form&&e.form.validateMessages&&(k=S(S({},k),e.form.validateMessages)),k});Zee(A),Yee({validateMessages:F}),M7(P),XN(E);const W=D=>{var B,k;let L=a.value?s((B=n.default)===null||B===void 0?void 0:B.call(n)):(k=n.default)===null||k===void 0?void 0:k.call(n);if(e.theme){const z=function(){return L}();L=g(eoe,{value:N.value},{default:()=>[z]})}return g(RF,{locale:f.value||D,ANT_MARK__:Kx},{default:()=>[L]})};return ct(()=>{h.value&&(GO.config({rtl:h.value==="rtl"}),YO.config({rtl:h.value==="rtl"}))}),()=>g(Yc,{children:(D,B,k)=>W(k)},null)}});Pp.config=KCe;Pp.install=function(e){e.component(Pp.name,Pp)};const qO=Pp,GCe=(e,t)=>{let{attrs:n,slots:o}=t;return g(Un,V(V({size:"small",type:"primary"},e),n),o)},YCe=GCe,kv=(e,t,n)=>{const o=yee(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${o}Bg`],borderColor:e[`color${o}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},XCe=e=>c0(e,(t,n)=>{let{textColor:o,lightBorderColor:r,lightColor:i,darkColor:a}=n;return{[`${e.componentCls}-${t}`]:{color:o,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),qCe=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:o,componentCls:r}=e,i=o-n,a=t-n;return{[r]:S(S({},vt(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:"nowrap",background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor},[`${r}-close-icon`]:{marginInlineStart:a,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},iH=pt("Tag",e=>{const{fontSize:t,lineHeight:n,lineWidth:o,fontSizeIcon:r}=e,i=Math.round(t*n),a=e.fontSizeSM,l=i-o*2,s=e.colorFillAlter,c=e.colorText,u=nt(e,{tagFontSize:a,tagLineHeight:l,tagDefaultBg:s,tagDefaultColor:c,tagIconSize:r-2*o,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[qCe(u),XCe(u),kv(u,"success","Success"),kv(u,"processing","Info"),kv(u,"error","Error"),kv(u,"warning","Warning")]}),ZCe=()=>({prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}),QCe=pe({compatConfig:{MODE:3},name:"ACheckableTag",inheritAttrs:!1,props:ZCe(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{prefixCls:i}=Ve("tag",e),[a,l]=iH(i),s=u=>{const{checked:d}=e;o("update:checked",!d),o("change",!d),o("click",u)},c=M(()=>me(i.value,l.value,{[`${i.value}-checkable`]:!0,[`${i.value}-checkable-checked`]:e.checked}));return()=>{var u;return a(g("span",V(V({},r),{},{class:[c.value,r.class],onClick:s}),[(u=n.default)===null||u===void 0?void 0:u.call(n)]))}}}),z0=QCe,JCe=()=>({prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:Z.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},onClick:Ac(),"onUpdate:visible":Function,icon:Z.any,bordered:{type:Boolean,default:!0}}),Tp=pe({compatConfig:{MODE:3},name:"ATag",inheritAttrs:!1,props:JCe(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{prefixCls:i,direction:a}=Ve("tag",e),[l,s]=iH(i),c=ve(!0);ct(()=>{e.visible!==void 0&&(c.value=e.visible)});const u=m=>{m.stopPropagation(),o("update:visible",!1),o("close",m),!m.defaultPrevented&&e.visible===void 0&&(c.value=!1)},d=M(()=>Cy(e.color)||Bhe(e.color)),f=M(()=>me(i.value,s.value,{[`${i.value}-${e.color}`]:d.value,[`${i.value}-has-color`]:e.color&&!d.value,[`${i.value}-hidden`]:!c.value,[`${i.value}-rtl`]:a.value==="rtl",[`${i.value}-borderless`]:!e.bordered})),h=m=>{o("click",m)};return()=>{var m,v,y;const{icon:b=(m=n.icon)===null||m===void 0?void 0:m.call(n),color:$,closeIcon:x=(v=n.closeIcon)===null||v===void 0?void 0:v.call(n),closable:_=!1}=e,w=()=>_?x?g("span",{class:`${i.value}-close-icon`,onClick:u},[x]):g(Vr,{class:`${i.value}-close-icon`,onClick:u},null):null,I={backgroundColor:$&&!d.value?$:void 0},O=b||null,P=(y=n.default)===null||y===void 0?void 0:y.call(n),E=O?g(Je,null,[O,g("span",null,[P])]):P,R=e.onClick!==void 0,A=g("span",V(V({},r),{},{onClick:h,class:[f.value,r.class],style:[I,r.style]}),[E,w()]);return l(R?g(Y_,null,{default:()=>[A]}):A)}}});Tp.CheckableTag=z0;Tp.install=function(e){return e.component(Tp.name,Tp),e.component(z0.name,z0),e};const aH=Tp;function e$e(e,t){let{slots:n,attrs:o}=t;return g(aH,V(V({color:"blue"},e),o),n)}var t$e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};const n$e=t$e;function E6(e){for(var t=1;tA.value||P.value),[W,D]=HB(w),B=he();v({focus:()=>{var fe;(fe=B.value)===null||fe===void 0||fe.focus()},blur:()=>{var fe;(fe=B.value)===null||fe===void 0||fe.blur()}});const k=fe=>$.valueFormat?e.toString(fe,$.valueFormat):fe,L=(fe,ie)=>{const X=k(fe);b("update:value",X),b("change",X,ie),x.onFieldChange()},z=fe=>{b("update:open",fe),b("openChange",fe)},K=fe=>{b("focus",fe)},G=fe=>{b("blur",fe),x.onFieldBlur()},Y=(fe,ie)=>{const X=k(fe);b("panelChange",X,ie)},ne=fe=>{const ie=k(fe);b("ok",ie)},[re]=Wi("DatePicker",th),J=M(()=>$.value?$.valueFormat?e.toDate($.value,$.valueFormat):$.value:$.value===""?void 0:$.value),te=M(()=>$.defaultValue?$.valueFormat?e.toDate($.defaultValue,$.valueFormat):$.defaultValue:$.defaultValue===""?void 0:$.defaultValue),ee=M(()=>$.defaultPickerValue?$.valueFormat?e.toDate($.defaultPickerValue,$.valueFormat):$.defaultPickerValue:$.defaultPickerValue===""?void 0:$.defaultPickerValue);return()=>{var fe,ie,X,ue,ye,H;const j=S(S({},re.value),$.locale),q=S(S({},$),y),{bordered:se=!0,placeholder:ae,suffixIcon:ge=(fe=m.suffixIcon)===null||fe===void 0?void 0:fe.call(m),showToday:Se=!0,transitionName:$e,allowClear:_e=!0,dateRender:be=m.dateRender,renderExtraFooter:Te=m.renderExtraFooter,monthCellRender:Pe=m.monthCellRender||$.monthCellContentRender||m.monthCellContentRender,clearIcon:oe=(ie=m.clearIcon)===null||ie===void 0?void 0:ie.call(m),id:le=x.id.value}=q,xe=c$e(q,["bordered","placeholder","suffixIcon","showToday","transitionName","allowClear","dateRender","renderExtraFooter","monthCellRender","clearIcon","id"]),Ae=q.showTime===""?!0:q.showTime,{format:Be}=q;let Ye={};c&&(Ye.picker=c);const Re=c||q.picker||"date";Ye=S(S(S({},Ye),Ae?W0(S({format:Be,picker:Re},typeof Ae=="object"?Ae:{})):{}),Re==="time"?W0(S(S({format:Be},xe),{picker:Re})):{});const Le=w.value,Ne=g(Je,null,[ge||g(c==="time"?sH:lH,null,null),_.hasFeedback&&_.feedbackIcon]);return W(g(Eme,V(V(V({monthCellRender:Pe,dateRender:be,renderExtraFooter:Te,ref:B,placeholder:l$e(j,Re,ae),suffixIcon:Ne,dropdownAlign:cH(I.value,$.placement),clearIcon:oe||g(Kr,null,null),allowClear:_e,transitionName:$e||`${E.value}-slide-up`},xe),Ye),{},{id:le,picker:Re,value:J.value,defaultValue:te.value,defaultPickerValue:ee.value,showToday:Se,locale:j.lang,class:me({[`${Le}-${F.value}`]:F.value,[`${Le}-borderless`]:!se},sr(Le,da(_.status,$.status),_.hasFeedback),y.class,D.value,N.value),disabled:R.value,prefixCls:Le,getPopupContainer:y.getCalendarContainer||O.value,generateConfig:e,prevIcon:((X=m.prevIcon)===null||X===void 0?void 0:X.call(m))||g("span",{class:`${Le}-prev-icon`},null),nextIcon:((ue=m.nextIcon)===null||ue===void 0?void 0:ue.call(m))||g("span",{class:`${Le}-next-icon`},null),superPrevIcon:((ye=m.superPrevIcon)===null||ye===void 0?void 0:ye.call(m))||g("span",{class:`${Le}-super-prev-icon`},null),superNextIcon:((H=m.superNextIcon)===null||H===void 0?void 0:H.call(m))||g("span",{class:`${Le}-super-next-icon`},null),components:fH,direction:I.value,dropdownClassName:me(D.value,$.popupClassName,$.dropdownClassName),onChange:L,onOpenChange:z,onFocus:K,onBlur:G,onPanelChange:Y,onOk:ne}),null))}}})}const o=n(void 0,"ADatePicker"),r=n("week","AWeekPicker"),i=n("month","AMonthPicker"),a=n("year","AYearPicker"),l=n("time","TimePicker"),s=n("quarter","AQuarterPicker");return{DatePicker:o,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:l,QuarterPicker:s}}var d$e={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"};const f$e=d$e;function M6(e){for(var t=1;t$.value||v.value),[w,I]=HB(f),O=he();i({focus:()=>{var K;(K=O.value)===null||K===void 0||K.focus()},blur:()=>{var K;(K=O.value)===null||K===void 0||K.blur()}});const P=K=>c.valueFormat?e.toString(K,c.valueFormat):K,E=(K,G)=>{const Y=P(K);s("update:value",Y),s("change",Y,G),u.onFieldChange()},R=K=>{s("update:open",K),s("openChange",K)},A=K=>{s("focus",K)},N=K=>{s("blur",K),u.onFieldBlur()},F=(K,G)=>{const Y=P(K);s("panelChange",Y,G)},W=K=>{const G=P(K);s("ok",G)},D=(K,G,Y)=>{const ne=P(K);s("calendarChange",ne,G,Y)},[B]=Wi("DatePicker",th),k=M(()=>c.value&&c.valueFormat?e.toDate(c.value,c.valueFormat):c.value),L=M(()=>c.defaultValue&&c.valueFormat?e.toDate(c.defaultValue,c.valueFormat):c.defaultValue),z=M(()=>c.defaultPickerValue&&c.valueFormat?e.toDate(c.defaultPickerValue,c.valueFormat):c.defaultPickerValue);return()=>{var K,G,Y,ne,re,J,te;const ee=S(S({},B.value),c.locale),fe=S(S({},c),l),{prefixCls:ie,bordered:X=!0,placeholder:ue,suffixIcon:ye=(K=a.suffixIcon)===null||K===void 0?void 0:K.call(a),picker:H="date",transitionName:j,allowClear:q=!0,dateRender:se=a.dateRender,renderExtraFooter:ae=a.renderExtraFooter,separator:ge=(G=a.separator)===null||G===void 0?void 0:G.call(a),clearIcon:Se=(Y=a.clearIcon)===null||Y===void 0?void 0:Y.call(a),id:$e=u.id.value}=fe,_e=g$e(fe,["prefixCls","bordered","placeholder","suffixIcon","picker","transitionName","allowClear","dateRender","renderExtraFooter","separator","clearIcon","id"]);delete _e["onUpdate:value"],delete _e["onUpdate:open"];const{format:be,showTime:Te}=fe;let Pe={};Pe=S(S(S({},Pe),Te?W0(S({format:be,picker:H},Te)):{}),H==="time"?W0(S(S({format:be},_t(_e,["disabledTime"])),{picker:H})):{});const oe=f.value,le=g(Je,null,[ye||g(H==="time"?sH:lH,null,null),d.hasFeedback&&d.feedbackIcon]);return w(g(zme,V(V(V({dateRender:se,renderExtraFooter:ae,separator:ge||g("span",{"aria-label":"to",class:`${oe}-separator`},[g(h$e,null,null)]),ref:O,dropdownAlign:cH(h.value,c.placement),placeholder:s$e(ee,H,ue),suffixIcon:le,clearIcon:Se||g(Kr,null,null),allowClear:q,transitionName:j||`${y.value}-slide-up`},_e),Pe),{},{disabled:b.value,id:$e,value:k.value,defaultValue:L.value,defaultPickerValue:z.value,picker:H,class:me({[`${oe}-${_.value}`]:_.value,[`${oe}-borderless`]:!X},sr(oe,da(d.status,c.status),d.hasFeedback),l.class,I.value,x.value),locale:ee.lang,prefixCls:oe,getPopupContainer:l.getCalendarContainer||m.value,generateConfig:e,prevIcon:((ne=a.prevIcon)===null||ne===void 0?void 0:ne.call(a))||g("span",{class:`${oe}-prev-icon`},null),nextIcon:((re=a.nextIcon)===null||re===void 0?void 0:re.call(a))||g("span",{class:`${oe}-next-icon`},null),superPrevIcon:((J=a.superPrevIcon)===null||J===void 0?void 0:J.call(a))||g("span",{class:`${oe}-super-prev-icon`},null),superNextIcon:((te=a.superNextIcon)===null||te===void 0?void 0:te.call(a))||g("span",{class:`${oe}-super-next-icon`},null),components:fH,direction:h.value,dropdownClassName:me(I.value,c.popupClassName,c.dropdownClassName),onChange:E,onOpenChange:R,onFocus:A,onBlur:N,onPanelChange:F,onOk:W,onCalendarChange:D}),null))}}})}const fH={button:YCe,rangeItem:e$e};function m$e(e){return e?Array.isArray(e)?e:[e]:[]}function W0(e){const{format:t,picker:n,showHour:o,showMinute:r,showSecond:i,use12Hours:a}=e,l=m$e(t)[0],s=S({},e);return l&&typeof l=="string"&&(!l.includes("s")&&i===void 0&&(s.showSecond=!1),!l.includes("m")&&r===void 0&&(s.showMinute=!1),!l.includes("H")&&!l.includes("h")&&o===void 0&&(s.showHour=!1),(l.includes("a")||l.includes("A"))&&a===void 0&&(s.use12Hours=!0)),n==="time"?s:(typeof l=="function"&&delete s.format,{showTime:s})}function pH(e,t){const{DatePicker:n,WeekPicker:o,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:l}=u$e(e,t),s=v$e(e,t);return{DatePicker:n,WeekPicker:o,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:l,RangePicker:s}}const{DatePicker:TC,WeekPicker:xm,MonthPicker:wm,YearPicker:b$e,TimePicker:y$e,QuarterPicker:_m,RangePicker:Om}=pH(oO),S$e=S(TC,{WeekPicker:xm,MonthPicker:wm,YearPicker:b$e,RangePicker:Om,TimePicker:y$e,QuarterPicker:_m,install:e=>(e.component(TC.name,TC),e.component(Om.name,Om),e.component(wm.name,wm),e.component(xm.name,xm),e.component(_m.name,_m),e)});function Bv(e){return e!=null}const C$e=e=>{const{itemPrefixCls:t,component:n,span:o,labelStyle:r,contentStyle:i,bordered:a,label:l,content:s,colon:c}=e,u=n;return a?g(u,{class:[{[`${t}-item-label`]:Bv(l),[`${t}-item-content`]:Bv(s)}],colSpan:o},{default:()=>[Bv(l)&&g("span",{style:r},[l]),Bv(s)&&g("span",{style:i},[s])]}):g(u,{class:[`${t}-item`],colSpan:o},{default:()=>[g("div",{class:`${t}-item-container`},[(l||l===0)&&g("span",{class:[`${t}-item-label`,{[`${t}-item-no-colon`]:!c}],style:r},[l]),(s||s===0)&&g("span",{class:`${t}-item-content`,style:i},[s])])]})},EC=C$e,$$e=e=>{const t=(c,u,d)=>{let{colon:f,prefixCls:h,bordered:m}=u,{component:v,type:y,showLabel:b,showContent:$,labelStyle:x,contentStyle:_}=d;return c.map((w,I)=>{var O,P;const E=w.props||{},{prefixCls:R=h,span:A=1,labelStyle:N=E["label-style"],contentStyle:F=E["content-style"],label:W=(P=(O=w.children)===null||O===void 0?void 0:O.label)===null||P===void 0?void 0:P.call(O)}=E,D=kb(w),B=Wee(w),k=HN(w),{key:L}=w;return typeof v=="string"?g(EC,{key:`${y}-${String(L)||I}`,class:B,style:k,labelStyle:S(S({},x),N),contentStyle:S(S({},_),F),span:A,colon:f,component:v,itemPrefixCls:R,bordered:m,label:b?W:null,content:$?D:null},null):[g(EC,{key:`label-${String(L)||I}`,class:B,style:S(S(S({},x),k),N),span:1,colon:f,component:v[0],itemPrefixCls:R,bordered:m,label:W},null),g(EC,{key:`content-${String(L)||I}`,class:B,style:S(S(S({},_),k),F),span:A*2-1,component:v[1],itemPrefixCls:R,bordered:m,content:D},null)]})},{prefixCls:n,vertical:o,row:r,index:i,bordered:a}=e,{labelStyle:l,contentStyle:s}=it(vH,{labelStyle:he({}),contentStyle:he({})});return o?g(Je,null,[g("tr",{key:`label-${i}`,class:`${n}-row`},[t(r,e,{component:"th",type:"label",showLabel:!0,labelStyle:l.value,contentStyle:s.value})]),g("tr",{key:`content-${i}`,class:`${n}-row`},[t(r,e,{component:"td",type:"content",showContent:!0,labelStyle:l.value,contentStyle:s.value})])]):g("tr",{key:i,class:`${n}-row`},[t(r,e,{component:a?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,labelStyle:l.value,contentStyle:s.value})])},x$e=$$e,w$e=e=>{const{componentCls:t,descriptionsSmallPadding:n,descriptionsDefaultPadding:o,descriptionsMiddlePadding:r,descriptionsBg:i}=e;return{[`&${t}-bordered`]:{[`${t}-view`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${t}-item-label, ${t}-item-content`]:{padding:o,borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${t}-item-label`]:{backgroundColor:i,"&::after":{display:"none"}},[`${t}-row`]:{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${t}-middle`]:{[`${t}-item-label, ${t}-item-content`]:{padding:r}},[`&${t}-small`]:{[`${t}-item-label, ${t}-item-content`]:{padding:n}}}}},_$e=e=>{const{componentCls:t,descriptionsExtraColor:n,descriptionItemPaddingBottom:o,descriptionsItemLabelColonMarginRight:r,descriptionsItemLabelColonMarginLeft:i,descriptionsTitleMarginBottom:a}=e;return{[t]:S(S(S({},vt(e)),w$e(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${t}-title`]:S(S({},eo),{flex:"auto",color:e.colorText,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${t}-row`]:{"> th, > td":{paddingBottom:o},"&:last-child":{borderBottom:"none"}},[`${t}-item-label`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${i}px ${r}px`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}},O$e=pt("Descriptions",e=>{const t=e.colorFillAlter,n=e.fontSizeSM*e.lineHeightSM,o=e.colorText,r=`${e.paddingXS}px ${e.padding}px`,i=`${e.padding}px ${e.paddingLG}px`,a=`${e.paddingSM}px ${e.paddingLG}px`,l=e.padding,s=e.marginXS,c=e.marginXXS/2,u=nt(e,{descriptionsBg:t,descriptionsTitleMarginBottom:n,descriptionsExtraColor:o,descriptionItemPaddingBottom:l,descriptionsSmallPadding:r,descriptionsDefaultPadding:i,descriptionsMiddlePadding:a,descriptionsItemLabelColonMarginRight:s,descriptionsItemLabelColonMarginLeft:c});return[_$e(u)]});Z.any;const I$e=()=>({prefixCls:String,label:Z.any,labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0},span:{type:Number,default:1}}),hH=pe({compatConfig:{MODE:3},name:"ADescriptionsItem",props:I$e(),setup(e,t){let{slots:n}=t;return()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),gH={xxxl:3,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function P$e(e,t){if(typeof e=="number")return e;if(typeof e=="object")for(let n=0;nt)&&(o=Gt(e,{span:t}),Sn()),o}function T$e(e,t){const n=ln(e),o=[];let r=[],i=t;return n.forEach((a,l)=>{var s;const c=(s=a.props)===null||s===void 0?void 0:s.span,u=c||1;if(l===n.length-1){r.push(R6(a,i,c)),o.push(r);return}u({prefixCls:String,bordered:{type:Boolean,default:void 0},size:{type:String,default:"default"},title:Z.any,extra:Z.any,column:{type:[Number,Object],default:()=>gH},layout:String,colon:{type:Boolean,default:void 0},labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0}}),vH=Symbol("descriptionsContext"),Uu=pe({compatConfig:{MODE:3},name:"ADescriptions",inheritAttrs:!1,props:E$e(),slots:Object,Item:hH,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("descriptions",e);let a;const l=he({}),[s,c]=O$e(r),u=j_();Dh(()=>{a=u.value.subscribe(f=>{typeof e.column=="object"&&(l.value=f)})}),Ct(()=>{u.value.unsubscribe(a)}),ft(vH,{labelStyle:st(e,"labelStyle"),contentStyle:st(e,"contentStyle")});const d=M(()=>P$e(e.column,l.value));return()=>{var f,h,m;const{size:v,bordered:y=!1,layout:b="horizontal",colon:$=!0,title:x=(f=n.title)===null||f===void 0?void 0:f.call(n),extra:_=(h=n.extra)===null||h===void 0?void 0:h.call(n)}=e,w=(m=n.default)===null||m===void 0?void 0:m.call(n),I=T$e(w,d.value);return s(g("div",V(V({},o),{},{class:[r.value,{[`${r.value}-${v}`]:v!=="default",[`${r.value}-bordered`]:!!y,[`${r.value}-rtl`]:i.value==="rtl"},o.class,c.value]}),[(x||_)&&g("div",{class:`${r.value}-header`},[x&&g("div",{class:`${r.value}-title`},[x]),_&&g("div",{class:`${r.value}-extra`},[_])]),g("div",{class:`${r.value}-view`},[g("table",null,[g("tbody",null,[I.map((O,P)=>g(x$e,{key:P,index:P,colon:$,prefixCls:r.value,vertical:b==="vertical",bordered:y,row:O},null))])])])]))}}});Uu.install=function(e){return e.component(Uu.name,Uu),e.component(Uu.Item.name,Uu.Item),e};const A$e=Uu,M$e=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:o,lineWidth:r}=e;return{[t]:S(S({},vt(e)),{borderBlockStart:`${r}px solid ${o}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${e.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${r}px solid ${o}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${o}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${r}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${t}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:o,borderStyle:"dashed",borderWidth:`${r}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},R$e=pt("Divider",e=>{const t=nt(e,{dividerVerticalGutterMargin:e.marginXS,dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG});return[M$e(t)]},{sizePaddingEdgeHorizontal:0}),D$e=()=>({prefixCls:String,type:{type:String,default:"horizontal"},dashed:{type:Boolean,default:!1},orientation:{type:String,default:"center"},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),L$e=pe({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:D$e(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("divider",e),[a,l]=R$e(r),s=M(()=>e.orientation==="left"&&e.orientationMargin!=null),c=M(()=>e.orientation==="right"&&e.orientationMargin!=null),u=M(()=>{const{type:h,dashed:m,plain:v}=e,y=r.value;return{[y]:!0,[l.value]:!!l.value,[`${y}-${h}`]:!0,[`${y}-dashed`]:!!m,[`${y}-plain`]:!!v,[`${y}-rtl`]:i.value==="rtl",[`${y}-no-default-orientation-margin-left`]:s.value,[`${y}-no-default-orientation-margin-right`]:c.value}}),d=M(()=>{const h=typeof e.orientationMargin=="number"?`${e.orientationMargin}px`:e.orientationMargin;return S(S({},s.value&&{marginLeft:h}),c.value&&{marginRight:h})}),f=M(()=>e.orientation.length>0?"-"+e.orientation:e.orientation);return()=>{var h;const m=ln((h=n.default)===null||h===void 0?void 0:h.call(n));return a(g("div",V(V({},o),{},{class:[u.value,m.length?`${r.value}-with-text ${r.value}-with-text${f.value}`:"",o.class],role:"separator"}),[m.length?g("span",{class:`${r.value}-inner-text`,style:d.value},[m]):null]))}}}),N$e=$n(L$e);Ta.Button=fh;Ta.install=function(e){return e.component(Ta.name,Ta),e.component(fh.name,fh),e};const mH=()=>({prefixCls:String,width:Z.oneOfType([Z.string,Z.number]),height:Z.oneOfType([Z.string,Z.number]),style:{type:Object,default:void 0},class:String,rootClassName:String,rootStyle:qe(),placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:kt(),autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},motion:Oe(),maskMotion:qe()}),k$e=()=>S(S({},mH()),{forceRender:{type:Boolean,default:void 0},getContainer:Z.oneOfType([Z.string,Z.func,Z.object,Z.looseBool])}),B$e=()=>S(S({},mH()),{getContainer:Function,getOpenCount:Function,scrollLocker:Z.any,inline:Boolean});function F$e(e){return Array.isArray(e)?e:[e]}const H$e={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"};Object.keys(H$e).filter(e=>{if(typeof document>"u")return!1;const t=document.getElementsByTagName("html")[0];return e in(t?t.style:{})})[0];const z$e=!(typeof window<"u"&&window.document&&window.document.createElement);var j$e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{wt(()=>{var b;const{open:$,getContainer:x,showMask:_,autofocus:w}=e,I=x==null?void 0:x();m(e),$&&(I&&(I.parentNode,document.body),wt(()=>{w&&u()}),_&&((b=e.scrollLocker)===null||b===void 0||b.lock()))})}),Ie(()=>e.level,()=>{m(e)},{flush:"post"}),Ie(()=>e.open,()=>{const{open:b,getContainer:$,scrollLocker:x,showMask:_,autofocus:w}=e,I=$==null?void 0:$();I&&(I.parentNode,document.body),b?(w&&u(),_&&(x==null||x.lock())):x==null||x.unLock()},{flush:"post"}),Fo(()=>{var b;const{open:$}=e;$&&(document.body.style.touchAction=""),(b=e.scrollLocker)===null||b===void 0||b.unLock()}),Ie(()=>e.placement,b=>{b&&(s.value=null)});const u=()=>{var b,$;($=(b=i.value)===null||b===void 0?void 0:b.focus)===null||$===void 0||$.call(b)},d=b=>{n("close",b)},f=b=>{b.keyCode===Fe.ESC&&(b.stopPropagation(),d(b))},h=()=>{const{open:b,afterVisibleChange:$}=e;$&&$(!!b)},m=b=>{let{level:$,getContainer:x}=b;if(z$e)return;const _=x==null?void 0:x(),w=_?_.parentNode:null;c=[],$==="all"?(w?Array.prototype.slice.call(w.children):[]).forEach(O=>{O.nodeName!=="SCRIPT"&&O.nodeName!=="STYLE"&&O.nodeName!=="LINK"&&O!==_&&c.push(O)}):$&&F$e($).forEach(I=>{document.querySelectorAll(I).forEach(O=>{c.push(O)})})},v=b=>{n("handleClick",b)},y=ve(!1);return Ie(i,()=>{wt(()=>{y.value=!0})}),()=>{var b,$;const{width:x,height:_,open:w,prefixCls:I,placement:O,level:P,levelMove:E,ease:R,duration:A,getContainer:N,onChange:F,afterVisibleChange:W,showMask:D,maskClosable:B,maskStyle:k,keyboard:L,getOpenCount:z,scrollLocker:K,contentWrapperStyle:G,style:Y,class:ne,rootClassName:re,rootStyle:J,maskMotion:te,motion:ee,inline:fe}=e,ie=j$e(e,["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class","rootClassName","rootStyle","maskMotion","motion","inline"]),X=w&&y.value,ue=me(I,{[`${I}-${O}`]:!0,[`${I}-open`]:X,[`${I}-inline`]:fe,"no-mask":!D,[re]:!0}),ye=typeof ee=="function"?ee(O):ee;return g("div",V(V({},_t(ie,["autofocus"])),{},{tabindex:-1,class:ue,style:J,ref:i,onKeydown:X&&L?f:void 0}),[g(so,te,{default:()=>[D&&Ln(g("div",{class:`${I}-mask`,onClick:B?d:void 0,style:k,ref:a},null),[[Bo,X]])]}),g(so,V(V({},ye),{},{onAfterEnter:h,onAfterLeave:h}),{default:()=>[Ln(g("div",{class:`${I}-content-wrapper`,style:[G],ref:r},[g("div",{class:[`${I}-content`,ne],style:Y,ref:s},[(b=o.default)===null||b===void 0?void 0:b.call(o)]),o.handler?g("div",{onClick:v,ref:l},[($=o.handler)===null||$===void 0?void 0:$.call(o)]):null]),[[Bo,X]])]})])}}}),D6=W$e;var L6=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],setup(e,t){let{emit:n,slots:o}=t;const r=he(null),i=l=>{n("handleClick",l)},a=l=>{n("close",l)};return()=>{const{getContainer:l,wrapperClassName:s,rootClassName:c,rootStyle:u,forceRender:d}=e,f=L6(e,["getContainer","wrapperClassName","rootClassName","rootStyle","forceRender"]);let h=null;if(!l)return g(D6,V(V({},f),{},{rootClassName:c,rootStyle:u,open:e.open,onClose:a,onHandleClick:i,inline:!0}),o);const m=!!o.handler||d;return(m||e.open||r.value)&&(h=g(Hh,{autoLock:!0,visible:e.open,forceRender:m,getContainer:l,wrapperClassName:s},{default:v=>{var{visible:y,afterClose:b}=v,$=L6(v,["visible","afterClose"]);return g(D6,V(V(V({ref:r},f),$),{},{rootClassName:c,rootStyle:u,open:y!==void 0?y:e.open,afterVisibleChange:b!==void 0?b:e.afterVisibleChange,onClose:a,onHandleClick:i}),o)}})),h}}}),K$e=V$e,U$e=e=>{const{componentCls:t,motionDurationSlow:n}=e,o={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${n}`}}};return{[t]:{[`${t}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${n}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${t}-panel-motion`]:{"&-left":[o,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[o,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[o,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[o,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}},G$e=U$e,Y$e=e=>{const{componentCls:t,zIndexPopup:n,colorBgMask:o,colorBgElevated:r,motionDurationSlow:i,motionDurationMid:a,padding:l,paddingLG:s,fontSizeLG:c,lineHeightLG:u,lineWidth:d,lineType:f,colorSplit:h,marginSM:m,colorIcon:v,colorIconHover:y,colorText:b,fontWeightStrong:$,drawerFooterPaddingVertical:x,drawerFooterPaddingHorizontal:_}=e,w=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none","&-pure":{position:"relative",background:r,[`&${t}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:n,background:o,pointerEvents:"auto"},[w]:{position:"absolute",zIndex:n,transition:`all ${i}`,"&-hidden":{display:"none"}},[`&-left > ${w}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${w}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${w}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${w}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${t}-content`]:{width:"100%",height:"100%",overflow:"auto",background:r,pointerEvents:"auto"},[`${t}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${l}px ${s}px`,fontSize:c,lineHeight:u,borderBottom:`${d}px ${f} ${h}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:{display:"inline-block",marginInlineEnd:m,color:v,fontWeight:$,fontSize:c,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${a}`,textRendering:"auto","&:focus, &:hover":{color:y,textDecoration:"none"}},[`${t}-title`]:{flex:1,margin:0,color:b,fontWeight:e.fontWeightStrong,fontSize:c,lineHeight:u},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:s,overflow:"auto"},[`${t}-footer`]:{flexShrink:0,padding:`${x}px ${_}px`,borderTop:`${d}px ${f} ${h}`},"&-rtl":{direction:"rtl"}}}},X$e=pt("Drawer",e=>{const t=nt(e,{drawerFooterPaddingVertical:e.paddingXS,drawerFooterPaddingHorizontal:e.padding});return[Y$e(t),G$e(t)]},e=>({zIndexPopup:e.zIndexPopupBase}));var q$e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:Z.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:{type:[String,Function,Boolean,Object],default:void 0},maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:qe(),rootClassName:String,rootStyle:qe(),size:{type:String},drawerStyle:qe(),headerStyle:qe(),bodyStyle:qe(),contentWrapperStyle:{type:Object,default:void 0},title:Z.any,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},width:Z.oneOfType([Z.string,Z.number]),height:Z.oneOfType([Z.string,Z.number]),zIndex:Number,prefixCls:String,push:Z.oneOfType([Z.looseBool,{type:Object}]),placement:Z.oneOf(Z$e),keyboard:{type:Boolean,default:void 0},extra:Z.any,footer:Z.any,footerStyle:qe(),level:Z.any,levelMove:{type:[Number,Array,Function]},handle:Z.any,afterVisibleChange:Function,onAfterVisibleChange:Function,onAfterOpenChange:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onClose:Function}),J$e=pe({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:bt(Q$e(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:N6}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const i=ve(!1),a=ve(!1),l=ve(null),s=ve(!1),c=ve(!1),u=M(()=>{var z;return(z=e.open)!==null&&z!==void 0?z:e.visible});Ie(u,()=>{u.value?s.value=!0:c.value=!1},{immediate:!0}),Ie([u,s],()=>{u.value&&s.value&&(c.value=!0)},{immediate:!0});const d=it("parentDrawerOpts",null),{prefixCls:f,getPopupContainer:h,direction:m}=Ve("drawer",e),[v,y]=X$e(f),b=M(()=>e.getContainer===void 0&&(h!=null&&h.value)?()=>h.value(document.body):e.getContainer);pn(!e.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),ft("parentDrawerOpts",{setPush:()=>{i.value=!0},setPull:()=>{i.value=!1,wt(()=>{_()})}}),lt(()=>{u.value&&d&&d.setPush()}),Fo(()=>{d&&d.setPull()}),Ie(c,()=>{d&&(c.value?d.setPush():d.setPull())},{flush:"post"});const _=()=>{var z,K;(K=(z=l.value)===null||z===void 0?void 0:z.domFocus)===null||K===void 0||K.call(z)},w=z=>{n("update:visible",!1),n("update:open",!1),n("close",z)},I=z=>{var K;z||(a.value===!1&&(a.value=!0),e.destroyOnClose&&(s.value=!1)),(K=e.afterVisibleChange)===null||K===void 0||K.call(e,z),n("afterVisibleChange",z),n("afterOpenChange",z)},O=M(()=>{const{push:z,placement:K}=e;let G;return typeof z=="boolean"?G=z?N6.distance:0:G=z.distance,G=parseFloat(String(G||0)),K==="left"||K==="right"?`translateX(${K==="left"?G:-G}px)`:K==="top"||K==="bottom"?`translateY(${K==="top"?G:-G}px)`:null}),P=M(()=>{var z;return(z=e.width)!==null&&z!==void 0?z:e.size==="large"?736:378}),E=M(()=>{var z;return(z=e.height)!==null&&z!==void 0?z:e.size==="large"?736:378}),R=M(()=>{const{mask:z,placement:K}=e;if(!c.value&&!z)return{};const G={};return K==="left"||K==="right"?G.width=O0(P.value)?`${P.value}px`:P.value:G.height=O0(E.value)?`${E.value}px`:E.value,G}),A=M(()=>{const{zIndex:z,contentWrapperStyle:K}=e,G=R.value;return[{zIndex:z,transform:i.value?O.value:void 0},S({},K),G]}),N=z=>{const{closable:K,headerStyle:G}=e,Y=lo(o,e,"extra"),ne=lo(o,e,"title");return!ne&&!K?null:g("div",{class:me(`${z}-header`,{[`${z}-header-close-only`]:K&&!ne&&!Y}),style:G},[g("div",{class:`${z}-header-title`},[F(z),ne&&g("div",{class:`${z}-title`},[ne])]),Y&&g("div",{class:`${z}-extra`},[Y])])},F=z=>{var K;const{closable:G}=e,Y=o.closeIcon?(K=o.closeIcon)===null||K===void 0?void 0:K.call(o):e.closeIcon;return G&&g("button",{key:"closer",onClick:w,"aria-label":"Close",class:`${z}-close`},[Y===void 0?g(Vr,null,null):Y])},W=z=>{var K;if(a.value&&!e.forceRender&&!s.value)return null;const{bodyStyle:G,drawerStyle:Y}=e;return g("div",{class:`${z}-wrapper-body`,style:Y},[N(z),g("div",{key:"body",class:`${z}-body`,style:G},[(K=o.default)===null||K===void 0?void 0:K.call(o)]),D(z)])},D=z=>{const K=lo(o,e,"footer");if(!K)return null;const G=`${z}-footer`;return g("div",{class:G,style:e.footerStyle},[K])},B=M(()=>me({"no-mask":!e.mask,[`${f.value}-rtl`]:m.value==="rtl"},e.rootClassName,y.value)),k=M(()=>Hi(dr(f.value,"mask-motion"))),L=z=>Hi(dr(f.value,`panel-motion-${z}`));return()=>{const{width:z,height:K,placement:G,mask:Y,forceRender:ne}=e,re=q$e(e,["width","height","placement","mask","forceRender"]),J=S(S(S({},r),_t(re,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","onAfterVisibleChange","onClose","onUpdate:visible","onUpdate:open","visible"])),{forceRender:ne,onClose:w,afterVisibleChange:I,handler:!1,prefixCls:f.value,open:c.value,showMask:Y,placement:G,ref:l});return v(g(dh,null,{default:()=>[g(K$e,V(V({},J),{},{maskMotion:k.value,motion:L,width:P.value,height:E.value,getContainer:b.value,rootClassName:B.value,rootStyle:e.rootStyle,contentWrapperStyle:A.value}),{handler:e.handle?()=>e.handle:o.handle,default:()=>W(f.value)})]}))}}}),exe=$n(J$e);var txe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};const nxe=txe;function k6(e){for(var t=1;t({prefixCls:String,description:Z.any,type:Qe("default"),shape:Qe("circle"),tooltip:Z.any,href:String,target:Oe(),badge:qe(),onClick:Oe()}),rxe=()=>({prefixCls:Qe()}),ixe=()=>S(S({},tI()),{trigger:Qe(),open:De(),onOpenChange:Oe(),"onUpdate:open":Oe()}),axe=()=>S(S({},tI()),{prefixCls:String,duration:Number,target:Oe(),visibilityHeight:Number,onClick:Oe()}),lxe=pe({compatConfig:{MODE:3},name:"AFloatButtonContent",inheritAttrs:!1,props:rxe(),setup(e,t){let{attrs:n,slots:o}=t;return()=>{var r;const{prefixCls:i}=e,a=_n((r=o.description)===null||r===void 0?void 0:r.call(o));return g("div",V(V({},n),{},{class:[n.class,`${i}-content`]}),[o.icon||a.length?g(Je,null,[o.icon&&g("div",{class:`${i}-icon`},[o.icon()]),a.length?g("div",{class:`${i}-description`},[a]):null]):g("div",{class:`${i}-icon`},[g(bH,null,null)])])}}}),sxe=lxe,yH=Symbol("floatButtonGroupContext"),cxe=e=>(ft(yH,e),e),SH=()=>it(yH,{shape:he()}),B6=e=>e===0?0:e-Math.sqrt(Math.pow(e,2)/2),uxe=e=>{const{componentCls:t,floatButtonSize:n,motionDurationSlow:o,motionEaseInOutCirc:r}=e,i=`${t}-group`,a=new Pt("antFloatButtonMoveDownIn",{"0%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),l=new Pt("antFloatButtonMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0}});return[{[`${i}-wrap`]:S({},Vh(`${i}-wrap`,a,l,o,!0))},{[`${i}-wrap`]:{[` + &${i}-wrap-enter, + &${i}-wrap-appear + `]:{opacity:0,animationTimingFunction:r},[`&${i}-wrap-leave`]:{animationTimingFunction:r}}}]},dxe=e=>{const{antCls:t,componentCls:n,floatButtonSize:o,margin:r,borderRadiusLG:i,borderRadiusSM:a,badgeOffset:l,floatButtonBodyPadding:s}=e,c=`${n}-group`;return{[c]:S(S({},vt(e)),{zIndex:99,display:"block",border:"none",position:"fixed",width:o,height:"auto",boxShadow:"none",minHeight:o,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,borderRadius:i,[`${c}-wrap`]:{zIndex:-1,display:"block",position:"relative",marginBottom:r},[`&${c}-rtl`]:{direction:"rtl"},[n]:{position:"static"}}),[`${c}-circle`]:{[`${n}-circle:not(:last-child)`]:{marginBottom:e.margin,[`${n}-body`]:{width:o,height:o,borderRadius:"50%"}}},[`${c}-square`]:{[`${n}-square`]:{borderRadius:0,padding:0,"&:first-child":{borderStartStartRadius:i,borderStartEndRadius:i},"&:last-child":{borderEndStartRadius:i,borderEndEndRadius:i},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-badge`]:{[`${t}-badge-count`]:{top:-(s+l),insetInlineEnd:-(s+l)}}},[`${c}-wrap`]:{display:"block",borderRadius:i,boxShadow:e.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",marginTop:0,borderRadius:0,padding:s,"&:first-child":{borderStartStartRadius:i,borderStartEndRadius:i},"&:last-child":{borderEndStartRadius:i,borderEndEndRadius:i},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${n}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize}}}},[`${c}-circle-shadow`]:{boxShadow:"none"},[`${c}-square-shadow`]:{boxShadow:e.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",padding:s,[`${n}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize,borderRadius:a}}}}},fxe=e=>{const{antCls:t,componentCls:n,floatButtonBodyPadding:o,floatButtonIconSize:r,floatButtonSize:i,borderRadiusLG:a,badgeOffset:l,dotOffsetInSquare:s,dotOffsetInCircle:c}=e;return{[n]:S(S({},vt(e)),{border:"none",position:"fixed",cursor:"pointer",zIndex:99,display:"block",justifyContent:"center",alignItems:"center",width:i,height:i,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,boxShadow:e.boxShadowSecondary,"&-pure":{position:"relative",inset:"auto"},"&:empty":{display:"none"},[`${t}-badge`]:{width:"100%",height:"100%",[`${t}-badge-count`]:{transform:"translate(0, 0)",transformOrigin:"center",top:-l,insetInlineEnd:-l}},[`${n}-body`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",transition:`all ${e.motionDurationMid}`,[`${n}-content`]:{overflow:"hidden",textAlign:"center",minHeight:i,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:`${o/2}px ${o}px`,[`${n}-icon`]:{textAlign:"center",margin:"auto",width:r,fontSize:r,lineHeight:1}}}}),[`${n}-rtl`]:{direction:"rtl"},[`${n}-circle`]:{height:i,borderRadius:"50%",[`${t}-badge`]:{[`${t}-badge-dot`]:{top:c,insetInlineEnd:c}},[`${n}-body`]:{borderRadius:"50%"}},[`${n}-square`]:{height:"auto",minHeight:i,borderRadius:a,[`${t}-badge`]:{[`${t}-badge-dot`]:{top:s,insetInlineEnd:s}},[`${n}-body`]:{height:"auto",borderRadius:a}},[`${n}-default`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,[`${n}-body`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorFillContent},[`${n}-content`]:{[`${n}-icon`]:{color:e.colorText},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${e.fontSizeLG}px`,color:e.colorText,fontSize:e.fontSizeSM}}}},[`${n}-primary`]:{backgroundColor:e.colorPrimary,[`${n}-body`]:{backgroundColor:e.colorPrimary,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorPrimaryHover},[`${n}-content`]:{[`${n}-icon`]:{color:e.colorTextLightSolid},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${e.fontSizeLG}px`,color:e.colorTextLightSolid,fontSize:e.fontSizeSM}}}}}},nI=pt("FloatButton",e=>{const{colorTextLightSolid:t,colorBgElevated:n,controlHeightLG:o,marginXXL:r,marginLG:i,fontSize:a,fontSizeIcon:l,controlItemBgHover:s,paddingXXS:c,borderRadiusLG:u}=e,d=nt(e,{floatButtonBackgroundColor:n,floatButtonColor:t,floatButtonHoverBackgroundColor:s,floatButtonFontSize:a,floatButtonIconSize:l*1.5,floatButtonSize:o,floatButtonInsetBlockEnd:r,floatButtonInsetInlineEnd:i,floatButtonBodySize:o-c*2,floatButtonBodyPadding:c,badgeOffset:c*1.5,dotOffsetInCircle:B6(o/2),dotOffsetInSquare:B6(u)});return[dxe(d),fxe(d),E_(e),uxe(d)]});var pxe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r(s==null?void 0:s.value)||e.shape);return()=>{var d;const{prefixCls:f,type:h="default",shape:m="circle",description:v=(d=o.description)===null||d===void 0?void 0:d.call(o),tooltip:y,badge:b={}}=e,$=pxe(e,["prefixCls","type","shape","description","tooltip","badge"]),x=me(r.value,`${r.value}-${h}`,`${r.value}-${u.value}`,{[`${r.value}-rtl`]:i.value==="rtl"},n.class,l.value),_=g(Br,{placement:"left"},{title:o.tooltip||y?()=>o.tooltip&&o.tooltip()||y:void 0,default:()=>g(xp,b,{default:()=>[g("div",{class:`${r.value}-body`},[g(sxe,{prefixCls:r.value},{icon:o.icon,description:()=>v})])]})});return a(e.href?g("a",V(V(V({ref:c},n),$),{},{class:x}),[_]):g("button",V(V(V({ref:c},n),$),{},{class:x,type:"button"}),[_]))}}}),Ss=hxe,gxe=pe({compatConfig:{MODE:3},name:"AFloatButtonGroup",inheritAttrs:!1,props:bt(ixe(),{type:"default",shape:"circle"}),setup(e,t){let{attrs:n,slots:o,emit:r}=t;const{prefixCls:i,direction:a}=Ve(oI,e),[l,s]=nI(i),[c,u]=yn(!1,{value:M(()=>e.open)}),d=he(null),f=he(null);cxe({shape:M(()=>e.shape)});const h={onMouseenter(){var b;u(!0),r("update:open",!0),(b=e.onOpenChange)===null||b===void 0||b.call(e,!0)},onMouseleave(){var b;u(!1),r("update:open",!1),(b=e.onOpenChange)===null||b===void 0||b.call(e,!1)}},m=M(()=>e.trigger==="hover"?h:{}),v=()=>{var b;const $=!c.value;r("update:open",$),(b=e.onOpenChange)===null||b===void 0||b.call(e,$),u($)},y=b=>{var $,x,_;if(!(($=d.value)===null||$===void 0)&&$.contains(b.target)){!((x=Nr(f.value))===null||x===void 0)&&x.contains(b.target)&&v();return}u(!1),r("update:open",!1),(_=e.onOpenChange)===null||_===void 0||_.call(e,!1)};return Ie(M(()=>e.trigger),b=>{ur()&&(document.removeEventListener("click",y),b==="click"&&document.addEventListener("click",y))},{immediate:!0}),Ct(()=>{document.removeEventListener("click",y)}),()=>{var b;const{shape:$="circle",type:x="default",tooltip:_,description:w,trigger:I}=e,O=`${i.value}-group`,P=me(O,s.value,n.class,{[`${O}-rtl`]:a.value==="rtl",[`${O}-${$}`]:$,[`${O}-${$}-shadow`]:!I}),E=me(s.value,`${O}-wrap`),R=Hi(`${O}-wrap`);return l(g("div",V(V({ref:d},n),{},{class:P},m.value),[I&&["click","hover"].includes(I)?g(Je,null,[g(so,R,{default:()=>[Ln(g("div",{class:E},[o.default&&o.default()]),[[Bo,c.value]])]}),g(Ss,{ref:f,type:x,shape:$,tooltip:_,description:w},{icon:()=>{var A,N;return c.value?((A=o.closeIcon)===null||A===void 0?void 0:A.call(o))||g(Vr,null,null):((N=o.icon)===null||N===void 0?void 0:N.call(o))||g(bH,null,null)},tooltip:o.tooltip,description:o.description})]):(b=o.default)===null||b===void 0?void 0:b.call(o)]))}}}),V0=gxe;var vxe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"};const mxe=vxe;function F6(e){for(var t=1;twindow,duration:450,type:"default",shape:"circle"}),setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,direction:a}=Ve(oI,e),[l]=nI(i),s=he(),c=St({visible:e.visibilityHeight===0,scrollEvent:null}),u=()=>s.value&&s.value.ownerDocument?s.value.ownerDocument:window,d=y=>{const{target:b=u,duration:$}=e;F2(0,{getContainer:b,duration:$}),r("click",y)},f=V$(y=>{const{visibilityHeight:b}=e,$=B2(y.target,!0);c.visible=$>=b}),h=()=>{const{target:y}=e,$=(y||u)();f({target:$}),$==null||$.addEventListener("scroll",f)},m=()=>{const{target:y}=e,$=(y||u)();f.cancel(),$==null||$.removeEventListener("scroll",f)};Ie(()=>e.target,()=>{m(),wt(()=>{h()})}),lt(()=>{wt(()=>{h()})}),Pb(()=>{wt(()=>{h()})}),rN(()=>{m()}),Ct(()=>{m()});const v=SH();return()=>{const{description:y,type:b,shape:$,tooltip:x,badge:_}=e,w=S(S({},o),{shape:(v==null?void 0:v.shape.value)||$,onClick:d,class:{[`${i.value}`]:!0,[`${o.class}`]:o.class,[`${i.value}-rtl`]:a.value==="rtl"},description:y,type:b,tooltip:x,badge:_}),I=Hi("fade");return l(g(so,I,{default:()=>[Ln(g(Ss,V(V({},w),{},{ref:s}),{icon:()=>{var O;return((O=n.icon)===null||O===void 0?void 0:O.call(n))||g(yxe,null,null)}}),[[Bo,c.visible]])]}))}}}),K0=Sxe;Ss.Group=V0;Ss.BackTop=K0;Ss.install=function(e){return e.component(Ss.name,Ss),e.component(V0.name,V0),e.component(K0.name,K0),e};const Ep=e=>e!=null&&(Array.isArray(e)?_n(e).length:!0);function iI(e){return Ep(e.prefix)||Ep(e.suffix)||Ep(e.allowClear)}function Im(e){return Ep(e.addonBefore)||Ep(e.addonAfter)}function Xx(e){return typeof e>"u"||e===null?"":String(e)}function Ap(e,t,n,o){if(!n)return;const r=t;if(t.type==="click"){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0});const i=e.cloneNode(!0);r.target=i,r.currentTarget=i,i.value="",n(r);return}if(o!==void 0){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0}),r.target=e,r.currentTarget=e,e.value=o,n(r);return}n(r)}function CH(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n){const o=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}const Cxe=()=>({addonBefore:Z.any,addonAfter:Z.any,prefix:Z.any,suffix:Z.any,clearIcon:Z.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),$H=()=>S(S({},Cxe()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:Z.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),xH=()=>S(S({},$H()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Qe("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),$xe=pe({name:"BaseInput",inheritAttrs:!1,props:$H(),setup(e,t){let{slots:n,attrs:o}=t;const r=he(),i=l=>{var s;if(!((s=r.value)===null||s===void 0)&&s.contains(l.target)){const{triggerFocus:c}=e;c==null||c()}},a=()=>{var l;const{allowClear:s,value:c,disabled:u,readonly:d,handleReset:f,suffix:h=n.suffix,prefixCls:m}=e;if(!s)return null;const v=!u&&!d&&c,y=`${m}-clear-icon`,b=((l=n.clearIcon)===null||l===void 0?void 0:l.call(n))||"*";return g("span",{onClick:f,onMousedown:$=>$.preventDefault(),class:me({[`${y}-hidden`]:!v,[`${y}-has-suffix`]:!!h},y),role:"button",tabindex:-1},[b])};return()=>{var l,s;const{focused:c,value:u,disabled:d,allowClear:f,readonly:h,hidden:m,prefixCls:v,prefix:y=(l=n.prefix)===null||l===void 0?void 0:l.call(n),suffix:b=(s=n.suffix)===null||s===void 0?void 0:s.call(n),addonAfter:$=n.addonAfter,addonBefore:x=n.addonBefore,inputElement:_,affixWrapperClassName:w,wrapperClassName:I,groupClassName:O}=e;let P=Gt(_,{value:u,hidden:m});if(iI({prefix:y,suffix:b,allowClear:f})){const E=`${v}-affix-wrapper`,R=me(E,{[`${E}-disabled`]:d,[`${E}-focused`]:c,[`${E}-readonly`]:h,[`${E}-input-with-clear-btn`]:b&&f&&u},!Im({addonAfter:$,addonBefore:x})&&o.class,w),A=(b||f)&&g("span",{class:`${v}-suffix`},[a(),b]);P=g("span",{class:R,style:o.style,hidden:!Im({addonAfter:$,addonBefore:x})&&m,onMousedown:i,ref:r},[y&&g("span",{class:`${v}-prefix`},[y]),Gt(_,{style:null,value:u,hidden:null}),A])}if(Im({addonAfter:$,addonBefore:x})){const E=`${v}-group`,R=`${E}-addon`,A=me(`${v}-wrapper`,E,I),N=me(`${v}-group-wrapper`,o.class,O);return g("span",{class:N,style:o.style,hidden:m},[g("span",{class:A},[x&&g("span",{class:R},[x]),Gt(P,{style:null,hidden:null}),$&&g("span",{class:R},[$])])])}return P}}});var xxe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.value,()=>{a.value=e.value}),Ie(()=>e.disabled,()=>{e.disabled&&(l.value=!1)});const u=O=>{s.value&&CH(s.value,O)};r({focus:u,blur:()=>{var O;(O=s.value)===null||O===void 0||O.blur()},input:s,stateValue:a,setSelectionRange:(O,P,E)=>{var R;(R=s.value)===null||R===void 0||R.setSelectionRange(O,P,E)},select:()=>{var O;(O=s.value)===null||O===void 0||O.select()}});const m=O=>{i("change",O)},v=(O,P)=>{a.value!==O&&(e.value===void 0?a.value=O:wt(()=>{var E;s.value.value!==a.value&&((E=c.value)===null||E===void 0||E.$forceUpdate())}),wt(()=>{P&&P()}))},y=O=>{const{value:P,composing:E}=O.target;if((O.isComposing||E)&&e.lazy||a.value===P)return;const R=O.target.value;Ap(s.value,O,m),v(R)},b=O=>{O.keyCode===13&&i("pressEnter",O),i("keydown",O)},$=O=>{l.value=!0,i("focus",O)},x=O=>{l.value=!1,i("blur",O)},_=O=>{Ap(s.value,O,m),v("",()=>{u()})},w=()=>{var O,P;const{addonBefore:E=n.addonBefore,addonAfter:R=n.addonAfter,disabled:A,valueModifiers:N={},htmlSize:F,autocomplete:W,prefixCls:D,inputClassName:B,prefix:k=(O=n.prefix)===null||O===void 0?void 0:O.call(n),suffix:L=(P=n.suffix)===null||P===void 0?void 0:P.call(n),allowClear:z,type:K="text"}=e,G=_t(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),Y=S(S(S({},G),o),{autocomplete:W,onChange:y,onInput:y,onFocus:$,onBlur:x,onKeydown:b,class:me(D,{[`${D}-disabled`]:A},B,!Im({addonAfter:R,addonBefore:E})&&!iI({prefix:k,suffix:L,allowClear:z})&&o.class),ref:s,key:"ant-input",size:F,type:K});N.lazy&&delete Y.onInput,Y.autofocus||delete Y.autofocus;const ne=g("input",_t(Y,["size"]),null);return Ln(ne,[[nf]])},I=()=>{var O;const{maxlength:P,suffix:E=(O=n.suffix)===null||O===void 0?void 0:O.call(n),showCount:R,prefixCls:A}=e,N=Number(P)>0;if(E||R){const F=[...Xx(a.value)].length,W=typeof R=="object"?R.formatter({count:F,maxlength:P}):`${F}${N?` / ${P}`:""}`;return g(Je,null,[!!R&&g("span",{class:me(`${A}-show-count-suffix`,{[`${A}-show-count-has-suffix`]:!!E})},[W]),E])}return null};return lt(()=>{}),()=>{const{prefixCls:O,disabled:P}=e,E=xxe(e,["prefixCls","disabled"]);return g($xe,V(V(V({},E),o),{},{ref:c,prefixCls:O,inputElement:w(),handleReset:_,value:Xx(a.value),focused:l.value,triggerFocus:u,suffix:I(),disabled:P}),n)}}}),Hy=()=>_t(xH(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),wH=()=>S(S({},_t(Hy(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Ac(),onCompositionend:Ac(),valueModifiers:Object});var _xe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rda(s.status,e.status)),{direction:u,prefixCls:d,size:f,autocomplete:h}=Ve("input",e),{compactSize:m,compactItemClassnames:v}=Ms(d,u),y=M(()=>m.value||f.value),[b,$]=PO(d),x=jr();r({focus:F=>{var W;(W=a.value)===null||W===void 0||W.focus(F)},blur:()=>{var F;(F=a.value)===null||F===void 0||F.blur()},input:a,setSelectionRange:(F,W,D)=>{var B;(B=a.value)===null||B===void 0||B.setSelectionRange(F,W,D)},select:()=>{var F;(F=a.value)===null||F===void 0||F.select()}});const P=he([]),E=()=>{P.value.push(setTimeout(()=>{var F,W,D,B;!((F=a.value)===null||F===void 0)&&F.input&&((W=a.value)===null||W===void 0?void 0:W.input.getAttribute("type"))==="password"&&(!((D=a.value)===null||D===void 0)&&D.input.hasAttribute("value"))&&((B=a.value)===null||B===void 0||B.input.removeAttribute("value"))}))};lt(()=>{E()}),Eb(()=>{P.value.forEach(F=>clearTimeout(F))}),Ct(()=>{P.value.forEach(F=>clearTimeout(F))});const R=F=>{E(),i("blur",F),l.onFieldBlur()},A=F=>{E(),i("focus",F)},N=F=>{i("update:value",F.target.value),i("change",F),i("input",F),l.onFieldChange()};return()=>{var F,W,D,B,k,L;const{hasFeedback:z,feedbackIcon:K}=s,{allowClear:G,bordered:Y=!0,prefix:ne=(F=n.prefix)===null||F===void 0?void 0:F.call(n),suffix:re=(W=n.suffix)===null||W===void 0?void 0:W.call(n),addonAfter:J=(D=n.addonAfter)===null||D===void 0?void 0:D.call(n),addonBefore:te=(B=n.addonBefore)===null||B===void 0?void 0:B.call(n),id:ee=(k=l.id)===null||k===void 0?void 0:k.value}=e,fe=_xe(e,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),ie=(z||re)&&g(Je,null,[re,z&&K]),X=d.value,ue=iI({prefix:ne,suffix:re})||!!z,ye=n.clearIcon||(()=>g(Kr,null,null));return b(g(wxe,V(V(V({},o),_t(fe,["onUpdate:value","onChange","onInput"])),{},{onChange:N,id:ee,disabled:(L=e.disabled)!==null&&L!==void 0?L:x.value,ref:a,prefixCls:X,autocomplete:h.value,onBlur:R,onFocus:A,prefix:ne,suffix:ie,allowClear:G,addonAfter:J&&g(dh,null,{default:()=>[g(S0,null,{default:()=>[J]})]}),addonBefore:te&&g(dh,null,{default:()=>[g(S0,null,{default:()=>[te]})]}),class:[o.class,v.value],inputClassName:me({[`${X}-sm`]:y.value==="small",[`${X}-lg`]:y.value==="large",[`${X}-rtl`]:u.value==="rtl",[`${X}-borderless`]:!Y},!ue&&sr(X,c.value),$.value),affixWrapperClassName:me({[`${X}-affix-wrapper-sm`]:y.value==="small",[`${X}-affix-wrapper-lg`]:y.value==="large",[`${X}-affix-wrapper-rtl`]:u.value==="rtl",[`${X}-affix-wrapper-borderless`]:!Y},sr(`${X}-affix-wrapper`,c.value,z),$.value),wrapperClassName:me({[`${X}-group-rtl`]:u.value==="rtl"},$.value),groupClassName:me({[`${X}-group-wrapper-sm`]:y.value==="small",[`${X}-group-wrapper-lg`]:y.value==="large",[`${X}-group-wrapper-rtl`]:u.value==="rtl"},sr(`${X}-group-wrapper`,c.value,z),$.value)}),S(S({},n),{clearIcon:ye})))}}}),_H=pe({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i,getPrefixCls:a}=Ve("input-group",e),l=To.useInject();To.useProvide(l,{isFormItemInput:!1});const s=M(()=>a("input")),[c,u]=PO(s),d=M(()=>{const f=r.value;return{[`${f}`]:!0,[u.value]:!0,[`${f}-lg`]:e.size==="large",[`${f}-sm`]:e.size==="small",[`${f}-compact`]:e.compact,[`${f}-rtl`]:i.value==="rtl"}});return()=>{var f;return c(g("span",V(V({},o),{},{class:me(d.value,o.class)}),[(f=n.default)===null||f===void 0?void 0:f.call(n)]))}}});var Oxe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var w;(w=a.value)===null||w===void 0||w.focus()},blur:()=>{var w;(w=a.value)===null||w===void 0||w.blur()}});const u=w=>{i("update:value",w.target.value),w&&w.target&&w.type==="click"&&i("search",w.target.value,w),i("change",w)},d=w=>{var I;document.activeElement===((I=a.value)===null||I===void 0?void 0:I.input)&&w.preventDefault()},f=w=>{var I,O;i("search",(O=(I=a.value)===null||I===void 0?void 0:I.input)===null||O===void 0?void 0:O.stateValue,w)},h=w=>{l.value||e.loading||f(w)},m=w=>{l.value=!0,i("compositionstart",w)},v=w=>{l.value=!1,i("compositionend",w)},{prefixCls:y,getPrefixCls:b,direction:$,size:x}=Ve("input-search",e),_=M(()=>b("input",e.inputPrefixCls));return()=>{var w,I,O,P;const{disabled:E,loading:R,addonAfter:A=(w=n.addonAfter)===null||w===void 0?void 0:w.call(n),suffix:N=(I=n.suffix)===null||I===void 0?void 0:I.call(n)}=e,F=Oxe(e,["disabled","loading","addonAfter","suffix"]);let{enterButton:W=(P=(O=n.enterButton)===null||O===void 0?void 0:O.call(n))!==null&&P!==void 0?P:!1}=e;W=W||W==="";const D=typeof W=="boolean"?g(cy,null,null):null,B=`${y.value}-button`,k=Array.isArray(W)?W[0]:W;let L;const z=k.type&&py(k.type)&&k.type.__ANT_BUTTON;if(z||k.tagName==="button")L=Gt(k,S({onMousedown:d,onClick:f,key:"enterButton"},z?{class:B,size:x.value}:{}),!1);else{const G=D&&!W;L=g(Un,{class:B,type:W?"primary":void 0,size:x.value,disabled:E,key:"enterButton",onMousedown:d,onClick:f,loading:R,icon:G?D:null},{default:()=>[G?null:D||W]})}A&&(L=[L,A]);const K=me(y.value,{[`${y.value}-rtl`]:$.value==="rtl",[`${y.value}-${x.value}`]:!!x.value,[`${y.value}-with-button`]:!!W},o.class);return g(uo,V(V(V({ref:a},_t(F,["onUpdate:value","onSearch","enterButton"])),o),{},{onPressEnter:h,onCompositionstart:m,onCompositionend:v,size:x.value,prefixCls:_.value,addonAfter:L,suffix:N,onChange:u,class:K,disabled:E}),n)}}}),H6=e=>e!=null&&(Array.isArray(e)?_n(e).length:!0);function Ixe(e){return H6(e.addonBefore)||H6(e.addonAfter)}const Pxe=["text","input"],Txe=pe({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:Z.oneOf(Go("text","input")),value:cn(),defaultValue:cn(),allowClear:{type:Boolean,default:void 0},element:cn(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:cn(),prefix:cn(),addonBefore:cn(),addonAfter:cn(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(e,t){let{slots:n,attrs:o}=t;const r=To.useInject(),i=l=>{const{value:s,disabled:c,readonly:u,handleReset:d,suffix:f=n.suffix}=e,h=!c&&!u&&s,m=`${l}-clear-icon`;return g(Kr,{onClick:d,onMousedown:v=>v.preventDefault(),class:me({[`${m}-hidden`]:!h,[`${m}-has-suffix`]:!!f},m),role:"button"},null)},a=(l,s)=>{const{value:c,allowClear:u,direction:d,bordered:f,hidden:h,status:m,addonAfter:v=n.addonAfter,addonBefore:y=n.addonBefore,hashId:b}=e,{status:$,hasFeedback:x}=r;if(!u)return Gt(s,{value:c,disabled:e.disabled});const _=me(`${l}-affix-wrapper`,`${l}-affix-wrapper-textarea-with-clear-btn`,sr(`${l}-affix-wrapper`,da($,m),x),{[`${l}-affix-wrapper-rtl`]:d==="rtl",[`${l}-affix-wrapper-borderless`]:!f,[`${o.class}`]:!Ixe({addonAfter:v,addonBefore:y})&&o.class},b);return g("span",{class:_,style:o.style,hidden:h},[Gt(s,{style:null,value:c,disabled:e.disabled}),i(l)])};return()=>{var l;const{prefixCls:s,inputType:c,element:u=(l=n.element)===null||l===void 0?void 0:l.call(n)}=e;return c===Pxe[0]?a(s,u):null}}}),Exe=` + min-height:0 !important; + max-height:none !important; + height:0 !important; + visibility:hidden !important; + overflow:hidden !important; + position:absolute !important; + z-index:-1000 !important; + top:0 !important; + right:0 !important; + pointer-events: none !important; +`,Axe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],AC={};let Oi;function Mxe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&AC[n])return AC[n];const o=window.getComputedStyle(e),r=o.getPropertyValue("box-sizing")||o.getPropertyValue("-moz-box-sizing")||o.getPropertyValue("-webkit-box-sizing"),i=parseFloat(o.getPropertyValue("padding-bottom"))+parseFloat(o.getPropertyValue("padding-top")),a=parseFloat(o.getPropertyValue("border-bottom-width"))+parseFloat(o.getPropertyValue("border-top-width")),s={sizingStyle:Axe.map(c=>`${c}:${o.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:r};return t&&n&&(AC[n]=s),s}function Rxe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Oi||(Oi=document.createElement("textarea"),Oi.setAttribute("tab-index","-1"),Oi.setAttribute("aria-hidden","true"),document.body.appendChild(Oi)),e.getAttribute("wrap")?Oi.setAttribute("wrap",e.getAttribute("wrap")):Oi.removeAttribute("wrap");const{paddingSize:r,borderSize:i,boxSizing:a,sizingStyle:l}=Mxe(e,t);Oi.setAttribute("style",`${l};${Exe}`),Oi.value=e.value||e.placeholder||"";let s,c,u,d=Oi.scrollHeight;if(a==="border-box"?d+=i:a==="content-box"&&(d-=r),n!==null||o!==null){Oi.value=" ";const h=Oi.scrollHeight-r;n!==null&&(s=h*n,a==="border-box"&&(s=s+r+i),d=Math.max(s,d)),o!==null&&(c=h*o,a==="border-box"&&(c=c+r+i),u=d>c?"":"hidden",d=Math.min(c,d))}const f={height:`${d}px`,overflowY:u,resize:"none"};return s&&(f.minHeight=`${s}px`),c&&(f.maxHeight=`${c}px`),f}const MC=0,RC=1,DC=2,Dxe=pe({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:wH(),setup(e,t){let{attrs:n,emit:o,expose:r}=t,i,a;const l=he(),s=he({}),c=he(DC);Ct(()=>{mt.cancel(i),mt.cancel(a)});const u=()=>{try{if(document.activeElement===l.value){const I=l.value.selectionStart,O=l.value.selectionEnd,P=l.value.scrollTop;l.value.setSelectionRange(I,O),l.value.scrollTop=P}}catch{}},d=he(),f=he();ct(()=>{const I=e.autoSize||e.autosize;I?(d.value=I.minRows,f.value=I.maxRows):(d.value=void 0,f.value=void 0)});const h=M(()=>!!(e.autoSize||e.autosize)),m=()=>{c.value=MC};Ie([()=>e.value,d,f,h],()=>{h.value&&m()},{immediate:!0,flush:"post"});const v=he();Ie([c,l],()=>{if(l.value)if(c.value===MC)c.value=RC;else if(c.value===RC){const I=Rxe(l.value,!1,d.value,f.value);c.value=DC,v.value=I}else u()},{immediate:!0,flush:"post"});const y=Nn(),b=he(),$=()=>{mt.cancel(b.value)},x=I=>{c.value===DC&&(o("resize",I),h.value&&($(),b.value=mt(()=>{m()})))};Ct(()=>{$()}),r({resizeTextarea:()=>{m()},textArea:l,instance:y}),Sn(e.autosize===void 0);const w=()=>{const{prefixCls:I,disabled:O}=e,P=_t(e,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","lazy","maxlength","valueModifiers"]),E=me(I,n.class,{[`${I}-disabled`]:O}),R=h.value?v.value:null,A=[n.style,s.value,R],N=S(S(S({},P),n),{style:A,class:E});return(c.value===MC||c.value===RC)&&A.push({overflowX:"hidden",overflowY:"hidden"}),N.autofocus||delete N.autofocus,N.rows===0&&delete N.rows,g(ki,{onResize:x,disabled:!h.value},{default:()=>[Ln(g("textarea",V(V({},N),{},{ref:l}),null),[[nf]])]})};return()=>w()}}),Lxe=Dxe;function IH(e,t){return[...e||""].slice(0,t).join("")}function z6(e,t,n,o){let r=n;return e?r=IH(n,o):[...t||""].lengtho&&(r=t),r}const aI=pe({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:wH(),setup(e,t){let{attrs:n,expose:o,emit:r}=t;const i=co(),a=To.useInject(),l=M(()=>da(a.status,e.status)),s=ve(e.value===void 0?e.defaultValue:e.value),c=ve(),u=ve(""),{prefixCls:d,size:f,direction:h}=Ve("input",e),[m,v]=PO(d),y=jr(),b=M(()=>e.showCount===""||e.showCount||!1),$=M(()=>Number(e.maxlength)>0),x=ve(!1),_=ve(),w=ve(0),I=L=>{x.value=!0,_.value=u.value,w.value=L.currentTarget.selectionStart,r("compositionstart",L)},O=L=>{var z;x.value=!1;let K=L.currentTarget.value;if($.value){const G=w.value>=e.maxlength+1||w.value===((z=_.value)===null||z===void 0?void 0:z.length);K=z6(G,_.value,K,e.maxlength)}K!==u.value&&(A(K),Ap(L.currentTarget,L,W,K)),r("compositionend",L)},P=Nn();Ie(()=>e.value,()=>{var L;"value"in P.vnode.props,s.value=(L=e.value)!==null&&L!==void 0?L:""});const E=L=>{var z;CH((z=c.value)===null||z===void 0?void 0:z.textArea,L)},R=()=>{var L,z;(z=(L=c.value)===null||L===void 0?void 0:L.textArea)===null||z===void 0||z.blur()},A=(L,z)=>{s.value!==L&&(e.value===void 0?s.value=L:wt(()=>{var K,G,Y;c.value.textArea.value!==u.value&&((Y=(K=c.value)===null||K===void 0?void 0:(G=K.instance).update)===null||Y===void 0||Y.call(G))}),wt(()=>{z&&z()}))},N=L=>{L.keyCode===13&&r("pressEnter",L),r("keydown",L)},F=L=>{const{onBlur:z}=e;z==null||z(L),i.onFieldBlur()},W=L=>{r("update:value",L.target.value),r("change",L),r("input",L),i.onFieldChange()},D=L=>{Ap(c.value.textArea,L,W),A("",()=>{E()})},B=L=>{const{composing:z}=L.target;let K=L.target.value;if(x.value=!!(L.isComposing||z),!(x.value&&e.lazy||s.value===K)){if($.value){const G=L.target,Y=G.selectionStart>=e.maxlength+1||G.selectionStart===K.length||!G.selectionStart;K=z6(Y,u.value,K,e.maxlength)}Ap(L.currentTarget,L,W,K),A(K)}},k=()=>{var L,z;const{class:K}=n,{bordered:G=!0}=e,Y=S(S(S({},_t(e,["allowClear"])),n),{class:[{[`${d.value}-borderless`]:!G,[`${K}`]:K&&!b.value,[`${d.value}-sm`]:f.value==="small",[`${d.value}-lg`]:f.value==="large"},sr(d.value,l.value),v.value],disabled:y.value,showCount:null,prefixCls:d.value,onInput:B,onChange:B,onBlur:F,onKeydown:N,onCompositionstart:I,onCompositionend:O});return!((L=e.valueModifiers)===null||L===void 0)&&L.lazy&&delete Y.onInput,g(Lxe,V(V({},Y),{},{id:(z=Y==null?void 0:Y.id)!==null&&z!==void 0?z:i.id.value,ref:c,maxlength:e.maxlength}),null)};return o({focus:E,blur:R,resizableTextArea:c}),ct(()=>{let L=Xx(s.value);!x.value&&$.value&&(e.value===null||e.value===void 0)&&(L=IH(L,e.maxlength)),u.value=L}),()=>{var L;const{maxlength:z,bordered:K=!0,hidden:G}=e,{style:Y,class:ne}=n,re=S(S(S({},e),n),{prefixCls:d.value,inputType:"text",handleReset:D,direction:h.value,bordered:K,style:b.value?void 0:Y,hashId:v.value,disabled:(L=e.disabled)!==null&&L!==void 0?L:y.value});let J=g(Txe,V(V({},re),{},{value:u.value,status:e.status}),{element:k});if(b.value||a.hasFeedback){const te=[...u.value].length;let ee="";typeof b.value=="object"?ee=b.value.formatter({value:u.value,count:te,maxlength:z}):ee=`${te}${$.value?` / ${z}`:""}`,J=g("div",{hidden:G,class:me(`${d.value}-textarea`,{[`${d.value}-textarea-rtl`]:h.value==="rtl",[`${d.value}-textarea-show-count`]:b.value,[`${d.value}-textarea-in-form-item`]:a.isFormItemInput},`${d.value}-textarea-show-count`,ne,v.value),style:Y,"data-count":typeof ee!="object"?ee:void 0},[J,a.hasFeedback&&g("span",{class:`${d.value}-textarea-suffix`},[a.feedbackIcon])])}return m(J)}}});var Nxe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};const kxe=Nxe;function j6(e){for(var t=1;tg(e?sI:jxe,null,null),PH=pe({compatConfig:{MODE:3},name:"AInputPassword",inheritAttrs:!1,props:S(S({},Hy()),{prefixCls:String,inputPrefixCls:String,action:{type:String,default:"click"},visibilityToggle:{type:Boolean,default:!0},visible:{type:Boolean,default:void 0},"onUpdate:visible":Function,iconRender:Function}),setup(e,t){let{slots:n,attrs:o,expose:r,emit:i}=t;const a=ve(!1),l=()=>{const{disabled:y}=e;y||(a.value=!a.value,i("update:visible",a.value))};ct(()=>{e.visible!==void 0&&(a.value=!!e.visible)});const s=ve();r({focus:()=>{var y;(y=s.value)===null||y===void 0||y.focus()},blur:()=>{var y;(y=s.value)===null||y===void 0||y.blur()}});const d=y=>{const{action:b,iconRender:$=n.iconRender||Kxe}=e,x=Vxe[b]||"",_=$(a.value),w={[x]:l,class:`${y}-icon`,key:"passwordIcon",onMousedown:I=>{I.preventDefault()},onMouseup:I=>{I.preventDefault()}};return Gt(Jn(_)?_:g("span",null,[_]),w)},{prefixCls:f,getPrefixCls:h}=Ve("input-password",e),m=M(()=>h("input",e.inputPrefixCls)),v=()=>{const{size:y,visibilityToggle:b}=e,$=Wxe(e,["size","visibilityToggle"]),x=b&&d(f.value),_=me(f.value,o.class,{[`${f.value}-${y}`]:!!y}),w=S(S(S({},_t($,["suffix","iconRender","action"])),o),{type:a.value?"text":"password",class:_,prefixCls:m.value,suffix:x});return y&&(w.size=y),g(uo,V({ref:s},w),n)};return()=>v()}});uo.Group=_H;uo.Search=OH;uo.TextArea=aI;uo.Password=PH;uo.install=function(e){return e.component(uo.name,uo),e.component(uo.Group.name,uo.Group),e.component(uo.Search.name,uo.Search),e.component(uo.TextArea.name,uo.TextArea),e.component(uo.Password.name,uo.Password),e};function Uxe(){const e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function U0(e){const t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function zy(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:Z.shape({x:Number,y:Number}).loose,title:Z.any,footer:Z.any,transitionName:String,maskTransitionName:String,animation:Z.any,maskAnimation:Z.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:Z.any,maskProps:Z.any,wrapProps:Z.any,getContainer:Z.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:Z.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function V6(e,t,n){let o=t;return!o&&n&&(o=`${e}-${n}`),o}let K6=-1;function Gxe(){return K6+=1,K6}function U6(e,t){let n=e[`page${t?"Y":"X"}Offset`];const o=`scroll${t?"Top":"Left"}`;if(typeof n!="number"){const r=e.document;n=r.documentElement[o],typeof n!="number"&&(n=r.body[o])}return n}function Yxe(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},o=e.ownerDocument,r=o.defaultView||o.parentWindow;return n.left+=U6(r),n.top+=U6(r,!0),n}const G6={width:0,height:0,overflow:"hidden",outline:"none"},Xxe=pe({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:S(S({},zy()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(e,t){let{expose:n,slots:o,attrs:r}=t;const i=he(),a=he(),l=he();n({focus:()=>{var f;(f=i.value)===null||f===void 0||f.focus()},changeActive:f=>{const{activeElement:h}=document;f&&h===a.value?i.value.focus():!f&&h===i.value&&a.value.focus()}});const s=he(),c=M(()=>{const{width:f,height:h}=e,m={};return f!==void 0&&(m.width=typeof f=="number"?`${f}px`:f),h!==void 0&&(m.height=typeof h=="number"?`${h}px`:h),s.value&&(m.transformOrigin=s.value),m}),u=()=>{wt(()=>{if(l.value){const f=Yxe(l.value);s.value=e.mousePosition?`${e.mousePosition.x-f.left}px ${e.mousePosition.y-f.top}px`:""}})},d=f=>{e.onVisibleChanged(f)};return()=>{var f,h,m,v;const{prefixCls:y,footer:b=(f=o.footer)===null||f===void 0?void 0:f.call(o),title:$=(h=o.title)===null||h===void 0?void 0:h.call(o),ariaId:x,closable:_,closeIcon:w=(m=o.closeIcon)===null||m===void 0?void 0:m.call(o),onClose:I,bodyStyle:O,bodyProps:P,onMousedown:E,onMouseup:R,visible:A,modalRender:N=o.modalRender,destroyOnClose:F,motionName:W}=e;let D;b&&(D=g("div",{class:`${y}-footer`},[b]));let B;$&&(B=g("div",{class:`${y}-header`},[g("div",{class:`${y}-title`,id:x},[$])]));let k;_&&(k=g("button",{type:"button",onClick:I,"aria-label":"Close",class:`${y}-close`},[w||g("span",{class:`${y}-close-x`},null)]));const L=g("div",{class:`${y}-content`},[k,B,g("div",V({class:`${y}-body`,style:O},P),[(v=o.default)===null||v===void 0?void 0:v.call(o)]),D]),z=Hi(W);return g(so,V(V({},z),{},{onBeforeEnter:u,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[A||!F?Ln(g("div",V(V({},r),{},{ref:l,key:"dialog-element",role:"document",style:[c.value,r.style],class:[y,r.class],onMousedown:E,onMouseup:R}),[g("div",{tabindex:0,ref:i,style:G6,"aria-hidden":"true"},null),N?N({originVNode:L}):L,g("div",{tabindex:0,ref:a,style:G6,"aria-hidden":"true"},null)]),[[Bo,A]]):null]})}}}),qxe=pe({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(e,t){return()=>{const{prefixCls:n,visible:o,maskProps:r,motionName:i}=e,a=Hi(i);return g(so,a,{default:()=>[Ln(g("div",V({class:`${n}-mask`},r),null),[[Bo,o]])]})}}}),Y6=pe({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:bt(S(S({},zy()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(e,t){let{attrs:n,slots:o}=t;const r=ve(),i=ve(),a=ve(),l=ve(e.visible),s=ve(`vcDialogTitle${Gxe()}`),c=b=>{var $,x;if(b)ss(i.value,document.activeElement)||(r.value=document.activeElement,($=a.value)===null||$===void 0||$.focus());else{const _=l.value;if(l.value=!1,e.mask&&r.value&&e.focusTriggerAfterClose){try{r.value.focus({preventScroll:!0})}catch{}r.value=null}_&&((x=e.afterClose)===null||x===void 0||x.call(e))}},u=b=>{var $;($=e.onClose)===null||$===void 0||$.call(e,b)},d=ve(!1),f=ve(),h=()=>{clearTimeout(f.value),d.value=!0},m=()=>{f.value=setTimeout(()=>{d.value=!1})},v=b=>{if(!e.maskClosable)return null;d.value?d.value=!1:i.value===b.target&&u(b)},y=b=>{if(e.keyboard&&b.keyCode===Fe.ESC){b.stopPropagation(),u(b);return}e.visible&&b.keyCode===Fe.TAB&&a.value.changeActive(!b.shiftKey)};return Ie(()=>e.visible,()=>{e.visible&&(l.value=!0)},{flush:"post"}),Ct(()=>{var b;clearTimeout(f.value),(b=e.scrollLocker)===null||b===void 0||b.unLock()}),ct(()=>{var b,$;(b=e.scrollLocker)===null||b===void 0||b.unLock(),l.value&&(($=e.scrollLocker)===null||$===void 0||$.lock())}),()=>{const{prefixCls:b,mask:$,visible:x,maskTransitionName:_,maskAnimation:w,zIndex:I,wrapClassName:O,rootClassName:P,wrapStyle:E,closable:R,maskProps:A,maskStyle:N,transitionName:F,animation:W,wrapProps:D,title:B=o.title}=e,{style:k,class:L}=n;return g("div",V({class:[`${b}-root`,P]},As(e,{data:!0})),[g(qxe,{prefixCls:b,visible:$&&x,motionName:V6(b,_,w),style:S({zIndex:I},N),maskProps:A},null),g("div",V({tabIndex:-1,onKeydown:y,class:me(`${b}-wrap`,O),ref:i,onClick:v,role:"dialog","aria-labelledby":B?s.value:null,style:S(S({zIndex:I},E),{display:l.value?null:"none"})},D),[g(Xxe,V(V({},_t(e,["scrollLocker"])),{},{style:k,class:L,onMousedown:h,onMouseup:m,ref:a,closable:R,ariaId:s.value,prefixCls:b,visible:x,onClose:u,onVisibleChanged:c,motionName:V6(b,F,W)}),o)])])}}}),Zxe=zy(),Qxe=pe({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:bt(Zxe,{visible:!1}),setup(e,t){let{attrs:n,slots:o}=t;const r=he(e.visible);return n_({},{inTriggerContext:!1}),Ie(()=>e.visible,()=>{e.visible&&(r.value=!0)},{flush:"post"}),()=>{const{visible:i,getContainer:a,forceRender:l,destroyOnClose:s=!1,afterClose:c}=e;let u=S(S(S({},e),n),{ref:"_component",key:"dialog"});return a===!1?g(Y6,V(V({},u),{},{getOpenCount:()=>2}),o):!l&&s&&!r.value?null:g(Hh,{autoLock:!0,visible:i,forceRender:l,getContainer:a},{default:d=>(u=S(S(S({},u),d),{afterClose:()=>{c==null||c(),r.value=!1}}),g(Y6,u,o))})}}}),TH=Qxe;function Jxe(e){const t=he(null),n=St(S({},e)),o=he([]),r=i=>{t.value===null&&(o.value=[],t.value=mt(()=>{let a;o.value.forEach(l=>{a=S(S({},a),l)}),S(n,a),t.value=null})),o.value.push(i)};return lt(()=>{t.value&&mt.cancel(t.value)}),[n,r]}function X6(e,t,n,o){const r=t+n,i=(n-o)/2;if(n>o){if(t>0)return{[e]:i};if(t<0&&ro)return{[e]:t<0?i:-i};return{}}function ewe(e,t,n,o){const{width:r,height:i}=Uxe();let a=null;return e<=r&&t<=i?a={x:0,y:0}:(e>r||t>i)&&(a=S(S({},X6("x",n,e,r)),X6("y",o,t,i))),a}var twe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{ft(q6,e)},inject:()=>it(q6,{isPreviewGroup:ve(!1),previewUrls:M(()=>new Map),setPreviewUrls:()=>{},current:he(null),setCurrent:()=>{},setShowPreview:()=>{},setMousePosition:()=>{},registerImage:null,rootClassName:""})},nwe=()=>({previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:()=>({})}}),owe=pe({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:nwe(),setup(e,t){let{slots:n}=t;const o=M(()=>{const w={visible:void 0,onVisibleChange:()=>{},getContainer:void 0,current:0};return typeof e.preview=="object"?RH(e.preview,w):w}),r=St(new Map),i=he(),a=M(()=>o.value.visible),l=M(()=>o.value.getContainer),s=(w,I)=>{var O,P;(P=(O=o.value).onVisibleChange)===null||P===void 0||P.call(O,w,I)},[c,u]=yn(!!a.value,{value:a,onChange:s}),d=he(null),f=M(()=>a.value!==void 0),h=M(()=>Array.from(r.keys())),m=M(()=>h.value[o.value.current]),v=M(()=>new Map(Array.from(r).filter(w=>{let[,{canPreview:I}]=w;return!!I}).map(w=>{let[I,{url:O}]=w;return[I,O]}))),y=function(w,I){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;r.set(w,{url:I,canPreview:O})},b=w=>{i.value=w},$=w=>{d.value=w},x=function(w,I){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const P=()=>{r.delete(w)};return r.set(w,{url:I,canPreview:O}),P},_=w=>{w==null||w.stopPropagation(),u(!1),$(null)};return Ie(m,w=>{b(w)},{immediate:!0,flush:"post"}),ct(()=>{c.value&&f.value&&b(m.value)},{flush:"post"}),uI.provide({isPreviewGroup:ve(!0),previewUrls:v,setPreviewUrls:y,current:i,setCurrent:b,setShowPreview:u,setMousePosition:$,registerImage:x}),()=>{const w=twe(o.value,[]);return g(Je,null,[n.default&&n.default(),g(AH,V(V({},w),{},{"ria-hidden":!c.value,visible:c.value,prefixCls:e.previewPrefixCls,onClose:_,mousePosition:d.value,src:v.value.get(i.value),icons:e.icons,getContainer:l.value}),null)])}}}),EH=owe,tc={x:0,y:0},rwe=S(S({},zy()),{src:String,alt:String,rootClassName:String,icons:{type:Object,default:()=>({})}}),iwe=pe({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:rwe,emits:["close","afterClose"],setup(e,t){let{emit:n,attrs:o}=t;const{rotateLeft:r,rotateRight:i,zoomIn:a,zoomOut:l,close:s,left:c,right:u,flipX:d,flipY:f}=St(e.icons),h=ve(1),m=ve(0),v=St({x:1,y:1}),[y,b]=Jxe(tc),$=()=>n("close"),x=ve(),_=St({originX:0,originY:0,deltaX:0,deltaY:0}),w=ve(!1),I=uI.inject(),{previewUrls:O,current:P,isPreviewGroup:E,setCurrent:R}=I,A=M(()=>O.value.size),N=M(()=>Array.from(O.value.keys())),F=M(()=>N.value.indexOf(P.value)),W=M(()=>E.value?O.value.get(P.value):e.src),D=M(()=>E.value&&A.value>1),B=ve({wheelDirection:0}),k=()=>{h.value=1,m.value=0,v.x=1,v.y=1,b(tc),n("afterClose")},L=ae=>{ae?h.value+=.5:h.value++,b(tc)},z=ae=>{h.value>1&&(ae?h.value-=.5:h.value--),b(tc)},K=()=>{m.value+=90},G=()=>{m.value-=90},Y=()=>{v.x=-v.x},ne=()=>{v.y=-v.y},re=ae=>{ae.preventDefault(),ae.stopPropagation(),F.value>0&&R(N.value[F.value-1])},J=ae=>{ae.preventDefault(),ae.stopPropagation(),F.valueL(),type:"zoomIn"},{icon:l,onClick:()=>z(),type:"zoomOut",disabled:M(()=>h.value===1)},{icon:i,onClick:K,type:"rotateRight"},{icon:r,onClick:G,type:"rotateLeft"},{icon:d,onClick:Y,type:"flipX"},{icon:f,onClick:ne,type:"flipY"}],X=()=>{if(e.visible&&w.value){const ae=x.value.offsetWidth*h.value,ge=x.value.offsetHeight*h.value,{left:Se,top:$e}=U0(x.value),_e=m.value%180!==0;w.value=!1;const be=ewe(_e?ge:ae,_e?ae:ge,Se,$e);be&&b(S({},be))}},ue=ae=>{ae.button===0&&(ae.preventDefault(),ae.stopPropagation(),_.deltaX=ae.pageX-y.x,_.deltaY=ae.pageY-y.y,_.originX=y.x,_.originY=y.y,w.value=!0)},ye=ae=>{e.visible&&w.value&&b({x:ae.pageX-_.deltaX,y:ae.pageY-_.deltaY})},H=ae=>{if(!e.visible)return;ae.preventDefault();const ge=ae.deltaY;B.value={wheelDirection:ge}},j=ae=>{!e.visible||!D.value||(ae.preventDefault(),ae.keyCode===Fe.LEFT?F.value>0&&R(N.value[F.value-1]):ae.keyCode===Fe.RIGHT&&F.value{e.visible&&(h.value!==1&&(h.value=1),(y.x!==tc.x||y.y!==tc.y)&&b(tc))};let se=()=>{};return lt(()=>{Ie([()=>e.visible,w],()=>{se();let ae,ge;const Se=wn(window,"mouseup",X,!1),$e=wn(window,"mousemove",ye,!1),_e=wn(window,"wheel",H,{passive:!1}),be=wn(window,"keydown",j,!1);try{window.top!==window.self&&(ae=wn(window.top,"mouseup",X,!1),ge=wn(window.top,"mousemove",ye,!1))}catch{}se=()=>{Se.remove(),$e.remove(),_e.remove(),be.remove(),ae&&ae.remove(),ge&&ge.remove()}},{flush:"post",immediate:!0}),Ie([B],()=>{const{wheelDirection:ae}=B.value;ae>0?z(!0):ae<0&&L(!0)})}),Fo(()=>{se()}),()=>{const{visible:ae,prefixCls:ge,rootClassName:Se}=e;return g(TH,V(V({},o),{},{transitionName:e.transitionName,maskTransitionName:e.maskTransitionName,closable:!1,keyboard:!0,prefixCls:ge,onClose:$,afterClose:k,visible:ae,wrapClassName:te,rootClassName:Se,getContainer:e.getContainer}),{default:()=>[g("div",{class:[`${e.prefixCls}-operations-wrapper`,Se]},[g("ul",{class:`${e.prefixCls}-operations`},[ie.map($e=>{let{icon:_e,onClick:be,type:Te,disabled:Pe}=$e;return g("li",{class:me(ee,{[`${e.prefixCls}-operations-operation-disabled`]:Pe&&(Pe==null?void 0:Pe.value)}),onClick:be,key:Te},[ko(_e,{class:fe})])})])]),g("div",{class:`${e.prefixCls}-img-wrapper`,style:{transform:`translate3d(${y.x}px, ${y.y}px, 0)`}},[g("img",{onMousedown:ue,onDblclick:q,ref:x,class:`${e.prefixCls}-img`,src:W.value,alt:e.alt,style:{transform:`scale3d(${v.x*h.value}, ${v.y*h.value}, 1) rotate(${m.value}deg)`}},null)]),D.value&&g("div",{class:me(`${e.prefixCls}-switch-left`,{[`${e.prefixCls}-switch-left-disabled`]:F.value<=0}),onClick:re},[c]),D.value&&g("div",{class:me(`${e.prefixCls}-switch-right`,{[`${e.prefixCls}-switch-right-disabled`]:F.value>=A.value-1}),onClick:J},[u])]})}}}),AH=iwe;var awe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,previewMask:{type:[Boolean,Function],default:void 0},placeholder:Z.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}),RH=(e,t)=>{const n=S({},e);return Object.keys(t).forEach(o=>{e[o]===void 0&&(n[o]=t[o])}),n};let lwe=0;const DH=pe({compatConfig:{MODE:3},name:"VcImage",inheritAttrs:!1,props:MH(),emits:["click","error"],setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=M(()=>e.prefixCls),a=M(()=>`${i.value}-preview`),l=M(()=>{const L={visible:void 0,onVisibleChange:()=>{},getContainer:void 0};return typeof e.preview=="object"?RH(e.preview,L):L}),s=M(()=>{var L;return(L=l.value.src)!==null&&L!==void 0?L:e.src}),c=M(()=>e.placeholder&&e.placeholder!==!0||o.placeholder),u=M(()=>l.value.visible),d=M(()=>l.value.getContainer),f=M(()=>u.value!==void 0),h=(L,z)=>{var K,G;(G=(K=l.value).onVisibleChange)===null||G===void 0||G.call(K,L,z)},[m,v]=yn(!!u.value,{value:u,onChange:h}),y=he(c.value?"loading":"normal");Ie(()=>e.src,()=>{y.value=c.value?"loading":"normal"});const b=he(null),$=M(()=>y.value==="error"),x=uI.inject(),{isPreviewGroup:_,setCurrent:w,setShowPreview:I,setMousePosition:O,registerImage:P}=x,E=he(lwe++),R=M(()=>e.preview&&!$.value),A=()=>{y.value="normal"},N=L=>{y.value="error",r("error",L)},F=L=>{if(!f.value){const{left:z,top:K}=U0(L.target);_.value?(w(E.value),O({x:z,y:K})):b.value={x:z,y:K}}_.value?I(!0):v(!0),r("click",L)},W=()=>{v(!1),f.value||(b.value=null)},D=he(null);Ie(()=>D,()=>{y.value==="loading"&&D.value.complete&&(D.value.naturalWidth||D.value.naturalHeight)&&A()});let B=()=>{};lt(()=>{Ie([s,R],()=>{if(B(),!_.value)return()=>{};B=P(E.value,s.value,R.value),R.value||B()},{flush:"post",immediate:!0})}),Fo(()=>{B()});const k=L=>Mfe(L)?L+"px":L;return()=>{const{prefixCls:L,wrapperClassName:z,fallback:K,src:G,placeholder:Y,wrapperStyle:ne,rootClassName:re}=e,{width:J,height:te,crossorigin:ee,decoding:fe,alt:ie,sizes:X,srcset:ue,usemap:ye,class:H,style:j}=n,q=l.value,{icons:se,maskClassName:ae}=q,ge=awe(q,["icons","maskClassName"]),Se=me(L,z,re,{[`${L}-error`]:$.value}),$e=$.value&&K?K:s.value,_e={crossorigin:ee,decoding:fe,alt:ie,sizes:X,srcset:ue,usemap:ye,width:J,height:te,class:me(`${L}-img`,{[`${L}-img-placeholder`]:Y===!0},H),style:S({height:k(te)},j)};return g(Je,null,[g("div",{class:Se,onClick:R.value?F:be=>{r("click",be)},style:S({width:k(J),height:k(te)},ne)},[g("img",V(V(V({},_e),$.value&&K?{src:K}:{onLoad:A,onError:N,src:G}),{},{ref:D}),null),y.value==="loading"&&g("div",{"aria-hidden":"true",class:`${L}-placeholder`},[Y||o.placeholder&&o.placeholder()]),o.previewMask&&R.value&&g("div",{class:[`${L}-mask`,ae]},[o.previewMask()])]),!_.value&&R.value&&g(AH,V(V({},ge),{},{"aria-hidden":!m.value,visible:m.value,prefixCls:a.value,onClose:W,mousePosition:b.value,src:$e,alt:ie,getContainer:d.value,icons:se,rootClassName:re}),null)])}}});DH.PreviewGroup=EH;const swe=DH;var cwe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const uwe=cwe;function Z6(e){for(var t=1;t{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}${e.antCls}-zoom-enter, ${t}${e.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${e.antCls}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:S(S({},o8("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:S(S({},o8("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:E_(e)}]},Pwe=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap`]:{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax})`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${e.marginXS} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:S(S({},vt(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${e.margin*2}px)`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.modalHeadingColor,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadowSecondary,pointerEvents:"auto",padding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`},[`${t}-close`]:S({position:"absolute",top:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalConfirmIconSize,height:e.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"block",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${e.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},Sl(e)),[`${t}-header`]:{color:e.colorText,background:e.modalHeaderBg,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,marginBottom:e.marginXS},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"},[`${t}-footer`]:{textAlign:"end",background:e.modalFooterBg,marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content, + ${t}-body, + ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},Twe=e=>{const{componentCls:t}=e,n=`${t}-confirm`;return{[n]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${n}-body-wrapper`]:S({},aa()),[`${n}-body`]:{display:"flex",flexWrap:"wrap",alignItems:"center",[`${n}-title`]:{flex:"0 0 100%",display:"block",overflow:"hidden",color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,[`+ ${n}-content`]:{marginBlockStart:e.marginXS,flexBasis:"100%",maxWidth:`calc(100% - ${e.modalConfirmIconSize+e.marginSM}px)`}},[`${n}-content`]:{color:e.colorText,fontSize:e.fontSize},[`> ${e.iconCls}`]:{flex:"none",marginInlineEnd:e.marginSM,fontSize:e.modalConfirmIconSize,[`+ ${n}-title`]:{flex:1},[`+ ${n}-title + ${n}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.marginSM}}},[`${n}-btns`]:{textAlign:"end",marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${n}-error ${n}-body > ${e.iconCls}`]:{color:e.colorError},[`${n}-warning ${n}-body > ${e.iconCls}, + ${n}-confirm ${n}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${n}-info ${n}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${n}-success ${n}-body > ${e.iconCls}`]:{color:e.colorSuccess},[`${t}-zoom-leave ${t}-btns`]:{pointerEvents:"none"}}},Ewe=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},Awe=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-confirm`;return{[t]:{[`${t}-content`]:{padding:0},[`${t}-header`]:{padding:e.modalHeaderPadding,borderBottom:`${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,marginBottom:0},[`${t}-body`]:{padding:e.modalBodyPadding},[`${t}-footer`]:{padding:`${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,borderTop:`${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,marginTop:0}},[o]:{[`${n}-modal-body`]:{padding:`${e.padding*2}px ${e.padding*2}px ${e.paddingLG}px`},[`${o}-body`]:{[`> ${e.iconCls}`]:{marginInlineEnd:e.margin,[`+ ${o}-title + ${o}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.margin}}},[`${o}-btns`]:{marginTop:e.marginLG}}}},Mwe=pt("Modal",e=>{const t=e.padding,n=e.fontSizeHeading5,o=e.lineHeightHeading5,r=nt(e,{modalBodyPadding:e.paddingLG,modalHeaderBg:e.colorBgElevated,modalHeaderPadding:`${t}px ${e.paddingLG}px`,modalHeaderBorderWidth:e.lineWidth,modalHeaderBorderStyle:e.lineType,modalHeaderTitleLineHeight:o,modalHeaderTitleFontSize:n,modalHeaderBorderColorSplit:e.colorSplit,modalHeaderCloseSize:o*n+t*2,modalContentBg:e.colorBgElevated,modalHeadingColor:e.colorTextHeading,modalCloseColor:e.colorTextDescription,modalFooterBg:"transparent",modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterPaddingVertical:e.paddingXS,modalFooterPaddingHorizontal:e.padding,modalFooterBorderWidth:e.lineWidth,modalConfirmTitleFontSize:e.fontSizeLG,modalIconHoverColor:e.colorIconHover,modalConfirmIconSize:e.fontSize*e.lineHeight,modalCloseBtnSize:e.controlHeightLG*.55});return[Pwe(r),Twe(r),Ewe(r),LH(r),e.wireframe&&Awe(r),cf(r,"zoom")]}),qx=e=>({position:e||"absolute",inset:0}),Rwe=e=>{const{iconCls:t,motionDurationSlow:n,paddingXXS:o,marginXXS:r,prefixCls:i}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new Zt("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${i}-mask-info`]:S(S({},eo),{padding:`0 ${o}px`,[t]:{marginInlineEnd:r,svg:{verticalAlign:"baseline"}}})}},Dwe=e=>{const{previewCls:t,modalMaskBg:n,paddingSM:o,previewOperationColorDisabled:r,motionDurationSlow:i}=e,a=new Zt(n).setAlpha(.1),l=a.clone().setAlpha(.2);return{[`${t}-operations`]:S(S({},vt(e)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:e.previewOperationColor,listStyle:"none",background:a.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:o,padding:o,cursor:"pointer",transition:`all ${i}`,userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{color:r,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:e.previewOperationSize}})}},Lwe=e=>{const{modalMaskBg:t,iconCls:n,previewOperationColorDisabled:o,previewCls:r,zIndexPopup:i,motionDurationSlow:a}=e,l=new Zt(t).setAlpha(.1),s=l.clone().setAlpha(.2);return{[`${r}-switch-left, ${r}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:i+1,display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:-e.imagePreviewSwitchSize/2,color:e.previewOperationColor,background:l.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${a}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{"&, &:hover":{color:o,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:e.previewOperationSize}},[`${r}-switch-left`]:{insetInlineStart:e.marginSM},[`${r}-switch-right`]:{insetInlineEnd:e.marginSM}}},Nwe=e=>{const{motionEaseOut:t,previewCls:n,motionDurationSlow:o,componentCls:r}=e;return[{[`${r}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:S(S({},qx()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${o} ${t} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":S(S({},qx()),{transition:`transform ${o} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${r}-preview-root`]:{[`${n}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${r}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:e.zIndexPopup+1,width:"100%"},"&":[Dwe(e),Lwe(e)]}]},kwe=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:S({},Rwe(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:S({},qx())}}},Bwe=e=>{const{previewCls:t}=e;return{[`${t}-root`]:cf(e,"zoom"),"&":E_(e,!0)}},NH=pt("Image",e=>{const t=`${e.componentCls}-preview`,n=nt(e,{previewCls:t,modalMaskBg:new Zt("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[kwe(n),Nwe(n),LH(nt(n,{componentCls:t})),Bwe(n)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new Zt(e.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new Zt(e.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),kH={rotateLeft:g(fwe,null,null),rotateRight:g(vwe,null,null),zoomIn:g(Swe,null,null),zoomOut:g(wwe,null,null),close:g(Vr,null,null),left:g(xs,null,null),right:g(sa,null,null),flipX:g(n8,null,null),flipY:g(n8,{rotate:90},null)},Fwe=()=>({previewPrefixCls:String,preview:cn()}),Hwe=pe({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:Fwe(),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,rootPrefixCls:i}=Ve("image",e),a=M(()=>`${r.value}-preview`),[l,s]=NH(r),c=M(()=>{const{preview:u}=e;if(u===!1)return u;const d=typeof u=="object"?u:{};return S(S({},d),{rootClassName:s.value,transitionName:dr(i.value,"zoom",d.transitionName),maskTransitionName:dr(i.value,"fade",d.maskTransitionName)})});return()=>l(g(EH,V(V({},S(S({},n),e)),{},{preview:c.value,icons:kH,previewPrefixCls:a.value}),o))}}),BH=Hwe,hc=pe({name:"AImage",inheritAttrs:!1,props:MH(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,rootPrefixCls:i,configProvider:a}=Ve("image",e),[l,s]=NH(r),c=M(()=>{const{preview:u}=e;if(u===!1)return u;const d=typeof u=="object"?u:{};return S(S({icons:kH},d),{transitionName:dr(i.value,"zoom",d.transitionName),maskTransitionName:dr(i.value,"fade",d.maskTransitionName)})});return()=>{var u,d;const f=((d=(u=a.locale)===null||u===void 0?void 0:u.value)===null||d===void 0?void 0:d.Image)||cr.Image,h=()=>g("div",{class:`${r.value}-mask-info`},[g(sI,null,null),f==null?void 0:f.preview]),{previewMask:m=n.previewMask||h}=e;return l(g(swe,V(V({},S(S(S({},o),e),{prefixCls:r.value})),{},{preview:c.value,rootClassName:me(e.rootClassName,s.value)}),S(S({},n),{previewMask:typeof m=="function"?m:null})))}}});hc.PreviewGroup=BH;hc.install=function(e){return e.component(hc.name,hc),e.component(hc.PreviewGroup.name,hc.PreviewGroup),e};const zwe=hc;var jwe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};const Wwe=jwe;function r8(e){for(var t=1;tNumber.MAX_SAFE_INTEGER)return String(Zx()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(eNumber.MAX_SAFE_INTEGER)return new gc(Number.MAX_SAFE_INTEGER);if(o0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":bI(this.number):this.origin}}class ed{constructor(t){if(this.origin="",FH(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}let n=t;if(mI(n)&&(n=Number(n)),n=typeof n=="string"?n:bI(n),yI(n)){const o=Mp(n);this.negative=o.negative;const r=o.trimStr.split(".");this.integer=BigInt(r[0]);const i=r[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(t){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t,"0")}`;return BigInt(n)}negate(){const t=new ed(this.toString());return t.negative=!t.negative,t}add(t){if(this.isInvalidate())return new ed(t);const n=new ed(t);if(n.isInvalidate())return this;const o=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),r=this.alignDecimal(o),i=n.alignDecimal(o),a=(r+i).toString(),{negativeStr:l,trimStr:s}=Mp(a),c=`${l}${s.padStart(o+1,"0")}`;return new ed(`${c.slice(0,-o)}.${c.slice(-o)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toString()===(t==null?void 0:t.toString())}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":Mp(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function xa(e){return Zx()?new ed(e):new gc(e)}function Qx(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";const{negativeStr:r,integerStr:i,decimalStr:a}=Mp(e),l=`${t}${a}`,s=`${r}${i}`;if(n>=0){const c=Number(a[n]);if(c>=5&&!o){const u=xa(e).add(`${r}0.${"0".repeat(n)}${10-c}`);return Qx(u.toString(),t,n,o)}return n===0?s:`${s}${t}${a.padEnd(n,"0").slice(0,n)}`}return l===".0"?s:`${s}${l}`}const Uwe=200,Gwe=600,Ywe=pe({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:Oe()},slots:Object,setup(e,t){let{slots:n,emit:o}=t;const r=he(),i=(l,s)=>{l.preventDefault(),o("step",s);function c(){o("step",s),r.value=setTimeout(c,Uwe)}r.value=setTimeout(c,Gwe)},a=()=>{clearTimeout(r.value)};return Ct(()=>{a()}),()=>{if(r_())return null;const{prefixCls:l,upDisabled:s,downDisabled:c}=e,u=`${l}-handler`,d=me(u,`${u}-up`,{[`${u}-up-disabled`]:s}),f=me(u,`${u}-down`,{[`${u}-down-disabled`]:c}),h={unselectable:"on",role:"button",onMouseup:a,onMouseleave:a},{upNode:m,downNode:v}=n;return g("div",{class:`${u}-wrap`},[g("span",V(V({},h),{},{onMousedown:y=>{i(y,!0)},"aria-label":"Increase Value","aria-disabled":s,class:d}),[(m==null?void 0:m())||g("span",{unselectable:"on",class:`${l}-handler-up-inner`},null)]),g("span",V(V({},h),{},{onMousedown:y=>{i(y,!1)},"aria-label":"Decrease Value","aria-disabled":c,class:f}),[(v==null?void 0:v())||g("span",{unselectable:"on",class:`${l}-handler-down-inner`},null)])])}}});function Xwe(e,t){const n=he(null);function o(){try{const{selectionStart:i,selectionEnd:a,value:l}=e.value,s=l.substring(0,i),c=l.substring(a);n.value={start:i,end:a,value:l,beforeTxt:s,afterTxt:c}}catch{}}function r(){if(e.value&&n.value&&t.value)try{const{value:i}=e.value,{beforeTxt:a,afterTxt:l,start:s}=n.value;let c=i.length;if(i.endsWith(l))c=i.length-n.value.afterTxt.length;else if(i.startsWith(a))c=a.length;else{const u=a[s-1],d=i.indexOf(u,s-1);d!==-1&&(c=d+1)}e.value.setSelectionRange(c,c)}catch(i){`${i.message}`}}return[o,r]}const qwe=()=>{const e=ve(0),t=()=>{mt.cancel(e.value)};return Ct(()=>{t()}),n=>{t(),e.value=mt(()=>{n()})}};var Zwe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re||t.isEmpty()?t.toString():t.toNumber(),a8=e=>{const t=xa(e);return t.isInvalidate()?null:t},HH=()=>({stringMode:De(),defaultValue:rt([String,Number]),value:rt([String,Number]),prefixCls:Qe(),min:rt([String,Number]),max:rt([String,Number]),step:rt([String,Number],1),tabindex:Number,controls:De(!0),readonly:De(),disabled:De(),autofocus:De(),keyboard:De(!0),parser:Oe(),formatter:Oe(),precision:Number,decimalSeparator:String,onInput:Oe(),onChange:Oe(),onPressEnter:Oe(),onStep:Oe(),onBlur:Oe(),onFocus:Oe()}),Qwe=pe({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:S(S({},HH()),{lazy:Boolean}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;const a=ve(),l=ve(!1),s=ve(!1),c=ve(!1),u=ve(xa(e.value));function d(G){e.value===void 0&&(u.value=G)}const f=(G,Y)=>{if(!Y)return e.precision>=0?e.precision:Math.max(Ch(G),Ch(e.step))},h=G=>{const Y=String(G);if(e.parser)return e.parser(Y);let ne=Y;return e.decimalSeparator&&(ne=ne.replace(e.decimalSeparator,".")),ne.replace(/[^\w.-]+/g,"")},m=ve(""),v=(G,Y)=>{if(e.formatter)return e.formatter(G,{userTyping:Y,input:String(m.value)});let ne=typeof G=="number"?bI(G):G;if(!Y){const re=f(ne,Y);if(yI(ne)&&(e.decimalSeparator||re>=0)){const J=e.decimalSeparator||".";ne=Qx(ne,J,re)}}return ne},y=(()=>{const G=e.value;return u.value.isInvalidate()&&["string","number"].includes(typeof G)?Number.isNaN(G)?"":G:v(u.value.toString(),!1)})();m.value=y;function b(G,Y){m.value=v(G.isInvalidate()?G.toString(!1):G.toString(!Y),Y)}const $=M(()=>a8(e.max)),x=M(()=>a8(e.min)),_=M(()=>!$.value||!u.value||u.value.isInvalidate()?!1:$.value.lessEquals(u.value)),w=M(()=>!x.value||!u.value||u.value.isInvalidate()?!1:u.value.lessEquals(x.value)),[I,O]=Xwe(a,l),P=G=>$.value&&!G.lessEquals($.value)?$.value:x.value&&!x.value.lessEquals(G)?x.value:null,E=G=>!P(G),R=(G,Y)=>{var ne;let re=G,J=E(re)||re.isEmpty();if(!re.isEmpty()&&!Y&&(re=P(re)||re,J=!0),!e.readonly&&!e.disabled&&J){const te=re.toString(),ee=f(te,Y);return ee>=0&&(re=xa(Qx(te,".",ee))),re.equals(u.value)||(d(re),(ne=e.onChange)===null||ne===void 0||ne.call(e,re.isEmpty()?null:i8(e.stringMode,re)),e.value===void 0&&b(re,Y)),re}return u.value},A=qwe(),N=G=>{var Y;if(I(),m.value=G,!c.value){const ne=h(G),re=xa(ne);re.isNaN()||R(re,!0)}(Y=e.onInput)===null||Y===void 0||Y.call(e,G),A(()=>{let ne=G;e.parser||(ne=G.replace(/。/g,".")),ne!==G&&N(ne)})},F=()=>{c.value=!0},W=()=>{c.value=!1,N(a.value.value)},D=G=>{N(G.target.value)},B=G=>{var Y,ne;if(G&&_.value||!G&&w.value)return;s.value=!1;let re=xa(e.step);G||(re=re.negate());const J=(u.value||xa(0)).add(re.toString()),te=R(J,!1);(Y=e.onStep)===null||Y===void 0||Y.call(e,i8(e.stringMode,te),{offset:e.step,type:G?"up":"down"}),(ne=a.value)===null||ne===void 0||ne.focus()},k=G=>{const Y=xa(h(m.value));let ne=Y;Y.isNaN()?ne=u.value:ne=R(Y,G),e.value!==void 0?b(u.value,!1):ne.isNaN()||b(ne,!1)},L=G=>{var Y;const{which:ne}=G;s.value=!0,ne===Fe.ENTER&&(c.value||(s.value=!1),k(!1),(Y=e.onPressEnter)===null||Y===void 0||Y.call(e,G)),e.keyboard!==!1&&!c.value&&[Fe.UP,Fe.DOWN].includes(ne)&&(B(Fe.UP===ne),G.preventDefault())},z=()=>{s.value=!1},K=G=>{k(!1),l.value=!1,s.value=!1,r("blur",G)};return Ie(()=>e.precision,()=>{u.value.isInvalidate()||b(u.value,!1)},{flush:"post"}),Ie(()=>e.value,()=>{const G=xa(e.value);u.value=G;const Y=xa(h(m.value));(!G.equals(Y)||!s.value||e.formatter)&&b(G,s.value)},{flush:"post"}),Ie(m,()=>{e.formatter&&O()},{flush:"post"}),Ie(()=>e.disabled,G=>{G&&(l.value=!1)}),i({focus:()=>{var G;(G=a.value)===null||G===void 0||G.focus()},blur:()=>{var G;(G=a.value)===null||G===void 0||G.blur()}}),()=>{const G=S(S({},n),e),{prefixCls:Y="rc-input-number",min:ne,max:re,step:J=1,defaultValue:te,value:ee,disabled:fe,readonly:ie,keyboard:X,controls:ue=!0,autofocus:ye,stringMode:H,parser:j,formatter:q,precision:se,decimalSeparator:ae,onChange:ge,onInput:Se,onPressEnter:$e,onStep:_e,lazy:be,class:Te,style:Pe}=G,oe=Zwe(G,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:le,downHandler:xe}=o,Ae=`${Y}-input`,Be={};return be?Be.onChange=D:Be.onInput=D,g("div",{class:me(Y,Te,{[`${Y}-focused`]:l.value,[`${Y}-disabled`]:fe,[`${Y}-readonly`]:ie,[`${Y}-not-a-number`]:u.value.isNaN(),[`${Y}-out-of-range`]:!u.value.isInvalidate()&&!E(u.value)}),style:Pe,onKeydown:L,onKeyup:z},[ue&&g(Ywe,{prefixCls:Y,upDisabled:_.value,downDisabled:w.value,onStep:B},{upNode:le,downNode:xe}),g("div",{class:`${Ae}-wrap`},[g("input",V(V(V({autofocus:ye,autocomplete:"off",role:"spinbutton","aria-valuemin":ne,"aria-valuemax":re,"aria-valuenow":u.value.isInvalidate()?null:u.value.toString(),step:J},oe),{},{ref:a,class:Ae,value:m.value,disabled:fe,readonly:ie,onFocus:Ye=>{l.value=!0,r("focus",Ye)}},Be),{},{onBlur:K,onCompositionstart:F,onCompositionend:W}),null)])])}}});function LC(e){return e!=null}const Jwe=e=>{const{componentCls:t,lineWidth:n,lineType:o,colorBorder:r,borderRadius:i,fontSizeLG:a,controlHeightLG:l,controlHeightSM:s,colorError:c,inputPaddingHorizontalSM:u,colorTextDescription:d,motionDurationMid:f,colorPrimary:h,controlHeight:m,inputPaddingHorizontal:v,colorBgContainer:y,colorTextDisabled:b,borderRadiusSM:$,borderRadiusLG:x,controlWidth:_,handleVisible:w}=e;return[{[t]:S(S(S(S({},vt(e)),ru(e)),Xh(e,t)),{display:"inline-block",width:_,margin:0,padding:0,border:`${n}px ${o} ${r}`,borderRadius:i,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,borderRadius:x,[`input${t}-input`]:{height:l-2*n}},"&-sm":{padding:0,borderRadius:$,[`input${t}-input`]:{height:s-2*n,padding:`0 ${u}px`}},"&:hover":S({},hf(e)),"&-focused":S({},$s(e)),"&-disabled":S(S({},OO(e)),{[`${t}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:c}},"&-group":S(S(S({},vt(e)),kB(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:x}},"&-sm":{[`${t}-group-addon`]:{borderRadius:$}}}}),[t]:{"&-input":S(S({width:"100%",height:m-2*n,padding:`0 ${v}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:i,outline:0,transition:`all ${f} linear`,appearance:"textfield",color:e.colorText,fontSize:"inherit",verticalAlign:"top"},_O(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:y,borderStartStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i,borderEndStartRadius:0,opacity:w===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${f} linear ${f}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` + ${t}-handler-up-inner, + ${t}-handler-down-inner + `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:d,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${n}px ${o} ${r}`,transition:`all ${f} linear`,"&:active":{background:e.colorFillAlter},"&:hover":{height:"60%",[` + ${t}-handler-up-inner, + ${t}-handler-down-inner + `]:{color:h}},"&-up-inner, &-down-inner":S(S({},Xc()),{color:d,transition:`all ${f} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:i},[`${t}-handler-down`]:{borderBlockStart:`${n}px ${o} ${r}`,borderEndEndRadius:i},"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"}},[` + ${t}-handler-up-disabled, + ${t}-handler-down-disabled + `]:{cursor:"not-allowed"},[` + ${t}-handler-up-disabled:hover &-handler-up-inner, + ${t}-handler-down-disabled:hover &-handler-down-inner + `]:{color:b}}},{[`${t}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${t}-handler-down`]:{borderBlockStartWidth:0}}}]},e2e=e=>{const{componentCls:t,inputPaddingHorizontal:n,inputAffixPadding:o,controlWidth:r,borderRadiusLG:i,borderRadiusSM:a}=e;return{[`${t}-affix-wrapper`]:S(S(S({},ru(e)),Xh(e,`${t}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:r,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:i},"&-sm":{borderRadius:a},[`&:not(${t}-affix-wrapper-disabled):hover`]:S(S({},hf(e)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},[`input${t}-input`]:{padding:0},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:n,marginInlineStart:o}}})}},t2e=pt("InputNumber",e=>{const t=iu(e);return[Jwe(t),e2e(t),uf(t)]},e=>({controlWidth:90,handleWidth:e.controlHeightSM-e.lineWidth*2,handleFontSize:e.fontSize/2,handleVisible:"auto"}));var n2e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rS(S({},l8),{size:Qe(),bordered:De(!0),placeholder:String,name:String,id:String,type:String,addonBefore:Z.any,addonAfter:Z.any,prefix:Z.any,"onUpdate:value":l8.onChange,valueModifiers:Object,status:Qe()}),NC=pe({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:o2e(),slots:Object,setup(e,t){let{emit:n,expose:o,attrs:r,slots:i}=t;const a=co(),l=To.useInject(),s=M(()=>da(l.status,e.status)),{prefixCls:c,size:u,direction:d,disabled:f}=Ve("input-number",e),{compactSize:h,compactItemClassnames:m}=Ms(c,d),v=jr(),y=M(()=>{var N;return(N=f.value)!==null&&N!==void 0?N:v.value}),[b,$]=t2e(c),x=M(()=>h.value||u.value),_=ve(e.value===void 0?e.defaultValue:e.value),w=ve(!1);Ie(()=>e.value,()=>{_.value=e.value});const I=ve(null),O=()=>{var N;(N=I.value)===null||N===void 0||N.focus()};o({focus:O,blur:()=>{var N;(N=I.value)===null||N===void 0||N.blur()}});const E=N=>{e.value===void 0&&(_.value=N),n("update:value",N),n("change",N),a.onFieldChange()},R=N=>{w.value=!1,n("blur",N),a.onFieldBlur()},A=N=>{w.value=!0,n("focus",N)};return()=>{var N,F,W,D;const{hasFeedback:B,isFormItemInput:k,feedbackIcon:L}=l,z=(N=e.id)!==null&&N!==void 0?N:a.id.value,K=S(S(S({},r),e),{id:z,disabled:y.value}),{class:G,bordered:Y,readonly:ne,style:re,addonBefore:J=(F=i.addonBefore)===null||F===void 0?void 0:F.call(i),addonAfter:te=(W=i.addonAfter)===null||W===void 0?void 0:W.call(i),prefix:ee=(D=i.prefix)===null||D===void 0?void 0:D.call(i),valueModifiers:fe={}}=K,ie=n2e(K,["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"]),X=c.value,ue=me({[`${X}-lg`]:x.value==="large",[`${X}-sm`]:x.value==="small",[`${X}-rtl`]:d.value==="rtl",[`${X}-readonly`]:ne,[`${X}-borderless`]:!Y,[`${X}-in-form-item`]:k},sr(X,s.value),G,m.value,$.value);let ye=g(Qwe,V(V({},_t(ie,["size","defaultValue"])),{},{ref:I,lazy:!!fe.lazy,value:_.value,class:ue,prefixCls:X,readonly:ne,onChange:E,onBlur:R,onFocus:A}),{upHandler:i.upIcon?()=>g("span",{class:`${X}-handler-up-inner`},[i.upIcon()]):()=>g(Kwe,{class:`${X}-handler-up-inner`},null),downHandler:i.downIcon?()=>g("span",{class:`${X}-handler-down-inner`},[i.downIcon()]):()=>g(jh,{class:`${X}-handler-down-inner`},null)});const H=LC(J)||LC(te),j=LC(ee);if(j||B){const q=me(`${X}-affix-wrapper`,sr(`${X}-affix-wrapper`,s.value,B),{[`${X}-affix-wrapper-focused`]:w.value,[`${X}-affix-wrapper-disabled`]:y.value,[`${X}-affix-wrapper-sm`]:x.value==="small",[`${X}-affix-wrapper-lg`]:x.value==="large",[`${X}-affix-wrapper-rtl`]:d.value==="rtl",[`${X}-affix-wrapper-readonly`]:ne,[`${X}-affix-wrapper-borderless`]:!Y,[`${G}`]:!H&&G},$.value);ye=g("div",{class:q,style:re,onClick:O},[j&&g("span",{class:`${X}-prefix`},[ee]),ye,B&&g("span",{class:`${X}-suffix`},[L])])}if(H){const q=`${X}-group`,se=`${q}-addon`,ae=J?g("div",{class:se},[J]):null,ge=te?g("div",{class:se},[te]):null,Se=me(`${X}-wrapper`,q,{[`${q}-rtl`]:d.value==="rtl"},$.value),$e=me(`${X}-group-wrapper`,{[`${X}-group-wrapper-sm`]:x.value==="small",[`${X}-group-wrapper-lg`]:x.value==="large",[`${X}-group-wrapper-rtl`]:d.value==="rtl"},sr(`${c}-group-wrapper`,s.value,B),G,$.value);ye=g("div",{class:$e,style:re},[g("div",{class:Se},[ae&&g(dh,null,{default:()=>[g(S0,null,{default:()=>[ae]})]}),ye,ge&&g(dh,null,{default:()=>[g(S0,null,{default:()=>[ge]})]})])])}return b(Gt(ye,{style:re}))}}}),r2e=S(NC,{install:e=>(e.component(NC.name,NC),e)}),i2e=e=>{const{componentCls:t,colorBgContainer:n,colorBgBody:o,colorText:r}=e;return{[`${t}-sider-light`]:{background:n,[`${t}-sider-trigger`]:{color:r,background:n},[`${t}-sider-zero-width-trigger`]:{color:r,background:n,border:`1px solid ${o}`,borderInlineStart:0}}}},a2e=e=>{const{antCls:t,componentCls:n,colorText:o,colorTextLightSolid:r,colorBgHeader:i,colorBgBody:a,colorBgTrigger:l,layoutHeaderHeight:s,layoutHeaderPaddingInline:c,layoutHeaderColor:u,layoutFooterPadding:d,layoutTriggerHeight:f,layoutZeroTriggerSize:h,motionDurationMid:m,motionDurationSlow:v,fontSize:y,borderRadius:b}=e;return{[n]:S(S({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:a,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},[`${n}-header`]:{height:s,paddingInline:c,color:u,lineHeight:`${s}px`,background:i,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:d,color:o,fontSize:y,background:a},[`${n}-content`]:{flex:"auto",minHeight:0},[`${n}-sider`]:{position:"relative",minWidth:0,background:i,transition:`all ${m}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${t}-menu${t}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:f},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:f,color:r,lineHeight:`${f}px`,textAlign:"center",background:l,cursor:"pointer",transition:`all ${m}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:s,insetInlineEnd:-h,zIndex:1,width:h,height:h,color:r,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:i,borderStartStartRadius:0,borderStartEndRadius:b,borderEndEndRadius:b,borderEndStartRadius:0,cursor:"pointer",transition:`background ${v} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${v}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-h,borderStartStartRadius:b,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:b}}}}},i2e(e)),{"&-rtl":{direction:"rtl"}})}},l2e=pt("Layout",e=>{const{colorText:t,controlHeightSM:n,controlHeight:o,controlHeightLG:r,marginXXS:i}=e,a=r*1.25,l=nt(e,{layoutHeaderHeight:o*2,layoutHeaderPaddingInline:a,layoutHeaderColor:t,layoutFooterPadding:`${n}px ${a}px`,layoutTriggerHeight:r+i*2,layoutZeroTriggerSize:r});return[a2e(l)]},e=>{const{colorBgLayout:t}=e;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140"}}),SI=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function jy(e){let{suffixCls:t,tagName:n,name:o}=e;return r=>pe({compatConfig:{MODE:3},name:o,props:SI(),setup(a,l){let{slots:s}=l;const{prefixCls:c}=Ve(t,a);return()=>{const u=S(S({},a),{prefixCls:c.value,tagName:n});return g(r,u,s)}}})}const CI=pe({compatConfig:{MODE:3},props:SI(),setup(e,t){let{slots:n}=t;return()=>g(e.tagName,{class:e.prefixCls},n)}}),s2e=pe({compatConfig:{MODE:3},inheritAttrs:!1,props:SI(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("",e),[a,l]=l2e(r),s=he([]);ft(K9,{addSider:d=>{s.value=[...s.value,d]},removeSider:d=>{s.value=s.value.filter(f=>f!==d)}});const u=M(()=>{const{prefixCls:d,hasSider:f}=e;return{[l.value]:!0,[`${d}`]:!0,[`${d}-has-sider`]:typeof f=="boolean"?f:s.value.length>0,[`${d}-rtl`]:i.value==="rtl"}});return()=>{const{tagName:d}=e;return a(g(d,S(S({},o),{class:[u.value,o.class]}),n))}}}),c2e=jy({suffixCls:"layout",tagName:"section",name:"ALayout"})(s2e),Pm=jy({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(CI),Tm=jy({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(CI),Em=jy({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(CI),kC=c2e;var u2e={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};const d2e=u2e;function s8(e){for(var t=1;t({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:Z.any,width:Z.oneOfType([Z.number,Z.string]),collapsedWidth:Z.oneOfType([Z.number,Z.string]),breakpoint:Z.oneOf(Go("xs","sm","md","lg","xl","xxl","xxxl")),theme:Z.oneOf(Go("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),g2e=(()=>{let e=0;return function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${t}${e}`}})(),Am=pe({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:bt(h2e(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,t){let{emit:n,attrs:o,slots:r}=t;const{prefixCls:i}=Ve("layout-sider",e),a=it(K9,void 0),l=ve(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),s=ve(!1);Ie(()=>e.collapsed,()=>{l.value=!!e.collapsed}),ft(V9,l);const c=(v,y)=>{e.collapsed===void 0&&(l.value=v),n("update:collapsed",v),n("collapse",v,y)},u=ve(v=>{s.value=v.matches,n("breakpoint",v.matches),l.value!==v.matches&&c(v.matches,"responsive")});let d;function f(v){return u.value(v)}const h=g2e("ant-sider-");a&&a.addSider(h),lt(()=>{Ie(()=>e.breakpoint,()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}if(typeof window<"u"){const{matchMedia:v}=window;if(v&&e.breakpoint&&e.breakpoint in c8){d=v(`(max-width: ${c8[e.breakpoint]})`);try{d.addEventListener("change",f)}catch{d.addListener(f)}f(d)}}},{immediate:!0})}),Ct(()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}a&&a.removeSider(h)});const m=()=>{c(!l.value,"clickTrigger")};return()=>{var v,y;const b=i.value,{collapsedWidth:$,width:x,reverseArrow:_,zeroWidthTriggerStyle:w,trigger:I=(v=r.trigger)===null||v===void 0?void 0:v.call(r),collapsible:O,theme:P}=e,E=l.value?$:x,R=O0(E)?`${E}px`:String(E),A=parseFloat(String($||0))===0?g("span",{onClick:m,class:me(`${b}-zero-width-trigger`,`${b}-zero-width-trigger-${_?"right":"left"}`),style:w},[I||g(p2e,null,null)]):null,N={expanded:g(_?sa:xs,null,null),collapsed:g(_?xs:sa,null,null)},F=l.value?"collapsed":"expanded",W=N[F],D=I!==null?A||g("div",{class:`${b}-trigger`,onClick:m,style:{width:R}},[I||W]):null,B=[o.style,{flex:`0 0 ${R}`,maxWidth:R,minWidth:R,width:R}],k=me(b,`${b}-${P}`,{[`${b}-collapsed`]:!!l.value,[`${b}-has-trigger`]:O&&I!==null&&!A,[`${b}-below`]:!!s.value,[`${b}-zero-width`]:parseFloat(R)===0},o.class);return g("aside",V(V({},o),{},{class:k,style:B}),[g("div",{class:`${b}-children`},[(y=r.default)===null||y===void 0?void 0:y.call(r)]),O||s.value&&A?D:null])}}}),v2e=Pm,m2e=Tm,b2e=Am,y2e=Em,S2e=S(kC,{Header:Pm,Footer:Tm,Content:Em,Sider:Am,install:e=>(e.component(kC.name,kC),e.component(Pm.name,Pm),e.component(Tm.name,Tm),e.component(Am.name,Am),e.component(Em.name,Em),e)});function C2e(e,t,n){var o=n||{},r=o.noTrailing,i=r===void 0?!1:r,a=o.noLeading,l=a===void 0?!1:a,s=o.debounceMode,c=s===void 0?void 0:s,u,d=!1,f=0;function h(){u&&clearTimeout(u)}function m(y){var b=y||{},$=b.upcomingOnly,x=$===void 0?!1:$;h(),d=!x}function v(){for(var y=arguments.length,b=new Array(y),$=0;$e?l?(f=Date.now(),i||(u=setTimeout(c?I:w,e))):w():i!==!0&&(u=setTimeout(c?I:w,c===void 0?e-_:e))}return v.cancel=m,v}function $2e(e,t,n){var o=n||{},r=o.atBegin,i=r===void 0?!1:r;return C2e(e,t,{debounceMode:i!==!1})}const x2e=new Pt("antSpinMove",{to:{opacity:1}}),w2e=new Pt("antRotate",{to:{transform:"rotate(405deg)"}}),_2e=e=>({[`${e.componentCls}`]:S(S({},vt(e)),{position:"absolute",display:"none",color:e.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${e.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${e.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-e.spinDotSize/2},[`${e.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(e.spinDotSize-e.fontSize)/2+2,textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSize/2)-10},"&-sm":{[`${e.componentCls}-dot`]:{margin:-e.spinDotSizeSM/2},[`${e.componentCls}-text`]:{paddingTop:(e.spinDotSizeSM-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSizeSM/2)-10}},"&-lg":{[`${e.componentCls}-dot`]:{margin:-(e.spinDotSizeLG/2)},[`${e.componentCls}-text`]:{paddingTop:(e.spinDotSizeLG-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSizeLG/2)-10}}},[`${e.componentCls}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${e.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:e.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(e.spinDotSize-e.marginXXS/2)/2,height:(e.spinDotSize-e.marginXXS/2)/2,backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:x2e,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:w2e,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${e.componentCls}-dot`]:{fontSize:e.spinDotSizeSM,i:{width:(e.spinDotSizeSM-e.marginXXS/2)/2,height:(e.spinDotSizeSM-e.marginXXS/2)/2}},[`&-lg ${e.componentCls}-dot`]:{fontSize:e.spinDotSizeLG,i:{width:(e.spinDotSizeLG-e.marginXXS)/2,height:(e.spinDotSizeLG-e.marginXXS)/2}},[`&${e.componentCls}-show-text ${e.componentCls}-text`]:{display:"block"}})}),O2e=pt("Spin",e=>{const t=nt(e,{spinDotDefault:e.colorTextDescription,spinDotSize:e.controlHeightLG/2,spinDotSizeSM:e.controlHeightLG*.35,spinDotSizeLG:e.controlHeight});return[_2e(t)]},{contentHeight:400});var I2e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:Z.any,delay:Number,indicator:Z.any});let Mm=null;function T2e(e,t){return!!e&&!!t&&!isNaN(Number(t))}function E2e(e){const t=e.indicator;Mm=typeof t=="function"?t:()=>g(t,null,null)}const Aa=pe({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:bt(P2e(),{size:"default",spinning:!0,wrapperClassName:""}),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,size:i,direction:a}=Ve("spin",e),[l,s]=O2e(r),c=ve(e.spinning&&!T2e(e.spinning,e.delay));let u;return Ie([()=>e.spinning,()=>e.delay],()=>{u==null||u.cancel(),u=$2e(e.delay,()=>{c.value=e.spinning}),u==null||u()},{immediate:!0,flush:"post"}),Ct(()=>{u==null||u.cancel()}),()=>{var d,f;const{class:h}=n,m=I2e(n,["class"]),{tip:v=(d=o.tip)===null||d===void 0?void 0:d.call(o)}=e,y=(f=o.default)===null||f===void 0?void 0:f.call(o),b={[s.value]:!0,[r.value]:!0,[`${r.value}-sm`]:i.value==="small",[`${r.value}-lg`]:i.value==="large",[`${r.value}-spinning`]:c.value,[`${r.value}-show-text`]:!!v,[`${r.value}-rtl`]:a.value==="rtl",[h]:!!h};function $(_){const w=`${_}-dot`;let I=lo(o,e,"indicator");return I===null?null:(Array.isArray(I)&&(I=I.length===1?I[0]:I),mo(I)?ko(I,{class:w}):Mm&&mo(Mm())?ko(Mm(),{class:w}):g("span",{class:`${w} ${_}-dot-spin`},[g("i",{class:`${_}-dot-item`},null),g("i",{class:`${_}-dot-item`},null),g("i",{class:`${_}-dot-item`},null),g("i",{class:`${_}-dot-item`},null)]))}const x=g("div",V(V({},m),{},{class:b,"aria-live":"polite","aria-busy":c.value}),[$(r.value),v?g("div",{class:`${r.value}-text`},[v]):null]);if(y&&_n(y).length){const _={[`${r.value}-container`]:!0,[`${r.value}-blur`]:c.value};return l(g("div",{class:[`${r.value}-nested-loading`,e.wrapperClassName,s.value]},[c.value&&g("div",{key:"loading"},[x]),g("div",{class:_,key:"container"},[y])]))}return l(x)}}});Aa.setDefaultIndicator=E2e;Aa.install=function(e){return e.component(Aa.name,Aa),e};var A2e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};const M2e=A2e;function u8(e){for(var t=1;t{const r=S(S(S({},e),{size:"small"}),n);return g(Cl,r,o)}}}),B2e=pe({name:"MiddleSelect",inheritAttrs:!1,props:Sy(),Option:Cl.Option,setup(e,t){let{attrs:n,slots:o}=t;return()=>{const r=S(S(S({},e),{size:"middle"}),n);return g(Cl,r,o)}}}),nc=pe({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:Z.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:n,attrs:o}=t;const r=()=>{n("click",e.page)},i=a=>{n("keypress",a,r,e.page)};return()=>{const{showTitle:a,page:l,itemRender:s}=e,{class:c,style:u}=o,d=`${e.rootPrefixCls}-item`,f=me(d,`${d}-${e.page}`,{[`${d}-active`]:e.active,[`${d}-disabled`]:!e.page},c);return g("li",{onClick:r,onKeypress:i,title:a?String(l):null,tabindex:"0",class:f,style:u},[s({page:l,type:"page",originalElement:g("a",{rel:"nofollow"},[l])})])}}}),ac={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},F2e=pe({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:Z.any,current:Number,pageSizeOptions:Z.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:Z.object,rootPrefixCls:String,selectPrefixCls:String,goButton:Z.any},setup(e){const t=he(""),n=M(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),o=s=>`${s.value} ${e.locale.items_per_page}`,r=s=>{const{value:c,composing:u}=s.target;s.isComposing||u||t.value===c||(t.value=c)},i=s=>{const{goButton:c,quickGo:u,rootPrefixCls:d}=e;if(!(c||t.value===""))if(s.relatedTarget&&(s.relatedTarget.className.indexOf(`${d}-item-link`)>=0||s.relatedTarget.className.indexOf(`${d}-item`)>=0)){t.value="";return}else u(n.value),t.value=""},a=s=>{t.value!==""&&(s.keyCode===ac.ENTER||s.type==="click")&&(e.quickGo(n.value),t.value="")},l=M(()=>{const{pageSize:s,pageSizeOptions:c}=e;return c.some(u=>u.toString()===s.toString())?c:c.concat([s.toString()]).sort((u,d)=>{const f=isNaN(Number(u))?0:Number(u),h=isNaN(Number(d))?0:Number(d);return f-h})});return()=>{const{rootPrefixCls:s,locale:c,changeSize:u,quickGo:d,goButton:f,selectComponentClass:h,selectPrefixCls:m,pageSize:v,disabled:y}=e,b=`${s}-options`;let $=null,x=null,_=null;if(!u&&!d)return null;if(u&&h){const w=e.buildOptionText||o,I=l.value.map((O,P)=>g(h.Option,{key:P,value:O},{default:()=>[w({value:O})]}));$=g(h,{disabled:y,prefixCls:m,showSearch:!1,class:`${b}-size-changer`,optionLabelProp:"children",value:(v||l.value[0]).toString(),onChange:O=>u(Number(O)),getPopupContainer:O=>O.parentNode},{default:()=>[I]})}return d&&(f&&(_=typeof f=="boolean"?g("button",{type:"button",onClick:a,onKeyup:a,disabled:y,class:`${b}-quick-jumper-button`},[c.jump_to_confirm]):g("span",{onClick:a,onKeyup:a},[f])),x=g("div",{class:`${b}-quick-jumper`},[c.jump_to,Ln(g("input",{disabled:y,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:a,onBlur:i},null),[[nf]]),c.page,_])),g("li",{class:`${b}`},[$,x])}}}),zH={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};var H2e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r"u"?t.statePageSize:e;return Math.floor((n.total-1)/o)+1}const W2e=pe({compatConfig:{MODE:3},name:"Pagination",mixins:[eu],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:Z.string.def("rc-pagination"),selectPrefixCls:Z.string.def("rc-select"),current:Number,defaultCurrent:Z.number.def(1),total:Z.number.def(0),pageSize:Number,defaultPageSize:Z.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:Z.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:Z.oneOfType([Z.looseBool,Z.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:Z.arrayOf(Z.oneOfType([Z.number,Z.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:Z.object.def(zH),itemRender:Z.func.def(j2e),prevIcon:Z.any,nextIcon:Z.any,jumpPrevIcon:Z.any,jumpNextIcon:Z.any,totalBoundaryShowSizeChanger:Z.number.def(50)},data(){const e=this.$props;let t=x0([this.current,this.defaultCurrent]);const n=x0([this.pageSize,this.defaultPageSize]);return t=Math.min(t,el(n,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:n}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let n=this.stateCurrent;const o=el(e,this.$data,this.$props);n=n>o?o:n,ul(this,"current")||(t.stateCurrent=n,t.stateCurrentInputValue=n),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const n=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);n&&document.activeElement===n&&n.blur()}})},total(){const e={},t=el(this.pageSize,this.$data,this.$props);if(ul(this,"current")){const n=Math.min(this.current,t);e.stateCurrent=n,e.stateCurrentInputValue=n}else{let n=this.stateCurrent;n===0&&t>0?n=1:n=Math.min(this.stateCurrent,t),e.stateCurrent=n}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(el(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:n}=this.$props;return FN(this,e,this.$props)||g("button",{type:"button","aria-label":t,class:`${n}-item-link`},null)},getValidValue(e){const t=e.target.value,n=el(void 0,this.$data,this.$props),{stateCurrentInputValue:o}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=o:t>=n?r=n:r=Number(t),r},isValid(e){return z2e(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:n}=this.$props;return n<=t?!1:e},handleKeyDown(e){(e.keyCode===ac.ARROW_UP||e.keyCode===ac.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){if(e.isComposing||e.target.composing)return;const t=this.getValidValue(e),n=this.stateCurrentInputValue;t!==n&&this.setState({stateCurrentInputValue:t}),e.keyCode===ac.ENTER?this.handleChange(t):e.keyCode===ac.ARROW_UP?this.handleChange(t-1):e.keyCode===ac.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const n=t,o=el(e,this.$data,this.$props);t=t>o?o:t,o===0&&(t=this.stateCurrent),typeof e=="number"&&(ul(this,"pageSize")||this.setState({statePageSize:e}),ul(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==n&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let n=e;if(this.isValid(n)&&!t){const o=el(void 0,this.$data,this.$props);return n>o?n=o:n<1&&(n=1),ul(this,"current")||this.setState({stateCurrent:n,stateCurrentInputValue:n}),this.__emit("update:current",n),this.__emit("change",n,this.statePageSize),n}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrentn},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r0?b-1:0,B=b+1=W*2&&b!==3&&(O[0]=g(nc,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:J,page:J,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),O.unshift(P)),I-b>=W*2&&b!==I-2&&(O[O.length-1]=g(nc,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:te,page:te,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),O.push(E)),J!==1&&O.unshift(R),te!==I&&O.push(A)}let z=null;s&&(z=g("li",{class:`${e}-total-text`},[s(o,[o===0?0:(b-1)*$+1,b*$>o?o:b*$])]));const K=!k||!I,G=!L||!I,Y=this.buildOptionText||this.$slots.buildOptionText;return g("ul",V(V({unselectable:"on",ref:"paginationNode"},w),{},{class:me({[`${e}`]:!0,[`${e}-disabled`]:t},_)}),[z,g("li",{title:l?r.prev_page:null,onClick:this.prev,tabindex:K?null:0,onKeypress:this.runIfEnterPrev,class:me(`${e}-prev`,{[`${e}-disabled`]:K}),"aria-disabled":K},[this.renderPrev(D)]),O,g("li",{title:l?r.next_page:null,onClick:this.next,tabindex:G?null:0,onKeypress:this.runIfEnterNext,class:me(`${e}-next`,{[`${e}-disabled`]:G}),"aria-disabled":G},[this.renderNext(B)]),g(F2e,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:m,selectPrefixCls:v,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:b,pageSize:$,pageSizeOptions:y,buildOptionText:Y||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:F},null)])}}),V2e=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[` + &:hover ${t}-item:not(${t}-item-active), + &:active ${t}-item:not(${t}-item-active), + &:hover ${t}-item-link, + &:active ${t}-item-link + `]:{backgroundColor:"transparent"}},[`${t}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.paginationItemDisabledBgActive,"&:hover, &:active":{backgroundColor:e.paginationItemDisabledBgActive},a:{color:e.paginationItemDisabledColorActive}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}},[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{[`&${t}-disabled ${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},K2e=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`},[`&${t}-mini ${t}-item`]:{minWidth:e.paginationItemSizeSM,height:e.paginationItemSizeSM,margin:0,lineHeight:`${e.paginationItemSizeSM-2}px`},[`&${t}-mini ${t}-item:not(${t}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.paginationItemSizeSM,height:e.paginationItemSizeSM,margin:0,lineHeight:`${e.paginationItemSizeSM}px`,[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}},[` + &${t}-mini ${t}-prev ${t}-item-link, + &${t}-mini ${t}-next ${t}-item-link + `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.paginationItemSizeSM,marginInlineEnd:0,lineHeight:`${e.paginationItemSizeSM}px`},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.paginationMiniOptionsSizeChangerTop},"&-quick-jumper":{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`,input:S(S({},IO(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},U2e=e=>{const{componentCls:t}=e;return{[` + &${t}-simple ${t}-prev, + &${t}-simple ${t}-next + `]:{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`,verticalAlign:"top",[`${t}-item-link`]:{height:e.paginationItemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`}}},[`&${t}-simple ${t}-simple-pager`]:{display:"inline-block",height:e.paginationItemSizeSM,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:e.marginXS,padding:`0 ${e.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:e.paginationItemInputBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${e.inputOutlineOffset}px 0 ${e.controlOutlineWidth}px ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}}}},G2e=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},"&:focus-visible":S({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},yl(e))},[` + ${t}-prev, + ${t}-jump-prev, + ${t}-jump-next + `]:{marginInlineEnd:e.marginXS},[` + ${t}-prev, + ${t}-next, + ${t}-jump-prev, + ${t}-jump-next + `]:{display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,color:e.colorText,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:focus-visible ${t}-item-link`]:S({},yl(e)),[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:`${e.controlHeight}px`,verticalAlign:"top",input:S(S({},ru(e)),{width:e.controlHeightLG*1.25,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},Y2e=e=>{const{componentCls:t}=e;return{[`${t}-item`]:S(S({display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,marginInlineEnd:e.marginXS,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${e.paginationItemPaddingInline}px`,color:e.colorText,transition:"none","&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}}},Sl(e)),{"&-active":{fontWeight:e.paginationFontWeightActive,backgroundColor:e.paginationItemBgActive,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}})}},X2e=e=>{const{componentCls:t}=e;return{[t]:S(S(S(S(S(S(S(S({},vt(e)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.paginationItemSize,marginInlineEnd:e.marginXS,lineHeight:`${e.paginationItemSize-2}px`,verticalAlign:"middle"}}),Y2e(e)),G2e(e)),U2e(e)),K2e(e)),V2e(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},q2e=e=>{const{componentCls:t}=e;return{[`${t}${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.paginationItemDisabledBgActive}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[t]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.paginationItemBg},[`${t}-item-link`]:{backgroundColor:e.paginationItemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.paginationItemBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},Z2e=pt("Pagination",e=>{const t=nt(e,{paginationItemSize:e.controlHeight,paginationFontFamily:e.fontFamily,paginationItemBg:e.colorBgContainer,paginationItemBgActive:e.colorBgContainer,paginationFontWeightActive:e.fontWeightStrong,paginationItemSizeSM:e.controlHeightSM,paginationItemInputBg:e.colorBgContainer,paginationMiniOptionsSizeChangerTop:0,paginationItemDisabledBgActive:e.controlItemBgActiveDisabled,paginationItemDisabledColorActive:e.colorTextDisabled,paginationItemLinkBg:e.colorBgContainer,inputOutlineOffset:"0 0",paginationMiniOptionsMarginInlineStart:e.marginXXS/2,paginationMiniQuickJumperInputWidth:e.controlHeightLG*1.1,paginationItemPaddingInline:e.marginXXS*1.5,paginationEllipsisLetterSpacing:e.marginXXS/2,paginationSlashMarginInlineStart:e.marginXXS,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},iu(e));return[X2e(t),e.wireframe&&q2e(t)]});var Q2e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({total:Number,defaultCurrent:Number,disabled:De(),current:Number,defaultPageSize:Number,pageSize:Number,hideOnSinglePage:De(),showSizeChanger:De(),pageSizeOptions:kt(),buildOptionText:Oe(),showQuickJumper:rt([Boolean,Object]),showTotal:Oe(),size:Qe(),simple:De(),locale:Object,prefixCls:String,selectPrefixCls:String,totalBoundaryShowSizeChanger:Number,selectComponentClass:String,itemRender:Oe(),role:String,responsive:Boolean,showLessItems:De(),onChange:Oe(),onShowSizeChange:Oe(),"onUpdate:current":Oe(),"onUpdate:pageSize":Oe()}),e_e=pe({compatConfig:{MODE:3},name:"APagination",inheritAttrs:!1,props:J2e(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,configProvider:i,direction:a,size:l}=Ve("pagination",e),[s,c]=Z2e(r),u=M(()=>i.getPrefixCls("select",e.selectPrefixCls)),d=ff(),[f]=Wi("Pagination",qN,st(e,"locale")),h=m=>{const v=g("span",{class:`${m}-item-ellipsis`},[Do("•••")]),y=g("button",{class:`${m}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?g(sa,null,null):g(xs,null,null)]),b=g("button",{class:`${m}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?g(xs,null,null):g(sa,null,null)]),$=g("a",{rel:"nofollow",class:`${m}-item-link`},[g("div",{class:`${m}-item-container`},[a.value==="rtl"?g(p8,{class:`${m}-item-link-icon`},null):g(d8,{class:`${m}-item-link-icon`},null),v])]),x=g("a",{rel:"nofollow",class:`${m}-item-link`},[g("div",{class:`${m}-item-container`},[a.value==="rtl"?g(d8,{class:`${m}-item-link-icon`},null):g(p8,{class:`${m}-item-link-icon`},null),v])]);return{prevIcon:y,nextIcon:b,jumpPrevIcon:$,jumpNextIcon:x}};return()=>{var m;const{itemRender:v=n.itemRender,buildOptionText:y=n.buildOptionText,selectComponentClass:b,responsive:$}=e,x=Q2e(e,["itemRender","buildOptionText","selectComponentClass","responsive"]),_=l.value==="small"||!!(!((m=d.value)===null||m===void 0)&&m.xs&&!l.value&&$),w=S(S(S(S(S({},x),h(r.value)),{prefixCls:r.value,selectPrefixCls:u.value,selectComponentClass:b||(_?k2e:B2e),locale:f.value,buildOptionText:y}),o),{class:me({[`${r.value}-mini`]:_,[`${r.value}-rtl`]:a.value==="rtl"},o.class,c.value),itemRender:v});return s(g(W2e,w,null))}}}),Wy=$n(e_e),t_e=()=>({avatar:Z.any,description:Z.any,prefixCls:String,title:Z.any}),jH=pe({compatConfig:{MODE:3},name:"AListItemMeta",props:t_e(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ve("list",e);return()=>{var r,i,a,l,s,c;const u=`${o.value}-item-meta`,d=(r=e.title)!==null&&r!==void 0?r:(i=n.title)===null||i===void 0?void 0:i.call(n),f=(a=e.description)!==null&&a!==void 0?a:(l=n.description)===null||l===void 0?void 0:l.call(n),h=(s=e.avatar)!==null&&s!==void 0?s:(c=n.avatar)===null||c===void 0?void 0:c.call(n),m=g("div",{class:`${o.value}-item-meta-content`},[d&&g("h4",{class:`${o.value}-item-meta-title`},[d]),f&&g("div",{class:`${o.value}-item-meta-description`},[f])]);return g("div",{class:u},[h&&g("div",{class:`${o.value}-item-meta-avatar`},[h]),(d||f)&&m])}}}),WH=Symbol("ListContextKey");var n_e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,extra:Z.any,actions:Z.array,grid:Object,colStyle:{type:Object,default:void 0}}),VH=pe({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:jH,props:o_e(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{itemLayout:r,grid:i}=it(WH,{grid:he(),itemLayout:he()}),{prefixCls:a}=Ve("list",e),l=()=>{var c;const u=((c=n.default)===null||c===void 0?void 0:c.call(n))||[];let d;return u.forEach(f=>{Uee(f)&&!Nh(f)&&(d=!0)}),d&&u.length>1},s=()=>{var c,u;const d=(c=e.extra)!==null&&c!==void 0?c:(u=n.extra)===null||u===void 0?void 0:u.call(n);return r.value==="vertical"?!!d:!l()};return()=>{var c,u,d,f,h;const{class:m}=o,v=n_e(o,["class"]),y=a.value,b=(c=e.extra)!==null&&c!==void 0?c:(u=n.extra)===null||u===void 0?void 0:u.call(n),$=(d=n.default)===null||d===void 0?void 0:d.call(n);let x=(f=e.actions)!==null&&f!==void 0?f:ln((h=n.actions)===null||h===void 0?void 0:h.call(n));x=x&&!Array.isArray(x)?[x]:x;const _=x&&x.length>0&&g("ul",{class:`${y}-item-action`,key:"actions"},[x.map((O,P)=>g("li",{key:`${y}-item-action-${P}`},[O,P!==x.length-1&&g("em",{class:`${y}-item-action-split`},null)]))]),w=i.value?"div":"li",I=g(w,V(V({},v),{},{class:me(`${y}-item`,{[`${y}-item-no-flex`]:!s()},m)}),{default:()=>[r.value==="vertical"&&b?[g("div",{class:`${y}-item-main`,key:"content"},[$,_]),g("div",{class:`${y}-item-extra`,key:"extra"},[b])]:[$,_,Gt(b,{key:"extra"})]]});return i.value?g(By,{flex:1,style:e.colStyle},{default:()=>[I]}):I}}}),r_e=e=>{const{listBorderedCls:t,componentCls:n,paddingLG:o,margin:r,padding:i,listItemPaddingSM:a,marginLG:l,borderRadiusLG:s}=e;return{[`${t}`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:s,[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:o},[`${n}-pagination`]:{margin:`${r}px ${l}px`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:`${i}px ${o}px`}}}},i_e=e=>{const{componentCls:t,screenSM:n,screenMD:o,marginLG:r,marginSM:i,margin:a}=e;return{[`@media screen and (max-width:${o})`]:{[`${t}`]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:r}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:r}}}},[`@media screen and (max-width: ${n})`]:{[`${t}`]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${a}px`}}}}}},a_e=e=>{const{componentCls:t,antCls:n,controlHeight:o,minHeight:r,paddingSM:i,marginLG:a,padding:l,listItemPadding:s,colorPrimary:c,listItemPaddingSM:u,listItemPaddingLG:d,paddingXS:f,margin:h,colorText:m,colorTextDescription:v,motionDurationSlow:y,lineWidth:b}=e;return{[`${t}`]:S(S({},vt(e)),{position:"relative","*":{outline:"none"},[`${t}-header, ${t}-footer`]:{background:"transparent",paddingBlock:i},[`${t}-pagination`]:{marginBlockStart:a,textAlign:"end",[`${n}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:r,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:s,color:m,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:l},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:m},[`${t}-item-meta-title`]:{marginBottom:e.marginXXS,color:m,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:m,transition:`all ${y}`,"&:hover":{color:c}}},[`${t}-item-meta-description`]:{color:v,fontSize:e.fontSize,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${f}px`,color:v,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:b,height:Math.ceil(e.fontSize*e.lineHeight)-e.marginXXS*2,transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${l}px 0`,color:v,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:l,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${n}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:h,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:a},[`${t}-item-meta`]:{marginBlockEnd:l,[`${t}-item-meta-title`]:{marginBlockEnd:i,color:m,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:`0 ${l}px`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:o},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:d},[`${t}-sm ${t}-item`]:{padding:u},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},l_e=pt("List",e=>{const t=nt(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG,listItemPadding:`${e.paddingContentVertical}px ${e.paddingContentHorizontalLG}px`,listItemPaddingSM:`${e.paddingContentVerticalSM}px ${e.paddingContentHorizontal}px`,listItemPaddingLG:`${e.paddingContentVerticalLG}px ${e.paddingContentHorizontalLG}px`});return[a_e(t),r_e(t),i_e(t)]},{contentWidth:220}),s_e=()=>({bordered:De(),dataSource:kt(),extra:rr(),grid:qe(),itemLayout:String,loading:rt([Boolean,Object]),loadMore:rr(),pagination:rt([Boolean,Object]),prefixCls:String,rowKey:rt([String,Number,Function]),renderItem:Oe(),size:String,split:De(),header:rr(),footer:rr(),locale:qe()}),es=pe({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:VH,props:bt(s_e(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;var r,i;ft(WH,{grid:st(e,"grid"),itemLayout:st(e,"itemLayout")});const a={current:1,total:0},{prefixCls:l,direction:s,renderEmpty:c}=Ve("list",e),[u,d]=l_e(l),f=M(()=>e.pagination&&typeof e.pagination=="object"?e.pagination:{}),h=he((r=f.value.defaultCurrent)!==null&&r!==void 0?r:1),m=he((i=f.value.defaultPageSize)!==null&&i!==void 0?i:10);Ie(f,()=>{"current"in f.value&&(h.value=f.value.current),"pageSize"in f.value&&(m.value=f.value.pageSize)});const v=[],y=F=>(W,D)=>{h.value=W,m.value=D,f.value[F]&&f.value[F](W,D)},b=y("onChange"),$=y("onShowSizeChange"),x=M(()=>typeof e.loading=="boolean"?{spinning:e.loading}:e.loading),_=M(()=>x.value&&x.value.spinning),w=M(()=>{let F="";switch(e.size){case"large":F="lg";break;case"small":F="sm";break}return F}),I=M(()=>({[`${l.value}`]:!0,[`${l.value}-vertical`]:e.itemLayout==="vertical",[`${l.value}-${w.value}`]:w.value,[`${l.value}-split`]:e.split,[`${l.value}-bordered`]:e.bordered,[`${l.value}-loading`]:_.value,[`${l.value}-grid`]:!!e.grid,[`${l.value}-rtl`]:s.value==="rtl"})),O=M(()=>{const F=S(S(S({},a),{total:e.dataSource.length,current:h.value,pageSize:m.value}),e.pagination||{}),W=Math.ceil(F.total/F.pageSize);return F.current>W&&(F.current=W),F}),P=M(()=>{let F=[...e.dataSource];return e.pagination&&e.dataSource.length>(O.value.current-1)*O.value.pageSize&&(F=[...e.dataSource].splice((O.value.current-1)*O.value.pageSize,O.value.pageSize)),F}),E=ff(),R=ai(()=>{for(let F=0;F{if(!e.grid)return;const F=R.value&&e.grid[R.value]?e.grid[R.value]:e.grid.column;if(F)return{width:`${100/F}%`,maxWidth:`${100/F}%`}}),N=(F,W)=>{var D;const B=(D=e.renderItem)!==null&&D!==void 0?D:n.renderItem;if(!B)return null;let k;const L=typeof e.rowKey;return L==="function"?k=e.rowKey(F):L==="string"||L==="number"?k=F[e.rowKey]:k=F.key,k||(k=`list-item-${W}`),v[W]=k,B({item:F,index:W})};return()=>{var F,W,D,B,k,L,z,K;const G=(F=e.loadMore)!==null&&F!==void 0?F:(W=n.loadMore)===null||W===void 0?void 0:W.call(n),Y=(D=e.footer)!==null&&D!==void 0?D:(B=n.footer)===null||B===void 0?void 0:B.call(n),ne=(k=e.header)!==null&&k!==void 0?k:(L=n.header)===null||L===void 0?void 0:L.call(n),re=ln((z=n.default)===null||z===void 0?void 0:z.call(n)),J=!!(G||e.pagination||Y),te=me(S(S({},I.value),{[`${l.value}-something-after-last-item`]:J}),o.class,d.value),ee=e.pagination?g("div",{class:`${l.value}-pagination`},[g(Wy,V(V({},O.value),{},{onChange:b,onShowSizeChange:$}),null)]):null;let fe=_.value&&g("div",{style:{minHeight:"53px"}},null);if(P.value.length>0){v.length=0;const X=P.value.map((ye,H)=>N(ye,H)),ue=X.map((ye,H)=>g("div",{key:v[H],style:A.value},[ye]));fe=e.grid?g(jO,{gutter:e.grid.gutter},{default:()=>[ue]}):g("ul",{class:`${l.value}-items`},[X])}else!re.length&&!_.value&&(fe=g("div",{class:`${l.value}-empty-text`},[((K=e.locale)===null||K===void 0?void 0:K.emptyText)||c("List")]));const ie=O.value.position||"bottom";return u(g("div",V(V({},o),{},{class:te}),[(ie==="top"||ie==="both")&&ee,ne&&g("div",{class:`${l.value}-header`},[ne]),g(Aa,x.value,{default:()=>[fe,re]}),Y&&g("div",{class:`${l.value}-footer`},[Y]),G||(ie==="bottom"||ie==="both")&&ee]))}}});es.install=function(e){return e.component(es.name,es),e.component(es.Item.name,es.Item),e.component(es.Item.Meta.name,es.Item.Meta),e};const c_e=es;function u_e(e){const{selectionStart:t}=e;return e.value.slice(0,t)}function d_e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(Array.isArray(t)?t:[t]).reduce((o,r)=>{const i=e.lastIndexOf(r);return i>o.location?{location:i,prefix:r}:o},{location:-1,prefix:""})}function h8(e){return(e||"").toLowerCase()}function f_e(e,t,n){const o=e[0];if(!o||o===n)return e;let r=e;const i=t.length;for(let a=0;a[]}},setup(e,t){let{slots:n}=t;const{activeIndex:o,setActiveIndex:r,selectOption:i,onFocus:a=b_e,loading:l}=it(KH,{activeIndex:ve(),loading:ve(!1)});let s;const c=u=>{clearTimeout(s),s=setTimeout(()=>{a(u)})};return Ct(()=>{clearTimeout(s)}),()=>{var u;const{prefixCls:d,options:f}=e,h=f[o.value]||{};return g(qn,{prefixCls:`${d}-menu`,activeKey:h.value,onSelect:m=>{let{key:v}=m;const y=f.find(b=>{let{value:$}=b;return $===v});i(y)},onMousedown:c},{default:()=>[!l.value&&f.map((m,v)=>{var y,b;const{value:$,disabled:x,label:_=m.value,class:w,style:I}=m;return g(Ea,{key:$,disabled:x,onMouseenter:()=>{r(v)},class:w,style:I},{default:()=>[(b=(y=n.option)===null||y===void 0?void 0:y.call(n,m))!==null&&b!==void 0?b:typeof _=="function"?_(m):_]})}),!l.value&&f.length===0?g(Ea,{key:"notFoundContent",disabled:!0},{default:()=>[(u=n.notFoundContent)===null||u===void 0?void 0:u.call(n)]}):null,l.value&&g(Ea,{key:"loading",disabled:!0},{default:()=>[g(Aa,{size:"small"},null)]})]})}}}),S_e={bottomRight:{points:["tl","br"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},bottomLeft:{points:["tr","bl"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["bl","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topLeft:{points:["br","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}},C_e=pe({compatConfig:{MODE:3},name:"KeywordTrigger",props:{loading:{type:Boolean,default:void 0},options:{type:Array,default:()=>[]},prefixCls:String,placement:String,visible:{type:Boolean,default:void 0},transitionName:String,getPopupContainer:Function,direction:String,dropdownClassName:String},setup(e,t){let{slots:n}=t;const o=()=>`${e.prefixCls}-dropdown`,r=()=>{const{options:a}=e;return g(y_e,{prefixCls:o(),options:a},{notFoundContent:n.notFoundContent,option:n.option})},i=M(()=>{const{placement:a,direction:l}=e;let s="topRight";return l==="rtl"?s=a==="top"?"topLeft":"bottomLeft":s=a==="top"?"topRight":"bottomRight",s});return()=>{const{visible:a,transitionName:l,getPopupContainer:s}=e;return g(tu,{prefixCls:o(),popupVisible:a,popup:r(),popupClassName:e.dropdownClassName,popupPlacement:i.value,popupTransitionName:l,builtinPlacements:S_e,getPopupContainer:s},{default:n.default})}}}),$_e=Go("top","bottom"),UH={autofocus:{type:Boolean,default:void 0},prefix:Z.oneOfType([Z.string,Z.arrayOf(Z.string)]),prefixCls:String,value:String,disabled:{type:Boolean,default:void 0},split:String,transitionName:String,placement:Z.oneOf($_e),character:Z.any,characterRender:Function,filterOption:{type:[Boolean,Function]},validateSearch:Function,getPopupContainer:{type:Function},options:kt(),loading:{type:Boolean,default:void 0},rows:[Number,String],direction:{type:String}},GH=S(S({},UH),{dropdownClassName:String}),YH={prefix:"@",split:" ",rows:1,validateSearch:g_e,filterOption:()=>v_e};bt(GH,YH);var g8=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{c.value=e.value});const u=A=>{n("change",A)},d=A=>{let{target:{value:N,composing:F},isComposing:W}=A;W||F||u(N)},f=(A,N,F)=>{S(c,{measuring:!0,measureText:A,measurePrefix:N,measureLocation:F,activeIndex:0})},h=A=>{S(c,{measuring:!1,measureLocation:0,measureText:null}),A==null||A()},m=A=>{const{which:N}=A;if(c.measuring){if(N===Fe.UP||N===Fe.DOWN){const F=P.value.length,W=N===Fe.UP?-1:1,D=(c.activeIndex+W+F)%F;c.activeIndex=D,A.preventDefault()}else if(N===Fe.ESC)h();else if(N===Fe.ENTER){if(A.preventDefault(),!P.value.length){h();return}const F=P.value[c.activeIndex];w(F)}}},v=A=>{const{key:N,which:F}=A,{measureText:W,measuring:D}=c,{prefix:B,validateSearch:k}=e,L=A.target;if(L.composing)return;const z=u_e(L),{location:K,prefix:G}=d_e(z,B);if([Fe.ESC,Fe.UP,Fe.DOWN,Fe.ENTER].indexOf(F)===-1)if(K!==-1){const Y=z.slice(K+G.length),ne=k(Y,e),re=!!O(Y).length;ne?(N===G||N==="Shift"||D||Y!==W&&re)&&f(Y,G,K):D&&h(),ne&&n("search",Y,G)}else D&&h()},y=A=>{c.measuring||n("pressenter",A)},b=A=>{x(A)},$=A=>{_(A)},x=A=>{clearTimeout(s.value);const{isFocus:N}=c;!N&&A&&n("focus",A),c.isFocus=!0},_=A=>{s.value=setTimeout(()=>{c.isFocus=!1,h(),n("blur",A)},100)},w=A=>{const{split:N}=e,{value:F=""}=A,{text:W,selectionLocation:D}=p_e(c.value,{measureLocation:c.measureLocation,targetText:F,prefix:c.measurePrefix,selectionStart:l.value.selectionStart,split:N});u(W),h(()=>{h_e(l.value,D)}),n("select",A,c.measurePrefix)},I=A=>{c.activeIndex=A},O=A=>{const N=A||c.measureText||"",{filterOption:F}=e;return e.options.filter(D=>F?F(N,D):!0)},P=M(()=>O());return r({blur:()=>{l.value.blur()},focus:()=>{l.value.focus()}}),ft(KH,{activeIndex:st(c,"activeIndex"),setActiveIndex:I,selectOption:w,onFocus:x,onBlur:_,loading:st(e,"loading")}),fr(()=>{wt(()=>{c.measuring&&(a.value.scrollTop=l.value.scrollTop)})}),()=>{const{measureLocation:A,measurePrefix:N,measuring:F}=c,{prefixCls:W,placement:D,transitionName:B,getPopupContainer:k,direction:L}=e,z=g8(e,["prefixCls","placement","transitionName","getPopupContainer","direction"]),{class:K,style:G}=o,Y=g8(o,["class","style"]),ne=_t(z,["value","prefix","split","validateSearch","filterOption","options","loading"]),re=S(S(S({},ne),Y),{onChange:v8,onSelect:v8,value:c.value,onInput:d,onBlur:$,onKeydown:m,onKeyup:v,onFocus:b,onPressenter:y});return g("div",{class:me(W,K),style:G},[Ln(g("textarea",V({ref:l},re),null),[[nf]]),F&&g("div",{ref:a,class:`${W}-measure`},[c.value.slice(0,A),g(C_e,{prefixCls:W,transitionName:B,dropdownClassName:e.dropdownClassName,placement:D,options:F?P.value:[],visible:!0,direction:L,getPopupContainer:k},{default:()=>[g("span",null,[N])],notFoundContent:i.notFoundContent,option:i.option}),c.value.slice(A+N.length)])])}}}),w_e={value:String,disabled:Boolean,payload:qe()},XH=S(S({},w_e),{label:cn([])}),qH={name:"Option",props:XH,render(e,t){let{slots:n}=t;var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}};S({compatConfig:{MODE:3}},qH);const __e=e=>{const{componentCls:t,colorTextDisabled:n,controlItemBgHover:o,controlPaddingHorizontal:r,colorText:i,motionDurationSlow:a,lineHeight:l,controlHeight:s,inputPaddingHorizontal:c,inputPaddingVertical:u,fontSize:d,colorBgElevated:f,borderRadiusLG:h,boxShadowSecondary:m}=e,v=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{[t]:S(S(S(S(S({},vt(e)),ru(e)),{position:"relative",display:"inline-block",height:"auto",padding:0,overflow:"hidden",lineHeight:l,whiteSpace:"pre-wrap",verticalAlign:"bottom"}),Xh(e,t)),{"&-disabled":{"> textarea":S({},OO(e))},"&-focused":S({},$s(e)),[`&-affix-wrapper ${t}-suffix`]:{position:"absolute",top:0,insetInlineEnd:c,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},[`> textarea, ${t}-measure`]:{color:i,boxSizing:"border-box",minHeight:s-2,margin:0,padding:`${u}px ${c}px`,overflow:"inherit",overflowX:"hidden",overflowY:"auto",fontWeight:"inherit",fontSize:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontVariant:"inherit",fontSizeAdjust:"inherit",fontStretch:"inherit",lineHeight:"inherit",direction:"inherit",letterSpacing:"inherit",whiteSpace:"inherit",textAlign:"inherit",verticalAlign:"top",wordWrap:"break-word",wordBreak:"inherit",tabSize:"inherit"},"> textarea":S({width:"100%",border:"none",outline:"none",resize:"none",backgroundColor:"inherit"},_O(e.colorTextPlaceholder)),[`${t}-measure`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:-1,color:"transparent",pointerEvents:"none","> span":{display:"inline-block",minHeight:"1em"}},"&-dropdown":S(S({},vt(e)),{position:"absolute",top:-9999,insetInlineStart:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",fontSize:d,fontVariant:"initial",backgroundColor:f,borderRadius:h,outline:"none",boxShadow:m,"&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.dropdownHeight,marginBottom:0,paddingInlineStart:0,overflow:"auto",listStyle:"none",outline:"none","&-item":S(S({},eo),{position:"relative",display:"block",minWidth:e.controlItemWidth,padding:`${v}px ${r}px`,color:i,fontWeight:"normal",lineHeight:l,cursor:"pointer",transition:`background ${a} ease`,"&:hover":{backgroundColor:o},"&:first-child":{borderStartStartRadius:h,borderStartEndRadius:h,borderEndStartRadius:0,borderEndEndRadius:0},"&:last-child":{borderStartStartRadius:0,borderStartEndRadius:0,borderEndStartRadius:h,borderEndEndRadius:h},"&-disabled":{color:n,cursor:"not-allowed","&:hover":{color:n,backgroundColor:o,cursor:"not-allowed"}},"&-selected":{color:i,fontWeight:e.fontWeightStrong,backgroundColor:o},"&-active":{backgroundColor:o}})}})})}},O_e=pt("Mentions",e=>{const t=iu(e);return[__e(t)]},e=>({dropdownHeight:250,controlItemWidth:100,zIndexPopup:e.zIndexPopupBase+50}));var m8=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{prefix:n="@",split:o=" "}=t,r=Array.isArray(n)?n:[n];return e.split(o).map(function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=null;return r.some(l=>i.slice(0,l.length)===l?(a=l,!0):!1),a!==null?{prefix:a,value:i.slice(a.length)}:null}).filter(i=>!!i&&!!i.value)},T_e=()=>S(S({},UH),{loading:{type:Boolean,default:void 0},onFocus:{type:Function},onBlur:{type:Function},onSelect:{type:Function},onChange:{type:Function},onPressenter:{type:Function},"onUpdate:value":{type:Function},notFoundContent:Z.any,defaultValue:String,id:String,status:String}),BC=pe({compatConfig:{MODE:3},name:"AMentions",inheritAttrs:!1,props:T_e(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;var a,l;const{prefixCls:s,renderEmpty:c,direction:u}=Ve("mentions",e),[d,f]=O_e(s),h=ve(!1),m=ve(null),v=ve((l=(a=e.value)!==null&&a!==void 0?a:e.defaultValue)!==null&&l!==void 0?l:""),y=co(),b=To.useInject(),$=M(()=>da(b.status,e.status));eO({prefixCls:M(()=>`${s.value}-menu`),mode:M(()=>"vertical"),selectable:M(()=>!1),onClick:()=>{},validator:N=>{Sn()}}),Ie(()=>e.value,N=>{v.value=N});const x=N=>{h.value=!0,o("focus",N)},_=N=>{h.value=!1,o("blur",N),y.onFieldBlur()},w=function(){for(var N=arguments.length,F=new Array(N),W=0;W{e.value===void 0&&(v.value=N),o("update:value",N),o("change",N),y.onFieldChange()},O=()=>{const N=e.notFoundContent;return N!==void 0?N:n.notFoundContent?n.notFoundContent():c("Select")},P=()=>{var N;return ln(((N=n.default)===null||N===void 0?void 0:N.call(n))||[]).map(F=>{var W,D;return S(S({},BN(F)),{label:(D=(W=F.children)===null||W===void 0?void 0:W.default)===null||D===void 0?void 0:D.call(W)})})};i({focus:()=>{m.value.focus()},blur:()=>{m.value.blur()}});const A=M(()=>e.loading?I_e:e.filterOption);return()=>{const{disabled:N,getPopupContainer:F,rows:W=1,id:D=y.id.value}=e,B=m8(e,["disabled","getPopupContainer","rows","id"]),{hasFeedback:k,feedbackIcon:L}=b,{class:z}=r,K=m8(r,["class"]),G=_t(B,["defaultValue","onUpdate:value","prefixCls"]),Y=me({[`${s.value}-disabled`]:N,[`${s.value}-focused`]:h.value,[`${s.value}-rtl`]:u.value==="rtl"},sr(s.value,$.value),!k&&z,f.value),ne=S(S(S(S({prefixCls:s.value},G),{disabled:N,direction:u.value,filterOption:A.value,getPopupContainer:F,options:e.loading?[{value:"ANTDV_SEARCHING",disabled:!0,label:g(Aa,{size:"small"},null)}]:e.options||P(),class:Y}),K),{rows:W,onChange:I,onSelect:w,onFocus:x,onBlur:_,ref:m,value:v.value,id:D}),re=g(x_e,V(V({},ne),{},{dropdownClassName:f.value}),{notFoundContent:O,option:n.option});return d(k?g("div",{class:me(`${s.value}-affix-wrapper`,sr(`${s.value}-affix-wrapper`,$.value,k),z,f.value)},[re,g("span",{class:`${s.value}-suffix`},[L])]):re)}}}),Rm=pe(S(S({compatConfig:{MODE:3}},qH),{name:"AMentionsOption",props:XH})),E_e=S(BC,{Option:Rm,getMentions:P_e,install:e=>(e.component(BC.name,BC),e.component(Rm.name,Rm),e)});var A_e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{Jx={x:e.pageX,y:e.pageY},setTimeout(()=>Jx=null,100)};vF()&&wn(document.documentElement,"click",M_e,!0);const R_e=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:Z.any,closable:{type:Boolean,default:void 0},closeIcon:Z.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:Z.any,okText:Z.any,okType:String,cancelText:Z.any,icon:Z.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:qe(),cancelButtonProps:qe(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:qe(),maskStyle:qe(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:qe()}),wo=pe({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:bt(R_e(),{width:520,confirmLoading:!1,okType:"primary"}),setup(e,t){let{emit:n,slots:o,attrs:r}=t;const[i]=Wi("Modal"),{prefixCls:a,rootPrefixCls:l,direction:s,getPopupContainer:c}=Ve("modal",e),[u,d]=Mwe(a);Sn(e.visible===void 0);const f=v=>{n("update:visible",!1),n("update:open",!1),n("cancel",v),n("change",!1)},h=v=>{n("ok",v)},m=()=>{var v,y;const{okText:b=(v=o.okText)===null||v===void 0?void 0:v.call(o),okType:$,cancelText:x=(y=o.cancelText)===null||y===void 0?void 0:y.call(o),confirmLoading:_}=e;return g(Je,null,[g(Un,V({onClick:f},e.cancelButtonProps),{default:()=>[x||i.value.cancelText]}),g(Un,V(V({},I0($)),{},{loading:_,onClick:h},e.okButtonProps),{default:()=>[b||i.value.okText]})])};return()=>{var v,y;const{prefixCls:b,visible:$,open:x,wrapClassName:_,centered:w,getContainer:I,closeIcon:O=(v=o.closeIcon)===null||v===void 0?void 0:v.call(o),focusTriggerAfterClose:P=!0}=e,E=A_e(e,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),R=me(_,{[`${a.value}-centered`]:!!w,[`${a.value}-wrap-rtl`]:s.value==="rtl"});return u(g(TH,V(V(V({},E),r),{},{rootClassName:d.value,class:me(d.value,r.class),getContainer:I||(c==null?void 0:c.value),prefixCls:a.value,wrapClassName:R,visible:x??$,onClose:f,focusTriggerAfterClose:P,transitionName:dr(l.value,"zoom",e.transitionName),maskTransitionName:dr(l.value,"fade",e.maskTransitionName),mousePosition:(y=E.mousePosition)!==null&&y!==void 0?y:Jx}),S(S({},o),{footer:o.footer||m,closeIcon:()=>g("span",{class:`${a.value}-close-x`},[O||g(Vr,{class:`${a.value}-close-icon`},null)])})))}}}),ZH=()=>{const e=ve(!1);return Ct(()=>{e.value=!0}),e},D_e={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:qe(),emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function b8(e){return!!(e&&e.then)}const ew=pe({compatConfig:{MODE:3},name:"ActionButton",props:D_e,setup(e,t){let{slots:n}=t;const o=ve(!1),r=ve(),i=ve(!1);let a;const l=ZH();lt(()=>{e.autofocus&&(a=setTimeout(()=>{var d,f;return(f=(d=Nr(r.value))===null||d===void 0?void 0:d.focus)===null||f===void 0?void 0:f.call(d)}))}),Ct(()=>{clearTimeout(a)});const s=function(){for(var d,f=arguments.length,h=new Array(f),m=0;m{b8(d)&&(i.value=!0,d.then(function(){l.value||(i.value=!1),s(...arguments),o.value=!1},f=>(l.value||(i.value=!1),o.value=!1,Promise.reject(f))))},u=d=>{const{actionFn:f}=e;if(o.value)return;if(o.value=!0,!f){s();return}let h;if(e.emitEvent){if(h=f(d),e.quitOnNullishReturnValue&&!b8(h)){o.value=!1,s(d);return}}else if(f.length)h=f(e.close),o.value=!1;else if(h=f(),!h){s();return}c(h)};return()=>{const{type:d,prefixCls:f,buttonProps:h}=e;return g(Un,V(V(V({},I0(d)),{},{onClick:u,loading:i.value,prefixCls:f},h),{},{ref:r}),n)}}});function Ru(e){return typeof e=="function"?e():e}const QH=pe({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","open","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName","confirmPrefixCls","footer"],setup(e,t){let{attrs:n}=t;const[o]=Wi("Modal");return()=>{const{icon:r,onCancel:i,onOk:a,close:l,okText:s,closable:c=!1,zIndex:u,afterClose:d,keyboard:f,centered:h,getContainer:m,maskStyle:v,okButtonProps:y,cancelButtonProps:b,okCancel:$,width:x=416,mask:_=!0,maskClosable:w=!1,type:I,open:O,title:P,content:E,direction:R,closeIcon:A,modalRender:N,focusTriggerAfterClose:F,rootPrefixCls:W,bodyStyle:D,wrapClassName:B,footer:k}=e;let L=r;if(!r&&r!==null)switch(I){case"info":L=g(df,null,null);break;case"success":L=g(Tl,null,null);break;case"error":L=g(Kr,null,null);break;default:L=g(El,null,null)}const z=e.okType||"primary",K=e.prefixCls||"ant-modal",G=`${K}-confirm`,Y=n.style||{},ne=$??I==="confirm",re=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",J=`${K}-confirm`,te=me(J,`${J}-${e.type}`,{[`${J}-rtl`]:R==="rtl"},n.class),ee=o.value,fe=ne&&g(ew,{actionFn:i,close:l,autofocus:re==="cancel",buttonProps:b,prefixCls:`${W}-btn`},{default:()=>[Ru(e.cancelText)||ee.cancelText]});return g(wo,{prefixCls:K,class:te,wrapClassName:me({[`${J}-centered`]:!!h},B),onCancel:ie=>l==null?void 0:l({triggerCancel:!0},ie),open:O,title:"",footer:"",transitionName:dr(W,"zoom",e.transitionName),maskTransitionName:dr(W,"fade",e.maskTransitionName),mask:_,maskClosable:w,maskStyle:v,style:Y,bodyStyle:D,width:x,zIndex:u,afterClose:d,keyboard:f,centered:h,getContainer:m,closable:c,closeIcon:A,modalRender:N,focusTriggerAfterClose:F},{default:()=>[g("div",{class:`${G}-body-wrapper`},[g("div",{class:`${G}-body`},[Ru(L),P===void 0?null:g("span",{class:`${G}-title`},[Ru(P)]),g("div",{class:`${G}-content`},[Ru(E)])]),k!==void 0?Ru(k):g("div",{class:`${G}-btns`},[fe,g(ew,{type:z,actionFn:a,close:l,autofocus:re==="ok",buttonProps:y,prefixCls:`${W}-btn`},{default:()=>[Ru(s)||(ne?ee.okText:ee.justOkText)]})])])]})}}}),yc=[],eg=e=>{const t=document.createDocumentFragment();let n=S(S({},_t(e,["parentContext","appContext"])),{close:i,open:!0}),o=null;function r(){o&&(Ec(null,t),o=null);for(var c=arguments.length,u=new Array(c),d=0;dh&&h.triggerCancel);e.onCancel&&f&&e.onCancel(()=>{},...u.slice(1));for(let h=0;h{typeof e.afterClose=="function"&&e.afterClose(),r.apply(this,u)}}),n.visible&&delete n.visible,a(n)}function a(c){typeof c=="function"?n=c(n):n=S(S({},n),c),o&&Ire(o,n,t)}const l=c=>{const u=jo,d=u.prefixCls,f=c.prefixCls||`${d}-modal`,h=u.iconPrefixCls,m=QSe();return g(qO,V(V({},u),{},{prefixCls:d}),{default:()=>[g(QH,V(V({},c),{},{rootPrefixCls:d,prefixCls:f,iconPrefixCls:h,locale:m,cancelText:c.cancelText||m.cancelText}),null)]})};function s(c){const u=g(l,S({},c));return u.appContext=e.parentContext||e.appContext||u.appContext,Ec(u,t),u}return o=s(n),yc.push(i),{destroy:i,update:a}};function JH(e){return S(S({},e),{type:"warning"})}function ez(e){return S(S({},e),{type:"info"})}function tz(e){return S(S({},e),{type:"success"})}function nz(e){return S(S({},e),{type:"error"})}function oz(e){return S(S({},e),{type:"confirm"})}const L_e=()=>({config:Object,afterClose:Function,destroyAction:Function,open:Boolean}),N_e=pe({name:"HookModal",inheritAttrs:!1,props:bt(L_e(),{config:{width:520,okType:"primary"}}),setup(e,t){let{expose:n}=t;var o;const r=M(()=>e.open),i=M(()=>e.config),{direction:a,getPrefixCls:l}=Bb(),s=l("modal"),c=l(),u=()=>{var m,v;e==null||e.afterClose(),(v=(m=i.value).afterClose)===null||v===void 0||v.call(m)},d=function(){e.destroyAction(...arguments)};n({destroy:d});const f=(o=i.value.okCancel)!==null&&o!==void 0?o:i.value.type==="confirm",[h]=Wi("Modal",cr.Modal);return()=>g(QH,V(V({prefixCls:s,rootPrefixCls:c},i.value),{},{close:d,open:r.value,afterClose:u,okText:i.value.okText||(f?h==null?void 0:h.value.okText:h==null?void 0:h.value.justOkText),direction:i.value.direction||a.value,cancelText:i.value.cancelText||(h==null?void 0:h.value.cancelText)}),null)}});let y8=0;const k_e=pe({name:"ElementsHolder",inheritAttrs:!1,setup(e,t){let{expose:n}=t;const o=ve([]);return n({addModal:i=>(o.value.push(i),o.value=o.value.slice(),()=>{o.value=o.value.filter(a=>a!==i)})}),()=>o.value.map(i=>i())}});function rz(){const e=ve(null),t=ve([]);Ie(t,()=>{t.value.length&&([...t.value].forEach(a=>{a()}),t.value=[])},{immediate:!0});const n=i=>function(l){var s;y8+=1;const c=ve(!0),u=ve(null),d=ve(It(l)),f=ve({});Ie(()=>l,x=>{y(S(S({},Wn(x)?x.value:x),f.value))});const h=function(){c.value=!1;for(var x=arguments.length,_=new Array(x),w=0;wO&&O.triggerCancel);d.value.onCancel&&I&&d.value.onCancel(()=>{},..._.slice(1))};let m;const v=()=>g(N_e,{key:`modal-${y8}`,config:i(d.value),ref:u,open:c.value,destroyAction:h,afterClose:()=>{m==null||m()}},null);m=(s=e.value)===null||s===void 0?void 0:s.addModal(v),m&&yc.push(m);const y=x=>{d.value=S(S({},d.value),x)};return{destroy:()=>{u.value?h():t.value=[...t.value,h]},update:x=>{f.value=x,u.value?y(x):t.value=[...t.value,()=>y(x)]}}},o=M(()=>({info:n(ez),success:n(tz),error:n(nz),warning:n(JH),confirm:n(oz)})),r=Symbol("modalHolderKey");return[o.value,()=>g(k_e,{key:r,ref:e},null)]}function iz(e){return eg(JH(e))}wo.useModal=rz;wo.info=function(t){return eg(ez(t))};wo.success=function(t){return eg(tz(t))};wo.error=function(t){return eg(nz(t))};wo.warning=iz;wo.warn=iz;wo.confirm=function(t){return eg(oz(t))};wo.destroyAll=function(){for(;yc.length;){const t=yc.pop();t&&t()}};wo.install=function(e){return e.component(wo.name,wo),e};const az=e=>{const{value:t,formatter:n,precision:o,decimalSeparator:r,groupSeparator:i="",prefixCls:a}=e;let l;if(typeof n=="function")l=n({value:t});else{const s=String(t),c=s.match(/^(-?)(\d*)(\.(\d+))?$/);if(!c)l=s;else{const u=c[1];let d=c[2]||"0",f=c[4]||"";d=d.replace(/\B(?=(\d{3})+(?!\d))/g,i),typeof o=="number"&&(f=f.padEnd(o,"0").slice(0,o>0?o:0)),f&&(f=`${r}${f}`),l=[g("span",{key:"int",class:`${a}-content-value-int`},[u,d]),f&&g("span",{key:"decimal",class:`${a}-content-value-decimal`},[f])]}}return g("span",{class:`${a}-content-value`},[l])};az.displayName="StatisticNumber";const B_e=az,F_e=e=>{const{componentCls:t,marginXXS:n,padding:o,colorTextDescription:r,statisticTitleFontSize:i,colorTextHeading:a,statisticContentFontSize:l,statisticFontFamily:s}=e;return{[`${t}`]:S(S({},vt(e)),{[`${t}-title`]:{marginBottom:n,color:r,fontSize:i},[`${t}-skeleton`]:{paddingTop:o},[`${t}-content`]:{color:a,fontSize:l,fontFamily:s,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}},H_e=pt("Statistic",e=>{const{fontSizeHeading3:t,fontSize:n,fontFamily:o}=e,r=nt(e,{statisticTitleFontSize:n,statisticContentFontSize:t,statisticFontFamily:o});return[F_e(r)]}),lz=()=>({prefixCls:String,decimalSeparator:String,groupSeparator:String,format:String,value:rt([Number,String,Object]),valueStyle:{type:Object,default:void 0},valueRender:Oe(),formatter:cn(),precision:Number,prefix:rr(),suffix:rr(),title:rr(),loading:De()}),dl=pe({compatConfig:{MODE:3},name:"AStatistic",inheritAttrs:!1,props:bt(lz(),{decimalSeparator:".",groupSeparator:",",loading:!1}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("statistic",e),[a,l]=H_e(r);return()=>{var s,c,u,d,f,h,m;const{value:v=0,valueStyle:y,valueRender:b}=e,$=r.value,x=(s=e.title)!==null&&s!==void 0?s:(c=n.title)===null||c===void 0?void 0:c.call(n),_=(u=e.prefix)!==null&&u!==void 0?u:(d=n.prefix)===null||d===void 0?void 0:d.call(n),w=(f=e.suffix)!==null&&f!==void 0?f:(h=n.suffix)===null||h===void 0?void 0:h.call(n),I=(m=e.formatter)!==null&&m!==void 0?m:n.formatter;let O=g(B_e,V({"data-for-update":Date.now()},S(S({},e),{prefixCls:$,value:v,formatter:I})),null);return b&&(O=b(O)),a(g("div",V(V({},o),{},{class:[$,{[`${$}-rtl`]:i.value==="rtl"},o.class,l.value]}),[x&&g("div",{class:`${$}-title`},[x]),g(or,{paragraph:!1,loading:e.loading},{default:()=>[g("div",{style:y,class:`${$}-content`},[_&&g("span",{class:`${$}-content-prefix`},[_]),O,w&&g("span",{class:`${$}-content-suffix`},[w])])]})]))}}}),z_e=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function j_e(e,t){let n=e;const o=/\[[^\]]*]/g,r=(t.match(o)||[]).map(s=>s.slice(1,-1)),i=t.replace(o,"[]"),a=z_e.reduce((s,c)=>{let[u,d]=c;if(s.includes(u)){const f=Math.floor(n/d);return n-=f*d,s.replace(new RegExp(`${u}+`,"g"),h=>{const m=h.length;return f.toString().padStart(m,"0")})}return s},i);let l=0;return a.replace(o,()=>{const s=r[l];return l+=1,s})}function W_e(e,t){const{format:n=""}=t,o=new Date(e).getTime(),r=Date.now(),i=Math.max(o-r,0);return j_e(i,n)}const V_e=1e3/30;function FC(e){return new Date(e).getTime()}const K_e=()=>S(S({},lz()),{value:rt([Number,String,Object]),format:String,onFinish:Function,onChange:Function}),U_e=pe({compatConfig:{MODE:3},name:"AStatisticCountdown",props:bt(K_e(),{format:"HH:mm:ss"}),setup(e,t){let{emit:n,slots:o}=t;const r=he(),i=he(),a=()=>{const{value:d}=e;FC(d)>=Date.now()?l():s()},l=()=>{if(r.value)return;const d=FC(e.value);r.value=setInterval(()=>{i.value.$forceUpdate(),d>Date.now()&&n("change",d-Date.now()),a()},V_e)},s=()=>{const{value:d}=e;r.value&&(clearInterval(r.value),r.value=void 0,FC(d){let{value:f,config:h}=d;const{format:m}=e;return W_e(f,S(S({},h),{format:m}))},u=d=>d;return lt(()=>{a()}),fr(()=>{a()}),Ct(()=>{s()}),()=>{const d=e.value;return g(dl,V({ref:i},S(S({},_t(e,["onFinish","onChange"])),{value:d,valueRender:u,formatter:c})),o)}}});dl.Countdown=U_e;dl.install=function(e){return e.component(dl.name,dl),e.component(dl.Countdown.name,dl.Countdown),e};const G_e=dl.Countdown;var Y_e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};const X_e=Y_e;function S8(e){for(var t=1;t{const{keyCode:h}=f;h===Fe.ENTER&&f.preventDefault()},s=f=>{const{keyCode:h}=f;h===Fe.ENTER&&o("click",f)},c=f=>{o("click",f)},u=()=>{a.value&&a.value.focus()},d=()=>{a.value&&a.value.blur()};return lt(()=>{e.autofocus&&u()}),i({focus:u,blur:d}),()=>{var f;const{noStyle:h,disabled:m}=e,v=nOe(e,["noStyle","disabled"]);let y={};return h||(y=S({},oOe)),m&&(y.pointerEvents="none"),g("div",V(V(V({role:"button",tabindex:0,ref:a},v),r),{},{onClick:c,onKeydown:l,onKeyup:s,style:S(S({},y),r.style||{})}),[(f=n.default)===null||f===void 0?void 0:f.call(n)])}}}),G0=rOe,iOe={small:8,middle:16,large:24},aOe=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:Z.oneOf(Go("horizontal","vertical")).def("horizontal"),align:Z.oneOf(Go("start","end","center","baseline")),wrap:De()});function lOe(e){return typeof e=="string"?iOe[e]:e||0}const Rp=pe({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:aOe(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,space:i,direction:a}=Ve("space",e),[l,s]=zk(r),c=bF(),u=M(()=>{var b,$,x;return(x=(b=e.size)!==null&&b!==void 0?b:($=i==null?void 0:i.value)===null||$===void 0?void 0:$.size)!==null&&x!==void 0?x:"small"}),d=he(),f=he();Ie(u,()=>{[d.value,f.value]=(Array.isArray(u.value)?u.value:[u.value,u.value]).map(b=>lOe(b))},{immediate:!0});const h=M(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),m=M(()=>me(r.value,s.value,`${r.value}-${e.direction}`,{[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-align-${h.value}`]:h.value})),v=M(()=>a.value==="rtl"?"marginLeft":"marginRight"),y=M(()=>{const b={};return c.value&&(b.columnGap=`${d.value}px`,b.rowGap=`${f.value}px`),S(S({},b),e.wrap&&{flexWrap:"wrap",marginBottom:`${-f.value}px`})});return()=>{var b,$;const{wrap:x,direction:_="horizontal"}=e,w=(b=n.default)===null||b===void 0?void 0:b.call(n),I=_n(w),O=I.length;if(O===0)return null;const P=($=n.split)===null||$===void 0?void 0:$.call(n),E=`${r.value}-item`,R=d.value,A=O-1;return g("div",V(V({},o),{},{class:[m.value,o.class],style:[y.value,o.style]}),[I.map((N,F)=>{let W=w.indexOf(N);W===-1&&(W=`$$space-${F}`);let D={};return c.value||(_==="vertical"?F{const{componentCls:t,antCls:n}=e;return{[t]:S(S({},vt(e)),{position:"relative",padding:`${e.pageHeaderPaddingVertical}px ${e.pageHeaderPadding}px`,backgroundColor:e.colorBgContainer,[`&${t}-ghost`]:{backgroundColor:e.pageHeaderGhostBg},"&.has-footer":{paddingBottom:0},[`${t}-back`]:{marginRight:e.marginMD,fontSize:e.fontSizeLG,lineHeight:1,"&-button":S(S({},Vb(e)),{color:e.pageHeaderBackColor,cursor:"pointer"})},[`${n}-divider-vertical`]:{height:"14px",margin:`0 ${e.marginSM}`,verticalAlign:"middle"},[`${n}-breadcrumb + &-heading`]:{marginTop:e.marginXS},[`${t}-heading`]:{display:"flex",justifyContent:"space-between","&-left":{display:"flex",alignItems:"center",margin:`${e.marginXS/2}px 0`,overflow:"hidden"},"&-title":S({marginRight:e.marginSM,marginBottom:0,color:e.colorTextHeading,fontWeight:600,fontSize:e.pageHeaderHeadingTitle,lineHeight:`${e.controlHeight}px`},eo),[`${n}-avatar`]:{marginRight:e.marginSM},"&-sub-title":S({marginRight:e.marginSM,color:e.colorTextDescription,fontSize:e.pageHeaderHeadingSubTitle,lineHeight:e.lineHeight},eo),"&-extra":{margin:`${e.marginXS/2}px 0`,whiteSpace:"nowrap","> *":{marginLeft:e.marginSM,whiteSpace:"unset"},"> *:first-child":{marginLeft:0}}},[`${t}-content`]:{paddingTop:e.pageHeaderContentPaddingVertical},[`${t}-footer`]:{marginTop:e.marginMD,[`${n}-tabs`]:{[`> ${n}-tabs-nav`]:{margin:0,"&::before":{border:"none"}},[`${n}-tabs-tab`]:{paddingTop:e.paddingXS,paddingBottom:e.paddingXS,fontSize:e.pageHeaderTabFontSize}}},[`${t}-compact ${t}-heading`]:{flexWrap:"wrap"},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}},cOe=pt("PageHeader",e=>{const t=nt(e,{pageHeaderPadding:e.paddingLG,pageHeaderPaddingVertical:e.paddingMD,pageHeaderPaddingBreadcrumb:e.paddingSM,pageHeaderContentPaddingVertical:e.paddingSM,pageHeaderBackColor:e.colorTextBase,pageHeaderGhostBg:"transparent",pageHeaderHeadingTitle:e.fontSizeHeading4,pageHeaderHeadingSubTitle:e.fontSize,pageHeaderTabFontSize:e.fontSizeLG});return[sOe(t)]}),uOe=()=>({backIcon:rr(),prefixCls:String,title:rr(),subTitle:rr(),breadcrumb:Z.object,tags:rr(),footer:rr(),extra:rr(),avatar:qe(),ghost:{type:Boolean,default:void 0},onBack:Function}),dOe=pe({compatConfig:{MODE:3},name:"APageHeader",inheritAttrs:!1,props:uOe(),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:a,pageHeader:l}=Ve("page-header",e),[s,c]=cOe(i),u=ve(!1),d=ZH(),f=_=>{let{width:w}=_;d.value||(u.value=w<768)},h=M(()=>{var _,w,I;return(I=(_=e.ghost)!==null&&_!==void 0?_:(w=l==null?void 0:l.value)===null||w===void 0?void 0:w.ghost)!==null&&I!==void 0?I:!0}),m=()=>{var _,w,I;return(I=(_=e.backIcon)!==null&&_!==void 0?_:(w=o.backIcon)===null||w===void 0?void 0:w.call(o))!==null&&I!==void 0?I:a.value==="rtl"?g(tOe,null,null):g(Z_e,null,null)},v=_=>!_||!e.onBack?null:g(Yc,{componentName:"PageHeader",children:w=>{let{back:I}=w;return g("div",{class:`${i.value}-back`},[g(G0,{onClick:O=>{n("back",O)},class:`${i.value}-back-button`,"aria-label":I},{default:()=>[_]})])}},null),y=()=>{var _;return e.breadcrumb?g(_c,e.breadcrumb,null):(_=o.breadcrumb)===null||_===void 0?void 0:_.call(o)},b=()=>{var _,w,I,O,P,E,R,A,N;const{avatar:F}=e,W=(_=e.title)!==null&&_!==void 0?_:(w=o.title)===null||w===void 0?void 0:w.call(o),D=(I=e.subTitle)!==null&&I!==void 0?I:(O=o.subTitle)===null||O===void 0?void 0:O.call(o),B=(P=e.tags)!==null&&P!==void 0?P:(E=o.tags)===null||E===void 0?void 0:E.call(o),k=(R=e.extra)!==null&&R!==void 0?R:(A=o.extra)===null||A===void 0?void 0:A.call(o),L=`${i.value}-heading`,z=W||D||B||k;if(!z)return null;const K=m(),G=v(K);return g("div",{class:L},[(G||F||z)&&g("div",{class:`${L}-left`},[G,F?g(wc,F,null):(N=o.avatar)===null||N===void 0?void 0:N.call(o),W&&g("span",{class:`${L}-title`,title:typeof W=="string"?W:void 0},[W]),D&&g("span",{class:`${L}-sub-title`,title:typeof D=="string"?D:void 0},[D]),B&&g("span",{class:`${L}-tags`},[B])]),k&&g("span",{class:`${L}-extra`},[g(sz,null,{default:()=>[k]})])])},$=()=>{var _,w;const I=(_=e.footer)!==null&&_!==void 0?_:_n((w=o.footer)===null||w===void 0?void 0:w.call(o));return Kee(I)?null:g("div",{class:`${i.value}-footer`},[I])},x=_=>g("div",{class:`${i.value}-content`},[_]);return()=>{var _,w;const I=((_=e.breadcrumb)===null||_===void 0?void 0:_.routes)||o.breadcrumb,O=e.footer||o.footer,P=ln((w=o.default)===null||w===void 0?void 0:w.call(o)),E=me(i.value,{"has-breadcrumb":I,"has-footer":O,[`${i.value}-ghost`]:h.value,[`${i.value}-rtl`]:a.value==="rtl",[`${i.value}-compact`]:u.value},r.class,c.value);return s(g(ki,{onResize:f},{default:()=>[g("div",V(V({},r),{},{class:E}),[y(),b(),P.length?x(P):null,$()])]}))}}}),fOe=$n(dOe),pOe=e=>{const{componentCls:t,iconCls:n,zIndexPopup:o,colorText:r,colorWarning:i,marginXS:a,fontSize:l,fontWeightStrong:s,lineHeight:c}=e;return{[t]:{zIndex:o,[`${t}-inner-content`]:{color:r},[`${t}-message`]:{position:"relative",marginBottom:a,color:r,fontSize:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:i,fontSize:l,flex:"none",lineHeight:1,paddingTop:(Math.round(l*c)-l)/2},"&-title":{flex:"auto",marginInlineStart:a},"&-title-only":{fontWeight:s}},[`${t}-description`]:{position:"relative",marginInlineStart:l+a,marginBottom:a,color:r,fontSize:l},[`${t}-buttons`]:{textAlign:"end",button:{marginInlineStart:a}}}}},hOe=pt("Popconfirm",e=>pOe(e),e=>{const{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}});var gOe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rS(S({},W_()),{prefixCls:String,content:cn(),title:cn(),description:cn(),okType:Qe("primary"),disabled:{type:Boolean,default:!1},okText:cn(),cancelText:cn(),icon:cn(),okButtonProps:qe(),cancelButtonProps:qe(),showCancel:{type:Boolean,default:!0},onConfirm:Function,onCancel:Function}),mOe=pe({compatConfig:{MODE:3},name:"APopconfirm",inheritAttrs:!1,props:bt(vOe(),S(S({},O9()),{trigger:"click",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0,okType:"primary",disabled:!1})),slots:Object,setup(e,t){let{slots:n,emit:o,expose:r,attrs:i}=t;const a=he();Sn(e.visible===void 0),r({getPopupDomNode:()=>{var I,O;return(O=(I=a.value)===null||I===void 0?void 0:I.getPopupDomNode)===null||O===void 0?void 0:O.call(I)}});const[l,s]=yn(!1,{value:st(e,"open")}),c=(I,O)=>{e.open===void 0&&s(I),o("update:open",I),o("openChange",I,O)},u=I=>{c(!1,I)},d=I=>{var O;return(O=e.onConfirm)===null||O===void 0?void 0:O.call(e,I)},f=I=>{var O;c(!1,I),(O=e.onCancel)===null||O===void 0||O.call(e,I)},h=I=>{I.keyCode===Fe.ESC&&l&&c(!1,I)},m=I=>{const{disabled:O}=e;O||c(I)},{prefixCls:v,getPrefixCls:y}=Ve("popconfirm",e),b=M(()=>y()),$=M(()=>y("btn")),[x]=hOe(v),[_]=Wi("Popconfirm",cr.Popconfirm),w=()=>{var I,O,P,E,R;const{okButtonProps:A,cancelButtonProps:N,title:F=(I=n.title)===null||I===void 0?void 0:I.call(n),description:W=(O=n.description)===null||O===void 0?void 0:O.call(n),cancelText:D=(P=n.cancel)===null||P===void 0?void 0:P.call(n),okText:B=(E=n.okText)===null||E===void 0?void 0:E.call(n),okType:k,icon:L=((R=n.icon)===null||R===void 0?void 0:R.call(n))||g(El,null,null),showCancel:z=!0}=e,{cancelButton:K,okButton:G}=n,Y=S({onClick:f,size:"small"},N),ne=S(S(S({onClick:d},I0(k)),{size:"small"}),A);return g("div",{class:`${v.value}-inner-content`},[g("div",{class:`${v.value}-message`},[L&&g("span",{class:`${v.value}-message-icon`},[L]),g("div",{class:[`${v.value}-message-title`,{[`${v.value}-message-title-only`]:!!W}]},[F])]),W&&g("div",{class:`${v.value}-description`},[W]),g("div",{class:`${v.value}-buttons`},[z?K?K(Y):g(Un,Y,{default:()=>[D||_.value.cancelText]}):null,G?G(ne):g(ew,{buttonProps:S(S({size:"small"},I0(k)),A),actionFn:d,close:u,prefixCls:$.value,quitOnNullishReturnValue:!0,emitEvent:!0},{default:()=>[B||_.value.okText]})])])};return()=>{var I;const{placement:O,overlayClassName:P,trigger:E="click"}=e,R=gOe(e,["placement","overlayClassName","trigger"]),A=_t(R,["title","content","cancelText","okText","onUpdate:open","onConfirm","onCancel","prefixCls"]),N=me(v.value,P);return x(g(G_,V(V(V({},A),i),{},{trigger:E,placement:O,onOpenChange:m,open:l.value,overlayClassName:N,transitionName:dr(b.value,"zoom-big",e.transitionName),ref:a,"data-popover-inject":!0}),{default:()=>[Ore(((I=n.default)===null||I===void 0?void 0:I.call(n))||[],{onKeydown:F=>{h(F)}},!1)],content:w}))}}}),bOe=$n(mOe),yOe=["normal","exception","active","success"],Vy=()=>({prefixCls:String,type:Qe(),percent:Number,format:Oe(),status:Qe(),showInfo:De(),strokeWidth:Number,strokeLinecap:Qe(),strokeColor:cn(),trailColor:String,width:Number,success:qe(),gapDegree:Number,gapPosition:Qe(),size:rt([String,Number,Array]),steps:Number,successPercent:Number,title:String,progressStatus:Qe()});function Ic(e){return!e||e<0?0:e>100?100:e}function Y0(e){let{success:t,successPercent:n}=e,o=n;return t&&"progress"in t&&(pn(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),o=t.progress),t&&"percent"in t&&(o=t.percent),o}function SOe(e){let{percent:t,success:n,successPercent:o}=e;const r=Ic(Y0({success:n,successPercent:o}));return[r,Ic(Ic(t)-r)]}function COe(e){let{success:t={},strokeColor:n}=e;const{strokeColor:o}=t;return[o||ld.green,n||null]}const Ky=(e,t,n)=>{var o,r,i,a;let l=-1,s=-1;if(t==="step"){const c=n.steps,u=n.strokeWidth;typeof e=="string"||typeof e>"u"?(l=e==="small"?2:14,s=u??8):typeof e=="number"?[l,s]=[e,e]:[l=14,s=8]=e,l*=c}else if(t==="line"){const c=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e>"u"?s=c||(e==="small"?6:8):typeof e=="number"?[l,s]=[e,e]:[l=-1,s=8]=e}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[l,s]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[l,s]=[e,e]:(l=(r=(o=e[0])!==null&&o!==void 0?o:e[1])!==null&&r!==void 0?r:120,s=(a=(i=e[0])!==null&&i!==void 0?i:e[1])!==null&&a!==void 0?a:120));return{width:l,height:s}};var $Oe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rS(S({},Vy()),{strokeColor:cn(),direction:Qe()}),wOe=e=>{let t=[];return Object.keys(e).forEach(n=>{const o=parseFloat(n.replace(/%/g,""));isNaN(o)||t.push({key:o,value:e[n]})}),t=t.sort((n,o)=>n.key-o.key),t.map(n=>{let{key:o,value:r}=n;return`${r} ${o}%`}).join(", ")},_Oe=(e,t)=>{const{from:n=ld.blue,to:o=ld.blue,direction:r=t==="rtl"?"to left":"to right"}=e,i=$Oe(e,["from","to","direction"]);if(Object.keys(i).length!==0){const a=wOe(i);return{backgroundImage:`linear-gradient(${r}, ${a})`}}return{backgroundImage:`linear-gradient(${r}, ${n}, ${o})`}},OOe=pe({compatConfig:{MODE:3},name:"ProgressLine",inheritAttrs:!1,props:xOe(),setup(e,t){let{slots:n,attrs:o}=t;const r=M(()=>{const{strokeColor:h,direction:m}=e;return h&&typeof h!="string"?_Oe(h,m):{backgroundColor:h}}),i=M(()=>e.strokeLinecap==="square"||e.strokeLinecap==="butt"?0:void 0),a=M(()=>e.trailColor?{backgroundColor:e.trailColor}:void 0),l=M(()=>{var h;return(h=e.size)!==null&&h!==void 0?h:[-1,e.strokeWidth||(e.size==="small"?6:8)]}),s=M(()=>Ky(l.value,"line",{strokeWidth:e.strokeWidth})),c=M(()=>{const{percent:h}=e;return S({width:`${Ic(h)}%`,height:`${s.value.height}px`,borderRadius:i.value},r.value)}),u=M(()=>Y0(e)),d=M(()=>{const{success:h}=e;return{width:`${Ic(u.value)}%`,height:`${s.value.height}px`,borderRadius:i.value,backgroundColor:h==null?void 0:h.strokeColor}}),f={width:s.value.width<0?"100%":s.value.width,height:`${s.value.height}px`};return()=>{var h;return g(Je,null,[g("div",V(V({},o),{},{class:[`${e.prefixCls}-outer`,o.class],style:[o.style,f]}),[g("div",{class:`${e.prefixCls}-inner`,style:a.value},[g("div",{class:`${e.prefixCls}-bg`,style:c.value},null),u.value!==void 0?g("div",{class:`${e.prefixCls}-success-bg`,style:d.value},null):null])]),(h=n.default)===null||h===void 0?void 0:h.call(n)])}}}),IOe={percent:0,prefixCls:"vc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1},POe=e=>{const t=he(null);return fr(()=>{const n=Date.now();let o=!1;e.value.forEach(r=>{const i=(r==null?void 0:r.$el)||r;if(!i)return;o=!0;const a=i.style;a.transitionDuration=".3s, .3s, .3s, .06s",t.value&&n-t.value<100&&(a.transitionDuration="0s, 0s")}),o&&(t.value=Date.now())}),e},TOe={gapDegree:Number,gapPosition:{type:String},percent:{type:[Array,Number]},prefixCls:String,strokeColor:{type:[Object,String,Array]},strokeLinecap:{type:String},strokeWidth:Number,trailColor:String,trailWidth:Number,transition:String};var EOe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;const a=50-o/2;let l=0,s=-a,c=0,u=-2*a;switch(i){case"left":l=-a,s=0,c=2*a,u=0;break;case"right":l=a,s=0,c=-2*a,u=0;break;case"bottom":s=a,u=2*a;break}const d=`M 50,50 m ${l},${s} + a ${a},${a} 0 1 1 ${c},${-u} + a ${a},${a} 0 1 1 ${-c},${u}`,f=Math.PI*2*a,h={stroke:n,strokeDasharray:`${t/100*(f-r)}px ${f}px`,strokeDashoffset:`-${r/2+e/100*(f-r)}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:d,pathStyle:h}}const AOe=pe({compatConfig:{MODE:3},name:"VCCircle",props:bt(TOe,IOe),setup(e){$8+=1;const t=he($8),n=M(()=>w8(e.percent)),o=M(()=>w8(e.strokeColor)),[r,i]=TO();POe(i);const a=()=>{const{prefixCls:l,strokeWidth:s,strokeLinecap:c,gapDegree:u,gapPosition:d}=e;let f=0;return n.value.map((h,m)=>{const v=o.value[m]||o.value[o.value.length-1],y=Object.prototype.toString.call(v)==="[object Object]"?`url(#${l}-gradient-${t.value})`:"",{pathString:b,pathStyle:$}=_8(f,h,v,s,u,d);f+=h;const x={key:m,d:b,stroke:y,"stroke-linecap":c,"stroke-width":s,opacity:h===0?0:1,"fill-opacity":"0",class:`${l}-circle-path`,style:$};return g("path",V({ref:r(m)},x),null)})};return()=>{const{prefixCls:l,strokeWidth:s,trailWidth:c,gapDegree:u,gapPosition:d,trailColor:f,strokeLinecap:h,strokeColor:m}=e,v=EOe(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"]),{pathString:y,pathStyle:b}=_8(0,100,f,s,u,d);delete v.percent;const $=o.value.find(_=>Object.prototype.toString.call(_)==="[object Object]"),x={d:y,stroke:f,"stroke-linecap":h,"stroke-width":c||s,"fill-opacity":"0",class:`${l}-circle-trail`,style:b};return g("svg",V({class:`${l}-circle`,viewBox:"0 0 100 100"},v),[$&&g("defs",null,[g("linearGradient",{id:`${l}-gradient-${t.value}`,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys($).sort((_,w)=>x8(_)-x8(w)).map((_,w)=>g("stop",{key:w,offset:_,"stop-color":$[_]},null))])]),g("path",x,null),a().reverse()])}}}),MOe=()=>S(S({},Vy()),{strokeColor:cn()}),ROe=3,DOe=e=>ROe/e*100,LOe=pe({compatConfig:{MODE:3},name:"ProgressCircle",inheritAttrs:!1,props:bt(MOe(),{trailColor:null}),setup(e,t){let{slots:n,attrs:o}=t;const r=M(()=>{var v;return(v=e.width)!==null&&v!==void 0?v:120}),i=M(()=>{var v;return(v=e.size)!==null&&v!==void 0?v:[r.value,r.value]}),a=M(()=>Ky(i.value,"circle")),l=M(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),s=M(()=>({width:`${a.value.width}px`,height:`${a.value.height}px`,fontSize:`${a.value.width*.15+6}px`})),c=M(()=>{var v;return(v=e.strokeWidth)!==null&&v!==void 0?v:Math.max(DOe(a.value.width),6)}),u=M(()=>e.gapPosition||e.type==="dashboard"&&"bottom"||void 0),d=M(()=>SOe(e)),f=M(()=>Object.prototype.toString.call(e.strokeColor)==="[object Object]"),h=M(()=>COe({success:e.success,strokeColor:e.strokeColor})),m=M(()=>({[`${e.prefixCls}-inner`]:!0,[`${e.prefixCls}-circle-gradient`]:f.value}));return()=>{var v;const y=g(AOe,{percent:d.value,strokeWidth:c.value,trailWidth:c.value,strokeColor:h.value,strokeLinecap:e.strokeLinecap,trailColor:e.trailColor,prefixCls:e.prefixCls,gapDegree:l.value,gapPosition:u.value},null);return g("div",V(V({},o),{},{class:[m.value,o.class],style:[o.style,s.value]}),[a.value.width<=20?g(Br,null,{default:()=>[g("span",null,[y])],title:n.default}):g(Je,null,[y,(v=n.default)===null||v===void 0?void 0:v.call(n)])])}}}),NOe=()=>S(S({},Vy()),{steps:Number,strokeColor:rt(),trailColor:String}),kOe=pe({compatConfig:{MODE:3},name:"Steps",props:NOe(),setup(e,t){let{slots:n}=t;const o=M(()=>Math.round(e.steps*((e.percent||0)/100))),r=M(()=>{var l;return(l=e.size)!==null&&l!==void 0?l:[e.size==="small"?2:14,e.strokeWidth||8]}),i=M(()=>Ky(r.value,"step",{steps:e.steps,strokeWidth:e.strokeWidth||8})),a=M(()=>{const{steps:l,strokeColor:s,trailColor:c,prefixCls:u}=e,d=[];for(let f=0;f{var l;return g("div",{class:`${e.prefixCls}-steps-outer`},[a.value,(l=n.default)===null||l===void 0?void 0:l.call(n)])}}}),BOe=new Pt("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),FOe=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:S(S({},vt(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},[`${t}-outer`]:{display:"inline-block",width:"100%"},[`&${t}-show-info`]:{[`${t}-outer`]:{marginInlineEnd:`calc(-2em - ${e.marginXS}px)`,paddingInlineEnd:`calc(2em + ${e.paddingXS}px)`}},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.progressRemainingColor,borderRadius:e.progressLineRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorInfo}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",backgroundColor:e.colorInfo,borderRadius:e.progressLineRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.progressLineRadius,opacity:0,animationName:BOe,animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},HOe=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.progressRemainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:`${e.fontSize/e.fontSizeSM}em`}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},zOe=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.progressRemainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.colorInfo}}}}}},jOe=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},WOe=pt("Progress",e=>{const t=e.marginXXS/2,n=nt(e,{progressLineRadius:100,progressInfoTextColor:e.colorText,progressDefaultColor:e.colorInfo,progressRemainingColor:e.colorFillSecondary,progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[FOe(n),HOe(n),zOe(n),jOe(n)]});var VOe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rArray.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor),c=M(()=>{const{percent:m=0}=e,v=Y0(e);return parseInt(v!==void 0?v.toString():m.toString(),10)}),u=M(()=>{const{status:m}=e;return!yOe.includes(m)&&c.value>=100?"success":m||"normal"}),d=M(()=>{const{type:m,showInfo:v,size:y}=e,b=r.value;return{[b]:!0,[`${b}-inline-circle`]:m==="circle"&&Ky(y,"circle").width<=20,[`${b}-${m==="dashboard"&&"circle"||m}`]:!0,[`${b}-status-${u.value}`]:!0,[`${b}-show-info`]:v,[`${b}-${y}`]:y,[`${b}-rtl`]:i.value==="rtl",[l.value]:!0}}),f=M(()=>typeof e.strokeColor=="string"||Array.isArray(e.strokeColor)?e.strokeColor:void 0),h=()=>{const{showInfo:m,format:v,type:y,percent:b,title:$}=e,x=Y0(e);if(!m)return null;let _;const w=v||(n==null?void 0:n.format)||(O=>`${O}%`),I=y==="line";return v||n!=null&&n.format||u.value!=="exception"&&u.value!=="success"?_=w(Ic(b),Ic(x)):u.value==="exception"?_=g(I?Kr:Vr,null,null):u.value==="success"&&(_=g(I?Tl:sy,null,null)),g("span",{class:`${r.value}-text`,title:$===void 0&&typeof _=="string"?_:void 0},[_])};return()=>{const{type:m,steps:v,title:y}=e,{class:b}=o,$=VOe(o,["class"]),x=h();let _;return m==="line"?_=v?g(kOe,V(V({},e),{},{strokeColor:f.value,prefixCls:r.value,steps:v}),{default:()=>[x]}):g(OOe,V(V({},e),{},{strokeColor:s.value,prefixCls:r.value,direction:i.value}),{default:()=>[x]}):(m==="circle"||m==="dashboard")&&(_=g(LOe,V(V({},e),{},{prefixCls:r.value,strokeColor:s.value,progressStatus:u.value}),{default:()=>[x]})),a(g("div",V(V({role:"progressbar"},$),{},{class:[d.value,b],title:y}),[_]))}}}),II=$n(KOe);function UOe(e){let t=e.pageXOffset;const n="scrollLeft";if(typeof t!="number"){const o=e.document;t=o.documentElement[n],typeof t!="number"&&(t=o.body[n])}return t}function GOe(e){let t,n;const o=e.ownerDocument,{body:r}=o,i=o&&o.documentElement,a=e.getBoundingClientRect();return t=a.left,n=a.top,t-=i.clientLeft||r.clientLeft||0,n-=i.clientTop||r.clientTop||0,{left:t,top:n}}function YOe(e){const t=GOe(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=UOe(o),t.left}var XOe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};const qOe=XOe;function O8(e){for(var t=1;t{const{index:s}=e;n("hover",l,s)},r=l=>{const{index:s}=e;n("click",l,s)},i=l=>{const{index:s}=e;l.keyCode===13&&n("click",l,s)},a=M(()=>{const{prefixCls:l,index:s,value:c,allowHalf:u,focused:d}=e,f=s+1;let h=l;return c===0&&s===0&&d?h+=` ${l}-focused`:u&&c+.5>=f&&c{const{disabled:l,prefixCls:s,characterRender:c,character:u,index:d,count:f,value:h}=e,m=typeof u=="function"?u({disabled:l,prefixCls:s,index:d,count:f,value:h}):u;let v=g("li",{class:a.value},[g("div",{onClick:l?null:r,onKeydown:l?null:i,onMousemove:l?null:o,role:"radio","aria-checked":h>d?"true":"false","aria-posinset":d+1,"aria-setsize":f,tabindex:l?-1:0},[g("div",{class:`${s}-first`},[m]),g("div",{class:`${s}-second`},[m])])]);return c&&(v=c(v,e)),v}}}),tIe=e=>{const{componentCls:t}=e;return{[`${t}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.rateStarHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${e.lineWidth}px dashed ${e.rateStarColor}`,transform:e.rateStarHoverScale}},"&-first, &-second":{color:e.defaultColor,transition:`all ${e.motionDurationMid}`,userSelect:"none",[e.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:"inherit"}}}},nIe=e=>({[`&-rtl${e.componentCls}`]:{direction:"rtl"}}),oIe=e=>{const{componentCls:t}=e;return{[t]:S(S(S(S(S({},vt(e)),{display:"inline-block",margin:0,padding:0,color:e.rateStarColor,fontSize:e.rateStarSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${t} ${t}-star`]:{cursor:"default","&:hover":{transform:"scale(1)"}}}),tIe(e)),{[`+ ${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,fontSize:e.fontSize}}),nIe(e))}},rIe=pt("Rate",e=>{const{colorFillContent:t}=e,n=nt(e,{rateStarColor:e["yellow-6"],rateStarSize:e.controlHeightLG*.5,rateStarHoverScale:"scale(1.1)",defaultColor:t});return[oIe(n)]}),iIe=()=>({prefixCls:String,count:Number,value:Number,allowHalf:{type:Boolean,default:void 0},allowClear:{type:Boolean,default:void 0},tooltips:Array,disabled:{type:Boolean,default:void 0},character:Z.any,autofocus:{type:Boolean,default:void 0},tabindex:Z.oneOfType([Z.number,Z.string]),direction:String,id:String,onChange:Function,onHoverChange:Function,"onUpdate:value":Function,onFocus:Function,onBlur:Function,onKeydown:Function}),aIe=pe({compatConfig:{MODE:3},name:"ARate",inheritAttrs:!1,props:bt(iIe(),{value:0,count:5,allowHalf:!1,allowClear:!0,tabindex:0,direction:"ltr"}),setup(e,t){let{slots:n,attrs:o,emit:r,expose:i}=t;const{prefixCls:a,direction:l}=Ve("rate",e),[s,c]=rIe(a),u=co(),d=he(),[f,h]=TO(),m=St({value:e.value,focused:!1,cleanedValue:null,hoverValue:void 0});Ie(()=>e.value,()=>{m.value=e.value});const v=A=>Nr(h.value.get(A)),y=(A,N)=>{const F=l.value==="rtl";let W=A+1;if(e.allowHalf){const D=v(A),B=YOe(D),k=D.clientWidth;(F&&N-B>k/2||!F&&N-B{e.value===void 0&&(m.value=A),r("update:value",A),r("change",A),u.onFieldChange()},$=(A,N)=>{const F=y(N,A.pageX);F!==m.cleanedValue&&(m.hoverValue=F,m.cleanedValue=null),r("hoverChange",F)},x=()=>{m.hoverValue=void 0,m.cleanedValue=null,r("hoverChange",void 0)},_=(A,N)=>{const{allowClear:F}=e,W=y(N,A.pageX);let D=!1;F&&(D=W===m.value),x(),b(D?0:W),m.cleanedValue=D?W:null},w=A=>{m.focused=!0,r("focus",A)},I=A=>{m.focused=!1,r("blur",A),u.onFieldBlur()},O=A=>{const{keyCode:N}=A,{count:F,allowHalf:W}=e,D=l.value==="rtl";N===Fe.RIGHT&&m.value0&&!D||N===Fe.RIGHT&&m.value>0&&D?(W?m.value-=.5:m.value-=1,b(m.value),A.preventDefault()):N===Fe.LEFT&&m.value{e.disabled||d.value.focus()};i({focus:P,blur:()=>{e.disabled||d.value.blur()}}),lt(()=>{const{autofocus:A,disabled:N}=e;A&&!N&&P()});const R=(A,N)=>{let{index:F}=N;const{tooltips:W}=e;return W?g(Br,{title:W[F]},{default:()=>[A]}):A};return()=>{const{count:A,allowHalf:N,disabled:F,tabindex:W,id:D=u.id.value}=e,{class:B,style:k}=o,L=[],z=F?`${a.value}-disabled`:"",K=e.character||n.character||(()=>g(QOe,null,null));for(let Y=0;Yg("svg",{width:"252",height:"294"},[g("defs",null,[g("path",{d:"M0 .387h251.772v251.772H0z"},null)]),g("g",{fill:"none","fill-rule":"evenodd"},[g("g",{transform:"translate(0 .012)"},[g("mask",{fill:"#fff"},null),g("path",{d:"M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321",fill:"#E4EBF7",mask:"url(#b)"},null)]),g("path",{d:"M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66",fill:"#FFF"},null),g("path",{d:"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175",fill:"#FFF"},null),g("path",{d:"M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932",fill:"#FFF"},null),g("path",{d:"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382",fill:"#FFF"},null),g("path",{d:"M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z",stroke:"#FFF","stroke-width":"2"},null),g("path",{stroke:"#FFF","stroke-width":"2",d:"M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"},null),g("path",{d:"M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742",fill:"#FFF"},null),g("path",{d:"M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",fill:"#1890FF"},null),g("path",{d:"M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",fill:"#FFF"},null),g("path",{d:"M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88",fill:"#FFB594"},null),g("path",{d:"M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624",fill:"#FFC6A0"},null),g("path",{d:"M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682",fill:"#FFF"},null),g("path",{d:"M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573",fill:"#CBD1D1"},null),g("path",{d:"M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z",fill:"#2B0849"},null),g("path",{d:"M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558",fill:"#A4AABA"},null),g("path",{d:"M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z",fill:"#CBD1D1"},null),g("path",{d:"M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062",fill:"#2B0849"},null),g("path",{d:"M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15",fill:"#A4AABA"},null),g("path",{d:"M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165",fill:"#7BB2F9"},null),g("path",{d:"M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M107.275 222.1s2.773-1.11 6.102-3.884",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038",fill:"#192064"},null),g("path",{d:"M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81",fill:"#FFF"},null),g("path",{d:"M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642",fill:"#192064"},null),g("path",{d:"M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268",fill:"#FFC6A0"},null),g("path",{d:"M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456",fill:"#FFC6A0"},null),g("path",{d:"M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z",fill:"#520038"},null),g("path",{d:"M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254",fill:"#552950"},null),g("path",{stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round",d:"M110.13 74.84l-.896 1.61-.298 4.357h-2.228"},null),g("path",{d:"M110.846 74.481s1.79-.716 2.506.537",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M103.287 72.93s1.83 1.113 4.137.954",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M129.405 122.865s-5.272 7.403-9.422 10.768",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M119.306 107.329s.452 4.366-2.127 32.062",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01",fill:"#F2D7AD"},null),g("path",{d:"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",fill:"#F4D19D"},null),g("path",{d:"M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z",fill:"#F2D7AD"},null),g("path",{fill:"#CC9B6E",d:"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"},null),g("path",{d:"M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83",fill:"#F4D19D"},null),g("path",{fill:"#CC9B6E",d:"M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"},null),g("path",{fill:"#CC9B6E",d:"M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"},null),g("path",{d:"M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238",fill:"#FFC6A0"},null),g("path",{d:"M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647",fill:"#5BA02E"},null),g("path",{d:"M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647",fill:"#92C110"},null),g("path",{d:"M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187",fill:"#F2D7AD"},null),g("path",{d:"M88.979 89.48s7.776 5.384 16.6 2.842",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),pIe=fIe,hIe=()=>g("svg",{width:"254",height:"294"},[g("defs",null,[g("path",{d:"M0 .335h253.49v253.49H0z"},null),g("path",{d:"M0 293.665h253.49V.401H0z"},null)]),g("g",{fill:"none","fill-rule":"evenodd"},[g("g",{transform:"translate(0 .067)"},[g("mask",{fill:"#fff"},null),g("path",{d:"M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134",fill:"#E4EBF7",mask:"url(#b)"},null)]),g("path",{d:"M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671",fill:"#FFF"},null),g("path",{d:"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238",fill:"#FFF"},null),g("path",{d:"M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775",fill:"#FFF"},null),g("path",{d:"M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68",fill:"#FF603B"},null),g("path",{d:"M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733",fill:"#FFF"},null),g("path",{d:"M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487",fill:"#FFB594"},null),g("path",{d:"M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235",fill:"#FFF"},null),g("path",{d:"M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246",fill:"#FFB594"},null),g("path",{d:"M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508",fill:"#FFC6A0"},null),g("path",{d:"M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z",fill:"#520038"},null),g("path",{d:"M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26",fill:"#552950"},null),g("path",{stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round",d:"M99.206 73.644l-.9 1.62-.3 4.38h-2.24"},null),g("path",{d:"M99.926 73.284s1.8-.72 2.52.54",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68",stroke:"#DB836E","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M92.326 71.724s1.84 1.12 4.16.96",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954",stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044",stroke:"#E4EBF7","stroke-width":"1.136","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583",fill:"#FFF"},null),g("path",{d:"M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75",fill:"#FFC6A0"},null),g("path",{d:"M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713",fill:"#FFC6A0"},null),g("path",{d:"M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16",fill:"#FFC6A0"},null),g("path",{d:"M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575",fill:"#FFF"},null),g("path",{d:"M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47",fill:"#CBD1D1"},null),g("path",{d:"M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z",fill:"#2B0849"},null),g("path",{d:"M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671",fill:"#A4AABA"},null),g("path",{d:"M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z",fill:"#CBD1D1"},null),g("path",{d:"M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162",fill:"#2B0849"},null),g("path",{d:"M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156",fill:"#A4AABA"},null),g("path",{d:"M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69",fill:"#7BB2F9"},null),g("path",{d:"M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M96.973 219.373s2.882-1.153 6.34-4.034",stroke:"#648BD8","stroke-width":"1.032","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62",fill:"#192064"},null),g("path",{d:"M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843",fill:"#FFF"},null),g("path",{d:"M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668",fill:"#192064"},null),g("path",{d:"M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69",fill:"#FFC6A0"},null),g("path",{d:"M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593",stroke:"#DB836E","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594",fill:"#FFC6A0"},null),g("path",{d:"M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M109.278 112.533s3.38-3.613 7.575-4.662",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M107.375 123.006s9.697-2.745 11.445-.88",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955",stroke:"#BFCDDD","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01",fill:"#A3B4C6"},null),g("path",{d:"M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813",fill:"#A3B4C6"},null),g("mask",{fill:"#fff"},null),g("path",{fill:"#A3B4C6",mask:"url(#d)",d:"M154.098 190.096h70.513v-84.617h-70.513z"},null),g("path",{d:"M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208",fill:"#BFCDDD",mask:"url(#d)"},null),g("path",{d:"M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),g("path",{d:"M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209",fill:"#BFCDDD",mask:"url(#d)"},null),g("path",{d:"M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751",stroke:"#7C90A5","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),g("path",{d:"M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),g("path",{d:"M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407",fill:"#BFCDDD",mask:"url(#d)"},null),g("path",{d:"M177.259 207.217v11.52M201.05 207.217v11.52",stroke:"#A3B4C6","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),g("path",{d:"M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422",fill:"#5BA02E",mask:"url(#d)"},null),g("path",{d:"M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423",fill:"#92C110",mask:"url(#d)"},null),g("path",{d:"M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",fill:"#F2D7AD",mask:"url(#d)"},null)])]),gIe=hIe,vIe=()=>g("svg",{width:"251",height:"294"},[g("g",{fill:"none","fill-rule":"evenodd"},[g("path",{d:"M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023",fill:"#E4EBF7"},null),g("path",{d:"M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65",fill:"#FFF"},null),g("path",{d:"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126",fill:"#FFF"},null),g("path",{d:"M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873",fill:"#FFF"},null),g("path",{d:"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375",fill:"#FFF"},null),g("path",{d:"M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z",stroke:"#FFF","stroke-width":"2"},null),g("path",{stroke:"#FFF","stroke-width":"2",d:"M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"},null),g("path",{d:"M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321",fill:"#A26EF4"},null),g("path",{d:"M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734",fill:"#FFF"},null),g("path",{d:"M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717",fill:"#FFF"},null),g("path",{d:"M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61",fill:"#5BA02E"},null),g("path",{d:"M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611",fill:"#92C110"},null),g("path",{d:"M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17",fill:"#F2D7AD"},null),g("path",{d:"M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085",fill:"#FFF"},null),g("path",{d:"M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233",fill:"#FFC6A0"},null),g("path",{d:"M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367",fill:"#FFB594"},null),g("path",{d:"M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95",fill:"#FFC6A0"},null),g("path",{d:"M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929",fill:"#FFF"},null),g("path",{d:"M78.18 94.656s.911 7.41-4.914 13.078",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437",stroke:"#E4EBF7","stroke-width":".932","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z",fill:"#FFC6A0"},null),g("path",{d:"M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91",fill:"#FFB594"},null),g("path",{d:"M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103",fill:"#5C2552"},null),g("path",{d:"M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145",fill:"#FFC6A0"},null),g("path",{stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round",d:"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"},null),g("path",{d:"M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32",fill:"#552950"},null),g("path",{d:"M91.132 86.786s5.269 4.957 12.679 2.327",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25",fill:"#DB836E"},null),g("path",{d:"M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073",stroke:"#5C2552","stroke-width":"1.526","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M66.508 86.763s-1.598 8.83-6.697 14.078",stroke:"#E4EBF7","stroke-width":"1.114","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M128.31 87.934s3.013 4.121 4.06 11.785",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M64.09 84.816s-6.03 9.912-13.607 9.903",stroke:"#DB836E","stroke-width":".795","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73",fill:"#FFC6A0"},null),g("path",{d:"M130.532 85.488s4.588 5.757 11.619 6.214",stroke:"#DB836E","stroke-width":".75","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M121.708 105.73s-.393 8.564-1.34 13.612",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M115.784 161.512s-3.57-1.488-2.678-7.14",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68",fill:"#CBD1D1"},null),g("path",{d:"M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z",fill:"#2B0849"},null),g("path",{d:"M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62",fill:"#A4AABA"},null),g("path",{d:"M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z",fill:"#CBD1D1"},null),g("path",{d:"M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078",fill:"#2B0849"},null),g("path",{d:"M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15",fill:"#A4AABA"},null),g("path",{d:"M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954",fill:"#7BB2F9"},null),g("path",{d:"M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M108.459 220.905s2.759-1.104 6.07-3.863",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017",fill:"#192064"},null),g("path",{d:"M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806",fill:"#FFF"},null),g("path",{d:"M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64",fill:"#192064"},null),g("path",{d:"M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),mIe=vIe,bIe=e=>{const{componentCls:t,lineHeightHeading3:n,iconCls:o,padding:r,paddingXL:i,paddingXS:a,paddingLG:l,marginXS:s,lineHeight:c}=e;return{[t]:{padding:`${l*2}px ${i}px`,"&-rtl":{direction:"rtl"}},[`${t} ${t}-image`]:{width:e.imageWidth,height:e.imageHeight,margin:"auto"},[`${t} ${t}-icon`]:{marginBottom:l,textAlign:"center",[`& > ${o}`]:{fontSize:e.resultIconFontSize}},[`${t} ${t}-title`]:{color:e.colorTextHeading,fontSize:e.resultTitleFontSize,lineHeight:n,marginBlock:s,textAlign:"center"},[`${t} ${t}-subtitle`]:{color:e.colorTextDescription,fontSize:e.resultSubtitleFontSize,lineHeight:c,textAlign:"center"},[`${t} ${t}-content`]:{marginTop:l,padding:`${l}px ${r*2.5}px`,backgroundColor:e.colorFillAlter},[`${t} ${t}-extra`]:{margin:e.resultExtraMargin,textAlign:"center","& > *":{marginInlineEnd:a,"&:last-child":{marginInlineEnd:0}}}}},yIe=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-success ${t}-icon > ${n}`]:{color:e.resultSuccessIconColor},[`${t}-error ${t}-icon > ${n}`]:{color:e.resultErrorIconColor},[`${t}-info ${t}-icon > ${n}`]:{color:e.resultInfoIconColor},[`${t}-warning ${t}-icon > ${n}`]:{color:e.resultWarningIconColor}}},SIe=e=>[bIe(e),yIe(e)],CIe=e=>SIe(e),$Ie=pt("Result",e=>{const{paddingLG:t,fontSizeHeading3:n}=e,o=e.fontSize,r=`${t}px 0 0 0`,i=e.colorInfo,a=e.colorError,l=e.colorSuccess,s=e.colorWarning,c=nt(e,{resultTitleFontSize:n,resultSubtitleFontSize:o,resultIconFontSize:n*3,resultExtraMargin:r,resultInfoIconColor:i,resultErrorIconColor:a,resultSuccessIconColor:l,resultWarningIconColor:s});return[CIe(c)]},{imageWidth:250,imageHeight:295}),xIe={success:Tl,error:Kr,info:El,warning:dIe},tg={404:pIe,500:gIe,403:mIe},wIe=Object.keys(tg),_Ie=()=>({prefixCls:String,icon:Z.any,status:{type:[Number,String],default:"info"},title:Z.any,subTitle:Z.any,extra:Z.any}),OIe=(e,t)=>{let{status:n,icon:o}=t;if(wIe.includes(`${n}`)){const a=tg[n];return g("div",{class:`${e}-icon ${e}-image`},[g(a,null,null)])}const r=xIe[n],i=o||g(r,null,null);return g("div",{class:`${e}-icon`},[i])},IIe=(e,t)=>t&&g("div",{class:`${e}-extra`},[t]),Pc=pe({compatConfig:{MODE:3},name:"AResult",inheritAttrs:!1,props:_Ie(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("result",e),[a,l]=$Ie(r),s=M(()=>me(r.value,l.value,`${r.value}-${e.status}`,{[`${r.value}-rtl`]:i.value==="rtl"}));return()=>{var c,u,d,f,h,m,v,y;const b=(c=e.title)!==null&&c!==void 0?c:(u=n.title)===null||u===void 0?void 0:u.call(n),$=(d=e.subTitle)!==null&&d!==void 0?d:(f=n.subTitle)===null||f===void 0?void 0:f.call(n),x=(h=e.icon)!==null&&h!==void 0?h:(m=n.icon)===null||m===void 0?void 0:m.call(n),_=(v=e.extra)!==null&&v!==void 0?v:(y=n.extra)===null||y===void 0?void 0:y.call(n),w=r.value;return a(g("div",V(V({},o),{},{class:[s.value,o.class]}),[OIe(w,{status:e.status,icon:x}),g("div",{class:`${w}-title`},[b]),$&&g("div",{class:`${w}-subtitle`},[$]),IIe(w,_),n.default&&g("div",{class:`${w}-content`},[n.default()])]))}}});Pc.PRESENTED_IMAGE_403=tg[403];Pc.PRESENTED_IMAGE_404=tg[404];Pc.PRESENTED_IMAGE_500=tg[500];Pc.install=function(e){return e.component(Pc.name,Pc),e};const PIe=Pc,TIe=$n(jO),cz=(e,t)=>{let{attrs:n}=t;const{included:o,vertical:r,style:i,class:a}=n;let{length:l,offset:s,reverse:c}=n;l<0&&(c=!c,l=Math.abs(l),s=100-s);const u=r?{[c?"top":"bottom"]:`${s}%`,[c?"bottom":"top"]:"auto",height:`${l}%`}:{[c?"right":"left"]:`${s}%`,[c?"left":"right"]:"auto",width:`${l}%`},d=S(S({},i),u);return o?g("div",{class:a,style:d},null):null};cz.inheritAttrs=!1;const uz=cz,EIe=(e,t,n,o,r,i)=>{Sn();const a=Object.keys(t).map(parseFloat).sort((l,s)=>l-s);if(n&&o)for(let l=r;l<=i;l+=o)a.indexOf(l)===-1&&a.push(l);return a},dz=(e,t)=>{let{attrs:n}=t;const{prefixCls:o,vertical:r,reverse:i,marks:a,dots:l,step:s,included:c,lowerBound:u,upperBound:d,max:f,min:h,dotStyle:m,activeDotStyle:v}=n,y=f-h,b=EIe(r,a,l,s,h,f).map($=>{const x=`${Math.abs($-h)/y*100}%`,_=!c&&$===d||c&&$<=d&&$>=u;let w=r?S(S({},m),{[i?"top":"bottom"]:x}):S(S({},m),{[i?"right":"left"]:x});_&&(w=S(S({},w),v));const I=me({[`${o}-dot`]:!0,[`${o}-dot-active`]:_,[`${o}-dot-reverse`]:i});return g("span",{class:I,style:w,key:$},null)});return g("div",{class:`${o}-step`},[b])};dz.inheritAttrs=!1;const AIe=dz,fz=(e,t)=>{let{attrs:n,slots:o}=t;const{class:r,vertical:i,reverse:a,marks:l,included:s,upperBound:c,lowerBound:u,max:d,min:f,onClickLabel:h}=n,m=Object.keys(l),v=o.mark,y=d-f,b=m.map(parseFloat).sort(($,x)=>$-x).map($=>{const x=typeof l[$]=="function"?l[$]():l[$],_=typeof x=="object"&&!Jn(x);let w=_?x.label:x;if(!w&&w!==0)return null;v&&(w=v({point:$,label:w}));const I=!s&&$===c||s&&$<=c&&$>=u,O=me({[`${r}-text`]:!0,[`${r}-text-active`]:I}),P={marginBottom:"-50%",[a?"top":"bottom"]:`${($-f)/y*100}%`},E={transform:`translateX(${a?"50%":"-50%"})`,msTransform:`translateX(${a?"50%":"-50%"})`,[a?"right":"left"]:`${($-f)/y*100}%`},R=i?P:E,A=_?S(S({},R),x.style):R,N={[fo?"onTouchstartPassive":"onTouchstart"]:F=>h(F,$)};return g("span",V({class:O,style:A,key:$,onMousedown:F=>h(F,$)},N),[w])});return g("div",{class:r},[b])};fz.inheritAttrs=!1;const MIe=fz,pz=pe({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:Z.oneOfType([Z.number,Z.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,t){let{attrs:n,emit:o,expose:r}=t;const i=ve(!1),a=ve(),l=()=>{document.activeElement===a.value&&(i.value=!0)},s=y=>{i.value=!1,o("blur",y)},c=()=>{i.value=!1},u=()=>{var y;(y=a.value)===null||y===void 0||y.focus()},d=()=>{var y;(y=a.value)===null||y===void 0||y.blur()},f=()=>{i.value=!0,u()},h=y=>{y.preventDefault(),u(),o("mousedown",y)};r({focus:u,blur:d,clickFocus:f,ref:a});let m=null;lt(()=>{m=wn(document,"mouseup",l)}),Ct(()=>{m==null||m.remove()});const v=M(()=>{const{vertical:y,offset:b,reverse:$}=e;return y?{[$?"top":"bottom"]:`${b}%`,[$?"bottom":"top"]:"auto",transform:$?null:"translateY(+50%)"}:{[$?"right":"left"]:`${b}%`,[$?"left":"right"]:"auto",transform:`translateX(${$?"+":"-"}50%)`}});return()=>{const{prefixCls:y,disabled:b,min:$,max:x,value:_,tabindex:w,ariaLabel:I,ariaLabelledBy:O,ariaValueTextFormatter:P,onMouseenter:E,onMouseleave:R}=e,A=me(n.class,{[`${y}-handle-click-focused`]:i.value}),N={"aria-valuemin":$,"aria-valuemax":x,"aria-valuenow":_,"aria-disabled":!!b},F=[n.style,v.value];let W=w||0;(b||w===null)&&(W=null);let D;P&&(D=P(_));const B=S(S(S(S({},n),{role:"slider",tabindex:W}),N),{class:A,onBlur:s,onKeydown:c,onMousedown:h,onMouseenter:E,onMouseleave:R,ref:a,style:F});return g("div",V(V({},B),{},{"aria-label":I,"aria-labelledby":O,"aria-valuetext":D}),null)}}});function HC(e,t){try{return Object.keys(t).some(n=>e.target===t[n].ref)}catch{return!1}}function hz(e,t){let{min:n,max:o}=t;return eo}function P8(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function T8(e,t){let{marks:n,step:o,min:r,max:i}=t;const a=Object.keys(n).map(parseFloat);if(o!==null){const s=Math.pow(10,gz(o)),c=Math.floor((i*s-r*s)/(o*s)),u=Math.min((e-r)/o,c),d=Math.round(u)*o+r;a.push(d)}const l=a.map(s=>Math.abs(e-s));return a[l.indexOf(Math.min(...l))]}function gz(e){const t=e.toString();let n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}function E8(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.clientY:t.pageX)/n}function A8(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.touches[0].clientY:t.touches[0].pageX)/n}function M8(e,t){const n=t.getBoundingClientRect();return e?n.top+n.height*.5:window.pageXOffset+n.left+n.width*.5}function EI(e,t){let{max:n,min:o}=t;return e<=o?o:e>=n?n:e}function vz(e,t){const{step:n}=t,o=isFinite(T8(e,t))?T8(e,t):0;return n===null?o:parseFloat(o.toFixed(gz(n)))}function Nd(e){e.stopPropagation(),e.preventDefault()}function RIe(e,t,n){const o={increase:(a,l)=>a+l,decrease:(a,l)=>a-l},r=o[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),i=Object.keys(n.marks)[r];return n.step?o[e](t,n.step):Object.keys(n.marks).length&&n.marks[i]?n.marks[i]:t}function mz(e,t,n){const o="increase",r="decrease";let i=o;switch(e.keyCode){case Fe.UP:i=t&&n?r:o;break;case Fe.RIGHT:i=!t&&n?r:o;break;case Fe.DOWN:i=t&&n?o:r;break;case Fe.LEFT:i=!t&&n?o:r;break;case Fe.END:return(a,l)=>l.max;case Fe.HOME:return(a,l)=>l.min;case Fe.PAGE_UP:return(a,l)=>a+l.step*2;case Fe.PAGE_DOWN:return(a,l)=>a-l.step*2;default:return}return(a,l)=>RIe(i,a,l)}var DIe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:n,disabled:o}=this;n&&!o&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(n){var{index:o,directives:r,className:i,style:a}=n,l=DIe(n,["index","directives","className","style"]);if(delete l.dragging,l.value===null)return null;const s=S(S({},l),{class:i,style:a,key:o});return g(pz,s,null)},onDown(n,o){let r=o;const{draggableTrack:i,vertical:a}=this.$props,{bounds:l}=this.$data,s=i&&this.positionGetValue?this.positionGetValue(r)||[]:[],c=HC(n,this.handlesRefs);if(this.dragTrack=i&&l.length>=2&&!c&&!s.map((u,d)=>{const f=d?!0:u>=l[d];return d===s.length-1?u<=l[d]:f}).some(u=>!u),this.dragTrack)this.dragOffset=r,this.startBounds=[...l];else{if(!c)this.dragOffset=0;else{const u=M8(a,n.target);this.dragOffset=r-u,r=u}this.onStart(r)}},onMouseDown(n){if(n.button!==0)return;this.removeDocumentEvents();const o=this.$props.vertical,r=E8(o,n);this.onDown(n,r),this.addDocumentMouseEvents()},onTouchStart(n){if(P8(n))return;const o=this.vertical,r=A8(o,n);this.onDown(n,r),this.addDocumentTouchEvents(),Nd(n)},onFocus(n){const{vertical:o}=this;if(HC(n,this.handlesRefs)&&!this.dragTrack){const r=M8(o,n.target);this.dragOffset=0,this.onStart(r),Nd(n),this.$emit("focus",n)}},onBlur(n){this.dragTrack||this.onEnd(),this.$emit("blur",n)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(n){if(!this.sliderRef){this.onEnd();return}const o=E8(this.vertical,n);this.onMove(n,o-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(n){if(P8(n)||!this.sliderRef){this.onEnd();return}const o=A8(this.vertical,n);this.onMove(n,o-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(n){this.sliderRef&&HC(n,this.handlesRefs)&&this.onKeyboard(n)},onClickMarkLabel(n,o){n.stopPropagation(),this.onChange({sValue:o}),this.setState({sValue:o},()=>this.onEnd(!0))},getSliderStart(){const n=this.sliderRef,{vertical:o,reverse:r}=this,i=n.getBoundingClientRect();return o?r?i.bottom:i.top:window.pageXOffset+(r?i.right:i.left)},getSliderLength(){const n=this.sliderRef;if(!n)return 0;const o=n.getBoundingClientRect();return this.vertical?o.height:o.width},addDocumentTouchEvents(){this.onTouchMoveListener=wn(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=wn(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=wn(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=wn(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var n;this.$props.disabled||(n=this.handlesRefs[0])===null||n===void 0||n.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(n=>{var o,r;(r=(o=this.handlesRefs[n])===null||o===void 0?void 0:o.blur)===null||r===void 0||r.call(o)})},calcValue(n){const{vertical:o,min:r,max:i}=this,a=Math.abs(Math.max(n,0)/this.getSliderLength());return o?(1-a)*(i-r)+r:a*(i-r)+r},calcValueByPos(n){const r=(this.reverse?-1:1)*(n-this.getSliderStart());return this.trimAlignValue(this.calcValue(r))},calcOffset(n){const{min:o,max:r}=this,i=(n-o)/(r-o);return Math.max(0,i*100)},saveSlider(n){this.sliderRef=n},saveHandle(n,o){this.handlesRefs[n]=o}},render(){const{prefixCls:n,marks:o,dots:r,step:i,included:a,disabled:l,vertical:s,reverse:c,min:u,max:d,maximumTrackStyle:f,railStyle:h,dotStyle:m,activeDotStyle:v,id:y}=this,{class:b,style:$}=this.$attrs,{tracks:x,handles:_}=this.renderSlider(),w=me(n,b,{[`${n}-with-marks`]:Object.keys(o).length,[`${n}-disabled`]:l,[`${n}-vertical`]:s,[`${n}-horizontal`]:!s}),I={vertical:s,marks:o,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:u,reverse:c,class:`${n}-mark`,onClickLabel:l?oc:this.onClickMarkLabel},O={[fo?"onTouchstartPassive":"onTouchstart"]:l?oc:this.onTouchStart};return g("div",V(V({id:y,ref:this.saveSlider,tabindex:"-1",class:w},O),{},{onMousedown:l?oc:this.onMouseDown,onMouseup:l?oc:this.onMouseUp,onKeydown:l?oc:this.onKeyDown,onFocus:l?oc:this.onFocus,onBlur:l?oc:this.onBlur,style:$}),[g("div",{class:`${n}-rail`,style:S(S({},f),h)},null),x,g(AIe,{prefixCls:n,vertical:s,reverse:c,marks:o,dots:r,step:i,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:u,dotStyle:m,activeDotStyle:v},null),_,g(MIe,I,{mark:this.$slots.mark}),kb(this)])}})}const LIe=pe({compatConfig:{MODE:3},name:"Slider",mixins:[eu],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:Z.oneOfType([Z.number,Z.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,t=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(t),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const t=e!==void 0?e:this.sValue,n=this.trimAlignValue(t,this.$props);n!==this.sValue&&(this.setState({sValue:n}),hz(t,this.$props)&&this.$emit("change",n))},onChange(e){const t=!ul(this,"value"),n=e.sValue>this.max?S(S({},e),{sValue:this.max}):e;t&&this.setState(n);const o=n.sValue;this.$emit("change",o)},onStart(e){this.setState({dragging:!0});const{sValue:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e,n!==t&&(this.prevMovedHandleIndex=0,this.onChange({sValue:n}))},onEnd(e){const{dragging:t}=this;this.removeDocumentEvents(),(t||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,t){Nd(e);const{sValue:n}=this,o=this.calcValueByPos(t);o!==n&&this.onChange({sValue:o})},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,o=mz(e,n,t);if(o){Nd(e);const{sValue:r}=this,i=o(r,this.$props),a=this.trimAlignValue(i);if(a===r)return;this.onChange({sValue:a}),this.$emit("afterChange",a),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const n=S(S({},this.$props),t),o=EI(e,n);return vz(o,n)},getTrack(e){let{prefixCls:t,reverse:n,vertical:o,included:r,minimumTrackStyle:i,mergedTrackStyle:a,length:l,offset:s}=e;return g(uz,{class:`${t}-track`,vertical:o,included:r,offset:s,reverse:n,length:l,style:S(S({},i),a)},null)},renderSlider(){const{prefixCls:e,vertical:t,included:n,disabled:o,minimumTrackStyle:r,trackStyle:i,handleStyle:a,tabindex:l,ariaLabelForHandle:s,ariaLabelledByForHandle:c,ariaValueTextFormatterForHandle:u,min:d,max:f,startPoint:h,reverse:m,handle:v,defaultHandle:y}=this,b=v||y,{sValue:$,dragging:x}=this,_=this.calcOffset($),w=b({class:`${e}-handle`,prefixCls:e,vertical:t,offset:_,value:$,dragging:x,disabled:o,min:d,max:f,reverse:m,index:0,tabindex:l,ariaLabel:s,ariaLabelledBy:c,ariaValueTextFormatter:u,style:a[0]||a,ref:P=>this.saveHandle(0,P),onFocus:this.onFocus,onBlur:this.onBlur}),I=h!==void 0?this.calcOffset(h):0,O=i[0]||i;return{tracks:this.getTrack({prefixCls:e,reverse:m,vertical:t,included:n,offset:I,minimumTrackStyle:r,mergedTrackStyle:O,length:_-I}),handles:w}}}}),NIe=bz(LIe),Gf=e=>{let{value:t,handle:n,bounds:o,props:r}=e;const{allowCross:i,pushable:a}=r,l=Number(a),s=EI(t,r);let c=s;return!i&&n!=null&&o!==void 0&&(n>0&&s<=o[n-1]+l&&(c=o[n-1]+l),n=o[n+1]-l&&(c=o[n+1]-l)),vz(c,r)},kIe={defaultValue:Z.arrayOf(Z.number),value:Z.arrayOf(Z.number),count:Number,pushable:K7(Z.oneOfType([Z.looseBool,Z.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:Z.arrayOf(Z.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},BIe=pe({compatConfig:{MODE:3},name:"Range",mixins:[eu],inheritAttrs:!1,props:bt(kIe,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:t,max:n}=this,o=Array(...Array(e+1)).map(()=>t),r=ul(this,"defaultValue")?this.defaultValue:o;let{value:i}=this;i===void 0&&(i=r);const a=i.map((s,c)=>Gf({value:s,handle:c,props:this.$props}));return{sHandle:null,recent:a[0]===n?0:a.length-1,bounds:a}},watch:{value:{handler(e){const{bounds:t}=this;this.setChangeValue(e||t)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:t}=this;let n=e.map((o,r)=>Gf({value:o,handle:r,bounds:t,props:this.$props}));if(t.length===n.length){if(n.every((o,r)=>o===t[r]))return null}else n=e.map((o,r)=>Gf({value:o,handle:r,props:this.$props}));if(this.setState({bounds:n}),e.some(o=>hz(o,this.$props))){const o=e.map(r=>EI(r,this.$props));this.$emit("change",o)}},onChange(e){if(!ul(this,"value"))this.setState(e);else{const r={};["sHandle","recent"].forEach(i=>{e[i]!==void 0&&(r[i]=e[i])}),Object.keys(r).length&&this.setState(r)}const o=S(S({},this.$data),e).bounds;this.$emit("change",o)},positionGetValue(e){const t=this.getValue(),n=this.calcValueByPos(e),o=this.getClosestBound(n),r=this.getBoundNeedMoving(n,o),i=t[r];if(n===i)return null;const a=[...t];return a[r]=n,a},onStart(e){const{bounds:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e;const o=this.getClosestBound(n);this.prevMovedHandleIndex=this.getBoundNeedMoving(n,o),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const r=t[this.prevMovedHandleIndex];if(n===r)return;const i=[...t];i[this.prevMovedHandleIndex]=n,this.onChange({bounds:i})},onEnd(e){const{sHandle:t}=this;this.removeDocumentEvents(),t||(this.dragTrack=!1),(t!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,t,n,o){Nd(e);const{$data:r,$props:i}=this,a=i.max||100,l=i.min||0;if(n){let f=i.vertical?-t:t;f=i.reverse?-f:f;const h=a-Math.max(...o),m=l-Math.min(...o),v=Math.min(Math.max(f/(this.getSliderLength()/100),m),h),y=o.map(b=>Math.floor(Math.max(Math.min(b+v,a),l)));r.bounds.map((b,$)=>b===y[$]).some(b=>!b)&&this.onChange({bounds:y});return}const{bounds:s,sHandle:c}=this,u=this.calcValueByPos(t),d=s[c];u!==d&&this.moveTo(u)},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,o=mz(e,n,t);if(o){Nd(e);const{bounds:r,sHandle:i}=this,a=r[i===null?this.recent:i],l=o(a,this.$props),s=Gf({value:l,handle:i,bounds:r,props:this.$props});if(s===a)return;this.moveTo(s,!0)}},getClosestBound(e){const{bounds:t}=this;let n=0;for(let o=1;o=t[o]&&(n=o);return Math.abs(t[n+1]-e)l-s),this.internalPointsCache={marks:e,step:t,points:a}}return this.internalPointsCache.points},moveTo(e,t){const n=[...this.bounds],{sHandle:o,recent:r}=this,i=o===null?r:o;n[i]=e;let a=i;this.$props.pushable!==!1?this.pushSurroundingHandles(n,a):this.$props.allowCross&&(n.sort((l,s)=>l-s),a=n.indexOf(e)),this.onChange({recent:a,sHandle:a,bounds:n}),t&&(this.$emit("afterChange",n),this.setState({},()=>{this.handlesRefs[a].focus()}),this.onEnd())},pushSurroundingHandles(e,t){const n=e[t],{pushable:o}=this,r=Number(o);let i=0;if(e[t+1]-n=o.length||i<0)return!1;const a=t+n,l=o[i],{pushable:s}=this,c=Number(s),u=n*(e[a]-l);return this.pushHandle(e,a,n,c-u)?(e[t]=l,!0):!1},trimAlignValue(e){const{sHandle:t,bounds:n}=this;return Gf({value:e,handle:t,bounds:n,props:this.$props})},ensureValueNotConflict(e,t,n){let{allowCross:o,pushable:r}=n;const i=this.$data||{},{bounds:a}=i;if(e=e===void 0?i.sHandle:e,r=Number(r),!o&&e!=null&&a!==void 0){if(e>0&&t<=a[e-1]+r)return a[e-1]+r;if(e=a[e+1]-r)return a[e+1]-r}return t},getTrack(e){let{bounds:t,prefixCls:n,reverse:o,vertical:r,included:i,offsets:a,trackStyle:l}=e;return t.slice(0,-1).map((s,c)=>{const u=c+1,d=me({[`${n}-track`]:!0,[`${n}-track-${u}`]:!0});return g(uz,{class:d,vertical:r,reverse:o,included:i,offset:a[u-1],length:a[u]-a[u-1],style:l[c],key:u},null)})},renderSlider(){const{sHandle:e,bounds:t,prefixCls:n,vertical:o,included:r,disabled:i,min:a,max:l,reverse:s,handle:c,defaultHandle:u,trackStyle:d,handleStyle:f,tabindex:h,ariaLabelGroupForHandles:m,ariaLabelledByGroupForHandles:v,ariaValueTextFormatterGroupForHandles:y}=this,b=c||u,$=t.map(w=>this.calcOffset(w)),x=`${n}-handle`,_=t.map((w,I)=>{let O=h[I]||0;(i||h[I]===null)&&(O=null);const P=e===I;return b({class:me({[x]:!0,[`${x}-${I+1}`]:!0,[`${x}-dragging`]:P}),prefixCls:n,vertical:o,dragging:P,offset:$[I],value:w,index:I,tabindex:O,min:a,max:l,reverse:s,disabled:i,style:f[I],ref:E=>this.saveHandle(I,E),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:m[I],ariaLabelledBy:v[I],ariaValueTextFormatter:y[I]})});return{tracks:this.getTrack({bounds:t,prefixCls:n,reverse:s,vertical:o,included:r,offsets:$,trackStyle:d}),handles:_}}}}),FIe=bz(BIe),HIe=pe({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:_9(),setup(e,t){let{attrs:n,slots:o}=t;const r=he(null),i=he(null);function a(){mt.cancel(i.value),i.value=null}function l(){i.value=mt(()=>{var c;(c=r.value)===null||c===void 0||c.forcePopupAlign(),i.value=null})}const s=()=>{a(),e.open&&l()};return Ie([()=>e.open,()=>e.title],()=>{s()},{flush:"post",immediate:!0}),Pb(()=>{s()}),Ct(()=>{a()}),()=>g(Br,V(V({ref:r},e),n),o)}}),zIe=e=>{const{componentCls:t,controlSize:n,dotSize:o,marginFull:r,marginPart:i,colorFillContentHover:a}=e;return{[t]:S(S({},vt(e)),{position:"relative",height:n,margin:`${i}px ${r}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${r}px ${i}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:a},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:` + inset-inline-start ${e.motionDurationMid}, + inset-block-start ${e.motionDurationMid}, + width ${e.motionDurationMid}, + height ${e.motionDurationMid}, + box-shadow ${e.motionDurationMid} + `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+e.handleLineWidthHover*2,height:e.handleSizeHover+e.handleLineWidthHover*2},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,"&-active":{borderColor:e.colorPrimaryBorder}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.colorFillSecondary} !important`},[`${t}-track`]:{backgroundColor:`${e.colorTextDisabled} !important`},[` + ${t}-dot + `]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new Zt(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,insetInlineStart:0,insetBlockStart:0},[` + ${t}-mark-text, + ${t}-dot + `]:{cursor:"not-allowed !important"}}})}},yz=(e,t)=>{const{componentCls:n,railSize:o,handleSize:r,dotSize:i}=e,a=t?"paddingBlock":"paddingInline",l=t?"width":"height",s=t?"height":"width",c=t?"insetBlockStart":"insetInlineStart",u=t?"top":"insetInlineStart";return{[a]:o,[s]:o*3,[`${n}-rail`]:{[l]:"100%",[s]:o},[`${n}-track`]:{[s]:o},[`${n}-handle`]:{[c]:(o*3-r)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[u]:r,[l]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[u]:o,[l]:"100%",[s]:o},[`${n}-dot`]:{position:"absolute",[c]:(o-i)/2}}},jIe=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:S(S({},yz(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},WIe=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:S(S({},yz(e,!1)),{height:"100%"})}},VIe=pt("Slider",e=>{const t=nt(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[zIe(t),jIe(t),WIe(t)]},e=>{const n=e.controlHeightLG/4,o=e.controlHeightSM/2,r=e.lineWidth+1,i=e.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:o,dotSize:8,handleLineWidth:r,handleLineWidthHover:i}});var R8=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rtypeof e=="number"?e.toString():"",UIe=()=>({id:String,prefixCls:String,tooltipPrefixCls:String,range:rt([Boolean,Object]),reverse:De(),min:Number,max:Number,step:rt([Object,Number]),marks:qe(),dots:De(),value:rt([Array,Number]),defaultValue:rt([Array,Number]),included:De(),disabled:De(),vertical:De(),tipFormatter:rt([Function,Object],()=>KIe),tooltipOpen:De(),tooltipVisible:De(),tooltipPlacement:Qe(),getTooltipPopupContainer:Oe(),autofocus:De(),handleStyle:rt([Array,Object]),trackStyle:rt([Array,Object]),onChange:Oe(),onAfterChange:Oe(),onFocus:Oe(),onBlur:Oe(),"onUpdate:value":Oe()}),GIe=pe({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:UIe(),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;const{prefixCls:a,rootPrefixCls:l,direction:s,getPopupContainer:c,configProvider:u}=Ve("slider",e),[d,f]=VIe(a),h=co(),m=he(),v=he({}),y=(O,P)=>{v.value[O]=P},b=M(()=>e.tooltipPlacement?e.tooltipPlacement:e.vertical?s.value==="rtl"?"left":"right":"top"),$=()=>{var O;(O=m.value)===null||O===void 0||O.focus()},x=()=>{var O;(O=m.value)===null||O===void 0||O.blur()},_=O=>{r("update:value",O),r("change",O),h.onFieldChange()},w=O=>{r("blur",O)};i({focus:$,blur:x});const I=O=>{var{tooltipPrefixCls:P}=O,E=O.info,{value:R,dragging:A,index:N}=E,F=R8(E,["value","dragging","index"]);const{tipFormatter:W,tooltipOpen:D=e.tooltipVisible,getTooltipPopupContainer:B}=e,k=W?v.value[N]||A:!1,L=D||D===void 0&&k;return g(HIe,{prefixCls:P,title:W?W(R):"",open:L,placement:b.value,transitionName:`${l.value}-zoom-down`,key:N,overlayClassName:`${a.value}-tooltip`,getPopupContainer:B||(c==null?void 0:c.value)},{default:()=>[g(pz,V(V({},F),{},{value:R,onMouseenter:()=>y(N,!0),onMouseleave:()=>y(N,!1)}),null)]})};return()=>{const{tooltipPrefixCls:O,range:P,id:E=h.id.value}=e,R=R8(e,["tooltipPrefixCls","range","id"]),A=u.getPrefixCls("tooltip",O),N=me(n.class,{[`${a.value}-rtl`]:s.value==="rtl"},f.value);s.value==="rtl"&&!R.vertical&&(R.reverse=!R.reverse);let F;return typeof P=="object"&&(F=P.draggableTrack),d(P?g(FIe,V(V(V({},n),R),{},{step:R.step,draggableTrack:F,class:N,ref:m,handle:W=>I({tooltipPrefixCls:A,prefixCls:a.value,info:W}),prefixCls:a.value,onChange:_,onBlur:w}),{mark:o.mark}):g(NIe,V(V(V({},n),R),{},{id:E,step:R.step,class:N,ref:m,handle:W=>I({tooltipPrefixCls:A,prefixCls:a.value,info:W}),prefixCls:a.value,onChange:_,onBlur:w}),{mark:o.mark}))}}}),YIe=$n(GIe);function D8(e){return typeof e=="string"}function XIe(){}const Sz=()=>({prefixCls:String,itemWidth:String,active:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},status:Qe(),iconPrefix:String,icon:Z.any,adjustMarginRight:String,stepNumber:Number,stepIndex:Number,description:Z.any,title:Z.any,subTitle:Z.any,progressDot:K7(Z.oneOfType([Z.looseBool,Z.func])),tailContent:Z.any,icons:Z.shape({finish:Z.any,error:Z.any}).loose,onClick:Oe(),onStepClick:Oe(),stepIcon:Oe(),itemRender:Oe(),__legacy:De()}),Cz=pe({compatConfig:{MODE:3},name:"Step",inheritAttrs:!1,props:Sz(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=l=>{o("click",l),o("stepClick",e.stepIndex)},a=l=>{let{icon:s,title:c,description:u}=l;const{prefixCls:d,stepNumber:f,status:h,iconPrefix:m,icons:v,progressDot:y=n.progressDot,stepIcon:b=n.stepIcon}=e;let $;const x=me(`${d}-icon`,`${m}icon`,{[`${m}icon-${s}`]:s&&D8(s),[`${m}icon-check`]:!s&&h==="finish"&&(v&&!v.finish||!v),[`${m}icon-cross`]:!s&&h==="error"&&(v&&!v.error||!v)}),_=g("span",{class:`${d}-icon-dot`},null);return y?typeof y=="function"?$=g("span",{class:`${d}-icon`},[y({iconDot:_,index:f-1,status:h,title:c,description:u,prefixCls:d})]):$=g("span",{class:`${d}-icon`},[_]):s&&!D8(s)?$=g("span",{class:`${d}-icon`},[s]):v&&v.finish&&h==="finish"?$=g("span",{class:`${d}-icon`},[v.finish]):v&&v.error&&h==="error"?$=g("span",{class:`${d}-icon`},[v.error]):s||h==="finish"||h==="error"?$=g("span",{class:x},null):$=g("span",{class:`${d}-icon`},[f]),b&&($=b({index:f-1,status:h,title:c,description:u,node:$})),$};return()=>{var l,s,c,u;const{prefixCls:d,itemWidth:f,active:h,status:m="wait",tailContent:v,adjustMarginRight:y,disabled:b,title:$=(l=n.title)===null||l===void 0?void 0:l.call(n),description:x=(s=n.description)===null||s===void 0?void 0:s.call(n),subTitle:_=(c=n.subTitle)===null||c===void 0?void 0:c.call(n),icon:w=(u=n.icon)===null||u===void 0?void 0:u.call(n),onClick:I,onStepClick:O}=e,P=m||"wait",E=me(`${d}-item`,`${d}-item-${P}`,{[`${d}-item-custom`]:w,[`${d}-item-active`]:h,[`${d}-item-disabled`]:b===!0}),R={};f&&(R.width=f),y&&(R.marginRight=y);const A={onClick:I||XIe};O&&!b&&(A.role="button",A.tabindex=0,A.onClick=i);const N=g("div",V(V({},_t(r,["__legacy"])),{},{class:[E,r.class],style:[r.style,R]}),[g("div",V(V({},A),{},{class:`${d}-item-container`}),[g("div",{class:`${d}-item-tail`},[v]),g("div",{class:`${d}-item-icon`},[a({icon:w,title:$,description:x})]),g("div",{class:`${d}-item-content`},[g("div",{class:`${d}-item-title`},[$,_&&g("div",{title:typeof _=="string"?_:void 0,class:`${d}-item-subtitle`},[_])]),x&&g("div",{class:`${d}-item-description`},[x])])])]);return e.itemRender?e.itemRender(N):N}}});var qIe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r[]),icons:Z.shape({finish:Z.any,error:Z.any}).loose,stepIcon:Oe(),isInline:Z.looseBool,itemRender:Oe()},emits:["change"],setup(e,t){let{slots:n,emit:o}=t;const r=l=>{const{current:s}=e;s!==l&&o("change",l)},i=(l,s,c)=>{const{prefixCls:u,iconPrefix:d,status:f,current:h,initial:m,icons:v,stepIcon:y=n.stepIcon,isInline:b,itemRender:$,progressDot:x=n.progressDot}=e,_=b||x,w=S(S({},l),{class:""}),I=m+s,O={active:I===h,stepNumber:I+1,stepIndex:I,key:I,prefixCls:u,iconPrefix:d,progressDot:_,stepIcon:y,icons:v,onStepClick:r};return f==="error"&&s===h-1&&(w.class=`${u}-next-error`),w.status||(I===h?w.status=f:I$(w,P)),g(Cz,V(V(V({},w),O),{},{__legacy:!1}),null))},a=(l,s)=>i(S({},l.props),s,c=>Gt(l,c));return()=>{var l;const{prefixCls:s,direction:c,type:u,labelPlacement:d,iconPrefix:f,status:h,size:m,current:v,progressDot:y=n.progressDot,initial:b,icons:$,items:x,isInline:_,itemRender:w}=e,I=qIe(e,["prefixCls","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","initial","icons","items","isInline","itemRender"]),O=u==="navigation",P=_||y,E=_?"horizontal":c,R=_?void 0:m,A=P?"vertical":d,N=me(s,`${s}-${c}`,{[`${s}-${R}`]:R,[`${s}-label-${A}`]:E==="horizontal",[`${s}-dot`]:!!P,[`${s}-navigation`]:O,[`${s}-inline`]:_});return g("div",V({class:N},I),[x.filter(F=>F).map((F,W)=>i(F,W)),_n((l=n.default)===null||l===void 0?void 0:l.call(n)).map(a)])}}}),QIe=e=>{const{componentCls:t,stepsIconCustomTop:n,stepsIconCustomSize:o,stepsIconCustomFontSize:r}=e;return{[`${t}-item-custom`]:{[`> ${t}-item-container > ${t}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${t}-icon`]:{top:n,width:o,height:o,fontSize:r,lineHeight:`${o}px`}}},[`&:not(${t}-vertical)`]:{[`${t}-item-custom`]:{[`${t}-item-icon`]:{width:"auto",background:"none"}}}}},JIe=e=>{const{componentCls:t,stepsIconSize:n,lineHeight:o,stepsSmallIconSize:r}=e;return{[`&${t}-label-vertical`]:{[`${t}-item`]:{overflow:"visible","&-tail":{marginInlineStart:n/2+e.controlHeightLG,padding:`${e.paddingXXS}px ${e.paddingLG}px`},"&-content":{display:"block",width:(n/2+e.controlHeightLG)*2,marginTop:e.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:e.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:e.marginXXS,marginInlineStart:0,lineHeight:o}},[`&${t}-small:not(${t}-dot)`]:{[`${t}-item`]:{"&-icon":{marginInlineStart:e.controlHeightLG+(n-r)/2}}}}}},ePe=e=>{const{componentCls:t,stepsNavContentMaxWidth:n,stepsNavArrowColor:o,stepsNavActiveColor:r,motionDurationSlow:i}=e;return{[`&${t}-navigation`]:{paddingTop:e.paddingSM,[`&${t}-small`]:{[`${t}-item`]:{"&-container":{marginInlineStart:-e.marginSM}}},[`${t}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:-e.margin,paddingBottom:e.paddingSM,textAlign:"start",transition:`opacity ${i}`,[`${t}-item-content`]:{maxWidth:n},[`${t}-item-title`]:S(S({maxWidth:"100%",paddingInlineEnd:0},eo),{"&::after":{display:"none"}})},[`&:not(${t}-item-active)`]:{[`${t}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${e.paddingSM/2}px)`,insetInlineStart:"100%",display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,borderTop:`${e.lineWidth}px ${e.lineType} ${o}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${o}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:e.lineWidthBold,backgroundColor:r,transition:`width ${i}, inset-inline-start ${i}`,transitionTimingFunction:"ease-out",content:'""'}},[`${t}-item${t}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${t}-navigation${t}-vertical`]:{[`> ${t}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${t}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:e.lineWidth*3,height:`calc(100% - ${e.marginLG}px)`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:e.controlHeight*.25,height:e.controlHeight*.25,marginBottom:e.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},[`> ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}},[`&${t}-navigation${t}-horizontal`]:{[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}}},tPe=e=>{const{antCls:t,componentCls:n}=e;return{[`&${n}-with-progress`]:{[`${n}-item`]:{paddingTop:e.paddingXXS,[`&-process ${n}-item-container ${n}-item-icon ${n}-icon`]:{color:e.processIconColor}},[`&${n}-vertical > ${n}-item `]:{paddingInlineStart:e.paddingXXS,[`> ${n}-item-container > ${n}-item-tail`]:{top:e.marginXXS,insetInlineStart:e.stepsIconSize/2-e.lineWidth+e.paddingXXS}},[`&, &${n}-small`]:{[`&${n}-horizontal ${n}-item:first-child`]:{paddingBottom:e.paddingXXS,paddingInlineStart:e.paddingXXS}},[`&${n}-small${n}-vertical > ${n}-item > ${n}-item-container > ${n}-item-tail`]:{insetInlineStart:e.stepsSmallIconSize/2-e.lineWidth+e.paddingXXS},[`&${n}-label-vertical`]:{[`${n}-item ${n}-item-tail`]:{top:e.margin-2*e.lineWidth}},[`${n}-item-icon`]:{position:"relative",[`${t}-progress`]:{position:"absolute",insetBlockStart:(e.stepsIconSize-e.stepsProgressSize-e.lineWidth*2)/2,insetInlineStart:(e.stepsIconSize-e.stepsProgressSize-e.lineWidth*2)/2}}}}},nPe=e=>{const{componentCls:t,descriptionWidth:n,lineHeight:o,stepsCurrentDotSize:r,stepsDotSize:i,motionDurationSlow:a}=e;return{[`&${t}-dot, &${t}-dot${t}-small`]:{[`${t}-item`]:{"&-title":{lineHeight:o},"&-tail":{top:Math.floor((e.stepsDotSize-e.lineWidth*3)/2),width:"100%",marginTop:0,marginBottom:0,marginInline:`${n/2}px 0`,padding:0,"&::after":{width:`calc(100% - ${e.marginSM*2}px)`,height:e.lineWidth*3,marginInlineStart:e.marginSM}},"&-icon":{width:i,height:i,marginInlineStart:(e.descriptionWidth-i)/2,paddingInlineEnd:0,lineHeight:`${i}px`,background:"transparent",border:0,[`${t}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${a}`,"&::after":{position:"absolute",top:-e.marginSM,insetInlineStart:(i-e.controlHeightLG*1.5)/2,width:e.controlHeightLG*1.5,height:e.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:n},[`&-process ${t}-item-icon`]:{position:"relative",top:(i-r)/2,width:r,height:r,lineHeight:`${r}px`,background:"none",marginInlineStart:(e.descriptionWidth-r)/2},[`&-process ${t}-icon`]:{[`&:first-child ${t}-icon-dot`]:{insetInlineStart:0}}}},[`&${t}-vertical${t}-dot`]:{[`${t}-item-icon`]:{marginTop:(e.controlHeight-i)/2,marginInlineStart:0,background:"none"},[`${t}-item-process ${t}-item-icon`]:{marginTop:(e.controlHeight-r)/2,top:0,insetInlineStart:(i-r)/2,marginInlineStart:0},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:(e.controlHeight-i)/2,insetInlineStart:0,margin:0,padding:`${i+e.paddingXS}px 0 ${e.paddingXS}px`,"&::after":{marginInlineStart:(i-e.lineWidth)/2}},[`&${t}-small`]:{[`${t}-item-icon`]:{marginTop:(e.controlHeightSM-i)/2},[`${t}-item-process ${t}-item-icon`]:{marginTop:(e.controlHeightSM-r)/2},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:(e.controlHeightSM-i)/2}},[`${t}-item:first-child ${t}-icon-dot`]:{insetInlineStart:0},[`${t}-item-content`]:{width:"inherit"}}}},oPe=e=>{const{componentCls:t}=e;return{[`&${t}-rtl`]:{direction:"rtl",[`${t}-item`]:{"&-subtitle":{float:"left"}},[`&${t}-navigation`]:{[`${t}-item::after`]:{transform:"rotate(-45deg)"}},[`&${t}-vertical`]:{[`> ${t}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${t}-item-icon`]:{float:"right"}}},[`&${t}-dot`]:{[`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]:{float:"right"}}}}},rPe=e=>{const{componentCls:t,stepsSmallIconSize:n,fontSizeSM:o,fontSize:r,colorTextDescription:i}=e;return{[`&${t}-small`]:{[`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]:{paddingInlineStart:e.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${t}-item-icon`]:{width:n,height:n,marginTop:0,marginBottom:0,marginInline:`0 ${e.marginXS}px`,fontSize:o,lineHeight:`${n}px`,textAlign:"center",borderRadius:n},[`${t}-item-title`]:{paddingInlineEnd:e.paddingSM,fontSize:r,lineHeight:`${n}px`,"&::after":{top:n/2}},[`${t}-item-description`]:{color:i,fontSize:r},[`${t}-item-tail`]:{top:n/2-e.paddingXXS},[`${t}-item-custom ${t}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${t}-icon`]:{fontSize:n,lineHeight:`${n}px`,transform:"none"}}}}},iPe=e=>{const{componentCls:t,stepsSmallIconSize:n,stepsIconSize:o}=e;return{[`&${t}-vertical`]:{display:"flex",flexDirection:"column",[`> ${t}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${t}-item-icon`]:{float:"left",marginInlineEnd:e.margin},[`${t}-item-content`]:{display:"block",minHeight:e.controlHeight*1.5,overflow:"hidden"},[`${t}-item-title`]:{lineHeight:`${o}px`},[`${t}-item-description`]:{paddingBottom:e.paddingSM}},[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.stepsIconSize/2-e.lineWidth,width:e.lineWidth,height:"100%",padding:`${o+e.marginXXS*1.5}px 0 ${e.marginXXS*1.5}px`,"&::after":{width:e.lineWidth,height:"100%"}},[`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]:{display:"block"},[` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]:{"&::after":{display:"none"}},[`&${t}-small ${t}-item-container`]:{[`${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.stepsSmallIconSize/2-e.lineWidth,padding:`${n+e.marginXXS*1.5}px 0 ${e.marginXXS*1.5}px`},[`${t}-item-title`]:{lineHeight:`${n}px`}}}}},aPe=e=>{const{componentCls:t,inlineDotSize:n,inlineTitleColor:o,inlineTailColor:r}=e,i=e.paddingXS+e.lineWidth,a={[`${t}-item-container ${t}-item-content ${t}-item-title`]:{color:o}};return{[`&${t}-inline`]:{width:"auto",display:"inline-flex",[`${t}-item`]:{flex:"none","&-container":{padding:`${i}px ${e.paddingXXS}px 0`,margin:`0 ${e.marginXXS/2}px`,borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,[`> ${t}-icon`]:{top:0},[`${t}-icon-dot`]:{borderRadius:e.fontSizeSM/4}},"&-content":{width:"auto",marginTop:e.marginXS-e.lineWidth},"&-title":{color:o,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,fontWeight:"normal",marginBottom:e.marginXXS/2},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:i+n/2,transform:"translateY(-50%)","&:after":{width:"100%",height:e.lineWidth,borderRadius:0,marginInlineStart:0,background:r}},[`&:first-child ${t}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${t}-item-tail`]:{display:"block",width:"50%"},"&-wait":S({[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:e.colorBorderBg,border:`${e.lineWidth}px ${e.lineType} ${r}`}},a),"&-finish":S({[`${t}-item-tail::after`]:{backgroundColor:r},[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:r,border:`${e.lineWidth}px ${e.lineType} ${r}`}},a),"&-error":a,"&-active, &-process":S({[`${t}-item-icon`]:{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,top:0}},a),[`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]:{[`${t}-item-title`]:{color:o}}}}}};var td;(function(e){e.wait="wait",e.process="process",e.finish="finish",e.error="error"})(td||(td={}));const Fv=(e,t)=>{const n=`${t.componentCls}-item`,o=`${e}IconColor`,r=`${e}TitleColor`,i=`${e}DescriptionColor`,a=`${e}TailColor`,l=`${e}IconBgColor`,s=`${e}IconBorderColor`,c=`${e}DotColor`;return{[`${n}-${e} ${n}-icon`]:{backgroundColor:t[l],borderColor:t[s],[`> ${t.componentCls}-icon`]:{color:t[o],[`${t.componentCls}-icon-dot`]:{background:t[c]}}},[`${n}-${e}${n}-custom ${n}-icon`]:{[`> ${t.componentCls}-icon`]:{color:t[c]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-title`]:{color:t[r],"&::after":{backgroundColor:t[a]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-description`]:{color:t[i]},[`${n}-${e} > ${n}-container > ${n}-tail::after`]:{backgroundColor:t[a]}}},lPe=e=>{const{componentCls:t,motionDurationSlow:n}=e,o=`${t}-item`;return S(S(S(S(S(S({[o]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${o}-container > ${o}-tail, > ${o}-container > ${o}-content > ${o}-title::after`]:{display:"none"}}},[`${o}-container`]:{outline:"none"},[`${o}-icon, ${o}-content`]:{display:"inline-block",verticalAlign:"top"},[`${o}-icon`]:{width:e.stepsIconSize,height:e.stepsIconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:e.marginXS,fontSize:e.stepsIconFontSize,fontFamily:e.fontFamily,lineHeight:`${e.stepsIconSize}px`,textAlign:"center",borderRadius:e.stepsIconSize,border:`${e.lineWidth}px ${e.lineType} transparent`,transition:`background-color ${n}, border-color ${n}`,[`${t}-icon`]:{position:"relative",top:e.stepsIconTop,color:e.colorPrimary,lineHeight:1}},[`${o}-tail`]:{position:"absolute",top:e.stepsIconSize/2-e.paddingXXS,insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:e.lineWidth,background:e.colorSplit,borderRadius:e.lineWidth,transition:`background ${n}`,content:'""'}},[`${o}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:e.padding,color:e.colorText,fontSize:e.fontSizeLG,lineHeight:`${e.stepsTitleLineHeight}px`,"&::after":{position:"absolute",top:e.stepsTitleLineHeight/2,insetInlineStart:"100%",display:"block",width:9999,height:e.lineWidth,background:e.processTailColor,content:'""'}},[`${o}-subtitle`]:{display:"inline",marginInlineStart:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize},[`${o}-description`]:{color:e.colorTextDescription,fontSize:e.fontSize}},Fv(td.wait,e)),Fv(td.process,e)),{[`${o}-process > ${o}-container > ${o}-title`]:{fontWeight:e.fontWeightStrong}}),Fv(td.finish,e)),Fv(td.error,e)),{[`${o}${t}-next-error > ${t}-item-title::after`]:{background:e.colorError},[`${o}-disabled`]:{cursor:"not-allowed"}})},sPe=e=>{const{componentCls:t,motionDurationSlow:n}=e;return{[`& ${t}-item`]:{[`&:not(${t}-item-active)`]:{[`& > ${t}-item-container[role='button']`]:{cursor:"pointer",[`${t}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${t}-icon`]:{transition:`color ${n}`}},"&:hover":{[`${t}-item`]:{"&-title, &-subtitle, &-description":{color:e.colorPrimary}}}},[`&:not(${t}-item-process)`]:{[`& > ${t}-item-container[role='button']:hover`]:{[`${t}-item`]:{"&-icon":{borderColor:e.colorPrimary,[`${t}-icon`]:{color:e.colorPrimary}}}}}}},[`&${t}-horizontal:not(${t}-label-vertical)`]:{[`${t}-item`]:{paddingInlineStart:e.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${t}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:e.descriptionWidth,whiteSpace:"normal"}}}}},cPe=e=>{const{componentCls:t}=e;return{[t]:S(S(S(S(S(S(S(S(S(S(S(S(S({},vt(e)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),lPe(e)),sPe(e)),QIe(e)),rPe(e)),iPe(e)),JIe(e)),nPe(e)),ePe(e)),oPe(e)),tPe(e)),aPe(e))}},uPe=pt("Steps",e=>{const{wireframe:t,colorTextDisabled:n,fontSizeHeading3:o,fontSize:r,controlHeight:i,controlHeightLG:a,colorTextLightSolid:l,colorText:s,colorPrimary:c,colorTextLabel:u,colorTextDescription:d,colorTextQuaternary:f,colorFillContent:h,controlItemBgActive:m,colorError:v,colorBgContainer:y,colorBorderSecondary:b}=e,$=e.controlHeight,x=e.colorSplit,_=nt(e,{processTailColor:x,stepsNavArrowColor:n,stepsIconSize:$,stepsIconCustomSize:$,stepsIconCustomTop:0,stepsIconCustomFontSize:a/2,stepsIconTop:-.5,stepsIconFontSize:r,stepsTitleLineHeight:i,stepsSmallIconSize:o,stepsDotSize:i/4,stepsCurrentDotSize:a/4,stepsNavContentMaxWidth:"auto",processIconColor:l,processTitleColor:s,processDescriptionColor:s,processIconBgColor:c,processIconBorderColor:c,processDotColor:c,waitIconColor:t?n:u,waitTitleColor:d,waitDescriptionColor:d,waitTailColor:x,waitIconBgColor:t?y:h,waitIconBorderColor:t?n:"transparent",waitDotColor:n,finishIconColor:c,finishTitleColor:s,finishDescriptionColor:d,finishTailColor:c,finishIconBgColor:t?y:m,finishIconBorderColor:t?c:m,finishDotColor:c,errorIconColor:l,errorTitleColor:v,errorDescriptionColor:v,errorTailColor:x,errorIconBgColor:v,errorIconBorderColor:v,errorDotColor:v,stepsNavActiveColor:c,stepsProgressSize:a,inlineDotSize:6,inlineTitleColor:f,inlineTailColor:b});return[cPe(_)]},{descriptionWidth:140}),dPe=()=>({prefixCls:String,iconPrefix:String,current:Number,initial:Number,percent:Number,responsive:De(),items:kt(),labelPlacement:Qe(),status:Qe(),size:Qe(),direction:Qe(),progressDot:rt([Boolean,Function]),type:Qe(),onChange:Oe(),"onUpdate:current":Oe()}),zC=pe({compatConfig:{MODE:3},name:"ASteps",inheritAttrs:!1,props:bt(dPe(),{current:0,responsive:!0,labelPlacement:"horizontal"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const{prefixCls:i,direction:a,configProvider:l}=Ve("steps",e),[s,c]=uPe(i),[,u]=Ol(),d=ff(),f=M(()=>e.responsive&&d.value.xs?"vertical":e.direction),h=M(()=>l.getPrefixCls("",e.iconPrefix)),m=x=>{r("update:current",x),r("change",x)},v=M(()=>e.type==="inline"),y=M(()=>v.value?void 0:e.percent),b=x=>{let{node:_,status:w}=x;if(w==="process"&&e.percent!==void 0){const I=e.size==="small"?u.value.controlHeight:u.value.controlHeightLG;return g("div",{class:`${i.value}-progress-icon`},[g(II,{type:"circle",percent:y.value,size:I,strokeWidth:4,format:()=>null},null),_])}return _},$=M(()=>({finish:g(sy,{class:`${i.value}-finish-icon`},null),error:g(Vr,{class:`${i.value}-error-icon`},null)}));return()=>{const x=me({[`${i.value}-rtl`]:a.value==="rtl",[`${i.value}-with-progress`]:y.value!==void 0},n.class,c.value),_=(w,I)=>w.description?g(Br,{title:w.description},{default:()=>[I]}):I;return s(g(ZIe,V(V(V({icons:$.value},n),_t(e,["percent","responsive"])),{},{items:e.items,direction:f.value,prefixCls:i.value,iconPrefix:h.value,class:x,onChange:m,isInline:v.value,itemRender:v.value?_:void 0}),S({stepIcon:b},o)))}}}),Dm=pe(S(S({compatConfig:{MODE:3}},Cz),{name:"AStep",props:Sz()})),fPe=S(zC,{Step:Dm,install:e=>(e.component(zC.name,zC),e.component(Dm.name,Dm),e)}),pPe=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[`&${t}-small`]:{minWidth:e.switchMinWidthSM,height:e.switchHeightSM,lineHeight:`${e.switchHeightSM}px`,[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMaxSM,paddingInlineEnd:e.switchInnerMarginMinSM,[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:e.switchPinSizeSM,height:e.switchPinSizeSM},[`${t}-loading-icon`]:{top:(e.switchPinSizeSM-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMinSM,paddingInlineEnd:e.switchInnerMarginMaxSM,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},hPe=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:(e.switchPinSize-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},gPe=e=>{const{componentCls:t}=e,n=`${t}-handle`;return{[t]:{[n]:{position:"absolute",top:e.switchPadding,insetInlineStart:e.switchPadding,width:e.switchPinSize,height:e.switchPinSize,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:e.colorWhite,borderRadius:e.switchPinSize/2,boxShadow:e.switchHandleShadow,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${n}`]:{insetInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding}px)`},[`&:not(${t}-disabled):active`]:{[`${n}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${n}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},vPe=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[n]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:e.switchInnerMarginMax,paddingInlineEnd:e.switchInnerMarginMin,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${n}-checked, ${n}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none"},[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${n}`]:{paddingInlineStart:e.switchInnerMarginMin,paddingInlineEnd:e.switchInnerMarginMax,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.switchPadding*2,marginInlineEnd:-e.switchPadding*2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.switchPadding*2,marginInlineEnd:e.switchPadding*2}}}}}},mPe=e=>{const{componentCls:t}=e;return{[t]:S(S(S(S({},vt(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:e.switchMinWidth,height:e.switchHeight,lineHeight:`${e.switchHeight}px`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),Sl(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},bPe=pt("Switch",e=>{const t=e.fontSize*e.lineHeight,n=e.controlHeight/2,o=2,r=t-o*2,i=n-o*2,a=nt(e,{switchMinWidth:r*2+o*4,switchHeight:t,switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchInnerMarginMin:r/2,switchInnerMarginMax:r+o+o*2,switchPadding:o,switchPinSize:r,switchBg:e.colorBgContainer,switchMinWidthSM:i*2+o*2,switchHeightSM:n,switchInnerMarginMinSM:i/2,switchInnerMarginMaxSM:i+o+o*2,switchPinSizeSM:i,switchHandleShadow:`0 2px 4px 0 ${new Zt("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:e.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[mPe(a),vPe(a),gPe(a),hPe(a),pPe(a)]}),yPe=Go("small","default"),SPe=()=>({id:String,prefixCls:String,size:Z.oneOf(yPe),disabled:{type:Boolean,default:void 0},checkedChildren:Z.any,unCheckedChildren:Z.any,tabindex:Z.oneOfType([Z.string,Z.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:Z.oneOfType([Z.string,Z.number,Z.looseBool]),checkedValue:Z.oneOfType([Z.string,Z.number,Z.looseBool]).def(!0),unCheckedValue:Z.oneOfType([Z.string,Z.number,Z.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}),CPe=pe({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:SPe(),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;const a=co(),l=jr(),s=M(()=>{var E;return(E=e.disabled)!==null&&E!==void 0?E:l.value});Dh(()=>{Sn(),Sn()});const c=he(e.checked!==void 0?e.checked:n.defaultChecked),u=M(()=>c.value===e.checkedValue);Ie(()=>e.checked,()=>{c.value=e.checked});const{prefixCls:d,direction:f,size:h}=Ve("switch",e),[m,v]=bPe(d),y=he(),b=()=>{var E;(E=y.value)===null||E===void 0||E.focus()};r({focus:b,blur:()=>{var E;(E=y.value)===null||E===void 0||E.blur()}}),lt(()=>{wt(()=>{e.autofocus&&!s.value&&y.value.focus()})});const x=(E,R)=>{s.value||(i("update:checked",E),i("change",E,R),a.onFieldChange())},_=E=>{i("blur",E)},w=E=>{b();const R=u.value?e.unCheckedValue:e.checkedValue;x(R,E),i("click",R,E)},I=E=>{E.keyCode===Fe.LEFT?x(e.unCheckedValue,E):E.keyCode===Fe.RIGHT&&x(e.checkedValue,E),i("keydown",E)},O=E=>{var R;(R=y.value)===null||R===void 0||R.blur(),i("mouseup",E)},P=M(()=>({[`${d.value}-small`]:h.value==="small",[`${d.value}-loading`]:e.loading,[`${d.value}-checked`]:u.value,[`${d.value}-disabled`]:s.value,[d.value]:!0,[`${d.value}-rtl`]:f.value==="rtl",[v.value]:!0}));return()=>{var E;return m(g(Y_,null,{default:()=>[g("button",V(V(V({},_t(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),n),{},{id:(E=e.id)!==null&&E!==void 0?E:a.id.value,onKeydown:I,onClick:w,onBlur:_,onMouseup:O,type:"button",role:"switch","aria-checked":c.value,disabled:s.value||e.loading,class:[n.class,P.value],ref:y}),[g("div",{class:`${d.value}-handle`},[e.loading?g(di,{class:`${d.value}-loading-icon`},null):null]),g("span",{class:`${d.value}-inner`},[g("span",{class:`${d.value}-inner-checked`},[lo(o,e,"checkedChildren")]),g("span",{class:`${d.value}-inner-unchecked`},[lo(o,e,"unCheckedChildren")])])])]}))}}}),$Pe=$n(CPe),$z=Symbol("TableContextProps"),xPe=e=>{ft($z,e)},Ha=()=>it($z,{}),wPe="RC_TABLE_KEY";function xz(e){return e==null?[]:Array.isArray(e)?e:[e]}function wz(e,t){if(!t&&typeof t!="number")return e;const n=xz(t);let o=e;for(let r=0;r{const{key:r,dataIndex:i}=o||{};let a=r||xz(i).join("-")||wPe;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function _Pe(){const e={};function t(i,a){a&&Object.keys(a).forEach(l=>{const s=a[l];s&&typeof s=="object"?(i[l]=i[l]||{},t(i[l],s)):i[l]=s})}for(var n=arguments.length,o=new Array(n),r=0;r{t(e,i)}),e}function tw(e){return e!=null}const _z=Symbol("SlotsContextProps"),OPe=e=>{ft(_z,e)},AI=()=>it(_z,M(()=>({}))),Oz=Symbol("ContextProps"),IPe=e=>{ft(Oz,e)},PPe=()=>it(Oz,{onResizeColumn:()=>{}}),md="RC_TABLE_INTERNAL_COL_DEFINE",Iz=Symbol("HoverContextProps"),TPe=e=>{ft(Iz,e)},EPe=()=>it(Iz,{startRow:ve(-1),endRow:ve(-1),onHover(){}}),nw=ve(!1),APe=()=>{lt(()=>{nw.value=nw.value||zO("position","sticky")})},MPe=()=>nw;var RPe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r=n}function LPe(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!mo(e)}const Gy=pe({name:"Cell",props:["prefixCls","record","index","renderIndex","dataIndex","customRender","component","colSpan","rowSpan","fixLeft","fixRight","firstFixLeft","lastFixLeft","firstFixRight","lastFixRight","appendNode","additionalProps","ellipsis","align","rowType","isSticky","column","cellType","transformCellText"],setup(e,t){let{slots:n}=t;const o=AI(),{onHover:r,startRow:i,endRow:a}=EPe(),l=M(()=>{var m,v,y,b;return(y=(m=e.colSpan)!==null&&m!==void 0?m:(v=e.additionalProps)===null||v===void 0?void 0:v.colSpan)!==null&&y!==void 0?y:(b=e.additionalProps)===null||b===void 0?void 0:b.colspan}),s=M(()=>{var m,v,y,b;return(y=(m=e.rowSpan)!==null&&m!==void 0?m:(v=e.additionalProps)===null||v===void 0?void 0:v.rowSpan)!==null&&y!==void 0?y:(b=e.additionalProps)===null||b===void 0?void 0:b.rowspan}),c=ai(()=>{const{index:m}=e;return DPe(m,s.value||1,i.value,a.value)}),u=MPe(),d=(m,v)=>{var y;const{record:b,index:$,additionalProps:x}=e;b&&r($,$+v-1),(y=x==null?void 0:x.onMouseenter)===null||y===void 0||y.call(x,m)},f=m=>{var v;const{record:y,additionalProps:b}=e;y&&r(-1,-1),(v=b==null?void 0:b.onMouseleave)===null||v===void 0||v.call(b,m)},h=m=>{const v=_n(m)[0];return mo(v)?v.type===_l?v.children:Array.isArray(v.children)?h(v.children):void 0:v};return()=>{var m,v,y,b,$,x;const{prefixCls:_,record:w,index:I,renderIndex:O,dataIndex:P,customRender:E,component:R="td",fixLeft:A,fixRight:N,firstFixLeft:F,lastFixLeft:W,firstFixRight:D,lastFixRight:B,appendNode:k=(m=n.appendNode)===null||m===void 0?void 0:m.call(n),additionalProps:L={},ellipsis:z,align:K,rowType:G,isSticky:Y,column:ne={},cellType:re}=e,J=`${_}-cell`;let te,ee;const fe=(v=n.default)===null||v===void 0?void 0:v.call(n);if(tw(fe)||re==="header")ee=fe;else{const Pe=wz(w,P);if(ee=Pe,E){const oe=E({text:Pe,value:Pe,record:w,index:I,renderIndex:O,column:ne.__originColumn__});LPe(oe)?(ee=oe.children,te=oe.props):ee=oe}if(!(md in ne)&&re==="body"&&o.value.bodyCell&&!(!((y=ne.slots)===null||y===void 0)&&y.customRender)){const oe=Gb(o.value,"bodyCell",{text:Pe,value:Pe,record:w,index:I,column:ne.__originColumn__},()=>{const le=ee===void 0?Pe:ee;return[typeof le=="object"&&Jn(le)||typeof le!="object"?le:null]});ee=ln(oe)}e.transformCellText&&(ee=e.transformCellText({text:ee,record:w,index:I,column:ne.__originColumn__}))}typeof ee=="object"&&!Array.isArray(ee)&&!mo(ee)&&(ee=null),z&&(W||D)&&(ee=g("span",{class:`${J}-content`},[ee])),Array.isArray(ee)&&ee.length===1&&(ee=ee[0]);const ie=te||{},{colSpan:X,rowSpan:ue,style:ye,class:H}=ie,j=RPe(ie,["colSpan","rowSpan","style","class"]),q=(b=X!==void 0?X:l.value)!==null&&b!==void 0?b:1,se=($=ue!==void 0?ue:s.value)!==null&&$!==void 0?$:1;if(q===0||se===0)return null;const ae={},ge=typeof A=="number"&&u.value,Se=typeof N=="number"&&u.value;ge&&(ae.position="sticky",ae.left=`${A}px`),Se&&(ae.position="sticky",ae.right=`${N}px`);const $e={};K&&($e.textAlign=K);let _e;const be=z===!0?{showTitle:!0}:z;be&&(be.showTitle||G==="header")&&(typeof ee=="string"||typeof ee=="number"?_e=ee.toString():mo(ee)&&(_e=h([ee])));const Te=S(S(S({title:_e},j),L),{colSpan:q!==1?q:null,rowSpan:se!==1?se:null,class:me(J,{[`${J}-fix-left`]:ge&&u.value,[`${J}-fix-left-first`]:F&&u.value,[`${J}-fix-left-last`]:W&&u.value,[`${J}-fix-right`]:Se&&u.value,[`${J}-fix-right-first`]:D&&u.value,[`${J}-fix-right-last`]:B&&u.value,[`${J}-ellipsis`]:z,[`${J}-with-append`]:k,[`${J}-fix-sticky`]:(ge||Se)&&Y&&u.value,[`${J}-row-hover`]:!te&&c.value},L.class,H),onMouseenter:Pe=>{d(Pe,se)},onMouseleave:f,style:[L.style,$e,ae,ye]});return g(R,Te,{default:()=>[k,ee,(x=n.dragHandle)===null||x===void 0?void 0:x.call(n)]})}}});function MI(e,t,n,o,r){const i=n[e]||{},a=n[t]||{};let l,s;i.fixed==="left"?l=o.left[e]:a.fixed==="right"&&(s=o.right[t]);let c=!1,u=!1,d=!1,f=!1;const h=n[t+1],m=n[e-1];return r==="rtl"?l!==void 0?f=!(m&&m.fixed==="left"):s!==void 0&&(d=!(h&&h.fixed==="right")):l!==void 0?c=!(h&&h.fixed==="left"):s!==void 0&&(u=!(m&&m.fixed==="right")),{fixLeft:l,fixRight:s,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:f,isSticky:o.isSticky}}const L8={mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"},touch:{start:"touchstart",move:"touchmove",stop:"touchend"}},N8=50,NPe=pe({compatConfig:{MODE:3},name:"DragHandle",props:{prefixCls:String,width:{type:Number,required:!0},minWidth:{type:Number,default:N8},maxWidth:{type:Number,default:1/0},column:{type:Object,default:void 0}},setup(e){let t=0,n={remove:()=>{}},o={remove:()=>{}};const r=()=>{n.remove(),o.remove()};Fo(()=>{r()}),ct(()=>{pn(!isNaN(e.width),"Table","width must be a number when use resizable")});const{onResizeColumn:i}=PPe(),a=M(()=>typeof e.minWidth=="number"&&!isNaN(e.minWidth)?e.minWidth:N8),l=M(()=>typeof e.maxWidth=="number"&&!isNaN(e.maxWidth)?e.maxWidth:1/0),s=Nn();let c=0;const u=ve(!1);let d;const f=x=>{let _=0;x.touches?x.touches.length?_=x.touches[0].pageX:_=x.changedTouches[0].pageX:_=x.pageX;const w=t-_;let I=Math.max(c-w,a.value);I=Math.min(I,l.value),mt.cancel(d),d=mt(()=>{i(I,e.column.__originColumn__)})},h=x=>{f(x)},m=x=>{u.value=!1,f(x),r()},v=(x,_)=>{u.value=!0,r(),c=s.vnode.el.parentNode.getBoundingClientRect().width,!(x instanceof MouseEvent&&x.which!==1)&&(x.stopPropagation&&x.stopPropagation(),t=x.touches?x.touches[0].pageX:x.pageX,n=wn(document.documentElement,_.move,h),o=wn(document.documentElement,_.stop,m))},y=x=>{x.stopPropagation(),x.preventDefault(),v(x,L8.mouse)},b=x=>{x.stopPropagation(),x.preventDefault(),v(x,L8.touch)},$=x=>{x.stopPropagation(),x.preventDefault()};return()=>{const{prefixCls:x}=e,_={[fo?"onTouchstartPassive":"onTouchstart"]:w=>b(w)};return g("div",V(V({class:`${x}-resize-handle ${u.value?"dragging":""}`,onMousedown:y},_),{},{onClick:$}),[g("div",{class:`${x}-resize-handle-line`},null)])}}}),kPe=pe({name:"HeaderRow",props:["cells","stickyOffsets","flattenColumns","rowComponent","cellComponent","index","customHeaderRow"],setup(e){const t=Ha();return()=>{const{prefixCls:n,direction:o}=t,{cells:r,stickyOffsets:i,flattenColumns:a,rowComponent:l,cellComponent:s,customHeaderRow:c,index:u}=e;let d;c&&(d=c(r.map(h=>h.column),u));const f=Uy(r.map(h=>h.column));return g(l,d,{default:()=>[r.map((h,m)=>{const{column:v}=h,y=MI(h.colStart,h.colEnd,a,i,o);let b;v&&v.customHeaderCell&&(b=h.column.customHeaderCell(v));const $=v;return g(Gy,V(V(V({},h),{},{cellType:"header",ellipsis:v.ellipsis,align:v.align,component:s,prefixCls:n,key:f[m]},y),{},{additionalProps:b,rowType:"header",column:v}),{default:()=>v.title,dragHandle:()=>$.resizable?g(NPe,{prefixCls:n,width:$.width,minWidth:$.minWidth,maxWidth:$.maxWidth,column:$},null):null})})]})}}});function BPe(e){const t=[];function n(r,i){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[a]=t[a]||[];let l=i;return r.filter(Boolean).map(c=>{const u={key:c.key,class:me(c.className,c.class),column:c,colStart:l};let d=1;const f=c.children;return f&&f.length>0&&(d=n(f,l,a+1).reduce((h,m)=>h+m,0),u.hasSubColumns=!0),"colSpan"in c&&({colSpan:d}=c),"rowSpan"in c&&(u.rowSpan=c.rowSpan),u.colSpan=d,u.colEnd=u.colStart+d-1,t[a].push(u),l+=d,d})}n(e,0);const o=t.length;for(let r=0;r{!("rowSpan"in i)&&!i.hasSubColumns&&(i.rowSpan=o-r)});return t}const k8=pe({name:"TableHeader",inheritAttrs:!1,props:["columns","flattenColumns","stickyOffsets","customHeaderRow"],setup(e){const t=Ha(),n=M(()=>BPe(e.columns));return()=>{const{prefixCls:o,getComponent:r}=t,{stickyOffsets:i,flattenColumns:a,customHeaderRow:l}=e,s=r(["header","wrapper"],"thead"),c=r(["header","row"],"tr"),u=r(["header","cell"],"th");return g(s,{class:`${o}-thead`},{default:()=>[n.value.map((d,f)=>g(kPe,{key:f,flattenColumns:a,cells:d,stickyOffsets:i,rowComponent:c,cellComponent:u,customHeaderRow:l,index:f},null))]})}}}),Pz=Symbol("ExpandedRowProps"),FPe=e=>{ft(Pz,e)},HPe=()=>it(Pz,{}),Tz=pe({name:"ExpandedRow",inheritAttrs:!1,props:["prefixCls","component","cellComponent","expanded","colSpan","isEmpty"],setup(e,t){let{slots:n,attrs:o}=t;const r=Ha(),i=HPe(),{fixHeader:a,fixColumn:l,componentWidth:s,horizonScroll:c}=i;return()=>{const{prefixCls:u,component:d,cellComponent:f,expanded:h,colSpan:m,isEmpty:v}=e;return g(d,{class:o.class,style:{display:h?null:"none"}},{default:()=>[g(Gy,{component:f,prefixCls:u,colSpan:m},{default:()=>{var y;let b=(y=n.default)===null||y===void 0?void 0:y.call(n);return(v?c.value:l.value)&&(b=g("div",{style:{width:`${s.value-(a.value?r.scrollbarSize:0)}px`,position:"sticky",left:0,overflow:"hidden"},class:`${u}-expanded-row-fixed`},[b])),b}})]})}}}),zPe=pe({name:"MeasureCell",props:["columnKey"],setup(e,t){let{emit:n}=t;const o=he();return lt(()=>{o.value&&n("columnResize",e.columnKey,o.value.offsetWidth)}),()=>g(ki,{onResize:r=>{let{offsetWidth:i}=r;n("columnResize",e.columnKey,i)}},{default:()=>[g("td",{ref:o,style:{padding:0,border:0,height:0}},[g("div",{style:{height:0,overflow:"hidden"}},[Do(" ")])])]})}}),Ez=Symbol("BodyContextProps"),jPe=e=>{ft(Ez,e)},Az=()=>it(Ez,{}),WPe=pe({name:"BodyRow",inheritAttrs:!1,props:["record","index","renderIndex","recordKey","expandedKeys","rowComponent","cellComponent","customRow","rowExpandable","indent","rowKey","getRowKey","childrenColumnName"],setup(e,t){let{attrs:n}=t;const o=Ha(),r=Az(),i=ve(!1),a=M(()=>e.expandedKeys&&e.expandedKeys.has(e.recordKey));ct(()=>{a.value&&(i.value=!0)});const l=M(()=>r.expandableType==="row"&&(!e.rowExpandable||e.rowExpandable(e.record))),s=M(()=>r.expandableType==="nest"),c=M(()=>e.childrenColumnName&&e.record&&e.record[e.childrenColumnName]),u=M(()=>l.value||s.value),d=(y,b)=>{r.onTriggerExpand(y,b)},f=M(()=>{var y;return((y=e.customRow)===null||y===void 0?void 0:y.call(e,e.record,e.index))||{}}),h=function(y){var b,$;r.expandRowByClick&&u.value&&d(e.record,y);for(var x=arguments.length,_=new Array(x>1?x-1:0),w=1;w{const{record:y,index:b,indent:$}=e,{rowClassName:x}=r;return typeof x=="string"?x:typeof x=="function"?x(y,b,$):""}),v=M(()=>Uy(r.flattenColumns));return()=>{const{class:y,style:b}=n,{record:$,index:x,rowKey:_,indent:w=0,rowComponent:I,cellComponent:O}=e,{prefixCls:P,fixedInfoList:E,transformCellText:R}=o,{flattenColumns:A,expandedRowClassName:N,indentSize:F,expandIcon:W,expandedRowRender:D,expandIconColumnIndex:B}=r,k=g(I,V(V({},f.value),{},{"data-row-key":_,class:me(y,`${P}-row`,`${P}-row-level-${w}`,m.value,f.value.class),style:[b,f.value.style],onClick:h}),{default:()=>[A.map((z,K)=>{const{customRender:G,dataIndex:Y,className:ne}=z,re=v[K],J=E[K];let te;z.customCell&&(te=z.customCell($,x,z));const ee=K===(B||0)&&s.value?g(Je,null,[g("span",{style:{paddingLeft:`${F*w}px`},class:`${P}-row-indent indent-level-${w}`},null),W({prefixCls:P,expanded:a.value,expandable:c.value,record:$,onExpand:d})]):null;return g(Gy,V(V({cellType:"body",class:ne,ellipsis:z.ellipsis,align:z.align,component:O,prefixCls:P,key:re,record:$,index:x,renderIndex:e.renderIndex,dataIndex:Y,customRender:G},J),{},{additionalProps:te,column:z,transformCellText:R,appendNode:ee}),null)})]});let L;if(l.value&&(i.value||a.value)){const z=D({record:$,index:x,indent:w+1,expanded:a.value}),K=N&&N($,x,w);L=g(Tz,{expanded:a.value,class:me(`${P}-expanded-row`,`${P}-expanded-row-level-${w+1}`,K),prefixCls:P,component:I,cellComponent:O,colSpan:A.length,isEmpty:!1},{default:()=>[z]})}return g(Je,null,[k,L])}}});function Mz(e,t,n,o,r,i){const a=[];a.push({record:e,indent:t,index:i});const l=r(e),s=o==null?void 0:o.has(l);if(e&&Array.isArray(e[n])&&s)for(let c=0;c{const i=t.value,a=n.value,l=e.value;if(a!=null&&a.size){const s=[];for(let c=0;c<(l==null?void 0:l.length);c+=1){const u=l[c];s.push(...Mz(u,0,i,a,o.value,c))}return s}return l==null?void 0:l.map((s,c)=>({record:s,indent:0,index:c}))})}const Rz=Symbol("ResizeContextProps"),KPe=e=>{ft(Rz,e)},UPe=()=>it(Rz,{onColumnResize:()=>{}}),GPe=pe({name:"TableBody",props:["data","getRowKey","measureColumnWidth","expandedKeys","customRow","rowExpandable","childrenColumnName"],setup(e,t){let{slots:n}=t;const o=UPe(),r=Ha(),i=Az(),a=VPe(st(e,"data"),st(e,"childrenColumnName"),st(e,"expandedKeys"),st(e,"getRowKey")),l=ve(-1),s=ve(-1);let c;return TPe({startRow:l,endRow:s,onHover:(u,d)=>{clearTimeout(c),c=setTimeout(()=>{l.value=u,s.value=d},100)}}),()=>{var u;const{data:d,getRowKey:f,measureColumnWidth:h,expandedKeys:m,customRow:v,rowExpandable:y,childrenColumnName:b}=e,{onColumnResize:$}=o,{prefixCls:x,getComponent:_}=r,{flattenColumns:w}=i,I=_(["body","wrapper"],"tbody"),O=_(["body","row"],"tr"),P=_(["body","cell"],"td");let E;d.length?E=a.value.map((A,N)=>{const{record:F,indent:W,index:D}=A,B=f(F,N);return g(WPe,{key:B,rowKey:B,record:F,recordKey:B,index:N,renderIndex:D,rowComponent:O,cellComponent:P,expandedKeys:m,customRow:v,getRowKey:f,rowExpandable:y,childrenColumnName:b,indent:W},null)}):E=g(Tz,{expanded:!0,class:`${x}-placeholder`,prefixCls:x,component:O,cellComponent:P,colSpan:w.length,isEmpty:!0},{default:()=>[(u=n.emptyNode)===null||u===void 0?void 0:u.call(n)]});const R=Uy(w);return g(I,{class:`${x}-tbody`},{default:()=>[h&&g("tr",{"aria-hidden":"true",class:`${x}-measure-row`,style:{height:0,fontSize:0}},[R.map(A=>g(zPe,{key:A,columnKey:A,onColumnResize:$},null))]),E]})}}}),as={};var YPe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{fixed:o}=n,r=o===!0?"left":o,i=n.children;return i&&i.length>0?[...t,...ow(i).map(a=>S({fixed:r},a))]:[...t,S(S({},n),{fixed:r})]},[])}function XPe(e){return e.map(t=>{const{fixed:n}=t,o=YPe(t,["fixed"]);let r=n;return n==="left"?r="right":n==="right"&&(r="left"),S({fixed:r},o)})}function qPe(e,t){let{prefixCls:n,columns:o,expandable:r,expandedKeys:i,getRowKey:a,onTriggerExpand:l,expandIcon:s,rowExpandable:c,expandIconColumnIndex:u,direction:d,expandRowByClick:f,expandColumnWidth:h,expandFixed:m}=e;const v=AI(),y=M(()=>{if(r.value){let x=o.value.slice();if(!x.includes(as)){const F=u.value||0;F>=0&&x.splice(F,0,as)}const _=x.indexOf(as);x=x.filter((F,W)=>F!==as||W===_);const w=o.value[_];let I;(m.value==="left"||m.value)&&!u.value?I="left":(m.value==="right"||m.value)&&u.value===o.value.length?I="right":I=w?w.fixed:null;const O=i.value,P=c.value,E=s.value,R=n.value,A=f.value,N={[md]:{class:`${n.value}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:Gb(v.value,"expandColumnTitle",{},()=>[""]),fixed:I,class:`${n.value}-row-expand-icon-cell`,width:h.value,customRender:F=>{let{record:W,index:D}=F;const B=a.value(W,D),k=O.has(B),L=P?P(W):!0,z=E({prefixCls:R,expanded:k,expandable:L,record:W,onExpand:l});return A?g("span",{onClick:K=>K.stopPropagation()},[z]):z}};return x.map(F=>F===as?N:F)}return o.value.filter(x=>x!==as)}),b=M(()=>{let x=y.value;return t.value&&(x=t.value(x)),x.length||(x=[{customRender:()=>null}]),x}),$=M(()=>d.value==="rtl"?XPe(ow(b.value)):ow(b.value));return[b,$]}function Dz(e){const t=ve(e);let n;const o=ve([]);function r(i){o.value.push(i),mt.cancel(n),n=mt(()=>{const a=o.value;o.value=[],a.forEach(l=>{t.value=l(t.value)})})}return Ct(()=>{mt.cancel(n)}),[t,r]}function ZPe(e){const t=he(e||null),n=he();function o(){clearTimeout(n.value)}function r(a){t.value=a,o(),n.value=setTimeout(()=>{t.value=null,n.value=void 0},100)}function i(){return t.value}return Ct(()=>{o()}),[r,i]}function QPe(e,t,n){return M(()=>{const r=[],i=[];let a=0,l=0;const s=e.value,c=t.value,u=n.value;for(let d=0;d=0;l-=1){const s=t[l],c=n&&n[l],u=c&&c[md];if(s||u||a){const d=u||{},f=JPe(d,["columnType"]);r.unshift(g("col",V({key:l,style:{width:typeof s=="number"?`${s}px`:s}},f),null)),a=!0}}return g("colgroup",null,[r])}function rw(e,t){let{slots:n}=t;var o;return g("div",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])}rw.displayName="Panel";let eTe=0;const tTe=pe({name:"TableSummary",props:["fixed"],setup(e,t){let{slots:n}=t;const o=Ha(),r=`table-summary-uni-key-${++eTe}`,i=M(()=>e.fixed===""||e.fixed);return ct(()=>{o.summaryCollect(r,i.value)}),Ct(()=>{o.summaryCollect(r,!1)}),()=>{var a;return(a=n.default)===null||a===void 0?void 0:a.call(n)}}}),nTe=tTe,oTe=pe({compatConfig:{MODE:3},name:"ATableSummaryRow",setup(e,t){let{slots:n}=t;return()=>{var o;return g("tr",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])}}}),Nz=Symbol("SummaryContextProps"),rTe=e=>{ft(Nz,e)},iTe=()=>it(Nz,{}),aTe=pe({name:"ATableSummaryCell",props:["index","colSpan","rowSpan","align"],setup(e,t){let{attrs:n,slots:o}=t;const r=Ha(),i=iTe();return()=>{const{index:a,colSpan:l=1,rowSpan:s,align:c}=e,{prefixCls:u,direction:d}=r,{scrollColumnIndex:f,stickyOffsets:h,flattenColumns:m}=i,y=a+l-1+1===f?l+1:l,b=MI(a,a+y-1,m,h,d);return g(Gy,V({class:n.class,index:a,component:"td",prefixCls:u,record:null,dataIndex:null,align:c,colSpan:y,rowSpan:s,customRender:()=>{var $;return($=o.default)===null||$===void 0?void 0:$.call(o)}},b),null)}}}),Hv=pe({name:"TableFooter",inheritAttrs:!1,props:["stickyOffsets","flattenColumns"],setup(e,t){let{slots:n}=t;const o=Ha();return rTe(St({stickyOffsets:st(e,"stickyOffsets"),flattenColumns:st(e,"flattenColumns"),scrollColumnIndex:M(()=>{const r=e.flattenColumns.length-1,i=e.flattenColumns[r];return i!=null&&i.scrollbar?r:null})})),()=>{var r;const{prefixCls:i}=o;return g("tfoot",{class:`${i}-summary`},[(r=n.default)===null||r===void 0?void 0:r.call(n)])}}}),lTe=nTe;function sTe(e){let{prefixCls:t,record:n,onExpand:o,expanded:r,expandable:i}=e;const a=`${t}-row-expand-icon`;if(!i)return g("span",{class:[a,`${t}-row-spaced`]},null);const l=s=>{o(n,s),s.stopPropagation()};return g("span",{class:{[a]:!0,[`${t}-row-expanded`]:r,[`${t}-row-collapsed`]:!r},onClick:l},null)}function cTe(e,t,n){const o=[];function r(i){(i||[]).forEach((a,l)=>{o.push(t(a,l)),r(a[n])})}return r(e),o}const uTe=pe({name:"StickyScrollBar",inheritAttrs:!1,props:["offsetScroll","container","scrollBodyRef","scrollBodySizeInfo"],emits:["scroll"],setup(e,t){let{emit:n,expose:o}=t;const r=Ha(),i=ve(0),a=ve(0),l=ve(0);ct(()=>{i.value=e.scrollBodySizeInfo.scrollWidth||0,a.value=e.scrollBodySizeInfo.clientWidth||0,l.value=i.value&&a.value*(a.value/i.value)},{flush:"post"});const s=ve(),[c,u]=Dz({scrollLeft:0,isHiddenScrollBar:!0}),d=he({delta:0,x:0}),f=ve(!1),h=()=>{f.value=!1},m=O=>{d.value={delta:O.pageX-c.value.scrollLeft,x:0},f.value=!0,O.preventDefault()},v=O=>{const{buttons:P}=O||(window==null?void 0:window.event);if(!f.value||P===0){f.value&&(f.value=!1);return}let E=d.value.x+O.pageX-d.value.x-d.value.delta;E<=0&&(E=0),E+l.value>=a.value&&(E=a.value-l.value),n("scroll",{scrollLeft:E/a.value*(i.value+2)}),d.value.x=O.pageX},y=()=>{if(!e.scrollBodyRef.value)return;const O=U0(e.scrollBodyRef.value).top,P=O+e.scrollBodyRef.value.offsetHeight,E=e.container===window?document.documentElement.scrollTop+window.innerHeight:U0(e.container).top+e.container.clientHeight;P-h0()<=E||O>=E-e.offsetScroll?u(R=>S(S({},R),{isHiddenScrollBar:!0})):u(R=>S(S({},R),{isHiddenScrollBar:!1}))};o({setScrollLeft:O=>{u(P=>S(S({},P),{scrollLeft:O/i.value*a.value||0}))}});let $=null,x=null,_=null,w=null;lt(()=>{$=wn(document.body,"mouseup",h,!1),x=wn(document.body,"mousemove",v,!1),_=wn(window,"resize",y,!1)}),Pb(()=>{wt(()=>{y()})}),lt(()=>{setTimeout(()=>{Ie([l,f],()=>{y()},{immediate:!0,flush:"post"})})}),Ie(()=>e.container,()=>{w==null||w.remove(),w=wn(e.container,"scroll",y,!1)},{immediate:!0,flush:"post"}),Ct(()=>{$==null||$.remove(),x==null||x.remove(),w==null||w.remove(),_==null||_.remove()}),Ie(()=>S({},c.value),(O,P)=>{O.isHiddenScrollBar!==(P==null?void 0:P.isHiddenScrollBar)&&!O.isHiddenScrollBar&&u(E=>{const R=e.scrollBodyRef.value;return R?S(S({},E),{scrollLeft:R.scrollLeft/R.scrollWidth*R.clientWidth}):E})},{immediate:!0});const I=h0();return()=>{if(i.value<=a.value||!l.value||c.value.isHiddenScrollBar)return null;const{prefixCls:O}=r;return g("div",{style:{height:`${I}px`,width:`${a.value}px`,bottom:`${e.offsetScroll}px`},class:`${O}-sticky-scroll`},[g("div",{onMousedown:m,ref:s,class:me(`${O}-sticky-scroll-bar`,{[`${O}-sticky-scroll-bar-active`]:f.value}),style:{width:`${l.value}px`,transform:`translate3d(${c.value.scrollLeft}px, 0, 0)`}},null)])}}}),B8=ur()?window:null;function dTe(e,t){return M(()=>{const{offsetHeader:n=0,offsetSummary:o=0,offsetScroll:r=0,getContainer:i=()=>B8}=typeof e.value=="object"?e.value:{},a=i()||B8,l=!!e.value;return{isSticky:l,stickyClassName:l?`${t.value}-sticky-holder`:"",offsetHeader:n,offsetSummary:o,offsetScroll:r,container:a}})}function fTe(e,t){return M(()=>{const n=[],o=e.value,r=t.value;for(let i=0;ii.isSticky&&!e.fixHeader?0:i.scrollbarSize),l=he(),s=v=>{const{currentTarget:y,deltaX:b}=v;b&&(r("scroll",{currentTarget:y,scrollLeft:y.scrollLeft+b}),v.preventDefault())},c=he();lt(()=>{wt(()=>{c.value=wn(l.value,"wheel",s)})}),Ct(()=>{var v;(v=c.value)===null||v===void 0||v.remove()});const u=M(()=>e.flattenColumns.every(v=>v.width&&v.width!==0&&v.width!=="0px")),d=he([]),f=he([]);ct(()=>{const v=e.flattenColumns[e.flattenColumns.length-1],y={fixed:v?v.fixed:null,scrollbar:!0,customHeaderCell:()=>({class:`${i.prefixCls}-cell-scrollbar`})};d.value=a.value?[...e.columns,y]:e.columns,f.value=a.value?[...e.flattenColumns,y]:e.flattenColumns});const h=M(()=>{const{stickyOffsets:v,direction:y}=e,{right:b,left:$}=v;return S(S({},v),{left:y==="rtl"?[...$.map(x=>x+a.value),0]:$,right:y==="rtl"?b:[...b.map(x=>x+a.value),0],isSticky:i.isSticky})}),m=fTe(st(e,"colWidths"),st(e,"columCount"));return()=>{var v;const{noData:y,columCount:b,stickyTopOffset:$,stickyBottomOffset:x,stickyClassName:_,maxContentScroll:w}=e,{isSticky:I}=i;return g("div",{style:S({overflow:"hidden"},I?{top:`${$}px`,bottom:`${x}px`}:{}),ref:l,class:me(n.class,{[_]:!!_})},[g("table",{style:{tableLayout:"fixed",visibility:y||m.value?null:"hidden"}},[(!y||!w||u.value)&&g(Lz,{colWidths:m.value?[...m.value,a.value]:[],columCount:b+1,columns:f.value},null),(v=o.default)===null||v===void 0?void 0:v.call(o,S(S({},e),{stickyOffsets:h.value,columns:d.value,flattenColumns:f.value}))])])}}});function H8(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o[r,st(e,r)])))}const pTe=[],hTe={},iw="rc-table-internal-hook",gTe=pe({name:"VcTable",inheritAttrs:!1,props:["prefixCls","data","columns","rowKey","tableLayout","scroll","rowClassName","title","footer","id","showHeader","components","customRow","customHeaderRow","direction","expandFixed","expandColumnWidth","expandedRowKeys","defaultExpandedRowKeys","expandedRowRender","expandRowByClick","expandIcon","onExpand","onExpandedRowsChange","onUpdate:expandedRowKeys","defaultExpandAllRows","indentSize","expandIconColumnIndex","expandedRowClassName","childrenColumnName","rowExpandable","sticky","transformColumns","internalHooks","internalRefs","canExpandable","onUpdateInternalRefs","transformCellText"],emits:["expand","expandedRowsChange","updateInternalRefs","update:expandedRowKeys"],setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=M(()=>e.data||pTe),a=M(()=>!!i.value.length),l=M(()=>_Pe(e.components,{})),s=(le,xe)=>wz(l.value,le)||xe,c=M(()=>{const le=e.rowKey;return typeof le=="function"?le:xe=>xe&&xe[le]}),u=M(()=>e.expandIcon||sTe),d=M(()=>e.childrenColumnName||"children"),f=M(()=>e.expandedRowRender?"row":e.canExpandable||i.value.some(le=>le&&typeof le=="object"&&le[d.value])?"nest":!1),h=ve([]);ct(()=>{e.defaultExpandedRowKeys&&(h.value=e.defaultExpandedRowKeys),e.defaultExpandAllRows&&(h.value=cTe(i.value,c.value,d.value))})();const v=M(()=>new Set(e.expandedRowKeys||h.value||[])),y=le=>{const xe=c.value(le,i.value.indexOf(le));let Ae;const Be=v.value.has(xe);Be?(v.value.delete(xe),Ae=[...v.value]):Ae=[...v.value,xe],h.value=Ae,r("expand",!Be,le),r("update:expandedRowKeys",Ae),r("expandedRowsChange",Ae)},b=he(0),[$,x]=qPe(S(S({},oa(e)),{expandable:M(()=>!!e.expandedRowRender),expandedKeys:v,getRowKey:c,onTriggerExpand:y,expandIcon:u}),M(()=>e.internalHooks===iw?e.transformColumns:null)),_=M(()=>({columns:$.value,flattenColumns:x.value})),w=he(),I=he(),O=he(),P=he({scrollWidth:0,clientWidth:0}),E=he(),[R,A]=nn(!1),[N,F]=nn(!1),[W,D]=Dz(new Map),B=M(()=>Uy(x.value)),k=M(()=>B.value.map(le=>W.value.get(le))),L=M(()=>x.value.length),z=QPe(k,L,st(e,"direction")),K=M(()=>e.scroll&&tw(e.scroll.y)),G=M(()=>e.scroll&&tw(e.scroll.x)||!!e.expandFixed),Y=M(()=>G.value&&x.value.some(le=>{let{fixed:xe}=le;return xe})),ne=he(),re=dTe(st(e,"sticky"),st(e,"prefixCls")),J=St({}),te=M(()=>{const le=Object.values(J)[0];return(K.value||re.value.isSticky)&&le}),ee=(le,xe)=>{xe?J[le]=xe:delete J[le]},fe=he({}),ie=he({}),X=he({});ct(()=>{K.value&&(ie.value={overflowY:"scroll",maxHeight:uc(e.scroll.y)}),G.value&&(fe.value={overflowX:"auto"},K.value||(ie.value={overflowY:"hidden"}),X.value={width:e.scroll.x===!0?"auto":uc(e.scroll.x),minWidth:"100%"})});const ue=(le,xe)=>{Yb(w.value)&&D(Ae=>{if(Ae.get(le)!==xe){const Be=new Map(Ae);return Be.set(le,xe),Be}return Ae})},[ye,H]=ZPe(null);function j(le,xe){if(!xe)return;if(typeof xe=="function"){xe(le);return}const Ae=xe.$el||xe;Ae.scrollLeft!==le&&(Ae.scrollLeft=le)}const q=le=>{let{currentTarget:xe,scrollLeft:Ae}=le;var Be;const Ye=e.direction==="rtl",Re=typeof Ae=="number"?Ae:xe.scrollLeft,Le=xe||hTe;if((!H()||H()===Le)&&(ye(Le),j(Re,I.value),j(Re,O.value),j(Re,E.value),j(Re,(Be=ne.value)===null||Be===void 0?void 0:Be.setScrollLeft)),xe){const{scrollWidth:Ne,clientWidth:Ke}=xe;Ye?(A(-Re0)):(A(Re>0),F(Re{G.value&&O.value?q({currentTarget:O.value}):(A(!1),F(!1))};let ae;const ge=le=>{le!==b.value&&(se(),b.value=w.value?w.value.offsetWidth:le)},Se=le=>{let{width:xe}=le;if(clearTimeout(ae),b.value===0){ge(xe);return}ae=setTimeout(()=>{ge(xe)},100)};Ie([G,()=>e.data,()=>e.columns],()=>{G.value&&se()},{flush:"post"});const[$e,_e]=nn(0);APe(),lt(()=>{wt(()=>{var le,xe;se(),_e(fle(O.value).width),P.value={scrollWidth:((le=O.value)===null||le===void 0?void 0:le.scrollWidth)||0,clientWidth:((xe=O.value)===null||xe===void 0?void 0:xe.clientWidth)||0}})}),fr(()=>{wt(()=>{var le,xe;const Ae=((le=O.value)===null||le===void 0?void 0:le.scrollWidth)||0,Be=((xe=O.value)===null||xe===void 0?void 0:xe.clientWidth)||0;(P.value.scrollWidth!==Ae||P.value.clientWidth!==Be)&&(P.value={scrollWidth:Ae,clientWidth:Be})})}),ct(()=>{e.internalHooks===iw&&e.internalRefs&&e.onUpdateInternalRefs({body:O.value?O.value.$el||O.value:null})},{flush:"post"});const be=M(()=>e.tableLayout?e.tableLayout:Y.value?e.scroll.x==="max-content"?"auto":"fixed":K.value||re.value.isSticky||x.value.some(le=>{let{ellipsis:xe}=le;return xe})?"fixed":"auto"),Te=()=>{var le;return a.value?null:((le=o.emptyText)===null||le===void 0?void 0:le.call(o))||"No Data"};xPe(St(S(S({},oa(H8(e,"prefixCls","direction","transformCellText"))),{getComponent:s,scrollbarSize:$e,fixedInfoList:M(()=>x.value.map((le,xe)=>MI(xe,xe,x.value,z.value,e.direction))),isSticky:M(()=>re.value.isSticky),summaryCollect:ee}))),jPe(St(S(S({},oa(H8(e,"rowClassName","expandedRowClassName","expandRowByClick","expandedRowRender","expandIconColumnIndex","indentSize"))),{columns:$,flattenColumns:x,tableLayout:be,expandIcon:u,expandableType:f,onTriggerExpand:y}))),KPe({onColumnResize:ue}),FPe({componentWidth:b,fixHeader:K,fixColumn:Y,horizonScroll:G});const Pe=()=>g(GPe,{data:i.value,measureColumnWidth:K.value||G.value||re.value.isSticky,expandedKeys:v.value,rowExpandable:e.rowExpandable,getRowKey:c.value,customRow:e.customRow,childrenColumnName:d.value},{emptyNode:Te}),oe=()=>g(Lz,{colWidths:x.value.map(le=>{let{width:xe}=le;return xe}),columns:x.value},null);return()=>{var le;const{prefixCls:xe,scroll:Ae,tableLayout:Be,direction:Ye,title:Re=o.title,footer:Le=o.footer,id:Ne,showHeader:Ke,customHeaderRow:Ze}=e,{isSticky:Ue,offsetHeader:Xe,offsetSummary:xt,offsetScroll:Mt,stickyClassName:Ft,container:jt}=re.value,Yt=s(["table"],"table"),Vn=s(["body"]),Gn=(le=o.summary)===null||le===void 0?void 0:le.call(o,{pageData:i.value});let oo=()=>null;const kn={colWidths:k.value,columCount:x.value.length,stickyOffsets:z.value,customHeaderRow:Ze,fixHeader:K.value,scroll:Ae};if(K.value||Ue){let wr=()=>null;typeof Vn=="function"?(wr=()=>Vn(i.value,{scrollbarSize:$e.value,ref:O,onScroll:q}),kn.colWidths=x.value.map((Ao,za)=>{let{width:We}=Ao;const gt=za===$.value.length-1?We-$e.value:We;return typeof gt=="number"&&!Number.isNaN(gt)?gt:0})):wr=()=>g("div",{style:S(S({},fe.value),ie.value),onScroll:q,ref:O,class:me(`${xe}-body`)},[g(Yt,{style:S(S({},X.value),{tableLayout:be.value})},{default:()=>[oe(),Pe(),!te.value&&Gn&&g(Hv,{stickyOffsets:z.value,flattenColumns:x.value},{default:()=>[Gn]})]})]);const Ur=S(S(S({noData:!i.value.length,maxContentScroll:G.value&&Ae.x==="max-content"},kn),_.value),{direction:Ye,stickyClassName:Ft,onScroll:q});oo=()=>g(Je,null,[Ke!==!1&&g(F8,V(V({},Ur),{},{stickyTopOffset:Xe,class:`${xe}-header`,ref:I}),{default:Ao=>g(Je,null,[g(k8,Ao,null),te.value==="top"&&g(Hv,Ao,{default:()=>[Gn]})])}),wr(),te.value&&te.value!=="top"&&g(F8,V(V({},Ur),{},{stickyBottomOffset:xt,class:`${xe}-summary`,ref:E}),{default:Ao=>g(Hv,Ao,{default:()=>[Gn]})}),Ue&&O.value&&g(uTe,{ref:ne,offsetScroll:Mt,scrollBodyRef:O,onScroll:q,container:jt,scrollBodySizeInfo:P.value},null)])}else oo=()=>g("div",{style:S(S({},fe.value),ie.value),class:me(`${xe}-content`),onScroll:q,ref:O},[g(Yt,{style:S(S({},X.value),{tableLayout:be.value})},{default:()=>[oe(),Ke!==!1&&g(k8,V(V({},kn),_.value),null),Pe(),Gn&&g(Hv,{stickyOffsets:z.value,flattenColumns:x.value},{default:()=>[Gn]})]})]);const yo=As(n,{aria:!0,data:!0}),Yo=()=>g("div",V(V({},yo),{},{class:me(xe,{[`${xe}-rtl`]:Ye==="rtl",[`${xe}-ping-left`]:R.value,[`${xe}-ping-right`]:N.value,[`${xe}-layout-fixed`]:Be==="fixed",[`${xe}-fixed-header`]:K.value,[`${xe}-fixed-column`]:Y.value,[`${xe}-scroll-horizontal`]:G.value,[`${xe}-has-fix-left`]:x.value[0]&&x.value[0].fixed,[`${xe}-has-fix-right`]:x.value[L.value-1]&&x.value[L.value-1].fixed==="right",[n.class]:n.class}),style:n.style,id:Ne,ref:w}),[Re&&g(rw,{class:`${xe}-title`},{default:()=>[Re(i.value)]}),g("div",{class:`${xe}-container`},[oo()]),Le&&g(rw,{class:`${xe}-footer`},{default:()=>[Le(i.value)]})]);return G.value?g(ki,{onResize:Se},{default:Yo}):Yo()}}});function vTe(){const e=S({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t{const r=n[o];r!==void 0&&(e[o]=r)})}return e}const aw=10;function mTe(e,t){const n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(r=>{const i=e[r];typeof i!="function"&&(n[r]=i)}),n}function bTe(e,t,n){const o=M(()=>t.value&&typeof t.value=="object"?t.value:{}),r=M(()=>o.value.total||0),[i,a]=nn(()=>({current:"defaultCurrent"in o.value?o.value.defaultCurrent:1,pageSize:"defaultPageSize"in o.value?o.value.defaultPageSize:aw})),l=M(()=>{const u=vTe(i.value,o.value,{total:r.value>0?r.value:e.value}),d=Math.ceil((r.value||e.value)/u.pageSize);return u.current>d&&(u.current=d||1),u}),s=(u,d)=>{t.value!==!1&&a({current:u??1,pageSize:d||l.value.pageSize})},c=(u,d)=>{var f,h;t.value&&((h=(f=o.value).onChange)===null||h===void 0||h.call(f,u,d)),s(u,d),n(u,d||l.value.pageSize)};return[M(()=>t.value===!1?{}:S(S({},l.value),{onChange:c})),s]}function yTe(e,t,n){const o=ve({});Ie([e,t,n],()=>{const i=new Map,a=n.value,l=t.value;function s(c){c.forEach((u,d)=>{const f=a(u,d);i.set(f,u),u&&typeof u=="object"&&l in u&&s(u[l]||[])})}s(e.value),o.value={kvMap:i}},{deep:!0,immediate:!0});function r(i){return o.value.kvMap.get(i)}return[r]}const ll={},lw="SELECT_ALL",sw="SELECT_INVERT",cw="SELECT_NONE",STe=[];function kz(e,t){let n=[];return(t||[]).forEach(o=>{n.push(o),o&&typeof o=="object"&&e in o&&(n=[...n,...kz(e,o[e])])}),n}function CTe(e,t){const n=M(()=>{const E=e.value||{},{checkStrictly:R=!0}=E;return S(S({},E),{checkStrictly:R})}),[o,r]=yn(n.value.selectedRowKeys||n.value.defaultSelectedRowKeys||STe,{value:M(()=>n.value.selectedRowKeys)}),i=ve(new Map),a=E=>{if(n.value.preserveSelectedRowKeys){const R=new Map;E.forEach(A=>{let N=t.getRecordByKey(A);!N&&i.value.has(A)&&(N=i.value.get(A)),R.set(A,N)}),i.value=R}};ct(()=>{a(o.value)});const l=M(()=>n.value.checkStrictly?null:Qh(t.data.value,{externalGetKey:t.getRowKey.value,childrenPropName:t.childrenColumnName.value}).keyEntities),s=M(()=>kz(t.childrenColumnName.value,t.pageData.value)),c=M(()=>{const E=new Map,R=t.getRowKey.value,A=n.value.getCheckboxProps;return s.value.forEach((N,F)=>{const W=R(N,F),D=(A?A(N):null)||{};E.set(W,D)}),E}),{maxLevel:u,levelEntities:d}=Ly(l),f=E=>{var R;return!!(!((R=c.value.get(t.getRowKey.value(E)))===null||R===void 0)&&R.disabled)},h=M(()=>{if(n.value.checkStrictly)return[o.value||[],[]];const{checkedKeys:E,halfCheckedKeys:R}=Mi(o.value,!0,l.value,u.value,d.value,f);return[E||[],R]}),m=M(()=>h.value[0]),v=M(()=>h.value[1]),y=M(()=>{const E=n.value.type==="radio"?m.value.slice(0,1):m.value;return new Set(E)}),b=M(()=>n.value.type==="radio"?new Set:new Set(v.value)),[$,x]=nn(null),_=E=>{let R,A;a(E);const{preserveSelectedRowKeys:N,onChange:F}=n.value,{getRecordByKey:W}=t;N?(R=E,A=E.map(D=>i.value.get(D))):(R=[],A=[],E.forEach(D=>{const B=W(D);B!==void 0&&(R.push(D),A.push(B))})),r(R),F==null||F(R,A)},w=(E,R,A,N)=>{const{onSelect:F}=n.value,{getRecordByKey:W}=t||{};if(F){const D=A.map(B=>W(B));F(W(E),R,D,N)}_(A)},I=M(()=>{const{onSelectInvert:E,onSelectNone:R,selections:A,hideSelectAll:N}=n.value,{data:F,pageData:W,getRowKey:D,locale:B}=t;return!A||N?null:(A===!0?[lw,sw,cw]:A).map(L=>L===lw?{key:"all",text:B.value.selectionAll,onSelect(){_(F.value.map((z,K)=>D.value(z,K)).filter(z=>{const K=c.value.get(z);return!(K!=null&&K.disabled)||y.value.has(z)}))}}:L===sw?{key:"invert",text:B.value.selectInvert,onSelect(){const z=new Set(y.value);W.value.forEach((G,Y)=>{const ne=D.value(G,Y),re=c.value.get(ne);re!=null&&re.disabled||(z.has(ne)?z.delete(ne):z.add(ne))});const K=Array.from(z);E&&(pn(!1,"Table","`onSelectInvert` will be removed in future. Please use `onChange` instead."),E(K)),_(K)}}:L===cw?{key:"none",text:B.value.selectNone,onSelect(){R==null||R(),_(Array.from(y.value).filter(z=>{const K=c.value.get(z);return K==null?void 0:K.disabled}))}}:L)}),O=M(()=>s.value.length);return[E=>{var R;const{onSelectAll:A,onSelectMultiple:N,columnWidth:F,type:W,fixed:D,renderCell:B,hideSelectAll:k,checkStrictly:L}=n.value,{prefixCls:z,getRecordByKey:K,getRowKey:G,expandType:Y,getPopupContainer:ne}=t;if(!e.value)return E.filter(ge=>ge!==ll);let re=E.slice();const J=new Set(y.value),te=s.value.map(G.value).filter(ge=>!c.value.get(ge).disabled),ee=te.every(ge=>J.has(ge)),fe=te.some(ge=>J.has(ge)),ie=()=>{const ge=[];ee?te.forEach($e=>{J.delete($e),ge.push($e)}):te.forEach($e=>{J.has($e)||(J.add($e),ge.push($e))});const Se=Array.from(J);A==null||A(!ee,Se.map($e=>K($e)),ge.map($e=>K($e))),_(Se)};let X;if(W!=="radio"){let ge;if(I.value){const Te=g(qn,{getPopupContainer:ne.value},{default:()=>[I.value.map((Pe,oe)=>{const{key:le,text:xe,onSelect:Ae}=Pe;return g(qn.Item,{key:le||oe,onClick:()=>{Ae==null||Ae(te)}},{default:()=>[xe]})})]});ge=g("div",{class:`${z.value}-selection-extra`},[g(Ta,{overlay:Te,getPopupContainer:ne.value},{default:()=>[g("span",null,[g(jh,null,null)])]})])}const Se=s.value.map((Te,Pe)=>{const oe=G.value(Te,Pe),le=c.value.get(oe)||{};return S({checked:J.has(oe)},le)}).filter(Te=>{let{disabled:Pe}=Te;return Pe}),$e=!!Se.length&&Se.length===O.value,_e=$e&&Se.every(Te=>{let{checked:Pe}=Te;return Pe}),be=$e&&Se.some(Te=>{let{checked:Pe}=Te;return Pe});X=!k&&g("div",{class:`${z.value}-selection`},[g(Ri,{checked:$e?_e:!!O.value&&ee,indeterminate:$e?!_e&&be:!ee&&fe,onChange:ie,disabled:O.value===0||$e,"aria-label":ge?"Custom selection":"Select all",skipGroup:!0},null),ge])}let ue;W==="radio"?ue=ge=>{let{record:Se,index:$e}=ge;const _e=G.value(Se,$e),be=J.has(_e);return{node:g(yr,V(V({},c.value.get(_e)),{},{checked:be,onClick:Te=>Te.stopPropagation(),onChange:Te=>{J.has(_e)||w(_e,!0,[_e],Te.nativeEvent)}}),null),checked:be}}:ue=ge=>{let{record:Se,index:$e}=ge;var _e;const be=G.value(Se,$e),Te=J.has(be),Pe=b.value.has(be),oe=c.value.get(be);let le;return Y.value==="nest"?(le=Pe,pn(typeof(oe==null?void 0:oe.indeterminate)!="boolean","Table","set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")):le=(_e=oe==null?void 0:oe.indeterminate)!==null&&_e!==void 0?_e:Pe,{node:g(Ri,V(V({},oe),{},{indeterminate:le,checked:Te,skipGroup:!0,onClick:xe=>xe.stopPropagation(),onChange:xe=>{let{nativeEvent:Ae}=xe;const{shiftKey:Be}=Ae;let Ye=-1,Re=-1;if(Be&&L){const Le=new Set([$.value,be]);te.some((Ne,Ke)=>{if(Le.has(Ne))if(Ye===-1)Ye=Ke;else return Re=Ke,!0;return!1})}if(Re!==-1&&Ye!==Re&&L){const Le=te.slice(Ye,Re+1),Ne=[];Te?Le.forEach(Ze=>{J.has(Ze)&&(Ne.push(Ze),J.delete(Ze))}):Le.forEach(Ze=>{J.has(Ze)||(Ne.push(Ze),J.add(Ze))});const Ke=Array.from(J);N==null||N(!Te,Ke.map(Ze=>K(Ze)),Ne.map(Ze=>K(Ze))),_(Ke)}else{const Le=m.value;if(L){const Ne=Te?$a(Le,be):al(Le,be);w(be,!Te,Ne,Ae)}else{const Ne=Mi([...Le,be],!0,l.value,u.value,d.value,f),{checkedKeys:Ke,halfCheckedKeys:Ze}=Ne;let Ue=Ke;if(Te){const Xe=new Set(Ke);Xe.delete(be),Ue=Mi(Array.from(Xe),{checked:!1,halfCheckedKeys:Ze},l.value,u.value,d.value,f).checkedKeys}w(be,!Te,Ue,Ae)}}x(be)}}),null),checked:Te}};const ye=ge=>{let{record:Se,index:$e}=ge;const{node:_e,checked:be}=ue({record:Se,index:$e});return B?B(be,Se,$e,_e):_e};if(!re.includes(ll))if(re.findIndex(ge=>{var Se;return((Se=ge[md])===null||Se===void 0?void 0:Se.columnType)==="EXPAND_COLUMN"})===0){const[ge,...Se]=re;re=[ge,ll,...Se]}else re=[ll,...re];const H=re.indexOf(ll);re=re.filter((ge,Se)=>ge!==ll||Se===H);const j=re[H-1],q=re[H+1];let se=D;se===void 0&&((q==null?void 0:q.fixed)!==void 0?se=q.fixed:(j==null?void 0:j.fixed)!==void 0&&(se=j.fixed)),se&&j&&((R=j[md])===null||R===void 0?void 0:R.columnType)==="EXPAND_COLUMN"&&j.fixed===void 0&&(j.fixed=se);const ae={fixed:se,width:F,className:`${z.value}-selection-column`,title:n.value.columnTitle||X,customRender:ye,[md]:{class:`${z.value}-selection-col`}};return re.map(ge=>ge===ll?ae:ge)},y]}var $Te={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const xTe=$Te;function z8(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:[];const t=ln(e),n=[];return t.forEach(o=>{var r,i,a,l;if(!o)return;const s=o.key,c=((r=o.props)===null||r===void 0?void 0:r.style)||{},u=((i=o.props)===null||i===void 0?void 0:i.class)||"",d=o.props||{};for(const[y,b]of Object.entries(d))d[Gc(y)]=b;const f=o.children||{},{default:h}=f,m=ETe(f,["default"]),v=S(S(S({},m),d),{style:c,class:u});if(s&&(v.key=s),!((a=o.type)===null||a===void 0)&&a.__ANT_TABLE_COLUMN_GROUP)v.children=Bz(typeof h=="function"?h():h);else{const y=(l=o.children)===null||l===void 0?void 0:l.default;v.customRender=v.customRender||y}n.push(v)}),n}const Lm="ascend",jC="descend";function X0(e){return typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1}function W8(e){return typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1}function ATe(e,t){return t?e[e.indexOf(t)+1]:e[0]}function uw(e,t,n){let o=[];function r(i,a){o.push({column:i,key:Nc(i,a),multiplePriority:X0(i),sortOrder:i.sortOrder})}return(e||[]).forEach((i,a)=>{const l=ng(a,n);i.children?("sortOrder"in i&&r(i,l),o=[...o,...uw(i.children,t,l)]):i.sorter&&("sortOrder"in i?r(i,l):t&&i.defaultSortOrder&&o.push({column:i,key:Nc(i,l),multiplePriority:X0(i),sortOrder:i.defaultSortOrder}))}),o}function Fz(e,t,n,o,r,i,a,l){return(t||[]).map((s,c)=>{const u=ng(c,l);let d=s;if(d.sorter){const f=d.sortDirections||r,h=d.showSorterTooltip===void 0?a:d.showSorterTooltip,m=Nc(d,u),v=n.find(E=>{let{key:R}=E;return R===m}),y=v?v.sortOrder:null,b=ATe(f,y),$=f.includes(Lm)&&g(TTe,{class:me(`${e}-column-sorter-up`,{active:y===Lm}),role:"presentation"},null),x=f.includes(jC)&&g(_Te,{role:"presentation",class:me(`${e}-column-sorter-down`,{active:y===jC})},null),{cancelSort:_,triggerAsc:w,triggerDesc:I}=i||{};let O=_;b===jC?O=I:b===Lm&&(O=w);const P=typeof h=="object"?h:{title:O};d=S(S({},d),{className:me(d.className,{[`${e}-column-sort`]:y}),title:E=>{const R=g("div",{class:`${e}-column-sorters`},[g("span",{class:`${e}-column-title`},[LI(s.title,E)]),g("span",{class:me(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!($&&x)})},[g("span",{class:`${e}-column-sorter-inner`},[$,x])])]);return h?g(Br,P,{default:()=>[R]}):R},customHeaderCell:E=>{const R=s.customHeaderCell&&s.customHeaderCell(E)||{},A=R.onClick,N=R.onKeydown;return R.onClick=F=>{o({column:s,key:m,sortOrder:b,multiplePriority:X0(s)}),A&&A(F)},R.onKeydown=F=>{F.keyCode===Fe.ENTER&&(o({column:s,key:m,sortOrder:b,multiplePriority:X0(s)}),N==null||N(F))},y&&(R["aria-sort"]=y==="ascend"?"ascending":"descending"),R.class=me(R.class,`${e}-column-has-sorters`),R.tabindex=0,R}})}return"children"in d&&(d=S(S({},d),{children:Fz(e,d.children,n,o,r,i,a,u)})),d})}function V8(e){const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function K8(e){const t=e.filter(n=>{let{sortOrder:o}=n;return o}).map(V8);return t.length===0&&e.length?S(S({},V8(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function dw(e,t,n){const o=t.slice().sort((a,l)=>l.multiplePriority-a.multiplePriority),r=e.slice(),i=o.filter(a=>{let{column:{sorter:l},sortOrder:s}=a;return W8(l)&&s});return i.length?r.sort((a,l)=>{for(let s=0;s{const l=a[n];return l?S(S({},a),{[n]:dw(l,t,n)}):a}):r}function MTe(e){let{prefixCls:t,mergedColumns:n,onSorterChange:o,sortDirections:r,tableLocale:i,showSorterTooltip:a}=e;const[l,s]=nn(uw(n.value,!0)),c=M(()=>{let m=!0;const v=uw(n.value,!1);if(!v.length)return l.value;const y=[];function b(x){m?y.push(x):y.push(S(S({},x),{sortOrder:null}))}let $=null;return v.forEach(x=>{$===null?(b(x),x.sortOrder&&(x.multiplePriority===!1?m=!1:$=!0)):($&&x.multiplePriority!==!1||(m=!1),b(x))}),y}),u=M(()=>{const m=c.value.map(v=>{let{column:y,sortOrder:b}=v;return{column:y,order:b}});return{sortColumns:m,sortColumn:m[0]&&m[0].column,sortOrder:m[0]&&m[0].order}});function d(m){let v;m.multiplePriority===!1||!c.value.length||c.value[0].multiplePriority===!1?v=[m]:v=[...c.value.filter(y=>{let{key:b}=y;return b!==m.key}),m],s(v),o(K8(v),v)}const f=m=>Fz(t.value,m,c.value,d,r.value,i.value,a.value),h=M(()=>K8(c.value));return[f,c,u,h]}var RTe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};const DTe=RTe;function U8(e){for(var t=1;t{const{keyCode:t}=e;t===Fe.ENTER&&e.stopPropagation()},BTe=(e,t)=>{let{slots:n}=t;var o;return g("div",{onClick:r=>r.stopPropagation(),onKeydown:kTe},[(o=n.default)===null||o===void 0?void 0:o.call(n)])},FTe=BTe,G8=pe({compatConfig:{MODE:3},name:"FilterSearch",inheritAttrs:!1,props:{value:Qe(),onChange:Oe(),filterSearch:rt([Boolean,Function]),tablePrefixCls:Qe(),locale:qe()},setup(e){return()=>{const{value:t,onChange:n,filterSearch:o,tablePrefixCls:r,locale:i}=e;return o?g("div",{class:`${r}-filter-dropdown-search`},[g(uo,{placeholder:i.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,class:`${r}-filter-dropdown-search-input`},{prefix:()=>g(cy,null,null)})]):null}}});var Y8=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.motion?e.motion:Uh()),s=(c,u)=>{var d,f,h,m;u==="appear"?(f=(d=l.value)===null||d===void 0?void 0:d.onAfterEnter)===null||f===void 0||f.call(d,c):u==="leave"&&((m=(h=l.value)===null||h===void 0?void 0:h.onAfterLeave)===null||m===void 0||m.call(h,c)),a.value||e.onMotionEnd(),a.value=!0};return Ie(()=>e.motionNodes,()=>{e.motionNodes&&e.motionType==="hide"&&r.value&&wt(()=>{r.value=!1})},{immediate:!0,flush:"post"}),lt(()=>{e.motionNodes&&e.onMotionStart()}),Ct(()=>{e.motionNodes&&s()}),()=>{const{motion:c,motionNodes:u,motionType:d,active:f,eventKey:h}=e,m=Y8(e,["motion","motionNodes","motionType","active","eventKey"]);return u?g(so,V(V({},l.value),{},{appear:d==="show",onAfterAppear:v=>s(v,"appear"),onAfterLeave:v=>s(v,"leave")}),{default:()=>[Ln(g("div",{class:`${i.value.prefixCls}-treenode-motion`},[u.map(v=>{const y=Y8(v.data,[]),{title:b,key:$,isStart:x,isEnd:_}=v;return delete y.children,g(Dx,V(V({},y),{},{title:b,active:f,data:v.data,key:$,eventKey:$,isStart:x,isEnd:_}),o)})]),[[Bo,r.value]])]}):g(Dx,V(V({class:n.class,style:n.style},m),{},{active:f,eventKey:h}),o)}}});function zTe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=e.length,o=t.length;if(Math.abs(n-o)!==1)return{add:!1,key:null};function r(i,a){const l=new Map;i.forEach(c=>{l.set(c,!0)});const s=a.filter(c=>!l.has(c));return s.length===1?s[0]:null}return na.key===n),r=e[o+1],i=t.findIndex(a=>a.key===n);if(r){const a=t.findIndex(l=>l.key===r.key);return t.slice(i+1,a)}return t.slice(i+1)}var q8=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{},kc=`RC_TREE_MOTION_${Math.random()}`,fw={key:kc},Hz={key:kc,level:0,index:0,pos:"0",node:fw,nodes:[fw]},Q8={parent:null,children:[],pos:Hz.pos,data:fw,title:null,key:kc,isStart:[],isEnd:[]};function J8(e,t,n,o){return t===!1||!n?e:e.slice(0,Math.ceil(n/o)+1)}function eR(e){const{key:t,pos:n}=e;return Zh(t,n)}function WTe(e){let t=String(e.key),n=e;for(;n.parent;)n=n.parent,t=`${n.key} > ${t}`;return t}const VTe=pe({compatConfig:{MODE:3},name:"NodeList",inheritAttrs:!1,props:wye,setup(e,t){let{expose:n,attrs:o}=t;const r=he(),i=he(),{expandedKeys:a,flattenNodes:l}=sF();n({scrollTo:v=>{r.value.scrollTo(v)},getIndentWidth:()=>i.value.offsetWidth});const s=ve(l.value),c=ve([]),u=he(null);function d(){s.value=l.value,c.value=[],u.value=null,e.onListChangeEnd()}const f=BO();Ie([()=>a.value.slice(),l],(v,y)=>{let[b,$]=v,[x,_]=y;const w=zTe(x,b);if(w.key!==null){const{virtual:I,height:O,itemHeight:P}=e;if(w.add){const E=_.findIndex(N=>{let{key:F}=N;return F===w.key}),R=J8(X8(_,$,w.key),I,O,P),A=_.slice();A.splice(E+1,0,Q8),s.value=A,c.value=R,u.value="show"}else{const E=$.findIndex(N=>{let{key:F}=N;return F===w.key}),R=J8(X8($,_,w.key),I,O,P),A=$.slice();A.splice(E+1,0,Q8),s.value=A,c.value=R,u.value="hide"}}else _!==$&&(s.value=$)}),Ie(()=>f.value.dragging,v=>{v||d()});const h=M(()=>e.motion===void 0?s.value:l.value),m=()=>{e.onActiveChange(null)};return()=>{const v=S(S({},e),o),{prefixCls:y,selectable:b,checkable:$,disabled:x,motion:_,height:w,itemHeight:I,virtual:O,focusable:P,activeItem:E,focused:R,tabindex:A,onKeydown:N,onFocus:F,onBlur:W,onListChangeStart:D,onListChangeEnd:B}=v,k=q8(v,["prefixCls","selectable","checkable","disabled","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabindex","onKeydown","onFocus","onBlur","onListChangeStart","onListChangeEnd"]);return g(Je,null,[R&&E&&g("span",{style:Z8,"aria-live":"assertive"},[WTe(E)]),g("div",null,[g("input",{style:Z8,disabled:P===!1||x,tabindex:P!==!1?A:null,onKeydown:N,onFocus:F,onBlur:W,value:"",onChange:jTe,"aria-label":"for screen reader"},null)]),g("div",{class:`${y}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"}},[g("div",{class:`${y}-indent`},[g("div",{ref:i,class:`${y}-indent-unit`},null)])]),g(Pk,V(V({},_t(k,["onActiveChange"])),{},{data:h.value,itemKey:eR,height:w,fullHeight:!1,virtual:O,itemHeight:I,prefixCls:`${y}-list`,ref:r,onVisibleChange:(L,z)=>{const K=new Set(L);z.filter(Y=>!K.has(Y)).some(Y=>eR(Y)===kc)&&d()}}),{default:L=>{const{pos:z}=L,K=q8(L.data,[]),{title:G,key:Y,isStart:ne,isEnd:re}=L,J=Zh(Y,z);return delete K.key,delete K.children,g(HTe,V(V({},K),{},{eventKey:J,title:G,active:!!E&&Y===E.key,data:L.data,isStart:ne,isEnd:re,motion:_,motionNodes:Y===kc?c.value:null,motionType:u.value,onMotionStart:D,onMotionEnd:d,onMousemove:m}),null)}})])}}});function KTe(e){let{dropPosition:t,dropLevelOffset:n,indent:o}=e;const r={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:"2px"};switch(t){case-1:r.top=0,r.left=`${-n*o}px`;break;case 1:r.bottom=0,r.left=`${-n*o}px`;break;case 0:r.bottom=0,r.left=`${o}`;break}return g("div",{style:r},null)}const UTe=10,zz=pe({compatConfig:{MODE:3},name:"Tree",inheritAttrs:!1,props:bt(uF(),{prefixCls:"vc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,expandAction:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:KTe,allowDrop:()=>!0}),setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=ve(!1);let a={};const l=ve(),s=ve([]),c=ve([]),u=ve([]),d=ve([]),f=ve([]),h=ve([]),m={},v=St({draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null}),y=ve([]);Ie([()=>e.treeData,()=>e.children],()=>{y.value=e.treeData!==void 0?$t(e.treeData).slice():Nx($t(e.children))},{immediate:!0,deep:!0});const b=ve({}),$=ve(!1),x=ve(null),_=ve(!1),w=M(()=>Ay(e.fieldNames)),I=ve();let O=null,P=null,E=null;const R=M(()=>({expandedKeysSet:A.value,selectedKeysSet:N.value,loadedKeysSet:F.value,loadingKeysSet:W.value,checkedKeysSet:D.value,halfCheckedKeysSet:B.value,dragOverNodeKey:v.dragOverNodeKey,dropPosition:v.dropPosition,keyEntities:b.value})),A=M(()=>new Set(h.value)),N=M(()=>new Set(s.value)),F=M(()=>new Set(d.value)),W=M(()=>new Set(f.value)),D=M(()=>new Set(c.value)),B=M(()=>new Set(u.value));ct(()=>{if(y.value){const Re=Qh(y.value,{fieldNames:w.value});b.value=S({[kc]:Hz},Re.keyEntities)}});let k=!1;Ie([()=>e.expandedKeys,()=>e.autoExpandParent,b],(Re,Le)=>{let[Ne,Ke]=Re,[Ze,Ue]=Le,Xe=h.value;if(e.expandedKeys!==void 0||k&&Ke!==Ue)Xe=e.autoExpandParent||!k&&e.defaultExpandParent?Lx(e.expandedKeys,b.value):e.expandedKeys;else if(!k&&e.defaultExpandAll){const xt=S({},b.value);delete xt[kc],Xe=Object.keys(xt).map(Mt=>xt[Mt].key)}else!k&&e.defaultExpandedKeys&&(Xe=e.autoExpandParent||e.defaultExpandParent?Lx(e.defaultExpandedKeys,b.value):e.defaultExpandedKeys);Xe&&(h.value=Xe),k=!0},{immediate:!0});const L=ve([]);ct(()=>{L.value=Mye(y.value,h.value,w.value)}),ct(()=>{e.selectable&&(e.selectedKeys!==void 0?s.value=l6(e.selectedKeys,e):!k&&e.defaultSelectedKeys&&(s.value=l6(e.defaultSelectedKeys,e)))});const{maxLevel:z,levelEntities:K}=Ly(b);ct(()=>{if(e.checkable){let Re;if(e.checkedKeys!==void 0?Re=wC(e.checkedKeys)||{}:!k&&e.defaultCheckedKeys?Re=wC(e.defaultCheckedKeys)||{}:y.value&&(Re=wC(e.checkedKeys)||{checkedKeys:c.value,halfCheckedKeys:u.value}),Re){let{checkedKeys:Le=[],halfCheckedKeys:Ne=[]}=Re;e.checkStrictly||({checkedKeys:Le,halfCheckedKeys:Ne}=Mi(Le,!0,b.value,z.value,K.value)),c.value=Le,u.value=Ne}}}),ct(()=>{e.loadedKeys&&(d.value=e.loadedKeys)});const G=()=>{S(v,{dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})},Y=Re=>{I.value.scrollTo(Re)};Ie(()=>e.activeKey,()=>{e.activeKey!==void 0&&(x.value=e.activeKey)},{immediate:!0}),Ie(x,Re=>{wt(()=>{Re!==null&&Y({key:Re})})},{immediate:!0,flush:"post"});const ne=Re=>{e.expandedKeys===void 0&&(h.value=Re)},re=()=>{v.draggingNodeKey!==null&&S(v,{draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),O=null,E=null},J=(Re,Le)=>{const{onDragend:Ne}=e;v.dragOverNodeKey=null,re(),Ne==null||Ne({event:Re,node:Le.eventData}),P=null},te=Re=>{J(Re,null),window.removeEventListener("dragend",te)},ee=(Re,Le)=>{const{onDragstart:Ne}=e,{eventKey:Ke,eventData:Ze}=Le;P=Le,O={x:Re.clientX,y:Re.clientY};const Ue=$a(h.value,Ke);v.draggingNodeKey=Ke,v.dragChildrenKeys=Pye(Ke,b.value),l.value=I.value.getIndentWidth(),ne(Ue),window.addEventListener("dragend",te),Ne&&Ne({event:Re,node:Ze})},fe=(Re,Le)=>{const{onDragenter:Ne,onExpand:Ke,allowDrop:Ze,direction:Ue}=e,{pos:Xe,eventKey:xt}=Le;if(E!==xt&&(E=xt),!P){G();return}const{dropPosition:Mt,dropLevelOffset:Ft,dropTargetKey:jt,dropContainerKey:Yt,dropTargetPos:Vn,dropAllowed:Gn,dragOverNodeKey:oo}=a6(Re,P,Le,l.value,O,Ze,L.value,b.value,A.value,Ue);if(v.dragChildrenKeys.indexOf(jt)!==-1||!Gn){G();return}if(a||(a={}),Object.keys(a).forEach(kn=>{clearTimeout(a[kn])}),P.eventKey!==Le.eventKey&&(a[Xe]=window.setTimeout(()=>{if(v.draggingNodeKey===null)return;let kn=h.value.slice();const yo=b.value[Le.eventKey];yo&&(yo.children||[]).length&&(kn=al(h.value,Le.eventKey)),ne(kn),Ke&&Ke(kn,{node:Le.eventData,expanded:!0,nativeEvent:Re})},800)),P.eventKey===jt&&Ft===0){G();return}S(v,{dragOverNodeKey:oo,dropPosition:Mt,dropLevelOffset:Ft,dropTargetKey:jt,dropContainerKey:Yt,dropTargetPos:Vn,dropAllowed:Gn}),Ne&&Ne({event:Re,node:Le.eventData,expandedKeys:h.value})},ie=(Re,Le)=>{const{onDragover:Ne,allowDrop:Ke,direction:Ze}=e;if(!P)return;const{dropPosition:Ue,dropLevelOffset:Xe,dropTargetKey:xt,dropContainerKey:Mt,dropAllowed:Ft,dropTargetPos:jt,dragOverNodeKey:Yt}=a6(Re,P,Le,l.value,O,Ke,L.value,b.value,A.value,Ze);v.dragChildrenKeys.indexOf(xt)!==-1||!Ft||(P.eventKey===xt&&Xe===0?v.dropPosition===null&&v.dropLevelOffset===null&&v.dropTargetKey===null&&v.dropContainerKey===null&&v.dropTargetPos===null&&v.dropAllowed===!1&&v.dragOverNodeKey===null||G():Ue===v.dropPosition&&Xe===v.dropLevelOffset&&xt===v.dropTargetKey&&Mt===v.dropContainerKey&&jt===v.dropTargetPos&&Ft===v.dropAllowed&&Yt===v.dragOverNodeKey||S(v,{dropPosition:Ue,dropLevelOffset:Xe,dropTargetKey:xt,dropContainerKey:Mt,dropTargetPos:jt,dropAllowed:Ft,dragOverNodeKey:Yt}),Ne&&Ne({event:Re,node:Le.eventData}))},X=(Re,Le)=>{E===Le.eventKey&&!Re.currentTarget.contains(Re.relatedTarget)&&(G(),E=null);const{onDragleave:Ne}=e;Ne&&Ne({event:Re,node:Le.eventData})},ue=function(Re,Le){let Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Ke;const{dragChildrenKeys:Ze,dropPosition:Ue,dropTargetKey:Xe,dropTargetPos:xt,dropAllowed:Mt}=v;if(!Mt)return;const{onDrop:Ft}=e;if(v.dragOverNodeKey=null,re(),Xe===null)return;const jt=S(S({},bm(Xe,$t(R.value))),{active:((Ke=xe.value)===null||Ke===void 0?void 0:Ke.key)===Xe,data:b.value[Xe].node});Ze.indexOf(Xe);const Yt=FO(xt),Vn={event:Re,node:ym(jt),dragNode:P?P.eventData:null,dragNodesKeys:[P.eventKey].concat(Ze),dropToGap:Ue!==0,dropPosition:Ue+Number(Yt[Yt.length-1])};Ne||Ft==null||Ft(Vn),P=null},ye=(Re,Le)=>{const{expanded:Ne,key:Ke}=Le,Ze=L.value.filter(Xe=>Xe.key===Ke)[0],Ue=ym(S(S({},bm(Ke,R.value)),{data:Ze.data}));ne(Ne?$a(h.value,Ke):al(h.value,Ke)),Te(Re,Ue)},H=(Re,Le)=>{const{onClick:Ne,expandAction:Ke}=e;Ke==="click"&&ye(Re,Le),Ne&&Ne(Re,Le)},j=(Re,Le)=>{const{onDblclick:Ne,expandAction:Ke}=e;(Ke==="doubleclick"||Ke==="dblclick")&&ye(Re,Le),Ne&&Ne(Re,Le)},q=(Re,Le)=>{let Ne=s.value;const{onSelect:Ke,multiple:Ze}=e,{selected:Ue}=Le,Xe=Le[w.value.key],xt=!Ue;xt?Ze?Ne=al(Ne,Xe):Ne=[Xe]:Ne=$a(Ne,Xe);const Mt=b.value,Ft=Ne.map(jt=>{const Yt=Mt[jt];return Yt?Yt.node:null}).filter(jt=>jt);e.selectedKeys===void 0&&(s.value=Ne),Ke&&Ke(Ne,{event:"select",selected:xt,node:Le,selectedNodes:Ft,nativeEvent:Re})},se=(Re,Le,Ne)=>{const{checkStrictly:Ke,onCheck:Ze}=e,Ue=Le[w.value.key];let Xe;const xt={event:"check",node:Le,checked:Ne,nativeEvent:Re},Mt=b.value;if(Ke){const Ft=Ne?al(c.value,Ue):$a(c.value,Ue),jt=$a(u.value,Ue);Xe={checked:Ft,halfChecked:jt},xt.checkedNodes=Ft.map(Yt=>Mt[Yt]).filter(Yt=>Yt).map(Yt=>Yt.node),e.checkedKeys===void 0&&(c.value=Ft)}else{let{checkedKeys:Ft,halfCheckedKeys:jt}=Mi([...c.value,Ue],!0,Mt,z.value,K.value);if(!Ne){const Yt=new Set(Ft);Yt.delete(Ue),{checkedKeys:Ft,halfCheckedKeys:jt}=Mi(Array.from(Yt),{checked:!1,halfCheckedKeys:jt},Mt,z.value,K.value)}Xe=Ft,xt.checkedNodes=[],xt.checkedNodesPositions=[],xt.halfCheckedKeys=jt,Ft.forEach(Yt=>{const Vn=Mt[Yt];if(!Vn)return;const{node:Gn,pos:oo}=Vn;xt.checkedNodes.push(Gn),xt.checkedNodesPositions.push({node:Gn,pos:oo})}),e.checkedKeys===void 0&&(c.value=Ft,u.value=jt)}Ze&&Ze(Xe,xt)},ae=Re=>{const Le=Re[w.value.key],Ne=new Promise((Ke,Ze)=>{const{loadData:Ue,onLoad:Xe}=e;if(!Ue||F.value.has(Le)||W.value.has(Le))return null;Ue(Re).then(()=>{const Mt=al(d.value,Le),Ft=$a(f.value,Le);Xe&&Xe(Mt,{event:"load",node:Re}),e.loadedKeys===void 0&&(d.value=Mt),f.value=Ft,Ke()}).catch(Mt=>{const Ft=$a(f.value,Le);if(f.value=Ft,m[Le]=(m[Le]||0)+1,m[Le]>=UTe){const jt=al(d.value,Le);e.loadedKeys===void 0&&(d.value=jt),Ke()}Ze(Mt)}),f.value=al(f.value,Le)});return Ne.catch(()=>{}),Ne},ge=(Re,Le)=>{const{onMouseenter:Ne}=e;Ne&&Ne({event:Re,node:Le})},Se=(Re,Le)=>{const{onMouseleave:Ne}=e;Ne&&Ne({event:Re,node:Le})},$e=(Re,Le)=>{const{onRightClick:Ne}=e;Ne&&(Re.preventDefault(),Ne({event:Re,node:Le}))},_e=Re=>{const{onFocus:Le}=e;$.value=!0,Le&&Le(Re)},be=Re=>{const{onBlur:Le}=e;$.value=!1,le(null),Le&&Le(Re)},Te=(Re,Le)=>{let Ne=h.value;const{onExpand:Ke,loadData:Ze}=e,{expanded:Ue}=Le,Xe=Le[w.value.key];if(_.value)return;Ne.indexOf(Xe);const xt=!Ue;if(xt?Ne=al(Ne,Xe):Ne=$a(Ne,Xe),ne(Ne),Ke&&Ke(Ne,{node:Le,expanded:xt,nativeEvent:Re}),xt&&Ze){const Mt=ae(Le);Mt&&Mt.then(()=>{}).catch(Ft=>{const jt=$a(h.value,Xe);ne(jt),Promise.reject(Ft)})}},Pe=()=>{_.value=!0},oe=()=>{setTimeout(()=>{_.value=!1})},le=Re=>{const{onActiveChange:Le}=e;x.value!==Re&&(e.activeKey!==void 0&&(x.value=Re),Re!==null&&Y({key:Re}),Le&&Le(Re))},xe=M(()=>x.value===null?null:L.value.find(Re=>{let{key:Le}=Re;return Le===x.value})||null),Ae=Re=>{let Le=L.value.findIndex(Ke=>{let{key:Ze}=Ke;return Ze===x.value});Le===-1&&Re<0&&(Le=L.value.length),Le=(Le+Re+L.value.length)%L.value.length;const Ne=L.value[Le];if(Ne){const{key:Ke}=Ne;le(Ke)}else le(null)},Be=M(()=>ym(S(S({},bm(x.value,R.value)),{data:xe.value.data,active:!0}))),Ye=Re=>{const{onKeydown:Le,checkable:Ne,selectable:Ke}=e;switch(Re.which){case Fe.UP:{Ae(-1),Re.preventDefault();break}case Fe.DOWN:{Ae(1),Re.preventDefault();break}}const Ze=xe.value;if(Ze&&Ze.data){const Ue=Ze.data.isLeaf===!1||!!(Ze.data.children||[]).length,Xe=Be.value;switch(Re.which){case Fe.LEFT:{Ue&&A.value.has(x.value)?Te({},Xe):Ze.parent&&le(Ze.parent.key),Re.preventDefault();break}case Fe.RIGHT:{Ue&&!A.value.has(x.value)?Te({},Xe):Ze.children&&Ze.children.length&&le(Ze.children[0].key),Re.preventDefault();break}case Fe.ENTER:case Fe.SPACE:{Ne&&!Xe.disabled&&Xe.checkable!==!1&&!Xe.disableCheckbox?se({},Xe,!D.value.has(x.value)):!Ne&&Ke&&!Xe.disabled&&Xe.selectable!==!1&&q({},Xe);break}}}Le&&Le(Re)};return r({onNodeExpand:Te,scrollTo:Y,onKeydown:Ye,selectedKeys:M(()=>s.value),checkedKeys:M(()=>c.value),halfCheckedKeys:M(()=>u.value),loadedKeys:M(()=>d.value),loadingKeys:M(()=>f.value),expandedKeys:M(()=>h.value)}),Fo(()=>{window.removeEventListener("dragend",te),i.value=!0}),Cye({expandedKeys:h,selectedKeys:s,loadedKeys:d,loadingKeys:f,checkedKeys:c,halfCheckedKeys:u,expandedKeysSet:A,selectedKeysSet:N,loadedKeysSet:F,loadingKeysSet:W,checkedKeysSet:D,halfCheckedKeysSet:B,flattenNodes:L}),()=>{const{draggingNodeKey:Re,dropLevelOffset:Le,dropContainerKey:Ne,dropTargetKey:Ke,dropPosition:Ze,dragOverNodeKey:Ue}=v,{prefixCls:Xe,showLine:xt,focusable:Mt,tabindex:Ft=0,selectable:jt,showIcon:Yt,icon:Vn=o.icon,switcherIcon:Gn,draggable:oo,checkable:kn,checkStrictly:yo,disabled:Yo,motion:wr,loadData:Ur,filterTreeNode:Ao,height:za,itemHeight:We,virtual:gt,dropIndicatorRender:ut,onContextmenu:un,onScroll:Yn,direction:Bn,rootClassName:Xo,rootStyle:So}=e,{class:hi,style:qo}=n,_r=As(S(S({},e),n),{aria:!0,data:!0});let Cn;return oo?typeof oo=="object"?Cn=oo:typeof oo=="function"?Cn={nodeDraggable:oo}:Cn={}:Cn=!1,g(Sye,{value:{prefixCls:Xe,selectable:jt,showIcon:Yt,icon:Vn,switcherIcon:Gn,draggable:Cn,draggingNodeKey:Re,checkable:kn,customCheckable:o.checkable,checkStrictly:yo,disabled:Yo,keyEntities:b.value,dropLevelOffset:Le,dropContainerKey:Ne,dropTargetKey:Ke,dropPosition:Ze,dragOverNodeKey:Ue,dragging:Re!==null,indent:l.value,direction:Bn,dropIndicatorRender:ut,loadData:Ur,filterTreeNode:Ao,onNodeClick:H,onNodeDoubleClick:j,onNodeExpand:Te,onNodeSelect:q,onNodeCheck:se,onNodeLoad:ae,onNodeMouseEnter:ge,onNodeMouseLeave:Se,onNodeContextMenu:$e,onNodeDragStart:ee,onNodeDragEnter:fe,onNodeDragOver:ie,onNodeDragLeave:X,onNodeDragEnd:J,onNodeDrop:ue,slots:o}},{default:()=>[g("div",{role:"tree",class:me(Xe,hi,Xo,{[`${Xe}-show-line`]:xt,[`${Xe}-focused`]:$.value,[`${Xe}-active-focused`]:x.value!==null}),style:So},[g(VTe,V({ref:I,prefixCls:Xe,style:qo,disabled:Yo,selectable:jt,checkable:!!kn,motion:wr,height:za,itemHeight:We,virtual:gt,focusable:Mt,focused:$.value,tabindex:Ft,activeItem:xe.value,onFocus:_e,onBlur:be,onKeydown:Ye,onActiveChange:le,onListChangeStart:Pe,onListChangeEnd:oe,onContextmenu:un,onScroll:Yn},_r),null)])]})}}});var GTe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const YTe=GTe;function tR(e){for(var t=1;t({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),dEe=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${t.lineWidthBold}px solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),fEe=(e,t)=>{const{treeCls:n,treeNodeCls:o,treeNodePadding:r,treeTitleHeight:i}=t,a=(i-t.fontSizeLG)/2,l=t.paddingXS;return{[n]:S(S({},vt(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,[`&${n}-rtl`]:{[`${n}-switcher`]:{"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${n}-active-focused)`]:S({},yl(t)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${o}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:cEe,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${o}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${r}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${n}-node-content-wrapper`]:S({},yl(t)),[`&:not(${o}-disabled).filter-node ${n}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${n}-draggable-icon`]:{width:i,lineHeight:`${i}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${t.motionDurationSlow}`,[`${o}:hover &`]:{opacity:.45}},[`&${o}-disabled`]:{[`${n}-draggable-icon`]:{visibility:"hidden"}}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:S(S({},uEe(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,margin:0,lineHeight:`${i}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:i/2,bottom:-r,marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:i/2*.8,height:i/2,borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:l,marginBlockStart:a},[`${n}-node-content-wrapper, ${n}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:i,margin:0,padding:`0 ${t.paddingXS/2}px`,color:"inherit",lineHeight:`${i}px`,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:t.controlItemBgHover},[`&${n}-node-selected`]:{backgroundColor:t.controlItemBgActive},[`${n}-iconEle`]:{display:"inline-block",width:i,height:i,lineHeight:`${i}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}-node-content-wrapper`]:S({lineHeight:`${i}px`,userSelect:"none"},dEe(e,t)),[`${o}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${t.colorPrimary}`}},"&-show-line":{[`${n}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:i/2,bottom:-r,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${o}-leaf-last`]:{[`${n}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${i/2}px !important`}}}}})}},pEe=e=>{const{treeCls:t,treeNodeCls:n,treeNodePadding:o}=e;return{[`${t}${t}-directory`]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,transition:`background-color ${e.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:e.controlItemBgHover}},"> *":{zIndex:1},[`${t}-switcher`]:{transition:`color ${e.motionDurationMid}`},[`${t}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${t}-node-selected`]:{color:e.colorTextLightSolid,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:e.colorPrimary},[`${t}-switcher`]:{color:e.colorTextLightSolid},[`${t}-node-content-wrapper`]:{color:e.colorTextLightSolid,background:"transparent"}}}}}},Vz=(e,t)=>{const n=`.${e}`,o=`${n}-treenode`,r=t.paddingXS/2,i=t.controlHeightSM,a=nt(t,{treeCls:n,treeNodeCls:o,treeNodePadding:r,treeTitleHeight:i});return[fEe(e,a),pEe(a)]},hEe=pt("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:Fy(`${n}-checkbox`,e)},Vz(n,e),Kh(e)]}),Kz=()=>{const e=uF();return S(S({},e),{showLine:rt([Boolean,Object]),multiple:De(),autoExpandParent:De(),checkStrictly:De(),checkable:De(),disabled:De(),defaultExpandAll:De(),defaultExpandParent:De(),defaultExpandedKeys:kt(),expandedKeys:kt(),checkedKeys:rt([Array,Object]),defaultCheckedKeys:kt(),selectedKeys:kt(),defaultSelectedKeys:kt(),selectable:De(),loadedKeys:kt(),draggable:De(),showIcon:De(),icon:Oe(),switcherIcon:Z.any,prefixCls:String,replaceFields:qe(),blockNode:De(),openAnimation:Z.any,onDoubleclick:e.onDblclick,"onUpdate:selectedKeys":Oe(),"onUpdate:checkedKeys":Oe(),"onUpdate:expandedKeys":Oe()})},Nm=pe({compatConfig:{MODE:3},name:"ATree",inheritAttrs:!1,props:bt(Kz(),{checkable:!1,selectable:!0,showIcon:!1,blockNode:!1}),slots:Object,setup(e,t){let{attrs:n,expose:o,emit:r,slots:i}=t;e.treeData===void 0&&i.default;const{prefixCls:a,direction:l,virtual:s}=Ve("tree",e),[c,u]=hEe(a),d=he();o({treeRef:d,onNodeExpand:function(){var y;(y=d.value)===null||y===void 0||y.onNodeExpand(...arguments)},scrollTo:y=>{var b;(b=d.value)===null||b===void 0||b.scrollTo(y)},selectedKeys:M(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.selectedKeys}),checkedKeys:M(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.checkedKeys}),halfCheckedKeys:M(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.halfCheckedKeys}),loadedKeys:M(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.loadedKeys}),loadingKeys:M(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.loadingKeys}),expandedKeys:M(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.expandedKeys})}),ct(()=>{pn(e.replaceFields===void 0,"Tree","`replaceFields` is deprecated, please use fieldNames instead")});const h=(y,b)=>{r("update:checkedKeys",y),r("check",y,b)},m=(y,b)=>{r("update:expandedKeys",y),r("expand",y,b)},v=(y,b)=>{r("update:selectedKeys",y),r("select",y,b)};return()=>{const{showIcon:y,showLine:b,switcherIcon:$=i.switcherIcon,icon:x=i.icon,blockNode:_,checkable:w,selectable:I,fieldNames:O=e.replaceFields,motion:P=e.openAnimation,itemHeight:E=28,onDoubleclick:R,onDblclick:A}=e,N=S(S(S({},n),_t(e,["onUpdate:checkedKeys","onUpdate:expandedKeys","onUpdate:selectedKeys","onDoubleclick"])),{showLine:!!b,dropIndicatorRender:sEe,fieldNames:O,icon:x,itemHeight:E}),F=i.default?_n(i.default()):void 0;return c(g(zz,V(V({},N),{},{virtual:s.value,motion:P,ref:d,prefixCls:a.value,class:me({[`${a.value}-icon-hide`]:!y,[`${a.value}-block-node`]:_,[`${a.value}-unselectable`]:!I,[`${a.value}-rtl`]:l.value==="rtl"},n.class,u.value),direction:l.value,checkable:w,selectable:I,switcherIcon:W=>Wz(a.value,$,W,i.leafIcon,b),onCheck:h,onExpand:m,onSelect:v,onDblclick:A||R,children:F}),S(S({},i),{checkable:()=>g("span",{class:`${a.value}-checkbox-inner`},null)})))}}});var gEe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const vEe=gEe;function aR(e){for(var t=1;t{if(l===sl.End)return!1;if(s(c)){if(a.push(c),l===sl.None)l=sl.Start;else if(l===sl.Start)return l=sl.End,!1}else l===sl.Start&&a.push(c);return n.includes(c)}),a}function WC(e,t,n){const o=[...t],r=[];return WI(e,n,(i,a)=>{const l=o.indexOf(i);return l!==-1&&(r.push(a),o.splice(l,1)),!!o.length}),r}var wEe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rS(S({},Kz()),{expandAction:rt([Boolean,String])});function OEe(e){const{isLeaf:t,expanded:n}=e;return g(t?jz:n?bEe:$Ee,null,null)}const km=pe({compatConfig:{MODE:3},name:"ADirectoryTree",inheritAttrs:!1,props:bt(_Ee(),{showIcon:!0,expandAction:"click"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;var a;const l=he(e.treeData||Nx(_n((a=o.default)===null||a===void 0?void 0:a.call(o))));Ie(()=>e.treeData,()=>{l.value=e.treeData}),fr(()=>{wt(()=>{var E;e.treeData===void 0&&o.default&&(l.value=Nx(_n((E=o.default)===null||E===void 0?void 0:E.call(o))))})});const s=he(),c=he(),u=M(()=>Ay(e.fieldNames)),d=he();i({scrollTo:E=>{var R;(R=d.value)===null||R===void 0||R.scrollTo(E)},selectedKeys:M(()=>{var E;return(E=d.value)===null||E===void 0?void 0:E.selectedKeys}),checkedKeys:M(()=>{var E;return(E=d.value)===null||E===void 0?void 0:E.checkedKeys}),halfCheckedKeys:M(()=>{var E;return(E=d.value)===null||E===void 0?void 0:E.halfCheckedKeys}),loadedKeys:M(()=>{var E;return(E=d.value)===null||E===void 0?void 0:E.loadedKeys}),loadingKeys:M(()=>{var E;return(E=d.value)===null||E===void 0?void 0:E.loadingKeys}),expandedKeys:M(()=>{var E;return(E=d.value)===null||E===void 0?void 0:E.expandedKeys})});const h=()=>{const{keyEntities:E}=Qh(l.value,{fieldNames:u.value});let R;return e.defaultExpandAll?R=Object.keys(E):e.defaultExpandParent?R=Lx(e.expandedKeys||e.defaultExpandedKeys||[],E):R=e.expandedKeys||e.defaultExpandedKeys,R},m=he(e.selectedKeys||e.defaultSelectedKeys||[]),v=he(h());Ie(()=>e.selectedKeys,()=>{e.selectedKeys!==void 0&&(m.value=e.selectedKeys)},{immediate:!0}),Ie(()=>e.expandedKeys,()=>{e.expandedKeys!==void 0&&(v.value=e.expandedKeys)},{immediate:!0});const b=T_((E,R)=>{const{isLeaf:A}=R;A||E.shiftKey||E.metaKey||E.ctrlKey||d.value.onNodeExpand(E,R)},200,{leading:!0}),$=(E,R)=>{e.expandedKeys===void 0&&(v.value=E),r("update:expandedKeys",E),r("expand",E,R)},x=(E,R)=>{const{expandAction:A}=e;A==="click"&&b(E,R),r("click",E,R)},_=(E,R)=>{const{expandAction:A}=e;(A==="dblclick"||A==="doubleclick")&&b(E,R),r("doubleclick",E,R),r("dblclick",E,R)},w=(E,R)=>{const{multiple:A}=e,{node:N,nativeEvent:F}=R,W=N[u.value.key],D=S(S({},R),{selected:!0}),B=(F==null?void 0:F.ctrlKey)||(F==null?void 0:F.metaKey),k=F==null?void 0:F.shiftKey;let L;A&&B?(L=E,s.value=W,c.value=L,D.selectedNodes=WC(l.value,L,u.value)):A&&k?(L=Array.from(new Set([...c.value||[],...xEe({treeData:l.value,expandedKeys:v.value,startKey:W,endKey:s.value,fieldNames:u.value})])),D.selectedNodes=WC(l.value,L,u.value)):(L=[W],s.value=W,c.value=L,D.selectedNodes=WC(l.value,L,u.value)),r("update:selectedKeys",L),r("select",L,D),e.selectedKeys===void 0&&(m.value=L)},I=(E,R)=>{r("update:checkedKeys",E),r("check",E,R)},{prefixCls:O,direction:P}=Ve("tree",e);return()=>{const E=me(`${O.value}-directory`,{[`${O.value}-directory-rtl`]:P.value==="rtl"},n.class),{icon:R=o.icon,blockNode:A=!0}=e,N=wEe(e,["icon","blockNode"]);return g(Nm,V(V(V({},n),{},{icon:R||OEe,ref:d,blockNode:A},N),{},{prefixCls:O.value,class:E,expandedKeys:v.value,selectedKeys:m.value,onSelect:w,onClick:x,onDblclick:_,onExpand:$,onCheck:I}),o)}}}),Bm=Dx,Uz=S(Nm,{DirectoryTree:km,TreeNode:Bm,install:e=>(e.component(Nm.name,Nm),e.component(Bm.name,Bm),e.component(km.name,km),e)});function sR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const o=new Set;function r(i,a){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const s=o.has(i);if(Hb(!s,"Warning: There may be circular references"),s)return!1;if(i===a)return!0;if(n&&l>1)return!1;o.add(i);const c=l+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(let u=0;ur(i[d],a[d],c))}return!1}return r(e,t)}const{SubMenu:IEe,Item:PEe}=qn;function TEe(e){return e.some(t=>{let{children:n}=t;return n&&n.length>0})}function Gz(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function Yz(e){let{filters:t,prefixCls:n,filteredKeys:o,filterMultiple:r,searchValue:i,filterSearch:a}=e;return t.map((l,s)=>{const c=String(l.value);if(l.children)return g(IEe,{key:c||s,title:l.text,popupClassName:`${n}-dropdown-submenu`},{default:()=>[Yz({filters:l.children,prefixCls:n,filteredKeys:o,filterMultiple:r,searchValue:i,filterSearch:a})]});const u=r?Ri:yr,d=g(PEe,{key:l.value!==void 0?c:s},{default:()=>[g(u,{checked:o.includes(c)},null),g("span",null,[l.text])]});return i.trim()?typeof a=="function"?a(i,l)?d:void 0:Gz(i,l.text)?d:void 0:d})}const EEe=pe({name:"FilterDropdown",props:["tablePrefixCls","prefixCls","dropdownPrefixCls","column","filterState","filterMultiple","filterMode","filterSearch","columnKey","triggerFilter","locale","getPopupContainer"],setup(e,t){let{slots:n}=t;const o=AI(),r=M(()=>{var Y;return(Y=e.filterMode)!==null&&Y!==void 0?Y:"menu"}),i=M(()=>{var Y;return(Y=e.filterSearch)!==null&&Y!==void 0?Y:!1}),a=M(()=>e.column.filterDropdownOpen||e.column.filterDropdownVisible),l=M(()=>e.column.onFilterDropdownOpenChange||e.column.onFilterDropdownVisibleChange),s=ve(!1),c=M(()=>{var Y;return!!(e.filterState&&(!((Y=e.filterState.filteredKeys)===null||Y===void 0)&&Y.length||e.filterState.forceFiltered))}),u=M(()=>{var Y;return Yy((Y=e.column)===null||Y===void 0?void 0:Y.filters)}),d=M(()=>{const{filterDropdown:Y,slots:ne={},customFilterDropdown:re}=e.column;return Y||ne.filterDropdown&&o.value[ne.filterDropdown]||re&&o.value.customFilterDropdown}),f=M(()=>{const{filterIcon:Y,slots:ne={}}=e.column;return Y||ne.filterIcon&&o.value[ne.filterIcon]||o.value.customFilterIcon}),h=Y=>{var ne;s.value=Y,(ne=l.value)===null||ne===void 0||ne.call(l,Y)},m=M(()=>typeof a.value=="boolean"?a.value:s.value),v=M(()=>{var Y;return(Y=e.filterState)===null||Y===void 0?void 0:Y.filteredKeys}),y=ve([]),b=Y=>{let{selectedKeys:ne}=Y;y.value=ne},$=(Y,ne)=>{let{node:re,checked:J}=ne;e.filterMultiple?b({selectedKeys:Y}):b({selectedKeys:J&&re.key?[re.key]:[]})};Ie(v,()=>{s.value&&b({selectedKeys:v.value||[]})},{immediate:!0});const x=ve([]),_=ve(),w=Y=>{_.value=setTimeout(()=>{x.value=Y})},I=()=>{clearTimeout(_.value)};Ct(()=>{clearTimeout(_.value)});const O=ve(""),P=Y=>{const{value:ne}=Y.target;O.value=ne};Ie(s,()=>{s.value||(O.value="")});const E=Y=>{const{column:ne,columnKey:re,filterState:J}=e,te=Y&&Y.length?Y:null;if(te===null&&(!J||!J.filteredKeys)||sR(te,J==null?void 0:J.filteredKeys,!0))return null;e.triggerFilter({column:ne,key:re,filteredKeys:te})},R=()=>{h(!1),E(y.value)},A=function(){let{confirm:Y,closeDropdown:ne}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Y&&E([]),ne&&h(!1),O.value="",e.column.filterResetToDefaultFilteredValue?y.value=(e.column.defaultFilteredValue||[]).map(re=>String(re)):y.value=[]},N=function(){let{closeDropdown:Y}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Y&&h(!1),E(y.value)},F=Y=>{Y&&v.value!==void 0&&(y.value=v.value||[]),h(Y),!Y&&!d.value&&R()},{direction:W}=Ve("",e),D=Y=>{if(Y.target.checked){const ne=u.value;y.value=ne}else y.value=[]},B=Y=>{let{filters:ne}=Y;return(ne||[]).map((re,J)=>{const te=String(re.value),ee={title:re.text,key:re.value!==void 0?te:J};return re.children&&(ee.children=B({filters:re.children})),ee})},k=Y=>{var ne;return S(S({},Y),{text:Y.title,value:Y.key,children:((ne=Y.children)===null||ne===void 0?void 0:ne.map(re=>k(re)))||[]})},L=M(()=>B({filters:e.column.filters})),z=M(()=>me({[`${e.dropdownPrefixCls}-menu-without-submenu`]:!TEe(e.column.filters||[])})),K=()=>{const Y=y.value,{column:ne,locale:re,tablePrefixCls:J,filterMultiple:te,dropdownPrefixCls:ee,getPopupContainer:fe,prefixCls:ie}=e;return(ne.filters||[]).length===0?g(cs,{image:cs.PRESENTED_IMAGE_SIMPLE,description:re.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}},null):r.value==="tree"?g(Je,null,[g(G8,{filterSearch:i.value,value:O.value,onChange:P,tablePrefixCls:J,locale:re},null),g("div",{class:`${J}-filter-dropdown-tree`},[te?g(Ri,{class:`${J}-filter-dropdown-checkall`,onChange:D,checked:Y.length===u.value.length,indeterminate:Y.length>0&&Y.length[re.filterCheckall]}):null,g(Uz,{checkable:!0,selectable:!1,blockNode:!0,multiple:te,checkStrictly:!te,class:`${ee}-menu`,onCheck:$,checkedKeys:Y,selectedKeys:Y,showIcon:!1,treeData:L.value,autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:O.value.trim()?X=>typeof i.value=="function"?i.value(O.value,k(X)):Gz(O.value,X.title):void 0},null)])]):g(Je,null,[g(G8,{filterSearch:i.value,value:O.value,onChange:P,tablePrefixCls:J,locale:re},null),g(qn,{multiple:te,prefixCls:`${ee}-menu`,class:z.value,onClick:I,onSelect:b,onDeselect:b,selectedKeys:Y,getPopupContainer:fe,openKeys:x.value,onOpenChange:w},{default:()=>Yz({filters:ne.filters||[],filterSearch:i.value,prefixCls:ie,filteredKeys:y.value,filterMultiple:te,searchValue:O.value})})])},G=M(()=>{const Y=y.value;return e.column.filterResetToDefaultFilteredValue?sR((e.column.defaultFilteredValue||[]).map(ne=>String(ne)),Y,!0):Y.length===0});return()=>{var Y;const{tablePrefixCls:ne,prefixCls:re,column:J,dropdownPrefixCls:te,locale:ee,getPopupContainer:fe}=e;let ie;typeof d.value=="function"?ie=d.value({prefixCls:`${te}-custom`,setSelectedKeys:ye=>b({selectedKeys:ye}),selectedKeys:y.value,confirm:N,clearFilters:A,filters:J.filters,visible:m.value,column:J.__originColumn__,close:()=>{h(!1)}}):d.value?ie=d.value:ie=g(Je,null,[K(),g("div",{class:`${re}-dropdown-btns`},[g(Un,{type:"link",size:"small",disabled:G.value,onClick:()=>A()},{default:()=>[ee.filterReset]}),g(Un,{type:"primary",size:"small",onClick:R},{default:()=>[ee.filterConfirm]})])]);const X=g(FTe,{class:`${re}-dropdown`},{default:()=>[ie]});let ue;return typeof f.value=="function"?ue=f.value({filtered:c.value,column:J.__originColumn__}):f.value?ue=f.value:ue=g(NTe,null,null),g("div",{class:`${re}-column`},[g("span",{class:`${ne}-column-title`},[(Y=n.default)===null||Y===void 0?void 0:Y.call(n)]),g(Ta,{overlay:X,trigger:["click"],open:m.value,onOpenChange:F,getPopupContainer:fe,placement:W.value==="rtl"?"bottomLeft":"bottomRight"},{default:()=>[g("span",{role:"button",tabindex:-1,class:me(`${re}-trigger`,{active:c.value}),onClick:ye=>{ye.stopPropagation()}},[ue])]})])}}});function pw(e,t,n){let o=[];return(e||[]).forEach((r,i)=>{var a,l;const s=ng(i,n),c=r.filterDropdown||((a=r==null?void 0:r.slots)===null||a===void 0?void 0:a.filterDropdown)||r.customFilterDropdown;if(r.filters||c||"onFilter"in r)if("filteredValue"in r){let u=r.filteredValue;c||(u=(l=u==null?void 0:u.map(String))!==null&&l!==void 0?l:u),o.push({column:r,key:Nc(r,s),filteredKeys:u,forceFiltered:r.filtered})}else o.push({column:r,key:Nc(r,s),filteredKeys:t&&r.defaultFilteredValue?r.defaultFilteredValue:void 0,forceFiltered:r.filtered});"children"in r&&(o=[...o,...pw(r.children,t,s)])}),o}function Xz(e,t,n,o,r,i,a,l){return n.map((s,c)=>{var u;const d=ng(c,l),{filterMultiple:f=!0,filterMode:h,filterSearch:m}=s;let v=s;const y=s.filterDropdown||((u=s==null?void 0:s.slots)===null||u===void 0?void 0:u.filterDropdown)||s.customFilterDropdown;if(v.filters||y){const b=Nc(v,d),$=o.find(x=>{let{key:_}=x;return b===_});v=S(S({},v),{title:x=>g(EEe,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:v,columnKey:b,filterState:$,filterMultiple:f,filterMode:h,filterSearch:m,triggerFilter:i,locale:r,getPopupContainer:a},{default:()=>[LI(s.title,x)]})})}return"children"in v&&(v=S(S({},v),{children:Xz(e,t,v.children,o,r,i,a,d)})),v})}function Yy(e){let t=[];return(e||[]).forEach(n=>{let{value:o,children:r}=n;t.push(o),r&&(t=[...t,...Yy(r)])}),t}function cR(e){const t={};return e.forEach(n=>{let{key:o,filteredKeys:r,column:i}=n;var a;const l=i.filterDropdown||((a=i==null?void 0:i.slots)===null||a===void 0?void 0:a.filterDropdown)||i.customFilterDropdown,{filters:s}=i;if(l)t[o]=r||null;else if(Array.isArray(r)){const c=Yy(s);t[o]=c.filter(u=>r.includes(String(u)))}else t[o]=null}),t}function uR(e,t){return t.reduce((n,o)=>{const{column:{onFilter:r,filters:i},filteredKeys:a}=o;return r&&a&&a.length?n.filter(l=>a.some(s=>{const c=Yy(i),u=c.findIndex(f=>String(f)===String(s)),d=u!==-1?c[u]:s;return r(d,l)})):n},e)}function qz(e){return e.flatMap(t=>"children"in t?[t,...qz(t.children||[])]:[t])}function AEe(e){let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:o,locale:r,onFilterChange:i,getPopupContainer:a}=e;const l=M(()=>qz(o.value)),[s,c]=nn(pw(l.value,!0)),u=M(()=>{const m=pw(l.value,!1);if(m.length===0)return m;let v=!0,y=!0;if(m.forEach(b=>{let{filteredKeys:$}=b;$!==void 0?v=!1:y=!1}),v){const b=(l.value||[]).map(($,x)=>Nc($,ng(x)));return s.value.filter($=>{let{key:x}=$;return b.includes(x)}).map($=>{const x=l.value[b.findIndex(_=>_===$.key)];return S(S({},$),{column:S(S({},$.column),x),forceFiltered:x.filtered})})}return pn(y,"Table","Columns should all contain `filteredValue` or not contain `filteredValue`."),m}),d=M(()=>cR(u.value)),f=m=>{const v=u.value.filter(y=>{let{key:b}=y;return b!==m.key});v.push(m),c(v),i(cR(v),v)};return[m=>Xz(t.value,n.value,m,u.value,r.value,f,a.value),u,d]}function Zz(e,t){return e.map(n=>{const o=S({},n);return o.title=LI(o.title,t),"children"in o&&(o.children=Zz(o.children,t)),o})}function MEe(e){return[n=>Zz(n,e.value)]}function REe(e){return function(n){let{prefixCls:o,onExpand:r,record:i,expanded:a,expandable:l}=n;const s=`${o}-row-expand-icon`;return g("button",{type:"button",onClick:c=>{r(i,c),c.stopPropagation()},class:me(s,{[`${s}-spaced`]:!l,[`${s}-expanded`]:l&&a,[`${s}-collapsed`]:l&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a},null)}}function Qz(e,t){const n=t.value;return e.map(o=>{var r;if(o===ll||o===as)return o;const i=S({},o),{slots:a={}}=i;return i.__originColumn__=o,pn(!("slots"in i),"Table","`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."),Object.keys(a).forEach(l=>{const s=a[l];i[l]===void 0&&n[s]&&(i[l]=n[s])}),t.value.headerCell&&!(!((r=o.slots)===null||r===void 0)&&r.title)&&(i.title=Gb(t.value,"headerCell",{title:o.title,column:o},()=>[o.title])),"children"in i&&Array.isArray(i.children)&&(i.children=Qz(i.children,t)),i})}function DEe(e){return[n=>Qz(n,e)]}const LEe=e=>{const{componentCls:t}=e,n=`${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`,o=(r,i,a)=>({[`&${t}-${r}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`-${i}px -${a+e.lineWidth}px`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:S(S(S({[`> ${t}-title`]:{border:n,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:n,[` + > ${t}-content, + > ${t}-header, + > ${t}-body, + > ${t}-summary + `]:{"> table":{"\n > thead > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:n},"> thead":{"> tr:not(:last-child) > th":{borderBottom:n},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:n}},"> tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`-${e.tablePaddingVertical}px -${e.tablePaddingHorizontal+e.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:e.lineWidth,bottom:0,borderInlineEnd:n,content:'""'}}}}},[` + > ${t}-content, + > ${t}-header + `]:{"> table":{borderTop:n}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[` + > tr${t}-expanded-row, + > tr${t}-placeholder + `]:{"> td":{borderInlineEnd:0}}}}}},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:n,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${e.lineWidth}px 0 ${e.lineWidth}px ${e.tableHeaderBg}`}}}}},NEe=LEe,kEe=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:S(S({},eo),{wordBreak:"keep-all",[` + &${t}-cell-fix-left-last, + &${t}-cell-fix-right-first + `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},BEe=kEe,FEe=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"&:hover > td":{background:e.colorBgContainer}}}}},HEe=FEe,zEe=e=>{const{componentCls:t,antCls:n,controlInteractiveSize:o,motionDurationSlow:r,lineWidth:i,paddingXS:a,lineType:l,tableBorderColor:s,tableExpandIconBg:c,tableExpandColumnWidth:u,borderRadius:d,fontSize:f,fontSizeSM:h,lineHeight:m,tablePaddingVertical:v,tablePaddingHorizontal:y,tableExpandedRowBg:b,paddingXXS:$}=e,x=o/2-i,_=x*2+i*3,w=`${i}px ${l} ${s}`,I=$-i;return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:u},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:S(S({},Vb(e)),{position:"relative",float:"left",boxSizing:"border-box",width:_,height:_,padding:0,color:"inherit",lineHeight:`${_}px`,background:c,border:w,borderRadius:d,transform:`scale(${o/_})`,transition:`all ${r}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${r} ease-out`,content:'""'},"&::before":{top:x,insetInlineEnd:I,insetInlineStart:I,height:i},"&::after":{top:I,bottom:I,insetInlineStart:x,width:i,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:(f*m-i*3)/2-Math.ceil((h*1.4-i*3)/2),marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> td":{background:b}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`-${v}px -${y}px`,padding:`${v}px ${y}px`}}}},jEe=zEe,WEe=e=>{const{componentCls:t,antCls:n,iconCls:o,tableFilterDropdownWidth:r,tableFilterDropdownSearchWidth:i,paddingXXS:a,paddingXS:l,colorText:s,lineWidth:c,lineType:u,tableBorderColor:d,tableHeaderIconColor:f,fontSizeSM:h,tablePaddingHorizontal:m,borderRadius:v,motionDurationSlow:y,colorTextDescription:b,colorPrimary:$,tableHeaderFilterActiveBg:x,colorTextDisabled:_,tableFilterDropdownBg:w,tableFilterDropdownHeight:I,controlItemBgHover:O,controlItemBgActive:P,boxShadowSecondary:E}=e,R=`${n}-dropdown`,A=`${t}-filter-dropdown`,N=`${n}-tree`,F=`${c}px ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-a,marginInline:`${a}px ${-m/2}px`,padding:`0 ${a}px`,color:f,fontSize:h,borderRadius:v,cursor:"pointer",transition:`all ${y}`,"&:hover":{color:b,background:x},"&.active":{color:$}}}},{[`${n}-dropdown`]:{[A]:S(S({},vt(e)),{minWidth:r,backgroundColor:w,borderRadius:v,boxShadow:E,[`${R}-menu`]:{maxHeight:I,overflowX:"hidden",border:0,boxShadow:"none","&:empty::after":{display:"block",padding:`${l}px 0`,color:_,fontSize:h,textAlign:"center",content:'"Not Found"'}},[`${A}-tree`]:{paddingBlock:`${l}px 0`,paddingInline:l,[N]:{padding:0},[`${N}-treenode ${N}-node-content-wrapper:hover`]:{backgroundColor:O},[`${N}-treenode-checkbox-checked ${N}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:P}}},[`${A}-search`]:{padding:l,borderBottom:F,"&-input":{input:{minWidth:i},[o]:{color:_}}},[`${A}-checkall`]:{width:"100%",marginBottom:a,marginInlineStart:a},[`${A}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${l-c}px ${l}px`,overflow:"hidden",backgroundColor:"inherit",borderTop:F}})}},{[`${n}-dropdown ${A}, ${A}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:s},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},VEe=WEe,KEe=e=>{const{componentCls:t,lineWidth:n,colorSplit:o,motionDurationSlow:r,zIndexTableFixed:i,tableBg:a,zIndexTableSticky:l}=e,s=o;return{[`${t}-wrapper`]:{[` + ${t}-cell-fix-left, + ${t}-cell-fix-right + `]:{position:"sticky !important",zIndex:i,background:a},[` + ${t}-cell-fix-left-first::after, + ${t}-cell-fix-left-last::after + `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-n,width:30,transform:"translateX(100%)",transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[` + ${t}-cell-fix-right-first::after, + ${t}-cell-fix-right-last::after + `]:{position:"absolute",top:0,bottom:-n,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:l+1,width:30,transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${s}`}},[` + ${t}-cell-fix-left-first::after, + ${t}-cell-fix-left-last::after + `]:{boxShadow:`inset 10px 0 8px -8px ${s}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${s}`}},[` + ${t}-cell-fix-right-first::after, + ${t}-cell-fix-right-last::after + `]:{boxShadow:`inset -10px 0 8px -8px ${s}`}}}}},UEe=KEe,GEe=e=>{const{componentCls:t,antCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${e.margin}px 0`},[`${t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},YEe=GEe,XEe=e=>{const{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${n}px ${n}px 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,table:{borderRadius:0,"> thead > tr:first-child":{"th:first-child":{borderRadius:0},"th:last-child":{borderRadius:0}}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${n}px ${n}px`}}}}},qEe=XEe,ZEe=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{"&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}}}}},QEe=ZEe,JEe=e=>{const{componentCls:t,antCls:n,iconCls:o,fontSizeIcon:r,paddingXS:i,tableHeaderIconColor:a,tableHeaderIconColorHover:l}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:e.tableSelectionColumnWidth},[`${t}-bordered ${t}-selection-col`]:{width:e.tableSelectionColumnWidth+i*2},[` + table tr th${t}-selection-column, + table tr td${t}-selection-column + `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:e.zIndexTableFixed+1},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${e.tablePaddingHorizontal/4}px`,[o]:{color:a,fontSize:r,verticalAlign:"baseline","&:hover":{color:l}}}}}},e4e=JEe,t4e=e=>{const{componentCls:t}=e,n=(o,r,i,a)=>({[`${t}${t}-${o}`]:{fontSize:a,[` + ${t}-title, + ${t}-footer, + ${t}-thead > tr > th, + ${t}-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `]:{padding:`${r}px ${i}px`},[`${t}-filter-trigger`]:{marginInlineEnd:`-${i/2}px`},[`${t}-expanded-row-fixed`]:{margin:`-${r}px -${i}px`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:`-${r}px`,marginInline:`${e.tableExpandColumnWidth-i}px -${i}px`}},[`${t}-selection-column`]:{paddingInlineStart:`${i/4}px`}}});return{[`${t}-wrapper`]:S(S({},n("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),n("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},n4e=t4e,o4e=e=>{const{componentCls:t}=e;return{[`${t}-wrapper ${t}-resize-handle`]:{position:"absolute",top:0,height:"100% !important",bottom:0,left:" auto !important",right:" -8px",cursor:"col-resize",touchAction:"none",userSelect:"auto",width:"16px",zIndex:1,"&-line":{display:"block",width:"1px",marginLeft:"7px",height:"100% !important",backgroundColor:e.colorPrimary,opacity:0},"&:hover &-line":{opacity:1}},[`${t}-wrapper ${t}-resize-handle.dragging`]:{overflow:"hidden",[`${t}-resize-handle-line`]:{opacity:1},"&:before":{position:"absolute",top:0,bottom:0,content:'" "',width:"200vw",transform:"translateX(-50%)",opacity:0}}}},r4e=o4e,i4e=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:o,tableHeaderIconColor:r,tableHeaderIconColorHover:i}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[` + &${t}-cell-fix-left:hover, + &${t}-cell-fix-right:hover + `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorter`]:{marginInlineStart:n,color:r,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:o,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:i}}}},a4e=i4e,l4e=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollThumbSize:i,tableScrollBg:a,zIndexTableSticky:l}=e,s=`${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${i}px !important`,zIndex:l,display:"flex",alignItems:"center",background:a,borderTop:s,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:o,borderRadius:100,transition:`all ${e.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:r}}}}}}},s4e=l4e,c4e=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:o}=e,r=`${n}px ${e.lineType} ${o}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:r}}},[`div${t}-summary`]:{boxShadow:`0 -${n}px 0 ${o}`}}}},dR=c4e,u4e=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:o,tablePaddingHorizontal:r,lineWidth:i,lineType:a,tableBorderColor:l,tableFontSize:s,tableBg:c,tableRadius:u,tableHeaderTextColor:d,motionDurationMid:f,tableHeaderBg:h,tableHeaderCellSplitColor:m,tableRowHoverBg:v,tableSelectedRowBg:y,tableSelectedRowHoverBg:b,tableFooterTextColor:$,tableFooterBg:x,paddingContentVerticalLG:_}=e,w=`${i}px ${a} ${l}`;return{[`${t}-wrapper`]:S(S({clear:"both",maxWidth:"100%"},aa()),{[t]:S(S({},vt(e)),{fontSize:s,background:c,borderRadius:`${u}px ${u}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${u}px ${u}px 0 0`,borderCollapse:"separate",borderSpacing:0},[` + ${t}-thead > tr > th, + ${t}-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `]:{position:"relative",padding:`${_}px ${r}px`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${o}px ${r}px`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:d,fontWeight:n,textAlign:"start",background:h,borderBottom:w,transition:`background ${f} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:m,transform:"translateY(-50%)",transition:`background-color ${f}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}:not(${t}-bordered)`]:{[`${t}-tbody`]:{"> tr":{"> td":{borderTop:w,borderBottom:"transparent"},"&:last-child > td":{borderBottom:w},[`&:first-child > td, + &${t}-measure-row + tr > td`]:{borderTop:"none",borderTopColor:"transparent"}}}},[`${t}${t}-bordered`]:{[`${t}-tbody`]:{"> tr":{"> td":{borderBottom:w}}}},[`${t}-tbody`]:{"> tr":{"> td":{transition:`background ${f}, border-color ${f}`,[` + > ${t}-wrapper:only-child, + > ${t}-expanded-row-fixed > ${t}-wrapper:only-child + `]:{[t]:{marginBlock:`-${o}px`,marginInline:`${e.tableExpandColumnWidth-r}px -${r}px`,[`${t}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},[` + &${t}-row:hover > td, + > td${t}-cell-row-hover + `]:{background:v},[`&${t}-row-selected`]:{"> td":{background:y},"&:hover > td":{background:b}}}},[`${t}-footer`]:{padding:`${o}px ${r}px`,color:$,background:x}})}},d4e=pt("Table",e=>{const{controlItemBgActive:t,controlItemBgActiveHover:n,colorTextPlaceholder:o,colorTextHeading:r,colorSplit:i,colorBorderSecondary:a,fontSize:l,padding:s,paddingXS:c,paddingSM:u,controlHeight:d,colorFillAlter:f,colorIcon:h,colorIconHover:m,opacityLoading:v,colorBgContainer:y,borderRadiusLG:b,colorFillContent:$,colorFillSecondary:x,controlInteractiveSize:_}=e,w=new Zt(h),I=new Zt(m),O=t,P=2,E=new Zt(x).onBackground(y).toHexString(),R=new Zt($).onBackground(y).toHexString(),A=new Zt(f).onBackground(y).toHexString(),N=nt(e,{tableFontSize:l,tableBg:y,tableRadius:b,tablePaddingVertical:s,tablePaddingHorizontal:s,tablePaddingVerticalMiddle:u,tablePaddingHorizontalMiddle:c,tablePaddingVerticalSmall:c,tablePaddingHorizontalSmall:c,tableBorderColor:a,tableHeaderTextColor:r,tableHeaderBg:A,tableFooterTextColor:r,tableFooterBg:A,tableHeaderCellSplitColor:a,tableHeaderSortBg:E,tableHeaderSortHoverBg:R,tableHeaderIconColor:w.clone().setAlpha(w.getAlpha()*v).toRgbString(),tableHeaderIconColorHover:I.clone().setAlpha(I.getAlpha()*v).toRgbString(),tableBodySortBg:A,tableFixedHeaderSortActiveBg:E,tableHeaderFilterActiveBg:$,tableFilterDropdownBg:y,tableRowHoverBg:A,tableSelectedRowBg:O,tableSelectedRowHoverBg:n,zIndexTableFixed:P,zIndexTableSticky:P+1,tableFontSizeMiddle:l,tableFontSizeSmall:l,tableSelectionColumnWidth:d,tableExpandIconBg:y,tableExpandColumnWidth:_+2*e.padding,tableExpandedRowBg:f,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollBg:i});return[u4e(N),YEe(N),dR(N),a4e(N),VEe(N),NEe(N),qEe(N),jEe(N),dR(N),HEe(N),e4e(N),UEe(N),s4e(N),BEe(N),n4e(N),r4e(N),QEe(N)]}),f4e=[],Jz=()=>({prefixCls:Qe(),columns:kt(),rowKey:rt([String,Function]),tableLayout:Qe(),rowClassName:rt([String,Function]),title:Oe(),footer:Oe(),id:Qe(),showHeader:De(),components:qe(),customRow:Oe(),customHeaderRow:Oe(),direction:Qe(),expandFixed:rt([Boolean,String]),expandColumnWidth:Number,expandedRowKeys:kt(),defaultExpandedRowKeys:kt(),expandedRowRender:Oe(),expandRowByClick:De(),expandIcon:Oe(),onExpand:Oe(),onExpandedRowsChange:Oe(),"onUpdate:expandedRowKeys":Oe(),defaultExpandAllRows:De(),indentSize:Number,expandIconColumnIndex:Number,showExpandColumn:De(),expandedRowClassName:Oe(),childrenColumnName:Qe(),rowExpandable:Oe(),sticky:rt([Boolean,Object]),dropdownPrefixCls:String,dataSource:kt(),pagination:rt([Boolean,Object]),loading:rt([Boolean,Object]),size:Qe(),bordered:De(),locale:qe(),onChange:Oe(),onResizeColumn:Oe(),rowSelection:qe(),getPopupContainer:Oe(),scroll:qe(),sortDirections:kt(),showSorterTooltip:rt([Boolean,Object],!0),transformCellText:Oe()}),p4e=pe({name:"InternalTable",inheritAttrs:!1,props:bt(S(S({},Jz()),{contextSlots:qe()}),{rowKey:"key"}),setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;pn(!(typeof e.rowKey=="function"&&e.rowKey.length>1),"Table","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."),OPe(M(()=>e.contextSlots)),IPe({onResizeColumn:(se,ae)=>{i("resizeColumn",se,ae)}});const a=ff(),l=M(()=>{const se=new Set(Object.keys(a.value).filter(ae=>a.value[ae]));return e.columns.filter(ae=>!ae.responsive||ae.responsive.some(ge=>se.has(ge)))}),{size:s,renderEmpty:c,direction:u,prefixCls:d,configProvider:f}=Ve("table",e),[h,m]=d4e(d),v=M(()=>{var se;return e.transformCellText||((se=f.transformCellText)===null||se===void 0?void 0:se.value)}),[y]=Wi("Table",cr.Table,st(e,"locale")),b=M(()=>e.dataSource||f4e),$=M(()=>f.getPrefixCls("dropdown",e.dropdownPrefixCls)),x=M(()=>e.childrenColumnName||"children"),_=M(()=>b.value.some(se=>se==null?void 0:se[x.value])?"nest":e.expandedRowRender?"row":null),w=St({body:null}),I=se=>{S(w,se)},O=M(()=>typeof e.rowKey=="function"?e.rowKey:se=>se==null?void 0:se[e.rowKey]),[P]=yTe(b,x,O),E={},R=function(se,ae){let ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{pagination:Se,scroll:$e,onChange:_e}=e,be=S(S({},E),se);ge&&(E.resetPagination(),be.pagination.current&&(be.pagination.current=1),Se&&Se.onChange&&Se.onChange(1,be.pagination.pageSize)),$e&&$e.scrollToFirstRowOnChange!==!1&&w.body&&F2(0,{getContainer:()=>w.body}),_e==null||_e(be.pagination,be.filters,be.sorter,{currentDataSource:uR(dw(b.value,be.sorterStates,x.value),be.filterStates),action:ae})},A=(se,ae)=>{R({sorter:se,sorterStates:ae},"sort",!1)},[N,F,W,D]=MTe({prefixCls:d,mergedColumns:l,onSorterChange:A,sortDirections:M(()=>e.sortDirections||["ascend","descend"]),tableLocale:y,showSorterTooltip:st(e,"showSorterTooltip")}),B=M(()=>dw(b.value,F.value,x.value)),k=(se,ae)=>{R({filters:se,filterStates:ae},"filter",!0)},[L,z,K]=AEe({prefixCls:d,locale:y,dropdownPrefixCls:$,mergedColumns:l,onFilterChange:k,getPopupContainer:st(e,"getPopupContainer")}),G=M(()=>uR(B.value,z.value)),[Y]=DEe(st(e,"contextSlots")),ne=M(()=>{const se={},ae=K.value;return Object.keys(ae).forEach(ge=>{ae[ge]!==null&&(se[ge]=ae[ge])}),S(S({},W.value),{filters:se})}),[re]=MEe(ne),J=(se,ae)=>{R({pagination:S(S({},E.pagination),{current:se,pageSize:ae})},"paginate")},[te,ee]=bTe(M(()=>G.value.length),st(e,"pagination"),J);ct(()=>{E.sorter=D.value,E.sorterStates=F.value,E.filters=K.value,E.filterStates=z.value,E.pagination=e.pagination===!1?{}:mTe(te.value,e.pagination),E.resetPagination=ee});const fe=M(()=>{if(e.pagination===!1||!te.value.pageSize)return G.value;const{current:se=1,total:ae,pageSize:ge=aw}=te.value;return pn(se>0,"Table","`current` should be positive number."),G.value.lengthge?G.value.slice((se-1)*ge,se*ge):G.value:G.value.slice((se-1)*ge,se*ge)});ct(()=>{wt(()=>{const{total:se,pageSize:ae=aw}=te.value;G.value.lengthae&&pn(!1,"Table","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.")})},{flush:"post"});const ie=M(()=>e.showExpandColumn===!1?-1:_.value==="nest"&&e.expandIconColumnIndex===void 0?e.rowSelection?1:0:e.expandIconColumnIndex>0&&e.rowSelection?e.expandIconColumnIndex-1:e.expandIconColumnIndex),X=he();Ie(()=>e.rowSelection,()=>{X.value=e.rowSelection?S({},e.rowSelection):e.rowSelection},{deep:!0,immediate:!0});const[ue,ye]=CTe(X,{prefixCls:d,data:G,pageData:fe,getRowKey:O,getRecordByKey:P,expandType:_,childrenColumnName:x,locale:y,getPopupContainer:M(()=>e.getPopupContainer)}),H=(se,ae,ge)=>{let Se;const{rowClassName:$e}=e;return typeof $e=="function"?Se=me($e(se,ae,ge)):Se=me($e),me({[`${d.value}-row-selected`]:ye.value.has(O.value(se,ae))},Se)};r({selectedKeySet:ye});const j=M(()=>typeof e.indentSize=="number"?e.indentSize:15),q=se=>re(ue(L(N(Y(se)))));return()=>{var se;const{expandIcon:ae=o.expandIcon||REe(y.value),pagination:ge,loading:Se,bordered:$e}=e;let _e,be;if(ge!==!1&&(!((se=te.value)===null||se===void 0)&&se.total)){let le;te.value.size?le=te.value.size:le=s.value==="small"||s.value==="middle"?"small":void 0;const xe=Ye=>g(Wy,V(V({},te.value),{},{class:[`${d.value}-pagination ${d.value}-pagination-${Ye}`,te.value.class],size:le}),null),Ae=u.value==="rtl"?"left":"right",{position:Be}=te.value;if(Be!==null&&Array.isArray(Be)){const Ye=Be.find(Ne=>Ne.includes("top")),Re=Be.find(Ne=>Ne.includes("bottom")),Le=Be.every(Ne=>`${Ne}`=="none");!Ye&&!Re&&!Le&&(be=xe(Ae)),Ye&&(_e=xe(Ye.toLowerCase().replace("top",""))),Re&&(be=xe(Re.toLowerCase().replace("bottom","")))}else be=xe(Ae)}let Te;typeof Se=="boolean"?Te={spinning:Se}:typeof Se=="object"&&(Te=S({spinning:!0},Se));const Pe=me(`${d.value}-wrapper`,{[`${d.value}-wrapper-rtl`]:u.value==="rtl"},n.class,m.value),oe=_t(e,["columns"]);return h(g("div",{class:Pe,style:n.style},[g(Aa,V({spinning:!1},Te),{default:()=>[_e,g(gTe,V(V(V({},n),oe),{},{expandedRowKeys:e.expandedRowKeys,defaultExpandedRowKeys:e.defaultExpandedRowKeys,expandIconColumnIndex:ie.value,indentSize:j.value,expandIcon:ae,columns:l.value,direction:u.value,prefixCls:d.value,class:me({[`${d.value}-middle`]:s.value==="middle",[`${d.value}-small`]:s.value==="small",[`${d.value}-bordered`]:$e,[`${d.value}-empty`]:b.value.length===0}),data:fe.value,rowKey:O.value,rowClassName:H,internalHooks:iw,internalRefs:w,onUpdateInternalRefs:I,transformColumns:q,transformCellText:v.value}),S(S({},o),{emptyText:()=>{var le,xe;return((le=o.emptyText)===null||le===void 0?void 0:le.call(o))||((xe=e.locale)===null||xe===void 0?void 0:xe.emptyText)||c("Table")}})),be]})]))}}}),h4e=pe({name:"ATable",inheritAttrs:!1,props:bt(Jz(),{rowKey:"key"}),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=he();return r({table:i}),()=>{var a;const l=e.columns||Bz((a=o.default)===null||a===void 0?void 0:a.call(o));return g(p4e,V(V(V({ref:i},n),e),{},{columns:l||[],expandedRowRender:o.expandedRowRender||e.expandedRowRender,contextSlots:S({},o)}),o)}}}),VC=h4e,Fm=pe({name:"ATableColumn",slots:Object,render(){return null}}),Hm=pe({name:"ATableColumnGroup",slots:Object,__ANT_TABLE_COLUMN_GROUP:!0,render(){return null}}),q0=oTe,Z0=aTe,zm=S(lTe,{Cell:Z0,Row:q0,name:"ATableSummary"}),g4e=S(VC,{SELECTION_ALL:lw,SELECTION_INVERT:sw,SELECTION_NONE:cw,SELECTION_COLUMN:ll,EXPAND_COLUMN:as,Column:Fm,ColumnGroup:Hm,Summary:zm,install:e=>(e.component(zm.name,zm),e.component(Z0.name,Z0),e.component(q0.name,q0),e.component(VC.name,VC),e.component(Fm.name,Fm),e.component(Hm.name,Hm),e)}),v4e={prefixCls:String,placeholder:String,value:String,handleClear:Function,disabled:{type:Boolean,default:void 0},onChange:Function},m4e=pe({compatConfig:{MODE:3},name:"Search",inheritAttrs:!1,props:bt(v4e,{placeholder:""}),emits:["change"],setup(e,t){let{emit:n}=t;const o=r=>{var i;n("change",r),r.target.value===""&&((i=e.handleClear)===null||i===void 0||i.call(e))};return()=>{const{placeholder:r,value:i,prefixCls:a,disabled:l}=e;return g(uo,{placeholder:r,class:a,value:i,onChange:o,disabled:l,allowClear:!0},{prefix:()=>g(cy,null,null)})}}});var b4e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const y4e=b4e;function fR(e){for(var t=1;t{const{renderedText:o,renderedEl:r,item:i,checked:a,disabled:l,prefixCls:s,showRemove:c}=e,u=me({[`${s}-content-item`]:!0,[`${s}-content-item-disabled`]:l||i.disabled});let d;return(typeof o=="string"||typeof o=="number")&&(d=String(o)),g(Yc,{componentName:"Transfer",defaultLocale:cr.Transfer},{default:f=>{const h=g("span",{class:`${s}-content-item-text`},[r]);return c?g("li",{class:u,title:d},[h,g(G0,{disabled:l||i.disabled,class:`${s}-content-item-remove`,"aria-label":f.remove,onClick:()=>{n("remove",i)}},{default:()=>[g(ej,null,null)]})]):g("li",{class:u,title:d,onClick:l||i.disabled?C4e:()=>{n("click",i)}},[g(Ri,{class:`${s}-checkbox`,checked:a,disabled:l||i.disabled},null),h])}})}}}),w4e={prefixCls:String,filteredRenderItems:Z.array.def([]),selectedKeys:Z.array,disabled:De(),showRemove:De(),pagination:Z.any,onItemSelect:Function,onScroll:Function,onItemRemove:Function};function _4e(e){if(!e)return null;const t={pageSize:10,simple:!0,showSizeChanger:!1,showLessItems:!1};return typeof e=="object"?S(S({},t),e):t}const O4e=pe({compatConfig:{MODE:3},name:"ListBody",inheritAttrs:!1,props:w4e,emits:["itemSelect","itemRemove","scroll"],setup(e,t){let{emit:n,expose:o}=t;const r=he(1),i=d=>{const{selectedKeys:f}=e,h=f.indexOf(d.key)>=0;n("itemSelect",d.key,!h)},a=d=>{n("itemRemove",[d.key])},l=d=>{n("scroll",d)},s=M(()=>_4e(e.pagination));Ie([s,()=>e.filteredRenderItems],()=>{if(s.value){const d=Math.ceil(e.filteredRenderItems.length/s.value.pageSize);r.value=Math.min(r.value,d)}},{immediate:!0});const c=M(()=>{const{filteredRenderItems:d}=e;let f=d;return s.value&&(f=d.slice((r.value-1)*s.value.pageSize,r.value*s.value.pageSize)),f}),u=d=>{r.value=d};return o({items:c}),()=>{const{prefixCls:d,filteredRenderItems:f,selectedKeys:h,disabled:m,showRemove:v}=e;let y=null;s.value&&(y=g(Wy,{simple:s.value.simple,showSizeChanger:s.value.showSizeChanger,showLessItems:s.value.showLessItems,size:"small",disabled:m,class:`${d}-pagination`,total:f.length,pageSize:s.value.pageSize,current:r.value,onChange:u},null));const b=c.value.map($=>{let{renderedEl:x,renderedText:_,item:w}=$;const{disabled:I}=w,O=h.indexOf(w.key)>=0;return g(x4e,{disabled:m||I,key:w.key,item:w,renderedText:_,renderedEl:x,checked:O,prefixCls:d,onClick:i,onRemove:a,showRemove:v},null)});return g(Je,null,[g("ul",{class:me(`${d}-content`,{[`${d}-content-show-remove`]:v}),onScroll:l},[b]),y])}}}),I4e=O4e,hw=e=>{const t=new Map;return e.forEach((n,o)=>{t.set(n,o)}),t},P4e=e=>{const t=new Map;return e.forEach((n,o)=>{let{disabled:r,key:i}=n;r&&t.set(i,o)}),t},T4e=()=>null;function E4e(e){return!!(e&&!Jn(e)&&Object.prototype.toString.call(e)==="[object Object]")}function zv(e){return e.filter(t=>!t.disabled).map(t=>t.key)}const A4e={prefixCls:String,dataSource:kt([]),filter:String,filterOption:Function,checkedKeys:Z.arrayOf(Z.string),handleFilter:Function,handleClear:Function,renderItem:Function,showSearch:De(!1),searchPlaceholder:String,notFoundContent:Z.any,itemUnit:String,itemsUnit:String,renderList:Z.any,disabled:De(),direction:Qe(),showSelectAll:De(),remove:String,selectAll:String,selectCurrent:String,selectInvert:String,removeAll:String,removeCurrent:String,selectAllLabel:Z.any,showRemove:De(),pagination:Z.any,onItemSelect:Function,onItemSelectAll:Function,onItemRemove:Function,onScroll:Function},pR=pe({compatConfig:{MODE:3},name:"TransferList",inheritAttrs:!1,props:A4e,slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const r=he(""),i=he(),a=he(),l=(w,I)=>{let O=w?w(I):null;const P=!!O&&_n(O).length>0;return P||(O=g(I4e,V(V({},I),{},{ref:a}),null)),{customize:P,bodyContent:O}},s=w=>{const{renderItem:I=T4e}=e,O=I(w),P=E4e(O);return{renderedText:P?O.value:O,renderedEl:P?O.label:O,item:w}},c=he([]),u=he([]);ct(()=>{const w=[],I=[];e.dataSource.forEach(O=>{const P=s(O),{renderedText:E}=P;if(r.value&&r.value.trim()&&!b(E,O))return null;w.push(O),I.push(P)}),c.value=w,u.value=I});const d=M(()=>{const{checkedKeys:w}=e;if(w.length===0)return"none";const I=hw(w);return c.value.every(O=>I.has(O.key)||!!O.disabled)?"all":"part"}),f=M(()=>zv(c.value)),h=(w,I)=>Array.from(new Set([...w,...e.checkedKeys])).filter(O=>I.indexOf(O)===-1),m=w=>{let{disabled:I,prefixCls:O}=w;var P;const E=d.value==="all";return g(Ri,{disabled:((P=e.dataSource)===null||P===void 0?void 0:P.length)===0||I,checked:E,indeterminate:d.value==="part",class:`${O}-checkbox`,onChange:()=>{const A=f.value;e.onItemSelectAll(h(E?[]:A,E?e.checkedKeys:[]))}},null)},v=w=>{var I;const{target:{value:O}}=w;r.value=O,(I=e.handleFilter)===null||I===void 0||I.call(e,w)},y=w=>{var I;r.value="",(I=e.handleClear)===null||I===void 0||I.call(e,w)},b=(w,I)=>{const{filterOption:O}=e;return O?O(r.value,I):w.includes(r.value)},$=(w,I)=>{const{itemsUnit:O,itemUnit:P,selectAllLabel:E}=e;if(E)return typeof E=="function"?E({selectedCount:w,totalCount:I}):E;const R=I>1?O:P;return g(Je,null,[(w>0?`${w}/`:"")+I,Do(" "),R])},x=M(()=>Array.isArray(e.notFoundContent)?e.notFoundContent[e.direction==="left"?0:1]:e.notFoundContent),_=(w,I,O,P,E,R)=>{const A=E?g("div",{class:`${w}-body-search-wrapper`},[g(m4e,{prefixCls:`${w}-search`,onChange:v,handleClear:y,placeholder:I,value:r.value,disabled:R},null)]):null;let N;const{onEvents:F}=_2(n),{bodyContent:W,customize:D}=l(P,S(S(S({},e),{filteredItems:c.value,filteredRenderItems:u.value,selectedKeys:O}),F));return D?N=g("div",{class:`${w}-body-customize-wrapper`},[W]):N=c.value.length?W:g("div",{class:`${w}-body-not-found`},[x.value]),g("div",{class:E?`${w}-body ${w}-body-with-search`:`${w}-body`,ref:i},[A,N])};return()=>{var w,I;const{prefixCls:O,checkedKeys:P,disabled:E,showSearch:R,searchPlaceholder:A,selectAll:N,selectCurrent:F,selectInvert:W,removeAll:D,removeCurrent:B,renderList:k,onItemSelectAll:L,onItemRemove:z,showSelectAll:K=!0,showRemove:G,pagination:Y}=e,ne=(w=o.footer)===null||w===void 0?void 0:w.call(o,S({},e)),re=me(O,{[`${O}-with-pagination`]:!!Y,[`${O}-with-footer`]:!!ne}),J=_(O,A,P,k,R,E),te=ne?g("div",{class:`${O}-footer`},[ne]):null,ee=!G&&!Y&&m({disabled:E,prefixCls:O});let fe=null;G?fe=g(qn,null,{default:()=>[Y&&g(qn.Item,{key:"removeCurrent",onClick:()=>{const X=zv((a.value.items||[]).map(ue=>ue.item));z==null||z(X)}},{default:()=>[B]}),g(qn.Item,{key:"removeAll",onClick:()=>{z==null||z(f.value)}},{default:()=>[D]})]}):fe=g(qn,null,{default:()=>[g(qn.Item,{key:"selectAll",onClick:()=>{const X=f.value;L(h(X,[]))}},{default:()=>[N]}),Y&&g(qn.Item,{onClick:()=>{const X=zv((a.value.items||[]).map(ue=>ue.item));L(h(X,[]))}},{default:()=>[F]}),g(qn.Item,{key:"selectInvert",onClick:()=>{let X;Y?X=zv((a.value.items||[]).map(j=>j.item)):X=f.value;const ue=new Set(P),ye=[],H=[];X.forEach(j=>{ue.has(j)?H.push(j):ye.push(j)}),L(h(ye,H))}},{default:()=>[W]})]});const ie=g(Ta,{class:`${O}-header-dropdown`,overlay:fe,disabled:E},{default:()=>[g(jh,null,null)]});return g("div",{class:re,style:n.style},[g("div",{class:`${O}-header`},[K?g(Je,null,[ee,ie]):null,g("span",{class:`${O}-header-selected`},[g("span",null,[$(P.length,c.value.length)]),g("span",{class:`${O}-header-title`},[(I=o.titleText)===null||I===void 0?void 0:I.call(o)])])]),J,te])}}});function hR(){}const KI=e=>{const{disabled:t,moveToLeft:n=hR,moveToRight:o=hR,leftArrowText:r="",rightArrowText:i="",leftActive:a,rightActive:l,class:s,style:c,direction:u,oneWay:d}=e;return g("div",{class:s,style:c},[g(Un,{type:"primary",size:"small",disabled:t||!l,onClick:o,icon:g(u!=="rtl"?sa:xs,null,null)},{default:()=>[i]}),!d&&g(Un,{type:"primary",size:"small",disabled:t||!a,onClick:n,icon:g(u!=="rtl"?xs:sa,null,null)},{default:()=>[r]})])};KI.displayName="Operation";KI.inheritAttrs=!1;const M4e=KI,R4e=e=>{const{antCls:t,componentCls:n,listHeight:o,controlHeightLG:r,marginXXS:i,margin:a}=e,l=`${t}-table`,s=`${t}-input`;return{[`${n}-customize-list`]:{[`${n}-list`]:{flex:"1 1 50%",width:"auto",height:"auto",minHeight:o},[`${l}-wrapper`]:{[`${l}-small`]:{border:0,borderRadius:0,[`${l}-selection-column`]:{width:r,minWidth:r}},[`${l}-pagination${l}-pagination`]:{margin:`${a}px 0 ${i}px`}},[`${s}[disabled]`]:{backgroundColor:"transparent"}}}},gR=(e,t)=>{const{componentCls:n,colorBorder:o}=e;return{[`${n}-list`]:{borderColor:t,"&-search:not([disabled])":{borderColor:o}}}},D4e=e=>{const{componentCls:t}=e;return{[`${t}-status-error`]:S({},gR(e,e.colorError)),[`${t}-status-warning`]:S({},gR(e,e.colorWarning))}},L4e=e=>{const{componentCls:t,colorBorder:n,colorSplit:o,lineWidth:r,transferItemHeight:i,transferHeaderHeight:a,transferHeaderVerticalPadding:l,transferItemPaddingVertical:s,controlItemBgActive:c,controlItemBgActiveHover:u,colorTextDisabled:d,listHeight:f,listWidth:h,listWidthLG:m,fontSizeIcon:v,marginXS:y,paddingSM:b,lineType:$,iconCls:x,motionDurationSlow:_}=e;return{display:"flex",flexDirection:"column",width:h,height:f,border:`${r}px ${$} ${n}`,borderRadius:e.borderRadiusLG,"&-with-pagination":{width:m,height:"auto"},"&-search":{[`${x}-search`]:{color:d}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:a,padding:`${l-r}px ${b}px ${l}px`,color:e.colorText,background:e.colorBgContainer,borderBottom:`${r}px ${$} ${o}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":S(S({},eo),{flex:"auto",textAlign:"end"}),"&-dropdown":S(S({},Xc()),{fontSize:v,transform:"translateY(10%)",cursor:"pointer","&[disabled]":{cursor:"not-allowed"}})},"&-body":{display:"flex",flex:"auto",flexDirection:"column",overflow:"hidden",fontSize:e.fontSize,"&-search-wrapper":{position:"relative",flex:"none",padding:b}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none","&-item":{display:"flex",alignItems:"center",minHeight:i,padding:`${s}px ${b}px`,transition:`all ${_}`,"> *:not(:last-child)":{marginInlineEnd:y},"> *":{flex:"none"},"&-text":S(S({},eo),{flex:"auto"}),"&-remove":{position:"relative",color:n,cursor:"pointer",transition:`all ${_}`,"&:hover":{color:e.colorLinkHover},"&::after":{position:"absolute",insert:`-${s}px -50%`,content:'""'}},[`&:not(${t}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:e.controlItemBgHover,cursor:"pointer"},[`&${t}-list-content-item-checked:hover`]:{backgroundColor:u}},"&-checked":{backgroundColor:c},"&-disabled":{color:d,cursor:"not-allowed"}},[`&-show-remove ${t}-list-content-item:not(${t}-list-content-item-disabled):hover`]:{background:"transparent",cursor:"default"}},"&-pagination":{padding:`${e.paddingXS}px 0`,textAlign:"end",borderTop:`${r}px ${$} ${o}`},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:d,textAlign:"center"},"&-footer":{borderTop:`${r}px ${$} ${o}`},"&-checkbox":{lineHeight:1}}},N4e=e=>{const{antCls:t,iconCls:n,componentCls:o,transferHeaderHeight:r,marginXS:i,marginXXS:a,fontSizeIcon:l,fontSize:s,lineHeight:c}=e;return{[o]:S(S({},vt(e)),{position:"relative",display:"flex",alignItems:"stretch",[`${o}-disabled`]:{[`${o}-list`]:{background:e.colorBgContainerDisabled}},[`${o}-list`]:L4e(e),[`${o}-operation`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${i}px`,verticalAlign:"middle",[`${t}-btn`]:{display:"block","&:first-child":{marginBottom:a},[n]:{fontSize:l}}},[`${t}-empty-image`]:{maxHeight:r/2-Math.round(s*c)}})}},k4e=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},B4e=pt("Transfer",e=>{const{fontSize:t,lineHeight:n,lineWidth:o,controlHeightLG:r,controlHeight:i}=e,a=Math.round(t*n),l=r,s=i,c=nt(e,{transferItemHeight:s,transferHeaderHeight:l,transferHeaderVerticalPadding:Math.ceil((l-o-a)/2),transferItemPaddingVertical:(s-a)/2});return[N4e(c),R4e(c),D4e(c),k4e(c)]},{listWidth:180,listHeight:200,listWidthLG:250}),F4e=()=>({id:String,prefixCls:String,dataSource:kt([]),disabled:De(),targetKeys:kt(),selectedKeys:kt(),render:Oe(),listStyle:rt([Function,Object],()=>({})),operationStyle:qe(void 0),titles:kt(),operations:kt(),showSearch:De(!1),filterOption:Oe(),searchPlaceholder:String,notFoundContent:Z.any,locale:qe(),rowKey:Oe(),showSelectAll:De(),selectAllLabels:kt(),children:Oe(),oneWay:De(),pagination:rt([Object,Boolean]),status:Qe(),onChange:Oe(),onSelectChange:Oe(),onSearch:Oe(),onScroll:Oe(),"onUpdate:targetKeys":Oe(),"onUpdate:selectedKeys":Oe()}),H4e=pe({compatConfig:{MODE:3},name:"ATransfer",inheritAttrs:!1,props:F4e(),slots:Object,setup(e,t){let{emit:n,attrs:o,slots:r,expose:i}=t;const{configProvider:a,prefixCls:l,direction:s}=Ve("transfer",e),[c,u]=B4e(l),d=he([]),f=he([]),h=co(),m=To.useInject(),v=M(()=>da(m.status,e.status));Ie(()=>e.selectedKeys,()=>{var J,te;d.value=((J=e.selectedKeys)===null||J===void 0?void 0:J.filter(ee=>e.targetKeys.indexOf(ee)===-1))||[],f.value=((te=e.selectedKeys)===null||te===void 0?void 0:te.filter(ee=>e.targetKeys.indexOf(ee)>-1))||[]},{immediate:!0});const y=(J,te)=>{const ee={notFoundContent:te("Transfer")},fe=lo(r,e,"notFoundContent");return fe&&(ee.notFoundContent=fe),e.searchPlaceholder!==void 0&&(ee.searchPlaceholder=e.searchPlaceholder),S(S(S({},J),ee),e.locale)},b=J=>{const{targetKeys:te=[],dataSource:ee=[]}=e,fe=J==="right"?d.value:f.value,ie=P4e(ee),X=fe.filter(j=>!ie.has(j)),ue=hw(X),ye=J==="right"?X.concat(te):te.filter(j=>!ue.has(j)),H=J==="right"?"left":"right";J==="right"?d.value=[]:f.value=[],n("update:targetKeys",ye),O(H,[]),n("change",ye,J,X),h.onFieldChange()},$=()=>{b("left")},x=()=>{b("right")},_=(J,te)=>{O(J,te)},w=J=>_("left",J),I=J=>_("right",J),O=(J,te)=>{J==="left"?(e.selectedKeys||(d.value=te),n("update:selectedKeys",[...te,...f.value]),n("selectChange",te,$t(f.value))):(e.selectedKeys||(f.value=te),n("update:selectedKeys",[...te,...d.value]),n("selectChange",$t(d.value),te))},P=(J,te)=>{const ee=te.target.value;n("search",J,ee)},E=J=>{P("left",J)},R=J=>{P("right",J)},A=J=>{n("search",J,"")},N=()=>{A("left")},F=()=>{A("right")},W=(J,te,ee)=>{const fe=J==="left"?[...d.value]:[...f.value],ie=fe.indexOf(te);ie>-1&&fe.splice(ie,1),ee&&fe.push(te),O(J,fe)},D=(J,te)=>W("left",J,te),B=(J,te)=>W("right",J,te),k=J=>{const{targetKeys:te=[]}=e,ee=te.filter(fe=>!J.includes(fe));n("update:targetKeys",ee),n("change",ee,"left",[...J])},L=(J,te)=>{n("scroll",J,te)},z=J=>{L("left",J)},K=J=>{L("right",J)},G=(J,te)=>typeof J=="function"?J({direction:te}):J,Y=he([]),ne=he([]);ct(()=>{const{dataSource:J,rowKey:te,targetKeys:ee=[]}=e,fe=[],ie=new Array(ee.length),X=hw(ee);J.forEach(ue=>{te&&(ue.key=te(ue)),X.has(ue.key)?ie[X.get(ue.key)]=ue:fe.push(ue)}),Y.value=fe,ne.value=ie}),i({handleSelectChange:O});const re=J=>{var te,ee,fe,ie,X,ue;const{disabled:ye,operations:H=[],showSearch:j,listStyle:q,operationStyle:se,filterOption:ae,showSelectAll:ge,selectAllLabels:Se=[],oneWay:$e,pagination:_e,id:be=h.id.value}=e,{class:Te,style:Pe}=o,oe=r.children,le=!oe&&_e,xe=a.renderEmpty,Ae=y(J,xe),{footer:Be}=r,Ye=e.render||r.render,Re=f.value.length>0,Le=d.value.length>0,Ne=me(l.value,Te,{[`${l.value}-disabled`]:ye,[`${l.value}-customize-list`]:!!oe,[`${l.value}-rtl`]:s.value==="rtl"},sr(l.value,v.value,m.hasFeedback),u.value),Ke=e.titles,Ze=(fe=(te=Ke&&Ke[0])!==null&&te!==void 0?te:(ee=r.leftTitle)===null||ee===void 0?void 0:ee.call(r))!==null&&fe!==void 0?fe:(Ae.titles||["",""])[0],Ue=(ue=(ie=Ke&&Ke[1])!==null&&ie!==void 0?ie:(X=r.rightTitle)===null||X===void 0?void 0:X.call(r))!==null&&ue!==void 0?ue:(Ae.titles||["",""])[1];return g("div",V(V({},o),{},{class:Ne,style:Pe,id:be}),[g(pR,V({key:"leftList",prefixCls:`${l.value}-list`,dataSource:Y.value,filterOption:ae,style:G(q,"left"),checkedKeys:d.value,handleFilter:E,handleClear:N,onItemSelect:D,onItemSelectAll:w,renderItem:Ye,showSearch:j,renderList:oe,onScroll:z,disabled:ye,direction:s.value==="rtl"?"right":"left",showSelectAll:ge,selectAllLabel:Se[0]||r.leftSelectAllLabel,pagination:le},Ae),{titleText:()=>Ze,footer:Be}),g(M4e,{key:"operation",class:`${l.value}-operation`,rightActive:Le,rightArrowText:H[0],moveToRight:x,leftActive:Re,leftArrowText:H[1],moveToLeft:$,style:se,disabled:ye,direction:s.value,oneWay:$e},null),g(pR,V({key:"rightList",prefixCls:`${l.value}-list`,dataSource:ne.value,filterOption:ae,style:G(q,"right"),checkedKeys:f.value,handleFilter:R,handleClear:F,onItemSelect:B,onItemSelectAll:I,onItemRemove:k,renderItem:Ye,showSearch:j,renderList:oe,onScroll:K,disabled:ye,direction:s.value==="rtl"?"left":"right",showSelectAll:ge,selectAllLabel:Se[1]||r.rightSelectAllLabel,showRemove:$e,pagination:le},Ae),{titleText:()=>Ue,footer:Be})])};return()=>c(g(Yc,{componentName:"Transfer",defaultLocale:cr.Transfer,children:re},null))}}),z4e=$n(H4e);function j4e(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function W4e(e){const{label:t,value:n,children:o}=e||{},r=n||"value";return{_title:t?[t]:["title","label"],value:r,key:r,children:o||"children"}}function gw(e){return e.disabled||e.disableCheckbox||e.checkable===!1}function V4e(e,t){const n=[];function o(r){r.forEach(i=>{n.push(i[t.value]);const a=i[t.children];a&&o(a)})}return o(e),n}function vR(e){return e==null}const tj=Symbol("TreeSelectContextPropsKey");function K4e(e){return ft(tj,e)}function U4e(){return it(tj,{})}const G4e={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Y4e=pe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){let{slots:n,expose:o}=t;const r=zh(),i=iy(),a=U4e(),l=he(),s=a_(()=>a.treeData,[()=>r.open,()=>a.treeData],w=>w[0]),c=M(()=>{const{checkable:w,halfCheckedKeys:I,checkedKeys:O}=i;return w?{checked:O,halfChecked:I}:null});Ie(()=>r.open,()=>{wt(()=>{var w;r.open&&!r.multiple&&i.checkedKeys.length&&((w=l.value)===null||w===void 0||w.scrollTo({key:i.checkedKeys[0]}))})},{immediate:!0,flush:"post"});const u=M(()=>String(r.searchValue).toLowerCase()),d=w=>u.value?String(w[i.treeNodeFilterProp]).toLowerCase().includes(u.value):!1,f=ve(i.treeDefaultExpandedKeys),h=ve(null);Ie(()=>r.searchValue,()=>{r.searchValue&&(h.value=V4e($t(a.treeData),$t(a.fieldNames)))},{immediate:!0});const m=M(()=>i.treeExpandedKeys?i.treeExpandedKeys.slice():r.searchValue?h.value:f.value),v=w=>{var I;f.value=w,h.value=w,(I=i.onTreeExpand)===null||I===void 0||I.call(i,w)},y=w=>{w.preventDefault()},b=(w,I)=>{let{node:O}=I;var P,E;const{checkable:R,checkedKeys:A}=i;R&&gw(O)||((P=a.onSelect)===null||P===void 0||P.call(a,O.key,{selected:!A.includes(O.key)}),r.multiple||(E=r.toggleOpen)===null||E===void 0||E.call(r,!1))},$=he(null),x=M(()=>i.keyEntities[$.value]),_=w=>{$.value=w};return o({scrollTo:function(){for(var w,I,O=arguments.length,P=new Array(O),E=0;E{var I;const{which:O}=w;switch(O){case Fe.UP:case Fe.DOWN:case Fe.LEFT:case Fe.RIGHT:(I=l.value)===null||I===void 0||I.onKeydown(w);break;case Fe.ENTER:{if(x.value){const{selectable:P,value:E}=x.value.node||{};P!==!1&&b(null,{node:{key:$.value},selected:!i.checkedKeys.includes(E)})}break}case Fe.ESC:r.toggleOpen(!1)}},onKeyup:()=>{}}),()=>{var w;const{prefixCls:I,multiple:O,searchValue:P,open:E,notFoundContent:R=(w=n.notFoundContent)===null||w===void 0?void 0:w.call(n)}=r,{listHeight:A,listItemHeight:N,virtual:F,dropdownMatchSelectWidth:W,treeExpandAction:D}=a,{checkable:B,treeDefaultExpandAll:k,treeIcon:L,showTreeIcon:z,switcherIcon:K,treeLine:G,loadData:Y,treeLoadedKeys:ne,treeMotion:re,onTreeLoad:J,checkedKeys:te}=i;if(s.value.length===0)return g("div",{role:"listbox",class:`${I}-empty`,onMousedown:y},[R]);const ee={fieldNames:a.fieldNames};return ne&&(ee.loadedKeys=ne),m.value&&(ee.expandedKeys=m.value),g("div",{onMousedown:y},[x.value&&E&&g("span",{style:G4e,"aria-live":"assertive"},[x.value.node.value]),g(zz,V(V({ref:l,focusable:!1,prefixCls:`${I}-tree`,treeData:s.value,height:A,itemHeight:N,virtual:F!==!1&&W!==!1,multiple:O,icon:L,showIcon:z,switcherIcon:K,showLine:G,loadData:P?null:Y,motion:re,activeKey:$.value,checkable:B,checkStrictly:!0,checkedKeys:c.value,selectedKeys:B?[]:te,defaultExpandAll:k},ee),{},{onActiveChange:_,onSelect:b,onCheck:b,onExpand:v,onLoad:J,filterTreeNode:d,expandAction:D}),S(S({},n),{checkable:i.customSlots.treeCheckable}))])}}}),X4e="SHOW_ALL",nj="SHOW_PARENT",UI="SHOW_CHILD";function mR(e,t,n,o){const r=new Set(e);return t===UI?e.filter(i=>{const a=n[i];return!(a&&a.children&&a.children.some(l=>{let{node:s}=l;return r.has(s[o.value])})&&a.children.every(l=>{let{node:s}=l;return gw(s)||r.has(s[o.value])}))}):t===nj?e.filter(i=>{const a=n[i],l=a?a.parent:null;return!(l&&!gw(l.node)&&r.has(l.key))}):e}const Xy=()=>null;Xy.inheritAttrs=!1;Xy.displayName="ATreeSelectNode";Xy.isTreeSelectNode=!0;const GI=Xy;var q4e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:[];return _n(n).map(o=>{var r,i,a;if(!Z4e(o))return null;const l=o.children||{},s=o.key,c={};for(const[O,P]of Object.entries(o.props))c[Gc(O)]=P;const{isLeaf:u,checkable:d,selectable:f,disabled:h,disableCheckbox:m}=c,v={isLeaf:u||u===""||void 0,checkable:d||d===""||void 0,selectable:f||f===""||void 0,disabled:h||h===""||void 0,disableCheckbox:m||m===""||void 0},y=S(S({},c),v),{title:b=(r=l.title)===null||r===void 0?void 0:r.call(l,y),switcherIcon:$=(i=l.switcherIcon)===null||i===void 0?void 0:i.call(l,y)}=c,x=q4e(c,["title","switcherIcon"]),_=(a=l.default)===null||a===void 0?void 0:a.call(l),w=S(S(S({},x),{title:b,switcherIcon:$,key:s,isLeaf:u}),v),I=t(_);return I.length&&(w.children=I),w})}return t(e)}function vw(e){if(!e)return e;const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function J4e(e,t,n,o,r,i){let a=null,l=null;function s(){function c(u){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return u.map((h,m)=>{const v=`${d}-${m}`,y=h[i.value],b=n.includes(y),$=c(h[i.children]||[],v,b),x=g(GI,h,{default:()=>[$.map(_=>_.node)]});if(t===y&&(a=x),b){const _={pos:v,node:x,children:$};return f||l.push(_),_}return null}).filter(h=>h)}l||(l=[],c(o),l.sort((u,d)=>{let{node:{props:{value:f}}}=u,{node:{props:{value:h}}}=d;const m=n.indexOf(f),v=n.indexOf(h);return m-v}))}Object.defineProperty(e,"triggerNode",{get(){return s(),a}}),Object.defineProperty(e,"allCheckedNodes",{get(){return s(),r?l:l.map(c=>{let{node:u}=c;return u})}})}function e3e(e,t){let{id:n,pId:o,rootPId:r}=t;const i={},a=[];return e.map(s=>{const c=S({},s),u=c[n];return i[u]=c,c.key=c.key||u,c}).forEach(s=>{const c=s[o],u=i[c];u&&(u.children=u.children||[],u.children.push(s)),(c===r||!u&&r===null)&&a.push(s)}),a}function t3e(e,t,n){const o=ve();return Ie([n,e,t],()=>{const r=n.value;e.value?o.value=n.value?e3e($t(e.value),S({id:"id",pId:"pId",rootPId:null},r!==!0?r:{})):$t(e.value).slice():o.value=Q4e($t(t.value))},{immediate:!0,deep:!0}),o}const n3e=e=>{const t=ve({valueLabels:new Map}),n=ve();return Ie(e,()=>{n.value=$t(e.value)},{immediate:!0}),[M(()=>{const{valueLabels:r}=t.value,i=new Map,a=n.value.map(l=>{var s;const{value:c}=l,u=(s=l.label)!==null&&s!==void 0?s:r.get(c);return i.set(c,u),S(S({},l),{label:u})});return t.value.valueLabels=i,a})]},o3e=(e,t)=>{const n=ve(new Map),o=ve({});return ct(()=>{const r=t.value,i=Qh(e.value,{fieldNames:r,initWrapper:a=>S(S({},a),{valueEntities:new Map}),processEntity:(a,l)=>{const s=a.node[r.value];l.valueEntities.set(s,a)}});n.value=i.valueEntities,o.value=i.keyEntities}),{valueEntities:n,keyEntities:o}},r3e=(e,t,n,o,r,i)=>{const a=ve([]),l=ve([]);return ct(()=>{let s=e.value.map(d=>{let{value:f}=d;return f}),c=t.value.map(d=>{let{value:f}=d;return f});const u=s.filter(d=>!o.value[d]);n.value&&({checkedKeys:s,halfCheckedKeys:c}=Mi(s,!0,o.value,r.value,i.value)),a.value=Array.from(new Set([...u,...s])),l.value=c}),[a,l]},i3e=(e,t,n)=>{let{treeNodeFilterProp:o,filterTreeNode:r,fieldNames:i}=n;return M(()=>{const{children:a}=i.value,l=t.value,s=o==null?void 0:o.value;if(!l||r.value===!1)return e.value;let c;if(typeof r.value=="function")c=r.value;else{const d=l.toUpperCase();c=(f,h)=>{const m=h[s];return String(m).toUpperCase().includes(d)}}function u(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const h=[];for(let m=0,v=d.length;me.treeCheckable&&!e.treeCheckStrictly),l=M(()=>e.treeCheckable||e.treeCheckStrictly),s=M(()=>e.treeCheckStrictly||e.labelInValue),c=M(()=>l.value||e.multiple),u=M(()=>W4e(e.fieldNames)),[d,f]=yn("",{value:M(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:be=>be||""}),h=be=>{var Te;f(be),(Te=e.onSearch)===null||Te===void 0||Te.call(e,be)},m=t3e(st(e,"treeData"),st(e,"children"),st(e,"treeDataSimpleMode")),{keyEntities:v,valueEntities:y}=o3e(m,u),b=be=>{const Te=[],Pe=[];return be.forEach(oe=>{y.value.has(oe)?Pe.push(oe):Te.push(oe)}),{missingRawValues:Te,existRawValues:Pe}},$=i3e(m,d,{fieldNames:u,treeNodeFilterProp:st(e,"treeNodeFilterProp"),filterTreeNode:st(e,"filterTreeNode")}),x=be=>{if(be){if(e.treeNodeLabelProp)return be[e.treeNodeLabelProp];const{_title:Te}=u.value;for(let Pe=0;Pej4e(be).map(Pe=>a3e(Pe)?{value:Pe}:Pe),w=be=>_(be).map(Pe=>{let{label:oe}=Pe;const{value:le,halfChecked:xe}=Pe;let Ae;const Be=y.value.get(le);return Be&&(oe=oe??x(Be.node),Ae=Be.node.disabled),{label:oe,value:le,halfChecked:xe,disabled:Ae}}),[I,O]=yn(e.defaultValue,{value:st(e,"value")}),P=M(()=>_(I.value)),E=ve([]),R=ve([]);ct(()=>{const be=[],Te=[];P.value.forEach(Pe=>{Pe.halfChecked?Te.push(Pe):be.push(Pe)}),E.value=be,R.value=Te});const A=M(()=>E.value.map(be=>be.value)),{maxLevel:N,levelEntities:F}=Ly(v),[W,D]=r3e(E,R,a,v,N,F),B=M(()=>{const Pe=mR(W.value,e.showCheckedStrategy,v.value,u.value).map(xe=>{var Ae,Be,Ye;return(Ye=(Be=(Ae=v.value[xe])===null||Ae===void 0?void 0:Ae.node)===null||Be===void 0?void 0:Be[u.value.value])!==null&&Ye!==void 0?Ye:xe}).map(xe=>{const Ae=E.value.find(Be=>Be.value===xe);return{value:xe,label:Ae==null?void 0:Ae.label}}),oe=w(Pe),le=oe[0];return!c.value&&le&&vR(le.value)&&vR(le.label)?[]:oe.map(xe=>{var Ae;return S(S({},xe),{label:(Ae=xe.label)!==null&&Ae!==void 0?Ae:xe.value})})}),[k]=n3e(B),L=(be,Te,Pe)=>{const oe=w(be);if(O(oe),e.autoClearSearchValue&&f(""),e.onChange){let le=be;a.value&&(le=mR(be,e.showCheckedStrategy,v.value,u.value).map(Ze=>{const Ue=y.value.get(Ze);return Ue?Ue.node[u.value.value]:Ze}));const{triggerValue:xe,selected:Ae}=Te||{triggerValue:void 0,selected:void 0};let Be=le;if(e.treeCheckStrictly){const Ke=R.value.filter(Ze=>!le.includes(Ze.value));Be=[...Be,...Ke]}const Ye=w(Be),Re={preValue:E.value,triggerValue:xe};let Le=!0;(e.treeCheckStrictly||Pe==="selection"&&!Ae)&&(Le=!1),J4e(Re,xe,be,m.value,Le,u.value),l.value?Re.checked=Ae:Re.selected=Ae;const Ne=s.value?Ye:Ye.map(Ke=>Ke.value);e.onChange(c.value?Ne:Ne[0],s.value?null:Ye.map(Ke=>Ke.label),Re)}},z=(be,Te)=>{let{selected:Pe,source:oe}=Te;var le,xe,Ae;const Be=$t(v.value),Ye=$t(y.value),Re=Be[be],Le=Re==null?void 0:Re.node,Ne=(le=Le==null?void 0:Le[u.value.value])!==null&&le!==void 0?le:be;if(!c.value)L([Ne],{selected:!0,triggerValue:Ne},"option");else{let Ke=Pe?[...A.value,Ne]:W.value.filter(Ze=>Ze!==Ne);if(a.value){const{missingRawValues:Ze,existRawValues:Ue}=b(Ke),Xe=Ue.map(Mt=>Ye.get(Mt).key);let xt;Pe?{checkedKeys:xt}=Mi(Xe,!0,Be,N.value,F.value):{checkedKeys:xt}=Mi(Xe,{checked:!1,halfCheckedKeys:D.value},Be,N.value,F.value),Ke=[...Ze,...xt.map(Mt=>Be[Mt].node[u.value.value])]}L(Ke,{selected:Pe,triggerValue:Ne},oe||"option")}Pe||!c.value?(xe=e.onSelect)===null||xe===void 0||xe.call(e,Ne,vw(Le)):(Ae=e.onDeselect)===null||Ae===void 0||Ae.call(e,Ne,vw(Le))},K=be=>{if(e.onDropdownVisibleChange){const Te={};Object.defineProperty(Te,"documentClickClose",{get(){return!1}}),e.onDropdownVisibleChange(be,Te)}},G=(be,Te)=>{const Pe=be.map(oe=>oe.value);if(Te.type==="clear"){L(Pe,{},"selection");return}Te.values.length&&z(Te.values[0].value,{selected:!1,source:"selection"})},{treeNodeFilterProp:Y,loadData:ne,treeLoadedKeys:re,onTreeLoad:J,treeDefaultExpandAll:te,treeExpandedKeys:ee,treeDefaultExpandedKeys:fe,onTreeExpand:ie,virtual:X,listHeight:ue,listItemHeight:ye,treeLine:H,treeIcon:j,showTreeIcon:q,switcherIcon:se,treeMotion:ae,customSlots:ge,dropdownMatchSelectWidth:Se,treeExpandAction:$e}=oa(e);Nle(v0({checkable:l,loadData:ne,treeLoadedKeys:re,onTreeLoad:J,checkedKeys:W,halfCheckedKeys:D,treeDefaultExpandAll:te,treeExpandedKeys:ee,treeDefaultExpandedKeys:fe,onTreeExpand:ie,treeIcon:j,treeMotion:ae,showTreeIcon:q,switcherIcon:se,treeLine:H,treeNodeFilterProp:Y,keyEntities:v,customSlots:ge})),K4e(v0({virtual:X,listHeight:ue,listItemHeight:ye,treeData:$,fieldNames:u,onSelect:z,dropdownMatchSelectWidth:Se,treeExpandAction:$e}));const _e=he();return o({focus(){var be;(be=_e.value)===null||be===void 0||be.focus()},blur(){var be;(be=_e.value)===null||be===void 0||be.blur()},scrollTo(be){var Te;(Te=_e.value)===null||Te===void 0||Te.scrollTo(be)}}),()=>{var be;const Te=_t(e,["id","prefixCls","customSlots","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","virtual","listHeight","listItemHeight","onDropdownVisibleChange","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"]);return g(i_,V(V(V({ref:_e},n),Te),{},{id:i,prefixCls:e.prefixCls,mode:c.value?"multiple":void 0,displayValues:k.value,onDisplayValuesChange:G,searchValue:d.value,onSearch:h,OptionList:Y4e,emptyOptions:!m.value.length,onDropdownVisibleChange:K,tagRender:e.tagRender||r.tagRender,dropdownMatchSelectWidth:(be=e.dropdownMatchSelectWidth)!==null&&be!==void 0?be:!0}),r)}}}),s3e=e=>{const{componentCls:t,treePrefixCls:n,colorBgElevated:o}=e,r=`.${n}`;return[{[`${t}-dropdown`]:[{padding:`${e.paddingXS}px ${e.paddingXS/2}px`},Vz(n,nt(e,{colorBgContainer:o})),{[r]:{borderRadius:0,"&-list-holder-inner":{alignItems:"stretch",[`${r}-treenode`]:{[`${r}-node-content-wrapper`]:{flex:"auto"}}}}},Fy(`${n}-checkbox`,e),{"&-rtl":{direction:"rtl",[`${r}-switcher${r}-switcher_close`]:{[`${r}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function c3e(e,t){return pt("TreeSelect",n=>{const o=nt(n,{treePrefixCls:t.value});return[s3e(o)]})(e)}const bR=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function u3e(){return S(S({},_t(oj(),["showTreeIcon","treeMotion","inputIcon","getInputElement","treeLine","customSlots"])),{suffixIcon:Z.any,size:Qe(),bordered:De(),treeLine:rt([Boolean,Object]),replaceFields:qe(),placement:Qe(),status:Qe(),popupClassName:String,dropdownClassName:String,"onUpdate:value":Oe(),"onUpdate:treeExpandedKeys":Oe(),"onUpdate:searchValue":Oe()})}const KC=pe({compatConfig:{MODE:3},name:"ATreeSelect",inheritAttrs:!1,props:bt(u3e(),{choiceTransitionName:"",listHeight:256,treeIcon:!1,listItemHeight:26,bordered:!0}),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;e.treeData===void 0&&o.default,pn(e.multiple!==!1||!e.treeCheckable,"TreeSelect","`multiple` will always be `true` when `treeCheckable` is true"),pn(e.replaceFields===void 0,"TreeSelect","`replaceFields` is deprecated, please use fieldNames instead"),pn(!e.dropdownClassName,"TreeSelect","`dropdownClassName` is deprecated. Please use `popupClassName` instead.");const a=co(),l=To.useInject(),s=M(()=>da(l.status,e.status)),{prefixCls:c,renderEmpty:u,direction:d,virtual:f,dropdownMatchSelectWidth:h,size:m,getPopupContainer:v,getPrefixCls:y,disabled:b}=Ve("select",e),{compactSize:$,compactItemClassnames:x}=Ms(c,d),_=M(()=>$.value||m.value),w=jr(),I=M(()=>{var re;return(re=b.value)!==null&&re!==void 0?re:w.value}),O=M(()=>y()),P=M(()=>e.placement!==void 0?e.placement:d.value==="rtl"?"bottomRight":"bottomLeft"),E=M(()=>bR(O.value,t_(P.value),e.transitionName)),R=M(()=>bR(O.value,"",e.choiceTransitionName)),A=M(()=>y("select-tree",e.prefixCls)),N=M(()=>y("tree-select",e.prefixCls)),[F,W]=M_(c),[D]=c3e(N,A),B=M(()=>me(e.popupClassName||e.dropdownClassName,`${N.value}-dropdown`,{[`${N.value}-dropdown-rtl`]:d.value==="rtl"},W.value)),k=M(()=>!!(e.treeCheckable||e.multiple)),L=M(()=>e.showArrow!==void 0?e.showArrow:e.loading||!k.value),z=he();r({focus(){var re,J;(J=(re=z.value).focus)===null||J===void 0||J.call(re)},blur(){var re,J;(J=(re=z.value).blur)===null||J===void 0||J.call(re)}});const K=function(){for(var re=arguments.length,J=new Array(re),te=0;te{i("update:treeExpandedKeys",re),i("treeExpand",re)},Y=re=>{i("update:searchValue",re),i("search",re)},ne=re=>{i("blur",re),a.onFieldBlur()};return()=>{var re,J;const{notFoundContent:te=(re=o.notFoundContent)===null||re===void 0?void 0:re.call(o),prefixCls:ee,bordered:fe,listHeight:ie,listItemHeight:X,multiple:ue,treeIcon:ye,treeLine:H,showArrow:j,switcherIcon:q=(J=o.switcherIcon)===null||J===void 0?void 0:J.call(o),fieldNames:se=e.replaceFields,id:ae=a.id.value}=e,{isFormItemInput:ge,hasFeedback:Se,feedbackIcon:$e}=l,{suffixIcon:_e,removeIcon:be,clearIcon:Te}=y_(S(S({},e),{multiple:k.value,showArrow:L.value,hasFeedback:Se,feedbackIcon:$e,prefixCls:c.value}),o);let Pe;te!==void 0?Pe=te:Pe=u("Select");const oe=_t(e,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon","bordered","status","onUpdate:value","onUpdate:treeExpandedKeys","onUpdate:searchValue"]),le=me(!ee&&N.value,{[`${c.value}-lg`]:_.value==="large",[`${c.value}-sm`]:_.value==="small",[`${c.value}-rtl`]:d.value==="rtl",[`${c.value}-borderless`]:!fe,[`${c.value}-in-form-item`]:ge},sr(c.value,s.value,Se),x.value,n.class,W.value),xe={};return e.treeData===void 0&&o.default&&(xe.children=ln(o.default())),F(D(g(l3e,V(V(V(V({},n),oe),{},{disabled:I.value,virtual:f.value,dropdownMatchSelectWidth:h.value,id:ae,fieldNames:se,ref:z,prefixCls:c.value,class:le,listHeight:ie,listItemHeight:X,treeLine:!!H,inputIcon:_e,multiple:ue,removeIcon:be,clearIcon:Te,switcherIcon:Ae=>Wz(A.value,q,Ae,o.leafIcon,H),showTreeIcon:ye,notFoundContent:Pe,getPopupContainer:v==null?void 0:v.value,treeMotion:null,dropdownClassName:B.value,choiceTransitionName:R.value,onChange:K,onBlur:ne,onSearch:Y,onTreeExpand:G},xe),{},{transitionName:E.value,customSlots:S(S({},o),{treeCheckable:()=>g("span",{class:`${c.value}-tree-checkbox-inner`},null)}),maxTagPlaceholder:e.maxTagPlaceholder||o.maxTagPlaceholder,placement:P.value,showArrow:Se||j}),S(S({},o),{treeCheckable:()=>g("span",{class:`${c.value}-tree-checkbox-inner`},null)}))))}}}),mw=GI,d3e=S(KC,{TreeNode:GI,SHOW_ALL:X4e,SHOW_PARENT:nj,SHOW_CHILD:UI,install:e=>(e.component(KC.name,KC),e.component(mw.displayName,mw),e)}),UC=()=>({format:String,showNow:De(),showHour:De(),showMinute:De(),showSecond:De(),use12Hours:De(),hourStep:Number,minuteStep:Number,secondStep:Number,hideDisabledOptions:De(),popupClassName:String,status:Qe()});function f3e(e){const t=pH(e,S(S({},UC()),{order:{type:Boolean,default:!0}})),{TimePicker:n,RangePicker:o}=t,r=pe({name:"ATimePicker",inheritAttrs:!1,props:S(S(S(S({},j0()),uH()),UC()),{addon:{type:Function}}),slots:Object,setup(a,l){let{slots:s,expose:c,emit:u,attrs:d}=l;const f=a,h=co();pn(!(s.addon||f.addon),"TimePicker","`addon` is deprecated. Please use `v-slot:renderExtraFooter` instead.");const m=he();c({focus:()=>{var _;(_=m.value)===null||_===void 0||_.focus()},blur:()=>{var _;(_=m.value)===null||_===void 0||_.blur()}});const v=(_,w)=>{u("update:value",_),u("change",_,w),h.onFieldChange()},y=_=>{u("update:open",_),u("openChange",_)},b=_=>{u("focus",_)},$=_=>{u("blur",_),h.onFieldBlur()},x=_=>{u("ok",_)};return()=>{const{id:_=h.id.value}=f;return g(n,V(V(V({},d),_t(f,["onUpdate:value","onUpdate:open"])),{},{id:_,dropdownClassName:f.popupClassName,mode:void 0,ref:m,renderExtraFooter:f.addon||s.addon||f.renderExtraFooter||s.renderExtraFooter,onChange:v,onOpenChange:y,onFocus:b,onBlur:$,onOk:x}),s)}}}),i=pe({name:"ATimeRangePicker",inheritAttrs:!1,props:S(S(S(S({},j0()),dH()),UC()),{order:{type:Boolean,default:!0}}),slots:Object,setup(a,l){let{slots:s,expose:c,emit:u,attrs:d}=l;const f=a,h=he(),m=co();c({focus:()=>{var I;(I=h.value)===null||I===void 0||I.focus()},blur:()=>{var I;(I=h.value)===null||I===void 0||I.blur()}});const v=(I,O)=>{u("update:value",I),u("change",I,O),m.onFieldChange()},y=I=>{u("update:open",I),u("openChange",I)},b=I=>{u("focus",I)},$=I=>{u("blur",I),m.onFieldBlur()},x=(I,O)=>{u("panelChange",I,O)},_=I=>{u("ok",I)},w=(I,O,P)=>{u("calendarChange",I,O,P)};return()=>{const{id:I=m.id.value}=f;return g(o,V(V(V({},d),_t(f,["onUpdate:open","onUpdate:value"])),{},{id:I,dropdownClassName:f.popupClassName,picker:"time",mode:void 0,ref:h,onChange:v,onOpenChange:y,onFocus:b,onBlur:$,onPanelChange:x,onOk:_,onCalendarChange:w}),s)}}});return{TimePicker:r,TimeRangePicker:i}}const{TimePicker:jv,TimeRangePicker:jm}=f3e(oO),p3e=S(jv,{TimePicker:jv,TimeRangePicker:jm,install:e=>(e.component(jv.name,jv),e.component(jm.name,jm),e)}),h3e=()=>({prefixCls:String,color:String,dot:Z.any,pending:De(),position:Z.oneOf(Go("left","right","")).def(""),label:Z.any}),$h=pe({compatConfig:{MODE:3},name:"ATimelineItem",props:bt(h3e(),{color:"blue",pending:!1}),slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ve("timeline",e),r=M(()=>({[`${o.value}-item`]:!0,[`${o.value}-item-pending`]:e.pending})),i=M(()=>/blue|red|green|gray/.test(e.color||"")?void 0:e.color||"blue"),a=M(()=>({[`${o.value}-item-head`]:!0,[`${o.value}-item-head-${e.color||"blue"}`]:!i.value}));return()=>{var l,s,c;const{label:u=(l=n.label)===null||l===void 0?void 0:l.call(n),dot:d=(s=n.dot)===null||s===void 0?void 0:s.call(n)}=e;return g("li",{class:r.value},[u&&g("div",{class:`${o.value}-item-label`},[u]),g("div",{class:`${o.value}-item-tail`},null),g("div",{class:[a.value,!!d&&`${o.value}-item-head-custom`],style:{borderColor:i.value,color:i.value}},[d]),g("div",{class:`${o.value}-item-content`},[(c=n.default)===null||c===void 0?void 0:c.call(n)])])}}}),g3e=e=>{const{componentCls:t}=e;return{[t]:S(S({},vt(e)),{margin:0,padding:0,listStyle:"none",[`${t}-item`]:{position:"relative",margin:0,paddingBottom:e.timeLineItemPaddingBottom,fontSize:e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize,insetInlineStart:(e.timeLineItemHeadSize-e.timeLineItemTailWidth)/2,height:`calc(100% - ${e.timeLineItemHeadSize}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px ${e.lineType} ${e.colorSplit}`},"&-pending":{[`${t}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:"transparent"},[`${t}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:e.timeLineItemHeadSize,height:e.timeLineItemHeadSize,backgroundColor:e.colorBgContainer,border:`${e.timeLineHeadBorderWidth}px ${e.lineType} transparent`,borderRadius:"50%","&-blue":{color:e.colorPrimary,borderColor:e.colorPrimary},"&-red":{color:e.colorError,borderColor:e.colorError},"&-green":{color:e.colorSuccess,borderColor:e.colorSuccess},"&-gray":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize/2,insetInlineStart:e.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:e.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.lineWidth,marginInlineStart:e.margin+e.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${t}-item-tail`]:{display:"none"},[`> ${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}}},[`&${t}-alternate, + &${t}-right, + &${t}-label`]:{[`${t}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${e.marginXXS}px`,"&-custom":{marginInlineStart:e.timeLineItemTailWidth/2}},"&-left":{[`${t}-item-content`]:{insetInlineStart:`calc(50% - ${e.marginXXS}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}},"&-right":{[`${t}-item-content`]:{width:`calc(50% - ${e.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${t}-right`]:{[`${t}-item-right`]:{[`${t}-item-tail, + ${t}-item-head, + ${t}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(e.timeLineItemHeadSize+e.timeLineItemTailWidth)/2}px)`},[`${t}-item-content`]:{width:`calc(100% - ${e.timeLineItemHeadSize+e.marginXS}px)`}}},[`&${t}-pending + ${t}-item-last + ${t}-item-tail`]:{display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`&${t}-reverse + ${t}-item-last + ${t}-item-tail`]:{display:"none"},[`&${t}-reverse ${t}-item-pending`]:{[`${t}-item-tail`]:{insetBlockStart:e.margin,display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}},[`&${t}-label`]:{[`${t}-item-label`]:{position:"absolute",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.timeLineItemTailWidth,width:`calc(50% - ${e.marginSM}px)`,textAlign:"end"},[`${t}-item-right`]:{[`${t}-item-label`]:{insetInlineStart:`calc(50% + ${e.marginSM}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${t}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},v3e=pt("Timeline",e=>{const t=nt(e,{timeLineItemPaddingBottom:e.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:e.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:e.lineWidthBold,timeLineHeadBorderWidth:e.wireframe?e.lineWidthBold:e.lineWidth*3});return[g3e(t)]}),m3e=()=>({prefixCls:String,pending:Z.any,pendingDot:Z.any,reverse:De(),mode:Z.oneOf(Go("left","alternate","right",""))}),Dp=pe({compatConfig:{MODE:3},name:"ATimeline",inheritAttrs:!1,props:bt(m3e(),{reverse:!1,mode:""}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("timeline",e),[a,l]=v3e(r),s=(c,u)=>{const d=c.props||{};return e.mode==="alternate"?d.position==="right"?`${r.value}-item-right`:d.position==="left"?`${r.value}-item-left`:u%2===0?`${r.value}-item-left`:`${r.value}-item-right`:e.mode==="left"?`${r.value}-item-left`:e.mode==="right"?`${r.value}-item-right`:d.position==="right"?`${r.value}-item-right`:""};return()=>{var c,u,d;const{pending:f=(c=n.pending)===null||c===void 0?void 0:c.call(n),pendingDot:h=(u=n.pendingDot)===null||u===void 0?void 0:u.call(n),reverse:m,mode:v}=e,y=typeof f=="boolean"?null:f,b=_n((d=n.default)===null||d===void 0?void 0:d.call(n)),$=f?g($h,{pending:!!f,dot:h||g(di,null,null)},{default:()=>[y]}):null;$&&b.push($);const x=m?b.reverse():b,_=x.length,w=`${r.value}-item-last`,I=x.map((E,R)=>{const A=R===_-2?w:"",N=R===_-1?w:"";return ko(E,{class:me([!m&&f?A:N,s(E,R)])})}),O=x.some(E=>{var R,A;return!!(!((R=E.props)===null||R===void 0)&&R.label||!((A=E.children)===null||A===void 0)&&A.label)}),P=me(r.value,{[`${r.value}-pending`]:!!f,[`${r.value}-reverse`]:!!m,[`${r.value}-${v}`]:!!v&&!O,[`${r.value}-label`]:O,[`${r.value}-rtl`]:i.value==="rtl"},o.class,l.value);return a(g("ul",V(V({},o),{},{class:P}),[I]))}}});Dp.Item=$h;Dp.install=function(e){return e.component(Dp.name,Dp),e.component($h.name,$h),e};var b3e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};const y3e=b3e;function yR(e){for(var t=1;t{const{sizeMarginHeadingVerticalEnd:r,fontWeightStrong:i}=o;return{marginBottom:r,color:n,fontWeight:i,fontSize:e,lineHeight:t}},x3e=e=>{const t=[1,2,3,4,5],n={};return t.forEach(o=>{n[` + h${o}&, + div&-h${o}, + div&-h${o} > textarea, + h${o} + `]=$3e(e[`fontSizeHeading${o}`],e[`lineHeightHeading${o}`],e.colorTextHeading,e)}),n},w3e=e=>{const{componentCls:t}=e;return{"a&, a":S(S({},Vb(e)),{textDecoration:e.linkDecoration,"&:active, &:hover":{textDecoration:e.linkHoverDecoration},[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},_3e=()=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Rne[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),O3e=e=>{const{componentCls:t}=e,o=iu(e).inputPaddingVertical+1;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:-e.paddingSM,marginTop:-o,marginBottom:`calc(1em - ${o}px)`},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.marginXS+2,insetBlockEnd:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},I3e=e=>({"&-copy-success":{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}}}),P3e=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),T3e=e=>{const{componentCls:t,sizeMarginHeadingVerticalStart:n}=e;return{[t]:S(S(S(S(S(S(S(S(S({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccess},[`&${t}-warning`]:{color:e.colorWarning},[`&${t}-danger`]:{color:e.colorError,"a&:active, a&:focus":{color:e.colorErrorActive},"a&:hover":{color:e.colorErrorHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},x3e(e)),{[` + & + h1${t}, + & + h2${t}, + & + h3${t}, + & + h4${t}, + & + h5${t} + `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),_3e()),w3e(e)),{[` + ${t}-expand, + ${t}-edit, + ${t}-copy + `]:S(S({},Vb(e)),{marginInlineStart:e.marginXXS})}),O3e(e)),I3e(e)),P3e()),{"&-rtl":{direction:"rtl"}})}},rj=pt("Typography",e=>[T3e(e)],{sizeMarginHeadingVerticalStart:"1.2em",sizeMarginHeadingVerticalEnd:"0.5em"}),E3e=()=>({prefixCls:String,value:String,maxlength:Number,autoSize:{type:[Boolean,Object]},onSave:Function,onCancel:Function,onEnd:Function,onChange:Function,originContent:String,direction:String,component:String}),A3e=pe({compatConfig:{MODE:3},name:"Editable",inheritAttrs:!1,props:E3e(),setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i}=oa(e),a=St({current:e.value||"",lastKeyCode:void 0,inComposition:!1,cancelFlag:!1});Ie(()=>e.value,$=>{a.current=$});const l=he();lt(()=>{var $;if(l.value){const x=($=l.value)===null||$===void 0?void 0:$.resizableTextArea,_=x==null?void 0:x.textArea;_.focus();const{length:w}=_.value;_.setSelectionRange(w,w)}});function s($){l.value=$}function c($){let{target:{value:x}}=$;a.current=x.replace(/[\r\n]/g,""),n("change",a.current)}function u(){a.inComposition=!0}function d(){a.inComposition=!1}function f($){const{keyCode:x}=$;x===Fe.ENTER&&$.preventDefault(),!a.inComposition&&(a.lastKeyCode=x)}function h($){const{keyCode:x,ctrlKey:_,altKey:w,metaKey:I,shiftKey:O}=$;a.lastKeyCode===x&&!a.inComposition&&!_&&!w&&!I&&!O&&(x===Fe.ENTER?(v(),n("end")):x===Fe.ESC&&(a.current=e.originContent,n("cancel")))}function m(){v()}function v(){n("save",a.current.trim())}const[y,b]=rj(i);return()=>{const $=me({[`${i.value}`]:!0,[`${i.value}-edit-content`]:!0,[`${i.value}-rtl`]:e.direction==="rtl",[e.component?`${i.value}-${e.component}`:""]:!0},r.class,b.value);return y(g("div",V(V({},r),{},{class:$}),[g(aI,{ref:s,maxlength:e.maxlength,value:a.current,onChange:c,onKeydown:f,onKeyup:h,onCompositionstart:u,onCompositionend:d,onBlur:m,rows:1,autoSize:e.autoSize===void 0||e.autoSize},null),o.enterIcon?o.enterIcon({className:`${e.prefixCls}-edit-content-confirm`}):g(C3e,{class:`${e.prefixCls}-edit-content-confirm`},null)]))}}}),M3e=A3e,R3e=3,D3e=8;let Ar;const GC={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function L3e(e){return Array.prototype.slice.apply(e).map(n=>`${n}: ${e.getPropertyValue(n)};`).join("")}function ij(e,t){e.setAttribute("aria-hidden","true");const n=window.getComputedStyle(t),o=L3e(n);e.setAttribute("style",o),e.style.position="fixed",e.style.left="0",e.style.height="auto",e.style.minHeight="auto",e.style.maxHeight="auto",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.borderTopWidth="0",e.style.borderBottomWidth="0",e.style.top="-999999px",e.style.zIndex="-1000",e.style.textOverflow="clip",e.style.whiteSpace="normal",e.style.webkitLineClamp="none"}function N3e(e){const t=document.createElement("div");ij(t,e),t.appendChild(document.createTextNode("text")),document.body.appendChild(t);const n=t.getBoundingClientRect().height;return document.body.removeChild(t),n}const k3e=(e,t,n,o,r)=>{Ar||(Ar=document.createElement("div"),Ar.setAttribute("aria-hidden","true"),document.body.appendChild(Ar));const{rows:i,suffix:a=""}=t,l=N3e(e),s=Math.round(l*i*100)/100;ij(Ar,e);const c=AN({render(){return g("div",{style:GC},[g("span",{style:GC},[n,a]),g("span",{style:GC},[o])])}});c.mount(Ar);function u(){return Math.round(Ar.getBoundingClientRect().height*100)/100-.1<=s}if(u())return c.unmount(),{content:n,text:Ar.innerHTML,ellipsis:!1};const d=Array.prototype.slice.apply(Ar.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter(x=>{let{nodeType:_,data:w}=x;return _!==D3e&&w!==""}),f=Array.prototype.slice.apply(Ar.childNodes[0].childNodes[1].cloneNode(!0).childNodes);c.unmount();const h=[];Ar.innerHTML="";const m=document.createElement("span");Ar.appendChild(m);const v=document.createTextNode(r+a);m.appendChild(v),f.forEach(x=>{Ar.appendChild(x)});function y(x){m.insertBefore(x,v)}function b(x,_){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:_.length,O=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const P=Math.floor((w+I)/2),E=_.slice(0,P);if(x.textContent=E,w>=I-1)for(let R=I;R>=w;R-=1){const A=_.slice(0,R);if(x.textContent=A,u()||!A)return R===_.length?{finished:!1,vNode:_}:{finished:!0,vNode:A}}return u()?b(x,_,P,I,P):b(x,_,w,P,O)}function $(x){if(x.nodeType===R3e){const w=x.textContent||"",I=document.createTextNode(w);return y(I),b(I,w)}return{finished:!1,vNode:null}}return d.some(x=>{const{finished:_,vNode:w}=$(x);return w&&h.push(w),_}),{content:h,text:Ar.innerHTML,ellipsis:!0}};var B3e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,direction:String,component:String}),H3e=pe({name:"ATypography",inheritAttrs:!1,props:F3e(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ve("typography",e),[a,l]=rj(r);return()=>{var s;const c=S(S({},e),o),{prefixCls:u,direction:d,component:f="article"}=c,h=B3e(c,["prefixCls","direction","component"]);return a(g(f,V(V({},h),{},{class:me(r.value,{[`${r.value}-rtl`]:i.value==="rtl"},o.class,l.value)}),{default:()=>[(s=n.default)===null||s===void 0?void 0:s.call(n)]}))}}}),Dr=H3e,z3e=()=>{const e=document.getSelection();if(!e.rangeCount)return function(){};let t=document.activeElement;const n=[];for(let o=0;o"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();const d=SR[t.format]||SR.default;window.clipboardData.setData(d,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(a),r.selectNodeContents(a),i.addRange(r),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(c){s&&console.error("unable to copy using execCommand: ",c),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(u){s&&console.error("unable to copy using clipboardData: ",u),s&&console.error("falling back to prompt"),n=W3e("message"in t?t.message:j3e),window.prompt(n,e)}}finally{i&&(typeof i.removeRange=="function"?i.removeRange(r):i.removeAllRanges()),a&&document.body.removeChild(a),o()}return l}var K3e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const U3e=K3e;function CR(e){for(var t=1;t({editable:{type:[Boolean,Object],default:void 0},copyable:{type:[Boolean,Object],default:void 0},prefixCls:String,component:String,type:String,disabled:{type:Boolean,default:void 0},ellipsis:{type:[Boolean,Object],default:void 0},code:{type:Boolean,default:void 0},mark:{type:Boolean,default:void 0},underline:{type:Boolean,default:void 0},delete:{type:Boolean,default:void 0},strong:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},content:String,"onUpdate:content":Function}),nAe=pe({compatConfig:{MODE:3},name:"TypographyBase",inheritAttrs:!1,props:og(),setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,direction:a}=Ve("typography",e),l=St({copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1,expandStr:"",copyStr:"",copiedStr:"",editStr:"",copyId:void 0,rafId:void 0,prevProps:void 0,originContent:""}),s=he(),c=he(),u=M(()=>{const D=e.ellipsis;return D?S({rows:1,expandable:!1},typeof D=="object"?D:null):{}});lt(()=>{l.clientRendered=!0,P()}),Ct(()=>{clearTimeout(l.copyId),mt.cancel(l.rafId)}),Ie([()=>u.value.rows,()=>e.content],()=>{wt(()=>{I()})},{flush:"post",deep:!0}),ct(()=>{e.content===void 0&&(Sn(!e.editable),Sn(!e.ellipsis))});function d(){var D;return e.ellipsis||e.editable?e.content:(D=Nr(s.value))===null||D===void 0?void 0:D.innerText}function f(D){const{onExpand:B}=u.value;l.expanded=!0,B==null||B(D)}function h(D){D.preventDefault(),l.originContent=e.content,w(!0)}function m(D){v(D),w(!1)}function v(D){const{onChange:B}=$.value;D!==e.content&&(r("update:content",D),B==null||B(D))}function y(){var D,B;(B=(D=$.value).onCancel)===null||B===void 0||B.call(D),w(!1)}function b(D){D.preventDefault(),D.stopPropagation();const{copyable:B}=e,k=S({},typeof B=="object"?B:null);k.text===void 0&&(k.text=d()),V3e(k.text||""),l.copied=!0,wt(()=>{k.onCopy&&k.onCopy(D),l.copyId=setTimeout(()=>{l.copied=!1},3e3)})}const $=M(()=>{const D=e.editable;return D?S({},typeof D=="object"?D:null):{editing:!1}}),[x,_]=yn(!1,{value:M(()=>$.value.editing)});function w(D){const{onStart:B}=$.value;D&&B&&B(),_(D)}Ie(x,D=>{var B;D||(B=c.value)===null||B===void 0||B.focus()},{flush:"post"});function I(D){if(D){const{width:B,height:k}=D;if(!B||!k)return}mt.cancel(l.rafId),l.rafId=mt(()=>{P()})}const O=M(()=>{const{rows:D,expandable:B,suffix:k,onEllipsis:L,tooltip:z}=u.value;return k||z||e.editable||e.copyable||B||L?!1:D===1?tAe:eAe}),P=()=>{const{ellipsisText:D,isEllipsis:B}=l,{rows:k,suffix:L,onEllipsis:z}=u.value;if(!k||k<0||!Nr(s.value)||l.expanded||e.content===void 0||O.value)return;const{content:K,text:G,ellipsis:Y}=k3e(Nr(s.value),{rows:k,suffix:L},e.content,W(!0),xR);(D!==G||l.isEllipsis!==Y)&&(l.ellipsisText=G,l.ellipsisContent=K,l.isEllipsis=Y,B!==Y&&z&&z(Y))};function E(D,B){let{mark:k,code:L,underline:z,delete:K,strong:G,keyboard:Y}=D,ne=B;function re(J,te){if(!J)return;const ee=function(){return ne}();ne=g(te,null,{default:()=>[ee]})}return re(G,"strong"),re(z,"u"),re(K,"del"),re(L,"code"),re(k,"mark"),re(Y,"kbd"),ne}function R(D){const{expandable:B,symbol:k}=u.value;if(!B||!D&&(l.expanded||!l.isEllipsis))return null;const L=(n.ellipsisSymbol?n.ellipsisSymbol():k)||l.expandStr;return g("a",{key:"expand",class:`${i.value}-expand`,onClick:f,"aria-label":l.expandStr},[L])}function A(){if(!e.editable)return;const{tooltip:D,triggerType:B=["icon"]}=e.editable,k=n.editableIcon?n.editableIcon():g(Q3e,{role:"button"},null),L=n.editableTooltip?n.editableTooltip():l.editStr,z=typeof L=="string"?L:"";return B.indexOf("icon")!==-1?g(Br,{key:"edit",title:D===!1?"":L},{default:()=>[g(G0,{ref:c,class:`${i.value}-edit`,onClick:h,"aria-label":z},{default:()=>[k]})]}):null}function N(){if(!e.copyable)return;const{tooltip:D}=e.copyable,B=l.copied?l.copiedStr:l.copyStr,k=n.copyableTooltip?n.copyableTooltip({copied:l.copied}):B,L=typeof k=="string"?k:"",z=l.copied?g(sy,null,null):g(Y3e,null,null),K=n.copyableIcon?n.copyableIcon({copied:!!l.copied}):z;return g(Br,{key:"copy",title:D===!1?"":k},{default:()=>[g(G0,{class:[`${i.value}-copy`,{[`${i.value}-copy-success`]:l.copied}],onClick:b,"aria-label":L},{default:()=>[K]})]})}function F(){const{class:D,style:B}=o,{maxlength:k,autoSize:L,onEnd:z}=$.value;return g(M3e,{class:D,style:B,prefixCls:i.value,value:e.content,originContent:l.originContent,maxlength:k,autoSize:L,onSave:m,onChange:v,onCancel:y,onEnd:z,direction:a.value,component:e.component},{enterIcon:n.editableEnterIcon})}function W(D){return[R(D),A(),N()].filter(B=>B)}return()=>{var D;const{triggerType:B=["icon"]}=$.value,k=e.ellipsis||e.editable?e.content!==void 0?e.content:(D=n.default)===null||D===void 0?void 0:D.call(n):n.default?n.default():e.content;return x.value?F():g(Yc,{componentName:"Text",children:L=>{const z=S(S({},e),o),{type:K,disabled:G,content:Y,class:ne,style:re}=z,J=J3e(z,["type","disabled","content","class","style"]),{rows:te,suffix:ee,tooltip:fe}=u.value,{edit:ie,copy:X,copied:ue,expand:ye}=L;l.editStr=ie,l.copyStr=X,l.copiedStr=ue,l.expandStr=ye;const H=_t(J,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard","onUpdate:content"]),j=O.value,q=te===1&&j,se=te&&te>1&&j;let ae=k,ge;if(te&&l.isEllipsis&&!l.expanded&&!j){const{title:_e}=J;let be=_e||"";!_e&&(typeof k=="string"||typeof k=="number")&&(be=String(k)),be=be==null?void 0:be.slice(String(l.ellipsisContent||"").length),ae=g(Je,null,[$t(l.ellipsisContent),g("span",{title:be,"aria-hidden":"true"},[xR]),ee])}else ae=g(Je,null,[k,ee]);ae=E(e,ae);const Se=fe&&te&&l.isEllipsis&&!l.expanded&&!j,$e=n.ellipsisTooltip?n.ellipsisTooltip():fe;return g(ki,{onResize:I,disabled:!te},{default:()=>[g(Dr,V({ref:s,class:[{[`${i.value}-${K}`]:K,[`${i.value}-disabled`]:G,[`${i.value}-ellipsis`]:te,[`${i.value}-single-line`]:te===1&&!l.isEllipsis,[`${i.value}-ellipsis-single-line`]:q,[`${i.value}-ellipsis-multiple-line`]:se},ne],style:S(S({},re),{WebkitLineClamp:se?te:void 0}),"aria-label":ge,direction:a.value,onClick:B.indexOf("text")!==-1?h:()=>{}},H),{default:()=>[Se?g(Br,{title:fe===!0?k:$e},{default:()=>[g("span",null,[ae])]}):ae,W()]})]})}},null)}}}),rg=nAe;var oAe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r_t(S(S({},og()),{ellipsis:{type:Boolean,default:void 0}}),["component"]),qy=(e,t)=>{let{slots:n,attrs:o}=t;const r=S(S({},e),o),{ellipsis:i,rel:a}=r,l=oAe(r,["ellipsis","rel"]);Sn();const s=S(S({},l),{rel:a===void 0&&l.target==="_blank"?"noopener noreferrer":a,ellipsis:!!i,component:"a"});return delete s.navigate,g(rg,s,n)};qy.displayName="ATypographyLink";qy.inheritAttrs=!1;qy.props=rAe();const ZI=qy,iAe=()=>_t(og(),["component"]),Zy=(e,t)=>{let{slots:n,attrs:o}=t;const r=S(S(S({},e),{component:"div"}),o);return g(rg,r,n)};Zy.displayName="ATypographyParagraph";Zy.inheritAttrs=!1;Zy.props=iAe();const QI=Zy,aAe=()=>S(S({},_t(og(),["component"])),{ellipsis:{type:[Boolean,Object],default:void 0}}),Qy=(e,t)=>{let{slots:n,attrs:o}=t;const{ellipsis:r}=e;Sn();const i=S(S(S({},e),{ellipsis:r&&typeof r=="object"?_t(r,["expandable","rows"]):r,component:"span"}),o);return g(rg,i,n)};Qy.displayName="ATypographyText";Qy.inheritAttrs=!1;Qy.props=aAe();const JI=Qy;var lAe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rS(S({},_t(og(),["component","strong"])),{level:Number}),Jy=(e,t)=>{let{slots:n,attrs:o}=t;const{level:r=1}=e,i=lAe(e,["level"]);let a;sAe.includes(r)?a=`h${r}`:(Sn(),a="h1");const l=S(S(S({},i),{component:a}),o);return g(rg,l,n)};Jy.displayName="ATypographyTitle";Jy.inheritAttrs=!1;Jy.props=cAe();const eP=Jy;Dr.Text=JI;Dr.Title=eP;Dr.Paragraph=QI;Dr.Link=ZI;Dr.Base=rg;Dr.install=function(e){return e.component(Dr.name,Dr),e.component(Dr.Text.displayName,JI),e.component(Dr.Title.displayName,eP),e.component(Dr.Paragraph.displayName,QI),e.component(Dr.Link.displayName,ZI),e};function uAe(e,t){const n=`cannot ${e.method} ${e.action} ${t.status}'`,o=new Error(n);return o.status=t.status,o.method=e.method,o.url=e.action,o}function wR(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function dAe(e){const t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(i){i.total>0&&(i.percent=i.loaded/i.total*100),e.onProgress(i)});const n=new FormData;e.data&&Object.keys(e.data).forEach(r=>{const i=e.data[r];if(Array.isArray(i)){i.forEach(a=>{n.append(`${r}[]`,a)});return}n.append(r,i)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(i){e.onError(i)},t.onload=function(){return t.status<200||t.status>=300?e.onError(uAe(e,t),wR(t)):e.onSuccess(wR(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};return o["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEach(r=>{o[r]!==null&&t.setRequestHeader(r,o[r])}),t.send(n),{abort(){t.abort()}}}const fAe=+new Date;let pAe=0;function YC(){return`vc-upload-${fAe}-${++pAe}`}const XC=(e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),o=e.name||"",r=e.type||"",i=r.replace(/\/.*$/,"");return n.some(a=>{const l=a.trim();if(/^\*(\/\*)?$/.test(a))return!0;if(l.charAt(0)==="."){const s=o.toLowerCase(),c=l.toLowerCase();let u=[c];return(c===".jpg"||c===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(d=>s.endsWith(d))}return/\/\*$/.test(l)?i===l.replace(/\/.*$/,""):!!(r===l||/^\w+$/.test(l))})}return!0};function hAe(e,t){const n=e.createReader();let o=[];function r(){n.readEntries(i=>{const a=Array.prototype.slice.apply(i);o=o.concat(a),!a.length?t(o):r()})}r()}const gAe=(e,t,n)=>{const o=(r,i)=>{r.path=i||"",r.isFile?r.file(a=>{n(a)&&(r.fullPath&&!a.webkitRelativePath&&(Object.defineProperties(a,{webkitRelativePath:{writable:!0}}),a.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(a,{webkitRelativePath:{writable:!1}})),t([a]))}):r.isDirectory&&hAe(r,a=>{a.forEach(l=>{o(l,`${i}${r.name}/`)})})};e.forEach(r=>{o(r.webkitGetAsEntry())})},vAe=gAe,aj=()=>({capture:[Boolean,String],multipart:{type:Boolean,default:void 0},name:String,disabled:{type:Boolean,default:void 0},componentTag:String,action:[String,Function],method:String,directory:{type:Boolean,default:void 0},data:[Object,Function],headers:Object,accept:String,multiple:{type:Boolean,default:void 0},onBatchStart:Function,onReject:Function,onStart:Function,onError:Function,onSuccess:Function,onProgress:Function,beforeUpload:Function,customRequest:Function,withCredentials:{type:Boolean,default:void 0},openFileDialogOnClick:{type:Boolean,default:void 0},prefixCls:String,id:String,onMouseenter:Function,onMouseleave:Function,onClick:Function});var mAe=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(u){try{c(o.next(u))}catch(d){a(d)}}function s(u){try{c(o.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):r(u.value).then(l,s)}c((o=o.apply(e,t||[])).next())})},bAe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rmAe(this,void 0,void 0,function*(){const{beforeUpload:_}=e;let w=$;if(_){try{w=yield _($,x)}catch{w=!1}if(w===!1)return{origin:$,parsedFile:null,action:null,data:null}}const{action:I}=e;let O;typeof I=="function"?O=yield I($):O=I;const{data:P}=e;let E;typeof P=="function"?E=yield P($):E=P;const R=(typeof w=="object"||typeof w=="string")&&w?w:$;let A;R instanceof File?A=R:A=new File([R],$.name,{type:$.type});const N=A;return N.uid=$.uid,{origin:$,data:E,parsedFile:N,action:O}}),u=$=>{let{data:x,origin:_,action:w,parsedFile:I}=$;if(!s)return;const{onStart:O,customRequest:P,name:E,headers:R,withCredentials:A,method:N}=e,{uid:F}=_,W=P||dAe,D={action:w,filename:E,data:x,file:I,headers:R,withCredentials:A,method:N||"post",onProgress:B=>{const{onProgress:k}=e;k==null||k(B,I)},onSuccess:(B,k)=>{const{onSuccess:L}=e;L==null||L(B,I,k),delete a[F]},onError:(B,k)=>{const{onError:L}=e;L==null||L(B,k,I),delete a[F]}};O(_),a[F]=W(D)},d=()=>{i.value=YC()},f=$=>{if($){const x=$.uid?$.uid:$;a[x]&&a[x].abort&&a[x].abort(),delete a[x]}else Object.keys(a).forEach(x=>{a[x]&&a[x].abort&&a[x].abort(),delete a[x]})};lt(()=>{s=!0}),Ct(()=>{s=!1,f()});const h=$=>{const x=[...$],_=x.map(w=>(w.uid=YC(),c(w,x)));Promise.all(_).then(w=>{const{onBatchStart:I}=e;I==null||I(w.map(O=>{let{origin:P,parsedFile:E}=O;return{file:P,parsedFile:E}})),w.filter(O=>O.parsedFile!==null).forEach(O=>{u(O)})})},m=$=>{const{accept:x,directory:_}=e,{files:w}=$.target,I=[...w].filter(O=>!_||XC(O,x));h(I),d()},v=$=>{const x=l.value;if(!x)return;const{onClick:_}=e;x.click(),_&&_($)},y=$=>{$.key==="Enter"&&v($)},b=$=>{const{multiple:x}=e;if($.preventDefault(),$.type!=="dragover")if(e.directory)vAe(Array.prototype.slice.call($.dataTransfer.items),h,_=>XC(_,e.accept));else{const _=Wfe(Array.prototype.slice.call($.dataTransfer.files),O=>XC(O,e.accept));let w=_[0];const I=_[1];x===!1&&(w=w.slice(0,1)),h(w),I.length&&e.onReject&&e.onReject(I)}};return r({abort:f}),()=>{var $;const{componentTag:x,prefixCls:_,disabled:w,id:I,multiple:O,accept:P,capture:E,directory:R,openFileDialogOnClick:A,onMouseenter:N,onMouseleave:F}=e,W=bAe(e,["componentTag","prefixCls","disabled","id","multiple","accept","capture","directory","openFileDialogOnClick","onMouseenter","onMouseleave"]),D={[_]:!0,[`${_}-disabled`]:w,[o.class]:!!o.class},B=R?{directory:"directory",webkitdirectory:"webkitdirectory"}:{};return g(x,V(V({},w?{}:{onClick:A?v:()=>{},onKeydown:A?y:()=>{},onMouseenter:N,onMouseleave:F,onDrop:b,onDragover:b,tabindex:"0"}),{},{class:D,role:"button",style:o.style}),{default:()=>[g("input",V(V(V({},As(W,{aria:!0,data:!0})),{},{id:I,type:"file",ref:l,onClick:L=>L.stopPropagation(),onCancel:L=>L.stopPropagation(),key:i.value,style:{display:"none"},accept:P},B),{},{multiple:O,onChange:m},E!=null?{capture:E}:{}),null),($=n.default)===null||$===void 0?void 0:$.call(n)]})}}});function qC(){}const _R=pe({compatConfig:{MODE:3},name:"Upload",inheritAttrs:!1,props:bt(aj(),{componentTag:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:qC,onError:qC,onSuccess:qC,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0}),setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=he();return r({abort:l=>{var s;(s=i.value)===null||s===void 0||s.abort(l)}}),()=>g(yAe,V(V(V({},e),o),{},{ref:i}),n)}});var SAe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};const CAe=SAe;function OR(e){for(var t=1;t{let{uid:i}=r;return i===e.uid});return o===-1?n.push(e):n[o]=e,n}function ZC(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(o=>o[n]===e[n])[0]}function RAe(e,t){const n=e.uid!==void 0?"uid":"name",o=t.filter(r=>r[n]!==e[n]);return o.length===t.length?null:o}const DAe=function(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),o=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(o)||[""])[0]},sj=e=>e.indexOf("image/")===0,LAe=e=>{if(e.type&&!e.thumbUrl)return sj(e.type);const t=e.thumbUrl||e.url||"",n=DAe(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n)?!0:!(/^data:/.test(t)||n)},Yl=200;function NAe(e){return new Promise(t=>{if(!e.type||!sj(e.type)){t("");return}const n=document.createElement("canvas");n.width=Yl,n.height=Yl,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${Yl}px; height: ${Yl}px; z-index: 9999; display: none;`,document.body.appendChild(n);const o=n.getContext("2d"),r=new Image;if(r.onload=()=>{const{width:i,height:a}=r;let l=Yl,s=Yl,c=0,u=0;i>a?(s=a*(Yl/i),u=-(s-l)/2):(l=i*(Yl/a),c=-(l-s)/2),o.drawImage(r,c,u,l,s);const d=n.toDataURL();document.body.removeChild(n),t(d)},r.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const i=new FileReader;i.addEventListener("load",()=>{i.result&&(r.src=i.result)}),i.readAsDataURL(e)}else r.src=window.URL.createObjectURL(e)})}var kAe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const BAe=kAe;function TR(e){for(var t=1;t({prefixCls:String,locale:qe(void 0),file:qe(),items:kt(),listType:Qe(),isImgUrl:Oe(),showRemoveIcon:De(),showDownloadIcon:De(),showPreviewIcon:De(),removeIcon:Oe(),downloadIcon:Oe(),previewIcon:Oe(),iconRender:Oe(),actionIconRender:Oe(),itemRender:Oe(),onPreview:Oe(),onClose:Oe(),onDownload:Oe(),progress:qe()}),jAe=pe({compatConfig:{MODE:3},name:"ListItem",inheritAttrs:!1,props:zAe(),setup(e,t){let{slots:n,attrs:o}=t;var r;const i=ve(!1),a=ve();lt(()=>{a.value=setTimeout(()=>{i.value=!0},300)}),Ct(()=>{clearTimeout(a.value)});const l=ve((r=e.file)===null||r===void 0?void 0:r.status);Ie(()=>{var u;return(u=e.file)===null||u===void 0?void 0:u.status},u=>{u!=="removed"&&(l.value=u)});const{rootPrefixCls:s}=Ve("upload",e),c=M(()=>Hi(`${s.value}-fade`));return()=>{var u,d;const{prefixCls:f,locale:h,listType:m,file:v,items:y,progress:b,iconRender:$=n.iconRender,actionIconRender:x=n.actionIconRender,itemRender:_=n.itemRender,isImgUrl:w,showPreviewIcon:I,showRemoveIcon:O,showDownloadIcon:P,previewIcon:E=n.previewIcon,removeIcon:R=n.removeIcon,downloadIcon:A=n.downloadIcon,onPreview:N,onDownload:F,onClose:W}=e,{class:D,style:B}=o,k=$({file:v});let L=g("div",{class:`${f}-text-icon`},[k]);if(m==="picture"||m==="picture-card")if(l.value==="uploading"||!v.thumbUrl&&!v.url){const H={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:l.value!=="uploading"};L=g("div",{class:H},[k])}else{const H=w!=null&&w(v)?g("img",{src:v.thumbUrl||v.url,alt:v.name,class:`${f}-list-item-image`,crossorigin:v.crossOrigin},null):k,j={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:w&&!w(v)};L=g("a",{class:j,onClick:q=>N(v,q),href:v.url||v.thumbUrl,target:"_blank",rel:"noopener noreferrer"},[H])}const z={[`${f}-list-item`]:!0,[`${f}-list-item-${l.value}`]:!0},K=typeof v.linkProps=="string"?JSON.parse(v.linkProps):v.linkProps,G=O?x({customIcon:R?R({file:v}):g(ej,null,null),callback:()=>W(v),prefixCls:f,title:h.removeFile}):null,Y=P&&l.value==="done"?x({customIcon:A?A({file:v}):g(HAe,null,null),callback:()=>F(v),prefixCls:f,title:h.downloadFile}):null,ne=m!=="picture-card"&&g("span",{key:"download-delete",class:[`${f}-list-item-actions`,{picture:m==="picture"}]},[Y,G]),re=`${f}-list-item-name`,J=v.url?[g("a",V(V({key:"view",target:"_blank",rel:"noopener noreferrer",class:re,title:v.name},K),{},{href:v.url,onClick:H=>N(v,H)}),[v.name]),ne]:[g("span",{key:"view",class:re,onClick:H=>N(v,H),title:v.name},[v.name]),ne],te={pointerEvents:"none",opacity:.5},ee=I?g("a",{href:v.url||v.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:v.url||v.thumbUrl?void 0:te,onClick:H=>N(v,H),title:h.previewFile},[E?E({file:v}):g(sI,null,null)]):null,fe=m==="picture-card"&&l.value!=="uploading"&&g("span",{class:`${f}-list-item-actions`},[ee,l.value==="done"&&Y,G]),ie=g("div",{class:z},[L,J,fe,i.value&&g(so,c.value,{default:()=>[Ln(g("div",{class:`${f}-list-item-progress`},["percent"in v?g(II,V(V({},b),{},{type:"line",percent:v.percent}),null):null]),[[Bo,l.value==="uploading"]])]})]),X={[`${f}-list-item-container`]:!0,[`${D}`]:!!D},ue=v.response&&typeof v.response=="string"?v.response:((u=v.error)===null||u===void 0?void 0:u.statusText)||((d=v.error)===null||d===void 0?void 0:d.message)||h.uploadError,ye=l.value==="error"?g(Br,{title:ue,getPopupContainer:H=>H.parentNode},{default:()=>[ie]}):ie;return g("div",{class:X,style:B},[_?_({originNode:ye,file:v,fileList:y,actions:{download:F.bind(null,v),preview:N.bind(null,v),remove:W.bind(null,v)}}):ye])}}}),WAe=(e,t)=>{let{slots:n}=t;var o;return _n((o=n.default)===null||o===void 0?void 0:o.call(n))[0]},VAe=pe({compatConfig:{MODE:3},name:"AUploadList",props:bt(MAe(),{listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:NAe,isImageUrl:LAe,items:[],appendActionVisible:!0}),setup(e,t){let{slots:n,expose:o}=t;const r=ve(!1);lt(()=>{r.value==!0});const i=ve([]);Ie(()=>e.items,function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.value=v.slice()},{immediate:!0,deep:!0}),ct(()=>{if(e.listType!=="picture"&&e.listType!=="picture-card")return;let v=!1;(e.items||[]).forEach((y,b)=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(y.originFileObj instanceof File||y.originFileObj instanceof Blob)||y.thumbUrl!==void 0||(y.thumbUrl="",e.previewFile&&e.previewFile(y.originFileObj).then($=>{const x=$||"";x!==y.thumbUrl&&(i.value[b].thumbUrl=x,v=!0)}))}),v&&KL(i)});const a=(v,y)=>{if(e.onPreview)return y==null||y.preventDefault(),e.onPreview(v)},l=v=>{typeof e.onDownload=="function"?e.onDownload(v):v.url&&window.open(v.url)},s=v=>{var y;(y=e.onRemove)===null||y===void 0||y.call(e,v)},c=v=>{let{file:y}=v;const b=e.iconRender||n.iconRender;if(b)return b({file:y,listType:e.listType});const $=y.status==="uploading",x=e.isImageUrl&&e.isImageUrl(y)?g(IAe,null,null):g(AAe,null,null);let _=g($?di:xAe,null,null);return e.listType==="picture"?_=$?g(di,null,null):x:e.listType==="picture-card"&&(_=$?e.locale.uploading:x),_},u=v=>{const{customIcon:y,callback:b,prefixCls:$,title:x}=v,_={type:"text",size:"small",title:x,onClick:()=>{b()},class:`${$}-list-item-action`};return Jn(y)?g(Un,_,{icon:()=>y}):g(Un,_,{default:()=>[g("span",null,[y])]})};o({handlePreview:a,handleDownload:l});const{prefixCls:d,rootPrefixCls:f}=Ve("upload",e),h=M(()=>({[`${d.value}-list`]:!0,[`${d.value}-list-${e.listType}`]:!0})),m=M(()=>{const v=S({},Uh(`${f.value}-motion-collapse`));delete v.onAfterAppear,delete v.onAfterEnter,delete v.onAfterLeave;const y=S(S({},ny(`${d.value}-${e.listType==="picture-card"?"animate-inline":"animate"}`)),{class:h.value,appear:r.value});return e.listType!=="picture-card"?S(S({},v),y):y});return()=>{const{listType:v,locale:y,isImageUrl:b,showPreviewIcon:$,showRemoveIcon:x,showDownloadIcon:_,removeIcon:w,previewIcon:I,downloadIcon:O,progress:P,appendAction:E,itemRender:R,appendActionVisible:A}=e,N=E==null?void 0:E(),F=i.value;return g(Lb,V(V({},m.value),{},{tag:"div"}),{default:()=>[F.map(W=>{const{uid:D}=W;return g(jAe,{key:D,locale:y,prefixCls:d.value,file:W,items:F,progress:P,listType:v,isImgUrl:b,showPreviewIcon:$,showRemoveIcon:x,showDownloadIcon:_,onPreview:a,onDownload:l,onClose:s,removeIcon:w,previewIcon:I,downloadIcon:O,itemRender:R},S(S({},n),{iconRender:c,actionIconRender:u}))}),E?Ln(g(WAe,{key:"__ant_upload_appendAction"},{default:()=>N}),[[Bo,!!A]]):null]})}}}),KAe=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:`${e.padding}px 0`},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{cursor:"not-allowed",[`p${t}-drag-icon ${n}, + p${t}-text, + p${t}-hint + `]:{color:e.colorTextDisabled}}}}}},UAe=KAe,GAe=e=>{const{componentCls:t,antCls:n,iconCls:o,fontSize:r,lineHeight:i}=e,a=`${t}-list-item`,l=`${a}-actions`,s=`${a}-action`,c=Math.round(r*i);return{[`${t}-wrapper`]:{[`${t}-list`]:S(S({},aa()),{lineHeight:e.lineHeight,[a]:{position:"relative",height:e.lineHeight*r,marginTop:e.marginXS,fontSize:r,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${a}-name`]:S(S({},eo),{padding:`0 ${e.paddingXS}px`,lineHeight:i,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[l]:{[s]:{opacity:0},[`${s}${n}-btn-sm`]:{height:c,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[` + ${s}:focus, + &.picture ${s} + `]:{opacity:1},[o]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:r},[`${a}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:r+e.paddingXS,fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${a}:hover ${s}`]:{opacity:1,color:e.colorText},[`${a}-error`]:{color:e.colorError,[`${a}-name, ${t}-icon ${o}`]:{color:e.colorError},[l]:{[`${o}, ${o}:hover`]:{color:e.colorError},[s]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},YAe=GAe,ER=new Pt("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),AR=new Pt("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),XAe=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:ER},[`${n}-leave`]:{animationName:AR}}},ER,AR]},qAe=XAe,ZAe=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:o,uploadProgressOffset:r}=e,i=`${t}-list`,a=`${i}-item`;return{[`${t}-wrapper`]:{[`${i}${i}-picture, ${i}${i}-picture-card`]:{[a]:{position:"relative",height:o+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${a}-thumbnail`]:S(S({},eo),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${a}-progress`]:{bottom:r,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${a}-error`]:{borderColor:e.colorError,[`${a}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${a}-uploading`]:{borderStyle:"dashed",[`${a}-name`]:{marginBottom:r}}}}}},QAe=e=>{const{componentCls:t,iconCls:n,fontSizeLG:o,colorTextLightSolid:r}=e,i=`${t}-list`,a=`${i}-item`,l=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:S(S({},aa()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:l,height:l,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${i}${i}-picture-card`]:{[`${i}-item-container`]:{display:"inline-block",width:l,height:l,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[a]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${a}:hover`]:{[`&::before, ${a}-actions`]:{opacity:1}},[`${a}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${a}-actions, ${a}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new Zt(r).setAlpha(.65).toRgbString(),"&:hover":{color:r}}},[`${a}-thumbnail, ${a}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${a}-name`]:{display:"none",textAlign:"center"},[`${a}-file + ${a}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${a}-uploading`]:{[`&${a}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${a}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},JAe=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},eMe=JAe,tMe=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:S(S({},vt(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},nMe=pt("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:o,lineWidth:r,controlHeightLG:i}=e,a=Math.round(n*o),l=nt(e,{uploadThumbnailSize:t*2,uploadProgressOffset:a/2+r,uploadPicCardSize:i*2.55});return[tMe(l),UAe(l),ZAe(l),QAe(l),YAe(l),qAe(l),eMe(l),Kh(l)]});var oMe=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(u){try{c(o.next(u))}catch(d){a(d)}}function s(u){try{c(o.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):r(u.value).then(l,s)}c((o=o.apply(e,t||[])).next())})},rMe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var A;return(A=s.value)!==null&&A!==void 0?A:d.value}),[h,m]=yn(e.defaultFileList||[],{value:st(e,"fileList"),postState:A=>{const N=Date.now();return(A??[]).map((F,W)=>(!F.uid&&!Object.isFrozen(F)&&(F.uid=`__AUTO__${N}_${W}__`),F))}}),v=he("drop"),y=he(null);lt(()=>{pn(e.fileList!==void 0||o.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),pn(e.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),pn(e.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const b=(A,N,F)=>{var W,D;let B=[...N];e.maxCount===1?B=B.slice(-1):e.maxCount&&(B=B.slice(0,e.maxCount)),m(B);const k={file:A,fileList:B};F&&(k.event=F),(W=e["onUpdate:fileList"])===null||W===void 0||W.call(e,k.fileList),(D=e.onChange)===null||D===void 0||D.call(e,k),i.onFieldChange()},$=(A,N)=>oMe(this,void 0,void 0,function*(){const{beforeUpload:F,transformFile:W}=e;let D=A;if(F){const B=yield F(A,N);if(B===!1)return!1;if(delete A[ap],B===ap)return Object.defineProperty(A,ap,{value:!0,configurable:!0}),!1;typeof B=="object"&&B&&(D=B)}return W&&(D=yield W(D)),D}),x=A=>{const N=A.filter(D=>!D.file[ap]);if(!N.length)return;const F=N.map(D=>Wv(D.file));let W=[...h.value];F.forEach(D=>{W=Vv(D,W)}),F.forEach((D,B)=>{let k=D;if(N[B].parsedFile)D.status="uploading";else{const{originFileObj:L}=D;let z;try{z=new File([L],L.name,{type:L.type})}catch{z=new Blob([L],{type:L.type}),z.name=L.name,z.lastModifiedDate=new Date,z.lastModified=new Date().getTime()}z.uid=D.uid,k=z}b(k,W)})},_=(A,N,F)=>{try{typeof A=="string"&&(A=JSON.parse(A))}catch{}if(!ZC(N,h.value))return;const W=Wv(N);W.status="done",W.percent=100,W.response=A,W.xhr=F;const D=Vv(W,h.value);b(W,D)},w=(A,N)=>{if(!ZC(N,h.value))return;const F=Wv(N);F.status="uploading",F.percent=A.percent;const W=Vv(F,h.value);b(F,W,A)},I=(A,N,F)=>{if(!ZC(F,h.value))return;const W=Wv(F);W.error=A,W.response=N,W.status="error";const D=Vv(W,h.value);b(W,D)},O=A=>{let N;const F=e.onRemove||e.remove;Promise.resolve(typeof F=="function"?F(A):F).then(W=>{var D,B;if(W===!1)return;const k=RAe(A,h.value);k&&(N=S(S({},A),{status:"removed"}),(D=h.value)===null||D===void 0||D.forEach(L=>{const z=N.uid!==void 0?"uid":"name";L[z]===N[z]&&!Object.isFrozen(L)&&(L.status="removed")}),(B=y.value)===null||B===void 0||B.abort(N),b(N,k))})},P=A=>{var N;v.value=A.type,A.type==="drop"&&((N=e.onDrop)===null||N===void 0||N.call(e,A))};r({onBatchStart:x,onSuccess:_,onProgress:w,onError:I,fileList:h,upload:y});const[E]=Wi("Upload",cr.Upload,M(()=>e.locale)),R=(A,N)=>{const{removeIcon:F,previewIcon:W,downloadIcon:D,previewFile:B,onPreview:k,onDownload:L,isImageUrl:z,progress:K,itemRender:G,iconRender:Y,showUploadList:ne}=e,{showDownloadIcon:re,showPreviewIcon:J,showRemoveIcon:te}=typeof ne=="boolean"?{}:ne;return ne?g(VAe,{prefixCls:a.value,listType:e.listType,items:h.value,previewFile:B,onPreview:k,onDownload:L,onRemove:O,showRemoveIcon:!f.value&&te,showPreviewIcon:J,showDownloadIcon:re,removeIcon:F,previewIcon:W,downloadIcon:D,iconRender:Y,locale:E.value,isImageUrl:z,progress:K,itemRender:G,appendActionVisible:N,appendAction:A},S({},n)):A==null?void 0:A()};return()=>{var A,N,F;const{listType:W,type:D}=e,{class:B,style:k}=o,L=rMe(o,["class","style"]),z=S(S(S({onBatchStart:x,onError:I,onProgress:w,onSuccess:_},L),e),{id:(A=e.id)!==null&&A!==void 0?A:i.id.value,prefixCls:a.value,beforeUpload:$,onChange:void 0,disabled:f.value});delete z.remove,(!n.default||f.value)&&delete z.id;const K={[`${a.value}-rtl`]:l.value==="rtl"};if(D==="drag"){const re=me(a.value,{[`${a.value}-drag`]:!0,[`${a.value}-drag-uploading`]:h.value.some(J=>J.status==="uploading"),[`${a.value}-drag-hover`]:v.value==="dragover",[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:l.value==="rtl"},o.class,u.value);return c(g("span",V(V({},o),{},{class:me(`${a.value}-wrapper`,K,B,u.value)}),[g("div",{class:re,onDrop:P,onDragover:P,onDragleave:P,style:o.style},[g(_R,V(V({},z),{},{ref:y,class:`${a.value}-btn`}),V({default:()=>[g("div",{class:`${a.value}-drag-container`},[(N=n.default)===null||N===void 0?void 0:N.call(n)])]},n))]),R()]))}const G=me(a.value,{[`${a.value}-select`]:!0,[`${a.value}-select-${W}`]:!0,[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:l.value==="rtl"}),Y=ln((F=n.default)===null||F===void 0?void 0:F.call(n)),ne=re=>g("div",{class:G,style:re},[g(_R,V(V({},z),{},{ref:y}),n)]);return c(W==="picture-card"?g("span",V(V({},o),{},{class:me(`${a.value}-wrapper`,`${a.value}-picture-card-wrapper`,K,o.class,u.value)}),[R(ne,!!(Y&&Y.length))]):g("span",V(V({},o),{},{class:me(`${a.value}-wrapper`,K,o.class,u.value)}),[ne(Y&&Y.length?void 0:{display:"none"}),R()]))}}});var MR=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{height:r}=e,i=MR(e,["height"]),{style:a}=o,l=MR(o,["style"]),s=S(S(S({},i),l),{type:"drag",style:S(S({},a),{height:typeof r=="number"?`${r}px`:r})});return g(Wm,s,n)}}}),iMe=Vm,aMe=S(Wm,{Dragger:Vm,LIST_IGNORE:ap,install(e){return e.component(Wm.name,Wm),e.component(Vm.name,Vm),e}});function lMe(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function sMe(e){return Object.keys(e).map(t=>`${lMe(t)}: ${e[t]};`).join(" ")}function RR(){return window.devicePixelRatio||1}function QC(e,t,n,o){e.translate(t,n),e.rotate(Math.PI/180*Number(o)),e.translate(-t,-n)}const cMe=(e,t)=>{let n=!1;return e.removedNodes.length&&(n=Array.from(e.removedNodes).some(o=>o===t)),e.type==="attributes"&&e.target===t&&(n=!0),n};var uMe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=IB}=n,r=uMe(n,["window"]);let i;const a=_B(()=>o&&"MutationObserver"in o),l=()=>{i&&(i.disconnect(),i=void 0)},s=Ie(()=>xO(e),u=>{l(),a.value&&o&&u&&(i=new MutationObserver(t),i.observe(u,r))},{immediate:!0}),c=()=>{l(),s()};return wB(c),{isSupported:a,stop:c}}const JC=2,DR=3,fMe=()=>({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:rt([String,Array]),font:qe(),rootClassName:String,gap:kt(),offset:kt()}),pMe=pe({name:"AWatermark",inheritAttrs:!1,props:bt(fMe(),{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(e,t){let{slots:n,attrs:o}=t;const[,r]=Ol(),i=ve(),a=ve(),l=ve(!1),s=M(()=>{var R,A;return(A=(R=e.gap)===null||R===void 0?void 0:R[0])!==null&&A!==void 0?A:100}),c=M(()=>{var R,A;return(A=(R=e.gap)===null||R===void 0?void 0:R[1])!==null&&A!==void 0?A:100}),u=M(()=>s.value/2),d=M(()=>c.value/2),f=M(()=>{var R,A;return(A=(R=e.offset)===null||R===void 0?void 0:R[0])!==null&&A!==void 0?A:u.value}),h=M(()=>{var R,A;return(A=(R=e.offset)===null||R===void 0?void 0:R[1])!==null&&A!==void 0?A:d.value}),m=M(()=>{var R,A;return(A=(R=e.font)===null||R===void 0?void 0:R.fontSize)!==null&&A!==void 0?A:r.value.fontSizeLG}),v=M(()=>{var R,A;return(A=(R=e.font)===null||R===void 0?void 0:R.fontWeight)!==null&&A!==void 0?A:"normal"}),y=M(()=>{var R,A;return(A=(R=e.font)===null||R===void 0?void 0:R.fontStyle)!==null&&A!==void 0?A:"normal"}),b=M(()=>{var R,A;return(A=(R=e.font)===null||R===void 0?void 0:R.fontFamily)!==null&&A!==void 0?A:"sans-serif"}),$=M(()=>{var R,A;return(A=(R=e.font)===null||R===void 0?void 0:R.color)!==null&&A!==void 0?A:r.value.colorFill}),x=M(()=>{var R;const A={zIndex:(R=e.zIndex)!==null&&R!==void 0?R:9,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let N=f.value-u.value,F=h.value-d.value;return N>0&&(A.left=`${N}px`,A.width=`calc(100% - ${N}px)`,N=0),F>0&&(A.top=`${F}px`,A.height=`calc(100% - ${F}px)`,F=0),A.backgroundPosition=`${N}px ${F}px`,A}),_=()=>{a.value&&(a.value.remove(),a.value=void 0)},w=(R,A)=>{var N;i.value&&a.value&&(l.value=!0,a.value.setAttribute("style",sMe(S(S({},x.value),{backgroundImage:`url('${R}')`,backgroundSize:`${(s.value+A)*JC}px`}))),(N=i.value)===null||N===void 0||N.append(a.value),setTimeout(()=>{l.value=!1}))},I=R=>{let A=120,N=64;const F=e.content,W=e.image,D=e.width,B=e.height;if(!W&&R.measureText){R.font=`${Number(m.value)}px ${b.value}`;const k=Array.isArray(F)?F:[F],L=k.map(z=>R.measureText(z).width);A=Math.ceil(Math.max(...L)),N=Number(m.value)*k.length+(k.length-1)*DR}return[D??A,B??N]},O=(R,A,N,F,W)=>{const D=RR(),B=e.content,k=Number(m.value)*D;R.font=`${y.value} normal ${v.value} ${k}px/${W}px ${b.value}`,R.fillStyle=$.value,R.textAlign="center",R.textBaseline="top",R.translate(F/2,0);const L=Array.isArray(B)?B:[B];L==null||L.forEach((z,K)=>{R.fillText(z??"",A,N+K*(k+DR*D))})},P=()=>{var R;const A=document.createElement("canvas"),N=A.getContext("2d"),F=e.image,W=(R=e.rotate)!==null&&R!==void 0?R:-22;if(N){a.value||(a.value=document.createElement("div"));const D=RR(),[B,k]=I(N),L=(s.value+B)*D,z=(c.value+k)*D;A.setAttribute("width",`${L*JC}px`),A.setAttribute("height",`${z*JC}px`);const K=s.value*D/2,G=c.value*D/2,Y=B*D,ne=k*D,re=(Y+s.value*D)/2,J=(ne+c.value*D)/2,te=K+L,ee=G+z,fe=re+L,ie=J+z;if(N.save(),QC(N,re,J,W),F){const X=new Image;X.onload=()=>{N.drawImage(X,K,G,Y,ne),N.restore(),QC(N,fe,ie,W),N.drawImage(X,te,ee,Y,ne),w(A.toDataURL(),B)},X.crossOrigin="anonymous",X.referrerPolicy="no-referrer",X.src=F}else O(N,K,G,Y,ne),N.restore(),QC(N,fe,ie,W),O(N,te,ee,Y,ne),w(A.toDataURL(),B)}};return lt(()=>{P()}),Ie(()=>[e,r.value.colorFill,r.value.fontSizeLG],()=>{P()},{deep:!0,flush:"post"}),Ct(()=>{_()}),dMe(i,R=>{l.value||R.forEach(A=>{cMe(A,a.value)&&(_(),P())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:["style","class"]}),()=>{var R;return g("div",V(V({},o),{},{ref:i,class:[o.class,e.rootClassName],style:[{position:"relative"},o.style]}),[(R=n.default)===null||R===void 0?void 0:R.call(n)])}}}),hMe=$n(pMe);function LR(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function NR(e){return{backgroundColor:e.bgColorSelected,boxShadow:e.boxShadow}}const gMe=S({overflow:"hidden"},eo),vMe=e=>{const{componentCls:t}=e;return{[t]:S(S(S(S(S({},vt(e)),{display:"inline-block",padding:e.segmentedContainerPadding,color:e.labelColor,backgroundColor:e.bgColor,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,"&-selected":S(S({},NR(e)),{color:e.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.labelColorHover,"&::after":{backgroundColor:e.bgColorHover}},"&-label":S({minHeight:e.controlHeight-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeight-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`},gMe),"&-icon + *":{marginInlineStart:e.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:S(S({},NR(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${e.paddingXXS}px 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:e.controlHeightLG-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightLG-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:e.controlHeightSM-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightSM-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontalSM}px`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),LR(`&-disabled ${t}-item`,e)),LR(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"}})}},mMe=pt("Segmented",e=>{const{lineWidthBold:t,lineWidth:n,colorTextLabel:o,colorText:r,colorFillSecondary:i,colorBgLayout:a,colorBgElevated:l}=e,s=nt(e,{segmentedPaddingHorizontal:e.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:e.controlPaddingHorizontalSM-n,segmentedContainerPadding:t,labelColor:o,labelColorHover:r,bgColor:a,bgColorHover:i,bgColorSelected:l});return[vMe(s)]}),kR=e=>e?{left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth}:null,Du=e=>e!==void 0?`${e}px`:void 0,bMe=pe({props:{value:cn(),getValueIndex:cn(),prefixCls:cn(),motionName:cn(),onMotionStart:cn(),onMotionEnd:cn(),direction:cn(),containerRef:cn()},emits:["motionStart","motionEnd"],setup(e,t){let{emit:n}=t;const o=he(),r=m=>{var v;const y=e.getValueIndex(m),b=(v=e.containerRef.value)===null||v===void 0?void 0:v.querySelectorAll(`.${e.prefixCls}-item`)[y];return(b==null?void 0:b.offsetParent)&&b},i=he(null),a=he(null);Ie(()=>e.value,(m,v)=>{const y=r(v),b=r(m),$=kR(y),x=kR(b);i.value=$,a.value=x,n(y&&b?"motionStart":"motionEnd")},{flush:"post"});const l=M(()=>{var m,v;return e.direction==="rtl"?Du(-((m=i.value)===null||m===void 0?void 0:m.right)):Du((v=i.value)===null||v===void 0?void 0:v.left)}),s=M(()=>{var m,v;return e.direction==="rtl"?Du(-((m=a.value)===null||m===void 0?void 0:m.right)):Du((v=a.value)===null||v===void 0?void 0:v.left)});let c;const u=m=>{clearTimeout(c),wt(()=>{m&&(m.style.transform="translateX(var(--thumb-start-left))",m.style.width="var(--thumb-start-width)")})},d=m=>{c=setTimeout(()=>{m&&(Cx(m,`${e.motionName}-appear-active`),m.style.transform="translateX(var(--thumb-active-left))",m.style.width="var(--thumb-active-width)")})},f=m=>{i.value=null,a.value=null,m&&(m.style.transform=null,m.style.width=null,$x(m,`${e.motionName}-appear-active`)),n("motionEnd")},h=M(()=>{var m,v;return{"--thumb-start-left":l.value,"--thumb-start-width":Du((m=i.value)===null||m===void 0?void 0:m.width),"--thumb-active-left":s.value,"--thumb-active-width":Du((v=a.value)===null||v===void 0?void 0:v.width)}});return Ct(()=>{clearTimeout(c)}),()=>{const m={ref:o,style:h.value,class:[`${e.prefixCls}-thumb`]};return g(so,{appear:!0,onBeforeEnter:u,onEnter:d,onAfterEnter:f},{default:()=>[!i.value||!a.value?null:g("div",m,null)]})}}}),yMe=bMe;function SMe(e){return e.map(t=>typeof t=="object"&&t!==null?t:{label:t==null?void 0:t.toString(),title:t==null?void 0:t.toString(),value:t})}const CMe=()=>({prefixCls:String,options:kt(),block:De(),disabled:De(),size:Qe(),value:S(S({},rt([String,Number])),{required:!0}),motionName:String,onChange:Oe(),"onUpdate:value":Oe()}),cj=(e,t)=>{let{slots:n,emit:o}=t;const{value:r,disabled:i,payload:a,title:l,prefixCls:s,label:c=n.label,checked:u,className:d}=e,f=h=>{i||o("change",h,r)};return g("label",{class:me({[`${s}-item-disabled`]:i},d)},[g("input",{class:`${s}-item-input`,type:"radio",disabled:i,checked:u,onChange:f},null),g("div",{class:`${s}-item-label`,title:typeof l=="string"?l:""},[typeof c=="function"?c({value:r,disabled:i,payload:a,title:l}):c??r])])};cj.inheritAttrs=!1;const $Me=pe({name:"ASegmented",inheritAttrs:!1,props:bt(CMe(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:a,size:l}=Ve("segmented",e),[s,c]=mMe(i),u=ve(),d=ve(!1),f=M(()=>SMe(e.options)),h=(m,v)=>{e.disabled||(n("update:value",v),n("change",v))};return()=>{const m=i.value;return s(g("div",V(V({},r),{},{class:me(m,{[c.value]:!0,[`${m}-block`]:e.block,[`${m}-disabled`]:e.disabled,[`${m}-lg`]:l.value=="large",[`${m}-sm`]:l.value=="small",[`${m}-rtl`]:a.value==="rtl"},r.class),ref:u}),[g("div",{class:`${m}-group`},[g(yMe,{containerRef:u,prefixCls:m,value:e.value,motionName:`${m}-${e.motionName}`,direction:a.value,getValueIndex:v=>f.value.findIndex(y=>y.value===v),onMotionStart:()=>{d.value=!0},onMotionEnd:()=>{d.value=!1}},null),f.value.map(v=>g(cj,V(V({key:v.value,prefixCls:m,checked:v.value===e.value,onChange:h},v),{},{className:me(v.className,`${m}-item`,{[`${m}-item-selected`]:v.value===e.value&&!d.value}),disabled:!!e.disabled||!!v.disabled}),o))])]))}}}),xMe=$n($Me),wMe=e=>{const{componentCls:t}=e;return{[t]:S(S({},vt(e)),{display:"flex",justifyContent:"center",alignItems:"center",padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${t}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${t}-expired , & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}}),[`${t}-borderless`]:{borderColor:"transparent"}}},_Me=pt("QRCode",e=>wMe(nt(e,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"})));var OMe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const IMe=OMe;function BR(e){for(var t=1;t({size:{type:Number,default:160},value:{type:String,required:!0},type:Qe("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:qe()}),EMe=()=>S(S({},aP()),{errorLevel:Qe("M"),icon:String,iconSize:{type:Number,default:40},status:Qe("active"),bordered:{type:Boolean,default:!0}});/** + * @license QR Code generator library (TypeScript) + * Copyright (c) Project Nayuki. + * SPDX-License-Identifier: MIT + */var Bc;(function(e){class t{static encodeText(l,s){const c=e.QrSegment.makeSegments(l);return t.encodeSegments(c,s)}static encodeBinary(l,s){const c=e.QrSegment.makeBytes(l);return t.encodeSegments([c],s)}static encodeSegments(l,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(t.MIN_VERSION<=c&&c<=u&&u<=t.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let h,m;for(h=c;;h++){const $=t.getNumDataCodewords(h,s)*8,x=i.getTotalBits(l,h);if(x<=$){m=x;break}if(h>=u)throw new RangeError("Data too long")}for(const $ of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])f&&m<=t.getNumDataCodewords(h,$)*8&&(s=$);const v=[];for(const $ of l){n($.mode.modeBits,4,v),n($.numChars,$.mode.numCharCountBits(h),v);for(const x of $.getData())v.push(x)}r(v.length==m);const y=t.getNumDataCodewords(h,s)*8;r(v.length<=y),n(0,Math.min(4,y-v.length),v),n(0,(8-v.length%8)%8,v),r(v.length%8==0);for(let $=236;v.lengthb[x>>>3]|=$<<7-(x&7)),new t(h,s,b,d)}constructor(l,s,c,u){if(this.version=l,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],lt.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=l*4+17;const d=[];for(let h=0;h>>9)*1335;const u=(s<<10|c)^21522;r(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,o(u,d));this.setFunctionModule(8,7,o(u,6)),this.setFunctionModule(8,8,o(u,7)),this.setFunctionModule(7,8,o(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,o(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,o(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,o(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let c=0;c<12;c++)l=l<<1^(l>>>11)*7973;const s=this.version<<12|l;r(s>>>18==0);for(let c=0;c<18;c++){const u=o(s,c),d=this.size-11+c%3,f=Math.floor(c/3);this.setFunctionModule(d,f,u),this.setFunctionModule(f,d,u)}}drawFinderPattern(l,s){for(let c=-4;c<=4;c++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(c)),f=l+u,h=s+c;0<=f&&f{($!=m-d||_>=h)&&b.push(x[$])});return r(b.length==f),b}drawCodewords(l){if(l.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let u=0;u>>3],7-(s&7)),s++)}}r(s==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let s=0;s5&&l++):(this.finderPenaltyAddHistory(h,m),f||(l+=this.finderPenaltyCountPatterns(m)*t.PENALTY_N3),f=this.modules[d][v],h=1);l+=this.finderPenaltyTerminateAndCount(f,h,m)*t.PENALTY_N3}for(let d=0;d5&&l++):(this.finderPenaltyAddHistory(h,m),f||(l+=this.finderPenaltyCountPatterns(m)*t.PENALTY_N3),f=this.modules[v][d],h=1);l+=this.finderPenaltyTerminateAndCount(f,h,m)*t.PENALTY_N3}for(let d=0;df+(h?1:0),s);const c=this.size*this.size,u=Math.ceil(Math.abs(s*20-c*10)/c)-1;return r(0<=u&&u<=9),l+=u*t.PENALTY_N4,r(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2,c=[6];for(let u=this.size-7;c.lengtht.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*l+128)*l+64;if(l>=2){const c=Math.floor(l/7)+2;s-=(25*c-10)*c-55,l>=7&&(s-=36)}return r(208<=s&&s<=29648),s}static getNumDataCodewords(l,s){return Math.floor(t.getNumRawDataModules(l)/8)-t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][l]*t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");const s=[];for(let u=0;u0);for(const u of l){const d=u^c.shift();c.push(0),s.forEach((f,h)=>c[h]^=t.reedSolomonMultiply(f,d))}return c}static reedSolomonMultiply(l,s){if(l>>>8||s>>>8)throw new RangeError("Byte out of range");let c=0;for(let u=7;u>=0;u--)c=c<<1^(c>>>7)*285,c^=(s>>>u&1)*l;return r(c>>>8==0),c}finderPenaltyCountPatterns(l){const s=l[1];r(s<=this.size*3);const c=s>0&&l[2]==s&&l[3]==s*3&&l[4]==s&&l[5]==s;return(c&&l[0]>=s*4&&l[6]>=s?1:0)+(c&&l[6]>=s*4&&l[0]>=s?1:0)}finderPenaltyTerminateAndCount(l,s,c){return l&&(this.finderPenaltyAddHistory(s,c),s=0),s+=this.size,this.finderPenaltyAddHistory(s,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(l,s){s[0]==0&&(l+=this.size),s.pop(),s.unshift(l)}}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(a,l,s){if(l<0||l>31||a>>>l)throw new RangeError("Value out of range");for(let c=l-1;c>=0;c--)s.push(a>>>c&1)}function o(a,l){return(a>>>l&1)!=0}function r(a){if(!a)throw new Error("Assertion error")}class i{static makeBytes(l){const s=[];for(const c of l)n(c,8,s);return new i(i.Mode.BYTE,l.length,s)}static makeNumeric(l){if(!i.isNumeric(l))throw new RangeError("String contains non-numeric characters");const s=[];for(let c=0;c=1<1&&arguments[1]!==void 0?arguments[1]:0;const n=[];return e.forEach(function(o,r){let i=null;o.forEach(function(a,l){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${l-i}v1H${i+t}z`),i=null;return}if(l===o.length-1){if(!a)return;i===null?n.push(`M${l+t},${r+t} h1v1H${l+t}z`):n.push(`M${i+t},${r+t} h${l+1-i}v1H${i+t}z`);return}a&&i===null&&(i=l)})}),n.join("")}function vj(e,t){return e.slice().map((n,o)=>o=t.y+t.h?n:n.map((r,i)=>i=t.x+t.w?r:!1))}function mj(e,t,n,o){if(o==null)return null;const r=e.length+n*2,i=Math.floor(t*RMe),a=r/t,l=(o.width||i)*a,s=(o.height||i)*a,c=o.x==null?e.length/2-l/2:o.x*a,u=o.y==null?e.length/2-s/2:o.y*a;let d=null;if(o.excavate){const f=Math.floor(c),h=Math.floor(u),m=Math.ceil(l+c-f),v=Math.ceil(s+u-h);d={x:f,y:h,w:m,h:v}}return{x:c,y:u,h:s,w:l,excavation:d}}function bj(e,t){return t!=null?Math.floor(t):e?AMe:MMe}const DMe=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),LMe=pe({name:"QRCodeCanvas",inheritAttrs:!1,props:S(S({},aP()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(e,t){let{attrs:n,expose:o}=t;const r=M(()=>{var s;return(s=e.imageSettings)===null||s===void 0?void 0:s.src}),i=ve(null),a=ve(null),l=ve(!1);return o({toDataURL:(s,c)=>{var u;return(u=i.value)===null||u===void 0?void 0:u.toDataURL(s,c)}}),ct(()=>{const{value:s,size:c=bw,level:u=dj,bgColor:d=fj,fgColor:f=pj,includeMargin:h=hj,marginSize:m,imageSettings:v}=e;if(i.value!=null){const y=i.value,b=y.getContext("2d");if(!b)return;let $=nd.QrCode.encodeText(s,uj[u]).getModules();const x=bj(h,m),_=$.length+x*2,w=mj($,c,x,v),I=a.value,O=l.value&&w!=null&&I!==null&&I.complete&&I.naturalHeight!==0&&I.naturalWidth!==0;O&&w.excavation!=null&&($=vj($,w.excavation));const P=window.devicePixelRatio||1;y.height=y.width=c*P;const E=c/_*P;b.scale(E,E),b.fillStyle=d,b.fillRect(0,0,_,_),b.fillStyle=f,DMe?b.fill(new Path2D(gj($,x))):$.forEach(function(R,A){R.forEach(function(N,F){N&&b.fillRect(F+x,A+x,1,1)})}),O&&b.drawImage(I,w.x+x,w.y+x,w.w,w.h)}},{flush:"post"}),Ie(r,()=>{l.value=!1}),()=>{var s;const c=(s=e.size)!==null&&s!==void 0?s:bw,u={height:`${c}px`,width:`${c}px`};let d=null;return r.value!=null&&(d=g("img",{src:r.value,key:r.value,style:{display:"none"},onLoad:()=>{l.value=!0},ref:a},null)),g(Je,null,[g("canvas",V(V({},n),{},{style:[u,n.style],ref:i}),null),d])}}}),NMe=pe({name:"QRCodeSVG",inheritAttrs:!1,props:S(S({},aP()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(e){let t=null,n=null,o=null,r=null,i=null,a=null;return ct(()=>{const{value:l,size:s=bw,level:c=dj,includeMargin:u=hj,marginSize:d,imageSettings:f}=e;t=nd.QrCode.encodeText(l,uj[c]).getModules(),n=bj(u,d),o=t.length+n*2,r=mj(t,s,n,f),f!=null&&r!=null&&(r.excavation!=null&&(t=vj(t,r.excavation)),a=g("image",{"xlink:href":f.src,height:r.h,width:r.w,x:r.x+n,y:r.y+n,preserveAspectRatio:"none"},null)),i=gj(t,n)}),()=>{const l=e.bgColor&&fj,s=e.fgColor&&pj;return g("svg",{height:e.size,width:e.size,viewBox:`0 0 ${o} ${o}`},[!!e.title&&g("title",null,[e.title]),g("path",{fill:l,d:`M0,0 h${o}v${o}H0z`,"shape-rendering":"crispEdges"},null),g("path",{fill:s,d:i,"shape-rendering":"crispEdges"},null),a])}}}),kMe=pe({name:"AQrcode",inheritAttrs:!1,props:EMe(),emits:["refresh"],setup(e,t){let{emit:n,attrs:o,expose:r}=t;const[i]=Wi("QRCode"),{prefixCls:a}=Ve("qrcode",e),[l,s]=_Me(a),[,c]=Ol(),u=he();r({toDataURL:(f,h)=>{var m;return(m=u.value)===null||m===void 0?void 0:m.toDataURL(f,h)}});const d=M(()=>{const{value:f,icon:h="",size:m=160,iconSize:v=40,color:y=c.value.colorText,bgColor:b="transparent",errorLevel:$="M"}=e,x={src:h,x:void 0,y:void 0,height:v,width:v,excavate:!0};return{value:f,size:m-(c.value.paddingSM+c.value.lineWidth)*2,level:$,bgColor:b,fgColor:y,imageSettings:h?x:void 0}});return()=>{const f=a.value;return l(g("div",V(V({},o),{},{style:[o.style,{width:`${e.size}px`,height:`${e.size}px`,backgroundColor:d.value.bgColor}],class:[s.value,f,{[`${f}-borderless`]:!e.bordered}]}),[e.status!=="active"&&g("div",{class:`${f}-mask`},[e.status==="loading"&&g(Aa,null,null),e.status==="expired"&&g(Je,null,[g("p",{class:`${f}-expired`},[i.value.expired]),g(Un,{type:"link",onClick:h=>n("refresh",h)},{default:()=>[i.value.refresh],icon:()=>g(TMe,null,null)})]),e.status==="scanned"&&g("p",{class:`${f}-scanned`},[i.value.scanned])]),e.type==="canvas"?g(LMe,V({ref:u},d.value),null):g(NMe,d.value,null)]))}}}),BMe=$n(kMe);function FMe(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:o,right:r,bottom:i,left:a}=e.getBoundingClientRect();return o>=0&&a>=0&&r<=t&&i<=n}function HMe(e,t,n,o){const[r,i]=nn(void 0);ct(()=>{const u=typeof e.value=="function"?e.value():e.value;i(u||null)},{flush:"post"});const[a,l]=nn(null),s=()=>{if(!t.value){l(null);return}if(r.value){!FMe(r.value)&&t.value&&r.value.scrollIntoView(o.value);const{left:u,top:d,width:f,height:h}=r.value.getBoundingClientRect(),m={left:u,top:d,width:f,height:h,radius:0};JSON.stringify(a.value)!==JSON.stringify(m)&&l(m)}else l(null)};return lt(()=>{Ie([t,r],()=>{s()},{flush:"post",immediate:!0}),window.addEventListener("resize",s)}),Ct(()=>{window.removeEventListener("resize",s)}),[M(()=>{var u,d;if(!a.value)return a.value;const f=((u=n.value)===null||u===void 0?void 0:u.offset)||6,h=((d=n.value)===null||d===void 0?void 0:d.radius)||2;return{left:a.value.left-f,top:a.value.top-f,width:a.value.width+f*2,height:a.value.height+f*2,radius:h}}),r]}const zMe=()=>({arrow:rt([Boolean,Object]),target:rt([String,Function,Object]),title:rt([String,Object]),description:rt([String,Object]),placement:Qe(),mask:rt([Object,Boolean],!0),className:{type:String},style:qe(),scrollIntoViewOptions:rt([Boolean,Object])}),lP=()=>S(S({},zMe()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:Oe(),onFinish:Oe(),renderPanel:Oe(),onPrev:Oe(),onNext:Oe()}),jMe=pe({name:"DefaultPanel",inheritAttrs:!1,props:lP(),setup(e,t){let{attrs:n}=t;return()=>{const{prefixCls:o,current:r,total:i,title:a,description:l,onClose:s,onPrev:c,onNext:u,onFinish:d}=e;return g("div",V(V({},n),{},{class:me(`${o}-content`,n.class)}),[g("div",{class:`${o}-inner`},[g("button",{type:"button",onClick:s,"aria-label":"Close",class:`${o}-close`},[g("span",{class:`${o}-close-x`},[Do("×")])]),g("div",{class:`${o}-header`},[g("div",{class:`${o}-title`},[a])]),g("div",{class:`${o}-description`},[l]),g("div",{class:`${o}-footer`},[g("div",{class:`${o}-sliders`},[i>1?[...Array.from({length:i}).keys()].map((f,h)=>g("span",{key:f,class:h===r?"active":""},null)):null]),g("div",{class:`${o}-buttons`},[r!==0?g("button",{class:`${o}-prev-btn`,onClick:c},[Do("Prev")]):null,r===i-1?g("button",{class:`${o}-finish-btn`,onClick:d},[Do("Finish")]):g("button",{class:`${o}-next-btn`,onClick:u},[Do("Next")])])])])])}}}),WMe=jMe,VMe=pe({name:"TourStep",inheritAttrs:!1,props:lP(),setup(e,t){let{attrs:n}=t;return()=>{const{current:o,renderPanel:r}=e;return g(Je,null,[typeof r=="function"?r(S(S({},n),e),o):g(WMe,V(V({},n),e),null)])}}}),KMe=VMe;let FR=0;const UMe=ur();function GMe(){let e;return UMe?(e=FR,FR+=1):e="TEST_OR_SSR",e}function YMe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:he("");const t=`vc_unique_${GMe()}`;return e.value||t}const Kv={fill:"transparent","pointer-events":"auto"},XMe=pe({name:"TourMask",props:{prefixCls:{type:String},pos:qe(),rootClassName:{type:String},showMask:De(),fill:{type:String,default:"rgba(0,0,0,0.5)"},open:De(),animated:rt([Boolean,Object]),zIndex:{type:Number}},setup(e,t){let{attrs:n}=t;const o=YMe();return()=>{const{prefixCls:r,open:i,rootClassName:a,pos:l,showMask:s,fill:c,animated:u,zIndex:d}=e,f=`${r}-mask-${o}`,h=typeof u=="object"?u==null?void 0:u.placeholder:u;return g(Hh,{visible:i,autoLock:!0},{default:()=>i&&g("div",V(V({},n),{},{class:me(`${r}-mask`,a,n.class),style:[{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:"none"},n.style]}),[s?g("svg",{style:{width:"100%",height:"100%"}},[g("defs",null,[g("mask",{id:f},[g("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"},null),l&&g("rect",{x:l.left,y:l.top,rx:l.radius,width:l.width,height:l.height,fill:"black",class:h?`${r}-placeholder-animated`:""},null)])]),g("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:c,mask:`url(#${f})`},null),l&&g(Je,null,[g("rect",V(V({},Kv),{},{x:"0",y:"0",width:"100%",height:l.top}),null),g("rect",V(V({},Kv),{},{x:"0",y:"0",width:l.left,height:"100%"}),null),g("rect",V(V({},Kv),{},{x:"0",y:l.top+l.height,width:"100%",height:`calc(100vh - ${l.top+l.height}px)`}),null),g("rect",V(V({},Kv),{},{x:l.left+l.width,y:"0",width:`calc(100vw - ${l.left+l.width}px)`,height:"100%"}),null)])]):null])})}}}),qMe=XMe,ZMe=[0,0],HR={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function yj(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const t={};return Object.keys(HR).forEach(n=>{t[n]=S(S({},HR[n]),{autoArrow:e,targetOffset:ZMe})}),t}yj();var QMe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{builtinPlacements:e,popupAlign:t}=Y7();return{builtinPlacements:e,popupAlign:t,steps:kt(),open:De(),defaultCurrent:{type:Number},current:{type:Number},onChange:Oe(),onClose:Oe(),onFinish:Oe(),mask:rt([Boolean,Object],!0),arrow:rt([Boolean,Object],!0),rootClassName:{type:String},placement:Qe("bottom"),prefixCls:{type:String,default:"rc-tour"},renderPanel:Oe(),gap:qe(),animated:rt([Boolean,Object]),scrollIntoViewOptions:rt([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},JMe=pe({name:"Tour",inheritAttrs:!1,props:bt(Sj(),{}),setup(e){const{defaultCurrent:t,placement:n,mask:o,scrollIntoViewOptions:r,open:i,gap:a,arrow:l}=oa(e),s=he(),[c,u]=yn(0,{value:M(()=>e.current),defaultValue:t.value}),[d,f]=yn(void 0,{value:M(()=>e.open),postState:O=>c.value<0||c.value>=e.steps.length?!1:O??!0}),h=ve(d.value);ct(()=>{d.value&&!h.value&&u(0),h.value=d.value});const m=M(()=>e.steps[c.value]||{}),v=M(()=>{var O;return(O=m.value.placement)!==null&&O!==void 0?O:n.value}),y=M(()=>{var O;return d.value&&((O=m.value.mask)!==null&&O!==void 0?O:o.value)}),b=M(()=>{var O;return(O=m.value.scrollIntoViewOptions)!==null&&O!==void 0?O:r.value}),[$,x]=HMe(M(()=>m.value.target),i,a,b),_=M(()=>x.value?typeof m.value.arrow>"u"?l.value:m.value.arrow:!1),w=M(()=>typeof _.value=="object"?_.value.pointAtCenter:!1);Ie(w,()=>{var O;(O=s.value)===null||O===void 0||O.forcePopupAlign()}),Ie(c,()=>{var O;(O=s.value)===null||O===void 0||O.forcePopupAlign()});const I=O=>{var P;u(O),(P=e.onChange)===null||P===void 0||P.call(e,O)};return()=>{var O;const{prefixCls:P,steps:E,onClose:R,onFinish:A,rootClassName:N,renderPanel:F,animated:W,zIndex:D}=e,B=QMe(e,["prefixCls","steps","onClose","onFinish","rootClassName","renderPanel","animated","zIndex"]);if(x.value===void 0)return null;const k=()=>{f(!1),R==null||R(c.value)},L=typeof y.value=="boolean"?y.value:!!y.value,z=typeof y.value=="boolean"?void 0:y.value,K=()=>x.value||document.body,G=()=>g(KMe,V({arrow:_.value,key:"content",prefixCls:P,total:E.length,renderPanel:F,onPrev:()=>{I(c.value-1)},onNext:()=>{I(c.value+1)},onClose:k,current:c.value,onFinish:()=>{k(),A==null||A()}},m.value),null),Y=M(()=>{const ne=$.value||e$,re={};return Object.keys(ne).forEach(J=>{typeof ne[J]=="number"?re[J]=`${ne[J]}px`:re[J]=ne[J]}),re});return d.value?g(Je,null,[g(qMe,{zIndex:D,prefixCls:P,pos:$.value,showMask:L,style:z==null?void 0:z.style,fill:z==null?void 0:z.color,open:d.value,animated:W,rootClassName:N},null),g(tu,V(V({},B),{},{builtinPlacements:m.value.target?(O=B.builtinPlacements)!==null&&O!==void 0?O:yj(w.value):void 0,ref:s,popupStyle:m.value.target?m.value.style:S(S({},m.value.style),{position:"fixed",left:e$.left,top:e$.top,transform:"translate(-50%, -50%)"}),popupPlacement:v.value,popupVisible:d.value,popupClassName:me(N,m.value.className),prefixCls:P,popup:G,forceRender:!1,destroyPopupOnHide:!0,zIndex:D,mask:!1,getTriggerDOMNode:K}),{default:()=>[g(Hh,{visible:d.value,autoLock:!0},{default:()=>[g("div",{class:me(N,`${P}-target-placeholder`),style:S(S({},Y.value),{position:"fixed",pointerEvents:"none"})},null)]})]})]):null}}}),e6e=JMe,t6e=()=>S(S({},Sj()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),n6e=()=>S(S({},lP()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),o6e=pe({name:"ATourPanel",inheritAttrs:!1,props:n6e(),setup(e,t){let{attrs:n,slots:o}=t;const{current:r,total:i}=oa(e),a=M(()=>r.value===i.value-1),l=c=>{var u;const d=e.prevButtonProps;(u=e.onPrev)===null||u===void 0||u.call(e,c),typeof(d==null?void 0:d.onClick)=="function"&&(d==null||d.onClick())},s=c=>{var u,d;const f=e.nextButtonProps;a.value?(u=e.onFinish)===null||u===void 0||u.call(e,c):(d=e.onNext)===null||d===void 0||d.call(e,c),typeof(f==null?void 0:f.onClick)=="function"&&(f==null||f.onClick())};return()=>{const{prefixCls:c,title:u,onClose:d,cover:f,description:h,type:m,arrow:v}=e,y=e.prevButtonProps,b=e.nextButtonProps;let $;u&&($=g("div",{class:`${c}-header`},[g("div",{class:`${c}-title`},[u])]));let x;h&&(x=g("div",{class:`${c}-description`},[h]));let _;f&&(_=g("div",{class:`${c}-cover`},[f]));let w;o.indicatorsRender?w=o.indicatorsRender({current:r.value,total:i}):w=[...Array.from({length:i.value}).keys()].map((P,E)=>g("span",{key:P,class:me(E===r.value&&`${c}-indicator-active`,`${c}-indicator`)},null));const I=m==="primary"?"default":"primary",O={type:"default",ghost:m==="primary"};return g(Yc,{componentName:"Tour",defaultLocale:cr.Tour},{default:P=>{var E,R;return g("div",V(V({},n),{},{class:me(m==="primary"?`${c}-primary`:"",n.class,`${c}-content`)}),[v&&g("div",{class:`${c}-arrow`,key:"arrow"},null),g("div",{class:`${c}-inner`},[g(Vr,{class:`${c}-close`,onClick:d},null),_,$,x,g("div",{class:`${c}-footer`},[i.value>1&&g("div",{class:`${c}-indicators`},[w]),g("div",{class:`${c}-buttons`},[r.value!==0?g(Un,V(V(V({},O),y),{},{onClick:l,size:"small",class:me(`${c}-prev-btn`,y==null?void 0:y.className)}),{default:()=>[(E=y==null?void 0:y.children)!==null&&E!==void 0?E:P.Previous]}):null,g(Un,V(V({type:I},b),{},{onClick:s,size:"small",class:me(`${c}-next-btn`,b==null?void 0:b.className)}),{default:()=>[(R=b==null?void 0:b.children)!==null&&R!==void 0?R:a.value?P.Finish:P.Next]})])])])])}})}}}),r6e=o6e,i6e=e=>{let{defaultType:t,steps:n,current:o,defaultCurrent:r}=e;const i=he(r==null?void 0:r.value),a=M(()=>o==null?void 0:o.value);Ie(a,u=>{i.value=u??(r==null?void 0:r.value)},{immediate:!0});const l=u=>{i.value=u},s=M(()=>{var u,d;return typeof i.value=="number"?n&&((d=(u=n.value)===null||u===void 0?void 0:u[i.value])===null||d===void 0?void 0:d.type):t==null?void 0:t.value});return{currentMergedType:M(()=>{var u;return(u=s.value)!==null&&u!==void 0?u:t==null?void 0:t.value}),updateInnerCurrent:l}},a6e=e=>{const{componentCls:t,lineHeight:n,padding:o,paddingXS:r,borderRadius:i,borderRadiusXS:a,colorPrimary:l,colorText:s,colorFill:c,indicatorHeight:u,indicatorWidth:d,boxShadowTertiary:f,tourZIndexPopup:h,fontSize:m,colorBgContainer:v,fontWeightStrong:y,marginXS:b,colorTextLightSolid:$,tourBorderRadius:x,colorWhite:_,colorBgTextHover:w,tourCloseSize:I,motionDurationSlow:O,antCls:P}=e;return[{[t]:S(S({},vt(e)),{color:s,position:"absolute",zIndex:h,display:"block",visibility:"visible",fontSize:m,lineHeight:n,width:520,"--antd-arrow-background-color":v,"&-pure":{maxWidth:"100%",position:"relative"},[`&${t}-hidden`]:{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:x,boxShadow:f,position:"relative",backgroundColor:v,border:"none",backgroundClip:"padding-box",[`${t}-close`]:{position:"absolute",top:o,insetInlineEnd:o,color:e.colorIcon,outline:"none",width:I,height:I,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${t}-cover`]:{textAlign:"center",padding:`${o+I+r}px ${o}px 0`,img:{width:"100%"}},[`${t}-header`]:{padding:`${o}px ${o}px ${r}px`,[`${t}-title`]:{lineHeight:n,fontSize:m,fontWeight:y}},[`${t}-description`]:{padding:`0 ${o}px`,lineHeight:n,wordWrap:"break-word"},[`${t}-footer`]:{padding:`${r}px ${o}px ${o}px`,textAlign:"end",borderRadius:`0 0 ${a}px ${a}px`,display:"flex",[`${t}-indicators`]:{display:"inline-block",[`${t}-indicator`]:{width:d,height:u,display:"inline-block",borderRadius:"50%",background:c,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:l}}},[`${t}-buttons`]:{marginInlineStart:"auto",[`${P}-btn`]:{marginInlineStart:b}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":l,[`${t}-inner`]:{color:$,textAlign:"start",textDecoration:"none",backgroundColor:l,borderRadius:i,boxShadow:f,[`${t}-close`]:{color:$},[`${t}-indicators`]:{[`${t}-indicator`]:{background:new Zt($).setAlpha(.15).toRgbString(),"&-active":{background:$}}},[`${t}-prev-btn`]:{color:$,borderColor:new Zt($).setAlpha(.15).toRgbString(),backgroundColor:l,"&:hover":{backgroundColor:new Zt($).setAlpha(.15).toRgbString(),borderColor:"transparent"}},[`${t}-next-btn`]:{color:l,borderColor:"transparent",background:_,"&:hover":{background:new Zt(w).onBackground(_).toRgbString()}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${O}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(x,K_)}}},U_(e,{colorBg:"var(--antd-arrow-background-color)",contentRadius:x,limitVerticalRadius:!0})]},l6e=pt("Tour",e=>{const{borderRadiusLG:t,fontSize:n,lineHeight:o}=e,r=nt(e,{tourZIndexPopup:e.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t,tourCloseSize:n*o});return[a6e(r)]});var s6e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{steps:v,current:y,type:b,rootClassName:$}=e,x=s6e(e,["steps","current","type","rootClassName"]),_=me({[`${c.value}-primary`]:h.value==="primary",[`${c.value}-rtl`]:u.value==="rtl"},f.value,$),w=(P,E)=>g(r6e,V(V({},P),{},{type:b,current:E}),{indicatorsRender:r.indicatorsRender}),I=P=>{m(P),o("update:current",P),o("change",P)},O=M(()=>V_({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return d(g(e6e,V(V(V({},n),x),{},{rootClassName:_,prefixCls:c.value,current:y,defaultCurrent:e.defaultCurrent,animated:!0,renderPanel:w,onChange:I,steps:v,builtinPlacements:O.value}),null))}}}),u6e=$n(c6e),Cj=Symbol("appConfigContext"),d6e=e=>ft(Cj,e),f6e=()=>it(Cj,{}),$j=Symbol("appContext"),p6e=e=>ft($j,e),h6e=St({message:{},notification:{},modal:{}}),g6e=()=>it($j,h6e),v6e=e=>{const{componentCls:t,colorText:n,fontSize:o,lineHeight:r,fontFamily:i}=e;return{[t]:{color:n,fontSize:o,lineHeight:r,fontFamily:i}}},m6e=pt("App",e=>[v6e(e)]),b6e=()=>({rootClassName:String,message:qe(),notification:qe()}),y6e=()=>g6e(),Lp=pe({name:"AApp",props:bt(b6e(),{}),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ve("app",e),[r,i]=m6e(o),a=M(()=>me(i.value,o.value,e.rootClassName)),l=f6e(),s=M(()=>({message:S(S({},l.message),e.message),notification:S(S({},l.notification),e.notification)}));d6e(s.value);const[c,u]=BF(s.value.message),[d,f]=qF(s.value.notification),[h,m]=rz(),v=M(()=>({message:c,notification:d,modal:h}));return p6e(v.value),()=>{var y;return r(g("div",{class:a.value},[m(),u(),f(),(y=n.default)===null||y===void 0?void 0:y.call(n)]))}}});Lp.useApp=y6e;Lp.install=function(e){e.component(Lp.name,Lp)};const S6e=Lp,xj=["wrap","nowrap","wrap-reverse"],wj=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],_j=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],C6e=(e,t)=>{const n={};return xj.forEach(o=>{n[`${e}-wrap-${o}`]=t.wrap===o}),n},$6e=(e,t)=>{const n={};return _j.forEach(o=>{n[`${e}-align-${o}`]=t.align===o}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},x6e=(e,t)=>{const n={};return wj.forEach(o=>{n[`${e}-justify-${o}`]=t.justify===o}),n};function w6e(e,t){return me(S(S(S({},C6e(e,t)),$6e(e,t)),x6e(e,t)))}const _6e=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},O6e=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},I6e=e=>{const{componentCls:t}=e,n={};return xj.forEach(o=>{n[`${t}-wrap-${o}`]={flexWrap:o}}),n},P6e=e=>{const{componentCls:t}=e,n={};return _j.forEach(o=>{n[`${t}-align-${o}`]={alignItems:o}}),n},T6e=e=>{const{componentCls:t}=e,n={};return wj.forEach(o=>{n[`${t}-justify-${o}`]={justifyContent:o}}),n},E6e=pt("Flex",e=>{const t=nt(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[_6e(t),O6e(t),I6e(t),P6e(t),T6e(t)]});function zR(e){return["small","middle","large"].includes(e)}const A6e=()=>({prefixCls:Qe(),vertical:De(),wrap:Qe(),justify:Qe(),align:Qe(),flex:rt([Number,String]),gap:rt([Number,String]),component:cn()});var M6e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var u;return[a.value,s.value,w6e(a.value,e),{[`${a.value}-rtl`]:i.value==="rtl",[`${a.value}-gap-${e.gap}`]:zR(e.gap),[`${a.value}-vertical`]:(u=e.vertical)!==null&&u!==void 0?u:r==null?void 0:r.value.vertical}]});return()=>{var u;const{flex:d,gap:f,component:h="div"}=e,m=M6e(e,["flex","gap","component"]),v={};return d&&(v.flex=d),f&&!zR(f)&&(v.gap=`${f}px`),l(g(h,V({class:[o.class,c.value],style:[o.style,v]},_t(m,["justify","wrap","align","vertical"])),{default:()=>[(u=n.default)===null||u===void 0?void 0:u.call(n)]}))}}}),D6e=$n(R6e),jR=Object.freeze(Object.defineProperty({__proto__:null,Affix:R7,Alert:$he,Anchor:fc,AnchorLink:H2,App:S6e,AutoComplete:Vpe,AutoCompleteOptGroup:Wpe,AutoCompleteOption:jpe,Avatar:wc,AvatarGroup:w0,BackTop:K0,Badge:xp,BadgeRibbon:_0,Breadcrumb:_c,BreadcrumbItem:ph,BreadcrumbSeparator:M0,Button:Un,ButtonGroup:E0,Calendar:v0e,Card:hd,CardGrid:k0,CardMeta:N0,Carousel:vye,Cascader:FSe,CheckableTag:z0,Checkbox:Ri,CheckboxGroup:H0,Col:KSe,Collapse:_p,CollapsePanel:B0,Comment:qSe,Compact:$0,ConfigProvider:qO,DatePicker:S$e,Descriptions:A$e,DescriptionsItem:hH,DirectoryTree:km,Divider:N$e,Drawer:exe,Dropdown:Ta,DropdownButton:fh,Empty:cs,Flex:D6e,FloatButton:Ss,FloatButtonGroup:V0,Form:us,FormItem:TF,FormItemRest:y0,Grid:VSe,Image:zwe,ImagePreviewGroup:BH,Input:uo,InputGroup:_H,InputNumber:r2e,InputPassword:PH,InputSearch:OH,Layout:S2e,LayoutContent:y2e,LayoutFooter:m2e,LayoutHeader:v2e,LayoutSider:b2e,List:c_e,ListItem:VH,ListItemMeta:jH,LocaleProvider:RF,Mentions:E_e,MentionsOption:Rm,Menu:qn,MenuDivider:gh,MenuItem:Ea,MenuItemGroup:hh,Modal:wo,MonthPicker:wm,PageHeader:fOe,Pagination:Wy,Popconfirm:bOe,Popover:G_,Progress:II,QRCode:BMe,QuarterPicker:_m,Radio:yr,RadioButton:D0,RadioGroup:wO,RangePicker:Om,Rate:lIe,Result:PIe,Row:TIe,Segmented:xMe,Select:Cl,SelectOptGroup:Fpe,SelectOption:Bpe,Skeleton:or,SkeletonAvatar:DO,SkeletonButton:AO,SkeletonImage:RO,SkeletonInput:MO,SkeletonTitle:Oy,Slider:YIe,Space:sz,Spin:Aa,Statistic:dl,StatisticCountdown:G_e,Step:Dm,Steps:fPe,SubMenu:Lc,Switch:$Pe,TabPane:L0,Table:g4e,TableColumn:Fm,TableColumnGroup:Hm,TableSummary:zm,TableSummaryCell:Z0,TableSummaryRow:q0,Tabs:Oc,Tag:aH,Textarea:aI,TimePicker:p3e,TimeRangePicker:jm,Timeline:Dp,TimelineItem:$h,Tooltip:Br,Tour:u6e,Transfer:z4e,Tree:Uz,TreeNode:Bm,TreeSelect:d3e,TreeSelectNode:mw,Typography:Dr,TypographyLink:ZI,TypographyParagraph:QI,TypographyText:JI,TypographyTitle:eP,Upload:aMe,UploadDragger:iMe,Watermark:hMe,WeekPicker:xm,message:GO,notification:YO},Symbol.toStringTag,{value:"Module"})),L6e=function(e){return Object.keys(jR).forEach(t=>{const n=jR[t];n.install&&e.use(n)}),e.use(vne.StyleProvider),e.config.globalProperties.$message=GO,e.config.globalProperties.$notification=YO,e.config.globalProperties.$info=wo.info,e.config.globalProperties.$success=wo.success,e.config.globalProperties.$error=wo.error,e.config.globalProperties.$warning=wo.warning,e.config.globalProperties.$confirm=wo.confirm,e.config.globalProperties.$destroyAll=wo.destroyAll,e},N6e={version:b7,install:L6e};/*! + * vue-router v4.2.5 + * (c) 2023 Eduardo San Martin Morote + * @license MIT + */const Gu=typeof window<"u";function k6e(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const mn=Object.assign;function t$(e,t){const n={};for(const o in t){const r=t[o];n[o]=ca(r)?r.map(e):e(r)}return n}const Np=()=>{},ca=Array.isArray,B6e=/\/$/,F6e=e=>e.replace(B6e,"");function n$(e,t,n="/"){let o,r={},i="",a="";const l=t.indexOf("#");let s=t.indexOf("?");return l=0&&(s=-1),s>-1&&(o=t.slice(0,s),i=t.slice(s+1,l>-1?l:t.length),r=e(i)),l>-1&&(o=o||t.slice(0,l),a=t.slice(l,t.length)),o=W6e(o??t,n),{fullPath:o+(i&&"?")+i+a,path:o,query:r,hash:a}}function H6e(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function WR(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function z6e(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&kd(t.matched[o],n.matched[r])&&Oj(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function kd(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Oj(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!j6e(e[n],t[n]))return!1;return!0}function j6e(e,t){return ca(e)?VR(e,t):ca(t)?VR(t,e):e===t}function VR(e,t){return ca(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function W6e(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,a,l;for(a=0;a1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(a-(a===o.length?1:0)).join("/")}var xh;(function(e){e.pop="pop",e.push="push"})(xh||(xh={}));var kp;(function(e){e.back="back",e.forward="forward",e.unknown=""})(kp||(kp={}));function V6e(e){if(!e)if(Gu){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),F6e(e)}const K6e=/^[^#]+#/;function U6e(e,t){return e.replace(K6e,"#")+t}function G6e(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const e1=()=>({left:window.pageXOffset,top:window.pageYOffset});function Y6e(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=G6e(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function KR(e,t){return(history.state?history.state.position-t:-1)+e}const yw=new Map;function X6e(e,t){yw.set(e,t)}function q6e(e){const t=yw.get(e);return yw.delete(e),t}let Z6e=()=>location.protocol+"//"+location.host;function Ij(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,s=r.slice(l);return s[0]!=="/"&&(s="/"+s),WR(s,"")}return WR(n,e)+o+r}function Q6e(e,t,n,o){let r=[],i=[],a=null;const l=({state:f})=>{const h=Ij(e,location),m=n.value,v=t.value;let y=0;if(f){if(n.value=h,t.value=f,a&&a===m){a=null;return}y=v?f.position-v.position:0}else o(h);r.forEach(b=>{b(n.value,m,{delta:y,type:xh.pop,direction:y?y>0?kp.forward:kp.back:kp.unknown})})};function s(){a=n.value}function c(f){r.push(f);const h=()=>{const m=r.indexOf(f);m>-1&&r.splice(m,1)};return i.push(h),h}function u(){const{history:f}=window;f.state&&f.replaceState(mn({},f.state,{scroll:e1()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:s,listen:c,destroy:d}}function UR(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?e1():null}}function J6e(e){const{history:t,location:n}=window,o={value:Ij(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(s,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+s:Z6e()+e+s;try{t[u?"replaceState":"pushState"](c,"",f),r.value=c}catch(h){console.error(h),n[u?"replace":"assign"](f)}}function a(s,c){const u=mn({},t.state,UR(r.value.back,s,r.value.forward,!0),c,{position:r.value.position});i(s,u,!0),o.value=s}function l(s,c){const u=mn({},r.value,t.state,{forward:s,scroll:e1()});i(u.current,u,!0);const d=mn({},UR(o.value,s,null),{position:u.position+1},c);i(s,d,!1),o.value=s}return{location:o,state:r,push:l,replace:a}}function e8e(e){e=V6e(e);const t=J6e(e),n=Q6e(e,t.state,t.location,t.replace);function o(i,a=!0){a||n.pauseListeners(),history.go(i)}const r=mn({location:"",base:e,go:o,createHref:U6e.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function t8e(e){return typeof e=="string"||e&&typeof e=="object"}function Pj(e){return typeof e=="string"||typeof e=="symbol"}const Xl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Tj=Symbol("");var GR;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(GR||(GR={}));function Bd(e,t){return mn(new Error,{type:e,[Tj]:!0},t)}function tl(e,t){return e instanceof Error&&Tj in e&&(t==null||!!(e.type&t))}const YR="[^/]+?",n8e={sensitive:!1,strict:!1,start:!0,end:!0},o8e=/[.+*?^${}()[\]/\\]/g;function r8e(e,t){const n=mn({},n8e,t),o=[];let r=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(r+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function a8e(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const l8e={type:0,value:""},s8e=/[a-zA-Z0-9_]/;function c8e(e){if(!e)return[[]];if(e==="/")return[[l8e]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=0,o=n;const r=[];let i;function a(){i&&r.push(i),i=[]}let l=0,s,c="",u="";function d(){c&&(n===0?i.push({type:0,value:c}):n===1||n===2||n===3?(i.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=s}for(;l{a($)}:Np}function a(u){if(Pj(u)){const d=o.get(u);d&&(o.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&o.delete(u.record.name),u.children.forEach(a),u.alias.forEach(a))}}function l(){return n}function s(u){let d=0;for(;d=0&&(u.record.path!==n[d].record.path||!Ej(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!ZR(u)&&o.set(u.record.name,u)}function c(u,d){let f,h={},m,v;if("name"in u&&u.name){if(f=o.get(u.name),!f)throw Bd(1,{location:u});v=f.record.name,h=mn(qR(d.params,f.keys.filter($=>!$.optional).map($=>$.name)),u.params&&qR(u.params,f.keys.map($=>$.name))),m=f.stringify(h)}else if("path"in u)m=u.path,f=n.find($=>$.re.test(m)),f&&(h=f.parse(m),v=f.record.name);else{if(f=d.name?o.get(d.name):n.find($=>$.re.test(d.path)),!f)throw Bd(1,{location:u,currentLocation:d});v=f.record.name,h=mn({},d.params,u.params),m=f.stringify(h)}const y=[];let b=f;for(;b;)y.unshift(b.record),b=b.parent;return{name:v,path:m,params:h,matched:y,meta:h8e(y)}}return e.forEach(u=>i(u)),{addRoute:i,resolve:c,removeRoute:a,getRoutes:l,getRecordMatcher:r}}function qR(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function f8e(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:p8e(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function p8e(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function ZR(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function h8e(e){return e.reduce((t,n)=>mn(t,n.meta),{})}function QR(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function Ej(e,t){return t.children.some(n=>n===e||Ej(e,n))}const Aj=/#/g,g8e=/&/g,v8e=/\//g,m8e=/=/g,b8e=/\?/g,Mj=/\+/g,y8e=/%5B/g,S8e=/%5D/g,Rj=/%5E/g,C8e=/%60/g,Dj=/%7B/g,$8e=/%7C/g,Lj=/%7D/g,x8e=/%20/g;function sP(e){return encodeURI(""+e).replace($8e,"|").replace(y8e,"[").replace(S8e,"]")}function w8e(e){return sP(e).replace(Dj,"{").replace(Lj,"}").replace(Rj,"^")}function Sw(e){return sP(e).replace(Mj,"%2B").replace(x8e,"+").replace(Aj,"%23").replace(g8e,"%26").replace(C8e,"`").replace(Dj,"{").replace(Lj,"}").replace(Rj,"^")}function _8e(e){return Sw(e).replace(m8e,"%3D")}function O8e(e){return sP(e).replace(Aj,"%23").replace(b8e,"%3F")}function I8e(e){return e==null?"":O8e(e).replace(v8e,"%2F")}function Q0(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function P8e(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ri&&Sw(i)):[o&&Sw(o)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function T8e(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=ca(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const E8e=Symbol(""),e5=Symbol(""),t1=Symbol(""),cP=Symbol(""),Cw=Symbol("");function Yf(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function ls(e,t,n,o,r){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const s=d=>{d===!1?l(Bd(4,{from:n,to:t})):d instanceof Error?l(d):t8e(d)?l(Bd(2,{from:t,to:d})):(i&&o.enterCallbacks[r]===i&&typeof d=="function"&&i.push(d),a())},c=e.call(o&&o.instances[r],t,n,s);let u=Promise.resolve(c);e.length<3&&(u=u.then(s)),u.catch(d=>l(d))})}function o$(e,t,n,o){const r=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(A8e(l)){const c=(l.__vccOpts||l)[t];c&&r.push(ls(c,n,o,i,a))}else{let s=l();r.push(()=>s.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));const u=k6e(c)?c.default:c;i.components[a]=u;const f=(u.__vccOpts||u)[t];return f&&ls(f,n,o,i,a)()}))}}return r}function A8e(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function t5(e){const t=it(t1),n=it(cP),o=M(()=>t.resolve(It(e.to))),r=M(()=>{const{matched:s}=o.value,{length:c}=s,u=s[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(kd.bind(null,u));if(f>-1)return f;const h=n5(s[c-2]);return c>1&&n5(u)===h&&d[d.length-1].path!==h?d.findIndex(kd.bind(null,s[c-2])):f}),i=M(()=>r.value>-1&&L8e(n.params,o.value.params)),a=M(()=>r.value>-1&&r.value===n.matched.length-1&&Oj(n.params,o.value.params));function l(s={}){return D8e(s)?t[It(e.replace)?"replace":"push"](It(e.to)).catch(Np):Promise.resolve()}return{route:o,href:M(()=>o.value.href),isActive:i,isExactActive:a,navigate:l}}const M8e=pe({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:t5,setup(e,{slots:t}){const n=St(t5(e)),{options:o}=it(t1),r=M(()=>({[o5(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[o5(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:Ni("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),R8e=M8e;function D8e(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function L8e(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!ca(r)||r.length!==o.length||o.some((i,a)=>i!==r[a]))return!1}return!0}function n5(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const o5=(e,t,n)=>e??t??n,N8e=pe({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=it(Cw),r=M(()=>e.route||o.value),i=it(e5,0),a=M(()=>{let c=It(i);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),l=M(()=>r.value.matched[a.value]);ft(e5,M(()=>a.value+1)),ft(E8e,l),ft(Cw,r);const s=he();return Ie(()=>[s.value,l.value,e.name],([c,u,d],[f,h,m])=>{u&&(u.instances[d]=c,h&&h!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!kd(u,h)||!f)&&(u.enterCallbacks[d]||[]).forEach(v=>v(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=l.value,f=d&&d.components[u];if(!f)return r5(n.default,{Component:f,route:c});const h=d.props[u],m=h?h===!0?c.params:typeof h=="function"?h(c):h:null,y=Ni(f,mn({},m,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[u]=null)},ref:s}));return r5(n.default,{Component:y,route:c})||y}}});function r5(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Nj=N8e;function k8e(e){const t=d8e(e.routes,e),n=e.parseQuery||P8e,o=e.stringifyQuery||JR,r=e.history,i=Yf(),a=Yf(),l=Yf(),s=ve(Xl);let c=Xl;Gu&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=t$.bind(null,ee=>""+ee),d=t$.bind(null,I8e),f=t$.bind(null,Q0);function h(ee,fe){let ie,X;return Pj(ee)?(ie=t.getRecordMatcher(ee),X=fe):X=ee,t.addRoute(X,ie)}function m(ee){const fe=t.getRecordMatcher(ee);fe&&t.removeRoute(fe)}function v(){return t.getRoutes().map(ee=>ee.record)}function y(ee){return!!t.getRecordMatcher(ee)}function b(ee,fe){if(fe=mn({},fe||s.value),typeof ee=="string"){const j=n$(n,ee,fe.path),q=t.resolve({path:j.path},fe),se=r.createHref(j.fullPath);return mn(j,q,{params:f(q.params),hash:Q0(j.hash),redirectedFrom:void 0,href:se})}let ie;if("path"in ee)ie=mn({},ee,{path:n$(n,ee.path,fe.path).path});else{const j=mn({},ee.params);for(const q in j)j[q]==null&&delete j[q];ie=mn({},ee,{params:d(j)}),fe.params=d(fe.params)}const X=t.resolve(ie,fe),ue=ee.hash||"";X.params=u(f(X.params));const ye=H6e(o,mn({},ee,{hash:w8e(ue),path:X.path})),H=r.createHref(ye);return mn({fullPath:ye,hash:ue,query:o===JR?T8e(ee.query):ee.query||{}},X,{redirectedFrom:void 0,href:H})}function $(ee){return typeof ee=="string"?n$(n,ee,s.value.path):mn({},ee)}function x(ee,fe){if(c!==ee)return Bd(8,{from:fe,to:ee})}function _(ee){return O(ee)}function w(ee){return _(mn($(ee),{replace:!0}))}function I(ee){const fe=ee.matched[ee.matched.length-1];if(fe&&fe.redirect){const{redirect:ie}=fe;let X=typeof ie=="function"?ie(ee):ie;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=$(X):{path:X},X.params={}),mn({query:ee.query,hash:ee.hash,params:"path"in X?{}:ee.params},X)}}function O(ee,fe){const ie=c=b(ee),X=s.value,ue=ee.state,ye=ee.force,H=ee.replace===!0,j=I(ie);if(j)return O(mn($(j),{state:typeof j=="object"?mn({},ue,j.state):ue,force:ye,replace:H}),fe||ie);const q=ie;q.redirectedFrom=fe;let se;return!ye&&z6e(o,X,ie)&&(se=Bd(16,{to:q,from:X}),G(X,X,!0,!1)),(se?Promise.resolve(se):R(q,X)).catch(ae=>tl(ae)?tl(ae,2)?ae:K(ae):L(ae,q,X)).then(ae=>{if(ae){if(tl(ae,2))return O(mn({replace:H},$(ae.to),{state:typeof ae.to=="object"?mn({},ue,ae.to.state):ue,force:ye}),fe||q)}else ae=N(q,X,!0,H,ue);return A(q,X,ae),ae})}function P(ee,fe){const ie=x(ee,fe);return ie?Promise.reject(ie):Promise.resolve()}function E(ee){const fe=re.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(ee):ee()}function R(ee,fe){let ie;const[X,ue,ye]=B8e(ee,fe);ie=o$(X.reverse(),"beforeRouteLeave",ee,fe);for(const j of X)j.leaveGuards.forEach(q=>{ie.push(ls(q,ee,fe))});const H=P.bind(null,ee,fe);return ie.push(H),te(ie).then(()=>{ie=[];for(const j of i.list())ie.push(ls(j,ee,fe));return ie.push(H),te(ie)}).then(()=>{ie=o$(ue,"beforeRouteUpdate",ee,fe);for(const j of ue)j.updateGuards.forEach(q=>{ie.push(ls(q,ee,fe))});return ie.push(H),te(ie)}).then(()=>{ie=[];for(const j of ye)if(j.beforeEnter)if(ca(j.beforeEnter))for(const q of j.beforeEnter)ie.push(ls(q,ee,fe));else ie.push(ls(j.beforeEnter,ee,fe));return ie.push(H),te(ie)}).then(()=>(ee.matched.forEach(j=>j.enterCallbacks={}),ie=o$(ye,"beforeRouteEnter",ee,fe),ie.push(H),te(ie))).then(()=>{ie=[];for(const j of a.list())ie.push(ls(j,ee,fe));return ie.push(H),te(ie)}).catch(j=>tl(j,8)?j:Promise.reject(j))}function A(ee,fe,ie){l.list().forEach(X=>E(()=>X(ee,fe,ie)))}function N(ee,fe,ie,X,ue){const ye=x(ee,fe);if(ye)return ye;const H=fe===Xl,j=Gu?history.state:{};ie&&(X||H?r.replace(ee.fullPath,mn({scroll:H&&j&&j.scroll},ue)):r.push(ee.fullPath,ue)),s.value=ee,G(ee,fe,ie,H),K()}let F;function W(){F||(F=r.listen((ee,fe,ie)=>{if(!J.listening)return;const X=b(ee),ue=I(X);if(ue){O(mn(ue,{replace:!0}),X).catch(Np);return}c=X;const ye=s.value;Gu&&X6e(KR(ye.fullPath,ie.delta),e1()),R(X,ye).catch(H=>tl(H,12)?H:tl(H,2)?(O(H.to,X).then(j=>{tl(j,20)&&!ie.delta&&ie.type===xh.pop&&r.go(-1,!1)}).catch(Np),Promise.reject()):(ie.delta&&r.go(-ie.delta,!1),L(H,X,ye))).then(H=>{H=H||N(X,ye,!1),H&&(ie.delta&&!tl(H,8)?r.go(-ie.delta,!1):ie.type===xh.pop&&tl(H,20)&&r.go(-1,!1)),A(X,ye,H)}).catch(Np)}))}let D=Yf(),B=Yf(),k;function L(ee,fe,ie){K(ee);const X=B.list();return X.length?X.forEach(ue=>ue(ee,fe,ie)):console.error(ee),Promise.reject(ee)}function z(){return k&&s.value!==Xl?Promise.resolve():new Promise((ee,fe)=>{D.add([ee,fe])})}function K(ee){return k||(k=!ee,W(),D.list().forEach(([fe,ie])=>ee?ie(ee):fe()),D.reset()),ee}function G(ee,fe,ie,X){const{scrollBehavior:ue}=e;if(!Gu||!ue)return Promise.resolve();const ye=!ie&&q6e(KR(ee.fullPath,0))||(X||!ie)&&history.state&&history.state.scroll||null;return wt().then(()=>ue(ee,fe,ye)).then(H=>H&&Y6e(H)).catch(H=>L(H,ee,fe))}const Y=ee=>r.go(ee);let ne;const re=new Set,J={currentRoute:s,listening:!0,addRoute:h,removeRoute:m,hasRoute:y,getRoutes:v,resolve:b,options:e,push:_,replace:w,go:Y,back:()=>Y(-1),forward:()=>Y(1),beforeEach:i.add,beforeResolve:a.add,afterEach:l.add,onError:B.add,isReady:z,install(ee){const fe=this;ee.component("RouterLink",R8e),ee.component("RouterView",Nj),ee.config.globalProperties.$router=fe,Object.defineProperty(ee.config.globalProperties,"$route",{enumerable:!0,get:()=>It(s)}),Gu&&!ne&&s.value===Xl&&(ne=!0,_(r.location).catch(ue=>{}));const ie={};for(const ue in Xl)Object.defineProperty(ie,ue,{get:()=>s.value[ue],enumerable:!0});ee.provide(t1,fe),ee.provide(cP,HL(ie)),ee.provide(Cw,s);const X=ee.unmount;re.add(ee),ee.unmount=function(){re.delete(ee),re.size<1&&(c=Xl,F&&F(),F=null,s.value=Xl,ne=!1,k=!1),X()}}};function te(ee){return ee.reduce((fe,ie)=>fe.then(()=>E(ie)),Promise.resolve())}return J}function B8e(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;akd(c,l))?o.push(l):n.push(l));const s=e.matched[a];s&&(t.matched.find(c=>kd(c,s))||r.push(s))}return[n,o,r]}function kj(){return it(t1)}function Ml(){return it(cP)}const F8e="modulepreload",H8e=function(e){return"/admin/"+e},i5={},Ht=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link");r=Promise.all(n.map(a=>{if(a=H8e(a),a in i5)return;i5[a]=!0;const l=a.endsWith(".css"),s=l?'[rel="stylesheet"]':"";if(!!o)for(let d=i.length-1;d>=0;d--){const f=i[d];if(f.href===a&&(!l||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":F8e,l||(u.as="script",u.crossOrigin=""),u.href=a,document.head.appendChild(u),l)return new Promise((d,f)=>{u.addEventListener("load",d),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})}))}return r.then(()=>t()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})},Bp=/^[a-z0-9]+(-[a-z0-9]+)*$/,n1=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const l=r.pop(),s=r.pop(),c={provider:r.length>0?r[0]:o,prefix:s,name:l};return t&&!Km(c)?null:c}const i=r[0],a=i.split("-");if(a.length>1){const l={provider:o,prefix:a.shift(),name:a.join("-")};return t&&!Km(l)?null:l}if(n&&o===""){const l={provider:o,prefix:"",name:i};return t&&!Km(l,n)?null:l}return null},Km=(e,t)=>e?!!((e.provider===""||e.provider.match(Bp))&&(t&&e.prefix===""||e.prefix.match(Bp))&&e.name.match(Bp)):!1,Bj=Object.freeze({left:0,top:0,width:16,height:16}),J0=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o1=Object.freeze({...Bj,...J0}),$w=Object.freeze({...o1,body:"",hidden:!1});function z8e(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function a5(e,t){const n=z8e(e,t);for(const o in $w)o in J0?o in e&&!(o in n)&&(n[o]=J0[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function j8e(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(a){if(n[a])return r[a]=[];if(!(a in r)){r[a]=null;const l=o[a]&&o[a].parent,s=l&&i(l);s&&(r[a]=[l].concat(s))}return r[a]}return(t||Object.keys(n).concat(Object.keys(o))).forEach(i),r}function W8e(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function a(l){i=a5(o[l]||r[l],i)}return a(t),n.forEach(a),a5(e,i)}function Fj(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=j8e(e);for(const r in o){const i=o[r];i&&(t(r,W8e(e,r,i)),n.push(r))}return n}const V8e={provider:"",aliases:{},not_found:{},...Bj};function r$(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Hj(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!r$(e,V8e))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r.match(Bp)||typeof i.body!="string"||!r$(i,$w))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],a=i.parent;if(!r.match(Bp)||typeof a!="string"||!n[a]&&!o[a]||!r$(i,$w))return null}return t}const l5=Object.create(null);function K8e(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Fc(e,t){const n=l5[e]||(l5[e]=Object.create(null));return n[t]||(n[t]=K8e(e,t))}function uP(e,t){return Hj(t)?Fj(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function U8e(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let wh=!1;function zj(e){return typeof e=="boolean"&&(wh=e),wh}function G8e(e){const t=typeof e=="string"?n1(e,!0,wh):e;if(t){const n=Fc(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function Y8e(e,t){const n=n1(e,!0,wh);if(!n)return!1;const o=Fc(n.provider,n.prefix);return U8e(o,n.name,t)}function X8e(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),wh&&!t&&!e.prefix){let r=!1;return Hj(e)&&(e.prefix="",Fj(e,(i,a)=>{a&&Y8e(i,a)&&(r=!0)})),r}const n=e.prefix;if(!Km({provider:t,prefix:n,name:"a"}))return!1;const o=Fc(t,n);return!!uP(o,e)}const jj=Object.freeze({width:null,height:null}),Wj=Object.freeze({...jj,...J0}),q8e=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Z8e=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function s5(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(q8e);if(o===null||!o.length)return e;const r=[];let i=o.shift(),a=Z8e.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?r.push(i):r.push(Math.ceil(l*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");a=!a}}const Q8e=e=>e==="unset"||e==="undefined"||e==="none";function J8e(e,t){const n={...o1,...e},o={...Wj,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(m=>{const v=[],y=m.hFlip,b=m.vFlip;let $=m.rotate;y?b?$+=2:(v.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),v.push("scale(-1 1)"),r.top=r.left=0):b&&(v.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),v.push("scale(1 -1)"),r.top=r.left=0);let x;switch($<0&&($-=Math.floor($/4)*4),$=$%4,$){case 1:x=r.height/2+r.top,v.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:v.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,v.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}$%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),v.length&&(i=''+i+"")});const a=o.width,l=o.height,s=r.width,c=r.height;let u,d;a===null?(d=l===null?"1em":l==="auto"?c:l,u=s5(d,s/c)):(u=a==="auto"?s:a,d=l===null?s5(u,c/s):l==="auto"?c:l);const f={},h=(m,v)=>{Q8e(v)||(f[m]=v.toString())};return h("width",u),h("height",d),f.viewBox=r.left.toString()+" "+r.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:f,body:i}}const eRe=/\sid="(\S+)"/g,tRe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let nRe=0;function oRe(e,t=tRe){const n=[];let o;for(;o=eRe.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(nRe++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const xw=Object.create(null);function rRe(e,t){xw[e]=t}function ww(e){return xw[e]||xw[""]}function dP(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const fP=Object.create(null),Xf=["https://api.simplesvg.com","https://api.unisvg.com"],Um=[];for(;Xf.length>0;)Xf.length===1||Math.random()>.5?Um.push(Xf.shift()):Um.push(Xf.pop());fP[""]=dP({resources:["https://api.iconify.design"].concat(Um)});function iRe(e,t){const n=dP(t);return n===null?!1:(fP[e]=n,!0)}function pP(e){return fP[e]}const aRe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let c5=aRe();function lRe(e,t){const n=pP(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(a=>{r=Math.max(r,a.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function sRe(e){return e===404}const cRe=(e,t,n)=>{const o=[],r=lRe(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=r&&c>0&&(o.push(a),a={type:i,provider:e,prefix:t,icons:[]},l=s.length),a.icons.push(s)}),o.push(a),o};function uRe(e){if(typeof e=="string"){const t=pP(e);if(t)return t.path}return"/"}const dRe=(e,t,n)=>{if(!c5){n("abort",424);return}let o=uRe(t.provider);switch(t.type){case"icons":{const i=t.prefix,l=t.icons.join(","),s=new URLSearchParams({icons:l});o+=i+".json?"+s.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;c5(e+o).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(sRe(a)?"abort":"next",a)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},fRe={prepare:cRe,send:dRe};function pRe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,a=r.prefix,l=r.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=Fc(i,a));let u;l in c.icons?u=t.loaded:a===""||c.missing.has(l)?u=t.missing:u=t.pending;const d={provider:i,prefix:a,name:l};u.push(d)}),t}function Vj(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function hRe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const a=i.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==r)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:o,prefix:r,name:c});else if(e.missing.has(c))a.missing.push({provider:o,prefix:r,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Vj([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let gRe=0;function vRe(e,t,n){const o=gRe++,r=Vj.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),r}function mRe(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?n1(r,t,n):r;i&&o.push(i)}),o}var bRe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function yRe(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let a;if(e.random){let I=e.resources.slice(0);for(a=[];I.length>1;){const O=Math.floor(Math.random()*I.length);a.push(I[O]),I=I.slice(0,O).concat(I.slice(O+1))}a=a.concat(I)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let s="pending",c=0,u,d=null,f=[],h=[];typeof o=="function"&&h.push(o);function m(){d&&(clearTimeout(d),d=null)}function v(){s==="pending"&&(s="aborted"),m(),f.forEach(I=>{I.status==="pending"&&(I.status="aborted")}),f=[]}function y(I,O){O&&(h=[]),typeof I=="function"&&h.push(I)}function b(){return{startTime:l,payload:t,status:s,queriesSent:c,queriesPending:f.length,subscribe:y,abort:v}}function $(){s="failed",h.forEach(I=>{I(void 0,u)})}function x(){f.forEach(I=>{I.status==="pending"&&(I.status="aborted")}),f=[]}function _(I,O,P){const E=O!=="success";switch(f=f.filter(R=>R!==I),s){case"pending":break;case"failed":if(E||!e.dataAfterTimeout)return;break;default:return}if(O==="abort"){u=P,$();return}if(E){u=P,f.length||(a.length?w():$());return}if(m(),x(),!e.random){const R=e.resources.indexOf(I.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",h.forEach(R=>{R(P)})}function w(){if(s!=="pending")return;m();const I=a.shift();if(I===void 0){if(f.length){d=setTimeout(()=>{m(),s==="pending"&&(x(),$())},e.timeout);return}$();return}const O={status:"pending",resource:I,callback:(P,E)=>{_(O,P,E)}};f.push(O),c++,d=setTimeout(w,e.rotate),n(I,t,O.callback)}return setTimeout(w),b}function Kj(e){const t={...bRe,...e};let n=[];function o(){n=n.filter(l=>l().status==="pending")}function r(l,s,c){const u=yRe(t,l,s,(d,f)=>{o(),c&&c(d,f)});return n.push(u),u}function i(l){return n.find(s=>l(s))||null}return{query:r,find:i,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:o}}function u5(){}const i$=Object.create(null);function SRe(e){if(!i$[e]){const t=pP(e);if(!t)return;const n=Kj(t),o={config:t,redundancy:n};i$[e]=o}return i$[e]}function CRe(e,t,n){let o,r;if(typeof e=="string"){const i=ww(e);if(!i)return n(void 0,424),u5;r=i.send;const a=SRe(e);a&&(o=a.redundancy)}else{const i=dP(e);if(i){o=Kj(i);const a=e.resources?e.resources[0]:"",l=ww(a);l&&(r=l.send)}}return!o||!r?(n(void 0,424),u5):o.query(t,r,n)().abort}const d5="iconify2",_h="iconify",Uj=_h+"-count",f5=_h+"-version",Gj=36e5,$Re=168;function _w(e,t){try{return e.getItem(t)}catch{}}function hP(e,t,n){try{return e.setItem(t,n),!0}catch{}}function p5(e,t){try{e.removeItem(t)}catch{}}function Ow(e,t){return hP(e,Uj,t.toString())}function Iw(e){return parseInt(_w(e,Uj))||0}const r1={local:!0,session:!0},Yj={local:new Set,session:new Set};let gP=!1;function xRe(e){gP=e}let Uv=typeof window>"u"?{}:window;function Xj(e){const t=e+"Storage";try{if(Uv&&Uv[t]&&typeof Uv[t].length=="number")return Uv[t]}catch{}r1[e]=!1}function qj(e,t){const n=Xj(e);if(!n)return;const o=_w(n,f5);if(o!==d5){if(o){const l=Iw(n);for(let s=0;s{const s=_h+l.toString(),c=_w(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>r&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch{}p5(n,s)}};let a=Iw(n);for(let l=a-1;l>=0;l--)i(l)||(l===a-1?(a--,Ow(n,a)):Yj[e].add(l))}function Zj(){if(!gP){xRe(!0);for(const e in r1)qj(e,t=>{const n=t.data,o=t.provider,r=n.prefix,i=Fc(o,r);if(!uP(i,n).length)return!1;const a=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function wRe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const o in r1)qj(o,r=>{const i=r.data;return r.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function _Re(e,t){gP||Zj();function n(o){let r;if(!r1[o]||!(r=Xj(o)))return;const i=Yj[o];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Iw(r),!Ow(r,a+1))return;const l={cached:Math.floor(Date.now()/Gj),provider:e.provider,data:t};return hP(r,_h+a.toString(),JSON.stringify(l))}t.lastModified&&!wRe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function h5(){}function ORe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,hRe(e)}))}function IRe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;delete e.iconsToLoad;let i;if(!r||!(i=ww(n)))return;i.prepare(n,o,r).forEach(l=>{CRe(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=uP(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(d=>{u.delete(d)}),_Re(e,s)}catch(c){console.error(c)}ORe(e)})})}))}const PRe=(e,t)=>{const n=mRe(e,!0,zj()),o=pRe(n);if(!o.pending.length){let s=!0;return t&&setTimeout(()=>{s&&t(o.loaded,o.missing,o.pending,h5)}),()=>{s=!1}}const r=Object.create(null),i=[];let a,l;return o.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,i.push(Fc(c,u));const d=r[c]||(r[c]=Object.create(null));d[u]||(d[u]=[])}),o.pending.forEach(s=>{const{provider:c,prefix:u,name:d}=s,f=Fc(c,u),h=f.pendingIcons||(f.pendingIcons=new Set);h.has(d)||(h.add(d),r[c][u].push(d))}),i.forEach(s=>{const{provider:c,prefix:u}=s;r[c][u].length&&IRe(s,r[c][u])}),t?vRe(t,o,i):h5};function TRe(e,t){const n={...e};for(const o in t){const r=t[o],i=typeof r;o in jj?(r===null||r&&(i==="string"||i==="number"))&&(n[o]=r):i===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const ERe=/[\s,]+/;function ARe(e,t){t.split(ERe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function MRe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}function RRe(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'"+e+""}function DRe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function LRe(e){return"data:image/svg+xml,"+DRe(e)}function NRe(e){return'url("'+LRe(e)+'")'}const g5={...Wj,inline:!1},kRe={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},BRe={display:"inline-block"},Pw={backgroundColor:"currentColor"},Qj={backgroundColor:"transparent"},v5={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},m5={webkitMask:Pw,mask:Pw,background:Qj};for(const e in m5){const t=m5[e];for(const n in v5)t[e+n]=v5[n]}const Gm={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Gm[e+"-flip"]=t,Gm[e.slice(0,1)+"-flip"]=t,Gm[e+"Flip"]=t});function b5(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const y5=(e,t)=>{const n=TRe(g5,t),o={...kRe},r=t.mode||"svg",i={},a=t.style,l=typeof a=="object"&&!(a instanceof Array)?a:{};for(let v in t){const y=t[v];if(y!==void 0)switch(v){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[v]=y===!0||y==="true"||y===1;break;case"flip":typeof y=="string"&&ARe(n,y);break;case"color":i.color=y;break;case"rotate":typeof y=="string"?n[v]=MRe(y):typeof y=="number"&&(n[v]=y);break;case"ariaHidden":case"aria-hidden":y!==!0&&y!=="true"&&delete o["aria-hidden"];break;default:{const b=Gm[v];b?(y===!0||y==="true"||y===1)&&(n[b]=!0):g5[v]===void 0&&(o[v]=y)}}}const s=J8e(e,n),c=s.attributes;if(n.inline&&(i.verticalAlign="-0.125em"),r==="svg"){o.style={...i,...l},Object.assign(o,c);let v=0,y=t.id;return typeof y=="string"&&(y=y.replace(/-/g,"_")),o.innerHTML=oRe(s.body,y?()=>y+"ID"+v++:"iconifyVue"),Ni("svg",o)}const{body:u,width:d,height:f}=e,h=r==="mask"||(r==="bg"?!1:u.indexOf("currentColor")!==-1),m=RRe(u,{...c,width:d+"",height:f+""});return o.style={...i,"--svg":NRe(m),width:b5(c.width),height:b5(c.height),...BRe,...h?Pw:Qj,...l},Ni("span",o)};zj(!0);rRe("",fRe);if(typeof document<"u"&&typeof window<"u"){Zj();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!X8e(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;iRe(n,r)||console.error(o)}catch{console.error(o)}}}}const FRe={...o1,body:""},S5=pe({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let n;if(typeof e!="string"||(n=n1(e,!1,!0))===null)return this.abortLoading(),null;const o=G8e(n);if(!o)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",o!==null&&(this._loadingIcon={name:e,abort:PRe([n],()=>{this.counter++})})),null;this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e));const r=["iconify"];return n.prefix!==""&&r.push("iconify--"+n.prefix),n.provider!==""&&r.push("iconify--"+n.provider),{data:o,classes:r}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted?this.getIcon(e.icon,e.onLoad):null;if(!t)return y5(FRe,e);let n=e;return t.classes&&(n={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),y5({...o1,...t.data},n)}});var eb={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */eb.exports;(function(e,t){(function(){var n,o="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",l="Invalid `variable` option passed into `_.template`",s="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,f=2,h=4,m=1,v=2,y=1,b=2,$=4,x=8,_=16,w=32,I=64,O=128,P=256,E=512,R=30,A="...",N=800,F=16,W=1,D=2,B=3,k=1/0,L=9007199254740991,z=17976931348623157e292,K=NaN,G=4294967295,Y=G-1,ne=G>>>1,re=[["ary",O],["bind",y],["bindKey",b],["curry",x],["curryRight",_],["flip",E],["partial",w],["partialRight",I],["rearg",P]],J="[object Arguments]",te="[object Array]",ee="[object AsyncFunction]",fe="[object Boolean]",ie="[object Date]",X="[object DOMException]",ue="[object Error]",ye="[object Function]",H="[object GeneratorFunction]",j="[object Map]",q="[object Number]",se="[object Null]",ae="[object Object]",ge="[object Promise]",Se="[object Proxy]",$e="[object RegExp]",_e="[object Set]",be="[object String]",Te="[object Symbol]",Pe="[object Undefined]",oe="[object WeakMap]",le="[object WeakSet]",xe="[object ArrayBuffer]",Ae="[object DataView]",Be="[object Float32Array]",Ye="[object Float64Array]",Re="[object Int8Array]",Le="[object Int16Array]",Ne="[object Int32Array]",Ke="[object Uint8Array]",Ze="[object Uint8ClampedArray]",Ue="[object Uint16Array]",Xe="[object Uint32Array]",xt=/\b__p \+= '';/g,Mt=/\b(__p \+=) '' \+/g,Ft=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jt=/&(?:amp|lt|gt|quot|#39);/g,Yt=/[&<>"']/g,Vn=RegExp(jt.source),Gn=RegExp(Yt.source),oo=/<%-([\s\S]+?)%>/g,kn=/<%([\s\S]+?)%>/g,yo=/<%=([\s\S]+?)%>/g,Yo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wr=/^\w*$/,Ur=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ao=/[\\^$.*+?()[\]{}|]/g,za=RegExp(Ao.source),We=/^\s+/,gt=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,un=/\{\n\/\* \[wrapped with (.+)\] \*/,Yn=/,? & /,Bn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xo=/[()=,{}\[\]\/\s]/,So=/\\(\\)?/g,hi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qo=/\w*$/,_r=/^[-+]0x[0-9a-f]+$/i,Cn=/^0b[01]+$/i,Gr=/^\[object .+?Constructor\]$/,Or=/^0o[0-7]+$/i,pa=/^(?:0|[1-9]\d*)$/,ha=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zo=/($^)/,Ll=/['\n\r\u2028\u2029\\]/g,Qo="\\ud800-\\udfff",yf="\\u0300-\\u036f",m1="\\ufe20-\\ufe2f",b1="\\u20d0-\\u20ff",cg=yf+m1+b1,ug="\\u2700-\\u27bf",Sf="a-z\\xdf-\\xf6\\xf8-\\xff",y1="\\xac\\xb1\\xd7\\xf7",ks="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",dg="\\u2000-\\u206f",S1=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fg="A-Z\\xc0-\\xd6\\xd8-\\xde",pg="\\ufe0e\\ufe0f",Cf=y1+ks+dg+S1,du="['’]",hg="["+Qo+"]",fu="["+Cf+"]",Nl="["+cg+"]",gg="\\d+",Jo="["+ug+"]",Ki="["+Sf+"]",$f="[^"+Qo+Cf+gg+ug+Sf+fg+"]",Bs="\\ud83c[\\udffb-\\udfff]",ga="(?:"+Nl+"|"+Bs+")",vg="[^"+Qo+"]",mg="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",ja="["+fg+"]",xf="\\u200d",pu="(?:"+Ki+"|"+$f+")",HV="(?:"+ja+"|"+$f+")",rT="(?:"+du+"(?:d|ll|m|re|s|t|ve))?",iT="(?:"+du+"(?:D|LL|M|RE|S|T|VE))?",aT=ga+"?",lT="["+pg+"]?",zV="(?:"+xf+"(?:"+[vg,mg,Fs].join("|")+")"+lT+aT+")*",jV="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",WV="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",sT=lT+aT+zV,VV="(?:"+[Jo,mg,Fs].join("|")+")"+sT,KV="(?:"+[vg+Nl+"?",Nl,mg,Fs,hg].join("|")+")",UV=RegExp(du,"g"),GV=RegExp(Nl,"g"),C1=RegExp(Bs+"(?="+Bs+")|"+KV+sT,"g"),YV=RegExp([ja+"?"+Ki+"+"+rT+"(?="+[fu,ja,"$"].join("|")+")",HV+"+"+iT+"(?="+[fu,ja+pu,"$"].join("|")+")",ja+"?"+pu+"+"+rT,ja+"+"+iT,WV,jV,gg,VV].join("|"),"g"),XV=RegExp("["+xf+Qo+cg+pg+"]"),qV=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ZV=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],QV=-1,En={};En[Be]=En[Ye]=En[Re]=En[Le]=En[Ne]=En[Ke]=En[Ze]=En[Ue]=En[Xe]=!0,En[J]=En[te]=En[xe]=En[fe]=En[Ae]=En[ie]=En[ue]=En[ye]=En[j]=En[q]=En[ae]=En[$e]=En[_e]=En[be]=En[oe]=!1;var On={};On[J]=On[te]=On[xe]=On[Ae]=On[fe]=On[ie]=On[Be]=On[Ye]=On[Re]=On[Le]=On[Ne]=On[j]=On[q]=On[ae]=On[$e]=On[_e]=On[be]=On[Te]=On[Ke]=On[Ze]=On[Ue]=On[Xe]=!0,On[ue]=On[ye]=On[oe]=!1;var JV={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},eK={"&":"&","<":"<",">":">",'"':""","'":"'"},tK={"&":"&","<":"<",">":">",""":'"',"'":"'"},nK={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},oK=parseFloat,rK=parseInt,cT=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr,iK=typeof self=="object"&&self&&self.Object===Object&&self,Ho=cT||iK||Function("return this")(),$1=t&&!t.nodeType&&t,Hs=$1&&!0&&e&&!e.nodeType&&e,uT=Hs&&Hs.exports===$1,x1=uT&&cT.process,gi=function(){try{var Ee=Hs&&Hs.require&&Hs.require("util").types;return Ee||x1&&x1.binding&&x1.binding("util")}catch{}}(),dT=gi&&gi.isArrayBuffer,fT=gi&&gi.isDate,pT=gi&&gi.isMap,hT=gi&&gi.isRegExp,gT=gi&&gi.isSet,vT=gi&&gi.isTypedArray;function Yr(Ee,He,ke){switch(ke.length){case 0:return Ee.call(He);case 1:return Ee.call(He,ke[0]);case 2:return Ee.call(He,ke[0],ke[1]);case 3:return Ee.call(He,ke[0],ke[1],ke[2])}return Ee.apply(He,ke)}function aK(Ee,He,ke,dt){for(var Wt=-1,fn=Ee==null?0:Ee.length;++Wt-1}function w1(Ee,He,ke){for(var dt=-1,Wt=Ee==null?0:Ee.length;++dt-1;);return ke}function wT(Ee,He){for(var ke=Ee.length;ke--&&hu(He,Ee[ke],0)>-1;);return ke}function gK(Ee,He){for(var ke=Ee.length,dt=0;ke--;)Ee[ke]===He&&++dt;return dt}var vK=P1(JV),mK=P1(eK);function bK(Ee){return"\\"+nK[Ee]}function yK(Ee,He){return Ee==null?n:Ee[He]}function gu(Ee){return XV.test(Ee)}function SK(Ee){return qV.test(Ee)}function CK(Ee){for(var He,ke=[];!(He=Ee.next()).done;)ke.push(He.value);return ke}function M1(Ee){var He=-1,ke=Array(Ee.size);return Ee.forEach(function(dt,Wt){ke[++He]=[Wt,dt]}),ke}function _T(Ee,He){return function(ke){return Ee(He(ke))}}function Fl(Ee,He){for(var ke=-1,dt=Ee.length,Wt=0,fn=[];++ke-1}function sU(p,C){var T=this.__data__,U=Lg(T,p);return U<0?(++this.size,T.push([p,C])):T[U][1]=C,this}Wa.prototype.clear=rU,Wa.prototype.delete=iU,Wa.prototype.get=aU,Wa.prototype.has=lU,Wa.prototype.set=sU;function Va(p){var C=-1,T=p==null?0:p.length;for(this.clear();++C=C?p:C)),p}function yi(p,C,T,U,Q,de){var Ce,we=C&d,Me=C&f,ze=C&h;if(T&&(Ce=Q?T(p,U,Q,de):T(p)),Ce!==n)return Ce;if(!Kn(p))return p;var je=Kt(p);if(je){if(Ce=fG(p),!we)return Ir(p,Ce)}else{var Ge=tr(p),ot=Ge==ye||Ge==H;if(Kl(p))return lE(p,we);if(Ge==ae||Ge==J||ot&&!Q){if(Ce=Me||ot?{}:OE(p),!we)return Me?tG(p,wU(Ce,p)):eG(p,kT(Ce,p))}else{if(!On[Ge])return Q?p:{};Ce=pG(p,Ge,we)}}de||(de=new Gi);var yt=de.get(p);if(yt)return yt;de.set(p,Ce),t4(p)?p.forEach(function(At){Ce.add(yi(At,C,T,At,p,de))}):JE(p)&&p.forEach(function(At,tn){Ce.set(tn,yi(At,C,T,tn,p,de))});var Et=ze?Me?rS:oS:Me?Tr:Mo,Qt=je?n:Et(p);return vi(Qt||p,function(At,tn){Qt&&(tn=At,At=p[tn]),Ef(Ce,tn,yi(At,C,T,tn,p,de))}),Ce}function _U(p){var C=Mo(p);return function(T){return BT(T,p,C)}}function BT(p,C,T){var U=T.length;if(p==null)return!U;for(p=xn(p);U--;){var Q=T[U],de=C[Q],Ce=p[Q];if(Ce===n&&!(Q in p)||!de(Ce))return!1}return!0}function FT(p,C,T){if(typeof p!="function")throw new mi(a);return kf(function(){p.apply(n,T)},C)}function Af(p,C,T,U){var Q=-1,de=bg,Ce=!0,we=p.length,Me=[],ze=C.length;if(!we)return Me;T&&(C=Fn(C,Xr(T))),U?(de=w1,Ce=!1):C.length>=r&&(de=wf,Ce=!1,C=new Ws(C));e:for(;++QQ?0:Q+T),U=U===n||U>Q?Q:Xt(U),U<0&&(U+=Q),U=T>U?0:o4(U);T0&&T(we)?C>1?zo(we,C-1,T,U,Q):Bl(Q,we):U||(Q[Q.length]=we)}return Q}var F1=pE(),jT=pE(!0);function va(p,C){return p&&F1(p,C,Mo)}function H1(p,C){return p&&jT(p,C,Mo)}function kg(p,C){return kl(C,function(T){return Xa(p[T])})}function Ks(p,C){C=Wl(C,p);for(var T=0,U=C.length;p!=null&&TC}function PU(p,C){return p!=null&&vn.call(p,C)}function TU(p,C){return p!=null&&C in xn(p)}function EU(p,C,T){return p>=er(C,T)&&p<$o(C,T)}function j1(p,C,T){for(var U=T?w1:bg,Q=p[0].length,de=p.length,Ce=de,we=ke(de),Me=1/0,ze=[];Ce--;){var je=p[Ce];Ce&&C&&(je=Fn(je,Xr(C))),Me=er(je.length,Me),we[Ce]=!T&&(C||Q>=120&&je.length>=120)?new Ws(Ce&&je):n}je=p[0];var Ge=-1,ot=we[0];e:for(;++Ge-1;)we!==p&&Pg.call(we,Me,1),Pg.call(p,Me,1);return p}function JT(p,C){for(var T=p?C.length:0,U=T-1;T--;){var Q=C[T];if(T==U||Q!==de){var de=Q;Ya(Q)?Pg.call(p,Q,1):q1(p,Q)}}return p}function G1(p,C){return p+Ag(RT()*(C-p+1))}function WU(p,C,T,U){for(var Q=-1,de=$o(Eg((C-p)/(T||1)),0),Ce=ke(de);de--;)Ce[U?de:++Q]=p,p+=T;return Ce}function Y1(p,C){var T="";if(!p||C<1||C>L)return T;do C%2&&(T+=p),C=Ag(C/2),C&&(p+=p);while(C);return T}function Jt(p,C){return dS(TE(p,C,Er),p+"")}function VU(p){return NT(Ou(p))}function KU(p,C){var T=Ou(p);return Yg(T,Vs(C,0,T.length))}function Df(p,C,T,U){if(!Kn(p))return p;C=Wl(C,p);for(var Q=-1,de=C.length,Ce=de-1,we=p;we!=null&&++QQ?0:Q+C),T=T>Q?Q:T,T<0&&(T+=Q),Q=C>T?0:T-C>>>0,C>>>=0;for(var de=ke(Q);++U>>1,Ce=p[de];Ce!==null&&!Zr(Ce)&&(T?Ce<=C:Ce=r){var ze=C?null:iG(p);if(ze)return Sg(ze);Ce=!1,Q=wf,Me=new Ws}else Me=C?[]:we;e:for(;++U=U?p:Si(p,C,T)}var aE=NK||function(p){return Ho.clearTimeout(p)};function lE(p,C){if(C)return p.slice();var T=p.length,U=PT?PT(T):new p.constructor(T);return p.copy(U),U}function eS(p){var C=new p.constructor(p.byteLength);return new Og(C).set(new Og(p)),C}function qU(p,C){var T=C?eS(p.buffer):p.buffer;return new p.constructor(T,p.byteOffset,p.byteLength)}function ZU(p){var C=new p.constructor(p.source,qo.exec(p));return C.lastIndex=p.lastIndex,C}function QU(p){return Tf?xn(Tf.call(p)):{}}function sE(p,C){var T=C?eS(p.buffer):p.buffer;return new p.constructor(T,p.byteOffset,p.length)}function cE(p,C){if(p!==C){var T=p!==n,U=p===null,Q=p===p,de=Zr(p),Ce=C!==n,we=C===null,Me=C===C,ze=Zr(C);if(!we&&!ze&&!de&&p>C||de&&Ce&&Me&&!we&&!ze||U&&Ce&&Me||!T&&Me||!Q)return 1;if(!U&&!de&&!ze&&p=we)return Me;var ze=T[U];return Me*(ze=="desc"?-1:1)}}return p.index-C.index}function uE(p,C,T,U){for(var Q=-1,de=p.length,Ce=T.length,we=-1,Me=C.length,ze=$o(de-Ce,0),je=ke(Me+ze),Ge=!U;++we1?T[Q-1]:n,Ce=Q>2?T[2]:n;for(de=p.length>3&&typeof de=="function"?(Q--,de):n,Ce&&gr(T[0],T[1],Ce)&&(de=Q<3?n:de,Q=1),C=xn(C);++U-1?Q[de?C[Ce]:Ce]:n}}function vE(p){return Ga(function(C){var T=C.length,U=T,Q=bi.prototype.thru;for(p&&C.reverse();U--;){var de=C[U];if(typeof de!="function")throw new mi(a);if(Q&&!Ce&&Ug(de)=="wrapper")var Ce=new bi([],!0)}for(U=Ce?U:T;++U1&&sn.reverse(),je&&Mewe))return!1;var ze=de.get(p),je=de.get(C);if(ze&&je)return ze==C&&je==p;var Ge=-1,ot=!0,yt=T&v?new Ws:n;for(de.set(p,C),de.set(C,p);++Ge1?"& ":"")+C[U],C=C.join(T>2?", ":" "),p.replace(ut,`{ +/* [wrapped with `+C+`] */ +`)}function gG(p){return Kt(p)||Ys(p)||!!(AT&&p&&p[AT])}function Ya(p,C){var T=typeof p;return C=C??L,!!C&&(T=="number"||T!="symbol"&&pa.test(p))&&p>-1&&p%1==0&&p0){if(++C>=N)return arguments[0]}else C=0;return p.apply(n,arguments)}}function Yg(p,C){var T=-1,U=p.length,Q=U-1;for(C=C===n?U:C;++T1?p[C-1]:n;return T=typeof T=="function"?(p.pop(),T):n,zE(p,T)});function jE(p){var C=ce(p);return C.__chain__=!0,C}function OY(p,C){return C(p),p}function Xg(p,C){return C(p)}var IY=Ga(function(p){var C=p.length,T=C?p[0]:0,U=this.__wrapped__,Q=function(de){return B1(de,p)};return C>1||this.__actions__.length||!(U instanceof on)||!Ya(T)?this.thru(Q):(U=U.slice(T,+T+(C?1:0)),U.__actions__.push({func:Xg,args:[Q],thisArg:n}),new bi(U,this.__chain__).thru(function(de){return C&&!de.length&&de.push(n),de}))});function PY(){return jE(this)}function TY(){return new bi(this.value(),this.__chain__)}function EY(){this.__values__===n&&(this.__values__=n4(this.value()));var p=this.__index__>=this.__values__.length,C=p?n:this.__values__[this.__index__++];return{done:p,value:C}}function AY(){return this}function MY(p){for(var C,T=this;T instanceof Dg;){var U=LE(T);U.__index__=0,U.__values__=n,C?Q.__wrapped__=U:C=U;var Q=U;T=T.__wrapped__}return Q.__wrapped__=p,C}function RY(){var p=this.__wrapped__;if(p instanceof on){var C=p;return this.__actions__.length&&(C=new on(this)),C=C.reverse(),C.__actions__.push({func:Xg,args:[fS],thisArg:n}),new bi(C,this.__chain__)}return this.thru(fS)}function DY(){return rE(this.__wrapped__,this.__actions__)}var LY=zg(function(p,C,T){vn.call(p,T)?++p[T]:Ka(p,T,1)});function NY(p,C,T){var U=Kt(p)?mT:OU;return T&&gr(p,C,T)&&(C=n),U(p,Tt(C,3))}function kY(p,C){var T=Kt(p)?kl:zT;return T(p,Tt(C,3))}var BY=gE(NE),FY=gE(kE);function HY(p,C){return zo(qg(p,C),1)}function zY(p,C){return zo(qg(p,C),k)}function jY(p,C,T){return T=T===n?1:Xt(T),zo(qg(p,C),T)}function WE(p,C){var T=Kt(p)?vi:zl;return T(p,Tt(C,3))}function VE(p,C){var T=Kt(p)?lK:HT;return T(p,Tt(C,3))}var WY=zg(function(p,C,T){vn.call(p,T)?p[T].push(C):Ka(p,T,[C])});function VY(p,C,T,U){p=Pr(p)?p:Ou(p),T=T&&!U?Xt(T):0;var Q=p.length;return T<0&&(T=$o(Q+T,0)),tv(p)?T<=Q&&p.indexOf(C,T)>-1:!!Q&&hu(p,C,T)>-1}var KY=Jt(function(p,C,T){var U=-1,Q=typeof C=="function",de=Pr(p)?ke(p.length):[];return zl(p,function(Ce){de[++U]=Q?Yr(C,Ce,T):Mf(Ce,C,T)}),de}),UY=zg(function(p,C,T){Ka(p,T,C)});function qg(p,C){var T=Kt(p)?Fn:GT;return T(p,Tt(C,3))}function GY(p,C,T,U){return p==null?[]:(Kt(C)||(C=C==null?[]:[C]),T=U?n:T,Kt(T)||(T=T==null?[]:[T]),ZT(p,C,T))}var YY=zg(function(p,C,T){p[T?0:1].push(C)},function(){return[[],[]]});function XY(p,C,T){var U=Kt(p)?_1:CT,Q=arguments.length<3;return U(p,Tt(C,4),T,Q,zl)}function qY(p,C,T){var U=Kt(p)?sK:CT,Q=arguments.length<3;return U(p,Tt(C,4),T,Q,HT)}function ZY(p,C){var T=Kt(p)?kl:zT;return T(p,Jg(Tt(C,3)))}function QY(p){var C=Kt(p)?NT:VU;return C(p)}function JY(p,C,T){(T?gr(p,C,T):C===n)?C=1:C=Xt(C);var U=Kt(p)?CU:KU;return U(p,C)}function eX(p){var C=Kt(p)?$U:GU;return C(p)}function tX(p){if(p==null)return 0;if(Pr(p))return tv(p)?vu(p):p.length;var C=tr(p);return C==j||C==_e?p.size:V1(p).length}function nX(p,C,T){var U=Kt(p)?O1:YU;return T&&gr(p,C,T)&&(C=n),U(p,Tt(C,3))}var oX=Jt(function(p,C){if(p==null)return[];var T=C.length;return T>1&&gr(p,C[0],C[1])?C=[]:T>2&&gr(C[0],C[1],C[2])&&(C=[C[0]]),ZT(p,zo(C,1),[])}),Zg=kK||function(){return Ho.Date.now()};function rX(p,C){if(typeof C!="function")throw new mi(a);return p=Xt(p),function(){if(--p<1)return C.apply(this,arguments)}}function KE(p,C,T){return C=T?n:C,C=p&&C==null?p.length:C,Ua(p,O,n,n,n,n,C)}function UE(p,C){var T;if(typeof C!="function")throw new mi(a);return p=Xt(p),function(){return--p>0&&(T=C.apply(this,arguments)),p<=1&&(C=n),T}}var hS=Jt(function(p,C,T){var U=y;if(T.length){var Q=Fl(T,wu(hS));U|=w}return Ua(p,U,C,T,Q)}),GE=Jt(function(p,C,T){var U=y|b;if(T.length){var Q=Fl(T,wu(GE));U|=w}return Ua(C,U,p,T,Q)});function YE(p,C,T){C=T?n:C;var U=Ua(p,x,n,n,n,n,n,C);return U.placeholder=YE.placeholder,U}function XE(p,C,T){C=T?n:C;var U=Ua(p,_,n,n,n,n,n,C);return U.placeholder=XE.placeholder,U}function qE(p,C,T){var U,Q,de,Ce,we,Me,ze=0,je=!1,Ge=!1,ot=!0;if(typeof p!="function")throw new mi(a);C=$i(C)||0,Kn(T)&&(je=!!T.leading,Ge="maxWait"in T,de=Ge?$o($i(T.maxWait)||0,C):de,ot="trailing"in T?!!T.trailing:ot);function yt(io){var Xi=U,Za=Q;return U=Q=n,ze=io,Ce=p.apply(Za,Xi),Ce}function Et(io){return ze=io,we=kf(tn,C),je?yt(io):Ce}function Qt(io){var Xi=io-Me,Za=io-ze,g4=C-Xi;return Ge?er(g4,de-Za):g4}function At(io){var Xi=io-Me,Za=io-ze;return Me===n||Xi>=C||Xi<0||Ge&&Za>=de}function tn(){var io=Zg();if(At(io))return sn(io);we=kf(tn,Qt(io))}function sn(io){return we=n,ot&&U?yt(io):(U=Q=n,Ce)}function Qr(){we!==n&&aE(we),ze=0,U=Me=Q=we=n}function vr(){return we===n?Ce:sn(Zg())}function Jr(){var io=Zg(),Xi=At(io);if(U=arguments,Q=this,Me=io,Xi){if(we===n)return Et(Me);if(Ge)return aE(we),we=kf(tn,C),yt(Me)}return we===n&&(we=kf(tn,C)),Ce}return Jr.cancel=Qr,Jr.flush=vr,Jr}var iX=Jt(function(p,C){return FT(p,1,C)}),aX=Jt(function(p,C,T){return FT(p,$i(C)||0,T)});function lX(p){return Ua(p,E)}function Qg(p,C){if(typeof p!="function"||C!=null&&typeof C!="function")throw new mi(a);var T=function(){var U=arguments,Q=C?C.apply(this,U):U[0],de=T.cache;if(de.has(Q))return de.get(Q);var Ce=p.apply(this,U);return T.cache=de.set(Q,Ce)||de,Ce};return T.cache=new(Qg.Cache||Va),T}Qg.Cache=Va;function Jg(p){if(typeof p!="function")throw new mi(a);return function(){var C=arguments;switch(C.length){case 0:return!p.call(this);case 1:return!p.call(this,C[0]);case 2:return!p.call(this,C[0],C[1]);case 3:return!p.call(this,C[0],C[1],C[2])}return!p.apply(this,C)}}function sX(p){return UE(2,p)}var cX=XU(function(p,C){C=C.length==1&&Kt(C[0])?Fn(C[0],Xr(Tt())):Fn(zo(C,1),Xr(Tt()));var T=C.length;return Jt(function(U){for(var Q=-1,de=er(U.length,T);++Q=C}),Ys=VT(function(){return arguments}())?VT:function(p){return Xn(p)&&vn.call(p,"callee")&&!ET.call(p,"callee")},Kt=ke.isArray,wX=dT?Xr(dT):MU;function Pr(p){return p!=null&&ev(p.length)&&!Xa(p)}function ro(p){return Xn(p)&&Pr(p)}function _X(p){return p===!0||p===!1||Xn(p)&&hr(p)==fe}var Kl=FK||OS,OX=fT?Xr(fT):RU;function IX(p){return Xn(p)&&p.nodeType===1&&!Bf(p)}function PX(p){if(p==null)return!0;if(Pr(p)&&(Kt(p)||typeof p=="string"||typeof p.splice=="function"||Kl(p)||_u(p)||Ys(p)))return!p.length;var C=tr(p);if(C==j||C==_e)return!p.size;if(Nf(p))return!V1(p).length;for(var T in p)if(vn.call(p,T))return!1;return!0}function TX(p,C){return Rf(p,C)}function EX(p,C,T){T=typeof T=="function"?T:n;var U=T?T(p,C):n;return U===n?Rf(p,C,n,T):!!U}function vS(p){if(!Xn(p))return!1;var C=hr(p);return C==ue||C==X||typeof p.message=="string"&&typeof p.name=="string"&&!Bf(p)}function AX(p){return typeof p=="number"&&MT(p)}function Xa(p){if(!Kn(p))return!1;var C=hr(p);return C==ye||C==H||C==ee||C==Se}function QE(p){return typeof p=="number"&&p==Xt(p)}function ev(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=L}function Kn(p){var C=typeof p;return p!=null&&(C=="object"||C=="function")}function Xn(p){return p!=null&&typeof p=="object"}var JE=pT?Xr(pT):LU;function MX(p,C){return p===C||W1(p,C,aS(C))}function RX(p,C,T){return T=typeof T=="function"?T:n,W1(p,C,aS(C),T)}function DX(p){return e4(p)&&p!=+p}function LX(p){if(bG(p))throw new Wt(i);return KT(p)}function NX(p){return p===null}function kX(p){return p==null}function e4(p){return typeof p=="number"||Xn(p)&&hr(p)==q}function Bf(p){if(!Xn(p)||hr(p)!=ae)return!1;var C=Ig(p);if(C===null)return!0;var T=vn.call(C,"constructor")&&C.constructor;return typeof T=="function"&&T instanceof T&&xg.call(T)==RK}var mS=hT?Xr(hT):NU;function BX(p){return QE(p)&&p>=-L&&p<=L}var t4=gT?Xr(gT):kU;function tv(p){return typeof p=="string"||!Kt(p)&&Xn(p)&&hr(p)==be}function Zr(p){return typeof p=="symbol"||Xn(p)&&hr(p)==Te}var _u=vT?Xr(vT):BU;function FX(p){return p===n}function HX(p){return Xn(p)&&tr(p)==oe}function zX(p){return Xn(p)&&hr(p)==le}var jX=Kg(K1),WX=Kg(function(p,C){return p<=C});function n4(p){if(!p)return[];if(Pr(p))return tv(p)?Ui(p):Ir(p);if(_f&&p[_f])return CK(p[_f]());var C=tr(p),T=C==j?M1:C==_e?Sg:Ou;return T(p)}function qa(p){if(!p)return p===0?p:0;if(p=$i(p),p===k||p===-k){var C=p<0?-1:1;return C*z}return p===p?p:0}function Xt(p){var C=qa(p),T=C%1;return C===C?T?C-T:C:0}function o4(p){return p?Vs(Xt(p),0,G):0}function $i(p){if(typeof p=="number")return p;if(Zr(p))return K;if(Kn(p)){var C=typeof p.valueOf=="function"?p.valueOf():p;p=Kn(C)?C+"":C}if(typeof p!="string")return p===0?p:+p;p=$T(p);var T=Cn.test(p);return T||Or.test(p)?rK(p.slice(2),T?2:8):_r.test(p)?K:+p}function r4(p){return ma(p,Tr(p))}function VX(p){return p?Vs(Xt(p),-L,L):p===0?p:0}function hn(p){return p==null?"":qr(p)}var KX=$u(function(p,C){if(Nf(C)||Pr(C)){ma(C,Mo(C),p);return}for(var T in C)vn.call(C,T)&&Ef(p,T,C[T])}),i4=$u(function(p,C){ma(C,Tr(C),p)}),nv=$u(function(p,C,T,U){ma(C,Tr(C),p,U)}),UX=$u(function(p,C,T,U){ma(C,Mo(C),p,U)}),GX=Ga(B1);function YX(p,C){var T=Cu(p);return C==null?T:kT(T,C)}var XX=Jt(function(p,C){p=xn(p);var T=-1,U=C.length,Q=U>2?C[2]:n;for(Q&&gr(C[0],C[1],Q)&&(U=1);++T1),de}),ma(p,rS(p),T),U&&(T=yi(T,d|f|h,aG));for(var Q=C.length;Q--;)q1(T,C[Q]);return T});function pq(p,C){return l4(p,Jg(Tt(C)))}var hq=Ga(function(p,C){return p==null?{}:zU(p,C)});function l4(p,C){if(p==null)return{};var T=Fn(rS(p),function(U){return[U]});return C=Tt(C),QT(p,T,function(U,Q){return C(U,Q[0])})}function gq(p,C,T){C=Wl(C,p);var U=-1,Q=C.length;for(Q||(Q=1,p=n);++UC){var U=p;p=C,C=U}if(T||p%1||C%1){var Q=RT();return er(p+Q*(C-p+oK("1e-"+((Q+"").length-1))),C)}return G1(p,C)}var Oq=xu(function(p,C,T){return C=C.toLowerCase(),p+(T?u4(C):C)});function u4(p){return SS(hn(p).toLowerCase())}function d4(p){return p=hn(p),p&&p.replace(ha,vK).replace(GV,"")}function Iq(p,C,T){p=hn(p),C=qr(C);var U=p.length;T=T===n?U:Vs(Xt(T),0,U);var Q=T;return T-=C.length,T>=0&&p.slice(T,Q)==C}function Pq(p){return p=hn(p),p&&Gn.test(p)?p.replace(Yt,mK):p}function Tq(p){return p=hn(p),p&&za.test(p)?p.replace(Ao,"\\$&"):p}var Eq=xu(function(p,C,T){return p+(T?"-":"")+C.toLowerCase()}),Aq=xu(function(p,C,T){return p+(T?" ":"")+C.toLowerCase()}),Mq=hE("toLowerCase");function Rq(p,C,T){p=hn(p),C=Xt(C);var U=C?vu(p):0;if(!C||U>=C)return p;var Q=(C-U)/2;return Vg(Ag(Q),T)+p+Vg(Eg(Q),T)}function Dq(p,C,T){p=hn(p),C=Xt(C);var U=C?vu(p):0;return C&&U>>0,T?(p=hn(p),p&&(typeof C=="string"||C!=null&&!mS(C))&&(C=qr(C),!C&&gu(p))?Vl(Ui(p),0,T):p.split(C,T)):[]}var zq=xu(function(p,C,T){return p+(T?" ":"")+SS(C)});function jq(p,C,T){return p=hn(p),T=T==null?0:Vs(Xt(T),0,p.length),C=qr(C),p.slice(T,T+C.length)==C}function Wq(p,C,T){var U=ce.templateSettings;T&&gr(p,C,T)&&(C=n),p=hn(p),C=nv({},C,U,CE);var Q=nv({},C.imports,U.imports,CE),de=Mo(Q),Ce=A1(Q,de),we,Me,ze=0,je=C.interpolate||Zo,Ge="__p += '",ot=R1((C.escape||Zo).source+"|"+je.source+"|"+(je===yo?hi:Zo).source+"|"+(C.evaluate||Zo).source+"|$","g"),yt="//# sourceURL="+(vn.call(C,"sourceURL")?(C.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++QV+"]")+` +`;p.replace(ot,function(At,tn,sn,Qr,vr,Jr){return sn||(sn=Qr),Ge+=p.slice(ze,Jr).replace(Ll,bK),tn&&(we=!0,Ge+=`' + +__e(`+tn+`) + +'`),vr&&(Me=!0,Ge+=`'; +`+vr+`; +__p += '`),sn&&(Ge+=`' + +((__t = (`+sn+`)) == null ? '' : __t) + +'`),ze=Jr+At.length,At}),Ge+=`'; +`;var Et=vn.call(C,"variable")&&C.variable;if(!Et)Ge=`with (obj) { +`+Ge+` +} +`;else if(Xo.test(Et))throw new Wt(l);Ge=(Me?Ge.replace(xt,""):Ge).replace(Mt,"$1").replace(Ft,"$1;"),Ge="function("+(Et||"obj")+`) { +`+(Et?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(we?", __e = _.escape":"")+(Me?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Ge+`return __p +}`;var Qt=p4(function(){return fn(de,yt+"return "+Ge).apply(n,Ce)});if(Qt.source=Ge,vS(Qt))throw Qt;return Qt}function Vq(p){return hn(p).toLowerCase()}function Kq(p){return hn(p).toUpperCase()}function Uq(p,C,T){if(p=hn(p),p&&(T||C===n))return $T(p);if(!p||!(C=qr(C)))return p;var U=Ui(p),Q=Ui(C),de=xT(U,Q),Ce=wT(U,Q)+1;return Vl(U,de,Ce).join("")}function Gq(p,C,T){if(p=hn(p),p&&(T||C===n))return p.slice(0,OT(p)+1);if(!p||!(C=qr(C)))return p;var U=Ui(p),Q=wT(U,Ui(C))+1;return Vl(U,0,Q).join("")}function Yq(p,C,T){if(p=hn(p),p&&(T||C===n))return p.replace(We,"");if(!p||!(C=qr(C)))return p;var U=Ui(p),Q=xT(U,Ui(C));return Vl(U,Q).join("")}function Xq(p,C){var T=R,U=A;if(Kn(C)){var Q="separator"in C?C.separator:Q;T="length"in C?Xt(C.length):T,U="omission"in C?qr(C.omission):U}p=hn(p);var de=p.length;if(gu(p)){var Ce=Ui(p);de=Ce.length}if(T>=de)return p;var we=T-vu(U);if(we<1)return U;var Me=Ce?Vl(Ce,0,we).join(""):p.slice(0,we);if(Q===n)return Me+U;if(Ce&&(we+=Me.length-we),mS(Q)){if(p.slice(we).search(Q)){var ze,je=Me;for(Q.global||(Q=R1(Q.source,hn(qo.exec(Q))+"g")),Q.lastIndex=0;ze=Q.exec(je);)var Ge=ze.index;Me=Me.slice(0,Ge===n?we:Ge)}}else if(p.indexOf(qr(Q),we)!=we){var ot=Me.lastIndexOf(Q);ot>-1&&(Me=Me.slice(0,ot))}return Me+U}function qq(p){return p=hn(p),p&&Vn.test(p)?p.replace(jt,_K):p}var Zq=xu(function(p,C,T){return p+(T?" ":"")+C.toUpperCase()}),SS=hE("toUpperCase");function f4(p,C,T){return p=hn(p),C=T?n:C,C===n?SK(p)?PK(p):dK(p):p.match(C)||[]}var p4=Jt(function(p,C){try{return Yr(p,n,C)}catch(T){return vS(T)?T:new Wt(T)}}),Qq=Ga(function(p,C){return vi(C,function(T){T=ba(T),Ka(p,T,hS(p[T],p))}),p});function Jq(p){var C=p==null?0:p.length,T=Tt();return p=C?Fn(p,function(U){if(typeof U[1]!="function")throw new mi(a);return[T(U[0]),U[1]]}):[],Jt(function(U){for(var Q=-1;++QL)return[];var T=G,U=er(p,G);C=Tt(C),p-=G;for(var Q=E1(U,C);++T0||C<0)?new on(T):(p<0?T=T.takeRight(-p):p&&(T=T.drop(p)),C!==n&&(C=Xt(C),T=C<0?T.dropRight(-C):T.take(C-p)),T)},on.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},on.prototype.toArray=function(){return this.take(G)},va(on.prototype,function(p,C){var T=/^(?:filter|find|map|reject)|While$/.test(C),U=/^(?:head|last)$/.test(C),Q=ce[U?"take"+(C=="last"?"Right":""):C],de=U||/^find/.test(C);Q&&(ce.prototype[C]=function(){var Ce=this.__wrapped__,we=U?[1]:arguments,Me=Ce instanceof on,ze=we[0],je=Me||Kt(Ce),Ge=function(tn){var sn=Q.apply(ce,Bl([tn],we));return U&&ot?sn[0]:sn};je&&T&&typeof ze=="function"&&ze.length!=1&&(Me=je=!1);var ot=this.__chain__,yt=!!this.__actions__.length,Et=de&&!ot,Qt=Me&&!yt;if(!de&&je){Ce=Qt?Ce:new on(this);var At=p.apply(Ce,we);return At.__actions__.push({func:Xg,args:[Ge],thisArg:n}),new bi(At,ot)}return Et&&Qt?p.apply(this,we):(At=this.thru(Ge),Et?U?At.value()[0]:At.value():At)})}),vi(["pop","push","shift","sort","splice","unshift"],function(p){var C=Cg[p],T=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",U=/^(?:pop|shift)$/.test(p);ce.prototype[p]=function(){var Q=arguments;if(U&&!this.__chain__){var de=this.value();return C.apply(Kt(de)?de:[],Q)}return this[T](function(Ce){return C.apply(Kt(Ce)?Ce:[],Q)})}}),va(on.prototype,function(p,C){var T=ce[C];if(T){var U=T.name+"";vn.call(Su,U)||(Su[U]=[]),Su[U].push({name:C,func:T})}}),Su[jg(n,b).name]=[{name:"wrapper",func:n}],on.prototype.clone=qK,on.prototype.reverse=ZK,on.prototype.value=QK,ce.prototype.at=IY,ce.prototype.chain=PY,ce.prototype.commit=TY,ce.prototype.next=EY,ce.prototype.plant=MY,ce.prototype.reverse=RY,ce.prototype.toJSON=ce.prototype.valueOf=ce.prototype.value=DY,ce.prototype.first=ce.prototype.head,_f&&(ce.prototype[_f]=AY),ce},mu=TK();Hs?((Hs.exports=mu)._=mu,$1._=mu):Ho._=mu}).call(Lr)})(eb,eb.exports);var HRe=eb.exports;const Fp=Ba(HRe),zRe="#17b392",Jj="LOCAL_STORAGE_LOCALE",jRe="LOCAL_STORAGE_THEME";let WRe=localStorage.getItem(jRe);function VRe(e){e=e.replace("#","");const t=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16),[r,i,a]=[t,n,o].map(s=>{const c=s/255;return c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4)});return .2126*r+.7152*i+.0722*a>.5?"#131313":"#e3e1e1"}const Oh=he(WRe||zRe),_He=e=>M(()=>Oh.value+e),OHe=M(()=>VRe(Oh.value)),IHe={HEALTHY:"green",REGISTED:"green"},KRe={functional:!0,props:["route"],render:(e,t,n)=>{var i,a,l;let o=n.route,r=(a=(i=o.meta)==null?void 0:i.slots)==null?void 0:a.header;return Ni(r)||Ni("div",(l=o.params)==null?void 0:l.pathId)}},PHe={RUNNING:"green",PENDING:"yellow",TERMINATING:"red",CRASHING:"darkRed"},Lu="__PROVIDE_INJECT_KEY_",eW={LAYOUT_ROUTE_KEY:Lu+"LAYOUT_ROUTE_KEY",LOCALE:Lu+"LOCALE",GRAFANA:Lu+"GRAFANA",SEARCH_DOMAIN:Lu+"SEARCH_DOMAIN",COLLAPSED:Lu+"COLLAPSED",TAB_LAYOUT_STATE:Lu+"TAB_LAYOUT_STATE"},URe={class:"__container_router_tab_index"},GRe={key:0,class:"header"},YRe={id:"layout-tab-body",style:{transition:"scroll-top 0.5s ease",overflow:"auto",height:"calc(100vh - 300px)","padding-bottom":"20px"}},XRe=pe({__name:"layout_tab",setup(e){ON(c=>({"6b871b3a":It(Oh)}));const t=St({});ft(eW.PROVIDE_INJECT_KEY,t);const n=kj(),o=Ml();o.meta;const r=M(()=>{var u,d;let c=o.meta;return(d=(u=c==null?void 0:c.parent)==null?void 0:u.children)==null?void 0:d.filter(f=>f.meta.tab)}),i=M(()=>o.name+"_"+Fp.uniqueId());let a=he(o.name),l=he(!1),s=Fp.uniqueId("__tab_page");return n.beforeEach((c,u,d)=>{s=Fp.uniqueId("__tab_page"),l.value=!0,a.value=c.name,d(),setTimeout(()=>{l.value=!1},500)}),(c,u)=>{const d=Nt("a-col"),f=Nt("a-row"),h=Nt("a-tab-pane"),m=Nt("a-tabs"),v=Nt("router-view"),y=Nt("a-spin");return ht(),qt("div",URe,[(ht(),qt("div",{key:It(s)},[It(o).meta.tab?(ht(),qt("div",GRe,[g(f,null,{default:bn(()=>[g(d,{span:1},{default:bn(()=>[tt("span",{onClick:u[0]||(u[0]=b=>It(n).replace(It(o).meta.back||"../")),style:{float:"left"}},[g(It(S5),{icon:"material-symbols:keyboard-backspace-rounded",class:"back"})])]),_:1}),g(d,{span:18},{default:bn(()=>[g(It(KRe),{route:It(o)},null,8,["route"])]),_:1})]),_:1}),g(m,{onChange:u[1]||(u[1]=b=>It(n).push({name:It(a)||""})),activeKey:It(a),"onUpdate:activeKey":u[2]||(u[2]=b=>Wn(a)?a.value=b:a=b)},{default:bn(()=>[(ht(!0),qt(Je,null,Cd(r.value.filter(b=>!b.meta.hidden),b=>(ht(),jn(h,{key:b.name},{tab:bn(()=>[tt("span",null,[g(It(S5),{style:{"margin-bottom":"-2px"},icon:b.meta.icon},null,8,["icon"]),Do(" "+Uo(c.$t(b.name)),1)])]),_:2},1024))),128))]),_:1},8,["activeKey"])])):zn("",!0),g(y,{class:"tab-spin",spinning:It(l)},{default:bn(()=>[tt("div",YRe,[It(l)?zn("",!0):(ht(),jn(v,{key:i.value}))])]),_:1},8,["spinning"])]))])}}}),fa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},qi=fa(XRe,[["__scopeId","data-v-e3c1cda1"]]),qRe={class:"__container_AppTabHeaderSlot"},ZRe={class:"header-desc"},QRe=pe({__name:"AppTabHeaderSlot",setup(e){const t=Ml();return(n,o)=>{const r=Nt("a-col"),i=Nt("a-row");return ht(),qt("div",qRe,[g(i,null,{default:bn(()=>[g(r,{span:12},{default:bn(()=>{var a;return[tt("span",ZRe,Uo(n.$t("applicationDomain.name"))+": "+Uo((a=It(t).params)==null?void 0:a.pathId),1)]}),_:1})]),_:1})])}}}),JRe=fa(QRe,[["__scopeId","data-v-d9202124"]]),e5e={class:"__container_ServiceTabHeaderSlot"},t5e={class:"header-desc"},n5e=pe({__name:"ServiceTabHeaderSlot",setup(e){const t=Ml();return(n,o)=>{var r;return ht(),qt("div",e5e,[tt("span",t5e,Uo(n.$t("serviceDomain.name"))+": "+Uo((r=It(t).params)==null?void 0:r.pathId),1)])}}}),o5e=fa(n5e,[["__scopeId","data-v-3de51f62"]]),r5e={class:"__container_AppTabHeaderSlot"},i5e={class:"header-desc"},a5e=pe({__name:"InstanceTabHeaderSlot",setup(e){const t=Ml();return(n,o)=>{const r=Nt("a-col"),i=Nt("a-row");return ht(),qt("div",r5e,[g(i,null,{default:bn(()=>[g(r,{span:12},{default:bn(()=>{var a;return[tt("span",i5e,Uo(n.$t("instanceDomain.name"))+": "+Uo((a=It(t).params)==null?void 0:a.pathId),1)]}),_:1})]),_:1})])}}}),l5e=fa(a5e,[["__scopeId","data-v-945638c8"]]),s5e={},c5e=e=>(Ps("data-v-0f2e35af"),e=e(),Ts(),e),u5e={class:"__container_AppTabHeaderSlot"},d5e=c5e(()=>tt("span",{class:"header-desc"}," 新增条件路由 ",-1));function f5e(e,t){const n=Nt("a-col"),o=Nt("a-row");return ht(),qt("div",u5e,[g(o,null,{default:bn(()=>[g(n,{span:12},{default:bn(()=>[d5e]),_:1})]),_:1})])}const p5e=fa(s5e,[["render",f5e],["__scopeId","data-v-0f2e35af"]]),h5e={class:"__container_AppTabHeaderSlot"},g5e={class:"header-desc"},v5e=pe({__name:"conditionRuleDetailTabHeaderSlot",setup(e){const t=Ml();return(n,o)=>{const r=Nt("a-col"),i=Nt("a-row");return ht(),qt("div",h5e,[g(i,null,{default:bn(()=>[g(r,{span:12},{default:bn(()=>{var a;return[tt("span",g5e,Uo((a=It(t).params)==null?void 0:a.ruleName),1)]}),_:1})]),_:1})])}}}),m5e=fa(v5e,[["__scopeId","data-v-8b847dc2"]]),b5e={class:"__container_AppTabHeaderSlot"},y5e={class:"header-desc"},S5e=pe({__name:"updateConditionRuleTabHeaderSlot",setup(e){const t=Ml();return(n,o)=>{const r=Nt("a-col"),i=Nt("a-row");return ht(),qt("div",b5e,[g(i,null,{default:bn(()=>[g(r,{span:12},{default:bn(()=>{var a;return[tt("span",y5e," 修改 "+Uo((a=It(t).params)==null?void 0:a.ruleName),1)]}),_:1})]),_:1})])}}}),C5e=fa(S5e,[["__scopeId","data-v-9e571c17"]]),$5e={},x5e=e=>(Ps("data-v-0f780945"),e=e(),Ts(),e),w5e={class:"__container_AppTabHeaderSlot"},_5e=x5e(()=>tt("span",{class:"header-desc"}," 新增标签路由 ",-1));function O5e(e,t){const n=Nt("a-col"),o=Nt("a-row");return ht(),qt("div",w5e,[g(o,null,{default:bn(()=>[g(n,{span:12},{default:bn(()=>[_5e]),_:1})]),_:1})])}const I5e=fa($5e,[["render",O5e],["__scopeId","data-v-0f780945"]]),P5e={class:"__container_AppTabHeaderSlot"},T5e={class:"header-desc"},E5e=pe({__name:"tagRuleDetailTabHeaderSlot",setup(e){const t=Ml();return(n,o)=>{const r=Nt("a-col"),i=Nt("a-row");return ht(),qt("div",P5e,[g(i,null,{default:bn(()=>[g(r,{span:12},{default:bn(()=>{var a;return[tt("span",T5e,Uo((a=It(t).params)==null?void 0:a.ruleName),1)]}),_:1})]),_:1})])}}}),A5e=fa(E5e,[["__scopeId","data-v-49f86476"]]),M5e={class:"__container_AppTabHeaderSlot"},R5e={class:"header-desc"},D5e=pe({__name:"updateTagRuleTabHeaderSlot",setup(e){const t=Ml();return(n,o)=>{const r=Nt("a-col"),i=Nt("a-row");return ht(),qt("div",M5e,[g(i,null,{default:bn(()=>[g(r,{span:12},{default:bn(()=>{var a;return[tt("span",R5e," 修改 "+Uo((a=It(t).params)==null?void 0:a.ruleName),1)]}),_:1})]),_:1})])}}}),L5e=fa(D5e,[["__scopeId","data-v-91777569"]]),N5e={class:"__container_AppTabHeaderSlot"},k5e={class:"header-desc"},B5e=pe({__name:"updateDCTabHeaderSlot",setup(e){const t=Ml();return(n,o)=>{const r=Nt("a-col"),i=Nt("a-row");return ht(),qt("div",N5e,[g(i,null,{default:bn(()=>[g(r,{span:20},{default:bn(()=>{var a,l;return[tt("span",k5e,Uo(((a=It(t).params)==null?void 0:a.isEdit)==="1"?n.$t("dynamicConfigDomain.updateByFormView"):n.$t("dynamicConfigDomain.detailByFormView"))+" "+Uo((l=It(t).params)==null?void 0:l.pathId),1)]}),_:1})]),_:1})])}}}),C5=fa(B5e,[["__scopeId","data-v-4d4ee463"]]),tW=[{path:"/login",name:"Login",component:()=>Ht(()=>import("./Login-QsM7tdlI.js"),__vite__mapDeps([0,1,2,3])),meta:{skip:!0},children:[]},{path:"/",name:"Root",redirect:"/home",component:()=>Ht(()=>import("./index-ECEQf-Fc.js"),__vite__mapDeps([4,5,2,6,7,1,8])),meta:{skip:!0},children:[{path:"/home",name:"homePage",component:()=>Ht(()=>import("./index-PuhA8qFJ.js"),__vite__mapDeps([9,10,2,11])),meta:{icon:"carbon:web-services-cluster"}},{path:"/resources",name:"resources",meta:{icon:"carbon:web-services-cluster"},children:[{path:"/applications",name:"applications",component:qi,redirect:"list",meta:{tab_parent:!0,slots:{header:JRe}},children:[{path:"/list",name:"router.resource.app.list",component:()=>Ht(()=>import("./index-jbm-YZ4W.js"),__vite__mapDeps([12,5,2,13,14,15])),meta:{hidden:!0}},{path:"/detail/:pathId",name:"applicationDomain.detail",component:()=>Ht(()=>import("./detail-NWi5D_Jp.js"),__vite__mapDeps([16,5,2,17])),meta:{tab:!0,icon:"tabler:list-details",back:"/resources/applications/list"}},{path:"/instance/:pathId",name:"applicationDomain.instance",component:()=>Ht(()=>import("./instance-u5IY96cv.js"),__vite__mapDeps([18,13,14,5,2,19,20,21,22])),meta:{tab:!0,icon:"ooui:instance-ltr",back:"/resources/applications/list"}},{path:"/service/:pathId",name:"applicationDomain.service",component:()=>Ht(()=>import("./service-LECfslfz.js"),__vite__mapDeps([23,10,2,13,14,5,20,24])),meta:{tab:!0,icon:"carbon:web-services-definition",back:"/resources/applications/list"}},{path:"/monitor/:pathId",name:"applicationDomain.monitor",component:()=>Ht(()=>import("./monitor-kZ_wOjob.js"),__vite__mapDeps([25,26,27,5,2])),meta:{tab:!0,icon:"material-symbols-light:monitor-heart-outline",back:"/resources/applications/list"}},{path:"/tracing/:pathId",name:"applicationDomain.tracing",component:()=>Ht(()=>import("./tracing-egUve7nj.js"),__vite__mapDeps([28,26,27,5,2])),meta:{tab:!0,icon:"game-icons:digital-trace",back:"/resources/applications/list"}},{path:"/config/:pathId",name:"applicationDomain.config",component:()=>Ht(()=>import("./config-iPQQ4Osw.js"),__vite__mapDeps([29,30,31,5,2,32])),meta:{tab:!0,icon:"material-symbols:settings",back:"/resources/applications/list"}},{path:"/event/:pathId",name:"applicationDomain.event",component:()=>Ht(()=>import("./event-ZoLBaQpy.js"),__vite__mapDeps([33,5,2,34])),meta:{tab:!0,hidden:!0,icon:"material-symbols:date-range",back:"/resources/applications/list"}}]},{path:"/instances",name:"instances",component:qi,redirect:"list",meta:{tab_parent:!0,slots:{header:l5e}},children:[{path:"/list",name:"router.resource.ins.list",component:()=>Ht(()=>import("./index-fU57L0AQ.js"),__vite__mapDeps([35,6,2,13,14,20,21,36])),meta:{hidden:!0}},{path:"/detail/:appName/:pathId?",name:"instanceDomain.details",component:()=>Ht(()=>import("./detail-IPVQRAO3.js"),__vite__mapDeps([37,17,6,2,19])),meta:{tab:!0,icon:"tabler:list-details",back:"/resources/instances/list"}},{path:"/monitor/:pathId/:appName",name:"instanceDomain.monitor",component:()=>Ht(()=>import("./monitor-Yx9RU22f.js"),__vite__mapDeps([38,26,27,6,2])),meta:{tab:!0,icon:"ooui:instance-ltr",back:"/resources/instances/list"}},{path:"/linktracking/:pathId/:appName",name:"instanceDomain.linkTracking",component:()=>Ht(()=>import("./linkTracking-gLhWXj25.js"),__vite__mapDeps([39,26,27,6,2])),meta:{tab:!0,icon:"material-symbols-light:monitor-heart-outline",back:"/resources/instances/list"}},{path:"/configuration/:pathId/:appName",name:"instanceDomain.configuration",component:()=>Ht(()=>import("./configuration-um3mt9hU.js"),__vite__mapDeps([40,30,31,6,2])),meta:{tab:!0,icon:"material-symbols:settings",back:"/resources/instances/list"}},{path:"/event/:pathId/:appName",name:"instanceDomain.event",component:()=>Ht(()=>import("./event-Di8PmXwq.js"),__vite__mapDeps([])),meta:{tab:!0,hidden:!0,icon:"material-symbols:date-range",back:"/resources/instances/list"}}]},{path:"/services",name:"services",redirect:"list",component:qi,meta:{tab_parent:!0,slots:{header:o5e}},children:[{path:"/list",name:"router.resource.svc.list",component:()=>Ht(()=>import("./search-c0Szb99-.js"),__vite__mapDeps([41,7,2,13,14,20,42])),meta:{hidden:!0}},{path:"/distribution/:pathId/:group?/:version?",name:"distribution",component:()=>Ht(()=>import("./distribution-WSPxFnjE.js"),__vite__mapDeps([43,7,2,19,44])),meta:{tab:!0,back:"/resources/services/list"}},{path:"/monitor/:pathId/:group?/:version?",name:"monitor",component:()=>Ht(()=>import("./monitor-JE2IXQk_.js"),__vite__mapDeps([45,26,27,7,2])),meta:{tab:!0,back:"/resources/services/list"}},{path:"/tracing/:pathId/:group?/:version?",name:"tracing",component:()=>Ht(()=>import("./tracing-DAAA17XP.js"),__vite__mapDeps([46,26,27,7,2])),meta:{tab:!0,back:"/resources/services/list"}},{path:"/sceneConfig/:pathId/:group?/:version?",name:"sceneConfig",component:()=>Ht(()=>import("./sceneConfig-wKVgfCMN.js"),__vite__mapDeps([47,30,31,7,2,48])),meta:{tab:!0,back:"/resources/services/list"}},{path:"/event/:pathId/:group?/:version?",name:"event",component:()=>Ht(()=>import("./event-IjH1CTVp.js"),__vite__mapDeps([49,50])),meta:{tab:!0,hidden:!0,back:"/resources/services/list"}}]}]},{path:"/traffic",name:"trafficManagement",meta:{icon:"eos-icons:cluster-management"},children:[{path:"/routingRule",name:"routingRule",redirect:"index",component:qi,meta:{tab_parent:!0,slots:{header:m5e}},children:[{path:"/index",name:"routingRuleIndex",component:()=>Ht(()=>import("./index-9Tpk6WxM.js"),__vite__mapDeps([51,52,2,13,14,19,53])),meta:{hidden:!0}},{path:"/formview/:ruleName",name:"routingRuleDomain.formView",component:()=>Ht(()=>import("./formView-RlUvRzIB.js"),__vite__mapDeps([54,17,52,2,55])),meta:{tab:!0,icon:"oui:apm-trace"}},{path:"/yamlview/:ruleName",name:"routingRuleDomain.YAMLView",component:()=>Ht(()=>import("./YAMLView-mXrxtewG.js"),__vite__mapDeps([56,57,58,52,2,59])),meta:{tab:!0,icon:"oui:app-console"}}]},{path:"/addRoutingRule",name:"addRoutingRule",component:qi,redirect:"addByFormView",meta:{tab_parent:!0,hidden:!0,slots:{header:p5e}},children:[{path:"/addByFormView",name:"addRoutingRuleDomain.formView",component:()=>Ht(()=>import("./addByFormView-suZAGsdv.js"),__vite__mapDeps([60,17,52,2,61])),meta:{tab:!0,icon:"oui:apm-trace"}},{path:"/addByYamlView",name:"addRoutingRuleDomain.YAMLView",component:()=>Ht(()=>import("./addByYAMLView-fC-hqbkM.js"),__vite__mapDeps([62,57,58,52,2,63])),meta:{tab:!0,icon:"oui:app-console"}}]},{path:"/updateRoutingRule",name:"updateRoutingRule",component:qi,meta:{tab_parent:!0,hidden:!0,slots:{header:C5e}},children:[{path:"/updateByFormView/:ruleName",name:"updateRoutingRuleDomain.formView",component:()=>Ht(()=>import("./updateByFormView-ySWJqpjX.js"),__vite__mapDeps([64,17,52,2,65])),meta:{tab:!0}},{path:"/updateByYAMLView/:ruleName",name:"updateRoutingRuleDomain.YAMLView",component:()=>Ht(()=>import("./updateByYAMLView--nyJvxZJ.js"),__vite__mapDeps([66,57,58,52,2,67])),meta:{tab:!0}}]},{path:"/tagRule",name:"tagRule",redirect:"index",component:qi,meta:{tab_parent:!0,slots:{header:A5e}},children:[{path:"/index",name:"tagRuleIndex",component:()=>Ht(()=>import("./index-VDeT_deC.js"),__vite__mapDeps([68,52,2,13,14,19,69])),meta:{hidden:!0}},{path:"/formview/:ruleName",name:"tagRuleDomain.formView",component:()=>Ht(()=>import("./formView-2KzX11dd.js"),__vite__mapDeps([70,17,52,2,71])),meta:{tab:!0,icon:"oui:apm-trace",back:"/traffic/tagRule"}},{path:"/yamlview/:ruleName",name:"tagRuleDomain.YAMLView",component:()=>Ht(()=>import("./YAMLView-s3WMf-Uo.js"),__vite__mapDeps([72,57,58,52,2,73])),meta:{tab:!0,icon:"oui:app-console"}}]},{path:"/addTagRule",name:"addTagRule",component:qi,meta:{tab_parent:!0,hidden:!0,slots:{header:I5e}},children:[{path:"/addByFormView",name:"addTagRuleDomain.formView",component:()=>Ht(()=>import("./addByFormView-Ia4T74MU.js"),__vite__mapDeps([74,17,52,2,75])),meta:{tab:!0,icon:"oui:apm-trace"}},{path:"/addByYAMLView",name:"addTagRuleDomain.YAMLView",component:()=>Ht(()=>import("./addByYAMLView--WjgktlZ.js"),__vite__mapDeps([76,57,58,52,2,77])),meta:{tab:!0,icon:"oui:app-console"}}]},{path:"/updateTagRule",name:"updateTagRule",component:qi,meta:{tab_parent:!0,hidden:!0,slots:{header:L5e}},children:[{path:"/updateByFormView/:ruleName",name:"updateTagRuleDomain.formView",component:()=>Ht(()=>import("./updateByFormView-mbEXmvrc.js"),__vite__mapDeps([78,17,52,2,79])),meta:{tab:!0}},{path:"/updateByYAMLView/:ruleName",name:"updateTagRuleDomain.YAMLView",component:()=>Ht(()=>import("./updateByYAMLView-X3vjkbCV.js"),__vite__mapDeps([80,57,58,52,2,81])),meta:{tab:!0}}]},{path:"/dynamicConfig",name:"dynamicConfig",redirect:"index",component:qi,meta:{tab_parent:!0},children:[{path:"/index",name:"dynamicConfigIndex",component:()=>Ht(()=>import("./index-ytKGiqRq.js"),__vite__mapDeps([82,52,2,13,14,83])),meta:{hidden:!0}},{path:"/formview/:pathId/:isEdit",name:"dynamicConfigDomain.formView",component:()=>Ht(()=>import("./formView-vzcbtWy_.js"),__vite__mapDeps([84,17,52,2,85,86])),meta:{tab:!0,icon:"oui:apm-trace",back:"/traffic/dynamicConfig",slots:{header:C5}}},{path:"/yamlview/:pathId/:isEdit",name:"dynamicConfigDomain.YAMLView",component:()=>Ht(()=>import("./YAMLView-TcLqiDOf.js"),__vite__mapDeps([87,57,58,52,2,85,88])),meta:{tab:!0,icon:"oui:app-console",back:"/traffic/dynamicConfig",slots:{header:C5}}}]}]},{path:"/common",name:"commonDemo",redirect:"tab",meta:{hidden:!0,icon:"tdesign:play-demo"},children:[{path:"/tab",name:"tabDemo",component:qi,redirect:"index",meta:{tab_parent:!0},children:[{path:"/index",name:"tab_demo_index",component:()=>Ht(()=>import("./index-tIlk8-2z.js"),__vite__mapDeps([])),meta:{hidden:!0}},{path:"/tab1/:pathId",name:"tab1",component:()=>Ht(()=>import("./tab1-Erm3qhoK.js"),__vite__mapDeps([])),meta:{icon:"simple-icons:podman",tab:!0}},{path:"/tab2/:pathId",name:"tab2",component:()=>Ht(()=>import("./tab2-gYKBqlWv.js"),__vite__mapDeps([])),meta:{icon:"fontisto:docker",tab:!0}}]},{path:"/placeholder",name:"placeholder_demo",component:()=>Ht(()=>import("./index-gNarHmYQ.js"),__vite__mapDeps([])),meta:{}}]}]},{path:"/:catchAll(.*)",name:"notFound",component:()=>Ht(()=>import("./notFound-hYD9Tscu.js"),__vite__mapDeps([89,90])),meta:{skip:!0}}];function $5(...e){return e.join("/").replace(/\/+/g,"/")}function nW(e,t){if(e)for(const n of e)t&&(n.path=$5(t==null?void 0:t.path,n.path)),n.redirect&&(n.redirect=$5(n.path,n.redirect||"")),n.meta?(n.meta._router_key=Fp.uniqueId("__router_key"),n.meta.parent=t,n.meta.skip=n.meta.skip===!0):n.meta={_router_key:Fp.uniqueId("__router_key"),skip:!1},nW(n.children,n)}nW(tW,void 0);const F5e={history:e8e("/admin"),routes:tW},oW=k8e(F5e),H5e={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},z5e=H5e,j5e={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},rW=j5e,iW={lang:S({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},z5e),timePickerLocale:S({},rW)};iW.lang.ok="确定";const x5=iW,oi="${label}不是一个有效的${type}",W5e={locale:"zh-cn",Pagination:zH,DatePicker:x5,TimePicker:rW,Calendar:x5,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:oi,method:oi,array:oi,object:oi,number:oi,date:oi,boolean:oi,integer:oi,float:oi,regexp:oi,email:oi,url:oi,hex:oi},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码已过期",refresh:"点击刷新",scanned:"已扫描"}},V5e=W5e;var aW={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Lr,function(){var n=1e3,o=6e4,r=36e5,i="millisecond",a="second",l="minute",s="hour",c="day",u="week",d="month",f="quarter",h="year",m="date",v="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var D=["th","st","nd","rd"],B=W%100;return"["+W+(D[(B-20)%10]||D[B]||D[0])+"]"}},x=function(W,D,B){var k=String(W);return!k||k.length>=D?W:""+Array(D+1-k.length).join(B)+W},_={s:x,z:function(W){var D=-W.utcOffset(),B=Math.abs(D),k=Math.floor(B/60),L=B%60;return(D<=0?"+":"-")+x(k,2,"0")+":"+x(L,2,"0")},m:function W(D,B){if(D.date()1)return W(K[0])}else{var G=D.name;I[G]=D,L=G}return!k&&L&&(w=L),L||!k&&w},R=function(W,D){if(P(W))return W.clone();var B=typeof D=="object"?D:{};return B.date=W,B.args=arguments,new N(B)},A=_;A.l=E,A.i=P,A.w=function(W,D){return R(W,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var N=function(){function W(B){this.$L=E(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[O]=!0}var D=W.prototype;return D.parse=function(B){this.$d=function(k){var L=k.date,z=k.utc;if(L===null)return new Date(NaN);if(A.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var K=L.match(y);if(K){var G=K[2]-1||0,Y=(K[7]||"0").substring(0,3);return z?new Date(Date.UTC(K[1],G,K[3]||1,K[4]||0,K[5]||0,K[6]||0,Y)):new Date(K[1],G,K[3]||1,K[4]||0,K[5]||0,K[6]||0,Y)}}return new Date(L)}(B),this.init()},D.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},D.$utils=function(){return A},D.isValid=function(){return this.$d.toString()!==v},D.isSame=function(B,k){var L=R(B);return this.startOf(k)<=L&&L<=this.endOf(k)},D.isAfter=function(B,k){return R(B)t?Symbol.for(e):Symbol(e),U5e=(e,t,n)=>G5e({l:e,k:t,s:n}),G5e=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),_o=e=>typeof e=="number"&&isFinite(e),Y5e=e=>sW(e)==="[object Date]",ws=e=>sW(e)==="[object RegExp]",i1=e=>zt(e)&&Object.keys(e).length===0,Ko=Object.assign;let _5;const fl=()=>_5||(_5=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function O5(e){return e.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const X5e=Object.prototype.hasOwnProperty;function nb(e,t){return X5e.call(e,t)}const Rn=Array.isArray,Pn=e=>typeof e=="function",at=e=>typeof e=="string",en=e=>typeof e=="boolean",gn=e=>e!==null&&typeof e=="object",q5e=e=>gn(e)&&Pn(e.then)&&Pn(e.catch),lW=Object.prototype.toString,sW=e=>lW.call(e),zt=e=>{if(!gn(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},Z5e=e=>e==null?"":Rn(e)||zt(e)&&e.toString===lW?JSON.stringify(e,null,2):String(e);function Q5e(e,t=""){return e.reduce((n,o,r)=>r===0?n+o:n+t+o,"")}function vP(e){let t=e;return()=>++t}function J5e(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const Gv=e=>!gn(e)||Rn(e);function Ym(e,t){if(Gv(e)||Gv(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:r}=n.pop();Object.keys(o).forEach(i=>{Gv(o[i])||Gv(r[i])?r[i]=o[i]:n.push({src:o[i],des:r[i]})})}}/*! + * message-compiler v9.9.1 + * (c) 2024 kazuya kawaguchi + * Released under the MIT License. + */function eDe(e,t,n){return{line:e,column:t,offset:n}}function Tw(e,t,n){const o={start:e,end:t};return n!=null&&(o.source=n),o}const tDe=/\{([0-9a-zA-Z]+)\}/g;function nDe(e,...t){return t.length===1&&oDe(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(tDe,(n,o)=>t.hasOwnProperty(o)?t[o]:"")}const cW=Object.assign,I5=e=>typeof e=="string",oDe=e=>e!==null&&typeof e=="object";function uW(e,t=""){return e.reduce((n,o,r)=>r===0?n+o:n+t+o,"")}const Dt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},rDe={[Dt.EXPECTED_TOKEN]:"Expected token: '{0}'",[Dt.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[Dt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[Dt.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[Dt.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[Dt.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[Dt.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[Dt.EMPTY_PLACEHOLDER]:"Empty placeholder",[Dt.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[Dt.INVALID_LINKED_FORMAT]:"Invalid linked format",[Dt.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[Dt.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[Dt.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[Dt.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[Dt.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[Dt.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function gf(e,t,n={}){const{domain:o,messages:r,args:i}=n,a=nDe((r||rDe)[e]||"",...i||[]),l=new SyntaxError(String(a));return l.code=e,t&&(l.location=t),l.domain=o,l}function iDe(e){throw e}const nl=" ",aDe="\r",br=` +`,lDe="\u2028",sDe="\u2029";function cDe(e){const t=e;let n=0,o=1,r=1,i=0;const a=O=>t[O]===aDe&&t[O+1]===br,l=O=>t[O]===br,s=O=>t[O]===sDe,c=O=>t[O]===lDe,u=O=>a(O)||l(O)||s(O)||c(O),d=()=>n,f=()=>o,h=()=>r,m=()=>i,v=O=>a(O)||s(O)||c(O)?br:t[O],y=()=>v(n),b=()=>v(n+i);function $(){return i=0,u(n)&&(o++,r=0),a(n)&&n++,n++,r++,t[n]}function x(){return a(n+i)&&i++,i++,t[n+i]}function _(){n=0,o=1,r=1,i=0}function w(O=0){i=O}function I(){const O=n+i;for(;O!==n;)$();i=0}return{index:d,line:f,column:h,peekOffset:m,charAt:v,currentChar:y,currentPeek:b,next:$,peek:x,reset:_,resetPeek:w,skipToPeek:I}}const ql=void 0,uDe=".",P5="'",dDe="tokenizer";function fDe(e,t={}){const n=t.location!==!1,o=cDe(e),r=()=>o.index(),i=()=>eDe(o.line(),o.column(),o.index()),a=i(),l=r(),s={currentType:14,offset:l,startLoc:a,endLoc:a,lastType:14,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},c=()=>s,{onError:u}=t;function d(H,j,q,...se){const ae=c();if(j.column+=q,j.offset+=q,u){const ge=n?Tw(ae.startLoc,j):null,Se=gf(H,ge,{domain:dDe,args:se});u(Se)}}function f(H,j,q){H.endLoc=i(),H.currentType=j;const se={type:j};return n&&(se.loc=Tw(H.startLoc,H.endLoc)),q!=null&&(se.value=q),se}const h=H=>f(H,14);function m(H,j){return H.currentChar()===j?(H.next(),j):(d(Dt.EXPECTED_TOKEN,i(),0,j),"")}function v(H){let j="";for(;H.currentPeek()===nl||H.currentPeek()===br;)j+=H.currentPeek(),H.peek();return j}function y(H){const j=v(H);return H.skipToPeek(),j}function b(H){if(H===ql)return!1;const j=H.charCodeAt(0);return j>=97&&j<=122||j>=65&&j<=90||j===95}function $(H){if(H===ql)return!1;const j=H.charCodeAt(0);return j>=48&&j<=57}function x(H,j){const{currentType:q}=j;if(q!==2)return!1;v(H);const se=b(H.currentPeek());return H.resetPeek(),se}function _(H,j){const{currentType:q}=j;if(q!==2)return!1;v(H);const se=H.currentPeek()==="-"?H.peek():H.currentPeek(),ae=$(se);return H.resetPeek(),ae}function w(H,j){const{currentType:q}=j;if(q!==2)return!1;v(H);const se=H.currentPeek()===P5;return H.resetPeek(),se}function I(H,j){const{currentType:q}=j;if(q!==8)return!1;v(H);const se=H.currentPeek()===".";return H.resetPeek(),se}function O(H,j){const{currentType:q}=j;if(q!==9)return!1;v(H);const se=b(H.currentPeek());return H.resetPeek(),se}function P(H,j){const{currentType:q}=j;if(!(q===8||q===12))return!1;v(H);const se=H.currentPeek()===":";return H.resetPeek(),se}function E(H,j){const{currentType:q}=j;if(q!==10)return!1;const se=()=>{const ge=H.currentPeek();return ge==="{"?b(H.peek()):ge==="@"||ge==="%"||ge==="|"||ge===":"||ge==="."||ge===nl||!ge?!1:ge===br?(H.peek(),se()):b(ge)},ae=se();return H.resetPeek(),ae}function R(H){v(H);const j=H.currentPeek()==="|";return H.resetPeek(),j}function A(H){const j=v(H),q=H.currentPeek()==="%"&&H.peek()==="{";return H.resetPeek(),{isModulo:q,hasSpace:j.length>0}}function N(H,j=!0){const q=(ae=!1,ge="",Se=!1)=>{const $e=H.currentPeek();return $e==="{"?ge==="%"?!1:ae:$e==="@"||!$e?ge==="%"?!0:ae:$e==="%"?(H.peek(),q(ae,"%",!0)):$e==="|"?ge==="%"||Se?!0:!(ge===nl||ge===br):$e===nl?(H.peek(),q(!0,nl,Se)):$e===br?(H.peek(),q(!0,br,Se)):!0},se=q();return j&&H.resetPeek(),se}function F(H,j){const q=H.currentChar();return q===ql?ql:j(q)?(H.next(),q):null}function W(H){return F(H,q=>{const se=q.charCodeAt(0);return se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===95||se===36})}function D(H){return F(H,q=>{const se=q.charCodeAt(0);return se>=48&&se<=57})}function B(H){return F(H,q=>{const se=q.charCodeAt(0);return se>=48&&se<=57||se>=65&&se<=70||se>=97&&se<=102})}function k(H){let j="",q="";for(;j=D(H);)q+=j;return q}function L(H){y(H);const j=H.currentChar();return j!=="%"&&d(Dt.EXPECTED_TOKEN,i(),0,j),H.next(),"%"}function z(H){let j="";for(;;){const q=H.currentChar();if(q==="{"||q==="}"||q==="@"||q==="|"||!q)break;if(q==="%")if(N(H))j+=q,H.next();else break;else if(q===nl||q===br)if(N(H))j+=q,H.next();else{if(R(H))break;j+=q,H.next()}else j+=q,H.next()}return j}function K(H){y(H);let j="",q="";for(;j=W(H);)q+=j;return H.currentChar()===ql&&d(Dt.UNTERMINATED_CLOSING_BRACE,i(),0),q}function G(H){y(H);let j="";return H.currentChar()==="-"?(H.next(),j+=`-${k(H)}`):j+=k(H),H.currentChar()===ql&&d(Dt.UNTERMINATED_CLOSING_BRACE,i(),0),j}function Y(H){y(H),m(H,"'");let j="",q="";const se=ge=>ge!==P5&&ge!==br;for(;j=F(H,se);)j==="\\"?q+=ne(H):q+=j;const ae=H.currentChar();return ae===br||ae===ql?(d(Dt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),ae===br&&(H.next(),m(H,"'")),q):(m(H,"'"),q)}function ne(H){const j=H.currentChar();switch(j){case"\\":case"'":return H.next(),`\\${j}`;case"u":return re(H,j,4);case"U":return re(H,j,6);default:return d(Dt.UNKNOWN_ESCAPE_SEQUENCE,i(),0,j),""}}function re(H,j,q){m(H,j);let se="";for(let ae=0;aeae!=="{"&&ae!=="}"&&ae!==nl&&ae!==br;for(;j=F(H,se);)q+=j;return q}function te(H){let j="",q="";for(;j=W(H);)q+=j;return q}function ee(H){const j=(q=!1,se)=>{const ae=H.currentChar();return ae==="{"||ae==="%"||ae==="@"||ae==="|"||ae==="("||ae===")"||!ae||ae===nl?se:ae===br||ae===uDe?(se+=ae,H.next(),j(q,se)):(se+=ae,H.next(),j(!0,se))};return j(!1,"")}function fe(H){y(H);const j=m(H,"|");return y(H),j}function ie(H,j){let q=null;switch(H.currentChar()){case"{":return j.braceNest>=1&&d(Dt.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),H.next(),q=f(j,2,"{"),y(H),j.braceNest++,q;case"}":return j.braceNest>0&&j.currentType===2&&d(Dt.EMPTY_PLACEHOLDER,i(),0),H.next(),q=f(j,3,"}"),j.braceNest--,j.braceNest>0&&y(H),j.inLinked&&j.braceNest===0&&(j.inLinked=!1),q;case"@":return j.braceNest>0&&d(Dt.UNTERMINATED_CLOSING_BRACE,i(),0),q=X(H,j)||h(j),j.braceNest=0,q;default:let ae=!0,ge=!0,Se=!0;if(R(H))return j.braceNest>0&&d(Dt.UNTERMINATED_CLOSING_BRACE,i(),0),q=f(j,1,fe(H)),j.braceNest=0,j.inLinked=!1,q;if(j.braceNest>0&&(j.currentType===5||j.currentType===6||j.currentType===7))return d(Dt.UNTERMINATED_CLOSING_BRACE,i(),0),j.braceNest=0,ue(H,j);if(ae=x(H,j))return q=f(j,5,K(H)),y(H),q;if(ge=_(H,j))return q=f(j,6,G(H)),y(H),q;if(Se=w(H,j))return q=f(j,7,Y(H)),y(H),q;if(!ae&&!ge&&!Se)return q=f(j,13,J(H)),d(Dt.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,q.value),y(H),q;break}return q}function X(H,j){const{currentType:q}=j;let se=null;const ae=H.currentChar();switch((q===8||q===9||q===12||q===10)&&(ae===br||ae===nl)&&d(Dt.INVALID_LINKED_FORMAT,i(),0),ae){case"@":return H.next(),se=f(j,8,"@"),j.inLinked=!0,se;case".":return y(H),H.next(),f(j,9,".");case":":return y(H),H.next(),f(j,10,":");default:return R(H)?(se=f(j,1,fe(H)),j.braceNest=0,j.inLinked=!1,se):I(H,j)||P(H,j)?(y(H),X(H,j)):O(H,j)?(y(H),f(j,12,te(H))):E(H,j)?(y(H),ae==="{"?ie(H,j)||se:f(j,11,ee(H))):(q===8&&d(Dt.INVALID_LINKED_FORMAT,i(),0),j.braceNest=0,j.inLinked=!1,ue(H,j))}}function ue(H,j){let q={type:14};if(j.braceNest>0)return ie(H,j)||h(j);if(j.inLinked)return X(H,j)||h(j);switch(H.currentChar()){case"{":return ie(H,j)||h(j);case"}":return d(Dt.UNBALANCED_CLOSING_BRACE,i(),0),H.next(),f(j,3,"}");case"@":return X(H,j)||h(j);default:if(R(H))return q=f(j,1,fe(H)),j.braceNest=0,j.inLinked=!1,q;const{isModulo:ae,hasSpace:ge}=A(H);if(ae)return ge?f(j,0,z(H)):f(j,4,L(H));if(N(H))return f(j,0,z(H));break}return q}function ye(){const{currentType:H,offset:j,startLoc:q,endLoc:se}=s;return s.lastType=H,s.lastOffset=j,s.lastStartLoc=q,s.lastEndLoc=se,s.offset=r(),s.startLoc=i(),o.currentChar()===ql?f(s,14):ue(o,s)}return{nextToken:ye,currentOffset:r,currentPosition:i,context:c}}const pDe="parser",hDe=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function gDe(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function vDe(e={}){const t=e.location!==!1,{onError:n}=e;function o(b,$,x,_,...w){const I=b.currentPosition();if(I.offset+=_,I.column+=_,n){const O=t?Tw(x,I):null,P=gf($,O,{domain:pDe,args:w});n(P)}}function r(b,$,x){const _={type:b};return t&&(_.start=$,_.end=$,_.loc={start:x,end:x}),_}function i(b,$,x,_){_&&(b.type=_),t&&(b.end=$,b.loc&&(b.loc.end=x))}function a(b,$){const x=b.context(),_=r(3,x.offset,x.startLoc);return _.value=$,i(_,b.currentOffset(),b.currentPosition()),_}function l(b,$){const x=b.context(),{lastOffset:_,lastStartLoc:w}=x,I=r(5,_,w);return I.index=parseInt($,10),b.nextToken(),i(I,b.currentOffset(),b.currentPosition()),I}function s(b,$){const x=b.context(),{lastOffset:_,lastStartLoc:w}=x,I=r(4,_,w);return I.key=$,b.nextToken(),i(I,b.currentOffset(),b.currentPosition()),I}function c(b,$){const x=b.context(),{lastOffset:_,lastStartLoc:w}=x,I=r(9,_,w);return I.value=$.replace(hDe,gDe),b.nextToken(),i(I,b.currentOffset(),b.currentPosition()),I}function u(b){const $=b.nextToken(),x=b.context(),{lastOffset:_,lastStartLoc:w}=x,I=r(8,_,w);return $.type!==12?(o(b,Dt.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),I.value="",i(I,_,w),{nextConsumeToken:$,node:I}):($.value==null&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Sa($)),I.value=$.value||"",i(I,b.currentOffset(),b.currentPosition()),{node:I})}function d(b,$){const x=b.context(),_=r(7,x.offset,x.startLoc);return _.value=$,i(_,b.currentOffset(),b.currentPosition()),_}function f(b){const $=b.context(),x=r(6,$.offset,$.startLoc);let _=b.nextToken();if(_.type===9){const w=u(b);x.modifier=w.node,_=w.nextConsumeToken||b.nextToken()}switch(_.type!==10&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Sa(_)),_=b.nextToken(),_.type===2&&(_=b.nextToken()),_.type){case 11:_.value==null&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Sa(_)),x.key=d(b,_.value||"");break;case 5:_.value==null&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Sa(_)),x.key=s(b,_.value||"");break;case 6:_.value==null&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Sa(_)),x.key=l(b,_.value||"");break;case 7:_.value==null&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Sa(_)),x.key=c(b,_.value||"");break;default:o(b,Dt.UNEXPECTED_EMPTY_LINKED_KEY,$.lastStartLoc,0);const w=b.context(),I=r(7,w.offset,w.startLoc);return I.value="",i(I,w.offset,w.startLoc),x.key=I,i(x,w.offset,w.startLoc),{nextConsumeToken:_,node:x}}return i(x,b.currentOffset(),b.currentPosition()),{node:x}}function h(b){const $=b.context(),x=$.currentType===1?b.currentOffset():$.offset,_=$.currentType===1?$.endLoc:$.startLoc,w=r(2,x,_);w.items=[];let I=null;do{const E=I||b.nextToken();switch(I=null,E.type){case 0:E.value==null&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Sa(E)),w.items.push(a(b,E.value||""));break;case 6:E.value==null&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Sa(E)),w.items.push(l(b,E.value||""));break;case 5:E.value==null&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Sa(E)),w.items.push(s(b,E.value||""));break;case 7:E.value==null&&o(b,Dt.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,Sa(E)),w.items.push(c(b,E.value||""));break;case 8:const R=f(b);w.items.push(R.node),I=R.nextConsumeToken||null;break}}while($.currentType!==14&&$.currentType!==1);const O=$.currentType===1?$.lastOffset:b.currentOffset(),P=$.currentType===1?$.lastEndLoc:b.currentPosition();return i(w,O,P),w}function m(b,$,x,_){const w=b.context();let I=_.items.length===0;const O=r(1,$,x);O.cases=[],O.cases.push(_);do{const P=h(b);I||(I=P.items.length===0),O.cases.push(P)}while(w.currentType!==14);return I&&o(b,Dt.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),i(O,b.currentOffset(),b.currentPosition()),O}function v(b){const $=b.context(),{offset:x,startLoc:_}=$,w=h(b);return $.currentType===14?w:m(b,x,_,w)}function y(b){const $=fDe(b,cW({},e)),x=$.context(),_=r(0,x.offset,x.startLoc);return t&&_.loc&&(_.loc.source=b),_.body=v($),e.onCacheKey&&(_.cacheKey=e.onCacheKey(b)),x.currentType!==14&&o($,Dt.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,b[x.offset]||""),i(_,$.currentOffset(),$.currentPosition()),_}return{parse:y}}function Sa(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function mDe(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function T5(e,t){for(let n=0;nE5(n)),e}function E5(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nl;function c(y,b){l.code+=y}function u(y,b=!0){const $=b?r:"";c(i?$+" ".repeat(y):$)}function d(y=!0){const b=++l.indentLevel;y&&u(b)}function f(y=!0){const b=--l.indentLevel;y&&u(b)}function h(){u(l.indentLevel)}return{context:s,push:c,indent:d,deindent:f,newline:h,helper:y=>`_${y}`,needIndent:()=>l.needIndent}}function xDe(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Fd(e,t.key),t.modifier?(e.push(", "),Fd(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function wDe(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const r=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const r=t.cases.length;for(let i=0;i{const n=I5(t.mode)?t.mode:"normal",o=I5(t.filename)?t.filename:"message.intl",r=!!t.sourceMap,i=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` +`,a=t.needIndent?t.needIndent:n!=="arrow",l=e.helpers||[],s=$De(e,{mode:n,filename:o,sourceMap:r,breakLineCode:i,needIndent:a});s.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(a),l.length>0&&(s.push(`const { ${uW(l.map(d=>`${d}: _${d}`),", ")} } = ctx`),s.newline()),s.push("return "),Fd(s,e),s.deindent(a),s.push("}"),delete e.helpers;const{code:c,map:u}=s.context();return{ast:e,code:c,map:u?u.toJSON():void 0}};function PDe(e,t={}){const n=cW({},t),o=!!n.jit,r=!!n.minify,i=n.optimize==null?!0:n.optimize,l=vDe(n).parse(e);return o?(i&&yDe(l),r&&Yu(l),{ast:l,code:""}):(bDe(l,n),IDe(l,n))}/*! + * core-base v9.9.1 + * (c) 2024 kazuya kawaguchi + * Released under the MIT License. + */function TDe(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(fl().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(fl().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(fl().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}const Ls=[];Ls[0]={w:[0],i:[3,0],"[":[4],o:[7]};Ls[1]={w:[1],".":[2],"[":[4],o:[7]};Ls[2]={w:[2],i:[3,0],0:[3,0]};Ls[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Ls[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Ls[5]={"'":[4,0],o:8,l:[5,0]};Ls[6]={'"':[4,0],o:8,l:[6,0]};const EDe=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function ADe(e){return EDe.test(e)}function MDe(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function RDe(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function DDe(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:ADe(t)?MDe(t):"*"+t}function LDe(e){const t=[];let n=-1,o=0,r=0,i,a,l,s,c,u,d;const f=[];f[0]=()=>{a===void 0?a=l:a+=l},f[1]=()=>{a!==void 0&&(t.push(a),a=void 0)},f[2]=()=>{f[0](),r++},f[3]=()=>{if(r>0)r--,o=4,f[0]();else{if(r=0,a===void 0||(a=DDe(a),a===!1))return!1;f[1]()}};function h(){const m=e[n+1];if(o===5&&m==="'"||o===6&&m==='"')return n++,l="\\"+m,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&h())){if(s=RDe(i),d=Ls[o],c=d[s]||d.l||8,c===8||(o=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(l=i,u()===!1))))return;if(o===7)return t}}const A5=new Map;function NDe(e,t){return gn(e)?e[t]:null}function kDe(e,t){if(!gn(e))return null;let n=A5.get(t);if(n||(n=LDe(t),n&&A5.set(t,n)),!n)return null;const o=n.length;let r=e,i=0;for(;ie,FDe=e=>"",HDe="text",zDe=e=>e.length===0?"":Q5e(e),jDe=Z5e;function M5(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function WDe(e){const t=_o(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(_o(e.named.count)||_o(e.named.n))?_o(e.named.count)?e.named.count:_o(e.named.n)?e.named.n:t:t}function VDe(e,t){t.count||(t.count=e),t.n||(t.n=e)}function KDe(e={}){const t=e.locale,n=WDe(e),o=gn(e.pluralRules)&&at(t)&&Pn(e.pluralRules[t])?e.pluralRules[t]:M5,r=gn(e.pluralRules)&&at(t)&&Pn(e.pluralRules[t])?M5:void 0,i=b=>b[o(n,b.length,r)],a=e.list||[],l=b=>a[b],s=e.named||{};_o(e.pluralIndex)&&VDe(n,s);const c=b=>s[b];function u(b){const $=Pn(e.messages)?e.messages(b):gn(e.messages)?e.messages[b]:!1;return $||(e.parent?e.parent.message(b):FDe)}const d=b=>e.modifiers?e.modifiers[b]:BDe,f=zt(e.processor)&&Pn(e.processor.normalize)?e.processor.normalize:zDe,h=zt(e.processor)&&Pn(e.processor.interpolate)?e.processor.interpolate:jDe,m=zt(e.processor)&&at(e.processor.type)?e.processor.type:HDe,y={list:l,named:c,plural:i,linked:(b,...$)=>{const[x,_]=$;let w="text",I="";$.length===1?gn(x)?(I=x.modifier||I,w=x.type||w):at(x)&&(I=x||I):$.length===2&&(at(x)&&(I=x||I),at(_)&&(w=_||w));const O=u(b)(y),P=w==="vnode"&&Rn(O)&&I?O[0]:O;return I?d(I)(P,w):P},message:u,type:m,interpolate:h,normalize:f,values:Ko({},a,s)};return y}let Ih=null;function UDe(e){Ih=e}function GDe(e,t,n){Ih&&Ih.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const YDe=XDe("function:translate");function XDe(e){return t=>Ih&&Ih.emit(e,t)}const qDe={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,__EXTEND_POINT__:8},dW=Dt.__EXTEND_POINT__,rc=vP(dW),ta={INVALID_ARGUMENT:dW,INVALID_DATE_ARGUMENT:rc(),INVALID_ISO_DATE_ARGUMENT:rc(),NOT_SUPPORT_NON_STRING_MESSAGE:rc(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:rc(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:rc(),NOT_SUPPORT_LOCALE_TYPE:rc(),__EXTEND_POINT__:rc()};function Pa(e){return gf(e,null,void 0)}function bP(e,t){return t.locale!=null?R5(t.locale):R5(e.locale)}let a$;function R5(e){if(at(e))return e;if(Pn(e)){if(e.resolvedOnce&&a$!=null)return a$;if(e.constructor.name==="Function"){const t=e();if(q5e(t))throw Pa(ta.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return a$=t}else throw Pa(ta.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Pa(ta.NOT_SUPPORT_LOCALE_TYPE)}function ZDe(e,t,n){return[...new Set([n,...Rn(t)?t:gn(t)?Object.keys(t):at(t)?[t]:[n]])]}function fW(e,t,n){const o=at(n)?n:Hd,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let i=r.__localeChainCache.get(o);if(!i){i=[];let a=[n];for(;Rn(a);)a=D5(i,a,t);const l=Rn(t)||!zt(t)?t:t.default?t.default:null;a=at(l)?[l]:l,Rn(a)&&D5(i,a,!1),r.__localeChainCache.set(o,i)}return i}function D5(e,t,n){let o=!0;for(let r=0;r`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function tLe(){return{upper:(e,t)=>t==="text"&&at(e)?e.toUpperCase():t==="vnode"&&gn(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&at(e)?e.toLowerCase():t==="vnode"&&gn(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&at(e)?N5(e):t==="vnode"&&gn(e)&&"__v_isVNode"in e?N5(e.children):e}}let pW;function k5(e){pW=e}let hW;function nLe(e){hW=e}let gW;function oLe(e){gW=e}let vW=null;const rLe=e=>{vW=e},iLe=()=>vW;let mW=null;const B5=e=>{mW=e},aLe=()=>mW;let F5=0;function lLe(e={}){const t=Pn(e.onWarn)?e.onWarn:J5e,n=at(e.version)?e.version:eLe,o=at(e.locale)||Pn(e.locale)?e.locale:Hd,r=Pn(o)?Hd:o,i=Rn(e.fallbackLocale)||zt(e.fallbackLocale)||at(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,a=zt(e.messages)?e.messages:{[r]:{}},l=zt(e.datetimeFormats)?e.datetimeFormats:{[r]:{}},s=zt(e.numberFormats)?e.numberFormats:{[r]:{}},c=Ko({},e.modifiers||{},tLe()),u=e.pluralRules||{},d=Pn(e.missing)?e.missing:null,f=en(e.missingWarn)||ws(e.missingWarn)?e.missingWarn:!0,h=en(e.fallbackWarn)||ws(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,v=!!e.unresolving,y=Pn(e.postTranslation)?e.postTranslation:null,b=zt(e.processor)?e.processor:null,$=en(e.warnHtmlMessage)?e.warnHtmlMessage:!0,x=!!e.escapeParameter,_=Pn(e.messageCompiler)?e.messageCompiler:pW,w=Pn(e.messageResolver)?e.messageResolver:hW||NDe,I=Pn(e.localeFallbacker)?e.localeFallbacker:gW||ZDe,O=gn(e.fallbackContext)?e.fallbackContext:void 0,P=e,E=gn(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,R=gn(P.__numberFormatters)?P.__numberFormatters:new Map,A=gn(P.__meta)?P.__meta:{};F5++;const N={version:n,cid:F5,locale:o,fallbackLocale:i,messages:a,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:h,fallbackFormat:m,unresolving:v,postTranslation:y,processor:b,warnHtmlMessage:$,escapeParameter:x,messageCompiler:_,messageResolver:w,localeFallbacker:I,fallbackContext:O,onWarn:t,__meta:A};return N.datetimeFormats=l,N.numberFormats=s,N.__datetimeFormatters=E,N.__numberFormatters=R,__INTLIFY_PROD_DEVTOOLS__&&GDe(N,n,A),N}function yP(e,t,n,o,r){const{missing:i,onWarn:a}=e;if(i!==null){const l=i(e,n,t,r);return at(l)?l:t}else return t}function qf(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function l$(e){return n=>sLe(n,e)}function sLe(e,t){const n=t.b||t.body;if((n.t||n.type)===1){const o=n,r=o.c||o.cases;return e.plural(r.reduce((i,a)=>[...i,H5(e,a)],[]))}else return H5(e,n)}function H5(e,t){const n=t.s||t.static;if(n)return e.type==="text"?n:e.normalize([n]);{const o=(t.i||t.items).reduce((r,i)=>[...r,Ew(e,i)],[]);return e.normalize(o)}}function Ew(e,t){const n=t.t||t.type;switch(n){case 3:const o=t;return o.v||o.value;case 9:const r=t;return r.v||r.value;case 4:const i=t;return e.interpolate(e.named(i.k||i.key));case 5:const a=t;return e.interpolate(e.list(a.i!=null?a.i:a.index));case 6:const l=t,s=l.m||l.modifier;return e.linked(Ew(e,l.k||l.key),s?Ew(e,s):void 0,e.type);case 7:const c=t;return c.v||c.value;case 8:const u=t;return u.v||u.value;default:throw new Error(`unhandled node type on format message part: ${n}`)}}const bW=e=>e;let od=Object.create(null);const zd=e=>gn(e)&&(e.t===0||e.type===0)&&("b"in e||"body"in e);function yW(e,t={}){let n=!1;const o=t.onError||iDe;return t.onError=r=>{n=!0,o(r)},{...PDe(e,t),detectError:n}}const cLe=(e,t)=>{if(!at(e))throw Pa(ta.NOT_SUPPORT_NON_STRING_MESSAGE);{en(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||bW)(e),r=od[o];if(r)return r;const{code:i,detectError:a}=yW(e,t),l=new Function(`return ${i}`)();return a?l:od[o]=l}};function uLe(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&at(e)){en(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||bW)(e),r=od[o];if(r)return r;const{ast:i,detectError:a}=yW(e,{...t,location:!1,jit:!0}),l=l$(i);return a?l:od[o]=l}else{const n=e.cacheKey;if(n){const o=od[n];return o||(od[n]=l$(e))}else return l$(e)}}const z5=()=>"",Pi=e=>Pn(e);function j5(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:r,messageCompiler:i,fallbackLocale:a,messages:l}=e,[s,c]=Aw(...t),u=en(c.missingWarn)?c.missingWarn:e.missingWarn,d=en(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=en(c.escapeParameter)?c.escapeParameter:e.escapeParameter,h=!!c.resolvedMessage,m=at(c.default)||en(c.default)?en(c.default)?i?s:()=>s:c.default:n?i?s:()=>s:"",v=n||m!=="",y=bP(e,c);f&&dLe(c);let[b,$,x]=h?[s,y,l[y]||{}]:SW(e,s,y,a,d,u),_=b,w=s;if(!h&&!(at(_)||zd(_)||Pi(_))&&v&&(_=m,w=_),!h&&(!(at(_)||zd(_)||Pi(_))||!at($)))return r?a1:s;let I=!1;const O=()=>{I=!0},P=Pi(_)?_:CW(e,s,$,_,w,O);if(I)return _;const E=hLe(e,$,x,c),R=KDe(E),A=fLe(e,P,R),N=o?o(A,s):A;if(__INTLIFY_PROD_DEVTOOLS__){const F={timestamp:Date.now(),key:at(s)?s:Pi(_)?_.key:"",locale:$||(Pi(_)?_.locale:""),format:at(_)?_:Pi(_)?_.source:"",message:N};F.meta=Ko({},e.__meta,iLe()||{}),YDe(F)}return N}function dLe(e){Rn(e.list)?e.list=e.list.map(t=>at(t)?O5(t):t):gn(e.named)&&Object.keys(e.named).forEach(t=>{at(e.named[t])&&(e.named[t]=O5(e.named[t]))})}function SW(e,t,n,o,r,i){const{messages:a,onWarn:l,messageResolver:s,localeFallbacker:c}=e,u=c(e,o,n);let d={},f,h=null;const m="translate";for(let v=0;vo;return c.locale=n,c.key=t,c}const s=a(o,pLe(e,n,r,o,l,i));return s.locale=n,s.key=t,s.source=o,s}function fLe(e,t,n){return t(n)}function Aw(...e){const[t,n,o]=e,r={};if(!at(t)&&!_o(t)&&!Pi(t)&&!zd(t))throw Pa(ta.INVALID_ARGUMENT);const i=_o(t)?String(t):(Pi(t),t);return _o(n)?r.plural=n:at(n)?r.default=n:zt(n)&&!i1(n)?r.named=n:Rn(n)&&(r.list=n),_o(o)?r.plural=o:at(o)?r.default=o:zt(o)&&Ko(r,o),[i,r]}function pLe(e,t,n,o,r,i){return{locale:t,key:n,warnHtmlMessage:r,onError:a=>{throw i&&i(a),a},onCacheKey:a=>U5e(t,n,a)}}function hLe(e,t,n,o){const{modifiers:r,pluralRules:i,messageResolver:a,fallbackLocale:l,fallbackWarn:s,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:r,pluralRules:i,messages:h=>{let m=a(n,h);if(m==null&&u){const[,,v]=SW(u,h,t,l,s,c);m=a(v,h)}if(at(m)||zd(m)){let v=!1;const b=CW(e,h,t,m,h,()=>{v=!0});return v?z5:b}else return Pi(m)?m:z5}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),_o(o.plural)&&(f.pluralIndex=o.plural),f}function W5(e,...t){const{datetimeFormats:n,unresolving:o,fallbackLocale:r,onWarn:i,localeFallbacker:a}=e,{__datetimeFormatters:l}=e,[s,c,u,d]=Mw(...t),f=en(u.missingWarn)?u.missingWarn:e.missingWarn;en(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const h=!!u.part,m=bP(e,u),v=a(e,r,m);if(!at(s)||s==="")return new Intl.DateTimeFormat(m,d).format(c);let y={},b,$=null;const x="datetime format";for(let I=0;I{$W.includes(s)?a[s]=n[s]:i[s]=n[s]}),at(o)?i.locale=o:zt(o)&&(a=o),zt(r)&&(a=r),[i.key||"",l,i,a]}function V5(e,t,n){const o=e;for(const r in n){const i=`${t}__${r}`;o.__datetimeFormatters.has(i)&&o.__datetimeFormatters.delete(i)}}function K5(e,...t){const{numberFormats:n,unresolving:o,fallbackLocale:r,onWarn:i,localeFallbacker:a}=e,{__numberFormatters:l}=e,[s,c,u,d]=Rw(...t),f=en(u.missingWarn)?u.missingWarn:e.missingWarn;en(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const h=!!u.part,m=bP(e,u),v=a(e,r,m);if(!at(s)||s==="")return new Intl.NumberFormat(m,d).format(c);let y={},b,$=null;const x="number format";for(let I=0;I{xW.includes(s)?a[s]=n[s]:i[s]=n[s]}),at(o)?i.locale=o:zt(o)&&(a=o),zt(r)&&(a=r),[i.key||"",l,i,a]}function U5(e,t,n){const o=e;for(const r in n){const i=`${t}__${r}`;o.__numberFormatters.has(i)&&o.__numberFormatters.delete(i)}}TDe();/*! + * vue-i18n v9.9.1 + * (c) 2024 kazuya kawaguchi + * Released under the MIT License. + */const gLe="9.9.1";function vLe(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(fl().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(fl().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(fl().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(fl().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(fl().__INTLIFY_PROD_DEVTOOLS__=!1)}const wW=qDe.__EXTEND_POINT__,Zl=vP(wW);Zl(),Zl(),Zl(),Zl(),Zl(),Zl(),Zl(),Zl();const _W=ta.__EXTEND_POINT__,Mr=vP(_W),Io={UNEXPECTED_RETURN_TYPE:_W,INVALID_ARGUMENT:Mr(),MUST_BE_CALL_SETUP_TOP:Mr(),NOT_INSTALLED:Mr(),NOT_AVAILABLE_IN_LEGACY_MODE:Mr(),REQUIRED_VALUE:Mr(),INVALID_VALUE:Mr(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Mr(),NOT_INSTALLED_WITH_PROVIDE:Mr(),UNEXPECTED_ERROR:Mr(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Mr(),BRIDGE_SUPPORT_VUE_2_ONLY:Mr(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Mr(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Mr(),__EXTEND_POINT__:Mr()};function No(e,...t){return gf(e,null,void 0)}const Dw=Ds("__translateVNode"),Lw=Ds("__datetimeParts"),Nw=Ds("__numberParts"),OW=Ds("__setPluralRules"),IW=Ds("__injectWithOption"),kw=Ds("__dispose");function Ph(e){if(!gn(e))return e;for(const t in e)if(nb(e,t))if(!t.includes("."))gn(e[t])&&Ph(e[t]);else{const n=t.split("."),o=n.length-1;let r=e,i=!1;for(let a=0;a{if("locale"in l&&"resource"in l){const{locale:s,resource:c}=l;s?(a[s]=a[s]||{},Ym(c,a[s])):Ym(c,a)}else at(l)&&Ym(JSON.parse(l),a)}),r==null&&i)for(const l in a)nb(a,l)&&Ph(a[l]);return a}function PW(e){return e.type}function TW(e,t,n){let o=gn(t.messages)?t.messages:{};"__i18nGlobal"in n&&(o=l1(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const r=Object.keys(o);r.length&&r.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(gn(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(gn(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}}function G5(e){return g(_l,null,e,0)}const Y5="__INTLIFY_META__",X5=()=>[],mLe=()=>!1;let q5=0;function Z5(e){return(t,n,o,r)=>e(n,o,Nn()||void 0,r)}const bLe=()=>{const e=Nn();let t=null;return e&&(t=PW(e)[Y5])?{[Y5]:t}:null};function SP(e={},t){const{__root:n,__injectWithOption:o}=e,r=n===void 0,i=e.flatJson,a=tb?he:ve;let l=en(e.inheritLocale)?e.inheritLocale:!0;const s=a(n&&l?n.locale.value:at(e.locale)?e.locale:Hd),c=a(n&&l?n.fallbackLocale.value:at(e.fallbackLocale)||Rn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s.value),u=a(l1(s.value,e)),d=a(zt(e.datetimeFormats)?e.datetimeFormats:{[s.value]:{}}),f=a(zt(e.numberFormats)?e.numberFormats:{[s.value]:{}});let h=n?n.missingWarn:en(e.missingWarn)||ws(e.missingWarn)?e.missingWarn:!0,m=n?n.fallbackWarn:en(e.fallbackWarn)||ws(e.fallbackWarn)?e.fallbackWarn:!0,v=n?n.fallbackRoot:en(e.fallbackRoot)?e.fallbackRoot:!0,y=!!e.fallbackFormat,b=Pn(e.missing)?e.missing:null,$=Pn(e.missing)?Z5(e.missing):null,x=Pn(e.postTranslation)?e.postTranslation:null,_=n?n.warnHtmlMessage:en(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const I=n?n.modifiers:zt(e.modifiers)?e.modifiers:{};let O=e.pluralRules||n&&n.pluralRules,P;P=(()=>{r&&B5(null);const oe={version:gLe,locale:s.value,fallbackLocale:c.value,messages:u.value,modifiers:I,pluralRules:O,missing:$===null?void 0:$,missingWarn:h,fallbackWarn:m,fallbackFormat:y,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:_,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};oe.datetimeFormats=d.value,oe.numberFormats=f.value,oe.__datetimeFormatters=zt(P)?P.__datetimeFormatters:void 0,oe.__numberFormatters=zt(P)?P.__numberFormatters:void 0;const le=lLe(oe);return r&&B5(le),le})(),qf(P,s.value,c.value);function R(){return[s.value,c.value,u.value,d.value,f.value]}const A=M({get:()=>s.value,set:oe=>{s.value=oe,P.locale=s.value}}),N=M({get:()=>c.value,set:oe=>{c.value=oe,P.fallbackLocale=c.value,qf(P,s.value,oe)}}),F=M(()=>u.value),W=M(()=>d.value),D=M(()=>f.value);function B(){return Pn(x)?x:null}function k(oe){x=oe,P.postTranslation=oe}function L(){return b}function z(oe){oe!==null&&($=Z5(oe)),b=oe,P.missing=$}const K=(oe,le,xe,Ae,Be,Ye)=>{R();let Re;try{__INTLIFY_PROD_DEVTOOLS__,r||(P.fallbackContext=n?aLe():void 0),Re=oe(P)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(P.fallbackContext=void 0)}if(xe!=="translate exists"&&_o(Re)&&Re===a1||xe==="translate exists"&&!Re){const[Le,Ne]=le();return n&&v?Ae(n):Be(Le)}else{if(Ye(Re))return Re;throw No(Io.UNEXPECTED_RETURN_TYPE)}};function G(...oe){return K(le=>Reflect.apply(j5,null,[le,...oe]),()=>Aw(...oe),"translate",le=>Reflect.apply(le.t,le,[...oe]),le=>le,le=>at(le))}function Y(...oe){const[le,xe,Ae]=oe;if(Ae&&!gn(Ae))throw No(Io.INVALID_ARGUMENT);return G(le,xe,Ko({resolvedMessage:!0},Ae||{}))}function ne(...oe){return K(le=>Reflect.apply(W5,null,[le,...oe]),()=>Mw(...oe),"datetime format",le=>Reflect.apply(le.d,le,[...oe]),()=>L5,le=>at(le))}function re(...oe){return K(le=>Reflect.apply(K5,null,[le,...oe]),()=>Rw(...oe),"number format",le=>Reflect.apply(le.n,le,[...oe]),()=>L5,le=>at(le))}function J(oe){return oe.map(le=>at(le)||_o(le)||en(le)?G5(String(le)):le)}const ee={normalize:J,interpolate:oe=>oe,type:"vnode"};function fe(...oe){return K(le=>{let xe;const Ae=le;try{Ae.processor=ee,xe=Reflect.apply(j5,null,[Ae,...oe])}finally{Ae.processor=null}return xe},()=>Aw(...oe),"translate",le=>le[Dw](...oe),le=>[G5(le)],le=>Rn(le))}function ie(...oe){return K(le=>Reflect.apply(K5,null,[le,...oe]),()=>Rw(...oe),"number format",le=>le[Nw](...oe),X5,le=>at(le)||Rn(le))}function X(...oe){return K(le=>Reflect.apply(W5,null,[le,...oe]),()=>Mw(...oe),"datetime format",le=>le[Lw](...oe),X5,le=>at(le)||Rn(le))}function ue(oe){O=oe,P.pluralRules=O}function ye(oe,le){return K(()=>{if(!oe)return!1;const xe=at(le)?le:s.value,Ae=q(xe),Be=P.messageResolver(Ae,oe);return zd(Be)||Pi(Be)||at(Be)},()=>[oe],"translate exists",xe=>Reflect.apply(xe.te,xe,[oe,le]),mLe,xe=>en(xe))}function H(oe){let le=null;const xe=fW(P,c.value,s.value);for(let Ae=0;Ae{l&&(s.value=oe,P.locale=oe,qf(P,s.value,c.value))}),Ie(n.fallbackLocale,oe=>{l&&(c.value=oe,P.fallbackLocale=oe,qf(P,s.value,c.value))}));const Pe={id:q5,locale:A,fallbackLocale:N,get inheritLocale(){return l},set inheritLocale(oe){l=oe,oe&&n&&(s.value=n.locale.value,c.value=n.fallbackLocale.value,qf(P,s.value,c.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:F,get modifiers(){return I},get pluralRules(){return O||{}},get isGlobal(){return r},get missingWarn(){return h},set missingWarn(oe){h=oe,P.missingWarn=h},get fallbackWarn(){return m},set fallbackWarn(oe){m=oe,P.fallbackWarn=m},get fallbackRoot(){return v},set fallbackRoot(oe){v=oe},get fallbackFormat(){return y},set fallbackFormat(oe){y=oe,P.fallbackFormat=y},get warnHtmlMessage(){return _},set warnHtmlMessage(oe){_=oe,P.warnHtmlMessage=oe},get escapeParameter(){return w},set escapeParameter(oe){w=oe,P.escapeParameter=oe},t:G,getLocaleMessage:q,setLocaleMessage:se,mergeLocaleMessage:ae,getPostTranslationHandler:B,setPostTranslationHandler:k,getMissingHandler:L,setMissingHandler:z,[OW]:ue};return Pe.datetimeFormats=W,Pe.numberFormats=D,Pe.rt=Y,Pe.te=ye,Pe.tm=j,Pe.d=ne,Pe.n=re,Pe.getDateTimeFormat=ge,Pe.setDateTimeFormat=Se,Pe.mergeDateTimeFormat=$e,Pe.getNumberFormat=_e,Pe.setNumberFormat=be,Pe.mergeNumberFormat=Te,Pe[IW]=o,Pe[Dw]=fe,Pe[Lw]=X,Pe[Nw]=ie,Pe}function yLe(e){const t=at(e.locale)?e.locale:Hd,n=at(e.fallbackLocale)||Rn(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Pn(e.missing)?e.missing:void 0,r=en(e.silentTranslationWarn)||ws(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=en(e.silentFallbackWarn)||ws(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,a=en(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,s=zt(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=Pn(e.postTranslation)?e.postTranslation:void 0,d=at(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,h=en(e.sync)?e.sync:!0;let m=e.messages;if(zt(e.sharedMessages)){const w=e.sharedMessages;m=Object.keys(w).reduce((O,P)=>{const E=O[P]||(O[P]={});return Ko(E,w[P]),O},m||{})}const{__i18n:v,__root:y,__injectWithOption:b}=e,$=e.datetimeFormats,x=e.numberFormats,_=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:_,datetimeFormats:$,numberFormats:x,missing:o,missingWarn:r,fallbackWarn:i,fallbackRoot:a,fallbackFormat:l,modifiers:s,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:h,__i18n:v,__root:y,__injectWithOption:b}}function Bw(e={},t){{const n=SP(yLe(e)),{__extender:o}=e,r={id:n.id,get locale(){return n.locale.value},set locale(i){n.locale.value=i},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(i){n.fallbackLocale.value=i},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(i){},get missing(){return n.getMissingHandler()},set missing(i){n.setMissingHandler(i)},get silentTranslationWarn(){return en(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(i){n.missingWarn=en(i)?!i:i},get silentFallbackWarn(){return en(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(i){n.fallbackWarn=en(i)?!i:i},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(i){n.fallbackFormat=i},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(i){n.setPostTranslationHandler(i)},get sync(){return n.inheritLocale},set sync(i){n.inheritLocale=i},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){n.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(i){n.escapeParameter=i},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(i){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...i){const[a,l,s]=i,c={};let u=null,d=null;if(!at(a))throw No(Io.INVALID_ARGUMENT);const f=a;return at(l)?c.locale=l:Rn(l)?u=l:zt(l)&&(d=l),Rn(s)?u=s:zt(s)&&(d=s),Reflect.apply(n.t,n,[f,u||d||{},c])},rt(...i){return Reflect.apply(n.rt,n,[...i])},tc(...i){const[a,l,s]=i,c={plural:1};let u=null,d=null;if(!at(a))throw No(Io.INVALID_ARGUMENT);const f=a;return at(l)?c.locale=l:_o(l)?c.plural=l:Rn(l)?u=l:zt(l)&&(d=l),at(s)?c.locale=s:Rn(s)?u=s:zt(s)&&(d=s),Reflect.apply(n.t,n,[f,u||d||{},c])},te(i,a){return n.te(i,a)},tm(i){return n.tm(i)},getLocaleMessage(i){return n.getLocaleMessage(i)},setLocaleMessage(i,a){n.setLocaleMessage(i,a)},mergeLocaleMessage(i,a){n.mergeLocaleMessage(i,a)},d(...i){return Reflect.apply(n.d,n,[...i])},getDateTimeFormat(i){return n.getDateTimeFormat(i)},setDateTimeFormat(i,a){n.setDateTimeFormat(i,a)},mergeDateTimeFormat(i,a){n.mergeDateTimeFormat(i,a)},n(...i){return Reflect.apply(n.n,n,[...i])},getNumberFormat(i){return n.getNumberFormat(i)},setNumberFormat(i,a){n.setNumberFormat(i,a)},mergeNumberFormat(i,a){n.mergeNumberFormat(i,a)},getChoiceIndex(i,a){return-1}};return r.__extender=o,r}}const CP={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function SLe({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,r)=>[...o,...r.type===Je?r.children:[r]],[]):t.reduce((n,o)=>{const r=e[o];return r&&(n[o]=r()),n},{})}function EW(e){return Je}const CLe=pe({name:"i18n-t",props:Ko({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>_o(e)||!isNaN(e)}},CP),setup(e,t){const{slots:n,attrs:o}=t,r=e.i18n||$P({useScope:e.scope,__useComponent:!0});return()=>{const i=Object.keys(n).filter(d=>d!=="_"),a={};e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=at(e.plural)?+e.plural:e.plural);const l=SLe(t,i),s=r[Dw](e.keypath,l,a),c=Ko({},o),u=at(e.tag)||gn(e.tag)?e.tag:EW();return Ni(u,c,s)}}}),Q5=CLe;function $Le(e){return Rn(e)&&!at(e[0])}function AW(e,t,n,o){const{slots:r,attrs:i}=t;return()=>{const a={part:!0};let l={};e.locale&&(a.locale=e.locale),at(e.format)?a.key=e.format:gn(e.format)&&(at(e.format.key)&&(a.key=e.format.key),l=Object.keys(e.format).reduce((f,h)=>n.includes(h)?Ko({},f,{[h]:e.format[h]}):f,{}));const s=o(e.value,a,l);let c=[a.key];Rn(s)?c=s.map((f,h)=>{const m=r[f.type],v=m?m({[f.type]:f.value,index:h,parts:s}):[f.value];return $Le(v)&&(v[0].key=`${f.type}-${h}`),v}):at(s)&&(c=[s]);const u=Ko({},i),d=at(e.tag)||gn(e.tag)?e.tag:EW();return Ni(d,u,c)}}const xLe=pe({name:"i18n-n",props:Ko({value:{type:Number,required:!0},format:{type:[String,Object]}},CP),setup(e,t){const n=e.i18n||$P({useScope:"parent",__useComponent:!0});return AW(e,t,xW,(...o)=>n[Nw](...o))}}),J5=xLe,wLe=pe({name:"i18n-d",props:Ko({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},CP),setup(e,t){const n=e.i18n||$P({useScope:"parent",__useComponent:!0});return AW(e,t,$W,(...o)=>n[Lw](...o))}}),eD=wLe;function _Le(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function OLe(e){const t=a=>{const{instance:l,modifiers:s,value:c}=a;if(!l||!l.$)throw No(Io.UNEXPECTED_ERROR);const u=_Le(e,l.$),d=tD(c);return[Reflect.apply(u.t,u,[...nD(d)]),u]};return{created:(a,l)=>{const[s,c]=t(l);tb&&e.global===c&&(a.__i18nWatcher=Ie(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=s},unmounted:a=>{tb&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const s=a.__composer,c=tD(l);a.textContent=Reflect.apply(s.t,s,[...nD(c)])}},getSSRProps:a=>{const[l]=t(a);return{textContent:l}}}}function tD(e){if(at(e))return{path:e};if(zt(e)){if(!("path"in e))throw No(Io.REQUIRED_VALUE,"path");return e}else throw No(Io.INVALID_VALUE)}function nD(e){const{path:t,locale:n,args:o,choice:r,plural:i}=e,a={},l=o||{};return at(n)&&(a.locale=n),_o(r)&&(a.plural=r),_o(i)&&(a.plural=i),[t,l,a]}function ILe(e,t,...n){const o=zt(n[0])?n[0]:{},r=!!o.useI18nComponentName;(en(o.globalInstall)?o.globalInstall:!0)&&([r?"i18n":Q5.name,"I18nT"].forEach(a=>e.component(a,Q5)),[J5.name,"I18nN"].forEach(a=>e.component(a,J5)),[eD.name,"I18nD"].forEach(a=>e.component(a,eD))),e.directive("t",OLe(t))}function PLe(e,t,n){return{beforeCreate(){const o=Nn();if(!o)throw No(Io.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const i=r.i18n;if(r.__i18n&&(i.__i18n=r.__i18n),i.__root=t,this===this.$root)this.$i18n=oD(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=Bw(i);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=oD(e,r);else{this.$i18n=Bw({__i18n:r.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;r.__i18nGlobal&&TW(t,r,r),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$tc=(...i)=>this.$i18n.tc(...i),this.$te=(i,a)=>this.$i18n.te(i,a),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=Nn();if(!o)throw No(Io.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),n.__deleteInstance(o),delete this.$i18n}}}function oD(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[OW](t.pluralizationRules||e.pluralizationRules);const n=l1(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const TLe=Ds("global-vue-i18n");function ELe(e={},t){const n=__VUE_I18N_LEGACY_API__&&en(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=en(e.globalInjection)?e.globalInjection:!0,r=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,i=new Map,[a,l]=ALe(e,n),s=Ds("");function c(f){return i.get(f)||null}function u(f,h){i.set(f,h)}function d(f){i.delete(f)}{const f={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return r},async install(h,...m){if(h.__VUE_I18N_SYMBOL__=s,h.provide(h.__VUE_I18N_SYMBOL__,f),zt(m[0])){const b=m[0];f.__composerExtend=b.__composerExtend,f.__vueI18nExtend=b.__vueI18nExtend}let v=null;!n&&o&&(v=HLe(h,f.global)),__VUE_I18N_FULL_INSTALL__&&ILe(h,f,...m),__VUE_I18N_LEGACY_API__&&n&&h.mixin(PLe(l,l.__composer,f));const y=h.unmount;h.unmount=()=>{v&&v(),f.dispose(),y()}},get global(){return l},dispose(){a.stop()},__instances:i,__getInstance:c,__setInstance:u,__deleteInstance:d};return f}}function $P(e={}){const t=Nn();if(t==null)throw No(Io.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw No(Io.NOT_INSTALLED);const n=MLe(t),o=DLe(n),r=PW(t),i=RLe(e,r);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw No(Io.NOT_AVAILABLE_IN_LEGACY_MODE);return BLe(t,i,o,e)}if(i==="global")return TW(o,e,r),o;if(i==="parent"){let s=LLe(n,t,e.__useComponent);return s==null&&(s=o),s}const a=n;let l=a.__getInstance(t);if(l==null){const s=Ko({},e);"__i18n"in r&&(s.__i18n=r.__i18n),o&&(s.__root=o),l=SP(s),a.__composerExtend&&(l[kw]=a.__composerExtend(l)),kLe(a,t,l),a.__setInstance(t,l)}return l}function ALe(e,t,n){const o=o2();{const r=__VUE_I18N_LEGACY_API__&&t?o.run(()=>Bw(e)):o.run(()=>SP(e));if(r==null)throw No(Io.UNEXPECTED_ERROR);return[o,r]}}function MLe(e){{const t=it(e.isCE?TLe:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw No(e.isCE?Io.NOT_INSTALLED_WITH_PROVIDE:Io.UNEXPECTED_ERROR);return t}}function RLe(e,t){return i1(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function DLe(e){return e.mode==="composition"?e.global:e.global.__composer}function LLe(e,t,n=!1){let o=null;const r=t.root;let i=NLe(t,n);for(;i!=null;){const a=e;if(e.mode==="composition")o=a.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const l=a.__getInstance(i);l!=null&&(o=l.__composer,n&&o&&!o[IW]&&(o=null))}if(o!=null||r===i)break;i=i.parent}return o}function NLe(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function kLe(e,t,n){lt(()=>{},t),Fo(()=>{const o=n;e.__deleteInstance(t);const r=o[kw];r&&(r(),delete o[kw])},t)}function BLe(e,t,n,o={}){const r=t==="local",i=ve(null);if(r&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw No(Io.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const a=en(o.inheritLocale)?o.inheritLocale:!at(o.locale),l=he(!r||a?n.locale.value:at(o.locale)?o.locale:Hd),s=he(!r||a?n.fallbackLocale.value:at(o.fallbackLocale)||Rn(o.fallbackLocale)||zt(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:l.value),c=he(l1(l.value,o)),u=he(zt(o.datetimeFormats)?o.datetimeFormats:{[l.value]:{}}),d=he(zt(o.numberFormats)?o.numberFormats:{[l.value]:{}}),f=r?n.missingWarn:en(o.missingWarn)||ws(o.missingWarn)?o.missingWarn:!0,h=r?n.fallbackWarn:en(o.fallbackWarn)||ws(o.fallbackWarn)?o.fallbackWarn:!0,m=r?n.fallbackRoot:en(o.fallbackRoot)?o.fallbackRoot:!0,v=!!o.fallbackFormat,y=Pn(o.missing)?o.missing:null,b=Pn(o.postTranslation)?o.postTranslation:null,$=r?n.warnHtmlMessage:en(o.warnHtmlMessage)?o.warnHtmlMessage:!0,x=!!o.escapeParameter,_=r?n.modifiers:zt(o.modifiers)?o.modifiers:{},w=o.pluralRules||r&&n.pluralRules;function I(){return[l.value,s.value,c.value,u.value,d.value]}const O=M({get:()=>i.value?i.value.locale.value:l.value,set:j=>{i.value&&(i.value.locale.value=j),l.value=j}}),P=M({get:()=>i.value?i.value.fallbackLocale.value:s.value,set:j=>{i.value&&(i.value.fallbackLocale.value=j),s.value=j}}),E=M(()=>i.value?i.value.messages.value:c.value),R=M(()=>u.value),A=M(()=>d.value);function N(){return i.value?i.value.getPostTranslationHandler():b}function F(j){i.value&&i.value.setPostTranslationHandler(j)}function W(){return i.value?i.value.getMissingHandler():y}function D(j){i.value&&i.value.setMissingHandler(j)}function B(j){return I(),j()}function k(...j){return i.value?B(()=>Reflect.apply(i.value.t,null,[...j])):B(()=>"")}function L(...j){return i.value?Reflect.apply(i.value.rt,null,[...j]):""}function z(...j){return i.value?B(()=>Reflect.apply(i.value.d,null,[...j])):B(()=>"")}function K(...j){return i.value?B(()=>Reflect.apply(i.value.n,null,[...j])):B(()=>"")}function G(j){return i.value?i.value.tm(j):{}}function Y(j,q){return i.value?i.value.te(j,q):!1}function ne(j){return i.value?i.value.getLocaleMessage(j):{}}function re(j,q){i.value&&(i.value.setLocaleMessage(j,q),c.value[j]=q)}function J(j,q){i.value&&i.value.mergeLocaleMessage(j,q)}function te(j){return i.value?i.value.getDateTimeFormat(j):{}}function ee(j,q){i.value&&(i.value.setDateTimeFormat(j,q),u.value[j]=q)}function fe(j,q){i.value&&i.value.mergeDateTimeFormat(j,q)}function ie(j){return i.value?i.value.getNumberFormat(j):{}}function X(j,q){i.value&&(i.value.setNumberFormat(j,q),d.value[j]=q)}function ue(j,q){i.value&&i.value.mergeNumberFormat(j,q)}const ye={get id(){return i.value?i.value.id:-1},locale:O,fallbackLocale:P,messages:E,datetimeFormats:R,numberFormats:A,get inheritLocale(){return i.value?i.value.inheritLocale:a},set inheritLocale(j){i.value&&(i.value.inheritLocale=j)},get availableLocales(){return i.value?i.value.availableLocales:Object.keys(c.value)},get modifiers(){return i.value?i.value.modifiers:_},get pluralRules(){return i.value?i.value.pluralRules:w},get isGlobal(){return i.value?i.value.isGlobal:!1},get missingWarn(){return i.value?i.value.missingWarn:f},set missingWarn(j){i.value&&(i.value.missingWarn=j)},get fallbackWarn(){return i.value?i.value.fallbackWarn:h},set fallbackWarn(j){i.value&&(i.value.missingWarn=j)},get fallbackRoot(){return i.value?i.value.fallbackRoot:m},set fallbackRoot(j){i.value&&(i.value.fallbackRoot=j)},get fallbackFormat(){return i.value?i.value.fallbackFormat:v},set fallbackFormat(j){i.value&&(i.value.fallbackFormat=j)},get warnHtmlMessage(){return i.value?i.value.warnHtmlMessage:$},set warnHtmlMessage(j){i.value&&(i.value.warnHtmlMessage=j)},get escapeParameter(){return i.value?i.value.escapeParameter:x},set escapeParameter(j){i.value&&(i.value.escapeParameter=j)},t:k,getPostTranslationHandler:N,setPostTranslationHandler:F,getMissingHandler:W,setMissingHandler:D,rt:L,d:z,n:K,tm:G,te:Y,getLocaleMessage:ne,setLocaleMessage:re,mergeLocaleMessage:J,getDateTimeFormat:te,setDateTimeFormat:ee,mergeDateTimeFormat:fe,getNumberFormat:ie,setNumberFormat:X,mergeNumberFormat:ue};function H(j){j.locale.value=l.value,j.fallbackLocale.value=s.value,Object.keys(c.value).forEach(q=>{j.mergeLocaleMessage(q,c.value[q])}),Object.keys(u.value).forEach(q=>{j.mergeDateTimeFormat(q,u.value[q])}),Object.keys(d.value).forEach(q=>{j.mergeNumberFormat(q,d.value[q])}),j.escapeParameter=x,j.fallbackFormat=v,j.fallbackRoot=m,j.fallbackWarn=h,j.missingWarn=f,j.warnHtmlMessage=$}return Dh(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw No(Io.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const j=i.value=e.proxy.$i18n.__composer;t==="global"?(l.value=j.locale.value,s.value=j.fallbackLocale.value,c.value=j.messages.value,u.value=j.datetimeFormats.value,d.value=j.numberFormats.value):r&&H(j)}),ye}const FLe=["locale","fallbackLocale","availableLocales"],rD=["t","rt","d","n","tm","te"];function HLe(e,t){const n=Object.create(null);return FLe.forEach(r=>{const i=Object.getOwnPropertyDescriptor(t,r);if(!i)throw No(Io.UNEXPECTED_ERROR);const a=Wn(i.value)?{get(){return i.value.value},set(l){i.value.value=l}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,r,a)}),e.config.globalProperties.$i18n=n,rD.forEach(r=>{const i=Object.getOwnPropertyDescriptor(t,r);if(!i||!i.value)throw No(Io.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,i)}),()=>{delete e.config.globalProperties.$i18n,rD.forEach(r=>{delete e.config.globalProperties[`$${r}`]})}}vLe();__INTLIFY_JIT_COMPILATION__?k5(uLe):k5(cLe);nLe(kDe);oLe(fW);if(__INTLIFY_PROD_DEVTOOLS__){const e=fl();e.__INTLIFY__=!0,UDe(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const zLe={destinationRuleDomain:{YAMLView:"YAML视图",formView:"表单视图"},virtualServiceDomain:{YAMLView:"YAML视图",formView:"表单视图"},loginDomain:{username:"用户名",password:"密码",login:"登录",authFail:"认证失败"},dynamicConfigDomain:{addConfig:"增加配置",addByFormView:"新增动态配置",updateByFormView:"修改动态配置",detailByFormView:"查看动态配置",addMatches:"增加匹配条件",matchType:"匹配条件类型",configType:"配置项类型",notSaved:"*改动未保存",saved:"配置无改动",YAMLView:"YAML视图",formView:"表单视图",event:"事件",save:"保存",reset:"重置"},routingRuleDomain:{YAMLView:"YAML视图",formView:"表单视图"},updateRoutingRuleDomain:{YAMLView:"YAML视图",formView:"表单视图"},addRoutingRuleDomain:{YAMLView:"YAML视图",formView:"表单视图"},tagRuleDomain:{YAMLView:"YAML视图",formView:"表单视图"},updateTagRuleDomain:{YAMLView:"YAML视图",formView:"表单视图"},addTagRuleDomain:{YAMLView:"YAML视图",formView:"表单视图"},flowControlDomain:{notSet:"未设置",versionRecords:"版本记录",YAMLView:"YAML视图",addConfiguration:"增加配置",addConfigurationItem:"增加配置项",addFilter:"增加筛选",configurationItem:"配置项",actuatingRange:"作用范围",matches:"作用范围",scopeScreening:"作用范围筛选",endOfAction:"作用端",side:"作用端",actions:"操作",filterType:"筛选类型",labelName:"标签名",formView:"表单视图",addMatch:"增加匹配",addRouter:"增加路由",addLabel:"增加标签",addressSubsetMatching:"地址子集匹配",value:"值",relation:"关系",requestParameterMatching:"请求参数匹配",matchingDimension:"匹配维度",parameter:"参数",ruleName:"规则名",actionObject:"作用对象",key:"作用对象",faultTolerantProtection:"容错保护",runTimeEffective:"运行时生效",ruleGranularity:"规则粒度",scope:"规则粒度",effectTime:"生效时间",enabledState:"启用状态",priority:"优先级",off:"关",on:"开",opened:"开启",closed:"关闭",enabled:"启用",disabled:"禁用"},instanceDomain:{flowDisabled:"流量禁用",operatorLog:"执行日志",CPU:"CPU",enableAppInstanceLogs:"开启该应用所有实例的访问日志",appServiceLoadBalance:"调整应用提供服务的负载均衡策略",appServiceNegativeClusteringMethod:"调整应用提供服务的的集群方式",appServiceRetries:"调整该应用提供服务的重试次数",appServiceTimeout:"调整应用提供服务的超时时间",close:"关闭",enable:"开启",executionLog:"执行日志",retryCount:"重试次数",clusterApproach:"集群方式",timeout_ms:"超时时间(ms)",details:"详情",loadBalance:"负载均衡",monitor:"监控",linkTracking:"链路追踪",configuration:"场景配置",event:"事件",healthExamination_k8s:"健康检查(k8s)",instanceLabel:"实例标签",instanceImage_k8s:"镜像(k8s)",owningWorkload_k8s:"所属工作负载(k8s)",node:"节点",whichApplication:"所属应用",registerCluster:"注册集群",dubboPort:"Dubbo端口",instanceIP:"实例IP",ip:"IP",name:"实例名称",deployState:"部署状态",deployCluster:"部署集群",deployClusters:"部署集群",registerState:"注册状态",registerClusters:"注册集群",registryClusters:"注册集群",cpu:"CPU",memory:"内存",startTime:"启动时间",registerTime:"注册时间",labels:"标签",instanceCount:"实例数量",instanceName:"实例名称",creationTime_k8s:"创建时间(k8s)",startTime_k8s:"启动时间(k8s)"},serviceDomain:{name:"服务名",notSpecified:"不指定",timeout:"超时时间",retryNum:"重试次数",sameAreaFirst:"同区域优先",closed:"关闭",opened:"开启",paramRoute:"参数路由"},service:"服务",versionGroup:"版本&分组",avgQPS:"QPS",avgRT:"RT",requestTotal:"近1min请求总量",serviceSearch:"服务查询",serviceGovernance:"路由规则",trafficManagement:"流量管控",serviceMetrics:"服务统计",serviceRelation:"服务关系",routingRule:"条件路由",tagRule:"标签路由",meshRule:"Mesh路由",dynamicConfig:"动态配置",accessControl:"黑白名单",weightAdjust:"权重调整",loadBalance:"负载均衡",serviceTest:"服务测试",serviceMock:"服务Mock",services:"服务",providers:"提供者",consumers:"消费者",application:"应用",instance:"实例",all:"全部",common:"通用",metrics:"可观测",relation:"关系",group:"组",version:"版本",app:"应用",ip:"IP地址",qps:"qps",rt:"rt",successRate:"成功率",serviceInfo:"服务信息",port:"端口",timeout:"超时(毫秒)",serialization:"序列化",appName:"应用名",instanceNum:"实例数量",deployCluster:"部署集群",registerClusters:"注册集群列表",serviceName:"服务名",provideServiceName:"提供服务",registrySource:"注册来源",instanceRegistry:"应用级",interfaceRegistry:"接口级",allRegistry:"应用级/接口级",operation:"操作",searchResult:"查询结果",search:"搜索",methodName:"方法名",enabled:"开启",disabled:"禁用",method:"方法",weight:"权重",create:"创建",save:"保存",cancel:"取消",close:"关闭",confirm:"确认",ruleContent:"规则内容",createNewRoutingRule:"创建新路由规则",createNewTagRule:"创建新标签规则",createMeshTagRule:"创建新mesh规则",createNewDynamicConfigRule:"创建新动态配置规则",createNewWeightRule:"新建权重规则",createNewLoadBalanceRule:"新建负载均衡规则",createTimeoutRule:"创建超时时间规则",createRetryRule:"创建重试规则",createRegionRule:"创建同区域优先规则",createArgumentRule:"创建参数路由规则",createMockCircuitRule:"创建调用降级规则",createAccesslogRule:"创建访问日志规则",createGrayRule:"创建灰度隔离规则",createWeightRule:"创建权重比例规则",serviceIdHint:"服务名",view:"查看",edit:"编辑",delete:"删除",searchRoutingRule:"搜索路由规则",searchAccessRule:"搜索黑白名单",searchWeightRule:"搜索权重调整规则",dataIdClassHint:"服务接口的类完整包路径",dataIdVersionHint:"服务接口的Version,根据接口实际情况选填",dataIdGroupHint:"服务接口的Group,根据接口实际情况选填",agree:"同意",disagree:"不同意",searchDynamicConfig:"搜索动态配置",appNameHint:"服务所属的应用名称",basicInfo:"基础信息",metaData:"元数据",methodMetrics:"服务方法统计",searchDubboService:"搜索Dubbo服务或应用",serviceSearchHint:"服务ID, org.apache.dubbo.demo.api.DemoService, * 代表所有服务",ipSearchHint:"在指定的IP地址上查找目标服务器提供的所有服务",appSearchHint:"输入应用名称以查找由一个特定应用提供的所有服务, * 代表所有",searchTagRule:"根据应用名搜索标签规则",searchMeshRule:"根据应用名搜索mesh规则",searchSingleMetrics:"输入IP搜索Metrics信息",searchBalanceRule:"搜索负载均衡规则",parameterList:"参数列表",returnType:"返回值",noMetadataHint:"无元数据信息,请升级至Dubbo2.7及以上版本,或者查看application.properties中关于config center的配置,详见",here:"这里",configAddress:"https://github.com/apache/incubator-dubbo-admin/wiki/Dubbo-Admin%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E",whiteList:"白名单",whiteListHint:"白名单IP列表, 多个地址用逗号分隔: 1.1.1.1,2.2.2.2",blackList:"黑名单",blackListHint:"黑名单IP列表, 多个地址用逗号分隔: 3.3.3.3,4.4.4.4",address:"地址列表",weightAddressHint:"此权重设置的IP地址,用逗号分隔: 1.1.1.1,2.2.2.2",weightHint:"权重值,默认100",methodHint:"负载均衡生效的方法,*代表所有方法",strategy:"策略",balanceStrategyHint:"负载均衡策略",goIndex:"返回首页",releaseLater:"在后续版本中发布,敬请期待",later:{metrics:"Metrics会在后续版本中发布,敬请期待",serviceTest:"服务测试会在后续版本中发布,敬请期待",serviceMock:"服务Mock会在后续版本中发布,敬请期待"},by:"按",$vuetify:{dataIterator:{rowsPerPageText:"每页记录数:",rowsPerPageAll:"全部",pageText:"{0}-{1} 共 {2} 条",noResultsText:"没有找到匹配记录",nextPage:"下一页",prevPage:"上一页"},dataTable:{rowsPerPageText:"每页行数:"},noDataText:"无可用数据"},configManage:"配置管理",configCenterAddress:"配置中心地址",searchDubboConfig:"搜索Dubbo配置",createNewDubboConfig:"新建Dubbo配置",scope:"范围",name:"名称",warnDeleteConfig:" 是否要删除Dubbo配置: ",warnDeleteRouteRule:"是否要删除路由规则",warnDeleteDynamicConfig:"是否要删除动态配置",warnDeleteBalancing:"是否要删除负载均衡规则",warnDeleteAccessControl:"是否要删除黑白名单",warnDeleteTagRule:"是否要删除标签路由",warnDeleteMeshRule:"是否要删除mesh路由",warnDeleteWeightAdjust:"是否要删除权重规则",configNameHint:"配置所属的应用名, global 表示全局配置",configContent:"配置内容",testMethod:"测试方法",execute:"执行",result:"结果: ",success:" 成功",fail:"失败",detail:"详情",more:"更多",copyUrl:"复制 URL",copy:"复制",url:"URL",copySuccessfully:"已复制",test:"测试",placeholders:{searchService:"通过服务名搜索服务"},methods:"方法列表",testModule:{searchServiceHint:"完整服务ID, org.apache.dubbo.demo.api.DemoService, 按回车键查询"},userName:"用户名",password:"密码",login:"登录",apiDocs:"接口文档",apiDocsRes:{dubboProviderIP:"Dubbo 提供者Ip",dubboProviderPort:"Dubbo 提供者端口",loadApiList:"加载接口列表",apiListText:"接口列表",apiForm:{missingInterfaceInfo:"缺少接口信息",getApiInfoErr:"获取接口信息异常",api404Err:"接口名称不正确,没有查找到接口参数和响应信息",apiRespDecShowLabel:"响应说明",apiNameShowLabel:"接口名称",apiPathShowLabel:"接口位置",apiMethodParamInfoLabel:"接口参数",apiVersionShowLabel:"接口版本",apiGroupShowLabel:"接口分组",apiDescriptionShowLabel:"接口说明",isAsyncFormLabel:"是否异步调用(此参数不可修改,根据接口定义的是否异步显示)",apiModuleFormLabel:"接口模块(此参数不可修改)",apiFunctionNameFormLabel:"接口方法名(此参数不可修改)",registryCenterUrlFormLabel:"注册中心地址, 如果为空将使用Dubbo 提供者Ip和端口进行直连",paramNameLabel:"参数名",paramPathLabel:"参数位置",paramDescriptionLabel:"说明",paramRequiredLabel:"该参数为必填",doTestBtn:"测试",responseLabel:"响应",responseExampleLabel:"响应示例",apiResponseLabel:"接口响应",LoadingLabel:"加载中...",requireTip:"有未填写的必填项",requireItemTip:"该项为必填!",requestApiErrorTip:"请求接口发生异常,请检查提交的数据,特别是JSON类数据和其中的枚举部分",unsupportedHtmlTypeTip:"暂不支持的表单类型",none:"无"}},authFailed:"权限验证失败",ruleList:"规则列表",registryCenter:"注册中心",mockRule:"规则配置",mockData:"模拟数据",globalDisable:"全局禁用",globalEnable:"全局启用",saveRuleSuccess:"保存规则成功",deleteRuleSuccess:"删除成功",disableRuleSuccess:"禁用成功",enableRuleSuccess:"启用成功",methodNameHint:"服务方法名",createMockRule:"创建规则",editMockRule:"修改规则",deleteRuleTitle:"确定要删除此服务Mock规则吗?",ruleName:"规则名",ruleGranularity:"规则粒度",createTime:"创建时间",lastModifiedTime:"最后修改时间",enable:"是否启用",protection:"容错保护",trafficTimeout:"超时时间",trafficRetry:"调用重试",trafficRegion:"同区域优先",trafficIsolation:"环境隔离",trafficWeight:"权重比例",trafficArguments:"参数路由",trafficMock:"调用降级",trafficAccesslog:"访问日志",trafficHost:"固定机器导流",trafficGray:"流量灰度",homePage:"集群概览",serviceManagement:"开发测试",groupInputPrompt:"请输入服务group(可选)",versionInputPrompt:"请输入服务version(可选)",resources:"资源详情",applications:"应用",instances:"实例",applicationDomain:{instanceCount:"实例数量",deployClusters:"部署集群",registryClusters:"注册集群",registerClusters:"注册集群",registerModes:"注册模式",operatorLog:"执行日志",flowWeight:"流量权重",gray:"灰度隔离",name:"应用名",detail:"详情",instance:"实例",service:"服务",monitor:"监控",tracing:"链路追踪",config:"配置",event:"事件",appName:"应用名",rpcProtocols:"RPC 协议",dubboVersions:"Dubbo 版本",dubboPorts:"Dubbo 端口",serialProtocols:"序列化协议",appTypes:"应用类型",images:"应用镜像",workloads:"工作负载",deployCluster:"部署集群",registerCluster:"注册集群",registerMode:"注册模式"},searchDomain:{total:"共计",unit:"条"},messageDomain:{success:{copy:"您已经成功复制一条信息"}},backHome:"回到首页",noPageTip:"抱歉,你访问的页面不存在",globalSearchTip:"搜索ip,应用,实例,服务",placeholder:{typeAppName:"请输入应用名,支持前缀搜索",typeDefault:"请输入",typeRoutingRules:"搜索路由规则,支持前缀过滤"},none:"无",details:"详情",debug:"调试",distribution:"分布",monitor:"监控",tracing:"链路追踪",sceneConfig:"场景配置",event:"事件",provideService:"提供服务",dependentService:"依赖服务",idx:"序号",submit:"提交",reset:"重置",router:{resource:{app:{list:"列表"},ins:{list:"列表"},svc:{list:"列表"}}},form:{save:"保存"}},jLe={loginDomain:{username:"Username",password:"Password",login:"Login",authFail:"Auth Fail"},destinationRuleDomain:{YAMLView:"YAML view",formView:"Form view"},virtualServiceDomain:{YAMLView:"YAML view",formView:"Form view"},dynamicConfigDomain:{YAMLView:"YAML view",formView:"Form view",event:"Event"},updateRoutingRuleDomain:{YAMLView:"YAML view",formView:"Form view"},routingRuleDomain:{YAMLView:"YAML view",formView:"Form view"},addRoutingRuleDomain:{YAMLView:"YAML view",formView:"Form view"},tagRuleDomain:{YAMLView:"YAML view",formView:"Form view"},updateTagRuleDomain:{YAMLView:"YAML view",formView:"Form view"},addTagRuleDomain:{YAMLView:"YAML view",formView:"Form view"},flowControlDomain:{actuatingRange:"Actuating range",notSet:"Not set",versionRecords:"Version records",YAMLView:"YAML View",addConfiguration:"Add configuration",addConfigurationItem:"Add configurationItem",addFilter:"Add filter",configurationItem:"Configuration item",scopeScreening:"Scope screening",endOfAction:"End of action",addLabel:"Add label",actions:"Actions",filterType:"Filter type",labelName:"Label name",formView:"Form view",addMatch:"Add match",addRouter:"Add router",addressSubsetMatching:"Address subset matching",value:"Value",relation:"Relation",parameter:"Parameter",matchingDimension:"Matching dimension",requestParameterMatching:"Request parameter matching",ruleName:"Rule name",actionObject:"Action object",faultTolerantProtection:"Fault-tolerant protection",runTimeEffective:"Run time effective",ruleGranularity:"Rule granularity",effectTime:"Time of taking effect",enabledState:"Enabled status",priority:"Priority",off:"off",on:"on",opened:"Opened",closed:"Closed",enabled:"Enabled",disabled:"Disabled"},instanceDomain:{flowDisabled:"Flow disabled",operatorLog:"Operator log",enableAppInstanceLogs:"Enable access logs for all instances of this application",appServiceRetries:"Adjust the number of retries for the service provided by this application",appServiceLoadBalance:"Adjusting the load balancing strategy for application service provision",appServiceNegativeClusteringMethod:"Adjusting the clustering approach for application service provision",appServiceTimeout:"Adjusting the timeout for application service provision",close:"Close",enable:"Enable",executionLog:"ExecutionLog",loadBalance:"LoadBalance",instanceIP:"InstanceIP",clusterApproach:"ClusterApproach",details:"Detail",retryCount:"RetryCount",timeout_ms:"Timeout(ms)",monitor:"Monitor",linkTracking:"LinkTracking",configuration:"Configuration",event:"Event",instanceName:"InstanceName",ip:"Ip",name:"Name",deployState:"Deploy State",deployCluster:"Deploy Cluster",deployClusters:"Deploy Clusters",registerState:"Register State",registerCluster:"Register Cluster",registryClusters:"Registry Clusters",CPU:"CPU",node:"Node",memory:"Memory",owningWorkload_k8s:"Owning Workload(k8s)",creationTime_k8s:"CreationTime(k8s)",startTime:"StartTime",dubboPort:"DubboPort",instanceImage_k8s:"Image(k8s)",instanceLabel:"Instance Label",whichApplication:"Owning Application",healthExamination_k8s:"Health Examination(k8s)",registerTime:"RegisterTime",labels:"Labels",startTime_k8s:"StartTime(k8s)",instanceCount:"Instance Count"},serviceDomain:{name:"Name",timeout:"Timeout",retryNum:"Retry Num",sameAreaFirst:"Same Area First",closed:"Closed",opened:"Opened",paramRoute:"Param Route"},appServiceTimeout:"Adjusting the timeout for application service provision",enableAppInstanceLogs:"Enable access logs for all instances of this application",appServiceLoadBalance:"Adjusting the load balancing strategy for application service provision",appServiceRetries:"Adjusting the number of retries for application provided services",appServiceNegativeClusteringMethod:"Adjusting the negative clustering method for application service provision",executionLog:"Execution Log",clusterApproach:"Cluster Approach",retryCount:"Retry Count",event:"Event",configuration:"Configuration",linkTracking:"Link Tracking",monitor:"Monitor",details:"Details",creationTime_k8s:"creationTime(k8s)",dubboPort:"Dubbo Port",whichApplication:"application",registerTime:"Register Time",startTime_k8s:"Start Time(k8s)",registerStates:"Register States",deployState:"Deployment Status",owningWorkload_k8s:"Owning Workload(k8s)",creationTime:"Creation Time",nodeIP:"Node IP",healthExamination:"Health Examination",instanceImage_k8s:"Image(k8s)",instanceLabel:"Instance Label",instanceDetail:"Instance Detail",state:"State",memory:"Memory",CPU:"CPU",node:"Node",labels:"Labels",instanceIP:"Instance IP",instanceName:"Instance Name",instance:"Instance",resourceDetails:"Resource Details",service:"Service",versionGroup:"Version & Group",avgQPS:"last 1min QPS",avgRT:"last 1min RT",requestTotal:"last 1min request total",serviceSearch:"Search Service",serviceGovernance:"Routing Rule",trafficManagement:"Traffic Management",routingRule:"Condition Rule",tagRule:"Tag Rule",meshRule:"Mesh Rule",dynamicConfig:"Dynamic Config",accessControl:"Black White List",weightAdjust:"Weight Adjust",loadBalance:"Load Balance",serviceTest:"Service Test",serviceMock:"Service Mock",serviceMetrics:"Service Metrics",serviceRelation:"Service Relation",metrics:"Metrics",relation:"Relation",group:"Group",serviceInfo:"Service Info",providers:"Providers",consumers:"Consumers",common:"Common",version:"Version",app:"Application",services:"Services",application:"Application",all:"All",ip:"IP",qps:"qps",rt:"rt",successRate:"success rate",port:"PORT",timeout:"timeout(ms)",serialization:"serialization",appName:"Application Name",instanceNum:"Instance Number",deployCluster:"Deploy Cluster",registerCluster:"Register Cluster",serviceName:"Service Name",registrySource:"Registry Source",instanceRegistry:"Instance Registry",interfaceRegistry:"Interface Registry",allRegistry:"Instance / Interface Registry",operation:"Operation",searchResult:"Search Result",search:"Search",methodName:"Method Name",enabled:"Enabled",disabled:"Disabled",method:"Method",weight:"Weight",create:"CREATE",save:"SAVE",cancel:"CANCEL",close:"CLOSE",confirm:"CONFIRM",ruleContent:"RULE CONTENT",createNewRoutingRule:"Create New Routing Rule",createNewTagRule:"Create New Tag Rule",createNewMeshRule:"Create New Mesh Rule",createNewDynamicConfigRule:"Create New Dynamic Config Rule",createNewWeightRule:"Create New Weight Rule",createNewLoadBalanceRule:"Create new load balancing rule",createTimeoutRule:"Create timeout rule",createRetryRule:"Create timeout rule",createRegionRule:"Create retry rule",createArgumentRule:"Create argument routing rule",createMockCircuitRule:"Create mock (circuit breaking) rule",createAccesslogRule:"Create accesslog rule",createGrayRule:"Create gray rule",createWeightRule:"Create weighting rule",serviceIdHint:"Service ID",view:"View",edit:"Edit",delete:"Delete",searchRoutingRule:"Search Routing Rule",searchAccess:"Search Access Rule",searchWeightRule:"Search Weight Adjust Rule",dataIdClassHint:"Complete package path of service interface class",dataIdVersionHint:"The version of the service interface, which can be filled in according to the actual situation of the interface",dataIdGroupHint:"The group of the service interface, which can be filled in according to the actual situation of the interface",agree:"Agree",disagree:"Disagree",searchDynamicConfig:"Search Dynamic Config",appNameHint:"Application name the service belongs to",basicInfo:"BasicInfo",metaData:"MetaData",methodMetrics:"Method Statistics",searchDubboService:"Search Dubbo Services or applications",serviceSearchHint:"Service ID, org.apache.dubbo.demo.api.DemoService, * for all services",ipSearchHint:"Find all services provided by the target server on the specified IP address",appSearchHint:"Input an application name to find all services provided by one particular application, * for all",searchTagRule:"Search Tag Rule by application name",searchMeshRule:"Search Mesh Rule by application name",searchSingleMetrics:"Search Metrics by IP",searchBalanceRule:"Search Balancing Rule",noMetadataHint:"There is no metadata available, please update to Dubbo2.7, or check your config center configuration in application.properties, please check ",parameterList:"parameterList",returnType:"returnType",here:"here",configAddress:"https://github.com/apache/incubator-dubbo-admin/wiki/Dubbo-Admin-configuration",whiteList:"White List",whiteListHint:"White list IP address, divided by comma: 1.1.1.1,2.2.2.2",blackList:"Black List",blackListHint:"Black list IP address, divided by comma: 3.3.3.3,4.4.4.4",address:"Address",weightAddressHint:"IP addresses to set this weight, divided by comma: 1.1.1.1,2.2.2.2",weightHint:"weight value, default is 100",methodHint:"choose method of load balancing, * for all methods",strategy:"Strategy",balanceStrategyHint:"load balancing strategy",goIndex:"Go To Index",releaseLater:"will release later",later:{metrics:"Metrics will release later",serviceTest:"Service Test will release later",serviceMock:"Service Mock will release later"},by:"by ",$vuetify:{dataIterator:{rowsPerPageText:"Items per page:",rowsPerPageAll:"All",pageText:"{0}-{1} of {2}",noResultsText:"No matching records found",nextPage:"Next page",prevPage:"Previous page"},dataTable:{rowsPerPageText:"Rows per page:"},noDataText:"No data available"},configManage:"Configuration Management",configCenterAddress:"ConfigCenter Address",searchDubboConfig:"Search Dubbo Config",createNewDubboConfig:"Create New Dubbo Config",scope:"Scope",name:"Name",warnDeleteConfig:" Are you sure to Delete Dubbo Config: ",warnDeleteRouteRule:"Are you sure to Delete routing rule",warnDeleteDynamicConfig:"Are you sure to Delete dynamic config",warnDeleteBalancing:"Are you sure to Delete load balancing",warnDeleteAccessControl:"Are you sure to Delete access control",warnDeleteTagRule:"Are you sure to Delete tag rule",warnDeleteMeshRule:"Are you sure to Delete mesh rule",warnDeleteWeightAdjust:"Are you sure to Delete weight adjust",configNameHint:"Application name the config belongs to, use 'global'(without quotes) for global config",configContent:"Config Content",testMethod:"Test Method",execute:"EXECUTE",result:"Result: ",success:"SUCCESS",fail:"FAIL",detail:"Detail",more:"More",copyUrl:"Copy URL",copy:"Copy",url:"URL",copySuccessfully:"Copied",test:"Test",placeholders:{searchService:"Search by service name"},methods:"Methods",testModule:{searchServiceHint:"Entire service ID, org.apache.dubbo.demo.api.DemoService, press Enter to search"},userName:"User Name",password:"Password",login:"Login",apiDocs:"API Docs",apiDocsRes:{dubboProviderIP:"Dubbo Provider Ip",dubboProviderPort:"Dubbo Provider Port",loadApiList:"Load Api List",apiListText:"Api List",apiForm:{missingInterfaceInfo:"Missing interface information",getApiInfoErr:"Exception in obtaining interface information",api404Err:"Interface name is incorrect, interface parameters and response information are not found",apiRespDecShowLabel:"Response Description",apiNameShowLabel:"Api Name",apiPathShowLabel:"Api Path",apiMethodParamInfoLabel:"Api method parameters",apiVersionShowLabel:"Api Version",apiGroupShowLabel:"Api Group",apiDescriptionShowLabel:"Api Description",isAsyncFormLabel:"Whether to call asynchronously (this parameter cannot be modified, according to whether to display asynchronously defined by the interface)",apiModuleFormLabel:"Api module (this parameter cannot be modified)",apiFunctionNameFormLabel:"Api function name(this parameter cannot be modified)",registryCenterUrlFormLabel:"Registry address. If it is empty, Dubbo provider IP and port will be used for direct connection",paramNameLabel:"Parameter name",paramPathLabel:"Parameter path",paramDescriptionLabel:"Description",paramRequiredLabel:"This parameter is required",doTestBtn:"Do Test",responseLabel:"Response",responseExampleLabel:"Response Example",apiResponseLabel:"Api Response",LoadingLabel:"Loading...",requireTip:"There are required items not filled in",requireItemTip:"This field is required",requestApiErrorTip:"There is an exception in the request interface. Please check the submitted data, especially the JSON class data and the enumeration part",unsupportedHtmlTypeTip:"Temporarily unsupported form type",none:"none"}},authFailed:"Authorized failed,please login.",registryCenter:"Registry",ruleList:"Rule List",mockRule:"Mock Rule",mockData:"Mock Data",globalDisable:"Global Disable",globalEnable:"Global Enable",saveRuleSuccess:"Save Rule Successfully",deleteRuleSuccess:"Delete Rule Successfully",disableRuleSuccess:"Disable Rule Successfully",enableRuleSuccess:"Enable Rule Successfully",methodNameHint:"The method name of Service",createMockRule:"Create Mock Rule",editMockRule:"Edit Mock Rule",deleteRuleTitle:"Are you sure to delete this mock rule?",createTime:"Create Time",lastModifiedTime:"Last Modified Time",trafficTimeout:"Timeout",trafficRetry:"Retry",trafficRegion:"Region Aware",trafficIsolation:"Isolation",trafficWeight:"Weight Percentage",trafficArguments:"Arg Routing",trafficMock:"Mock",trafficAccesslog:"Accesslog",trafficHost:"Host",homePage:"Cluster Overview",serviceManagement:"Dev & Test",resources:"Resources",applications:"Applications",instances:"Instances",applicationDomain:{instanceCount:"Instance Count",deployClusters:"Deploy Clusters",registryClusters:"Registry Clusters",registerClusters:"Registry Clusters",registerModes:"Register Modes",operatorLog:"OperatorLog",flowWeight:"FlowWeight",gray:"Gray",detail:"Detail",instance:"Instance",service:"Service",monitor:"Monitor",tracing:"Tracing",config:"Config",event:"Event",appName:"Application Name",rpcProtocols:"Rpc Protocols",dubboVersions:"Dubbo Versions",dubboPorts:"Dubbo Ports",serialProtocols:"Serial Protocols",appTypes:"Application Types",images:"Images",workloads:"Workloads",deployCluster:"Deploy Cluster",registerCluster:"Register Cluster",registerMode:"Register Mode"},searchDomain:{total:"Total",unit:"items"},messageDomain:{success:{copy:"You have successfully copied a piece of information"}},backHome:"Back Home",noPageTip:"Sorry, the page you visited does not exist.",globalSearchTip:"Search ip, application, instance, service",placeholder:{typeAppName:"please type appName, support for prefix",typeDefault:"please type "},none:"No Select",debug:"Debug",distribution:"Distribution",tracing:"Tracing",sceneConfig:"Scene Config",provideService:"Provide Service",dependentService:"Dependent Service",submit:"Submit",reset:"Reset",router:{resource:{app:{list:"List"},ins:{list:"List"},svc:{list:"List"}}},form:{save:"SAVE"}},WLe={cn:{content:"内容",Home:"主页",home:"主页",...zLe},en:{content:"content",Home:"Home",home:"home",...jLe}},MW=St({locale:localStorage.getItem(Jj)||"cn",opts:[{value:"en",title:"en"},{value:"cn",title:"中文"}]}),xP=ELe({locale:MW.locale,legacy:!1,globalInjection:!0,messages:WLe}),THe=e=>{localStorage.setItem(Jj,e),xP.global.locale.value=e};/*! js-cookie v3.0.5 | MIT */function Yv(e){for(var t=1;t"u")){a=Yv({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var s in a)a[s]&&(l+="; "+s,a[s]!==!0&&(l+="="+a[s].split(";")[0]));return document.cookie=r+"="+e.write(i,r)+l}}function o(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var i=document.cookie?document.cookie.split("; "):[],a={},l=0;l({"74d14fde":It(Oh)})),w5.locale("en");const t=St(MW);Ie(t,r=>{w5.locale(r.locale)}),ft(eW.LOCALE,t);function n(){window.open("https://cn.dubbo.apache.org/zh-cn/overview/what/")}const o=St(xP.global.locale);return kj(),(r,i)=>{const a=Nt("a-float-button"),l=Nt("a-config-provider");return ht(),jn(l,{locale:It(o==="en"?cr:V5e),theme:{token:{colorPrimary:It(Oh)}}},{default:bn(()=>[g(It(Nj)),g(a,{type:"primary",class:"__global_float_button_question",onClick:n},{icon:bn(()=>[g(It(PF))]),_:1})]),_:1},8,["locale","theme"])}}});var GLe=!1;function YLe(e){return Sb()?(r2(e),!0):!1}function Th(e){return typeof e=="function"?e():It(e)}const RW=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const XLe=Object.prototype.toString,qLe=e=>XLe.call(e)==="[object Object]",bd=()=>{},ZLe=QLe();function QLe(){var e,t;return RW&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function DW(e,t){function n(...o){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(i)})}return n}const LW=e=>e();function JLe(e,t={}){let n,o,r=bd;const i=l=>{clearTimeout(l),r(),r=bd};return l=>{const s=Th(e),c=Th(t.maxWait);return n&&i(n),s<=0||c!==void 0&&c<=0?(o&&(i(o),o=null),Promise.resolve(l())):new Promise((u,d)=>{r=t.rejectOnCancel?d:u,c&&!o&&(o=setTimeout(()=>{n&&i(n),o=null,u(l())},c)),n=setTimeout(()=>{o&&i(o),o=null,u(l())},s)})}}function eNe(e=LW){const t=he(!0);function n(){t.value=!1}function o(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:u2(t),pause:n,resume:o,eventFilter:r}}function tNe(e){return e||Nn()}function Hc(e,t=200,n={}){return DW(JLe(t,n),e)}function nNe(e,t,n={}){const{eventFilter:o=LW,...r}=n;return Ie(e,DW(o,t),r)}function oNe(e,t,n={}){const{eventFilter:o,...r}=n,{eventFilter:i,pause:a,resume:l,isActive:s}=eNe(o);return{stop:nNe(e,t,{...r,eventFilter:i}),pause:a,resume:l,isActive:s}}function au(e,t=!0,n){tNe()?lt(e,n):t?e():wt(e)}function ar(e,t,n){return Ie(e,(o,r,i)=>{o&&t(o,r,i)},n)}function lp(e){var t;const n=Th(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Eh=RW?window:void 0;function Hp(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=Eh):[t,n,o,r]=e,!t)return bd;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],a=()=>{i.forEach(u=>u()),i.length=0},l=(u,d,f,h)=>(u.addEventListener(d,f,h),()=>u.removeEventListener(d,f,h)),s=Ie(()=>[lp(t),Th(r)],([u,d])=>{if(a(),!u)return;const f=qLe(d)?{...d}:d;i.push(...n.flatMap(h=>o.map(m=>l(u,h,m,f))))},{immediate:!0,flush:"post"}),c=()=>{s(),a()};return YLe(c),c}let iD=!1;function rNe(e,t,n={}){const{window:o=Eh,ignore:r=[],capture:i=!0,detectIframe:a=!1}=n;if(!o)return bd;ZLe&&!iD&&(iD=!0,Array.from(o.document.body.children).forEach(f=>f.addEventListener("click",bd)),o.document.documentElement.addEventListener("click",bd));let l=!0;const s=f=>r.some(h=>{if(typeof h=="string")return Array.from(o.document.querySelectorAll(h)).some(m=>m===f.target||f.composedPath().includes(m));{const m=lp(h);return m&&(f.target===m||f.composedPath().includes(m))}}),u=[Hp(o,"click",f=>{const h=lp(e);if(!(!h||h===f.target||f.composedPath().includes(h))){if(f.detail===0&&(l=!s(f)),!l){l=!0;return}t(f)}},{passive:!0,capture:i}),Hp(o,"pointerdown",f=>{const h=lp(e);l=!s(f)&&!!(h&&!f.composedPath().includes(h))},{passive:!0}),a&&Hp(o,"blur",f=>{setTimeout(()=>{var h;const m=lp(e);((h=o.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(m!=null&&m.contains(o.document.activeElement))&&t(f)},0)})].filter(Boolean);return()=>u.forEach(f=>f())}const Xv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qv="__vueuse_ssr_handlers__",iNe=aNe();function aNe(){return qv in Xv||(Xv[qv]=Xv[qv]||{}),Xv[qv]}function lNe(e,t){return iNe[e]||t}function sNe(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const cNe={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},aD="vueuse-storage";function uNe(e,t,n,o={}){var r;const{flush:i="pre",deep:a=!0,listenToStorageChanges:l=!0,writeDefaults:s=!0,mergeDefaults:c=!1,shallow:u,window:d=Eh,eventFilter:f,onError:h=E=>{console.error(E)},initOnMounted:m}=o,v=(u?ve:he)(typeof t=="function"?t():t);if(!n)try{n=lNe("getDefaultStorage",()=>{var E;return(E=Eh)==null?void 0:E.localStorage})()}catch(E){h(E)}if(!n)return v;const y=Th(t),b=sNe(y),$=(r=o.serializer)!=null?r:cNe[b],{pause:x,resume:_}=oNe(v,()=>w(v.value),{flush:i,deep:a,eventFilter:f});return d&&l&&au(()=>{Hp(d,"storage",P),Hp(d,aD,O),m&&P()}),m||P(),v;function w(E){try{if(E==null)n.removeItem(e);else{const R=$.write(E),A=n.getItem(e);A!==R&&(n.setItem(e,R),d&&d.dispatchEvent(new CustomEvent(aD,{detail:{key:e,oldValue:A,newValue:R,storageArea:n}})))}}catch(R){h(R)}}function I(E){const R=E?E.newValue:n.getItem(e);if(R==null)return s&&y!=null&&n.setItem(e,$.write(y)),y;if(!E&&c){const A=$.read(R);return typeof c=="function"?c(A,y):b==="object"&&!Array.isArray(A)?{...y,...A}:A}else return typeof R!="string"?R:$.read(R)}function O(E){P(E.detail)}function P(E){if(!(E&&E.storageArea!==n)){if(E&&E.key==null){v.value=y;return}if(!(E&&E.key!==e)){x();try{(E==null?void 0:E.newValue)!==$.write(v.value)&&(v.value=I(E))}catch(R){h(R)}finally{E?wt(_):_()}}}}}function _P(e,t,n={}){const{window:o=Eh}=n;return uNe(e,t,o==null?void 0:o.localStorage,n)}function ob(e){"@babel/helpers - typeof";return ob=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ob(e)}var dNe=/^\s+/,fNe=/\s+$/;function et(e,t){if(e=e||"",t=t||{},e instanceof et)return e;if(!(this instanceof et))return new et(e,t);var n=pNe(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}et.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,o,r,i,a,l;return n=t.r/255,o=t.g/255,r=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),r<=.03928?l=r/12.92:l=Math.pow((r+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(t){return this._a=NW(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=sD(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=sD(this._r,this._g,this._b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+o+"%, "+r+"%)":"hsva("+n+", "+o+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=lD(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=lD(this._r,this._g,this._b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+o+"%, "+r+"%)":"hsla("+n+", "+o+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return cD(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return mNe(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Hn(this._r,255)*100)+"%",g:Math.round(Hn(this._g,255)*100)+"%",b:Math.round(Hn(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Hn(this._r,255)*100)+"%, "+Math.round(Hn(this._g,255)*100)+"%, "+Math.round(Hn(this._b,255)*100)+"%)":"rgba("+Math.round(Hn(this._r,255)*100)+"%, "+Math.round(Hn(this._g,255)*100)+"%, "+Math.round(Hn(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:TNe[cD(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+uD(this._r,this._g,this._b,this._a),o=n,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=et(t);o="#"+uD(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+o+")"},toString:function(t){var n=!!t;t=t||this._format;var o=!1,r=this._a<1&&this._a>=0,i=!n&&r&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return et(this.toString())},_applyModification:function(t,n){var o=t.apply(null,[this].concat([].slice.call(n)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(CNe,arguments)},brighten:function(){return this._applyModification($Ne,arguments)},darken:function(){return this._applyModification(xNe,arguments)},desaturate:function(){return this._applyModification(bNe,arguments)},saturate:function(){return this._applyModification(yNe,arguments)},greyscale:function(){return this._applyModification(SNe,arguments)},spin:function(){return this._applyModification(wNe,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(INe,arguments)},complement:function(){return this._applyCombination(_Ne,arguments)},monochromatic:function(){return this._applyCombination(PNe,arguments)},splitcomplement:function(){return this._applyCombination(ONe,arguments)},triad:function(){return this._applyCombination(dD,[3])},tetrad:function(){return this._applyCombination(dD,[4])}};et.fromRatio=function(e,t){if(ob(e)=="object"){var n={};for(var o in e)e.hasOwnProperty(o)&&(o==="a"?n[o]=e[o]:n[o]=sp(e[o]));e=n}return et(e,t)};function pNe(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=RNe(e)),ob(e)=="object"&&(ol(e.r)&&ol(e.g)&&ol(e.b)?(t=hNe(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ol(e.h)&&ol(e.s)&&ol(e.v)?(o=sp(e.s),r=sp(e.v),t=vNe(e.h,o,r),a=!0,l="hsv"):ol(e.h)&&ol(e.s)&&ol(e.l)&&(o=sp(e.s),i=sp(e.l),t=gNe(e.h,o,i),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=NW(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function hNe(e,t,n){return{r:Hn(e,255)*255,g:Hn(t,255)*255,b:Hn(n,255)*255}}function lD(e,t,n){e=Hn(e,255),t=Hn(t,255),n=Hn(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i,a,l=(o+r)/2;if(o==r)i=a=0;else{var s=o-r;switch(a=l>.5?s/(2-o-r):s/(o+r),o){case e:i=(t-n)/s+(t1&&(d-=1),d<1/6?c+(u-c)*6*d:d<1/2?u:d<2/3?c+(u-c)*(2/3-d)*6:c}if(t===0)o=r=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;o=a(s,l,e+1/3),r=a(s,l,e),i=a(s,l,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function sD(e,t,n){e=Hn(e,255),t=Hn(t,255),n=Hn(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i,a,l=o,s=o-r;if(a=o===0?0:s/o,o==r)i=0;else{switch(o){case e:i=(t-n)/s+(t>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(et(o));return i}function PNe(e,t){t=t||6;for(var n=et(e).toHsv(),o=n.h,r=n.s,i=n.v,a=[],l=1/t;t--;)a.push(et({h:o,s:r,v:i})),i=(i+l)%1;return a}et.mix=function(e,t,n){n=n===0?0:n||50;var o=et(e).toRgb(),r=et(t).toRgb(),i=n/100,a={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return et(a)};et.readability=function(e,t){var n=et(e),o=et(t);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)};et.isReadable=function(e,t,n){var o=et.readability(e,t),r,i;switch(i=!1,r=DNe(n),r.level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7;break}return i};et.mostReadable=function(e,t,n){var o=null,r=0,i,a,l,s;n=n||{},a=n.includeFallbackColors,l=n.level,s=n.size;for(var c=0;cr&&(r=i,o=et(t[c]));return et.isReadable(e,o,{level:l,size:s})||!a?o:(n.includeFallbackColors=!1,et.mostReadable(e,["#fff","#000"],n))};var Hw=et.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},TNe=et.hexNames=ENe(Hw);function ENe(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function NW(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Hn(e,t){ANe(e)&&(e="100%");var n=MNe(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function s1(e){return Math.min(1,Math.max(0,e))}function ii(e){return parseInt(e,16)}function ANe(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function MNe(e){return typeof e=="string"&&e.indexOf("%")!=-1}function na(e){return e.length==1?"0"+e:""+e}function sp(e){return e<=1&&(e=e*100+"%"),e}function kW(e){return Math.round(parseFloat(e)*255).toString(16)}function fD(e){return ii(e)/255}var Qi=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ol(e){return!!Qi.CSS_UNIT.exec(e)}function RNe(e){e=e.replace(dNe,"").replace(fNe,"").toLowerCase();var t=!1;if(Hw[e])e=Hw[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Qi.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Qi.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Qi.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Qi.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Qi.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Qi.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Qi.hex8.exec(e))?{r:ii(n[1]),g:ii(n[2]),b:ii(n[3]),a:fD(n[4]),format:t?"name":"hex8"}:(n=Qi.hex6.exec(e))?{r:ii(n[1]),g:ii(n[2]),b:ii(n[3]),format:t?"name":"hex"}:(n=Qi.hex4.exec(e))?{r:ii(n[1]+""+n[1]),g:ii(n[2]+""+n[2]),b:ii(n[3]+""+n[3]),a:fD(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Qi.hex3.exec(e))?{r:ii(n[1]+""+n[1]),g:ii(n[2]+""+n[2]),b:ii(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function DNe(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var lu=lu||{};lu.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var n=e.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+e.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,o=e.visit(t.at),r=e.visit(t.style);return r&&(n+=" "+r),o&&(n+=" at "+o),n},"visit_default-radial":function(t){var n="",o=e.visit(t.at);return o&&(n+=o),n},"visit_extent-keyword":function(t){var n=t.value,o=e.visit(t.at);return o&&(n+=" at "+o),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,n){var o=t,r=e.visit(n.length);return r&&(o+=" "+r),o},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",o=t.length;return t.forEach(function(r,i){n+=e.visit(r),i0&&n("Invalid input not EOF"),k}function r(){return x(i)}function i(){return a("linear-gradient",e.linearGradient,s)||a("repeating-linear-gradient",e.repeatingLinearGradient,s)||a("radial-gradient",e.radialGradient,d)||a("repeating-radial-gradient",e.repeatingRadialGradient,d)}function a(k,L,z){return l(L,function(K){var G=z();return G&&(D(e.comma)||n("Missing comma before color stops")),{type:k,orientation:G,colorStops:x(_)}})}function l(k,L){var z=D(k);if(z){D(e.startCall)||n("Missing (");var K=L(z);return D(e.endCall)||n("Missing )"),K}}function s(){return c()||u()}function c(){return W("directional",e.sideOrCorner,1)}function u(){return W("angular",e.angleValue,1)}function d(){var k,L=f(),z;return L&&(k=[],k.push(L),z=t,D(e.comma)&&(L=f(),L?k.push(L):t=z)),k}function f(){var k=h()||m();if(k)k.at=y();else{var L=v();if(L){k=L;var z=y();z&&(k.at=z)}else{var K=b();K&&(k={type:"default-radial",at:K})}}return k}function h(){var k=W("shape",/^(circle)/i,0);return k&&(k.style=F()||v()),k}function m(){var k=W("shape",/^(ellipse)/i,0);return k&&(k.style=A()||v()),k}function v(){return W("extent-keyword",e.extentKeywords,1)}function y(){if(W("position",/^at/,0)){var k=b();return k||n("Missing positioning value"),k}}function b(){var k=$();if(k.x||k.y)return{type:"position",value:k}}function $(){return{x:A(),y:A()}}function x(k){var L=k(),z=[];if(L)for(z.push(L);D(e.comma);)L=k(),L?z.push(L):n("One extra comma");return z}function _(){var k=w();return k||n("Expected color definition"),k.length=A(),k}function w(){return O()||E()||P()||I()}function I(){return W("literal",e.literalColor,0)}function O(){return W("hex",e.hexColor,1)}function P(){return l(e.rgbColor,function(){return{type:"rgb",value:x(R)}})}function E(){return l(e.rgbaColor,function(){return{type:"rgba",value:x(R)}})}function R(){return D(e.number)[1]}function A(){return W("%",e.percentageValue,1)||N()||F()}function N(){return W("position-keyword",e.positionKeywords,1)}function F(){return W("px",e.pixelValue,1)||W("em",e.emValue,1)}function W(k,L,z){var K=D(L);if(K)return{type:k,value:K[z]}}function D(k){var L,z;return z=/^[\n\r\t\s]+/.exec(t),z&&B(z[0].length),L=k.exec(t),L&&B(L[0].length),L}function B(k){t=t.substr(k)}return function(k){return t=k.toString(),o()}}();var LNe=lu.parse,NNe=lu.stringify,Fr="top",zi="bottom",ji="right",Hr="left",OP="auto",ig=[Fr,zi,ji,Hr],jd="start",Ah="end",kNe="clippingParents",BW="viewport",Zf="popper",BNe="reference",pD=ig.reduce(function(e,t){return e.concat([t+"-"+jd,t+"-"+Ah])},[]),FW=[].concat(ig,[OP]).reduce(function(e,t){return e.concat([t,t+"-"+jd,t+"-"+Ah])},[]),FNe="beforeRead",HNe="read",zNe="afterRead",jNe="beforeMain",WNe="main",VNe="afterMain",KNe="beforeWrite",UNe="write",GNe="afterWrite",YNe=[FNe,HNe,zNe,jNe,WNe,VNe,KNe,UNe,GNe];function ka(e){return e?(e.nodeName||"").toLowerCase():null}function fi(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function zc(e){var t=fi(e).Element;return e instanceof t||e instanceof Element}function Di(e){var t=fi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function IP(e){if(typeof ShadowRoot>"u")return!1;var t=fi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function XNe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!Di(i)||!ka(i)||(Object.assign(i.style,o),Object.keys(r).forEach(function(a){var l=r[a];l===!1?i.removeAttribute(a):i.setAttribute(a,l===!0?"":l)}))})}function qNe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],i=t.attributes[o]||{},a=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),l=a.reduce(function(s,c){return s[c]="",s},{});!Di(r)||!ka(r)||(Object.assign(r.style,l),Object.keys(i).forEach(function(s){r.removeAttribute(s)}))})}}const ZNe={name:"applyStyles",enabled:!0,phase:"write",fn:XNe,effect:qNe,requires:["computeStyles"]};function Ma(e){return e.split("-")[0]}var Tc=Math.max,rb=Math.min,Wd=Math.round;function zw(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function HW(){return!/^((?!chrome|android).)*safari/i.test(zw())}function Vd(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&Di(e)&&(r=e.offsetWidth>0&&Wd(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Wd(o.height)/e.offsetHeight||1);var a=zc(e)?fi(e):window,l=a.visualViewport,s=!HW()&&n,c=(o.left+(s&&l?l.offsetLeft:0))/r,u=(o.top+(s&&l?l.offsetTop:0))/i,d=o.width/r,f=o.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function PP(e){var t=Vd(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function zW(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&IP(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function xl(e){return fi(e).getComputedStyle(e)}function QNe(e){return["table","td","th"].indexOf(ka(e))>=0}function Ns(e){return((zc(e)?e.ownerDocument:e.document)||window.document).documentElement}function c1(e){return ka(e)==="html"?e:e.assignedSlot||e.parentNode||(IP(e)?e.host:null)||Ns(e)}function hD(e){return!Di(e)||xl(e).position==="fixed"?null:e.offsetParent}function JNe(e){var t=/firefox/i.test(zw()),n=/Trident/i.test(zw());if(n&&Di(e)){var o=xl(e);if(o.position==="fixed")return null}var r=c1(e);for(IP(r)&&(r=r.host);Di(r)&&["html","body"].indexOf(ka(r))<0;){var i=xl(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function ag(e){for(var t=fi(e),n=hD(e);n&&QNe(n)&&xl(n).position==="static";)n=hD(n);return n&&(ka(n)==="html"||ka(n)==="body"&&xl(n).position==="static")?t:n||JNe(e)||t}function TP(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function zp(e,t,n){return Tc(e,rb(t,n))}function e7e(e,t,n){var o=zp(e,t,n);return o>n?n:o}function jW(){return{top:0,right:0,bottom:0,left:0}}function WW(e){return Object.assign({},jW(),e)}function VW(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var t7e=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,WW(typeof t!="number"?t:VW(t,ig))};function n7e(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Ma(n.placement),s=TP(l),c=[Hr,ji].indexOf(l)>=0,u=c?"height":"width";if(!(!i||!a)){var d=t7e(r.padding,n),f=PP(i),h=s==="y"?Fr:Hr,m=s==="y"?zi:ji,v=n.rects.reference[u]+n.rects.reference[s]-a[s]-n.rects.popper[u],y=a[s]-n.rects.reference[s],b=ag(i),$=b?s==="y"?b.clientHeight||0:b.clientWidth||0:0,x=v/2-y/2,_=d[h],w=$-f[u]-d[m],I=$/2-f[u]/2+x,O=zp(_,I,w),P=s;n.modifiersData[o]=(t={},t[P]=O,t.centerOffset=O-I,t)}}function o7e(e){var t=e.state,n=e.options,o=n.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||zW(t.elements.popper,r)&&(t.elements.arrow=r))}const r7e={name:"arrow",enabled:!0,phase:"main",fn:n7e,effect:o7e,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Kd(e){return e.split("-")[1]}var i7e={top:"auto",right:"auto",bottom:"auto",left:"auto"};function a7e(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:Wd(n*r)/r||0,y:Wd(o*r)/r||0}}function gD(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,h=f===void 0?0:f,m=a.y,v=m===void 0?0:m,y=typeof u=="function"?u({x:h,y:v}):{x:h,y:v};h=y.x,v=y.y;var b=a.hasOwnProperty("x"),$=a.hasOwnProperty("y"),x=Hr,_=Fr,w=window;if(c){var I=ag(n),O="clientHeight",P="clientWidth";if(I===fi(n)&&(I=Ns(n),xl(I).position!=="static"&&l==="absolute"&&(O="scrollHeight",P="scrollWidth")),I=I,r===Fr||(r===Hr||r===ji)&&i===Ah){_=zi;var E=d&&I===w&&w.visualViewport?w.visualViewport.height:I[O];v-=E-o.height,v*=s?1:-1}if(r===Hr||(r===Fr||r===zi)&&i===Ah){x=ji;var R=d&&I===w&&w.visualViewport?w.visualViewport.width:I[P];h-=R-o.width,h*=s?1:-1}}var A=Object.assign({position:l},c&&i7e),N=u===!0?a7e({x:h,y:v},fi(n)):{x:h,y:v};if(h=N.x,v=N.y,s){var F;return Object.assign({},A,(F={},F[_]=$?"0":"",F[x]=b?"0":"",F.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",F))}return Object.assign({},A,(t={},t[_]=$?v+"px":"",t[x]=b?h+"px":"",t.transform="",t))}function l7e(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=o===void 0?!0:o,i=n.adaptive,a=i===void 0?!0:i,l=n.roundOffsets,s=l===void 0?!0:l,c={placement:Ma(t.placement),variation:Kd(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,gD(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,gD(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const s7e={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:l7e,data:{}};var Zv={passive:!0};function c7e(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=r===void 0?!0:r,a=o.resize,l=a===void 0?!0:a,s=fi(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,Zv)}),l&&s.addEventListener("resize",n.update,Zv),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Zv)}),l&&s.removeEventListener("resize",n.update,Zv)}}const u7e={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:c7e,data:{}};var d7e={left:"right",right:"left",bottom:"top",top:"bottom"};function Xm(e){return e.replace(/left|right|bottom|top/g,function(t){return d7e[t]})}var f7e={start:"end",end:"start"};function vD(e){return e.replace(/start|end/g,function(t){return f7e[t]})}function EP(e){var t=fi(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function AP(e){return Vd(Ns(e)).left+EP(e).scrollLeft}function p7e(e,t){var n=fi(e),o=Ns(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;var c=HW();(c||!c&&t==="fixed")&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l+AP(e),y:s}}function h7e(e){var t,n=Ns(e),o=EP(e),r=(t=e.ownerDocument)==null?void 0:t.body,i=Tc(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Tc(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+AP(e),s=-o.scrollTop;return xl(r||n).direction==="rtl"&&(l+=Tc(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}function MP(e){var t=xl(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function KW(e){return["html","body","#document"].indexOf(ka(e))>=0?e.ownerDocument.body:Di(e)&&MP(e)?e:KW(c1(e))}function jp(e,t){var n;t===void 0&&(t=[]);var o=KW(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),i=fi(o),a=r?[i].concat(i.visualViewport||[],MP(o)?o:[]):o,l=t.concat(a);return r?l:l.concat(jp(c1(a)))}function jw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function g7e(e,t){var n=Vd(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function mD(e,t,n){return t===BW?jw(p7e(e,n)):zc(t)?g7e(t,n):jw(h7e(Ns(e)))}function v7e(e){var t=jp(c1(e)),n=["absolute","fixed"].indexOf(xl(e).position)>=0,o=n&&Di(e)?ag(e):e;return zc(o)?t.filter(function(r){return zc(r)&&zW(r,o)&&ka(r)!=="body"}):[]}function m7e(e,t,n,o){var r=t==="clippingParents"?v7e(e):[].concat(t),i=[].concat(r,[n]),a=i[0],l=i.reduce(function(s,c){var u=mD(e,c,o);return s.top=Tc(u.top,s.top),s.right=rb(u.right,s.right),s.bottom=rb(u.bottom,s.bottom),s.left=Tc(u.left,s.left),s},mD(e,a,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function UW(e){var t=e.reference,n=e.element,o=e.placement,r=o?Ma(o):null,i=o?Kd(o):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,s;switch(r){case Fr:s={x:a,y:t.y-n.height};break;case zi:s={x:a,y:t.y+t.height};break;case ji:s={x:t.x+t.width,y:l};break;case Hr:s={x:t.x-n.width,y:l};break;default:s={x:t.x,y:t.y}}var c=r?TP(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case jd:s[c]=s[c]-(t[u]/2-n[u]/2);break;case Ah:s[c]=s[c]+(t[u]/2-n[u]/2);break}}return s}function Mh(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=o===void 0?e.placement:o,i=n.strategy,a=i===void 0?e.strategy:i,l=n.boundary,s=l===void 0?kNe:l,c=n.rootBoundary,u=c===void 0?BW:c,d=n.elementContext,f=d===void 0?Zf:d,h=n.altBoundary,m=h===void 0?!1:h,v=n.padding,y=v===void 0?0:v,b=WW(typeof y!="number"?y:VW(y,ig)),$=f===Zf?BNe:Zf,x=e.rects.popper,_=e.elements[m?$:f],w=m7e(zc(_)?_:_.contextElement||Ns(e.elements.popper),s,u,a),I=Vd(e.elements.reference),O=UW({reference:I,element:x,strategy:"absolute",placement:r}),P=jw(Object.assign({},x,O)),E=f===Zf?P:I,R={top:w.top-E.top+b.top,bottom:E.bottom-w.bottom+b.bottom,left:w.left-E.left+b.left,right:E.right-w.right+b.right},A=e.modifiersData.offset;if(f===Zf&&A){var N=A[r];Object.keys(R).forEach(function(F){var W=[ji,zi].indexOf(F)>=0?1:-1,D=[Fr,zi].indexOf(F)>=0?"y":"x";R[F]+=N[D]*W})}return R}function b7e(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?FW:s,u=Kd(o),d=u?l?pD:pD.filter(function(m){return Kd(m)===u}):ig,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var h=f.reduce(function(m,v){return m[v]=Mh(e,{placement:v,boundary:r,rootBoundary:i,padding:a})[Ma(v)],m},{});return Object.keys(h).sort(function(m,v){return h[m]-h[v]})}function y7e(e){if(Ma(e)===OP)return[];var t=Xm(e);return[vD(e),t,vD(t)]}function S7e(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!0:a,s=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,m=h===void 0?!0:h,v=n.allowedAutoPlacements,y=t.options.placement,b=Ma(y),$=b===y,x=s||($||!m?[Xm(y)]:y7e(y)),_=[y].concat(x).reduce(function(re,J){return re.concat(Ma(J)===OP?b7e(t,{placement:J,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:v}):J)},[]),w=t.rects.reference,I=t.rects.popper,O=new Map,P=!0,E=_[0],R=0;R<_.length;R++){var A=_[R],N=Ma(A),F=Kd(A)===jd,W=[Fr,zi].indexOf(N)>=0,D=W?"width":"height",B=Mh(t,{placement:A,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),k=W?F?ji:Hr:F?zi:Fr;w[D]>I[D]&&(k=Xm(k));var L=Xm(k),z=[];if(i&&z.push(B[N]<=0),l&&z.push(B[k]<=0,B[L]<=0),z.every(function(re){return re})){E=A,P=!1;break}O.set(A,z)}if(P)for(var K=m?3:1,G=function(J){var te=_.find(function(ee){var fe=O.get(ee);if(fe)return fe.slice(0,J).every(function(ie){return ie})});if(te)return E=te,"break"},Y=K;Y>0;Y--){var ne=G(Y);if(ne==="break")break}t.placement!==E&&(t.modifiersData[o]._skip=!0,t.placement=E,t.reset=!0)}}const C7e={name:"flip",enabled:!0,phase:"main",fn:S7e,requiresIfExists:["offset"],data:{_skip:!1}};function bD(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function yD(e){return[Fr,ji,zi,Hr].some(function(t){return e[t]>=0})}function $7e(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=Mh(t,{elementContext:"reference"}),l=Mh(t,{altBoundary:!0}),s=bD(a,o),c=bD(l,r,i),u=yD(s),d=yD(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const x7e={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$7e};function w7e(e,t,n){var o=Ma(e),r=[Hr,Fr].indexOf(o)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*r,[Hr,ji].indexOf(o)>=0?{x:l,y:a}:{x:a,y:l}}function _7e(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=r===void 0?[0,0]:r,a=FW.reduce(function(u,d){return u[d]=w7e(d,t.rects,i),u},{}),l=a[t.placement],s=l.x,c=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=a}const O7e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_7e};function I7e(e){var t=e.state,n=e.name;t.modifiersData[n]=UW({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const P7e={name:"popperOffsets",enabled:!0,phase:"read",fn:I7e,data:{}};function T7e(e){return e==="x"?"y":"x"}function E7e(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!1:a,s=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,m=n.tetherOffset,v=m===void 0?0:m,y=Mh(t,{boundary:s,rootBoundary:c,padding:d,altBoundary:u}),b=Ma(t.placement),$=Kd(t.placement),x=!$,_=TP(b),w=T7e(_),I=t.modifiersData.popperOffsets,O=t.rects.reference,P=t.rects.popper,E=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,R=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(I){if(i){var F,W=_==="y"?Fr:Hr,D=_==="y"?zi:ji,B=_==="y"?"height":"width",k=I[_],L=k+y[W],z=k-y[D],K=h?-P[B]/2:0,G=$===jd?O[B]:P[B],Y=$===jd?-P[B]:-O[B],ne=t.elements.arrow,re=h&&ne?PP(ne):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:jW(),te=J[W],ee=J[D],fe=zp(0,O[B],re[B]),ie=x?O[B]/2-K-fe-te-R.mainAxis:G-fe-te-R.mainAxis,X=x?-O[B]/2+K+fe+ee+R.mainAxis:Y+fe+ee+R.mainAxis,ue=t.elements.arrow&&ag(t.elements.arrow),ye=ue?_==="y"?ue.clientTop||0:ue.clientLeft||0:0,H=(F=A==null?void 0:A[_])!=null?F:0,j=k+ie-H-ye,q=k+X-H,se=zp(h?rb(L,j):L,k,h?Tc(z,q):z);I[_]=se,N[_]=se-k}if(l){var ae,ge=_==="x"?Fr:Hr,Se=_==="x"?zi:ji,$e=I[w],_e=w==="y"?"height":"width",be=$e+y[ge],Te=$e-y[Se],Pe=[Fr,Hr].indexOf(b)!==-1,oe=(ae=A==null?void 0:A[w])!=null?ae:0,le=Pe?be:$e-O[_e]-P[_e]-oe+R.altAxis,xe=Pe?$e+O[_e]+P[_e]-oe-R.altAxis:Te,Ae=h&&Pe?e7e(le,$e,xe):zp(h?le:be,$e,h?xe:Te);I[w]=Ae,N[w]=Ae-$e}t.modifiersData[o]=N}}const A7e={name:"preventOverflow",enabled:!0,phase:"main",fn:E7e,requiresIfExists:["offset"]};function M7e(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function R7e(e){return e===fi(e)||!Di(e)?EP(e):M7e(e)}function D7e(e){var t=e.getBoundingClientRect(),n=Wd(t.width)/e.offsetWidth||1,o=Wd(t.height)/e.offsetHeight||1;return n!==1||o!==1}function L7e(e,t,n){n===void 0&&(n=!1);var o=Di(t),r=Di(t)&&D7e(t),i=Ns(t),a=Vd(e,r,n),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!n)&&((ka(t)!=="body"||MP(i))&&(l=R7e(t)),Di(t)?(s=Vd(t,!0),s.x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=AP(i))),{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function N7e(e){var t=new Map,n=new Set,o=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var s=t.get(l);s&&r(s)}}),o.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),o}function k7e(e){var t=N7e(e);return YNe.reduce(function(n,o){return n.concat(t.filter(function(r){return r.phase===o}))},[])}function B7e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function F7e(e){var t=e.reduce(function(n,o){var r=n[o.name];return n[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,n},{});return Object.keys(t).map(function(n){return t[n]})}var SD={placement:"bottom",modifiers:[],strategy:"absolute"};function CD(){for(var e=arguments.length,t=new Array(e),n=0;n + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */function $D(e){return Object.prototype.toString.call(e)==="[object Object]"}function W7e(e){var t,n;return $D(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!($D(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function Wp(){return Wp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}const V7e={silent:!1,logLevel:"warn"},K7e=["validator"],YW=Object.prototype,XW=YW.toString,U7e=YW.hasOwnProperty,qW=/^\s*function (\w+)/;function xD(e){var t;const n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){const o=n.toString().match(qW);return o?o[1]:""}return""}const jc=W7e,G7e=e=>e;let lr=G7e;const Ud=(e,t)=>U7e.call(e,t),Y7e=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Gd=Array.isArray||function(e){return XW.call(e)==="[object Array]"},Yd=e=>XW.call(e)==="[object Function]",ib=e=>jc(e)&&Ud(e,"_vueTypes_name"),ZW=e=>jc(e)&&(Ud(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>Ud(e,t)));function RP(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function su(e,t,n=!1){let o,r=!0,i="";o=jc(e)?e:{type:e};const a=ib(o)?o._vueTypes_name+" - ":"";if(ZW(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&t===void 0)return r;Gd(o.type)?(r=o.type.some(l=>su(l,t,!0)===!0),i=o.type.map(l=>xD(l)).join(" or ")):(i=xD(o),r=i==="Array"?Gd(t):i==="Object"?jc(t):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(l){if(l==null)return"";const s=l.constructor.toString().match(qW);return s?s[1]:""}(t)===i:t instanceof o.type)}if(!r){const l=`${a}value "${t}" should be of type "${i}"`;return n===!1?(lr(l),!1):l}if(Ud(o,"validator")&&Yd(o.validator)){const l=lr,s=[];if(lr=c=>{s.push(c)},r=o.validator(t),lr=l,!r){const c=(s.length>1?"* ":"")+s.join(` +* `);return s.length=0,n===!1?(lr(c),r):c}}return r}function ci(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(r){return r===void 0?(Ud(this,"default")&&delete this.default,this):Yd(r)||su(this,r,!0)===!0?(this.default=Gd(r)?()=>[...r]:jc(r)?()=>Object.assign({},r):r,this):(lr(`${this._vueTypes_name} - invalid default value: "${r}"`),this)}}}),{validator:o}=n;return Yd(o)&&(n.validator=RP(o,n)),n}function Ra(e,t){const n=ci(e,t);return Object.defineProperty(n,"validate",{value(o){return Yd(this.validator)&&lr(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info: +${JSON.stringify(this)}`),this.validator=RP(o,this),this}})}function wD(e,t,n){const o=function(s){const c={};return Object.getOwnPropertyNames(s).forEach(u=>{c[u]=Object.getOwnPropertyDescriptor(s,u)}),Object.defineProperties({},c)}(t);if(o._vueTypes_name=e,!jc(n))return o;const{validator:r}=n,i=GW(n,K7e);if(Yd(r)){let{validator:s}=o;s&&(s=(l=(a=s).__original)!==null&&l!==void 0?l:a),o.validator=RP(s?function(c){return s.call(this,c)&&r.call(this,c)}:r,o)}var a,l;return Object.assign(o,i)}function u1(e){return e.replace(/^(?!\s*$)/gm," ")}const X7e=()=>Ra("any",{}),q7e=()=>Ra("function",{type:Function}),Z7e=()=>Ra("boolean",{type:Boolean}),Q7e=()=>Ra("string",{type:String}),J7e=()=>Ra("number",{type:Number}),eke=()=>Ra("array",{type:Array}),tke=()=>Ra("object",{type:Object}),nke=()=>ci("integer",{type:Number,validator:e=>Y7e(e)}),oke=()=>ci("symbol",{validator:e=>typeof e=="symbol"});function rke(e,t="custom validation failed"){if(typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return ci(e.name||"<>",{type:null,validator(n){const o=e(n);return o||lr(`${this._vueTypes_name} - ${t}`),o}})}function ike(e){if(!Gd(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.join('", "')}".`,n=e.reduce((o,r)=>{if(r!=null){const i=r.constructor;o.indexOf(i)===-1&&o.push(i)}return o},[]);return ci("oneOf",{type:n.length>0?n:void 0,validator(o){const r=e.indexOf(o)!==-1;return r||lr(t),r}})}function ake(e){if(!Gd(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=[];for(let r=0;rn.indexOf(r)===i);const o=n.length>0?n:null;return ci("oneOfType",t?{type:o,validator(r){const i=[],a=e.some(l=>{const s=su(ib(l)&&l._vueTypes_name==="oneOf"?l.type||null:l,r,!0);return typeof s=="string"&&i.push(s),s===!0});return a||lr(`oneOfType - provided value does not match any of the ${i.length} passed-in validators: +${u1(i.join(` +`))}`),a}}:{type:o})}function lke(e){return ci("arrayOf",{type:Array,validator(t){let n="";const o=t.every(r=>(n=su(e,r,!0),n===!0));return o||lr(`arrayOf - value validation error: +${u1(n)}`),o}})}function ske(e){return ci("instanceOf",{type:e})}function cke(e){return ci("objectOf",{type:Object,validator(t){let n="";const o=Object.keys(t).every(r=>(n=su(e,t[r],!0),n===!0));return o||lr(`objectOf - value validation error: +${u1(n)}`),o}})}function uke(e){const t=Object.keys(e),n=t.filter(r=>{var i;return!((i=e[r])===null||i===void 0||!i.required)}),o=ci("shape",{type:Object,validator(r){if(!jc(r))return!1;const i=Object.keys(r);if(n.length>0&&n.some(a=>i.indexOf(a)===-1)){const a=n.filter(l=>i.indexOf(l)===-1);return lr(a.length===1?`shape - required property "${a[0]}" is not defined.`:`shape - required properties "${a.join('", "')}" are not defined.`),!1}return i.every(a=>{if(t.indexOf(a)===-1)return this._vueTypes_isLoose===!0||(lr(`shape - shape definition does not include a "${a}" property. Allowed keys: "${t.join('", "')}".`),!1);const l=su(e[a],r[a],!0);return typeof l=="string"&&lr(`shape - "${a}" property validation error: + ${u1(l)}`),l===!0})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),o}const dke=["name","validate","getter"],fke=(()=>{var e;return(e=class{static get any(){return X7e()}static get func(){return q7e().def(this.defaults.func)}static get bool(){return Z7e().def(this.defaults.bool)}static get string(){return Q7e().def(this.defaults.string)}static get number(){return J7e().def(this.defaults.number)}static get array(){return eke().def(this.defaults.array)}static get object(){return tke().def(this.defaults.object)}static get integer(){return nke().def(this.defaults.integer)}static get symbol(){return oke()}static get nullable(){return{type:null}}static extend(t){if(Gd(t))return t.forEach(s=>this.extend(s)),this;const{name:n,validate:o=!1,getter:r=!1}=t,i=GW(t,dke);if(Ud(this,n))throw new TypeError(`[VueTypes error]: Type "${n}" already defined`);const{type:a}=i;if(ib(a))return delete i.type,Object.defineProperty(this,n,r?{get:()=>wD(n,a,i)}:{value(...s){const c=wD(n,a,i);return c.validator&&(c.validator=c.validator.bind(c,...s)),c}});let l;return l=r?{get(){const s=Object.assign({},i);return o?Ra(n,s):ci(n,s)},enumerable:!0}:{value(...s){const c=Object.assign({},i);let u;return u=o?Ra(n,c):ci(n,c),c.validator&&(u.validator=c.validator.bind(u,...s)),u},enumerable:!0},Object.defineProperty(this,n,l)}}).defaults={},e.sensibleDefaults=void 0,e.config=V7e,e.custom=rke,e.oneOf=ike,e.instanceOf=ske,e.oneOfType=ake,e.arrayOf=lke,e.objectOf=cke,e.shape=uke,e.utils={validate:(t,n)=>su(n,t,!0)===!0,toType:(t,n,o=!1)=>o?Ra(t,n):ci(t,n)},e})();function pke(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;return(t=class extends fke{static get sensibleDefaults(){return Wp({},this.defaults)}static set sensibleDefaults(n){this.defaults=n!==!1?Wp({},n!==!0?n:e):{}}}).defaults=Wp({},e),t}let Bt=class extends pke(){};var _D=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function DP(e){var t={exports:{}};return e(t,t.exports),t.exports}var Qv=function(e){return e&&e.Math==Math&&e},Po=Qv(typeof globalThis=="object"&&globalThis)||Qv(typeof window=="object"&&window)||Qv(typeof self=="object"&&self)||Qv(typeof _D=="object"&&_D)||function(){return this}()||Function("return this")(),Dn=function(e){try{return!!e()}catch{return!0}},Ti=!Dn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),OD={}.propertyIsEnumerable,ID=Object.getOwnPropertyDescriptor,hke={f:ID&&!OD.call({1:2},1)?function(e){var t=ID(this,e);return!!t&&t.enumerable}:OD},d1=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},gke={}.toString,bl=function(e){return gke.call(e).slice(8,-1)},vke="".split,f1=Dn(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return bl(e)=="String"?vke.call(e,""):Object(e)}:Object,_s=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},vf=function(e){return f1(_s(e))},Lo=function(e){return typeof e=="object"?e!==null:typeof e=="function"},LP=function(e,t){if(!Lo(e))return e;var n,o;if(t&&typeof(n=e.toString)=="function"&&!Lo(o=n.call(e))||typeof(n=e.valueOf)=="function"&&!Lo(o=n.call(e))||!t&&typeof(n=e.toString)=="function"&&!Lo(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")},mke={}.hasOwnProperty,go=function(e,t){return mke.call(e,t)},Ww=Po.document,bke=Lo(Ww)&&Lo(Ww.createElement),QW=function(e){return bke?Ww.createElement(e):{}},JW=!Ti&&!Dn(function(){return Object.defineProperty(QW("div"),"a",{get:function(){return 7}}).a!=7}),PD=Object.getOwnPropertyDescriptor,NP={f:Ti?PD:function(e,t){if(e=vf(e),t=LP(t,!0),JW)try{return PD(e,t)}catch{}if(go(e,t))return d1(!hke.f.call(e,t),e[t])}},$r=function(e){if(!Lo(e))throw TypeError(String(e)+" is not an object");return e},TD=Object.defineProperty,Rl={f:Ti?TD:function(e,t,n){if($r(e),t=LP(t,!0),$r(n),JW)try{return TD(e,t,n)}catch{}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Li=Ti?function(e,t,n){return Rl.f(e,t,d1(1,n))}:function(e,t,n){return e[t]=n,e},kP=function(e,t){try{Li(Po,e,t)}catch{Po[e]=t}return t},Wc=Po["__core-js_shared__"]||kP("__core-js_shared__",{}),yke=Function.toString;typeof Wc.inspectSource!="function"&&(Wc.inspectSource=function(e){return yke.call(e)});var ab,Vp,lb,eV=Wc.inspectSource,ED=Po.WeakMap,Ske=typeof ED=="function"&&/native code/.test(eV(ED)),tV=DP(function(e){(e.exports=function(t,n){return Wc[t]||(Wc[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.8.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Cke=0,$ke=Math.random(),BP=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Cke+$ke).toString(36)},AD=tV("keys"),FP=function(e){return AD[e]||(AD[e]=BP(e))},p1={},xke=Po.WeakMap;if(Ske){var Nu=Wc.state||(Wc.state=new xke),wke=Nu.get,_ke=Nu.has,Oke=Nu.set;ab=function(e,t){return t.facade=e,Oke.call(Nu,e,t),t},Vp=function(e){return wke.call(Nu,e)||{}},lb=function(e){return _ke.call(Nu,e)}}else{var Qf=FP("state");p1[Qf]=!0,ab=function(e,t){return t.facade=e,Li(e,Qf,t),t},Vp=function(e){return go(e,Qf)?e[Qf]:{}},lb=function(e){return go(e,Qf)}}var Os={set:ab,get:Vp,has:lb,enforce:function(e){return lb(e)?Vp(e):ab(e,{})},getterFor:function(e){return function(t){var n;if(!Lo(t)||(n=Vp(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Is=DP(function(e){var t=Os.get,n=Os.enforce,o=String(String).split("String");(e.exports=function(r,i,a,l){var s,c=!!l&&!!l.unsafe,u=!!l&&!!l.enumerable,d=!!l&&!!l.noTargetGet;typeof a=="function"&&(typeof i!="string"||go(a,"name")||Li(a,"name",i),(s=n(a)).source||(s.source=o.join(typeof i=="string"?i:""))),r!==Po?(c?!d&&r[i]&&(u=!0):delete r[i],u?r[i]=a:Li(r,i,a)):u?r[i]=a:kP(i,a)})(Function.prototype,"toString",function(){return typeof this=="function"&&t(this).source||eV(this)})}),s$=Po,MD=function(e){return typeof e=="function"?e:void 0},h1=function(e,t){return arguments.length<2?MD(s$[e])||MD(Po[e]):s$[e]&&s$[e][t]||Po[e]&&Po[e][t]},Ike=Math.ceil,Pke=Math.floor,mf=function(e){return isNaN(e=+e)?0:(e>0?Pke:Ike)(e)},Tke=Math.min,pi=function(e){return e>0?Tke(mf(e),9007199254740991):0},Eke=Math.max,Ake=Math.min,sb=function(e,t){var n=mf(e);return n<0?Eke(n+t,0):Ake(n,t)},RD=function(e){return function(t,n,o){var r,i=vf(t),a=pi(i.length),l=sb(o,a);if(e&&n!=n){for(;a>l;)if((r=i[l++])!=r)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},nV={includes:RD(!0),indexOf:RD(!1)},Mke=nV.indexOf,oV=function(e,t){var n,o=vf(e),r=0,i=[];for(n in o)!go(p1,n)&&go(o,n)&&i.push(n);for(;t.length>r;)go(o,n=t[r++])&&(~Mke(i,n)||i.push(n));return i},cb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Rke=cb.concat("length","prototype"),Dke={f:Object.getOwnPropertyNames||function(e){return oV(e,Rke)}},Lke={f:Object.getOwnPropertySymbols},Nke=h1("Reflect","ownKeys")||function(e){var t=Dke.f($r(e)),n=Lke.f;return n?t.concat(n(e)):t},kke=function(e,t){for(var n=Nke(t),o=Rl.f,r=NP.f,i=0;i1?arguments[1]:void 0)}});(function(){function e(){cu(this,e)}return uu(e,null,[{key:"isInBrowser",value:function(){return typeof window<"u"}},{key:"isServer",value:function(){return typeof window>"u"}},{key:"getUA",value:function(){return e.isInBrowser()?window.navigator.userAgent.toLowerCase():""}},{key:"isMobile",value:function(){return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion)}},{key:"isOpera",value:function(){return navigator.userAgent.indexOf("Opera")!==-1}},{key:"isIE",value:function(){var t=e.getUA();return t!==""&&t.indexOf("msie")>0}},{key:"isIE9",value:function(){var t=e.getUA();return t!==""&&t.indexOf("msie 9.0")>0}},{key:"isEdge",value:function(){var t=e.getUA();return t!==""&&t.indexOf("edge/")>0}},{key:"isChrome",value:function(){var t=e.getUA();return t!==""&&/chrome\/\d+/.test(t)&&!e.isEdge()}},{key:"isPhantomJS",value:function(){var t=e.getUA();return t!==""&&/phantomjs/.test(t)}},{key:"isFirefox",value:function(){var t=e.getUA();return t!==""&&/firefox/.test(t)}}]),e})();var Yke=[].join,Xke=f1!=Object,qke=HP("join",",");pr({target:"Array",proto:!0,forced:Xke||!qke},{join:function(e){return Yke.call(vf(this),e===void 0?",":e)}});var ku,ub,Dl=function(e){return Object(_s(e))},Xd=Array.isArray||function(e){return bl(e)=="Array"},iV=!!Object.getOwnPropertySymbols&&!Dn(function(){return!String(Symbol())}),Zke=iV&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Jv=tV("wks"),Kp=Po.Symbol,Qke=Zke?Kp:Kp&&Kp.withoutSetter||BP,no=function(e){return go(Jv,e)||(iV&&go(Kp,e)?Jv[e]=Kp[e]:Jv[e]=Qke("Symbol."+e)),Jv[e]},Jke=no("species"),g1=function(e,t){var n;return Xd(e)&&(typeof(n=e.constructor)!="function"||n!==Array&&!Xd(n.prototype)?Lo(n)&&(n=n[Jke])===null&&(n=void 0):n=void 0),new(n===void 0?Array:n)(t===0?0:t)},qd=function(e,t,n){var o=LP(t);o in e?Rl.f(e,o,d1(0,n)):e[o]=n},u$=h1("navigator","userAgent")||"",kD=Po.process,BD=kD&&kD.versions,FD=BD&&BD.v8;FD?ub=(ku=FD.split("."))[0]+ku[1]:u$&&(!(ku=u$.match(/Edge\/(\d+)/))||ku[1]>=74)&&(ku=u$.match(/Chrome\/(\d+)/))&&(ub=ku[1]);var db=ub&&+ub,e9e=no("species"),zP=function(e){return db>=51||!Dn(function(){var t=[];return(t.constructor={})[e9e]=function(){return{foo:1}},t[e](Boolean).foo!==1})},t9e=zP("splice"),n9e=bf("splice",{ACCESSORS:!0,0:0,1:2}),o9e=Math.max,r9e=Math.min;pr({target:"Array",proto:!0,forced:!t9e||!n9e},{splice:function(e,t){var n,o,r,i,a,l,s=Dl(this),c=pi(s.length),u=sb(e,c),d=arguments.length;if(d===0?n=o=0:d===1?(n=0,o=c-u):(n=d-2,o=r9e(o9e(mf(t),0),c-u)),c+n-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(r=g1(s,o),i=0;ic-o+n;i--)delete s[i-1]}else if(n>o)for(i=c-o;i>u;i--)l=i+n-1,(a=i+o-1)in s?s[l]=s[a]:delete s[l];for(i=0;i0&&(!i.multiline||i.multiline&&e[i.lastIndex-1]!==` +`)&&(s="(?: "+s+")",u=" "+u,c++),n=new RegExp("^(?:"+s+")",l)),h$&&(n=new RegExp("^"+s+"$(?!\\s)",l)),p$&&(t=i.lastIndex),o=fb.call(a?n:i,u),a?o?(o.input=o.input.slice(c),o[0]=o[0].slice(c),o.index=i.lastIndex,i.lastIndex+=o[0].length):i.lastIndex=0:p$&&o&&(i.lastIndex=i.global?o.index+o[0].length:t),h$&&o&&o.length>1&&s9e.call(o[0],n,function(){for(r=1;r")!=="7"}),WD="a".replace(/./,"$0")==="$0",VD=no("replace"),KD=!!/./[VD]&&/./[VD]("a","$0")==="",p9e=!Dn(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),fV=function(e,t,n,o){var r=no(e),i=!Dn(function(){var d={};return d[r]=function(){return 7},""[e](d)!=7}),a=i&&!Dn(function(){var d=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[d9e]=function(){return f},f.flags="",f[r]=/./[r]),f.exec=function(){return d=!0,null},f[r](""),!d});if(!i||!a||e==="replace"&&(!f9e||!WD||KD)||e==="split"&&!p9e){var l=/./[r],s=n(r,""[e],function(d,f,h,m,v){return f.exec===Rh?i&&!v?{done:!0,value:l.call(f,h,m)}:{done:!0,value:d.call(h,f,m)}:{done:!1}},{REPLACE_KEEPS_$0:WD,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:KD}),c=s[0],u=s[1];Is(String.prototype,e,c),Is(RegExp.prototype,r,t==2?function(d,f){return u.call(d,this,f)}:function(d){return u.call(d,this)})}o&&Li(RegExp.prototype[r],"sham",!0)},h9e=no("match"),pV=function(e){var t;return Lo(e)&&((t=e[h9e])!==void 0?!!t:bl(e)=="RegExp")},WP=function(e){if(typeof e!="function")throw TypeError(String(e)+" is not a function");return e},g9e=no("species"),UD=function(e){return function(t,n){var o,r,i=String(_s(t)),a=mf(n),l=i.length;return a<0||a>=l?e?"":void 0:(o=i.charCodeAt(a))<55296||o>56319||a+1===l||(r=i.charCodeAt(a+1))<56320||r>57343?e?i.charAt(a):o:e?i.slice(a,a+2):r-56320+(o-55296<<10)+65536}},hV={codeAt:UD(!1),charAt:UD(!0)},v9e=hV.charAt,gV=function(e,t,n){return t+(n?v9e(e,t).length:1)},Kw=function(e,t){var n=e.exec;if(typeof n=="function"){var o=n.call(e,t);if(typeof o!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return o}if(bl(e)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return Rh.call(e,t)},m9e=[].push,b9e=Math.min,Bu=!Dn(function(){return!RegExp(4294967295,"y")});fV("split",2,function(e,t,n){var o;return o="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(r,i){var a=String(_s(this)),l=i===void 0?4294967295:i>>>0;if(l===0)return[];if(r===void 0)return[a];if(!pV(r))return t.call(a,r,l);for(var s,c,u,d=[],f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),h=0,m=new RegExp(r.source,f+"g");(s=Rh.call(m,a))&&!((c=m.lastIndex)>h&&(d.push(a.slice(h,s.index)),s.length>1&&s.index=l));)m.lastIndex===s.index&&m.lastIndex++;return h===a.length?!u&&m.test("")||d.push(""):d.push(a.slice(h)),d.length>l?d.slice(0,l):d}:"0".split(void 0,0).length?function(r,i){return r===void 0&&i===0?[]:t.call(this,r,i)}:t,[function(r,i){var a=_s(this),l=r==null?void 0:r[e];return l!==void 0?l.call(r,a,i):o.call(String(a),r,i)},function(r,i){var a=n(o,r,this,i,o!==t);if(a.done)return a.value;var l=$r(r),s=String(this),c=function(_,w){var I,O=$r(_).constructor;return O===void 0||(I=$r(O)[g9e])==null?w:WP(I)}(l,RegExp),u=l.unicode,d=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(Bu?"y":"g"),f=new c(Bu?l:"^(?:"+l.source+")",d),h=i===void 0?4294967295:i>>>0;if(h===0)return[];if(s.length===0)return Kw(f,s)===null?[s]:[];for(var m=0,v=0,y=[];v1?arguments[1]:void 0,t.length)),o=String(e);return GD?GD.call(t,o,n):t.slice(n,n+o.length)===o}});var Fu=function(e){return typeof e=="string"},Hu=function(e){return e!==null&&mV(e)==="object"},Zd=function(){function e(){cu(this,e)}return uu(e,null,[{key:"isWindow",value:function(t){return t===window}},{key:"addEventListener",value:function(t,n,o){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];t&&n&&o&&t.addEventListener(n,o,r)}},{key:"removeEventListener",value:function(t,n,o){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];t&&n&&o&&t.removeEventListener(n,o,r)}},{key:"triggerDragEvent",value:function(t,n){var o=!1,r=function(a){var l;(l=n.drag)===null||l===void 0||l.call(n,a)},i=function a(l){var s;e.removeEventListener(document,"mousemove",r),e.removeEventListener(document,"mouseup",a),document.onselectstart=null,document.ondragstart=null,o=!1,(s=n.end)===null||s===void 0||s.call(n,l)};e.addEventListener(t,"mousedown",function(a){var l;o||(document.onselectstart=function(){return!1},document.ondragstart=function(){return!1},e.addEventListener(document,"mousemove",r),e.addEventListener(document,"mouseup",i),o=!0,(l=n.start)===null||l===void 0||l.call(n,a))})}},{key:"getBoundingClientRect",value:function(t){return t&&Hu(t)&&t.nodeType===1?t.getBoundingClientRect():null}},{key:"hasClass",value:function(t,n){return!!(t&&Hu(t)&&Fu(n)&&t.nodeType===1)&&t.classList.contains(n.trim())}},{key:"addClass",value:function(t,n){if(t&&Hu(t)&&Fu(n)&&t.nodeType===1&&(n=n.trim(),!e.hasClass(t,n))){var o=t.className;t.className=o?o+" "+n:n}}},{key:"removeClass",value:function(t,n){if(t&&Hu(t)&&Fu(n)&&t.nodeType===1&&typeof t.className=="string"){n=n.trim();for(var o=t.className.trim().split(" "),r=o.length-1;r>=0;r--)o[r]=o[r].trim(),o[r]&&o[r]!==n||o.splice(r,1);t.className=o.join(" ")}}},{key:"toggleClass",value:function(t,n,o){t&&Hu(t)&&Fu(n)&&t.nodeType===1&&t.classList.toggle(n,o)}},{key:"replaceClass",value:function(t,n,o){t&&Hu(t)&&Fu(n)&&Fu(o)&&t.nodeType===1&&(n=n.trim(),o=o.trim(),e.removeClass(t,n),e.addClass(t,o))}},{key:"getScrollTop",value:function(t){var n="scrollTop"in t?t.scrollTop:t.pageYOffset;return Math.max(n,0)}},{key:"setScrollTop",value:function(t,n){"scrollTop"in t?t.scrollTop=n:t.scrollTo(t.scrollX,n)}},{key:"getRootScrollTop",value:function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}},{key:"setRootScrollTop",value:function(t){e.setScrollTop(window,t),e.setScrollTop(document.body,t)}},{key:"getElementTop",value:function(t,n){if(e.isWindow(t))return 0;var o=n?e.getScrollTop(n):e.getRootScrollTop();return t.getBoundingClientRect().top+o}},{key:"getVisibleHeight",value:function(t){return e.isWindow(t)?t.innerHeight:t.getBoundingClientRect().height}},{key:"isHidden",value:function(t){if(!t)return!1;var n=window.getComputedStyle(t),o=n.display==="none",r=t.offsetParent===null&&n.position!=="fixed";return o||r}},{key:"triggerEvent",value:function(t,n){if("createEvent"in document){var o=document.createEvent("HTMLEvents");o.initEvent(n,!1,!0),t.dispatchEvent(o)}}},{key:"calcAngle",value:function(t,n){var o=t.getBoundingClientRect(),r=o.left+o.width/2,i=o.top+o.height/2,a=Math.abs(r-n.clientX),l=Math.abs(i-n.clientY),s=l/Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),c=Math.acos(s),u=Math.floor(180/(Math.PI/c));return n.clientX>r&&n.clientY>i&&(u=180-u),n.clientX==r&&n.clientY>i&&(u=180),n.clientX>r&&n.clientY==i&&(u=90),n.clientXi&&(u=180+u),n.clientX1?o-1:0),i=1;i]*>)/g,k9e=/\$([$&'`]|\d\d?)/g,B9e=function(e,t,n,o,r,i){var a=n+e.length,l=o.length,s=k9e;return r!==void 0&&(r=Dl(r),s=N9e),L9e.call(i,s,function(c,u){var d;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":d=r[u.slice(1,-1)];break;default:var f=+u;if(f===0)return c;if(f>l){var h=D9e(f/10);return h===0?c:h<=l?o[h-1]===void 0?u.charAt(1):o[h-1]+u.charAt(1):c}d=o[f-1]}return d===void 0?"":d})},F9e=Math.max,H9e=Math.min;fV("replace",2,function(e,t,n,o){var r=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=o.REPLACE_KEEPS_$0,a=r?"$":"$0";return[function(l,s){var c=_s(this),u=l==null?void 0:l[e];return u!==void 0?u.call(l,c,s):t.call(String(c),l,s)},function(l,s){if(!r&&i||typeof s=="string"&&s.indexOf(a)===-1){var c=n(t,l,this,s);if(c.done)return c.value}var u=$r(l),d=String(this),f=typeof s=="function";f||(s=String(s));var h=u.global;if(h){var m=u.unicode;u.lastIndex=0}for(var v=[];;){var y=Kw(u,d);if(y===null||(v.push(y),!h))break;String(y[0])===""&&(u.lastIndex=gV(d,pi(u.lastIndex),m))}for(var b,$="",x=0,_=0;_=x&&($+=d.slice(x,I)+A,x=I+w.length)}return $+d.slice(x)}]});(function(){function e(){cu(this,e)}return uu(e,null,[{key:"camelize",value:function(t){return t.replace(/-(\w)/g,function(n,o){return o?o.toUpperCase():""})}},{key:"capitalize",value:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}]),e})();(function(){function e(){cu(this,e)}return uu(e,null,[{key:"_clone",value:function(){}}]),e})();var bV=no("isConcatSpreadable"),z9e=db>=51||!Dn(function(){var e=[];return e[bV]=!1,e.concat()[0]!==e}),j9e=zP("concat"),W9e=function(e){if(!Lo(e))return!1;var t=e[bV];return t!==void 0?!!t:Xd(e)};pr({target:"Array",proto:!0,forced:!z9e||!j9e},{concat:function(e){var t,n,o,r,i,a=Dl(this),l=g1(a,0),s=0;for(t=-1,o=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");qd(l,s++,i)}return l.length=s,l}});var m$,sg=function(e,t,n){if(WP(e),t===void 0)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(o){return e.call(t,o)};case 2:return function(o,r){return e.call(t,o,r)};case 3:return function(o,r,i){return e.call(t,o,r,i)}}return function(){return e.apply(t,arguments)}},YD=[].push,Ql=function(e){var t=e==1,n=e==2,o=e==3,r=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,c,u,d){for(var f,h,m=Dl(s),v=f1(m),y=sg(c,u,3),b=pi(v.length),$=0,x=d||g1,_=t?x(s,b):n||a?x(s,0):void 0;b>$;$++)if((l||$ in v)&&(h=y(f=v[$],$,m),e))if(t)_[$]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return $;case 2:YD.call(_,f)}else switch(e){case 4:return!1;case 7:YD.call(_,f)}return i?-1:o||r?r:_}},yV={forEach:Ql(0),map:Ql(1),filter:Ql(2),some:Ql(3),every:Ql(4),find:Ql(5),findIndex:Ql(6),filterOut:Ql(7)},V9e=Ti?Object.defineProperties:function(e,t){$r(e);for(var n,o=VP(t),r=o.length,i=0;r>i;)Rl.f(e,n=o[i++],t[n]);return e},K9e=h1("document","documentElement"),SV=FP("IE_PROTO"),b$=function(){},XD=function(e){return" + diff --git a/ui-vue3/package.json b/ui-vue3/package.json index 26e805fd3..5701774d3 100644 --- a/ui-vue3/package.json +++ b/ui-vue3/package.json @@ -38,6 +38,7 @@ "monaco-editor": "^0.52.2", "nprogress": "^0.2.0", "pinia": "^2.1.7", + "pinia-plugin-persistedstate": "^4.7.1", "pinyin-pro": "^3.19.3", "ts-node": "^10.9.2", "tslib": "^2.6.2", diff --git a/ui-vue3/src/Login.vue b/ui-vue3/src/Login.vue index 528f79c5d..1988b7edf 100644 --- a/ui-vue3/src/Login.vue +++ b/ui-vue3/src/Login.vue @@ -16,12 +16,15 @@ --> diff --git a/ui-vue3/src/base/constants.ts b/ui-vue3/src/base/constants.ts index 7955b9f3e..166772eff 100644 --- a/ui-vue3/src/base/constants.ts +++ b/ui-vue3/src/base/constants.ts @@ -71,7 +71,8 @@ export const TAB_HEADER_TITLE: Component = { ) => { const route = c.route const header: any = route.meta?.slots?.header - return h(header) || h('div', route.params?.pathId) + const headerParamKey = route.meta?.headerParamKey || 'pathId' + return h(header) || h('div', route.params?.[headerParamKey]) // console.log(h) // return h("div", "foo") } diff --git a/ui-vue3/src/base/http/request.ts b/ui-vue3/src/base/http/request.ts index 742a24486..8a04f58f0 100644 --- a/ui-vue3/src/base/http/request.ts +++ b/ui-vue3/src/base/http/request.ts @@ -30,8 +30,8 @@ import { useMeshStore } from '@/stores/mesh' import { message } from 'ant-design-vue' import { HTTP_STATUS } from './constants' -// 白名单:对于这些 URL 不进行 message 错误提示 -const SILENT_ERROR_URLS = ['/promQL/query'] +// 白名单:对于这些 URL 不进行 message 错误提示 不要 URL 前面的 / +const SILENT_ERROR_URLS = ['promQL/query'] // 检查 URL 是否在静默错误白名单中 const isSilentErrorUrl = (url?: string): boolean => { @@ -128,7 +128,9 @@ response.use( console.error(errorMsg) } else { // Handle network or other errors - message.error('NetworkError:请求失败,请检查网络连接') + if (!isSilentErrorUrl(error.config?.url)) { + message.error('NetworkError:请求失败,请检查网络连接') + } console.error(error) } return Promise.reject(error.response?.data) diff --git a/ui-vue3/src/base/i18n/en.ts b/ui-vue3/src/base/i18n/en.ts index 50a1e15ab..e799d6587 100644 --- a/ui-vue3/src/base/i18n/en.ts +++ b/ui-vue3/src/base/i18n/en.ts @@ -184,6 +184,7 @@ const words: I18nType = { whichApplication: 'application', registerTime: 'Register Time', startTime_k8s: 'Start Time(k8s)', + readyTime_k8s: 'Ready Time(k8s)', registerStates: 'Register States', deployState: 'Deployment Status', owningWorkload_k8s: 'Owning Workload(k8s)', diff --git a/ui-vue3/src/base/i18n/zh.ts b/ui-vue3/src/base/i18n/zh.ts index ef4d3012a..cc2b04f35 100644 --- a/ui-vue3/src/base/i18n/zh.ts +++ b/ui-vue3/src/base/i18n/zh.ts @@ -163,7 +163,8 @@ const words: I18nType = { instanceCount: '实例数量', instanceName: '实例名称', creationTime_k8s: '创建时间(k8s)', - startTime_k8s: '启动时间(k8s)' + startTime_k8s: '启动时间(k8s)', + readyTime_k8s: '就绪时间(k8s)' }, serviceDomain: { name: '服务名', diff --git a/ui-vue3/src/components/GrafanaPage.vue b/ui-vue3/src/components/GrafanaPage.vue index 320d70e2e..881c89df5 100644 --- a/ui-vue3/src/components/GrafanaPage.vue +++ b/ui-vue3/src/components/GrafanaPage.vue @@ -46,9 +46,7 @@ const grafanaUrl = ref('') const route = useRoute() onMounted(async () => { let res = await grafana.api({}) - grafana.url = `${window.location.origin}/grafana/d/${ - res.data?.baseURL.split('/d/')[1].split('?')[0] - }?var-${grafana.type}=${grafana.name}&kiosk=tv` + grafana.url = `${res.data?.baseURL}?var-${grafana.type}=${grafana.name}&kiosk=1?&theme=light` grafana.showIframe = true }) diff --git a/ui-vue3/src/router/RouterMeta.ts b/ui-vue3/src/router/RouterMeta.ts index 0950b87d2..fbda6db09 100644 --- a/ui-vue3/src/router/RouterMeta.ts +++ b/ui-vue3/src/router/RouterMeta.ts @@ -27,4 +27,5 @@ export interface RouterMeta extends RouteMeta { _router_key?: string parent?: RouteRecordType slots?: { [key: string]: Component } + headerParamKey?: string } diff --git a/ui-vue3/src/router/defaultRoutes.ts b/ui-vue3/src/router/defaultRoutes.ts index 675bc5b5f..eb55c781a 100644 --- a/ui-vue3/src/router/defaultRoutes.ts +++ b/ui-vue3/src/router/defaultRoutes.ts @@ -193,7 +193,8 @@ export const routes: Readonly = [ meta: { tab: true, icon: 'tabler:list-details', - back: '/resources/instances/list' + back: '/resources/instances/list', + headerParamKey: 'appName' } }, { diff --git a/ui-vue3/src/utils/SearchUtil.ts b/ui-vue3/src/utils/SearchUtil.ts index b5d30950c..d56873a70 100644 --- a/ui-vue3/src/utils/SearchUtil.ts +++ b/ui-vue3/src/utils/SearchUtil.ts @@ -104,7 +104,7 @@ export class SearchDomain { this.result = handleResult ? handleResult(list) : list if (!this.noPaged) { - this.paged.total = pageInfo?.Total || 0 + this.paged.total = pageInfo?.total || 0 } }) .catch((error: any) => { diff --git a/ui-vue3/src/views/resources/applications/index.vue b/ui-vue3/src/views/resources/applications/index.vue index 857721800..c343e7bf9 100644 --- a/ui-vue3/src/views/resources/applications/index.vue +++ b/ui-vue3/src/views/resources/applications/index.vue @@ -30,15 +30,20 @@ @@ -132,15 +137,5 @@ watch(route, (a, b) => { min-height: 60vh; //max-height: 70vh; //overflow: auto; - .app-link { - padding: 4px 10px 4px 4px; - border-radius: 4px; - color: v-bind('PRIMARY_COLOR'); - - &:hover { - cursor: pointer; - background: rgba(133, 131, 131, 0.13); - } - } } diff --git a/ui-vue3/src/views/resources/applications/tabs/config.vue b/ui-vue3/src/views/resources/applications/tabs/config.vue index 64b95c47d..0fd29b539 100644 --- a/ui-vue3/src/views/resources/applications/tabs/config.vue +++ b/ui-vue3/src/views/resources/applications/tabs/config.vue @@ -23,7 +23,12 @@