@dereekb/dbx-form 13.17.0 → 13.18.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.
Files changed (46) hide show
  1. package/fesm2022/dereekb-dbx-form-calendar.mjs +53 -316
  2. package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
  3. package/fesm2022/{dereekb-dbx-form-expand.field.component-xIW9lckC.mjs → dereekb-dbx-form-expand.field.component-uqVNtX2s.mjs} +3 -3
  4. package/fesm2022/{dereekb-dbx-form-expand.field.component-xIW9lckC.mjs.map → dereekb-dbx-form-expand.field.component-uqVNtX2s.mjs.map} +1 -1
  5. package/fesm2022/dereekb-dbx-form-mapbox.mjs +10 -538
  6. package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
  7. package/fesm2022/dereekb-dbx-form-style-demo.mjs +417 -0
  8. package/fesm2022/dereekb-dbx-form-style-demo.mjs.map +1 -0
  9. package/fesm2022/dereekb-dbx-form.mjs +1953 -9085
  10. package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
  11. package/lib/extension/calendar/_calendar.scss +3 -3
  12. package/lib/forge/field/_field.scss +15 -0
  13. package/lib/forge/field/selection/pickable/_pickable.scss +11 -6
  14. package/lib/forge/field/selection/searchable/_searchable.scss +71 -3
  15. package/lib/forge/field/selection/sourceselect/_sourceselect.scss +1 -1
  16. package/lib/{formly → forge}/field/texteditor/_texteditor.scss +7 -3
  17. package/lib/{formly → forge}/field/value/array/_array.scss +4 -4
  18. package/lib/{formly → forge}/field/value/date/_date.scss +5 -9
  19. package/lib/{formly → forge}/field/value/duration/_duration.scss +7 -7
  20. package/lib/{formly → forge}/field/value/phone/_phone.scss +1 -1
  21. package/lib/forge/preset/_preset.scss +4 -4
  22. package/lib/forge/style/_shared.scss +9 -0
  23. package/lib/form/_form.scss +3 -0
  24. package/lib/style/_all-core.scss +0 -4
  25. package/lib/style/_all-theme.scss +0 -4
  26. package/lib/style/_all-typography.scss +0 -2
  27. package/package.json +12 -10
  28. package/style-demo/README.md +7 -0
  29. package/types/dereekb-dbx-form-calendar.d.ts +81 -232
  30. package/types/dereekb-dbx-form-mapbox.d.ts +9 -250
  31. package/types/dereekb-dbx-form-style-demo.d.ts +195 -0
  32. package/types/dereekb-dbx-form.d.ts +4191 -8496
  33. package/lib/formly/_formly.scss +0 -17
  34. package/lib/formly/field/_field.scss +0 -27
  35. package/lib/formly/field/checklist/_checklist.scss +0 -49
  36. package/lib/formly/field/component/_component.scss +0 -10
  37. package/lib/formly/field/selection/_selection.scss +0 -21
  38. package/lib/formly/field/selection/list/_list.scss +0 -15
  39. package/lib/formly/field/selection/pickable/_pickable.scss +0 -18
  40. package/lib/formly/field/selection/searchable/_searchable.scss +0 -88
  41. package/lib/formly/field/selection/sourceselect/_sourceselect.scss +0 -42
  42. package/lib/formly/field/value/_value.scss +0 -30
  43. package/lib/formly/field/value/boolean/_boolean.scss +0 -52
  44. package/lib/formly/field/value/number/_number.scss +0 -17
  45. package/lib/formly/field/value/text/_text.scss +0 -10
  46. package/lib/formly/field/wrapper/_wrapper.scss +0 -31
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import * as i3 from '@angular/material/button';
3
+ import * as i4 from '@angular/material/button';
4
4
  import { MatButtonModule } from '@angular/material/button';
5
5
  import * as i1 from '@angular/material/icon';
6
6
  import { MatIconModule } from '@angular/material/icon';
@@ -43,7 +43,7 @@ class DbxForgeExpandFieldComponent {
43
43
  fieldState.markAsTouched();
44
44
  }
45
45
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxForgeExpandFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
46
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxForgeExpandFieldComponent, isStandalone: true, selector: "dbx-forge-expand-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()" } }, ngImport: i0, template: "@if (buttonTypeSignal() === 'button') {\n <button mat-stroked-button type=\"button\" class=\"dbx-forge-expand-button\" (click)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon>{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </button>\n} @else {\n <span class=\"dbx-forge-expand-text\" role=\"button\" tabindex=\"0\" (click)=\"toggle()\" (keydown.enter)=\"toggle()\" (keydown.space)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon class=\"dbx-forge-expand-text-icon\">{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </span>\n}\n", styles: [":host{display:block}.dbx-forge-expand-text{cursor:pointer;display:inline-flex;align-items:center;gap:4px;-webkit-user-select:none;user-select:none;color:var(--mat-sys-primary);font-size:.875rem}.dbx-forge-expand-text:hover{text-decoration:underline}.dbx-forge-expand-text-icon{font-size:18px;width:18px;height:18px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
46
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxForgeExpandFieldComponent, isStandalone: true, selector: "dbx-forge-expand-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()" } }, ngImport: i0, template: "@if (buttonTypeSignal() === 'button') {\n <button mat-stroked-button type=\"button\" class=\"dbx-forge-expand-button\" (click)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon>{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </button>\n} @else {\n <span class=\"dbx-forge-expand-text\" role=\"button\" tabindex=\"0\" (click)=\"toggle()\" (keydown.enter)=\"toggle()\" (keydown.space)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon class=\"dbx-forge-expand-text-icon\">{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </span>\n}\n", styles: [":host{display:block}.dbx-forge-expand-text{cursor:pointer;display:inline-flex;align-items:center;gap:4px;-webkit-user-select:none;user-select:none;color:var(--mat-sys-primary);font-size:.875rem}.dbx-forge-expand-text:hover{text-decoration:underline}.dbx-forge-expand-text-icon{font-size:18px;width:18px;height:18px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
47
47
  }
48
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxForgeExpandFieldComponent, decorators: [{
49
49
  type: Component,
@@ -53,4 +53,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
53
53
  }], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], validationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationMessages", required: false }] }], defaultValidationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValidationMessages", required: false }] }] } });
54
54
 
55
55
  export { DbxForgeExpandFieldComponent };
56
- //# sourceMappingURL=dereekb-dbx-form-expand.field.component-xIW9lckC.mjs.map
56
+ //# sourceMappingURL=dereekb-dbx-form-expand.field.component-uqVNtX2s.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dereekb-dbx-form-expand.field.component-xIW9lckC.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/expand/expand.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/expand/expand.field.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { type FieldTree } from '@angular/forms/signals';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport type { DbxForgeExpandFieldProps } from './expand.field';\n\n/**\n * Forge ValueFieldComponent that renders an expand/collapse control.\n *\n * Displays as either a Material stroked button or a clickable text link.\n * Writes `true`/`false` to its FieldTree value on click, which drives\n * conditional visibility on sibling groups via ng-forge's `logic` system.\n */\n@Component({\n selector: 'dbx-forge-expand-field',\n templateUrl: './expand.field.component.html',\n styles: `\n :host {\n display: block;\n }\n\n .dbx-forge-expand-text {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n user-select: none;\n color: var(--mat-sys-primary);\n font-size: 0.875rem;\n }\n\n .dbx-forge-expand-text:hover {\n text-decoration: underline;\n }\n\n .dbx-forge-expand-text-icon {\n font-size: 18px;\n width: 18px;\n height: 18px;\n }\n `,\n imports: [MatButtonModule, MatIconModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n '[class]': 'className()'\n }\n})\nexport class DbxForgeExpandFieldComponent {\n // ng-forge ValueFieldComponent inputs\n readonly field = input.required<FieldTree<boolean>>();\n readonly key = input.required<string>();\n readonly label = input<DynamicText | undefined>();\n readonly placeholder = input<DynamicText | undefined>();\n readonly className = input<string>('');\n readonly tabIndex = input<number | undefined>();\n readonly props = input<DbxForgeExpandFieldProps | undefined>();\n readonly meta = input<FieldMeta | undefined>();\n readonly validationMessages = input<ValidationMessages | undefined>();\n readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n readonly isOpenSignal = computed((): boolean => {\n return this.field()().value() ?? false;\n });\n\n readonly buttonTypeSignal = computed(() => {\n return this.props()?.buttonType ?? 'text';\n });\n\n readonly labelSignal = computed(() => {\n return this.props()?.expandLabel ?? '';\n });\n\n readonly iconSignal = computed(() => {\n return this.isOpenSignal() ? 'expand_less' : 'expand_more';\n });\n\n toggle(): void {\n const fieldState = this.field()();\n const currentValue = fieldState.value() ?? false;\n fieldState.value.set(!currentValue);\n fieldState.markAsTouched();\n }\n}\n","@if (buttonTypeSignal() === 'button') {\n <button mat-stroked-button type=\"button\" class=\"dbx-forge-expand-button\" (click)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon>{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </button>\n} @else {\n <span class=\"dbx-forge-expand-text\" role=\"button\" tabindex=\"0\" (click)=\"toggle()\" (keydown.enter)=\"toggle()\" (keydown.space)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon class=\"dbx-forge-expand-text-icon\">{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </span>\n}\n"],"names":["i2"],"mappings":";;;;;;;AAOA;;;;;;AAMG;MAoCU,4BAA4B,CAAA;;AAE9B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAsB;AAC5C,IAAA,GAAG,GAA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,+TAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED+BY,eAAe,mXAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAO7B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAnCxC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EAAA,OAAA,EA2BzB,CAAC,eAAe,EAAE,aAAa,CAAC,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,IAAA,EACV;AACJ,wBAAA,SAAS,EAAE;AACZ,qBAAA,EAAA,QAAA,EAAA,glBAAA,EAAA,MAAA,EAAA,CAAA,+TAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"dereekb-dbx-form-expand.field.component-uqVNtX2s.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/expand/expand.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/expand/expand.field.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { type FieldTree } from '@angular/forms/signals';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport type { DbxForgeExpandFieldProps } from './expand.field';\n\n/**\n * Forge ValueFieldComponent that renders an expand/collapse control.\n *\n * Displays as either a Material stroked button or a clickable text link.\n * Writes `true`/`false` to its FieldTree value on click, which drives\n * conditional visibility on sibling groups via ng-forge's `logic` system.\n */\n@Component({\n selector: 'dbx-forge-expand-field',\n templateUrl: './expand.field.component.html',\n styles: `\n :host {\n display: block;\n }\n\n .dbx-forge-expand-text {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n user-select: none;\n color: var(--mat-sys-primary);\n font-size: 0.875rem;\n }\n\n .dbx-forge-expand-text:hover {\n text-decoration: underline;\n }\n\n .dbx-forge-expand-text-icon {\n font-size: 18px;\n width: 18px;\n height: 18px;\n }\n `,\n imports: [MatButtonModule, MatIconModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n '[class]': 'className()'\n }\n})\nexport class DbxForgeExpandFieldComponent {\n // ng-forge ValueFieldComponent inputs\n readonly field = input.required<FieldTree<boolean>>();\n readonly key = input.required<string>();\n readonly label = input<DynamicText | undefined>();\n readonly placeholder = input<DynamicText | undefined>();\n readonly className = input<string>('');\n readonly tabIndex = input<number | undefined>();\n readonly props = input<DbxForgeExpandFieldProps | undefined>();\n readonly meta = input<FieldMeta | undefined>();\n readonly validationMessages = input<ValidationMessages | undefined>();\n readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n readonly isOpenSignal = computed((): boolean => {\n return this.field()().value() ?? false;\n });\n\n readonly buttonTypeSignal = computed(() => {\n return this.props()?.buttonType ?? 'text';\n });\n\n readonly labelSignal = computed(() => {\n return this.props()?.expandLabel ?? '';\n });\n\n readonly iconSignal = computed(() => {\n return this.isOpenSignal() ? 'expand_less' : 'expand_more';\n });\n\n toggle(): void {\n const fieldState = this.field()();\n const currentValue = fieldState.value() ?? false;\n fieldState.value.set(!currentValue);\n fieldState.markAsTouched();\n }\n}\n","@if (buttonTypeSignal() === 'button') {\n <button mat-stroked-button type=\"button\" class=\"dbx-forge-expand-button\" (click)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon>{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </button>\n} @else {\n <span class=\"dbx-forge-expand-text\" role=\"button\" tabindex=\"0\" (click)=\"toggle()\" (keydown.enter)=\"toggle()\" (keydown.space)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon class=\"dbx-forge-expand-text-icon\">{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </span>\n}\n"],"names":["i2"],"mappings":";;;;;;;AAOA;;;;;;AAMG;MAoCU,4BAA4B,CAAA;;AAE9B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAsB;AAC5C,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,yEAAU;IAC9B,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;IACxC,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;AAC9C,IAAA,SAAS,GAAG,KAAK,CAAS,EAAE,gFAAC;IAC7B,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAsB;IACtC,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAwC;IACrD,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAyB;IACrC,kBAAkB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,oBAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAkC;IAC5D,yBAAyB,GAAG,K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