@anglr/common 19.2.0-beta.20240125052632 → 19.2.0-beta.20240125053304

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 19.2.0 (2024-01-25)
4
+
5
+ ### Features
6
+
7
+ - updated `EllipsisTooltipSADirective` directive
8
+ - **new inputs**
9
+ - `tooltipPrefix` tooltip prefix text to be prepended to tooltip read from content
10
+ - `tooltipSuffix` tooltip suffix text to be appended to tooltip read from content
11
+
3
12
  ## Version 19.1.0 (2023-12-14)
4
13
 
5
14
  ### Bug Fixes
@@ -1,5 +1,6 @@
1
+ import { __decorate, __metadata } from "tslib";
1
2
  import { Directive, ElementRef, Input, Renderer2, booleanAttribute, inject } from '@angular/core';
2
- import { nameof } from '@jscrpt/common';
3
+ import { BindThis, nameof } from '@jscrpt/common';
3
4
  import { TooltipDirective } from '../../modules/tooltip';
4
5
  import * as i0 from "@angular/core";
5
6
  import * as i1 from "../../modules/tooltip/directives/tooltip/tooltip.directive";
@@ -23,7 +24,7 @@ export class EllipsisTooltipSADirective {
23
24
  /**
24
25
  * Instance of mutation observer used for watching
25
26
  */
26
- textObserver = new MutationObserver(() => this.tooltip.tooltip = this.allowHtml ? this.element.innerHTML : this.element.innerText);
27
+ textObserver = new MutationObserver(this.updateTooltip);
27
28
  /**
28
29
  * Original css class
29
30
  */
@@ -33,6 +34,14 @@ export class EllipsisTooltipSADirective {
33
34
  * Css class appliet to element
34
35
  */
35
36
  ellipsisClass = 'text-ellipsis';
37
+ /**
38
+ * Tooltip prefix text to be prepended to tooltip read from content
39
+ */
40
+ tooltipPrefix;
41
+ /**
42
+ * Tooltip suffix text to be appended to tooltip read from content
43
+ */
44
+ tooltipSuffix;
36
45
  /**
37
46
  * Indication whether are html tags allowed in tooltip text
38
47
  */
@@ -73,6 +82,10 @@ export class EllipsisTooltipSADirective {
73
82
  this.textObserver?.disconnect();
74
83
  this.textObserver?.observe(this.element, { characterData: true, subtree: true, childList: true });
75
84
  }
85
+ if (nameof('tooltipPrefix') in changes ||
86
+ nameof('tooltipSuffix') in changes) {
87
+ this.updateTooltip();
88
+ }
76
89
  }
77
90
  //######################### public methods - implementation of OnDestroy #########################
78
91
  /**
@@ -82,14 +95,27 @@ export class EllipsisTooltipSADirective {
82
95
  this.textObserver?.disconnect();
83
96
  this.textObserver = null;
84
97
  }
98
+ //######################### protected methods #########################
99
+ /**
100
+ * Updates tooltip value
101
+ */
102
+ updateTooltip() {
103
+ this.tooltip.tooltip = (this.tooltipPrefix ?? '') + (this.allowHtml ? this.element.innerHTML : this.element.innerText) + (this.tooltipSuffix ?? '');
104
+ }
85
105
  //######################### ng language server #########################
86
106
  /**
87
107
  * Custom input type for `element` input
88
108
  */
89
109
  static ngAcceptInputType_element;
90
110
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: EllipsisTooltipSADirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
91
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.0.5", type: EllipsisTooltipSADirective, isStandalone: true, selector: "[ellipsisTooltip]", inputs: { ellipsisClass: "ellipsisClass", allowHtml: ["allowHtml", "allowHtml", booleanAttribute], element: ["ellipsisTooltip", "element"] }, usesOnChanges: true, hostDirectives: [{ directive: i1.TooltipDirective }], ngImport: i0 });
111
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.0.5", type: EllipsisTooltipSADirective, isStandalone: true, selector: "[ellipsisTooltip]", inputs: { ellipsisClass: "ellipsisClass", tooltipPrefix: "tooltipPrefix", tooltipSuffix: "tooltipSuffix", allowHtml: ["allowHtml", "allowHtml", booleanAttribute], element: ["ellipsisTooltip", "element"] }, usesOnChanges: true, hostDirectives: [{ directive: i1.TooltipDirective }], ngImport: i0 });
92
112
  }
113
+ __decorate([
114
+ BindThis,
115
+ __metadata("design:type", Function),
116
+ __metadata("design:paramtypes", []),
117
+ __metadata("design:returntype", void 0)
118
+ ], EllipsisTooltipSADirective.prototype, "updateTooltip", null);
93
119
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: EllipsisTooltipSADirective, decorators: [{
94
120
  type: Directive,
95
121
  args: [{
@@ -101,11 +127,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImpor
101
127
  }]
102
128
  }], propDecorators: { ellipsisClass: [{
103
129
  type: Input
130
+ }], tooltipPrefix: [{
131
+ type: Input
132
+ }], tooltipSuffix: [{
133
+ type: Input
104
134
  }], allowHtml: [{
105
135
  type: Input,
106
136
  args: [{ transform: booleanAttribute }]
107
137
  }], element: [{
108
138
  type: Input,
109
139
  args: ['ellipsisTooltip']
110
- }] } });
140
+ }], updateTooltip: [] } });
111
141
  //# sourceMappingURL=ellipsisTooltip.directive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ellipsisTooltip.directive.js","sourceRoot":"","sources":["../../../../src/directives/ellipsisTooltip/ellipsisTooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAwB,SAAS,EAAiB,gBAAgB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACrI,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;;;AAEvD;;GAEG;AAUH,MAAM,OAAO,0BAA0B;IAEnC,sEAAsE;IAEtE;;OAEG;IACO,QAAQ,GAAc,MAAM,CAAC,SAAS,CAAC,CAAC;IAElD;;OAEG;IACO,OAAO,GAAqB,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAE/D;;OAEG;IACO,YAAY,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC;IAEvE;;OAEG;IACO,Y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AAa,CAAC,CAAC;gBACzD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;aAC9C;YAED,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,CAAC;YAChC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAC,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;SACnG;IACL,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACI,MAAM,CAAC,yBAAyB,CAA4B;uGAnH1D,0BAA0B;2FAA1B,0BAA0B,qIAwChB,gBAAgB;;2FAxC1B,0BAA0B;kBATtC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;oBAC7B,UAAU,EAAE,IAAI;oBAChB,cAAc,EACd;wBACI,gBAAgB;qBACnB;iBACJ;8BAoCU,aAAa;sBADnB,KAAK;gBAOC,SAAS;sBADf,KAAK;uBAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC;gBAOzB,OAAO;sBADjB,KAAK;uBAAC,iBAAiB","sourcesContent":["import {Directive, ElementRef, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges, booleanAttribute, inject} from '@angular/core';\nimport {nameof} from '@jscrpt/common';\n\nimport {TooltipDirective} from '../../modules/tooltip';\n\n/**\n * Directive that is used for displaying text from attached element in tooltip\n */\n@Directive(\n{\n selector: '[ellipsisTooltip]',\n standalone: true,\n hostDirectives:\n [\n TooltipDirective,\n ],\n})\nexport class EllipsisTooltipSADirective implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of renderer\n */\n protected renderer: Renderer2 = inject(Renderer2);\n\n /**\n * Instance of tooltip directive\n */\n protected tooltip: TooltipDirective = inject(TooltipDirective);\n\n /**\n * HTML element from which is text taken for tooltip\n */\n protected elementValue: HTMLElement = inject(ElementRef).nativeElement;\n\n /**\n * Instance of mutation observer used for watching \n */\n protected textObserver: MutationObserver|undefined|null = new MutationObserver(() => this.tooltip.tooltip = this.allowHtml ? this.element.innerHTML : this.element.innerText);\n\n /**\n * Original css class\n */\n protected originalCssClass: string|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Css class appliet to element\n */\n @Input()\n public ellipsisClass: string = 'text-ellipsis';\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input({transform: booleanAttribute})\n public allowHtml: boolean = false;\n\n /**\n * Gets or sets HTML element from which is text taken for tooltip\n */\n @Input('ellipsisTooltip')\n public get element(): HTMLElement\n {\n return this.elementValue;\n }\n public set element(value: HTMLElement|ElementRef<HTMLElement>)\n {\n if(!value)\n {\n return;\n }\n\n if(value instanceof ElementRef)\n {\n this.elementValue = value.nativeElement;\n\n return;\n }\n\n this.elementValue = value;\n }\n\n //######################### public methods - implementation of OnChanges #########################\n \n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<EllipsisTooltipSADirective>('allowHtml') in changes)\n {\n this.tooltip.allowHtml = this.allowHtml;\n }\n\n if(nameof<EllipsisTooltipSADirective>('element') in changes ||\n nameof<EllipsisTooltipSADirective>('ellipsisClass') in changes)\n {\n if(this.originalCssClass != this.ellipsisClass)\n {\n if(this.originalCssClass)\n {\n this.renderer.removeClass(this.element, this.originalCssClass);\n }\n \n this.renderer.addClass(this.element, this.ellipsisClass);\n this.originalCssClass = this.ellipsisClass;\n }\n\n this.textObserver?.disconnect();\n this.textObserver?.observe(this.element, {characterData: true, subtree: true, childList: true});\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.textObserver?.disconnect();\n this.textObserver = null;\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `element` input\n */\n public static ngAcceptInputType_element: HTMLElement|ElementRef|'';\n}"]}
1
+ {"version":3,"file":"ellipsisTooltip.directive.js","sourceRoot":"","sources":["../../../../src/directives/ellipsisTooltip/ellipsisTooltip.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAwB,SAAS,EAAiB,gBAAgB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACrI,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;;;AAEvD;;GAEG;AAUH,MAAM,OAAO,0BAA0B;IAEnC,sEAAsE;IAEtE;;OAEG;IACO,QAAQ,GAAc,MAAM,CAAC,SAAS,CAAC,CAAC;IAElD;;OAEG;IACO,OAAO,GAAqB,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAE/D;;OAEG;IACO,YAAY,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC;IAEvE;;OAEG;IACO,YAAY,GAAoC,IAAI,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAEnG;;OAEG;IACO,gBAAgB,CAAwB;IAElD,gFAAgF;IAEhF;;OAEG;IAEI,aAAa,GAAW,eAAe,CAAC;IAE/C;;OAEG;IAEI,aAAa,CAAwB;IAE5C;;OAEG;IAEI,aAAa,CAAwB;IAE5C;;OAEG;IAEI,SAAS,GAAY,KAAK,CAAC;IAElC;;OAEG;IACH,IACW,OAAO;QAEd,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IACD,IAAW,OAAO,CAAC,KAA0C;QAEzD,IAAG,CAAC,KAAK,EACT;YACI,OAAO;SACV;QAED,IAAG,KAAK,YAAY,UAAU,EAC9B;YACI,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC;YAExC,OAAO;SACV;QAED,IAAI,CAAC,YAAY,GAA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AC,OAAO,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;IACxJ,CAAC;IAED,wEAAwE;IAExE;;OAEG;IACI,MAAM,CAAC,yBAAyB,CAA4B;uGAhJ1D,0BAA0B;2FAA1B,0BAA0B,qMAoDhB,gBAAgB;;AAkFzB;IADT,QAAQ;;;;+DAIR;2FAzIQ,0BAA0B;kBATtC,SAAS;mBACV;oBACI,QAAQ,EAAE,mBAAmB;oBAC7B,UAAU,EAAE,IAAI;oBAChB,cAAc,EACd;wBACI,gBAAgB;qBACnB;iBACJ;8BAoCU,aAAa;sBADnB,KAAK;gBAOC,aAAa;sBADnB,KAAK;gBAOC,aAAa;sBADnB,KAAK;gBAOC,SAAS;sBADf,KAAK;uBAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC;gBAOzB,OAAO;sBADjB,KAAK;uBAAC,iBAAiB;gBA4Ed,aAAa","sourcesContent":["import {Directive, ElementRef, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges, booleanAttribute, inject} from '@angular/core';\nimport {BindThis, nameof} from '@jscrpt/common';\n\nimport {TooltipDirective} from '../../modules/tooltip';\n\n/**\n * Directive that is used for displaying text from attached element in tooltip\n */\n@Directive(\n{\n selector: '[ellipsisTooltip]',\n standalone: true,\n hostDirectives:\n [\n TooltipDirective,\n ],\n})\nexport class EllipsisTooltipSADirective implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of renderer\n */\n protected renderer: Renderer2 = inject(Renderer2);\n\n /**\n * Instance of tooltip directive\n */\n protected tooltip: TooltipDirective = inject(TooltipDirective);\n\n /**\n * HTML element from which is text taken for tooltip\n */\n protected elementValue: HTMLElement = inject(ElementRef).nativeElement;\n\n /**\n * Instance of mutation observer used for watching \n */\n protected textObserver: MutationObserver|undefined|null = new MutationObserver(this.updateTooltip);\n\n /**\n * Original css class\n */\n protected originalCssClass: string|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Css class appliet to element\n */\n @Input()\n public ellipsisClass: string = 'text-ellipsis';\n\n /**\n * Tooltip prefix text to be prepended to tooltip read from content\n */\n @Input()\n public tooltipPrefix: string|undefined|null;\n\n /**\n * Tooltip suffix text to be appended to tooltip read from content\n */\n @Input()\n public tooltipSuffix: string|undefined|null;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n @Input({transform: booleanAttribute})\n public allowHtml: boolean = false;\n\n /**\n * Gets or sets HTML element from which is text taken for tooltip\n */\n @Input('ellipsisTooltip')\n public get element(): HTMLElement\n {\n return this.elementValue;\n }\n public set element(value: HTMLElement|ElementRef<HTMLElement>)\n {\n if(!value)\n {\n return;\n }\n\n if(value instanceof ElementRef)\n {\n this.elementValue = value.nativeElement;\n\n return;\n }\n\n this.elementValue = value;\n }\n\n //######################### public methods - implementation of OnChanges #########################\n \n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<EllipsisTooltipSADirective>('allowHtml') in changes)\n {\n this.tooltip.allowHtml = this.allowHtml;\n }\n\n if(nameof<EllipsisTooltipSADirective>('element') in changes ||\n nameof<EllipsisTooltipSADirective>('ellipsisClass') in changes)\n {\n if(this.originalCssClass != this.ellipsisClass)\n {\n if(this.originalCssClass)\n {\n this.renderer.removeClass(this.element, this.originalCssClass);\n }\n \n this.renderer.addClass(this.element, this.ellipsisClass);\n this.originalCssClass = this.ellipsisClass;\n }\n\n this.textObserver?.disconnect();\n this.textObserver?.observe(this.element, {characterData: true, subtree: true, childList: true});\n }\n\n if(nameof<EllipsisTooltipSADirective>('tooltipPrefix') in changes ||\n nameof<EllipsisTooltipSADirective>('tooltipSuffix') in changes)\n {\n this.updateTooltip();\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.textObserver?.disconnect();\n this.textObserver = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Updates tooltip value\n */\n @BindThis\n protected updateTooltip(): void\n {\n this.tooltip.tooltip = (this.tooltipPrefix ?? '') + (this.allowHtml ? this.element.innerHTML : this.element.innerText) + (this.tooltipSuffix ?? '');\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `element` input\n */\n public static ngAcceptInputType_element: HTMLElement|ElementRef|'';\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anglr/common",
3
- "version": "19.2.0-beta.20240125052632",
3
+ "version": "19.2.0-beta.20240125053304",
4
4
  "description": "Angular module for common angular stuff",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -30,6 +30,14 @@ export declare class EllipsisTooltipSADirective implements OnChanges, OnDestroy
30
30
  * Css class appliet to element
31
31
  */
32
32
  ellipsisClass: string;
33
+ /**
34
+ * Tooltip prefix text to be prepended to tooltip read from content
35
+ */
36
+ tooltipPrefix: string | undefined | null;
37
+ /**
38
+ * Tooltip suffix text to be appended to tooltip read from content
39
+ */
40
+ tooltipSuffix: string | undefined | null;
33
41
  /**
34
42
  * Indication whether are html tags allowed in tooltip text
35
43
  */
@@ -47,12 +55,16 @@ export declare class EllipsisTooltipSADirective implements OnChanges, OnDestroy
47
55
  * Called when component is destroyed
48
56
  */
49
57
  ngOnDestroy(): void;
58
+ /**
59
+ * Updates tooltip value
60
+ */
61
+ protected updateTooltip(): void;
50
62
  /**
51
63
  * Custom input type for `element` input
52
64
  */
53
65
  static ngAcceptInputType_element: HTMLElement | ElementRef | '';
54
66
  static ɵfac: i0.ɵɵFactoryDeclaration<EllipsisTooltipSADirective, never>;
55
- static ɵdir: i0.ɵɵDirectiveDeclaration<EllipsisTooltipSADirective, "[ellipsisTooltip]", never, { "ellipsisClass": { "alias": "ellipsisClass"; "required": false; }; "allowHtml": { "alias": "allowHtml"; "required": false; }; "element": { "alias": "ellipsisTooltip"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.TooltipDirective; inputs: {}; outputs: {}; }]>;
67
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EllipsisTooltipSADirective, "[ellipsisTooltip]", never, { "ellipsisClass": { "alias": "ellipsisClass"; "required": false; }; "tooltipPrefix": { "alias": "tooltipPrefix"; "required": false; }; "tooltipSuffix": { "alias": "tooltipSuffix"; "required": false; }; "allowHtml": { "alias": "allowHtml"; "required": false; }; "element": { "alias": "ellipsisTooltip"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.TooltipDirective; inputs: {}; outputs: {}; }]>;
56
68
  static ngAcceptInputType_allowHtml: unknown;
57
69
  }
58
70
  //# sourceMappingURL=ellipsisTooltip.directive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ellipsisTooltip.directive.d.ts","sourceRoot":"","sources":["ellipsisTooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,UAAU,EAAS,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAA2B,MAAM,eAAe,CAAC;AAGrI,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;;;AAEvD;;GAEG;AACH,qBASa,0BAA2B,YAAW,SAAS,EAAE,SAAS;IAInE;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAqB;IAElD;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,gBAAgB,CAA4B;IAE/D;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,WAAW,CAAoC;IAEvE;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,gBAAgB,GAAC,SAAS,GAAC,IAAI,CAAuH;IAE9K;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,MAAM,GAAC,SAAS,GAAC,IAAI,CAAC;IAIlD;;OAEG;IAEI,aAAa,EAAE,MAA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