ngssm-store 22.1.0 → 22.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ngssm-store-visibility.mjs","sources":["../../../projects/ngssm-store/visibility/src/actions/ngssm-visibility-action-type.ts","../../../projects/ngssm-store/visibility/src/actions/toggle-element-visibility.action.ts","../../../projects/ngssm-store/visibility/src/actions/show-element.action.ts","../../../projects/ngssm-store/visibility/src/actions/hide-element.action.ts","../../../projects/ngssm-store/visibility/src/actions/define-elements-group.action.ts","../../../projects/ngssm-store/visibility/src/state/ngssm-visibility.state.ts","../../../projects/ngssm-store/visibility/src/reducers/visibility.reducer.ts","../../../projects/ngssm-store/visibility/src/provide-ngssm-visibility.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-is-element-visible.pipe.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-show-element.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-hide-element.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-toggle-element-visibility.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-visibility-toggle-group/ngssm-visibility-toggle-group.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-visibility-toggle-group/ngssm-visibility-toggle-group.html","../../../projects/ngssm-store/visibility/src/signal-helpers.ts","../../../projects/ngssm-store/visibility/ngssm-store-visibility.ts"],"sourcesContent":["export enum NgssmVisibilityActionType {\n defineElementsGroup = '[NgssmVisibilityActionType] defineElementsGroup',\n toggleElementVisibility = '[NgssmVisibilityActionType] toggleElementVisibility',\n hideElement = '[NgssmVisibilityActionType] hideElement',\n showElement = '[NgssmVisibilityActionType] showElement'\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class ToggleElementVisibilityAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.toggleElementVisibility;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class ShowElementAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.showElement;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class HideElementAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.hideElement;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class DefineElementsGroupAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.defineElementsGroup;\n\n constructor(public readonly elementKeys: string[]) {}\n}\n","import update, { Spec } from 'immutability-helper';\n\nimport { NgSsmFeatureState, State } from 'ngssm-store';\n\nexport const selectNgssmVisibilityState = (state: State): NgssmVisibilityState =>\n state[NgssmVisibilityStateSpecification.featureStateKey] as NgssmVisibilityState;\n\nexport const updateNgssmVisibilityState = (state: State, command: Spec<NgssmVisibilityState, never>): State =>\n update(state, {\n [NgssmVisibilityStateSpecification.featureStateKey]: command\n });\n\nexport interface NgssmVisibilityState {\n elements: Record<string, boolean>;\n elementsGroups: string[][];\n}\n\n@NgSsmFeatureState({\n featureStateKey: NgssmVisibilityStateSpecification.featureStateKey,\n initialState: NgssmVisibilityStateSpecification.initialState\n})\nexport class NgssmVisibilityStateSpecification {\n public static readonly featureStateKey = 'ngssm-visibility-state';\n public static readonly initialState: NgssmVisibilityState = {\n elements: {},\n elementsGroups: []\n };\n}\n","import { Injectable } from '@angular/core';\n\nimport { Spec } from 'immutability-helper';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport {\n DefineElementsGroupAction,\n HideElementAction,\n NgssmVisibilityActionType,\n ShowElementAction,\n ToggleElementVisibilityAction\n} from '../actions';\nimport { selectNgssmVisibilityState, updateNgssmVisibilityState } from '../state';\n\n@Injectable()\nexport class VisibilityReducer implements Reducer {\n public readonly processedActions: string[] = [\n NgssmVisibilityActionType.toggleElementVisibility,\n NgssmVisibilityActionType.showElement,\n NgssmVisibilityActionType.hideElement,\n NgssmVisibilityActionType.defineElementsGroup\n ];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case NgssmVisibilityActionType.toggleElementVisibility: {\n const toggleVisibilityAction = action as ToggleElementVisibilityAction;\n if (selectNgssmVisibilityState(state).elements[toggleVisibilityAction.elementKey] === true) {\n return updateNgssmVisibilityState(state, {\n elements: {\n [toggleVisibilityAction.elementKey]: { $set: false }\n }\n });\n }\n\n return this.setElementVisible(state, toggleVisibilityAction.elementKey);\n }\n\n case NgssmVisibilityActionType.showElement: {\n const showAction = action as ShowElementAction;\n return this.setElementVisible(state, showAction.elementKey);\n }\n\n case NgssmVisibilityActionType.hideElement: {\n const hideAction = action as HideElementAction;\n return updateNgssmVisibilityState(state, {\n elements: {\n [hideAction.elementKey]: { $set: false }\n }\n });\n }\n\n case NgssmVisibilityActionType.defineElementsGroup: {\n const defineElementsGroupAction = action as DefineElementsGroupAction;\n const keys = [...defineElementsGroupAction.elementKeys];\n keys.sort();\n if (this.groupExists(keys, selectNgssmVisibilityState(state).elementsGroups)) {\n break;\n }\n\n return updateNgssmVisibilityState(state, {\n elementsGroups: { $push: [keys] }\n });\n }\n }\n\n return state;\n }\n\n private groupExists(keys: string[], groups: string[][]): boolean {\n const index = groups.findIndex((group) => {\n return group.length === keys.length && group.findIndex((k, i) => k !== keys[i]) === -1;\n });\n return index !== -1;\n }\n\n private getElementsKeysGroupedWith(key: string, groups: string[][]): string[] {\n const keys = groups.filter((g) => g.includes(key)).flatMap((g) => g);\n const distinctKeys = new Set<string>(keys);\n distinctKeys.delete(key);\n return [...distinctKeys];\n }\n\n private setElementVisible(state: State, key: string): State {\n const elementsCommand: Spec<Record<string, boolean>, never> = {\n [key]: { $set: true }\n };\n\n const associatedElements = this.getElementsKeysGroupedWith(key, selectNgssmVisibilityState(state).elementsGroups);\n associatedElements.forEach((el) => {\n elementsCommand[el] = { $set: false };\n });\n\n return updateNgssmVisibilityState(state, {\n elements: elementsCommand\n });\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { provideReducers } from 'ngssm-store';\nimport { VisibilityReducer } from './reducers';\n\nexport const provideNgssmVisibility = (): EnvironmentProviders => {\n return makeEnvironmentProviders([provideReducers(VisibilityReducer)]);\n};\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { State } from 'ngssm-store';\nimport { selectNgssmVisibilityState } from '../state';\n\n@Pipe({\n name: 'ngssmIsElementVisible'\n})\nexport class NgssmIsElementVisiblePipe implements PipeTransform {\n public transform(value: State, ...args: string[]): boolean {\n return selectNgssmVisibilityState(value).elements[args[0]] === true;\n }\n}\n","import { Directive, inject, input } from '@angular/core';\n\nimport { Store } from 'ngssm-store';\n\nimport { ShowElementAction } from '../actions';\n\n@Directive({\n selector: '[ngssmShowElement]',\n host: {\n '(click)': 'showElement()'\n }\n})\nexport class NgssmShowElement {\n public readonly ngssmShowElement = input<string | undefined | null>(undefined);\n\n private readonly store = inject(Store);\n\n public showElement(): void {\n const elementKey = this.ngssmShowElement();\n if (elementKey) {\n this.store.dispatchAction(new ShowElementAction(elementKey));\n }\n }\n}\n","import { Directive, inject, input } from '@angular/core';\n\nimport { Store } from 'ngssm-store';\n\nimport { HideElementAction } from '../actions';\n\n@Directive({\n selector: '[ngssmHideElement]',\n host: {\n '(click)': 'hideElement()'\n }\n})\nexport class NgssmHideElement {\n public readonly ngssmHideElement = input<string | undefined | null>(undefined);\n\n private readonly store = inject(Store);\n\n public hideElement(): void {\n const elementKey = this.ngssmHideElement();\n if (elementKey) {\n this.store.dispatchAction(new HideElementAction(elementKey));\n }\n }\n}\n","import { Directive, inject, input } from '@angular/core';\n\nimport { Store } from 'ngssm-store';\n\nimport { ToggleElementVisibilityAction } from '../actions';\n\n@Directive({\n selector: '[ngssmToggleElementVisibility]',\n host: {\n '(click)': 'toggleElementVisibility()'\n }\n})\nexport class NgssmToggleElementVisibility {\n public readonly ngssmToggleElementVisibility = input<string | undefined | null>(undefined);\n\n private readonly store = inject(Store);\n\n public toggleElementVisibility(): void {\n const elementKey = this.ngssmToggleElementVisibility();\n if (elementKey) {\n this.store.dispatchAction(new ToggleElementVisibilityAction(elementKey));\n }\n }\n}\n","import { Component, booleanAttribute, input, inject } from '@angular/core';\nimport { MatButtonToggle, MatButtonToggleGroup } from '@angular/material/button-toggle';\n\nimport { Store } from 'ngssm-store';\n\nimport { NgssmIsElementVisiblePipe } from '../ngssm-is-element-visible.pipe';\nimport { NgssmToggleElementVisibility } from '../ngssm-toggle-element-visibility';\n\n@Component({\n selector: 'ngssm-visibility-toggle-group',\n imports: [MatButtonToggleGroup, MatButtonToggle, NgssmToggleElementVisibility, NgssmIsElementVisiblePipe],\n templateUrl: './ngssm-visibility-toggle-group.html'\n})\nexport class NgssmVisibilityToggleGroup {\n public readonly items = input<{ label: string; key: string }[]>([]);\n public readonly hideMultipleSelectionIndicator = input<boolean, boolean>(false, { transform: booleanAttribute });\n\n protected readonly store = inject(Store);\n}\n","<mat-button-toggle-group [multiple]=\"true\" [hideMultipleSelectionIndicator]=\"hideMultipleSelectionIndicator()\">\n @for (item of items(); track item.key) {\n <mat-button-toggle\n [ngssmToggleElementVisibility]=\"item.key\"\n [checked]=\"store.state() | ngssmIsElementVisible: item.key\"\n [id]=\"item.key\">\n {{ item.label }}\n </mat-button-toggle>\n }\n</mat-button-toggle-group>\n","import { Signal } from '@angular/core';\n\nimport { createSignal } from 'ngssm-store';\n\nimport { selectNgssmVisibilityState } from './state';\n\n/**\n * Represents the visibility state of a specific element.\n * - key: The unique identifier for the element.\n * - visible: A signal that emits the visibility status (true if visible, false otherwise).\n */\nexport interface ElementVisibility {\n key: string;\n visible: Signal<boolean>;\n}\n\n// Creates a signal allowing to listen to changes in element visibility.\nexport const isElementVisible = (elementKey: string): ElementVisibility => ({\n key: elementKey,\n visible: createSignal((state) => selectNgssmVisibilityState(state).elements[elementKey] === true)\n});\n","/**\n *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src/actions/ngssm-visibility-action-type.ts","../../../projects/ngssm-store/visibility/src/actions/toggle-element-visibility.action.ts","../../../projects/ngssm-store/visibility/src/actions/show-element.action.ts","../../../projects/ngssm-store/visibility/src/actions/hide-element.action.ts","../../../projects/ngssm-store/visibility/src/actions/define-elements-group.action.ts","../../../projects/ngssm-store/visibility/src/state/ngssm-visibility.state.ts","../../../projects/ngssm-store/visibility/src/reducers/visibility.reducer.ts","../../../projects/ngssm-store/visibility/src/provide-ngssm-visibility.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-is-element-visible.pipe.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-show-element.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-hide-element.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-toggle-element-visibility.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-visibility-toggle-group/ngssm-visibility-toggle-group.ts","../../../projects/ngssm-store/visibility/src/components/ngssm-visibility-toggle-group/ngssm-visibility-toggle-group.html","../../../projects/ngssm-store/visibility/src/signal-helpers.ts"],"sourcesContent":["export enum NgssmVisibilityActionType {\n defineElementsGroup = '[NgssmVisibilityActionType] defineElementsGroup',\n toggleElementVisibility = '[NgssmVisibilityActionType] toggleElementVisibility',\n hideElement = '[NgssmVisibilityActionType] hideElement',\n showElement = '[NgssmVisibilityActionType] showElement'\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class ToggleElementVisibilityAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.toggleElementVisibility;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class ShowElementAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.showElement;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class HideElementAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.hideElement;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class DefineElementsGroupAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.defineElementsGroup;\n\n constructor(public readonly elementKeys: string[]) {}\n}\n","import update, { Spec } from 'immutability-helper';\n\nimport { NgSsmFeatureState, State } from 'ngssm-store';\n\nexport const selectNgssmVisibilityState = (state: State): NgssmVisibilityState =>\n state[NgssmVisibilityStateSpecification.featureStateKey] as NgssmVisibilityState;\n\nexport const updateNgssmVisibilityState = (state: State, command: Spec<NgssmVisibilityState, never>): State =>\n update(state, {\n [NgssmVisibilityStateSpecification.featureStateKey]: command\n });\n\nexport interface NgssmVisibilityState {\n elements: Record<string, boolean>;\n elementsGroups: string[][];\n}\n\n@NgSsmFeatureState({\n featureStateKey: NgssmVisibilityStateSpecification.featureStateKey,\n initialState: NgssmVisibilityStateSpecification.initialState\n})\nexport class NgssmVisibilityStateSpecification {\n public static readonly featureStateKey = 'ngssm-visibility-state';\n public static readonly initialState: NgssmVisibilityState = {\n elements: {},\n elementsGroups: []\n };\n}\n","import { Injectable } from '@angular/core';\n\nimport { Spec } from 'immutability-helper';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport {\n DefineElementsGroupAction,\n HideElementAction,\n NgssmVisibilityActionType,\n ShowElementAction,\n ToggleElementVisibilityAction\n} from '../actions';\nimport { selectNgssmVisibilityState, updateNgssmVisibilityState } from '../state';\n\n@Injectable()\nexport class VisibilityReducer implements Reducer {\n public readonly processedActions: string[] = [\n NgssmVisibilityActionType.toggleElementVisibility,\n NgssmVisibilityActionType.showElement,\n NgssmVisibilityActionType.hideElement,\n NgssmVisibilityActionType.defineElementsGroup\n ];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case NgssmVisibilityActionType.toggleElementVisibility: {\n const toggleVisibilityAction = action as ToggleElementVisibilityAction;\n if (selectNgssmVisibilityState(state).elements[toggleVisibilityAction.elementKey] === true) {\n return updateNgssmVisibilityState(state, {\n elements: {\n [toggleVisibilityAction.elementKey]: { $set: false }\n }\n });\n }\n\n return this.setElementVisible(state, toggleVisibilityAction.elementKey);\n }\n\n case NgssmVisibilityActionType.showElement: {\n const showAction = action as ShowElementAction;\n return this.setElementVisible(state, showAction.elementKey);\n }\n\n case NgssmVisibilityActionType.hideElement: {\n const hideAction = action as HideElementAction;\n return updateNgssmVisibilityState(state, {\n elements: {\n [hideAction.elementKey]: { $set: false }\n }\n });\n }\n\n case NgssmVisibilityActionType.defineElementsGroup: {\n const defineElementsGroupAction = action as DefineElementsGroupAction;\n const keys = [...defineElementsGroupAction.elementKeys];\n keys.sort();\n if (this.groupExists(keys, selectNgssmVisibilityState(state).elementsGroups)) {\n break;\n }\n\n return updateNgssmVisibilityState(state, {\n elementsGroups: { $push: [keys] }\n });\n }\n }\n\n return state;\n }\n\n private groupExists(keys: string[], groups: string[][]): boolean {\n const index = groups.findIndex((group) => {\n return group.length === keys.length && group.findIndex((k, i) => k !== keys[i]) === -1;\n });\n return index !== -1;\n }\n\n private getElementsKeysGroupedWith(key: string, groups: string[][]): string[] {\n const keys = groups.filter((g) => g.includes(key)).flatMap((g) => g);\n const distinctKeys = new Set<string>(keys);\n distinctKeys.delete(key);\n return [...distinctKeys];\n }\n\n private setElementVisible(state: State, key: string): State {\n const elementsCommand: Spec<Record<string, boolean>, never> = {\n [key]: { $set: true }\n };\n\n const associatedElements = this.getElementsKeysGroupedWith(key, selectNgssmVisibilityState(state).elementsGroups);\n associatedElements.forEach((el) => {\n elementsCommand[el] = { $set: false };\n });\n\n return updateNgssmVisibilityState(state, {\n elements: elementsCommand\n });\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { provideReducers } from 'ngssm-store';\nimport { VisibilityReducer } from './reducers';\n\nexport const provideNgssmVisibility = (): EnvironmentProviders => {\n return makeEnvironmentProviders([provideReducers(VisibilityReducer)]);\n};\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { State } from 'ngssm-store';\nimport { selectNgssmVisibilityState } from '../state';\n\n@Pipe({\n name: 'ngssmIsElementVisible'\n})\nexport class NgssmIsElementVisiblePipe implements PipeTransform {\n public transform(value: State, ...args: string[]): boolean {\n return selectNgssmVisibilityState(value).elements[args[0]] === true;\n }\n}\n","import { Directive, inject, input } from '@angular/core';\n\nimport { Store } from 'ngssm-store';\n\nimport { ShowElementAction } from '../actions';\n\n@Directive({\n selector: '[ngssmShowElement]',\n host: {\n '(click)': 'showElement()'\n }\n})\nexport class NgssmShowElement {\n public readonly ngssmShowElement = input<string | undefined | null>(undefined);\n\n private readonly store = inject(Store);\n\n public showElement(): void {\n const elementKey = this.ngssmShowElement();\n if (elementKey) {\n this.store.dispatchAction(new ShowElementAction(elementKey));\n }\n }\n}\n","import { Directive, inject, input } from '@angular/core';\n\nimport { Store } from 'ngssm-store';\n\nimport { HideElementAction } from '../actions';\n\n@Directive({\n selector: '[ngssmHideElement]',\n host: {\n '(click)': 'hideElement()'\n }\n})\nexport class NgssmHideElement {\n public readonly ngssmHideElement = input<string | undefined | null>(undefined);\n\n private readonly store = inject(Store);\n\n public hideElement(): void {\n const elementKey = this.ngssmHideElement();\n if (elementKey) {\n this.store.dispatchAction(new HideElementAction(elementKey));\n }\n }\n}\n","import { Directive, inject, input } from '@angular/core';\n\nimport { Store } from 'ngssm-store';\n\nimport { ToggleElementVisibilityAction } from '../actions';\n\n@Directive({\n selector: '[ngssmToggleElementVisibility]',\n host: {\n '(click)': 'toggleElementVisibility()'\n }\n})\nexport class NgssmToggleElementVisibility {\n public readonly ngssmToggleElementVisibility = input<string | undefined | null>(undefined);\n\n private readonly store = inject(Store);\n\n public toggleElementVisibility(): void {\n const elementKey = this.ngssmToggleElementVisibility();\n if (elementKey) {\n this.store.dispatchAction(new ToggleElementVisibilityAction(elementKey));\n }\n }\n}\n","import { Component, booleanAttribute, input, inject } from '@angular/core';\nimport { MatButtonToggle, MatButtonToggleGroup } from '@angular/material/button-toggle';\n\nimport { Store } from 'ngssm-store';\n\nimport { NgssmIsElementVisiblePipe } from '../ngssm-is-element-visible.pipe';\nimport { NgssmToggleElementVisibility } from '../ngssm-toggle-element-visibility';\n\n@Component({\n selector: 'ngssm-visibility-toggle-group',\n imports: [MatButtonToggleGroup, MatButtonToggle, NgssmToggleElementVisibility, NgssmIsElementVisiblePipe],\n templateUrl: './ngssm-visibility-toggle-group.html'\n})\nexport class NgssmVisibilityToggleGroup {\n public readonly items = input<{ label: string; key: string }[]>([]);\n public readonly hideMultipleSelectionIndicator = input<boolean, boolean>(false, { transform: booleanAttribute });\n\n protected readonly store = inject(Store);\n}\n","<mat-button-toggle-group [multiple]=\"true\" [hideMultipleSelectionIndicator]=\"hideMultipleSelectionIndicator()\">\n @for (item of items(); track item.key) {\n <mat-button-toggle\n [ngssmToggleElementVisibility]=\"item.key\"\n [checked]=\"store.state() | ngssmIsElementVisible: item.key\"\n [id]=\"item.key\">\n {{ item.label }}\n </mat-button-toggle>\n }\n</mat-button-toggle-group>\n","import { Signal } from '@angular/core';\n\nimport { createSignal } from 'ngssm-store';\n\nimport { selectNgssmVisibilityState } from './state';\n\n/**\n * Represents the visibility state of a specific element.\n * - key: The unique identifier for the element.\n * - visible: A signal that emits the visibility status (true if visible, false otherwise).\n */\nexport interface ElementVisibility {\n key: string;\n visible: Signal<boolean>;\n}\n\n// Creates a signal allowing to listen to changes in element visibility.\nexport const isElementVisible = (elementKey: string): ElementVisibility => ({\n key: elementKey,\n visible: createSignal((state) => selectNgssmVisibilityState(state).elements[elementKey] === true)\n});\n"],"mappings":";;;;;;AAAA,IAAY;CAAZ,SAAY,2BAAyB;CACnC,0BAAA,yBAAA;CACA,0BAAA,6BAAA;CACA,0BAAA,iBAAA;CACA,0BAAA,iBAAA;AACF,EAAA,CALY,8BAAA,4BAAyB,CAAA,EAAA;ACGrC,IAAa,gCAAb,MAA0C;CAGZ;CAFZ,OAAe,0BAA0B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