@telia-ace/widget-core-flamingo 1.0.14 → 1.1.12-rc.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. package/bootstrap.d.ts +3 -0
  2. package/components/ace-widget.component.d.ts +21 -0
  3. package/components/trigger.component.d.ts +14 -0
  4. package/components/unresolved.component.d.ts +7 -0
  5. package/components/widget.component.d.ts +18 -0
  6. package/components/wrapper.component.d.ts +13 -0
  7. package/index-5087564d.mjs +335 -0
  8. package/index-6dd00f59.js +1 -0
  9. package/index.d.ts +9 -0
  10. package/index.js +261 -0
  11. package/index.mjs +2021 -0
  12. package/models/application.d.ts +27 -0
  13. package/models/container.d.ts +16 -0
  14. package/models/environment.d.ts +12 -0
  15. package/models/site.d.ts +12 -0
  16. package/package.json +7 -43
  17. package/services/component-platform.d.ts +13 -0
  18. package/services/component-resolver.d.ts +8 -0
  19. package/services/http-client.service.d.ts +11 -0
  20. package/types.d.ts +47 -0
  21. package/utils/map-branding.d.ts +1 -0
  22. package/LICENSE.txt +0 -6
  23. package/README.md +0 -3
  24. package/dist/action-resolver.d.ts +0 -9
  25. package/dist/action-resolver.d.ts.map +0 -1
  26. package/dist/bootstrap.d.ts +0 -16
  27. package/dist/bootstrap.d.ts.map +0 -1
  28. package/dist/component-platform/actions-controller.d.ts +0 -41
  29. package/dist/component-platform/actions-controller.d.ts.map +0 -1
  30. package/dist/component-platform/changeset-provider.d.ts +0 -9
  31. package/dist/component-platform/changeset-provider.d.ts.map +0 -1
  32. package/dist/component-platform/component-configuration-api.d.ts +0 -3
  33. package/dist/component-platform/component-configuration-api.d.ts.map +0 -1
  34. package/dist/component-platform/component-controller.d.ts +0 -39
  35. package/dist/component-platform/component-controller.d.ts.map +0 -1
  36. package/dist/component-platform/component-node-collection.d.ts +0 -19
  37. package/dist/component-platform/component-node-collection.d.ts.map +0 -1
  38. package/dist/component-platform/component-node.d.ts +0 -64
  39. package/dist/component-platform/component-node.d.ts.map +0 -1
  40. package/dist/component-platform/component-platform.d.ts +0 -55
  41. package/dist/component-platform/component-platform.d.ts.map +0 -1
  42. package/dist/component-platform/component-query.d.ts +0 -17
  43. package/dist/component-platform/component-query.d.ts.map +0 -1
  44. package/dist/component-platform/create-component-model.d.ts +0 -37
  45. package/dist/component-platform/create-component-model.d.ts.map +0 -1
  46. package/dist/component-platform/custom-component-handler.d.ts +0 -22
  47. package/dist/component-platform/custom-component-handler.d.ts.map +0 -1
  48. package/dist/component-platform/descriptor.d.ts +0 -9
  49. package/dist/component-platform/descriptor.d.ts.map +0 -1
  50. package/dist/component-platform/extend-component.d.ts +0 -9
  51. package/dist/component-platform/extend-component.d.ts.map +0 -1
  52. package/dist/component-platform/index.d.ts +0 -19
  53. package/dist/component-platform/index.d.ts.map +0 -1
  54. package/dist/component-platform/queries.d.ts +0 -7
  55. package/dist/component-platform/queries.d.ts.map +0 -1
  56. package/dist/component-platform/state-processor.d.ts +0 -13
  57. package/dist/component-platform/state-processor.d.ts.map +0 -1
  58. package/dist/component-resolver.d.ts +0 -15
  59. package/dist/component-resolver.d.ts.map +0 -1
  60. package/dist/environment.d.ts +0 -49
  61. package/dist/environment.d.ts.map +0 -1
  62. package/dist/event-subscriber.d.ts +0 -8
  63. package/dist/event-subscriber.d.ts.map +0 -1
  64. package/dist/implementation.d.ts +0 -8
  65. package/dist/implementation.d.ts.map +0 -1
  66. package/dist/index.d.ts +0 -15
  67. package/dist/index.d.ts.map +0 -1
  68. package/dist/index.js +0 -2076
  69. package/dist/index.js.map +0 -1
  70. package/dist/plugin.d.ts +0 -8
  71. package/dist/plugin.d.ts.map +0 -1
  72. package/dist/types/configuration.d.ts +0 -87
  73. package/dist/types/configuration.d.ts.map +0 -1
  74. package/dist/types/index.d.ts +0 -3
  75. package/dist/types/index.d.ts.map +0 -1
  76. package/dist/types/ui.d.ts +0 -49
  77. package/dist/types/ui.d.ts.map +0 -1
  78. package/dist/version.d.ts +0 -3
  79. package/dist/version.d.ts.map +0 -1
  80. package/dist/widget-type.d.ts +0 -8
  81. package/dist/widget-type.d.ts.map +0 -1
@@ -0,0 +1,27 @@
1
+ import { Trigger } from '../components/trigger.component';
2
+ import { Wrapper } from '../components/wrapper.component';
3
+ import { ComponentPlatform } from '../services/component-platform';
4
+ import { ApplicationOptions, PluginType, RenderStrategy, TriggerIcon, WidgetConfig } from '../types';
5
+ import { Container } from './container';
6
+ export declare class Application {
7
+ name: string;
8
+ container: Container;
9
+ settings: WidgetConfig;
10
+ private options;
11
+ platform: ComponentPlatform;
12
+ root?: Wrapper;
13
+ renderStrategy: RenderStrategy;
14
+ triggerIcon?: TriggerIcon;
15
+ autoActivate: boolean;
16
+ private plugins;
17
+ private componentResolver;
18
+ constructor(name: string, container: Container, settings: WidgetConfig, options: ApplicationOptions);
19
+ activate(): Promise<void>;
20
+ private loadPlugins;
21
+ plugin(plugin: PluginType): this;
22
+ appendToDOM(): void;
23
+ removeFromDOM(): void;
24
+ registerComponent(type: string, component: any): void;
25
+ resolveComponent(type: string): any;
26
+ render(): Trigger | Wrapper | undefined;
27
+ }
@@ -0,0 +1,16 @@
1
+ import { BehaviorSubject } from 'rxjs';
2
+ import { Environment } from './environment';
3
+ export declare enum ContainerState {
4
+ Loading = "loading",
5
+ Ready = "ready"
6
+ }
7
+ export declare class Container {
8
+ name: string;
9
+ environment: Environment;
10
+ state: BehaviorSubject<ContainerState>;
11
+ private resolvers;
12
+ constructor(name: string, environment: Environment);
13
+ setState(state: ContainerState): void;
14
+ register(name: string, value: unknown): Promise<void>;
15
+ get<T>(name: string): Promise<T | undefined>;
16
+ }
@@ -0,0 +1,12 @@
1
+ import { Application } from './application';
2
+ import { Container } from './container';
3
+ import { ApplicationOptions, WidgetConfig } from '../types';
4
+ export declare class Environment {
5
+ applications: Application[];
6
+ container: Container;
7
+ constructor();
8
+ bootstrap(): Promise<void>;
9
+ private activate;
10
+ private notifyWidgetsOfCreation;
11
+ registerApp(name: string, config: WidgetConfig, options: ApplicationOptions): void;
12
+ }
@@ -0,0 +1,12 @@
1
+ import { InitConfig } from '../types';
2
+ import { Environment } from './environment';
3
+ export declare class Site {
4
+ private environment?;
5
+ private configurations;
6
+ private url?;
7
+ constructor(urlOrConfig: string | InitConfig);
8
+ load(url: string): Promise<void>;
9
+ loadFromConfig(config: InitConfig): void;
10
+ bootstrap(handler: (environment: Environment) => void): Promise<void>;
11
+ private addGlobal;
12
+ }
package/package.json CHANGED
@@ -1,48 +1,12 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-core-flamingo",
3
- "version": "1.0.14",
4
- "description": "ACE Widgets Core",
5
- "license": "SEE LICENSE IN LICENSE.txt",
6
- "author": "Telia Company AB",
7
- "keywords": [
8
- "telia"
9
- ],
10
- "main": "dist/index.js",
11
- "sourceMain": "src/index.ts",
12
- "type": "module",
13
- "types": "dist/index.d.ts",
14
- "files": [
15
- "LICENSE.txt",
16
- "README.md",
17
- "dist/"
18
- ],
19
- "publishConfig": {
20
- "access": "public"
21
- },
22
- "sideEffects": true,
3
+ "version": "1.1.12-rc.5",
23
4
  "dependencies": {
24
- "@lit-labs/context": "^0.4.0",
25
- "@lit-labs/motion": "^1.0.4",
26
- "@telia-ace/widget-services": "^1.0.27",
27
- "@telia-ace/widget-utilities": "^1.0.16",
28
- "@teliads/components": "^22.1.1",
5
+ "lit": "^3.0.2",
29
6
  "@teliads/icons": "^8.4.0",
30
- "@webprovisions/bootstrapping": "^1.0.13",
31
- "@webprovisions/platform": "^1.1.3",
32
- "lit": "^2.8.0",
33
- "lit-html": "^2.8.0",
34
- "sass": "^1.66.1"
35
- },
36
- "devDependencies": {
37
- "@telia-ace/widget-developer-tools": "^1.0.22",
38
- "@types/node": "^20.5.4",
39
- "rimraf": "^5.0.1",
40
- "tslib": "^2.6.0",
41
- "typescript": "^5.1.6",
42
- "vite": "^4.4.9"
7
+ "rxjs": "^7.8.1"
43
8
  },
44
- "scripts": {
45
- "clean": "rimraf ./dist",
46
- "build": "rimraf ./dist && tsc -emitDeclarationOnly && vite build"
47
- }
48
- }
9
+ "main": "./index.js",
10
+ "module": "./index.mjs",
11
+ "typings": "./index.d.ts"
12
+ }
@@ -0,0 +1,13 @@
1
+ import { WidgetComponentType } from '../components/widget.component';
2
+ import { Wrapper } from '../components/wrapper.component';
3
+ import { Application } from '../models/application';
4
+ import { WidgetConfig } from '../types';
5
+ export declare class ComponentPlatform {
6
+ private root;
7
+ constructor();
8
+ createComponentModel(settings: WidgetConfig, application: Application): Wrapper;
9
+ createRoot(): Wrapper;
10
+ createNode(name: string, type: string): WidgetComponentType;
11
+ private resolveComponent;
12
+ getRoot(): Wrapper;
13
+ }
@@ -0,0 +1,8 @@
1
+ export declare class ComponentResolver {
2
+ components: Map<string, any>;
3
+ getComponent(type: string): any;
4
+ registerComponent(type: string, component: any): void;
5
+ loadComponents(): Promise<void>;
6
+ private defineAsWebComponent;
7
+ static ResolveWebComponentName: (widgetComponentName: string) => string;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { SiteConfig, WidgetConfig } from '../types';
2
+ type GetWidgetResponse = {
3
+ name: string;
4
+ config: WidgetConfig;
5
+ };
6
+ export declare class HttpClient {
7
+ private static endpoint;
8
+ static getSite(url: string): Promise<SiteConfig | null>;
9
+ static getWidget(widgetId: string): Promise<GetWidgetResponse | null>;
10
+ }
11
+ export {};
package/types.d.ts ADDED
@@ -0,0 +1,47 @@
1
+ import { Application } from './models/application';
2
+ export type ComponentDefinition = {
3
+ name: string;
4
+ type: string;
5
+ properties?: Record<string, any>;
6
+ context?: Record<string, any>;
7
+ layout?: Record<string, any>;
8
+ children?: string[];
9
+ };
10
+ export type WidgetConfig = {
11
+ entry: string;
12
+ components: Record<string, ComponentDefinition>;
13
+ branding: Record<string, any>;
14
+ };
15
+ export declare enum RenderStrategy {
16
+ Inline = "inline",
17
+ Trigger = "trigger"
18
+ }
19
+ export type ApplicationOptions = {
20
+ renderStrategy: RenderStrategy;
21
+ triggerIcon?: TriggerIcon;
22
+ autoActivate?: boolean;
23
+ };
24
+ export type TriggerIcon = {
25
+ type: string;
26
+ content: string;
27
+ };
28
+ export type AppConfig = {
29
+ id: string;
30
+ widgetId: string;
31
+ renderStrategy: RenderStrategy;
32
+ triggerIcon?: TriggerIcon;
33
+ autoActivate?: boolean;
34
+ };
35
+ export type SiteConfig = {
36
+ id: string;
37
+ apps: AppConfig[];
38
+ };
39
+ export type InitConfig = {
40
+ apps: {
41
+ widgetId: string;
42
+ renderStrategy?: 'inline' | 'trigger';
43
+ triggerIcon?: string;
44
+ autoActivate?: boolean;
45
+ }[];
46
+ };
47
+ export type PluginType = (app: Application) => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const mapBranding: (context: Record<string, any>, el: HTMLElement) => void;
package/LICENSE.txt DELETED
@@ -1,6 +0,0 @@
1
- Copyright © 2023, Telia Company AB. All rights reserved.
2
-
3
- THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
4
- THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
5
- AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
6
- http://www.humany.com/legal
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # `@telia-ace/widget-runtime-flamingo`
2
-
3
- The type definition for ACE One Widget.
@@ -1,9 +0,0 @@
1
- import { Container, EventSubscriptionCancellation } from '@webprovisions/platform';
2
- export type Action = (origin: string, action: string, value?: any) => void;
3
- export default class ActionResolver {
4
- private events;
5
- constructor(container: Container);
6
- action(target: string, action: string, value: any): void;
7
- subscribe(origin: string, fn: Action): EventSubscriptionCancellation;
8
- }
9
- //# sourceMappingURL=action-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-resolver.d.ts","sourceRoot":"","sources":["../src/action-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,6BAA6B,EAE9B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAE3E,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,OAAO,CAAC,MAAM,CAAe;gBAEjB,SAAS,EAAE,SAAS;IAKhC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAQxD,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,6BAA6B;CAOrE"}
@@ -1,16 +0,0 @@
1
- import { BootstrappedImplementation } from '@webprovisions/bootstrapping';
2
- import { ConfigureCallback } from '@webprovisions/platform';
3
- import Implementation from './implementation';
4
- export type BootstrapOptions = {
5
- /**
6
- * Resolver function for the root element to base the bootstrapping on.
7
- */
8
- rootElementResolver?: () => HTMLElement;
9
- };
10
- /**
11
- * Bootstraps an `Implementation` by scanning trigger elements and attaches them to
12
- * their corresponding widgets.
13
- */
14
- declare const _default: (implementation: Implementation, configure: ConfigureCallback, options?: BootstrapOptions) => Promise<BootstrappedImplementation>;
15
- export default _default;
16
- //# sourceMappingURL=bootstrap.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAyB,MAAM,yBAAyB,CAAC;AACnF,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,WAAW,CAAC;CAC3C,CAAC;AAEF;;;GAGG;yCAEiB,cAAc,aACnB,iBAAiB,YACnB,gBAAgB,KAC1B,QAAQ,0BAA0B,CAAC;AAJtC,wBAyBE"}
@@ -1,41 +0,0 @@
1
- import { EventSubscriptionCancellation } from '@webprovisions/platform';
2
- import { ComponentNodeController } from './component-controller';
3
- import { ComponentNode } from './component-node';
4
- import { ComponentPlatform } from './component-platform';
5
- import { ComponentQuery } from './component-query';
6
- export type ActionData = any;
7
- export type ActionHandler = (data: any, options: any, instance: ComponentNodeController) => any;
8
- export type NextActionDelegate = (data: any, options?: any) => Promise<any>;
9
- export type WatchActionDelegate = (input: ActionData, next: NextActionDelegate, instance: ComponentNodeController) => Promise<any> | any;
10
- export type ActionWatcherContext = {
11
- source: ComponentNode;
12
- action: string;
13
- };
14
- export type ActionsState = {
15
- handlers: {
16
- fn: ActionHandler;
17
- key: string;
18
- target: ComponentQuery;
19
- ns?: string;
20
- }[];
21
- watchers: {
22
- target: ComponentQuery;
23
- fn: WatchActionDelegate;
24
- key: string;
25
- ns?: string;
26
- }[];
27
- };
28
- export declare class ActionsController {
29
- private platform;
30
- private target;
31
- private ns?;
32
- private subscriptions;
33
- constructor(platform: ComponentPlatform, target: ComponentQuery, ns?: string | undefined);
34
- create(key: string, fn?: ActionHandler): EventSubscriptionCancellation;
35
- dispatch(key: string, data: any): Promise<{
36
- [instanceId: string]: any;
37
- }>;
38
- watch(key: string, fn: WatchActionDelegate): EventSubscriptionCancellation;
39
- dispose(): void;
40
- }
41
- //# sourceMappingURL=actions-controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions-controller.d.ts","sourceRoot":"","sources":["../../src/component-platform/actions-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG,GAAG,CAAC;AAE7B,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,uBAAuB,KAAK,GAAG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AAM,EAAE,EAAE,EAAE,mBAAmB,GAAG,6BAA6B;IA0B1E,OAAO;CAGV"}
@@ -1,9 +0,0 @@
1
- import { ChangesetOptions, ComponentNodeSettings } from './component-node';
2
- import { ComponentPlatform } from './component-platform';
3
- import { ComponentQuery } from './component-query';
4
- export interface ChangesetProvider {
5
- write: (key: string, target: ComponentQuery, attributes: Partial<ComponentNodeSettings>, options: ChangesetOptions) => void;
6
- remove: (key: string) => void;
7
- load: (platform: ComponentPlatform) => Promise<any>;
8
- }
9
- //# sourceMappingURL=changeset-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"changeset-provider.d.ts","sourceRoot":"","sources":["../../src/component-platform/changeset-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAC9B,KAAK,EAAE,CACH,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,EAC1C,OAAO,EAAE,gBAAgB,KACxB,IAAI,CAAC;IAEV,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9B,IAAI,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CACvD"}
@@ -1,3 +0,0 @@
1
- declare const _default: import("@webprovisions/platform").ConfigurationApiDefinition;
2
- export default _default;
3
- //# sourceMappingURL=component-configuration-api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-configuration-api.d.ts","sourceRoot":"","sources":["../../src/component-platform/component-configuration-api.ts"],"names":[],"mappings":";AAOA,wBAaG"}
@@ -1,39 +0,0 @@
1
- import { ActionsController } from './actions-controller';
2
- import { ChangesetOptions, ComponentNode, ComponentNodeContext, ComponentNodeLayout, ComponentNodeProperties } from './component-node';
3
- import { ComponentPlatform } from './component-platform';
4
- import { ComponentQuery } from './component-query';
5
- export interface ComponentController {
6
- actions: ActionsController;
7
- writeProperties(properties: Partial<ComponentNodeProperties>, options: ChangesetOptions): void;
8
- writeContext(context: Partial<ComponentNodeContext>, options: ChangesetOptions): void;
9
- writeLayout(context: Partial<ComponentNodeLayout>, options: ChangesetOptions): void;
10
- dispose(): void;
11
- }
12
- export declare class ComponentNodeController implements ComponentController {
13
- private platform;
14
- node: ComponentNode;
15
- actions: ActionsController;
16
- private subscribe;
17
- private unsubscribe;
18
- constructor(platform: ComponentPlatform, node: ComponentNode, ns?: string);
19
- properties<T extends ComponentNodeProperties>(updated?: (properties: T) => void | Partial<ComponentNodeProperties>): T;
20
- context(updated?: (context: ComponentNodeContext) => void): ComponentNodeContext;
21
- layout(updated?: (layout: ComponentNodeLayout) => void): ComponentNodeLayout;
22
- writeProperties(properties: Partial<ComponentNodeProperties> | ((properties: ComponentNodeProperties) => Partial<ComponentNodeProperties>), options?: ChangesetOptions): void;
23
- writeContext(context: Partial<ComponentNodeContext>, options?: ChangesetOptions): void;
24
- writeLayout(layout: Partial<ComponentNodeLayout>, options?: ChangesetOptions): void;
25
- dispose(): void;
26
- }
27
- export declare class AbstractComponentController implements ComponentController {
28
- private platform;
29
- private target;
30
- private clearOnDispose;
31
- actions: ActionsController;
32
- private removes;
33
- constructor(platform: ComponentPlatform, target: ComponentQuery, clearOnDispose?: boolean);
34
- writeProperties(properties: Partial<ComponentNodeProperties>, options?: ChangesetOptions): void;
35
- writeContext(context: Partial<ComponentNodeContext>, options?: ChangesetOptions): void;
36
- writeLayout(layout: Partial<ComponentNodeLayout>, options?: ChangesetOptions): void;
37
- dispose(): void;
38
- }
39
- //# sourceMappingURL=component-controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-controller.d.ts","sourceRoot":"","sources":["../../src/component-platform/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,EAAE,mBAAmB,KAAK,IAAI,GAAG,mBAAmB;IAW5E,eAAe,CACb,UAAU,EACN,OAAO,CAAC,uBAAuB,CAAC,GAChC,CAAC,CACC,UAAU,EAAE,uBAAuB,KAChC,OAAO,CAAC,uBAAuB,CAAC,CAAC,EAC1C,OAAO,CAAC,EAAE,gBAAgB,GACzB,IAAI;IAIP,YAAY,CACV,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACtC,OAAO,CAAC,EAAE,gBAAgB,GACzB,IAAI;IAIP,WAAW,CACT,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,EACpC,OAAO,CAAC,EAAE,gBAAgB,GACzB,IAAI;IAIP,OAAO;CAIR;AAED,qBAAa,2BAA4B,YAAW,mBAAmB;IAKnE,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,cAAc;IANxB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,CAAC,OAAO,CAAyB;gBAG9B,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,cAAc,EACtB,cAAc,UAAO;IAK/B,eAAe,CACb,UAAU,EAAE,OAAO,CAAC,uBAAuB,CAAC,EAC5C,OAAO,CAAC,EAAE,gBAAgB,GACzB,IAAI;IAWP,YAAY,CACV,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACtC,OAAO,CAAC,EAAE,gBAAgB,GACzB,IAAI;IAWP,WAAW,CACT,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,EACpC,OAAO,CAAC,EAAE,gBAAgB,GACzB,IAAI;IAWP,OAAO;CAMR"}
@@ -1,19 +0,0 @@
1
- import { EventManager } from '@webprovisions/platform';
2
- import { ComponentNode } from './component-node';
3
- import { SwitchMap } from './component-platform';
4
- export type QueryDescriptor = {
5
- id?: string;
6
- type?: string;
7
- name?: string;
8
- };
9
- export declare class ComponentNodeCollection {
10
- root: ComponentNode;
11
- private switches;
12
- all: ComponentNode[];
13
- visible: ComponentNode[];
14
- detached: ComponentNode[];
15
- constructor(root: ComponentNode, switches: SwitchMap, events: EventManager);
16
- query(query?: QueryDescriptor): ComponentNode[];
17
- get(id: string): ComponentNode | undefined;
18
- }
19
- //# sourceMappingURL=component-node-collection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-node-collection.d.ts","sourceRoot":"","sources":["../../src/component-platform/component-node-collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAA0B,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAOjD,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAa,uBAAuB;IAMzB,IAAI,EAAE,aAAa;IAC1B,OAAO,CAAC,QAAQ;IANlB,GAAG,EAAE,aAAa,EAAE,CAAM;IAC1B,OAAO,EAAE,aAAa,EAAE,CAAM;IAC9B,QAAQ,EAAE,aAAa,EAAE,CAAM;gBAGtB,IAAI,EAAE,aAAa,EAClB,QAAQ,EAAE,SAAS,EAC3B,MAAM,EAAE,YAAY;IA+BtB,KAAK,CAAC,KAAK,GAAE,eAAoB,GAAG,aAAa,EAAE;IAanD,GAAG,CAAC,EAAE,EAAE,MAAM;CAMf"}
@@ -1,64 +0,0 @@
1
- import { Container, EventManager } from '@webprovisions/platform';
2
- import { Breakpoints } from '../types';
3
- export type ComponentNodeEventData = {
4
- node: ComponentNode;
5
- };
6
- export type RemoveChangeset = () => void;
7
- export type ComponentNodeAttributes = {
8
- tags: string[];
9
- properties: ComponentNodeProperties;
10
- context: ComponentNodeContext;
11
- layout: ComponentNodeLayout;
12
- };
13
- export type ResolveComponentNodeProperties = (properties: ComponentNodeProperties) => Partial<ComponentNodeProperties> | void;
14
- export type ResolveComponentNodeContext = (context: ComponentNodeContext) => Partial<ComponentNodeContext>;
15
- export type ResolveComponentNodeLayout = (layout: ComponentNodeLayout) => Partial<ComponentNodeLayout>;
16
- export type ComponentNodeSettings = {
17
- tags?: string[];
18
- properties?: ComponentNodeProperties | ResolveComponentNodeProperties;
19
- context?: ComponentNodeContext | ResolveComponentNodeContext;
20
- layout?: ComponentNodeLayout | ResolveComponentNodeLayout;
21
- };
22
- export type ComponentNodeProperties = {
23
- [key: string]: any;
24
- };
25
- export type ComponentNodeContext = {
26
- [key: string]: any;
27
- };
28
- export type ComponentNodeLayout = {
29
- size?: Size;
30
- indent?: number;
31
- order?: number;
32
- };
33
- export type Size = number | 'full' | 'none';
34
- export type UnmountComponentNode = () => void;
35
- export type ChangesetOptions = {
36
- breakpoints?: Breakpoints;
37
- };
38
- export type Changeset = [Partial<ComponentNodeSettings>, ChangesetOptions];
39
- export declare class ComponentNode {
40
- private events;
41
- id: string;
42
- type: string;
43
- name?: string;
44
- parent?: ComponentNode;
45
- tags: string[];
46
- children: {
47
- [key: string]: ComponentNode[];
48
- };
49
- changesets: Changeset[];
50
- attributes: ComponentNodeAttributes;
51
- private mountCount;
52
- constructor(events: EventManager, type: string);
53
- mount(viewOutletContainer: Container, _element?: HTMLElement): UnmountComponentNode;
54
- appendChild(node: ComponentNode, branch?: string): void;
55
- prependChild(node: ComponentNode, branch?: string): void;
56
- touchProperties(properties: ResolveComponentNodeProperties, options?: ChangesetOptions, removable?: boolean): RemoveChangeset;
57
- writeProperties(properties: Partial<ComponentNodeProperties> | ResolveComponentNodeProperties, options?: ChangesetOptions, removable?: boolean): RemoveChangeset;
58
- writeLayout(layout: Partial<ComponentNodeLayout> | ResolveComponentNodeLayout, options?: ChangesetOptions, removable?: boolean): RemoveChangeset;
59
- writeContext(context: Partial<ComponentNodeContext> | ResolveComponentNodeContext, options?: ChangesetOptions, removable?: boolean): RemoveChangeset;
60
- getChildren(branch?: string): ComponentNode[];
61
- remove(): void;
62
- removeChild(node: ComponentNode): void;
63
- }
64
- //# sourceMappingURL=component-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-node.d.ts","sourceRoot":"","sources":["../../src/component-platform/component-node.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,YAAY,EAEb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,MAAM,sBAAsB,GAAG;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC;AAEzC,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,uBAAuB,CAAC;IACpC,OAAO,EAAE,oBAAoB,CAAC;IAC9B,MAAM,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,CAC3C,UAAU,EAAE,uBAAuB,KAChC,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC;AAE7C,MAAM,MAAM,2BAA2B,GAAG,CACxC,OAAO,EAAE,oBAAoB,KAC1B,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAEnC,MAAM,MAAM,0BAA0B,GAAG,CACvC,MAAM,EAAE,mBAAmB,KACxB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,uBAAuB,GAAG,8BAA8B,CAAC;IACtE,OAAO,CAAC,EAAE,oBAAoB,GAAG,2BAA2B,CAAC;IAC7D,MAAM,CAAC,EAAE,mBAAmB,GAAG,0BAA0B,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC;AAE7D,MA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1C,OAAO,GAAE,gBAAqB,EAC9B,SAAS,CAAC,EAAE,OAAO,GAClB,eAAe;IAgBlB,eAAe,CACb,UAAU,EACN,OAAO,CAAC,uBAAuB,CAAC,GAChC,8BAA8B,EAClC,OAAO,GAAE,gBAAqB,EAC9B,SAAS,CAAC,EAAE,OAAO,GAClB,eAAe;IAgBlB,WAAW,CACT,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,EACjE,OAAO,GAAE,gBAAqB,EAC9B,SAAS,CAAC,EAAE,OAAO,GAClB,eAAe;IAiBlB,YAAY,CACV,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,2BAA2B,EACpE,OAAO,GAAE,gBAAqB,EAC9B,SAAS,CAAC,EAAE,OAAO,GAClB,eAAe;IAiBlB,WAAW,CAAC,MAAM,GAAE,MAAkB,GAAG,aAAa,EAAE;IAaxD,MAAM;IAMN,WAAW,CAAC,IAAI,EAAE,aAAa;CAchC"}
@@ -1,55 +0,0 @@
1
- import { Container, EventManager, Widget } from '@webprovisions/platform';
2
- import { ActionsController, ActionsState } from './actions-controller';
3
- import { ChangesetProvider } from './changeset-provider';
4
- import { ChangesetOptions, ComponentNode, ComponentNodeSettings, RemoveChangeset } from './component-node';
5
- import { ComponentNodeCollection } from './component-node-collection';
6
- import { ComponentQuery } from './component-query';
7
- import { CustomHandlerCallback } from './custom-component-handler';
8
- export type MergeOptions = {
9
- breakpoints?: string[];
10
- };
11
- export type SwitchMap = {
12
- [id: string]: string;
13
- };
14
- export type ChangesetData = {
15
- key?: string;
16
- target: ComponentQuery;
17
- attributes: Partial<ComponentNodeSettings>;
18
- options?: ChangesetOptions;
19
- removable?: boolean;
20
- provider?: string;
21
- };
22
- export declare class ComponentPlatform {
23
- private providers;
24
- events: EventManager;
25
- breakpoints: string[];
26
- nodes: ComponentNodeCollection;
27
- actionsState: ActionsState;
28
- private switches;
29
- private changesets;
30
- private subscriptions;
31
- private processNode;
32
- private customComponentHandler;
33
- constructor(widget: Widget, providers?: {
34
- [key: string]: ChangesetProvider;
35
- });
36
- static getInstance(container: Container): Promise<ComponentPlatform>;
37
- addBreakpoint(name: string): void;
38
- removeBreakpoint(name: string): void;
39
- setSwitch(node: ComponentNode, branch: string): void;
40
- getBranch(node: ComponentNode): string | undefined;
41
- /**
42
- * Creates a `ComponentNode` of the specified type.
43
- * @param type Type of node.
44
- */
45
- createNode(type: string, options?: {
46
- detached?: boolean;
47
- }): ComponentNode;
48
- components(): ComponentQuery;
49
- actions(target: ComponentQuery, ns: string): ActionsController;
50
- write(data: ChangesetData): RemoveChangeset;
51
- addComponentHandler(definitionType: string, fn: CustomHandlerCallback): void;
52
- getComponentHandler(definitionType: string): CustomHandlerCallback | undefined;
53
- dispose(): void;
54
- }
55
- //# sourceMappingURL=component-platform.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-platform.d.ts","sourceRoot":"","sources":["../../src/component-platform/component-platform.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,YAAY,EAEZ,MAAM,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAEL,gBAAgB,EAChB,aAAa,EAEb,qBAAqB,EACrB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAEL,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,MAAM,YAAY,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAQtD,MAAM,MAAM,SAAS,GAAG;IAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEjD,MAA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IAAI,EAAE,aAAa,GAAG,eAAe;IAkD3C,mBAAmB,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,EAAE,qBAAqB;IAIrE,mBAAmB,CAAC,cAAc,EAAE,MAAM;IAI1C,OAAO;CAGR"}
@@ -1,17 +0,0 @@
1
- import { AbstractComponentController } from './component-controller';
2
- import { ComponentNode } from './component-node';
3
- import { ComponentPlatform } from './component-platform';
4
- export type ComponentQueryRule = {
5
- id?: string;
6
- type?: string;
7
- };
8
- export declare class ComponentQuery {
9
- private platform;
10
- rules: ComponentQueryRule[];
11
- constructor(platform: ComponentPlatform, rules?: ComponentQueryRule[]);
12
- match(node: ComponentNode): boolean;
13
- ofType(type: string): ComponentQuery;
14
- withId(id: string): ComponentQuery;
15
- select(): AbstractComponentController;
16
- }
17
- //# sourceMappingURL=component-query.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-query.d.ts","sourceRoot":"","sources":["../../src/component-platform/component-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,cAAc;IACX,OAAO,CAAC,QAAQ;IAA4B,KAAK,EAAE,kBAAkB,EAAE;gBAA/D,QAAQ,EAAE,iBAAiB,EAAS,KAAK,GAAE,kBAAkB,EAAO;IAExF,KAAK,CAAC,IAAI,EAAE,aAAa;IAYzB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc;IAKpC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc;IAKlC,MAAM,IAAI,2BAA2B;CAGxC"}
@@ -1,37 +0,0 @@
1
- import { EventSubscriptionCancellation } from '@webprovisions/platform';
2
- import { Breakpoints, ComponentSettings, ViewDefinition, WidgetSettings } from '../types';
3
- import { ComponentNode, ComponentNodeContext, ComponentNodeLayout, ComponentNodeProperties } from './component-node';
4
- import { ComponentPlatform } from './component-platform';
5
- type ComponentReference = string | [string, ...ComponentReferenceOverride[]];
6
- type ComponentReferenceOverride = {
7
- breakpoints?: Breakpoints;
8
- tags?: string[];
9
- context?: ComponentNodeContext;
10
- properties?: ComponentNodeProperties;
11
- layout?: ComponentNodeLayout;
12
- };
13
- export type NormalizedComponentReference = {
14
- definitionId: string;
15
- overrides: ComponentReferenceOverride[];
16
- };
17
- export declare const normalizeReference: (reference: ComponentReference) => NormalizedComponentReference;
18
- export type ComponentHandlerOptions = {
19
- platform: ComponentPlatform;
20
- node: ComponentNode;
21
- references: ComponentReference[];
22
- definitions: {
23
- [name: string]: ComponentSettings;
24
- };
25
- views: {
26
- [key: string]: ViewDefinition;
27
- };
28
- branch?: string;
29
- };
30
- export declare const createChildren: (platform: ComponentPlatform, node: ComponentNode, references: ComponentReference[], definitions: {
31
- [name: string]: ComponentSettings;
32
- }, views: {
33
- [key: string]: ViewDefinition;
34
- }, branch?: string) => void;
35
- export declare const createComponentModel: (platform: ComponentPlatform, settings: WidgetSettings) => EventSubscriptionCancellation;
36
- export {};
37
- //# sourceMappingURL=create-component-model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-component-model.d.ts","sourceRoot":"","sources":["../../src/component-platform/create-component-model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1F,OAAO,EACH,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,KAAK,kBAAkB,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,0BAA0B,EAAE,CAAC,CAAC;AAE7E,KAAK,0BAA0B,GAAG;IAC9B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,0BAA0B,EAAE,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,cAAe,kBAAkB,KAAG,4BAYlE,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,WAAW,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAAA;KAAE,CAAC;IACnD,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;KAAE,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,cAAc,aACb,iBAAiB,QACrB,aAAa,cACP,kBAAkB,EAAE;;;;YAGvB,MAAM,SAiFlB,CAAC;AAEF,eAAO,MAAM,oBAAoB,aACnB,iBAAiB,YACjB,cAAc,KACzB,6BA2BF,CAAC"}
@@ -1,22 +0,0 @@
1
- import { ComponentReference, ComponentSettings, ViewDefinition } from '../types';
2
- import { ComponentNode } from './component-node';
3
- import { ComponentPlatform } from './component-platform';
4
- import { NormalizedComponentReference } from './create-component-model';
5
- export type CustomHandlerCallback = (ref: NormalizedComponentReference, options: {
6
- platform: ComponentPlatform;
7
- node: ComponentNode;
8
- references: ComponentReference[];
9
- definitions: {
10
- [name: string]: ComponentSettings;
11
- };
12
- views: {
13
- [key: string]: ViewDefinition;
14
- };
15
- branch?: string;
16
- }) => void;
17
- export declare class CustomComponentHandler {
18
- private handlers;
19
- add(name: string, fn: CustomHandlerCallback): void;
20
- get(name: string): CustomHandlerCallback | undefined;
21
- }
22
- //# sourceMappingURL=custom-component-handler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom-component-handler.d.ts","sourceRoot":"","sources":["../../src/component-platform/custom-component-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAExE,MAAM,MAAM,qBAAqB,GAAG,CAChC,GAAG,EAAE,4BAA4B,EACjC,OAAO,EAAE;IACL,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,WAAW,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAAA;KAAE,CAAC;IACnD,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;KAAE,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,KACA,IAAI,CAAC;AAEV,qBAAa,sBAAsB;IAC/B,OAAO,CAAC,QAAQ,CAA4C;IAE5D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,qBAAqB;IAI3C,GAAG,CAAC,IAAI,EAAE,MAAM;CAGnB"}