@dereekb/dbx-form 13.7.0 → 13.8.0
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/fesm2022/dereekb-dbx-form-array.field.component-1wYSd4d3.mjs +169 -0
- package/fesm2022/dereekb-dbx-form-array.field.component-1wYSd4d3.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-calendar.mjs +433 -144
- package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs +56 -0
- package/fesm2022/dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-formfield.field.component-BQyujXe3.mjs +70 -0
- package/fesm2022/dereekb-dbx-form-formfield.field.component-BQyujXe3.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-info.field.component-B0cFprvc.mjs +50 -0
- package/fesm2022/dereekb-dbx-form-info.field.component-B0cFprvc.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-info.wrapper.field.component-Crm4wVr5.mjs +35 -0
- package/fesm2022/dereekb-dbx-form-info.wrapper.field.component-Crm4wVr5.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-mapbox.mjs +629 -32
- package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-quiz.mjs +46 -55
- package/fesm2022/dereekb-dbx-form-quiz.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-section.field.component-DliafLqL.mjs +63 -0
- package/fesm2022/dereekb-dbx-form-section.field.component-DliafLqL.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-style.field.component-C3ZNiotx.mjs +71 -0
- package/fesm2022/dereekb-dbx-form-style.field.component-C3ZNiotx.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-working.field.component-CO8vK2bH.mjs +53 -0
- package/fesm2022/dereekb-dbx-form-working.field.component-CO8vK2bH.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs +54 -0
- package/fesm2022/dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs +87 -0
- package/fesm2022/dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form.mjs +11789 -4869
- package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
- package/lib/forge/field/_field.scss +14 -0
- package/lib/forge/field/selection/_selection.scss +15 -0
- package/lib/forge/field/selection/pickable/_pickable.scss +11 -0
- package/lib/forge/field/selection/searchable/_searchable.scss +34 -0
- package/lib/forge/field/selection/sourceselect/_sourceselect.scss +46 -0
- package/lib/forge/field/wrapper/_wrapper.scss +62 -0
- package/lib/forge/style/_shared.scss +26 -0
- package/lib/form/_form.scss +95 -0
- package/lib/formly/field/texteditor/_texteditor.scss +8 -0
- package/lib/formly/field/value/array/_array.scss +6 -0
- package/lib/formly/field/value/phone/_phone.scss +4 -1
- package/lib/style/_all-core.scss +2 -0
- package/lib/style/_all-theme.scss +2 -0
- package/package.json +16 -14
- package/types/dereekb-dbx-form-calendar.d.ts +313 -96
- package/types/dereekb-dbx-form-mapbox.d.ts +297 -4
- package/types/dereekb-dbx-form.d.ts +8009 -2498
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { viewChild, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/material/progress-bar';
|
|
4
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
5
|
+
import { AbstractForgeWrapperFieldComponent, provideDbxForgeWrapperFieldDirective } from './dereekb-dbx-form.mjs';
|
|
6
|
+
import { D as DbxForgeWrapperContentComponent } from './dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Forge wrapper field component that renders child fields with a loading
|
|
10
|
+
* indicator shown during async validation.
|
|
11
|
+
*
|
|
12
|
+
* This is the forge equivalent of formly's `DbxFormWorkingWrapperComponent`.
|
|
13
|
+
* Monitors the child form's pending signal (via {@link DbxForgeWrapperContentComponent})
|
|
14
|
+
* to detect when async validators are running.
|
|
15
|
+
*/
|
|
16
|
+
class DbxForgeWorkingWrapperFieldComponent extends AbstractForgeWrapperFieldComponent {
|
|
17
|
+
_content = viewChild(DbxForgeWrapperContentComponent, ...(ngDevMode ? [{ debugName: "_content" }] : /* istanbul ignore next */ []));
|
|
18
|
+
showLoadingSignal = computed(() => {
|
|
19
|
+
return this._content()?.pending() ?? false;
|
|
20
|
+
}, ...(ngDevMode ? [{ debugName: "showLoadingSignal" }] : /* istanbul ignore next */ []));
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWorkingWrapperFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DbxForgeWorkingWrapperFieldComponent, isStandalone: true, selector: "dbx-forge-working-wrapper-field", host: { properties: { "class": "className()" } }, providers: provideDbxForgeWrapperFieldDirective(DbxForgeWorkingWrapperFieldComponent), viewQueries: [{ propertyName: "_content", first: true, predicate: DbxForgeWrapperContentComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
23
|
+
<div class="dbx-forge-working-wrapper">
|
|
24
|
+
<dbx-forge-wrapper-content />
|
|
25
|
+
@if (showLoadingSignal()) {
|
|
26
|
+
<mat-progress-bar mode="indeterminate" class="dbx-forge-working-bar"></mat-progress-bar>
|
|
27
|
+
}
|
|
28
|
+
</div>
|
|
29
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DbxForgeWrapperContentComponent, selector: "dbx-forge-wrapper-content" }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWorkingWrapperFieldComponent, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{
|
|
34
|
+
selector: 'dbx-forge-working-wrapper-field',
|
|
35
|
+
template: `
|
|
36
|
+
<div class="dbx-forge-working-wrapper">
|
|
37
|
+
<dbx-forge-wrapper-content />
|
|
38
|
+
@if (showLoadingSignal()) {
|
|
39
|
+
<mat-progress-bar mode="indeterminate" class="dbx-forge-working-bar"></mat-progress-bar>
|
|
40
|
+
}
|
|
41
|
+
</div>
|
|
42
|
+
`,
|
|
43
|
+
providers: provideDbxForgeWrapperFieldDirective(DbxForgeWorkingWrapperFieldComponent),
|
|
44
|
+
imports: [DbxForgeWrapperContentComponent, MatProgressBarModule],
|
|
45
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
46
|
+
standalone: true,
|
|
47
|
+
host: {
|
|
48
|
+
'[class]': 'className()'
|
|
49
|
+
}
|
|
50
|
+
}]
|
|
51
|
+
}], propDecorators: { _content: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DbxForgeWrapperContentComponent), { isSignal: true }] }] } });
|
|
52
|
+
|
|
53
|
+
export { DbxForgeWorkingWrapperFieldComponent };
|
|
54
|
+
//# sourceMappingURL=dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/working/working.wrapper.field.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, viewChild } from '@angular/core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { AbstractForgeWrapperFieldComponent, provideDbxForgeWrapperFieldDirective } from '../wrapper.field';\nimport { DbxForgeWrapperContentComponent } from '../wrapper.content.component';\nimport type { DbxForgeWorkingWrapperFieldProps } from './working.wrapper.field';\n\n/**\n * Forge wrapper field component that renders child fields with a loading\n * indicator shown during async validation.\n *\n * This is the forge equivalent of formly's `DbxFormWorkingWrapperComponent`.\n * Monitors the child form's pending signal (via {@link DbxForgeWrapperContentComponent})\n * to detect when async validators are running.\n */\n@Component({\n selector: 'dbx-forge-working-wrapper-field',\n template: `\n <div class=\"dbx-forge-working-wrapper\">\n <dbx-forge-wrapper-content />\n @if (showLoadingSignal()) {\n <mat-progress-bar mode=\"indeterminate\" class=\"dbx-forge-working-bar\"></mat-progress-bar>\n }\n </div>\n `,\n providers: provideDbxForgeWrapperFieldDirective(DbxForgeWorkingWrapperFieldComponent),\n imports: [DbxForgeWrapperContentComponent, MatProgressBarModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n '[class]': 'className()'\n }\n})\nexport class DbxForgeWorkingWrapperFieldComponent extends AbstractForgeWrapperFieldComponent<DbxForgeWorkingWrapperFieldProps> {\n private readonly _content = viewChild(DbxForgeWrapperContentComponent);\n\n readonly showLoadingSignal = computed((): boolean => {\n return this._content()?.pending() ?? false;\n });\n}\n"],"names":[],"mappings":";;;;;;;AAMA;;;;;;;AAOG;AAmBG,MAAO,oCAAqC,SAAQ,kCAAoE,CAAA;AAC3G,IAAA,QAAQ,GAAG,SAAS,CAAC,+BAA+B,+EAAC;AAE7D,IAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAc;QAClD,OAAO,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,KAAK;AAC5C,IAAA,CAAC,wFAAC;uGALS,oCAAoC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,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E;AACJ,wBAAA,SAAS,EAAE;AACZ;AACF,iBAAA;0FAEuC,+BAA+B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, computed, viewChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { DynamicForm } from '@ng-forge/dynamic-forms';
|
|
4
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { EMPTY } from 'rxjs';
|
|
6
|
+
import { BooleanStringKeyArrayUtility } from '@dereekb/util';
|
|
7
|
+
import { DbxForgeWrapperFieldDirective, DbxForgeFormContext } from './dereekb-dbx-form.mjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Reusable component that renders a nested ng-forge `DynamicForm` for wrapper fields.
|
|
11
|
+
*
|
|
12
|
+
* Injects the parent {@link DbxForgeWrapperFieldDirective} to read the child form config
|
|
13
|
+
* and two-way bind the form value. Wrapper field components provide themselves as
|
|
14
|
+
* `DbxForgeWrapperFieldDirective` via {@link provideDbxForgeWrapperFieldDirective}.
|
|
15
|
+
*
|
|
16
|
+
* Exposes the child DynamicForm's validation state via public signals so parent
|
|
17
|
+
* wrapper components can display errors in their own subscript area.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <dbx-section [headerConfig]="headerConfigSignal()">
|
|
22
|
+
* <dbx-forge-wrapper-content />
|
|
23
|
+
* </dbx-section>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
class DbxForgeWrapperContentComponent {
|
|
27
|
+
wrapper = inject(DbxForgeWrapperFieldDirective);
|
|
28
|
+
_context = inject(DbxForgeFormContext, { optional: true });
|
|
29
|
+
_destroyRef = inject(DestroyRef);
|
|
30
|
+
_contextDisabled = toSignal(this._context?.disabled$ ?? EMPTY, { initialValue: undefined });
|
|
31
|
+
formOptionsSignal = computed(() => {
|
|
32
|
+
return BooleanStringKeyArrayUtility.isTrue(this._contextDisabled()) ? { disabled: true } : undefined;
|
|
33
|
+
}, ...(ngDevMode ? [{ debugName: "formOptionsSignal" }] : /* istanbul ignore next */ []));
|
|
34
|
+
/**
|
|
35
|
+
* Reference to the child DynamicForm instance.
|
|
36
|
+
*/
|
|
37
|
+
dynamicForm = viewChild(DynamicForm, ...(ngDevMode ? [{ debugName: "dynamicForm" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/**
|
|
39
|
+
* All child form validation errors (recursive). Empty array when the form hasn't rendered yet.
|
|
40
|
+
*
|
|
41
|
+
* Uses `errorSummary` from the field tree which aggregates errors from all child fields,
|
|
42
|
+
* not just root-level errors. This is necessary because wrapper child forms contain
|
|
43
|
+
* nested fields whose validation errors don't appear in the root `errors()` signal.
|
|
44
|
+
*/
|
|
45
|
+
errors = computed(() => this.dynamicForm()?.form()?.()?.errorSummary?.() ?? [], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/**
|
|
47
|
+
* Whether any child form field has been touched (blurred).
|
|
48
|
+
*/
|
|
49
|
+
touched = computed(() => this.dynamicForm()?.touched() ?? false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
50
|
+
/**
|
|
51
|
+
* Whether the child form is currently valid.
|
|
52
|
+
*/
|
|
53
|
+
valid = computed(() => this.dynamicForm()?.valid() ?? true, ...(ngDevMode ? [{ debugName: "valid" }] : /* istanbul ignore next */ []));
|
|
54
|
+
/**
|
|
55
|
+
* Whether the child form has any pending async validators.
|
|
56
|
+
*/
|
|
57
|
+
pending = computed(() => this.dynamicForm()?.form()?.()?.pending?.() ?? false, ...(ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []));
|
|
58
|
+
ngOnInit() {
|
|
59
|
+
if (this._context) {
|
|
60
|
+
const unregister = this._context.registerWrapperValidity(this.valid);
|
|
61
|
+
this._destroyRef.onDestroy(unregister);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWrapperContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DbxForgeWrapperContentComponent, isStandalone: true, selector: "dbx-forge-wrapper-content", viewQueries: [{ propertyName: "dynamicForm", first: true, predicate: DynamicForm, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
66
|
+
@if (wrapper.childConfigSignal()) {
|
|
67
|
+
<form [dynamic-form]="wrapper.childConfigSignal()!" [(value)]="wrapper.childValueSignal" [formOptions]="formOptionsSignal()"></form>
|
|
68
|
+
}
|
|
69
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DynamicForm, selector: "form[dynamic-form]", inputs: ["dynamic-form", "formOptions", "value"], outputs: ["valueChange", "validityChange", "dirtyChange", "submitted", "reset", "cleared", "events", "initialized", "onPageChange", "onPageNavigationStateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
70
|
+
}
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWrapperContentComponent, decorators: [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{
|
|
74
|
+
selector: 'dbx-forge-wrapper-content',
|
|
75
|
+
template: `
|
|
76
|
+
@if (wrapper.childConfigSignal()) {
|
|
77
|
+
<form [dynamic-form]="wrapper.childConfigSignal()!" [(value)]="wrapper.childValueSignal" [formOptions]="formOptionsSignal()"></form>
|
|
78
|
+
}
|
|
79
|
+
`,
|
|
80
|
+
imports: [DynamicForm],
|
|
81
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
82
|
+
standalone: true
|
|
83
|
+
}]
|
|
84
|
+
}], propDecorators: { dynamicForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DynamicForm), { isSignal: true }] }] } });
|
|
85
|
+
|
|
86
|
+
export { DbxForgeWrapperContentComponent as D };
|
|
87
|
+
//# sourceMappingURL=dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/wrapper.content.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, DestroyRef, inject, type OnInit, type Signal, viewChild } from '@angular/core';\nimport { DynamicForm, type FormOptions } from '@ng-forge/dynamic-forms';\nimport type { ValidationError } from '@angular/forms/signals';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { EMPTY } from 'rxjs';\nimport { BooleanStringKeyArrayUtility } from '@dereekb/util';\nimport { DbxForgeWrapperFieldDirective } from './wrapper.field';\nimport { DbxForgeFormContext } from '../../form/forge.context';\n\n/**\n * Reusable component that renders a nested ng-forge `DynamicForm` for wrapper fields.\n *\n * Injects the parent {@link DbxForgeWrapperFieldDirective} to read the child form config\n * and two-way bind the form value. Wrapper field components provide themselves as\n * `DbxForgeWrapperFieldDirective` via {@link provideDbxForgeWrapperFieldDirective}.\n *\n * Exposes the child DynamicForm's validation state via public signals so parent\n * wrapper components can display errors in their own subscript area.\n *\n * @example\n * ```html\n * <dbx-section [headerConfig]=\"headerConfigSignal()\">\n * <dbx-forge-wrapper-content />\n * </dbx-section>\n * ```\n */\n@Component({\n selector: 'dbx-forge-wrapper-content',\n template: `\n @if (wrapper.childConfigSignal()) {\n <form [dynamic-form]=\"wrapper.childConfigSignal()!\" [(value)]=\"wrapper.childValueSignal\" [formOptions]=\"formOptionsSignal()\"></form>\n }\n `,\n imports: [DynamicForm],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxForgeWrapperContentComponent implements OnInit {\n readonly wrapper = inject(DbxForgeWrapperFieldDirective);\n\n private readonly _context = inject(DbxForgeFormContext, { optional: true });\n private readonly _destroyRef = inject(DestroyRef);\n\n private readonly _contextDisabled = toSignal(this._context?.disabled$ ?? EMPTY, { initialValue: undefined });\n\n readonly formOptionsSignal = computed((): FormOptions | undefined => {\n return BooleanStringKeyArrayUtility.isTrue(this._contextDisabled()) ? { disabled: true } : undefined;\n });\n\n /**\n * Reference to the child DynamicForm instance.\n */\n readonly dynamicForm = viewChild(DynamicForm);\n\n /**\n * All child form validation errors (recursive). Empty array when the form hasn't rendered yet.\n *\n * Uses `errorSummary` from the field tree which aggregates errors from all child fields,\n * not just root-level errors. This is necessary because wrapper child forms contain\n * nested fields whose validation errors don't appear in the root `errors()` signal.\n */\n readonly errors: Signal<ValidationError.WithFieldTree[]> = computed(() => this.dynamicForm()?.form()?.()?.errorSummary?.() ?? []);\n\n /**\n * Whether any child form field has been touched (blurred).\n */\n readonly touched: Signal<boolean> = computed(() => this.dynamicForm()?.touched() ?? false);\n\n /**\n * Whether the child form is currently valid.\n */\n readonly valid: Signal<boolean> = computed(() => this.dynamicForm()?.valid() ?? true);\n\n /**\n * Whether the child form has any pending async validators.\n */\n readonly pending: Signal<boolean> = computed(() => this.dynamicForm()?.form()?.()?.pending?.() ?? false);\n\n ngOnInit(): void {\n if (this._context) {\n const unregister = this._context.registerWrapperValidity(this.valid);\n this._destroyRef.onDestroy(unregister);\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;AASA;;;;;;;;;;;;;;;;AAgBG;MAYU,+BAA+B,CAAA;AACjC,IAAA,OAAO,GAAG,MAAM,CAAC,6BAA6B,CAAC;IAEvC,QAAQ,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC1D,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAEhC,IAAA,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,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