@acorex/components 22.4.48 → 22.4.49

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.
@@ -9,7 +9,7 @@ import { AsyncPipe } from '@angular/common';
9
9
  import * as i0 from '@angular/core';
10
10
  import { input, model, EventEmitter, effect, ViewEncapsulation, Component } from '@angular/core';
11
11
  import { FormsModule } from '@angular/forms';
12
- import { i as isValidPickerFileName } from './acorex-components-conversation-acorex-components-conversation-BfIrtZNG.mjs';
12
+ import { i as isValidPickerFileName } from './acorex-components-conversation-acorex-components-conversation-CccEQ_Wr.mjs';
13
13
 
14
14
  class AXConversationPickerRenameFileDialogComponent {
15
15
  constructor() {
@@ -62,4 +62,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
62
62
  }], ctorParameters: () => [], propDecorators: { initialName: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialName", required: true }] }], fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: false }] }, { type: i0.Output, args: ["fileNameChange"] }] } });
63
63
 
64
64
  export { AXConversationPickerRenameFileDialogComponent };
65
- //# sourceMappingURL=acorex-components-conversation-picker-rename-file-dialog.component-DlwW-J-B.mjs.map
65
+ //# sourceMappingURL=acorex-components-conversation-picker-rename-file-dialog.component-6Is-walP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-conversation-picker-rename-file-dialog.component-DlwW-J-B.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/composer/components/shared/picker-rename-file-dialog.component.ts","../../../../packages/components/conversation/src/lib/plugins/composer/components/shared/picker-rename-file-dialog.component.html"],"sourcesContent":["import { AXClosableComponent, AXComponentCloseEvent } from '@acorex/cdk/common';\nimport { AXButtonComponent } from '@acorex/components/button';\nimport { AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { Component, EventEmitter, ViewEncapsulation, effect, input, model } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isValidPickerFileName } from './picker-file.utils';\n\n@Component({\n selector: 'ax-conversation-picker-rename-file-dialog',\n encapsulation: ViewEncapsulation.None,\n imports: [\n AsyncPipe,\n FormsModule,\n AXButtonComponent,\n AXDecoratorGenericComponent,\n AXTextBoxModule,\n AXTranslationModule,\n ],\n providers: [{ provide: AXClosableComponent, useExisting: AXConversationPickerRenameFileDialogComponent }],\n templateUrl: './picker-rename-file-dialog.component.html',\n styleUrl: './picker-rename-file-dialog.component.css',\n})\nexport class AXConversationPickerRenameFileDialogComponent {\n readonly initialName = input.required<string>();\n readonly fileName = model('');\n\n constructor() {\n effect(() => {\n this.fileName.set(this.initialName());\n });\n }\n\n canSave(): boolean {\n const next = this.fileName().trim();\n return isValidPickerFileName(next) && next !== this.initialName().trim();\n }\n\n save(): void {\n if (!this.canSave()) {\n return;\n }\n\n const event = new AXComponentCloseEvent();\n event.component = this;\n event.data = this.fileName().trim();\n this.onClosed.emit(event);\n }\n\n cancel(): void {\n const event = new AXComponentCloseEvent();\n event.component = this;\n this.onClosed.emit(event);\n }\n\n onKeyDown(event: { nativeEvent?: KeyboardEvent } | undefined): void {\n if (event?.nativeEvent?.key === 'Enter') {\n event.nativeEvent.preventDefault();\n this.save();\n }\n }\n\n readonly onClosed = new EventEmitter<AXComponentCloseEvent>();\n}\n","<div class=\"ax-conversation-picker-rename-dialog\">\n <div class=\"dialog-content\">\n <ax-text-box\n [(value)]=\"fileName\"\n [look]=\"'outline'\"\n [placeholder]=\"'@acorex:chat.pickers.files.rename-placeholder' | translate | async\"\n (onKeyDown)=\"onKeyDown($event)\"\n />\n </div>\n\n <ax-footer class=\"dialog-footer\">\n <ax-suffix>\n <ax-button\n [text]=\"'@acorex:chat.actions.cancel' | translate | async\"\n [look]=\"'solid'\"\n (onClick)=\"cancel()\"\n />\n <ax-button\n [text]=\"'@ac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;wBACf,mBAAmB;qBACpB,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,6CAA+C,EAAE,CAAC,EAAA,QAAA,EAAA,4xBAAA,EAAA,MAAA,EAAA,CAAA,igBAAA,CAAA,EAAA;;;"}
1
+ {"version":3,"file":"acorex-components-conversation-picker-rename-file-dialog.component-6Is-walP.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/composer/components/shared/picker-rename-file-dialog.component.ts","../../../../packages/components/conversation/src/lib/plugins/composer/components/shared/picker-rename-file-dialog.component.html"],"sourcesContent":["import { AXClosableComponent, AXComponentCloseEvent } from '@acorex/cdk/common';\nimport { AXButtonComponent } from '@acorex/components/button';\nimport { AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { Component, EventEmitter, ViewEncapsulation, effect, input, model } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isValidPickerFileName } from './picker-file.utils';\n\n@Component({\n selector: 'ax-conversation-picker-rename-file-dialog',\n encapsulation: ViewEncapsulation.None,\n imports: [\n AsyncPipe,\n FormsModule,\n AXButtonComponent,\n AXDecoratorGenericComponent,\n AXTextBoxModule,\n AXTranslationModule,\n ],\n providers: [{ provide: AXClosableComponent, useExisting: AXConversationPickerRenameFileDialogComponent }],\n templateUrl: './picker-rename-file-dialog.component.html',\n styleUrl: './picker-rename-file-dialog.component.css',\n})\nexport class AXConversationPickerRenameFileDialogComponent {\n readonly initialName = input.required<string>();\n readonly fileName = model('');\n\n constructor() {\n effect(() => {\n this.fileName.set(this.initialName());\n });\n }\n\n canSave(): boolean {\n const next = this.fileName().trim();\n return isValidPickerFileName(next) && next !== this.initialName().trim();\n }\n\n save(): void {\n if (!this.canSave()) {\n return;\n }\n\n const event = new AXComponentCloseEvent();\n event.component = this;\n event.data = this.fileName().trim();\n this.onClosed.emit(event);\n }\n\n cancel(): void {\n const event = new AXComponentCloseEvent();\n event.component = this;\n this.onClosed.emit(event);\n }\n\n onKeyDown(event: { nativeEvent?: KeyboardEvent } | undefined): void {\n if (event?.nativeEvent?.key === 'Enter') {\n event.nativeEvent.preventDefault();\n this.save();\n }\n }\n\n readonly onClosed = new EventEmitter<AXComponentCloseEvent>();\n}\n","<div class=\"ax-conversation-picker-rename-dialog\">\n <div class=\"dialog-content\">\n <ax-text-box\n [(value)]=\"fileName\"\n [look]=\"'outline'\"\n [placeholder]=\"'@acorex:chat.pickers.files.rename-placeholder' | translate | async\"\n (onKeyDown)=\"onKeyDown($event)\"\n />\n </div>\n\n <ax-footer class=\"dialog-footer\">\n <ax-suffix>\n <ax-button\n [text]=\"'@acorex:chat.actions.cancel' | translate | async\"\n [look]=\"'solid'\"\n (onClick)=\"cancel()\"\n />\n <ax-button\n [text]=\"'@acorex:chat.actions.save' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n [disabled]=\"!canSave()\"\n (onClick)=\"save()\"\n />\n </ax-suffix>\n </ax-footer>\n</div>\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;MAyBa,6CAA6C,CAAA;AAIxD,IAAA,WAAA,GAAA;QAHS,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,QAAQ;wFAAU;QACtC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,EAAE;qFAAC;AAqCpB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAAyB;QAlC3D,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AACvC,QAAA,CAAC,CAAC;IACJ;IAEA,OAAO,GAAA;QACL,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE;AACnC,QAAA,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,CAAC,WAAW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EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACf,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EALnB,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAWA,6CAA6C,EAAA,UAAA,EAAA,CAAA;kBAfzD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2CAA2C,EAAA,aAAA,EACtC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B;wBACP,SAAS;wBACT,WAAW;wBACX,iBAAiB;wBACjB,2BAA2B;wBAC3B,eAAe;wBACf,mBAAmB;qBACpB,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,6CAA+C,EAAE,CAAC,EAAA,QAAA,EAAA,4xBAAA,EAAA,MAAA,EAAA,CAAA,igBAAA,CAAA,EAAA;;;"}
@@ -1,2 +1,2 @@
1
- export { A as AXConversationApi, a as AXConversationApiLoggerService, b as AXConversationAudioAttachmentComponent, c as AXConversationAudioFileTypeProvider, d as AXConversationAudioPickerComponent, e as AXConversationAudioRendererComponent, f as AXConversationAvatarComponent, g as AXConversationAvatarPickerComponent, h as AXConversationBaseRegistry, j as AXConversationChatDropDirective, k as AXConversationComposerActionRegistry, l as AXConversationComposerComponent, m as AXConversationComposerFileTypesProvider, n as AXConversationComposerGenerationStateService, o as AXConversationComposerPopupComponent, p as AXConversationComposerService, q as AXConversationComposerTabRegistry, r as AXConversationContainerComponent, s as AXConversationContainerDirective, t as AXConversationDateUtilsService, u as AXConversationDeleteDialogComponent, v as AXConversationEmojiTabComponent, w as AXConversationErrorHandlerService, x as AXConversationFallbackRendererComponent, y as AXConversationFileAttachmentComponent, z as AXConversationFileFileTypeProvider, B as AXConversationFilePickerComponent, C as AXConversationFileRendererComponent, D as AXConversationForwardMessageDialogComponent, E as AXConversationImageAttachmentComponent, F as AXConversationImageFileTypeProvider, G as AXConversationImagePickerComponent, H as AXConversationImageRendererComponent, I as AXConversationInfiniteScrollDirective, J as AXConversationInfoBarActionRegistry, K as AXConversationInfoBarComponent, L as AXConversationInfoBarSearchComponent, M as AXConversationInfoBarService, N as AXConversationItemActionRegistry, O as AXConversationLocationPickerComponent, P as AXConversationLocationRendererComponent, Q as AXConversationMediaPlaybackInfoBarBannerComponent, R as AXConversationMessageActionRegistry, S as AXConversationMessageApi, T as AXConversationMessageListComponent, U as AXConversationMessageListNoActiveDefaultComponent, V as AXConversationMessageListService, W as AXConversationMessagePinsService, X as AXConversationMessageRendererCopyHostComponent, Y as AXConversationMessageRendererRegistry, Z as AXConversationMessageRendererStateComponent, _ as AXConversationMessageSelectionService, $ as AXConversationMessageUtilsService, a0 as AXConversationModule, a1 as AXConversationNewDialogComponent, a2 as AXConversationPickerCaptionComponent, a3 as AXConversationPickerEmptyComponent, a4 as AXConversationPickerFooterComponent, a5 as AXConversationPickerHeaderComponent, a6 as AXConversationPickerOptionsComponent, a7 as AXConversationPickerShellComponent, a8 as AXConversationPickerToolbarComponent, a9 as AXConversationRealtimeApi, aa as AXConversationRegistryComponentOutletComponent, ab as AXConversationRegistryService, ac as AXConversationService, ad as AXConversationSidebarComponent, ae as AXConversationSidebarService, af as AXConversationStickerRendererComponent, ag as AXConversationStickerTabComponent, ah as AXConversationSystemRendererComponent, ai as AXConversationTabRegistry, aj as AXConversationTextRendererComponent, ak as AXConversationUserApi, al as AXConversationVideoAttachmentComponent, am as AXConversationVideoFileTypeProvider, an as AXConversationVideoPickerComponent, ao as AXConversationVideoRendererComponent, ap as AXConversationVoiceFileTypeProvider, aq as AXConversationVoiceRecorderComponent, ar as AXConversationVoiceRendererComponent, as as AX_CONVERSATION_AUDIO_CATALOG, at as AX_CONVERSATION_AUDIO_PRESENTATION, au as AX_CONVERSATION_AUDIO_RENDERER, av as AX_CONVERSATION_AVAILABLE_REACTIONS, aw as AX_CONVERSATION_BUILTIN_COMPOSER_TABS, ax as AX_CONVERSATION_COMPOSER_AUDIO_ACTION, ay as AX_CONVERSATION_COMPOSER_EMOJI_ACTION, az as AX_CONVERSATION_COMPOSER_EMOJI_TAB, aA as AX_CONVERSATION_COMPOSER_FILE_ACTION, aB as AX_CONVERSATION_COMPOSER_IMAGE_ACTION, aC as AX_CONVERSATION_COMPOSER_LOCATION_ACTION, aD as AX_CONVERSATION_COMPOSER_STICKER_TAB, aE as AX_CONVERSATION_COMPOSER_VIDEO_ACTION, aF as AX_CONVERSATION_COMPOSER_VOICE_RECORDING_ACTION, aG as AX_CONVERSATION_CONFIG, aH as AX_CONVERSATION_CONNECTION_ERRORS, aI as AX_CONVERSATION_CONVERSATION_AVATAR_COMPONENT, aJ as AX_CONVERSATION_DEFAULT_COMPOSER_ACTIONS, aK as AX_CONVERSATION_DEFAULT_COMPOSER_TABS, aL as AX_CONVERSATION_DEFAULT_CONVERSATION_ITEM_ACTIONS, aM as AX_CONVERSATION_DEFAULT_CONVERSATION_TABS, aN as AX_CONVERSATION_DEFAULT_GROUP_ICON, aO as AX_CONVERSATION_DEFAULT_INFO_BAR_ACTIONS, aP as AX_CONVERSATION_DEFAULT_MESSAGE_ACTIONS, aQ as AX_CONVERSATION_DEFAULT_MESSAGE_LIST_BACKGROUND, aR as AX_CONVERSATION_DEFAULT_MESSAGE_LIST_BACKGROUND_PRESET_ID, aS as AX_CONVERSATION_DEFAULT_MESSAGE_LIST_THEME_BACKGROUND, aT as AX_CONVERSATION_DEFAULT_MESSAGE_RENDERERS, aU as AX_CONVERSATION_DEFAULT_ROOM_PREFERENCES, aV as AX_CONVERSATION_DEFAULT_USER_ICON, aW as AX_CONVERSATION_ERRORS, aX as AX_CONVERSATION_ERROR_HANDLER_CONFIG, aY as AX_CONVERSATION_ERROR_MESSAGES, aZ as AX_CONVERSATION_FALLBACK_RENDERER, a_ as AX_CONVERSATION_FILE_CATALOG, a$ as AX_CONVERSATION_FILE_ERRORS, b0 as AX_CONVERSATION_FILE_PRESENTATION, b1 as AX_CONVERSATION_FILE_RENDERER, b2 as AX_CONVERSATION_FILE_TYPES_READY, b3 as AX_CONVERSATION_IMAGE_CATALOG, b4 as AX_CONVERSATION_IMAGE_PRESENTATION, b5 as AX_CONVERSATION_IMAGE_RENDERER, b6 as AX_CONVERSATION_INFO_BAR_ARCHIVE_ACTION, b7 as AX_CONVERSATION_INFO_BAR_BLOCK_ACTION, b8 as AX_CONVERSATION_INFO_BAR_DELETE_ACTION, b9 as AX_CONVERSATION_INFO_BAR_DIVIDER, ba as AX_CONVERSATION_INFO_BAR_MUTE_ACTION, bb as AX_CONVERSATION_INFO_BAR_SEARCH_ACTION, bc as AX_CONVERSATION_ITEM_BLOCK_ACTION, bd as AX_CONVERSATION_ITEM_DELETE_ACTION, be as AX_CONVERSATION_ITEM_DIVIDER, bf as AX_CONVERSATION_ITEM_MARK_READ_ACTION, bg as AX_CONVERSATION_ITEM_MUTE_ACTION, bh as AX_CONVERSATION_ITEM_PIN_ACTION, bi as AX_CONVERSATION_JUMBO_EMOJI_MAX, bj as AX_CONVERSATION_LOCATION_ERRORS, bk as AX_CONVERSATION_LOCATION_RENDERER, bl as AX_CONVERSATION_MESSAGE_DELETE_ACTION, bm as AX_CONVERSATION_MESSAGE_EDIT_ACTION, bn as AX_CONVERSATION_MESSAGE_ERRORS, bo as AX_CONVERSATION_MESSAGE_FORWARD_ACTION, bp as AX_CONVERSATION_MESSAGE_LIST_BACKGROUND_PRESETS, bq as AX_CONVERSATION_MESSAGE_PIN_ACTION, br as AX_CONVERSATION_MESSAGE_REPLY_ACTION, bs as AX_CONVERSATION_MESSAGE_SELECT_ACTION, bt as AX_CONVERSATION_MESSAGE_TYPE_FILE_TYPE, bu as AX_CONVERSATION_MESSAGE_UNPIN_ACTION, bv as AX_CONVERSATION_PEER_AVATAR_TYPES, bw as AX_CONVERSATION_REACTION_BAR_SIZE, bx as AX_CONVERSATION_REGISTRY_CONFIG, by as AX_CONVERSATION_STICKER_API_KEY, bz as AX_CONVERSATION_STICKER_RENDERER, bA as AX_CONVERSATION_SYSTEM_RENDERER, bB as AX_CONVERSATION_TAB_ALL, bC as AX_CONVERSATION_TAB_ARCHIVED, bD as AX_CONVERSATION_TAB_BOT, bE as AX_CONVERSATION_TAB_CHANNELS, bF as AX_CONVERSATION_TAB_GROUPS, bG as AX_CONVERSATION_TAB_PRIVATE, bH as AX_CONVERSATION_TAB_UNREAD, bI as AX_CONVERSATION_TEXT_RENDERER, bJ as AX_CONVERSATION_URL_ERRORS, bK as AX_CONVERSATION_USER_AVATAR_COMPONENT, bL as AX_CONVERSATION_USER_ERRORS, bM as AX_CONVERSATION_VIDEO_CATALOG, bN as AX_CONVERSATION_VIDEO_PRESENTATION, bO as AX_CONVERSATION_VIDEO_RENDERER, bP as AX_CONVERSATION_VOICE_CATALOG, bQ as AX_CONVERSATION_VOICE_PRESENTATION, bR as AX_CONVERSATION_VOICE_RENDERER, bS as AX_DEFAULT_CONVERSATION_CONFIG, bT as abortPickerUploads, bU as applyAudioLocalPreview, bV as applyFileLocalPreview, bW as applyLocalPreview, bX as applyVideoLocalPreview, bY as applyVoiceLocalPreview, bZ as audioItemFromUpload, b_ as bindMediaRendererContentState, b$ as buildMediaGalleryTiles, c0 as canManageConversationPins, c1 as canShowRendererContentError, c2 as cleanupPickerUploads, c3 as conversationAudioUtilities, c4 as conversationFileUtilities, c5 as conversationImageUtilities, c6 as conversationVideoUtilities, c7 as conversationVoiceUtilities, c8 as copyConversationCaption, c9 as copyWithFileTypeFallback, ca as countLoneEmojis, cb as createConversationAudioFileType, cc as createConversationFileFileType, cd as createConversationImageFileType, ce as createConversationVideoFileType, cf as createConversationVoiceFileType, cg as createLocalPreviewUrl, ch as createObjectUrl, ci as createPickerDragHandlers, cj as createPickerUploadItemId, ck as createResolvedMediaUrlSignal, cl as deleteUploadedPickerMedia, cm as dismissComposerPickerHost, cn as ensureConversationFileCatalogRegistered, co as fetchConversationMediaPage, cp as fileItemAsAudioMedia, cq as fileItemFromUpload, cr as filesFromClipboardEvent, cs as filterMessagesByMediaCategory, ct as filterSupplementalInfoPanelMessages, cu as findExistingPrivateConversation, cv as formatDuration, cw as formatErrorMessage, cx as formatFileByteSize, cy as formatFileSize, cz as formatMediaDuration, cA as formatPickerValidationMessage, cB as getActiveComposerPickerPasteHandler, cC as getConversationMediaCategories, cD as getConversationProfileFields, cE as getErrorMessage, cF as getMessageAudioItems, cG as getMessageVideoItems, cH as getPickerCancelUploadLabel, cI as getPrivatePeerParticipant, cJ as hasRegistryComponent, cK as inferFileExtensionHintFromMessage, cL as isAttachmentListCategory, cM as isComposerAttachmentBannerEnabled, cN as isComposerTabEnabled, cO as isConversationReactionsEnabled, cP as isConversationRoomCreator, cQ as isGenericPrivateConversationTitle, cR as isGridMediaCategory, cS as isGroupLikeConversation, cT as isJumboEmojiText, cU as isJumboEmojiTextMessage, cV as isMessageDeliveryPending, cW as isMessageListThemeBackground, cX as isMessageVisibleAfterHistoryCutoff, cY as isNonPersistableMediaUrl, cZ as isPickerItemReadyToSend, c_ as isPlainChromeMessage, c$ as isSameMessageListBackground, d0 as isUploadAborted, d1 as limitFilesToCapacity, d2 as listTextGraphemes, d3 as mediaCopyText, d4 as mergeAudioUploadResult, d5 as mergeFileUploadResult, d6 as mergeInfoPanelMessages, d7 as mergeUploadResult, d8 as mergeVideoUploadResult, d9 as mergeVoiceUploadResult, da as mergeWithDefaults, db as messageContainsLink, dc as normalizeAudioPayload, dd as normalizeConversationInboundFile, de as normalizeFilePayload, df as normalizeImagePayload, dg as normalizeMessageListBackgroundValue, dh as normalizeVideoPayload, di as notifyMaxFilesCapacityExceeded, dj as notifyPickerValidationErrors, dk as openWithFileType, dl as pickDisplayMediaUrl, dm as pickEarliestJoinedParticipant, dn as pickerItemToMediaReference, dp as pickerItemToUploadResult, dq as probeAudioDuration, dr as probeImageDimensions, ds as probeVideoMedia, dt as provideConversation, du as provideConversationComposerFileTypes, dv as provideConversationFileCatalog, dw as registerComposerPickerPasteHandler, dx as reportMediaLoadError, dy as resolveComposerAttachmentPresentation, dz as resolveComposerMaxFiles, dA as resolveConversationAvatarDisplay, dB as resolveConversationComposerTabs, dC as resolveConversationForViewer, dD as resolveConversationMessageFileType, dE as resolveConversationPeerParticipant, dF as resolveConversationPeerUserId, dG as resolveConversationTitleForViewer, dH as resolveGalleryImageUrl, dI as resolveImageDisplayUrl, dJ as resolveMessageChrome, dK as resolveMessageListBackgroundRaw, dL as resolveMessageListBackgroundStyle, dM as resolveParticipantProfile, dN as resolvePersistableMediaUrl, dO as resolvePersistedThumbnailUrl, dP as resolvePrivatePeerParticipant, dQ as resolvePrivatePeerUserId, dR as resolveUserAvatarDisplay, dS as resolveVideoThumbnailUrl, dT as revokeObjectUrl, dU as revokePickerBlobPreviews, dV as sanitizeInput, dW as shouldUseUserAvatarForConversation, dX as sortUsersForForward, dY as splitConversationTextLinks, dZ as syncPlaybackInfoBarBanner, d_ as toMediaItemUploaderReference, d$ as toUploaderReference, e0 as uploadPickerFile, e1 as usesDefaultMessageListWallpaper, e2 as validateConversationId, e3 as validateEmail, e4 as validateLatitude, e5 as validateLongitude, e6 as validateMessagePayload, e7 as validateMessageText, e8 as validateMessageType, e9 as validateUrl, ea as validateUserId, eb as validateUserIds, ec as videoItemFromUpload } from './acorex-components-conversation-acorex-components-conversation-BfIrtZNG.mjs';
1
+ export { A as AXConversationApi, a as AXConversationApiLoggerService, b as AXConversationAudioAttachmentComponent, c as AXConversationAudioFileTypeProvider, d as AXConversationAudioPickerComponent, e as AXConversationAudioRendererComponent, f as AXConversationAvatarComponent, g as AXConversationAvatarPickerComponent, h as AXConversationBaseRegistry, j as AXConversationChatDropDirective, k as AXConversationComposerActionRegistry, l as AXConversationComposerComponent, m as AXConversationComposerFileTypesProvider, n as AXConversationComposerGenerationStateService, o as AXConversationComposerPopupComponent, p as AXConversationComposerService, q as AXConversationComposerTabRegistry, r as AXConversationContainerComponent, s as AXConversationContainerDirective, t as AXConversationDateUtilsService, u as AXConversationDeleteDialogComponent, v as AXConversationEmojiTabComponent, w as AXConversationErrorHandlerService, x as AXConversationFallbackRendererComponent, y as AXConversationFileAttachmentComponent, z as AXConversationFileFileTypeProvider, B as AXConversationFilePickerComponent, C as AXConversationFileRendererComponent, D as AXConversationForwardMessageDialogComponent, E as AXConversationImageAttachmentComponent, F as AXConversationImageFileTypeProvider, G as AXConversationImagePickerComponent, H as AXConversationImageRendererComponent, I as AXConversationInfiniteScrollDirective, J as AXConversationInfoBarActionRegistry, K as AXConversationInfoBarComponent, L as AXConversationInfoBarSearchComponent, M as AXConversationInfoBarService, N as AXConversationItemActionRegistry, O as AXConversationLocationPickerComponent, P as AXConversationLocationRendererComponent, Q as AXConversationMediaPlaybackInfoBarBannerComponent, R as AXConversationMessageActionRegistry, S as AXConversationMessageApi, T as AXConversationMessageListComponent, U as AXConversationMessageListNoActiveDefaultComponent, V as AXConversationMessageListService, W as AXConversationMessagePinsService, X as AXConversationMessageRendererCopyHostComponent, Y as AXConversationMessageRendererRegistry, Z as AXConversationMessageRendererStateComponent, _ as AXConversationMessageSelectionService, $ as AXConversationMessageUtilsService, a0 as AXConversationModule, a1 as AXConversationNewDialogComponent, a2 as AXConversationPickerCaptionComponent, a3 as AXConversationPickerEmptyComponent, a4 as AXConversationPickerFooterComponent, a5 as AXConversationPickerHeaderComponent, a6 as AXConversationPickerOptionsComponent, a7 as AXConversationPickerShellComponent, a8 as AXConversationPickerToolbarComponent, a9 as AXConversationRealtimeApi, aa as AXConversationRegistryComponentOutletComponent, ab as AXConversationRegistryService, ac as AXConversationService, ad as AXConversationSidebarComponent, ae as AXConversationSidebarService, af as AXConversationStickerRendererComponent, ag as AXConversationStickerTabComponent, ah as AXConversationSystemRendererComponent, ai as AXConversationTabRegistry, aj as AXConversationTextRendererComponent, ak as AXConversationUserApi, al as AXConversationVideoAttachmentComponent, am as AXConversationVideoFileTypeProvider, an as AXConversationVideoPickerComponent, ao as AXConversationVideoRendererComponent, ap as AXConversationVoiceFileTypeProvider, aq as AXConversationVoiceRecorderComponent, ar as AXConversationVoiceRendererComponent, as as AX_CONVERSATION_AUDIO_CATALOG, at as AX_CONVERSATION_AUDIO_PRESENTATION, au as AX_CONVERSATION_AUDIO_RENDERER, av as AX_CONVERSATION_AVAILABLE_REACTIONS, aw as AX_CONVERSATION_BUILTIN_COMPOSER_TABS, ax as AX_CONVERSATION_COMPOSER_AUDIO_ACTION, ay as AX_CONVERSATION_COMPOSER_EMOJI_ACTION, az as AX_CONVERSATION_COMPOSER_EMOJI_TAB, aA as AX_CONVERSATION_COMPOSER_FILE_ACTION, aB as AX_CONVERSATION_COMPOSER_IMAGE_ACTION, aC as AX_CONVERSATION_COMPOSER_LOCATION_ACTION, aD as AX_CONVERSATION_COMPOSER_STICKER_TAB, aE as AX_CONVERSATION_COMPOSER_VIDEO_ACTION, aF as AX_CONVERSATION_COMPOSER_VOICE_RECORDING_ACTION, aG as AX_CONVERSATION_CONFIG, aH as AX_CONVERSATION_CONNECTION_ERRORS, aI as AX_CONVERSATION_CONVERSATION_AVATAR_COMPONENT, aJ as AX_CONVERSATION_DEFAULT_COMPOSER_ACTIONS, aK as AX_CONVERSATION_DEFAULT_COMPOSER_TABS, aL as AX_CONVERSATION_DEFAULT_CONVERSATION_ITEM_ACTIONS, aM as AX_CONVERSATION_DEFAULT_CONVERSATION_TABS, aN as AX_CONVERSATION_DEFAULT_GROUP_ICON, aO as AX_CONVERSATION_DEFAULT_INFO_BAR_ACTIONS, aP as AX_CONVERSATION_DEFAULT_MESSAGE_ACTIONS, aQ as AX_CONVERSATION_DEFAULT_MESSAGE_LIST_BACKGROUND, aR as AX_CONVERSATION_DEFAULT_MESSAGE_LIST_BACKGROUND_PRESET_ID, aS as AX_CONVERSATION_DEFAULT_MESSAGE_LIST_THEME_BACKGROUND, aT as AX_CONVERSATION_DEFAULT_MESSAGE_RENDERERS, aU as AX_CONVERSATION_DEFAULT_ROOM_PREFERENCES, aV as AX_CONVERSATION_DEFAULT_USER_ICON, aW as AX_CONVERSATION_ERRORS, aX as AX_CONVERSATION_ERROR_HANDLER_CONFIG, aY as AX_CONVERSATION_ERROR_MESSAGES, aZ as AX_CONVERSATION_FALLBACK_RENDERER, a_ as AX_CONVERSATION_FILE_CATALOG, a$ as AX_CONVERSATION_FILE_ERRORS, b0 as AX_CONVERSATION_FILE_PRESENTATION, b1 as AX_CONVERSATION_FILE_RENDERER, b2 as AX_CONVERSATION_FILE_TYPES_READY, b3 as AX_CONVERSATION_IMAGE_CATALOG, b4 as AX_CONVERSATION_IMAGE_PRESENTATION, b5 as AX_CONVERSATION_IMAGE_RENDERER, b6 as AX_CONVERSATION_INFO_BAR_ARCHIVE_ACTION, b7 as AX_CONVERSATION_INFO_BAR_BLOCK_ACTION, b8 as AX_CONVERSATION_INFO_BAR_DELETE_ACTION, b9 as AX_CONVERSATION_INFO_BAR_DIVIDER, ba as AX_CONVERSATION_INFO_BAR_MUTE_ACTION, bb as AX_CONVERSATION_INFO_BAR_SEARCH_ACTION, bc as AX_CONVERSATION_ITEM_BLOCK_ACTION, bd as AX_CONVERSATION_ITEM_DELETE_ACTION, be as AX_CONVERSATION_ITEM_DIVIDER, bf as AX_CONVERSATION_ITEM_MARK_READ_ACTION, bg as AX_CONVERSATION_ITEM_MUTE_ACTION, bh as AX_CONVERSATION_ITEM_PIN_ACTION, bi as AX_CONVERSATION_JUMBO_EMOJI_MAX, bj as AX_CONVERSATION_LOCATION_ERRORS, bk as AX_CONVERSATION_LOCATION_RENDERER, bl as AX_CONVERSATION_MESSAGE_DELETE_ACTION, bm as AX_CONVERSATION_MESSAGE_EDIT_ACTION, bn as AX_CONVERSATION_MESSAGE_ERRORS, bo as AX_CONVERSATION_MESSAGE_FORWARD_ACTION, bp as AX_CONVERSATION_MESSAGE_LIST_BACKGROUND_PRESETS, bq as AX_CONVERSATION_MESSAGE_PIN_ACTION, br as AX_CONVERSATION_MESSAGE_REPLY_ACTION, bs as AX_CONVERSATION_MESSAGE_SELECT_ACTION, bt as AX_CONVERSATION_MESSAGE_TYPE_FILE_TYPE, bu as AX_CONVERSATION_MESSAGE_UNPIN_ACTION, bv as AX_CONVERSATION_PEER_AVATAR_TYPES, bw as AX_CONVERSATION_REACTION_BAR_SIZE, bx as AX_CONVERSATION_REGISTRY_CONFIG, by as AX_CONVERSATION_STICKER_API_KEY, bz as AX_CONVERSATION_STICKER_RENDERER, bA as AX_CONVERSATION_SYSTEM_RENDERER, bB as AX_CONVERSATION_TAB_ALL, bC as AX_CONVERSATION_TAB_ARCHIVED, bD as AX_CONVERSATION_TAB_BOT, bE as AX_CONVERSATION_TAB_CHANNELS, bF as AX_CONVERSATION_TAB_GROUPS, bG as AX_CONVERSATION_TAB_PRIVATE, bH as AX_CONVERSATION_TAB_UNREAD, bI as AX_CONVERSATION_TEXT_RENDERER, bJ as AX_CONVERSATION_URL_ERRORS, bK as AX_CONVERSATION_USER_AVATAR_COMPONENT, bL as AX_CONVERSATION_USER_ERRORS, bM as AX_CONVERSATION_VIDEO_CATALOG, bN as AX_CONVERSATION_VIDEO_PRESENTATION, bO as AX_CONVERSATION_VIDEO_RENDERER, bP as AX_CONVERSATION_VOICE_CATALOG, bQ as AX_CONVERSATION_VOICE_PRESENTATION, bR as AX_CONVERSATION_VOICE_RENDERER, bS as AX_DEFAULT_CONVERSATION_CONFIG, bT as abortPickerUploads, bU as applyAudioLocalPreview, bV as applyFileLocalPreview, bW as applyLocalPreview, bX as applyVideoLocalPreview, bY as applyVoiceLocalPreview, bZ as audioItemFromUpload, b_ as bindMediaRendererContentState, b$ as buildMediaGalleryTiles, c0 as canManageConversationPins, c1 as canShowRendererContentError, c2 as cleanupPickerUploads, c3 as conversationAudioUtilities, c4 as conversationFileUtilities, c5 as conversationImageUtilities, c6 as conversationTextToClipboardHtml, c7 as conversationVideoUtilities, c8 as conversationVoiceUtilities, c9 as copyConversationCaption, ca as copyWithFileTypeFallback, cb as countLoneEmojis, cc as createConversationAudioFileType, cd as createConversationFileFileType, ce as createConversationImageFileType, cf as createConversationVideoFileType, cg as createConversationVoiceFileType, ch as createLocalPreviewUrl, ci as createObjectUrl, cj as createPickerDragHandlers, ck as createPickerUploadItemId, cl as createResolvedMediaUrlSignal, cm as deleteUploadedPickerMedia, cn as dismissComposerPickerHost, co as ensureConversationFileCatalogRegistered, cp as fetchConversationMediaPage, cq as fileItemAsAudioMedia, cr as fileItemFromUpload, cs as filesFromClipboardEvent, ct as filterMessagesByMediaCategory, cu as filterSupplementalInfoPanelMessages, cv as findExistingPrivateConversation, cw as formatDuration, cx as formatErrorMessage, cy as formatFileByteSize, cz as formatFileSize, cA as formatMediaDuration, cB as formatPickerValidationMessage, cC as getActiveComposerPickerPasteHandler, cD as getConversationMediaCategories, cE as getConversationProfileFields, cF as getErrorMessage, cG as getMessageAudioItems, cH as getMessageVideoItems, cI as getPickerCancelUploadLabel, cJ as getPrivatePeerParticipant, cK as hasRegistryComponent, cL as inferFileExtensionHintFromMessage, cM as isAttachmentListCategory, cN as isComposerAttachmentBannerEnabled, cO as isComposerTabEnabled, cP as isConversationReactionsEnabled, cQ as isConversationRoomCreator, cR as isGenericPrivateConversationTitle, cS as isGridMediaCategory, cT as isGroupLikeConversation, cU as isJumboEmojiText, cV as isJumboEmojiTextMessage, cW as isMessageDeliveryPending, cX as isMessageListThemeBackground, cY as isMessageVisibleAfterHistoryCutoff, cZ as isNonPersistableMediaUrl, c_ as isPickerItemReadyToSend, c$ as isPlainChromeMessage, d0 as isSameMessageListBackground, d1 as isUploadAborted, d2 as limitFilesToCapacity, d3 as listTextGraphemes, d4 as mediaCopyText, d5 as mergeAudioUploadResult, d6 as mergeFileUploadResult, d7 as mergeInfoPanelMessages, d8 as mergeUploadResult, d9 as mergeVideoUploadResult, da as mergeVoiceUploadResult, db as mergeWithDefaults, dc as messageContainsLink, dd as normalizeAudioPayload, de as normalizeConversationInboundFile, df as normalizeFilePayload, dg as normalizeImagePayload, dh as normalizeMessageListBackgroundValue, di as normalizeVideoPayload, dj as notifyMaxFilesCapacityExceeded, dk as notifyPickerValidationErrors, dl as openWithFileType, dm as pickDisplayMediaUrl, dn as pickEarliestJoinedParticipant, dp as pickerItemToMediaReference, dq as pickerItemToUploadResult, dr as probeAudioDuration, ds as probeImageDimensions, dt as probeVideoMedia, du as provideConversation, dv as provideConversationComposerFileTypes, dw as provideConversationFileCatalog, dx as registerComposerPickerPasteHandler, dy as reportMediaLoadError, dz as resolveComposerAttachmentPresentation, dA as resolveComposerMaxFiles, dB as resolveConversationAvatarDisplay, dC as resolveConversationComposerTabs, dD as resolveConversationForViewer, dE as resolveConversationMessageFileType, dF as resolveConversationPeerParticipant, dG as resolveConversationPeerUserId, dH as resolveConversationTitleForViewer, dI as resolveGalleryImageUrl, dJ as resolveImageDisplayUrl, dK as resolveMessageChrome, dL as resolveMessageListBackgroundRaw, dM as resolveMessageListBackgroundStyle, dN as resolveParticipantProfile, dO as resolvePersistableMediaUrl, dP as resolvePersistedThumbnailUrl, dQ as resolvePrivatePeerParticipant, dR as resolvePrivatePeerUserId, dS as resolveUserAvatarDisplay, dT as resolveVideoThumbnailUrl, dU as revokeObjectUrl, dV as revokePickerBlobPreviews, dW as sanitizeInput, dX as shouldUseUserAvatarForConversation, dY as sortUsersForForward, dZ as splitConversationTextLinks, d_ as syncPlaybackInfoBarBanner, d$ as toMediaItemUploaderReference, e0 as toUploaderReference, e1 as uploadPickerFile, e2 as usesDefaultMessageListWallpaper, e3 as validateConversationId, e4 as validateEmail, e5 as validateLatitude, e6 as validateLongitude, e7 as validateMessagePayload, e8 as validateMessageText, e9 as validateMessageType, ea as validateUrl, eb as validateUserId, ec as validateUserIds, ed as videoItemFromUpload } from './acorex-components-conversation-acorex-components-conversation-CccEQ_Wr.mjs';
2
2
  //# sourceMappingURL=acorex-components-conversation.mjs.map
@@ -45,11 +45,35 @@ class AXInlineReactionComponent {
45
45
  * Emits when the expanded state changes (expand button or click outside).
46
46
  */
47
47
  this.expandedChange = output();
48
+ /** True when the overflow toggle is shown and the bar can grow. */
49
+ this.showToggle = computed(() => !this.showExpanded() && this.emojis().length > Math.max(this.maxVisible(), 0), /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "showToggle" }] : /* istanbul ignore next */ []));
51
+ /**
52
+ * Grid columns. The toggle occupies the last cell of the first row, so the
53
+ * closed bar and the open panel share one width and lower rows fill that cell.
54
+ */
55
+ this.columns = computed(() => {
56
+ const limit = Math.max(this.maxVisible(), 0);
57
+ if (this.showToggle()) {
58
+ return limit + 1;
59
+ }
60
+ return Math.max(Math.min(this.emojis().length, limit), 1);
61
+ }, /* @ts-ignore */
62
+ ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
63
+ /** Row count once every emoji, including the toggle cell, is placed. */
64
+ this.expandedRows = computed(() => {
65
+ if (!this.showToggle()) {
66
+ return 1;
67
+ }
68
+ const extra = this.emojis().length - Math.max(this.maxVisible(), 0);
69
+ return 1 + Math.ceil(extra / this.columns());
70
+ }, /* @ts-ignore */
71
+ ...(ngDevMode ? [{ debugName: "expandedRows" }] : /* istanbul ignore next */ []));
48
72
  this.visibleEmojis = computed(() => {
49
- if (this.expanded()) {
50
- return this.emojis();
73
+ if (this.showExpanded()) {
74
+ return this.emojis().slice(0, Math.max(this.maxVisible(), 0));
51
75
  }
52
- return this.emojis().slice(0, this.maxVisible());
76
+ return this.emojis();
53
77
  }, /* @ts-ignore */
54
78
  ...(ngDevMode ? [{ debugName: "visibleEmojis" }] : /* istanbul ignore next */ []));
55
79
  effect((onCleanup) => {
@@ -83,11 +107,11 @@ class AXInlineReactionComponent {
83
107
  this.expandedChange.emit(value);
84
108
  }
85
109
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXInlineReactionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
86
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXInlineReactionComponent, isStandalone: true, selector: "ax-inline-reaction", inputs: { emojis: { classPropertyName: "emojis", publicName: "emojis", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxVisible: { classPropertyName: "maxVisible", publicName: "maxVisible", isSignal: true, isRequired: false, transformFunction: null }, showExpanded: { classPropertyName: "showExpanded", publicName: "showExpanded", isSignal: true, isRequired: false, transformFunction: null }, closeOnClickOutside: { classPropertyName: "closeOnClickOutside", publicName: "closeOnClickOutside", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected", expandedChange: "expandedChange" }, providers: [{ provide: AXComponent, useExisting: AXInlineReactionComponent }], ngImport: i0, template: "<div\n class=\"ax-inline-reaction\"\n [class.ax-inline-reaction-expanded]=\"expanded()\"\n [style.--ax-comp-inline-reaction-item-size.px]=\"size()\"\n [style.--ax-comp-inline-reaction-max-visible]=\"maxVisible()\"\n>\n <div class=\"ax-inline-reaction-items\">\n @for (emoji of visibleEmojis(); track emoji.code) {\n <button\n type=\"button\"\n class=\"ax-inline-reaction-item\"\n [attr.aria-label]=\"emoji.name\"\n [title]=\"emoji.name\"\n (click)=\"selected.emit(emoji)\"\n >\n <ax-emoji [emoji]=\"emoji\" [size]=\"size()\" />\n </button>\n }\n </div>\n\n @if (!showExpanded() && emojis().length > maxVisible()) {\n <button\n type=\"button\"\n class=\"ax-inline-reaction-expand\"\n [class.ax-inline-reaction-expand-open]=\"expanded()\"\n (click)=\"toggleExpanded($event)\"\n >\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"!expanded()\" [class.fa-chevron-up]=\"expanded()\"></i>\n </button>\n }\n</div>\n", styles: ["@layer properties;@layer components{ax-inline-reaction{--ax-comp-inline-reaction-gap: .375rem;--ax-comp-inline-reaction-padding-x: .5rem;--ax-comp-inline-reaction-padding-y: .375rem;--ax-comp-inline-reaction-radius: 9999px;--ax-comp-inline-reaction-bg: var(--color-lightest);--ax-comp-inline-reaction-border: var(--color-border-surface);--ax-comp-inline-reaction-item-size: 1.5rem;--ax-comp-inline-reaction-collapsed-height: 2.5rem;--ax-comp-inline-reaction-max-height: 18rem;--ax-comp-inline-reaction-item-hover-bg: var(--color-lightest);--ax-comp-inline-reaction-expand-size: 1.5rem;--ax-comp-inline-reaction-expand-bg: var(--color-surface);--ax-comp-inline-reaction-expand-color: var(--color-on-lightest);--ax-comp-inline-reaction-expand-hover-bg: var(--color-light);--ax-comp-inline-reaction-expand-open-bg: color-mix(in srgb, rgba(var(--ax-sys-color-primary-surface)) 18%, rgba(var(--ax-sys-color-surface)));--ax-comp-inline-reaction-expand-open-color: var(--color-primary);display:inline-flex}@supports (color: color-mix(in lab,red,red)){ax-inline-reaction{--ax-comp-inline-reaction-expand-open-bg: color-mix(in oklab, var(--color-primary) 18%, var(--color-surface))}}ax-inline-reaction .ax-inline-reaction{display:flex;flex-direction:row;align-items:center;gap:var(--ax-comp-inline-reaction-gap);padding:var(--ax-comp-inline-reaction-padding-y) var(--ax-comp-inline-reaction-padding-x);border:1px solid var(--ax-comp-inline-reaction-border);border-radius:var(--ax-comp-inline-reaction-radius);background-color:var(--ax-comp-inline-reaction-bg);overflow:hidden;max-height:var(--ax-comp-inline-reaction-collapsed-height);transition:max-height .3s cubic-bezier(.4,0,.2,1),border-radius .3s cubic-bezier(.4,0,.2,1)}ax-inline-reaction .ax-inline-reaction-items{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;gap:var(--ax-comp-inline-reaction-gap);transition:grid-template-columns .3s ease,transform .2s ease}ax-inline-reaction .ax-inline-reaction-expanded{align-items:flex-start;max-height:var(--ax-comp-inline-reaction-max-height);border-radius:1rem}ax-inline-reaction .ax-inline-reaction-expanded .ax-inline-reaction-items{display:grid;grid-template-columns:repeat(var(--ax-comp-inline-reaction-max-visible, 8),var(--ax-comp-inline-reaction-item-size));gap:var(--ax-comp-inline-reaction-gap);align-content:start;justify-content:start;max-height:16.5rem;overflow-y:auto}ax-inline-reaction .ax-inline-reaction-item{display:inline-flex;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);width:var(--ax-comp-inline-reaction-item-size);height:var(--ax-comp-inline-reaction-item-size);line-height:0;animation:ax-inline-reaction-item-enter .2s ease}ax-inline-reaction .ax-inline-reaction-item ax-emoji{pointer-events:none}ax-inline-reaction .ax-inline-reaction-item:hover{background-color:var(--ax-comp-inline-reaction-item-hover-bg)}ax-inline-reaction .ax-inline-reaction-item:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-inline-reaction .ax-inline-reaction-expand{display:inline-flex;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;width:var(--ax-comp-inline-reaction-expand-size);height:var(--ax-comp-inline-reaction-expand-size);margin-inline-start:.125rem;background-color:var(--ax-comp-inline-reaction-expand-bg);color:var(--ax-comp-inline-reaction-expand-color)}ax-inline-reaction .ax-inline-reaction-expand i{font-size:.625rem;line-height:1}ax-inline-reaction .ax-inline-reaction-expand:hover{background-color:var(--ax-comp-inline-reaction-expand-hover-bg)}ax-inline-reaction .ax-inline-reaction-expand:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-inline-reaction .ax-inline-reaction-expand-open{background-color:var(--ax-comp-inline-reaction-expand-open-bg);color:var(--ax-comp-inline-reaction-expand-open-color)}@keyframes ax-inline-reaction-item-enter{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXEmojiComponent, selector: "ax-emoji", inputs: ["emoji", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
110
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXInlineReactionComponent, isStandalone: true, selector: "ax-inline-reaction", inputs: { emojis: { classPropertyName: "emojis", publicName: "emojis", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxVisible: { classPropertyName: "maxVisible", publicName: "maxVisible", isSignal: true, isRequired: false, transformFunction: null }, showExpanded: { classPropertyName: "showExpanded", publicName: "showExpanded", isSignal: true, isRequired: false, transformFunction: null }, closeOnClickOutside: { classPropertyName: "closeOnClickOutside", publicName: "closeOnClickOutside", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected", expandedChange: "expandedChange" }, providers: [{ provide: AXComponent, useExisting: AXInlineReactionComponent }], ngImport: i0, template: "<div\n class=\"ax-inline-reaction\"\n [class.ax-inline-reaction-expanded]=\"expanded()\"\n [class.ax-inline-reaction-has-toggle]=\"showToggle()\"\n [style.--ax-comp-inline-reaction-item-size.px]=\"size()\"\n [style.--ax-comp-inline-reaction-columns]=\"columns()\"\n [style.--ax-comp-inline-reaction-rows]=\"expandedRows()\"\n>\n <div class=\"ax-inline-reaction-items\">\n @for (emoji of visibleEmojis(); track $index) {\n @if (showToggle() && $index === maxVisible()) {\n <button\n type=\"button\"\n class=\"ax-inline-reaction-expand\"\n [class.ax-inline-reaction-expand-open]=\"expanded()\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggleExpanded($event)\"\n >\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n }\n <button\n type=\"button\"\n class=\"ax-inline-reaction-item\"\n [class.ax-inline-reaction-item-extra]=\"showToggle() && $index >= maxVisible()\"\n [style.--ax-inline-reaction-index]=\"showToggle() ? $index - maxVisible() : 0\"\n [attr.aria-label]=\"emoji.name\"\n [title]=\"emoji.name\"\n [inert]=\"showToggle() && !expanded() && $index >= maxVisible()\"\n (click)=\"selected.emit(emoji)\"\n >\n <ax-emoji [emoji]=\"emoji\" [size]=\"size()\" />\n </button>\n }\n </div>\n</div>\n", styles: ["@layer properties;@layer components{ax-inline-reaction{--ax-comp-inline-reaction-gap: .375rem;--ax-comp-inline-reaction-padding-x: .5rem;--ax-comp-inline-reaction-padding-y: .375rem;--ax-comp-inline-reaction-radius: 9999px;--ax-comp-inline-reaction-radius-expanded: 1.125rem;--ax-comp-inline-reaction-bg: var(--color-lightest);--ax-comp-inline-reaction-border: var(--color-border-surface);--ax-comp-inline-reaction-item-size: 1.5rem;--ax-comp-inline-reaction-columns: 1;--ax-comp-inline-reaction-rows: 1;--ax-comp-inline-reaction-max-height: 18rem;--ax-comp-inline-reaction-open-duration: .42s;--ax-comp-inline-reaction-open-ease: cubic-bezier(.16, 1, .3, 1);--ax-comp-inline-reaction-item-hover-bg: var(--color-light);--ax-comp-inline-reaction-expand-bg: var(--color-surface);--ax-comp-inline-reaction-expand-color: var(--color-on-lightest);--ax-comp-inline-reaction-expand-hover-bg: var(--color-light);--ax-comp-inline-reaction-expand-open-bg: color-mix(in srgb, rgba(var(--ax-sys-color-primary-surface)) 18%, rgba(var(--ax-sys-color-surface)));--ax-comp-inline-reaction-expand-open-color: var(--color-primary);display:inline-flex}@supports (color: color-mix(in lab,red,red)){ax-inline-reaction{--ax-comp-inline-reaction-expand-open-bg: color-mix(in oklab, var(--color-primary) 18%, var(--color-surface))}}ax-inline-reaction .ax-inline-reaction{box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;width:max-content;max-width:100%;padding:var(--ax-comp-inline-reaction-padding-y) var(--ax-comp-inline-reaction-padding-x);border:1px solid var(--ax-comp-inline-reaction-border);border-radius:var(--ax-comp-inline-reaction-radius);background-color:var(--ax-comp-inline-reaction-bg);overflow:hidden}ax-inline-reaction .ax-inline-reaction-items{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;gap:var(--ax-comp-inline-reaction-gap)}ax-inline-reaction .ax-inline-reaction-has-toggle{align-items:flex-start;height:calc(var(--ax-comp-inline-reaction-padding-y) * 2 + var(--ax-comp-inline-reaction-item-size) + 2px);border-radius:calc((var(--ax-comp-inline-reaction-padding-y) * 2 + var(--ax-comp-inline-reaction-item-size) + 2px) / 2);overflow:hidden;transition:height var(--ax-comp-inline-reaction-open-duration) var(--ax-comp-inline-reaction-open-ease),border-radius var(--ax-comp-inline-reaction-open-duration) var(--ax-comp-inline-reaction-open-ease)}ax-inline-reaction .ax-inline-reaction-has-toggle .ax-inline-reaction-items{display:grid;grid-template-columns:repeat(var(--ax-comp-inline-reaction-columns),var(--ax-comp-inline-reaction-item-size));grid-auto-rows:var(--ax-comp-inline-reaction-item-size);align-content:start;align-items:center;justify-content:start;justify-items:center}ax-inline-reaction .ax-inline-reaction-expanded.ax-inline-reaction-has-toggle{height:min(var(--ax-comp-inline-reaction-max-height),calc(var(--ax-comp-inline-reaction-padding-y) * 2 + var(--ax-comp-inline-reaction-rows) * var(--ax-comp-inline-reaction-item-size) + (var(--ax-comp-inline-reaction-rows) - 1) * var(--ax-comp-inline-reaction-gap) + 2px));border-radius:var(--ax-comp-inline-reaction-radius-expanded);overflow:hidden}ax-inline-reaction .ax-inline-reaction-item{display:inline-flex;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);width:var(--ax-comp-inline-reaction-item-size);height:var(--ax-comp-inline-reaction-item-size);line-height:0}ax-inline-reaction .ax-inline-reaction-item ax-emoji{pointer-events:none}ax-inline-reaction .ax-inline-reaction-item:hover{background-color:var(--ax-comp-inline-reaction-item-hover-bg)}ax-inline-reaction .ax-inline-reaction-item:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-inline-reaction .ax-inline-reaction-expanded .ax-inline-reaction-item-extra{animation:ax-inline-reaction-item-enter .34s cubic-bezier(.22,1.25,.36,1) both;animation-delay:min(calc(var(--ax-inline-reaction-index) * 10ms),.14s)}ax-inline-reaction .ax-inline-reaction-expand{display:inline-flex;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;width:var(--ax-comp-inline-reaction-item-size);height:var(--ax-comp-inline-reaction-item-size);background-color:var(--ax-comp-inline-reaction-expand-bg);color:var(--ax-comp-inline-reaction-expand-color);transition:background-color .28s ease,color .28s ease}ax-inline-reaction .ax-inline-reaction-expand i{display:inline-block;font-size:calc(var(--ax-comp-inline-reaction-item-size) * .42);line-height:1;transition:transform var(--ax-comp-inline-reaction-open-duration) var(--ax-comp-inline-reaction-open-ease)}ax-inline-reaction .ax-inline-reaction-expand:hover{background-color:var(--ax-comp-inline-reaction-expand-hover-bg)}ax-inline-reaction .ax-inline-reaction-expand:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-inline-reaction .ax-inline-reaction-expand-open{background-color:var(--ax-comp-inline-reaction-expand-open-bg);color:var(--ax-comp-inline-reaction-expand-open-color)}ax-inline-reaction .ax-inline-reaction-expand-open i{transform:rotate(-180deg)}@media(prefers-reduced-motion:reduce){ax-inline-reaction .ax-inline-reaction,ax-inline-reaction .ax-inline-reaction-expand,ax-inline-reaction .ax-inline-reaction-expand i,ax-inline-reaction .ax-inline-reaction-item{animation:none;transition:none}}@keyframes ax-inline-reaction-item-enter{0%{opacity:.72;transform:scale(.78)}to{opacity:1;transform:scale(1)}}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXEmojiComponent, selector: "ax-emoji", inputs: ["emoji", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
87
111
  }
88
112
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXInlineReactionComponent, decorators: [{
89
113
  type: Component,
90
- args: [{ selector: 'ax-inline-reaction', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXEmojiComponent], providers: [{ provide: AXComponent, useExisting: AXInlineReactionComponent }], template: "<div\n class=\"ax-inline-reaction\"\n [class.ax-inline-reaction-expanded]=\"expanded()\"\n [style.--ax-comp-inline-reaction-item-size.px]=\"size()\"\n [style.--ax-comp-inline-reaction-max-visible]=\"maxVisible()\"\n>\n <div class=\"ax-inline-reaction-items\">\n @for (emoji of visibleEmojis(); track emoji.code) {\n <button\n type=\"button\"\n class=\"ax-inline-reaction-item\"\n [attr.aria-label]=\"emoji.name\"\n [title]=\"emoji.name\"\n (click)=\"selected.emit(emoji)\"\n >\n <ax-emoji [emoji]=\"emoji\" [size]=\"size()\" />\n </button>\n }\n </div>\n\n @if (!showExpanded() && emojis().length > maxVisible()) {\n <button\n type=\"button\"\n class=\"ax-inline-reaction-expand\"\n [class.ax-inline-reaction-expand-open]=\"expanded()\"\n (click)=\"toggleExpanded($event)\"\n >\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"!expanded()\" [class.fa-chevron-up]=\"expanded()\"></i>\n </button>\n }\n</div>\n", styles: ["@layer properties;@layer components{ax-inline-reaction{--ax-comp-inline-reaction-gap: .375rem;--ax-comp-inline-reaction-padding-x: .5rem;--ax-comp-inline-reaction-padding-y: .375rem;--ax-comp-inline-reaction-radius: 9999px;--ax-comp-inline-reaction-bg: var(--color-lightest);--ax-comp-inline-reaction-border: var(--color-border-surface);--ax-comp-inline-reaction-item-size: 1.5rem;--ax-comp-inline-reaction-collapsed-height: 2.5rem;--ax-comp-inline-reaction-max-height: 18rem;--ax-comp-inline-reaction-item-hover-bg: var(--color-lightest);--ax-comp-inline-reaction-expand-size: 1.5rem;--ax-comp-inline-reaction-expand-bg: var(--color-surface);--ax-comp-inline-reaction-expand-color: var(--color-on-lightest);--ax-comp-inline-reaction-expand-hover-bg: var(--color-light);--ax-comp-inline-reaction-expand-open-bg: color-mix(in srgb, rgba(var(--ax-sys-color-primary-surface)) 18%, rgba(var(--ax-sys-color-surface)));--ax-comp-inline-reaction-expand-open-color: var(--color-primary);display:inline-flex}@supports (color: color-mix(in lab,red,red)){ax-inline-reaction{--ax-comp-inline-reaction-expand-open-bg: color-mix(in oklab, var(--color-primary) 18%, var(--color-surface))}}ax-inline-reaction .ax-inline-reaction{display:flex;flex-direction:row;align-items:center;gap:var(--ax-comp-inline-reaction-gap);padding:var(--ax-comp-inline-reaction-padding-y) var(--ax-comp-inline-reaction-padding-x);border:1px solid var(--ax-comp-inline-reaction-border);border-radius:var(--ax-comp-inline-reaction-radius);background-color:var(--ax-comp-inline-reaction-bg);overflow:hidden;max-height:var(--ax-comp-inline-reaction-collapsed-height);transition:max-height .3s cubic-bezier(.4,0,.2,1),border-radius .3s cubic-bezier(.4,0,.2,1)}ax-inline-reaction .ax-inline-reaction-items{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;gap:var(--ax-comp-inline-reaction-gap);transition:grid-template-columns .3s ease,transform .2s ease}ax-inline-reaction .ax-inline-reaction-expanded{align-items:flex-start;max-height:var(--ax-comp-inline-reaction-max-height);border-radius:1rem}ax-inline-reaction .ax-inline-reaction-expanded .ax-inline-reaction-items{display:grid;grid-template-columns:repeat(var(--ax-comp-inline-reaction-max-visible, 8),var(--ax-comp-inline-reaction-item-size));gap:var(--ax-comp-inline-reaction-gap);align-content:start;justify-content:start;max-height:16.5rem;overflow-y:auto}ax-inline-reaction .ax-inline-reaction-item{display:inline-flex;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);width:var(--ax-comp-inline-reaction-item-size);height:var(--ax-comp-inline-reaction-item-size);line-height:0;animation:ax-inline-reaction-item-enter .2s ease}ax-inline-reaction .ax-inline-reaction-item ax-emoji{pointer-events:none}ax-inline-reaction .ax-inline-reaction-item:hover{background-color:var(--ax-comp-inline-reaction-item-hover-bg)}ax-inline-reaction .ax-inline-reaction-item:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-inline-reaction .ax-inline-reaction-expand{display:inline-flex;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;width:var(--ax-comp-inline-reaction-expand-size);height:var(--ax-comp-inline-reaction-expand-size);margin-inline-start:.125rem;background-color:var(--ax-comp-inline-reaction-expand-bg);color:var(--ax-comp-inline-reaction-expand-color)}ax-inline-reaction .ax-inline-reaction-expand i{font-size:.625rem;line-height:1}ax-inline-reaction .ax-inline-reaction-expand:hover{background-color:var(--ax-comp-inline-reaction-expand-hover-bg)}ax-inline-reaction .ax-inline-reaction-expand:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-inline-reaction .ax-inline-reaction-expand-open{background-color:var(--ax-comp-inline-reaction-expand-open-bg);color:var(--ax-comp-inline-reaction-expand-open-color)}@keyframes ax-inline-reaction-item-enter{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
114
+ args: [{ selector: 'ax-inline-reaction', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXEmojiComponent], providers: [{ provide: AXComponent, useExisting: AXInlineReactionComponent }], template: "<div\n class=\"ax-inline-reaction\"\n [class.ax-inline-reaction-expanded]=\"expanded()\"\n [class.ax-inline-reaction-has-toggle]=\"showToggle()\"\n [style.--ax-comp-inline-reaction-item-size.px]=\"size()\"\n [style.--ax-comp-inline-reaction-columns]=\"columns()\"\n [style.--ax-comp-inline-reaction-rows]=\"expandedRows()\"\n>\n <div class=\"ax-inline-reaction-items\">\n @for (emoji of visibleEmojis(); track $index) {\n @if (showToggle() && $index === maxVisible()) {\n <button\n type=\"button\"\n class=\"ax-inline-reaction-expand\"\n [class.ax-inline-reaction-expand-open]=\"expanded()\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggleExpanded($event)\"\n >\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n }\n <button\n type=\"button\"\n class=\"ax-inline-reaction-item\"\n [class.ax-inline-reaction-item-extra]=\"showToggle() && $index >= maxVisible()\"\n [style.--ax-inline-reaction-index]=\"showToggle() ? $index - maxVisible() : 0\"\n [attr.aria-label]=\"emoji.name\"\n [title]=\"emoji.name\"\n [inert]=\"showToggle() && !expanded() && $index >= maxVisible()\"\n (click)=\"selected.emit(emoji)\"\n >\n <ax-emoji [emoji]=\"emoji\" [size]=\"size()\" />\n </button>\n }\n </div>\n</div>\n", styles: ["@layer properties;@layer components{ax-inline-reaction{--ax-comp-inline-reaction-gap: .375rem;--ax-comp-inline-reaction-padding-x: .5rem;--ax-comp-inline-reaction-padding-y: .375rem;--ax-comp-inline-reaction-radius: 9999px;--ax-comp-inline-reaction-radius-expanded: 1.125rem;--ax-comp-inline-reaction-bg: var(--color-lightest);--ax-comp-inline-reaction-border: var(--color-border-surface);--ax-comp-inline-reaction-item-size: 1.5rem;--ax-comp-inline-reaction-columns: 1;--ax-comp-inline-reaction-rows: 1;--ax-comp-inline-reaction-max-height: 18rem;--ax-comp-inline-reaction-open-duration: .42s;--ax-comp-inline-reaction-open-ease: cubic-bezier(.16, 1, .3, 1);--ax-comp-inline-reaction-item-hover-bg: var(--color-light);--ax-comp-inline-reaction-expand-bg: var(--color-surface);--ax-comp-inline-reaction-expand-color: var(--color-on-lightest);--ax-comp-inline-reaction-expand-hover-bg: var(--color-light);--ax-comp-inline-reaction-expand-open-bg: color-mix(in srgb, rgba(var(--ax-sys-color-primary-surface)) 18%, rgba(var(--ax-sys-color-surface)));--ax-comp-inline-reaction-expand-open-color: var(--color-primary);display:inline-flex}@supports (color: color-mix(in lab,red,red)){ax-inline-reaction{--ax-comp-inline-reaction-expand-open-bg: color-mix(in oklab, var(--color-primary) 18%, var(--color-surface))}}ax-inline-reaction .ax-inline-reaction{box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;width:max-content;max-width:100%;padding:var(--ax-comp-inline-reaction-padding-y) var(--ax-comp-inline-reaction-padding-x);border:1px solid var(--ax-comp-inline-reaction-border);border-radius:var(--ax-comp-inline-reaction-radius);background-color:var(--ax-comp-inline-reaction-bg);overflow:hidden}ax-inline-reaction .ax-inline-reaction-items{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;gap:var(--ax-comp-inline-reaction-gap)}ax-inline-reaction .ax-inline-reaction-has-toggle{align-items:flex-start;height:calc(var(--ax-comp-inline-reaction-padding-y) * 2 + var(--ax-comp-inline-reaction-item-size) + 2px);border-radius:calc((var(--ax-comp-inline-reaction-padding-y) * 2 + var(--ax-comp-inline-reaction-item-size) + 2px) / 2);overflow:hidden;transition:height var(--ax-comp-inline-reaction-open-duration) var(--ax-comp-inline-reaction-open-ease),border-radius var(--ax-comp-inline-reaction-open-duration) var(--ax-comp-inline-reaction-open-ease)}ax-inline-reaction .ax-inline-reaction-has-toggle .ax-inline-reaction-items{display:grid;grid-template-columns:repeat(var(--ax-comp-inline-reaction-columns),var(--ax-comp-inline-reaction-item-size));grid-auto-rows:var(--ax-comp-inline-reaction-item-size);align-content:start;align-items:center;justify-content:start;justify-items:center}ax-inline-reaction .ax-inline-reaction-expanded.ax-inline-reaction-has-toggle{height:min(var(--ax-comp-inline-reaction-max-height),calc(var(--ax-comp-inline-reaction-padding-y) * 2 + var(--ax-comp-inline-reaction-rows) * var(--ax-comp-inline-reaction-item-size) + (var(--ax-comp-inline-reaction-rows) - 1) * var(--ax-comp-inline-reaction-gap) + 2px));border-radius:var(--ax-comp-inline-reaction-radius-expanded);overflow:hidden}ax-inline-reaction .ax-inline-reaction-item{display:inline-flex;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0);width:var(--ax-comp-inline-reaction-item-size);height:var(--ax-comp-inline-reaction-item-size);line-height:0}ax-inline-reaction .ax-inline-reaction-item ax-emoji{pointer-events:none}ax-inline-reaction .ax-inline-reaction-item:hover{background-color:var(--ax-comp-inline-reaction-item-hover-bg)}ax-inline-reaction .ax-inline-reaction-item:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-inline-reaction .ax-inline-reaction-expanded .ax-inline-reaction-item-extra{animation:ax-inline-reaction-item-enter .34s cubic-bezier(.22,1.25,.36,1) both;animation-delay:min(calc(var(--ax-inline-reaction-index) * 10ms),.14s)}ax-inline-reaction .ax-inline-reaction-expand{display:inline-flex;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;width:var(--ax-comp-inline-reaction-item-size);height:var(--ax-comp-inline-reaction-item-size);background-color:var(--ax-comp-inline-reaction-expand-bg);color:var(--ax-comp-inline-reaction-expand-color);transition:background-color .28s ease,color .28s ease}ax-inline-reaction .ax-inline-reaction-expand i{display:inline-block;font-size:calc(var(--ax-comp-inline-reaction-item-size) * .42);line-height:1;transition:transform var(--ax-comp-inline-reaction-open-duration) var(--ax-comp-inline-reaction-open-ease)}ax-inline-reaction .ax-inline-reaction-expand:hover{background-color:var(--ax-comp-inline-reaction-expand-hover-bg)}ax-inline-reaction .ax-inline-reaction-expand:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-inline-reaction .ax-inline-reaction-expand-open{background-color:var(--ax-comp-inline-reaction-expand-open-bg);color:var(--ax-comp-inline-reaction-expand-open-color)}ax-inline-reaction .ax-inline-reaction-expand-open i{transform:rotate(-180deg)}@media(prefers-reduced-motion:reduce){ax-inline-reaction .ax-inline-reaction,ax-inline-reaction .ax-inline-reaction-expand,ax-inline-reaction .ax-inline-reaction-expand i,ax-inline-reaction .ax-inline-reaction-item{animation:none;transition:none}}@keyframes ax-inline-reaction-item-enter{0%{opacity:.72;transform:scale(.78)}to{opacity:1;transform:scale(1)}}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
91
115
  }], ctorParameters: () => [], propDecorators: { emojis: [{ type: i0.Input, args: [{ isSignal: true, alias: "emojis", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisible", required: false }] }], showExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExpanded", required: false }] }], closeOnClickOutside: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnClickOutside", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }] } });
92
116
 
93
117
  class AXInlineReactionModule {
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-inline-reaction.mjs","sources":["../../../../packages/components/inline-reaction/src/lib/inline-reaction.component.ts","../../../../packages/components/inline-reaction/src/lib/inline-reaction.component.html","../../../../packages/components/inline-reaction/src/lib/inline-reaction.module.ts","../../../../packages/components/inline-reaction/src/acorex-components-inline-reaction.ts"],"sourcesContent":["import { AXComponent } from '@acorex/cdk/common';\nimport { AXEmoji } from '@acorex/core/constants';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n input,\n output,\n PLATFORM_ID,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXEmojiComponent } from '@acorex/components/emoji';\n\n@Component({\n selector: 'ax-inline-reaction',\n templateUrl: './inline-reaction.component.html',\n styleUrls: ['./inline-reaction.component.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXEmojiComponent],\n providers: [{ provide: AXComponent, useExisting: AXInlineReactionComponent }],\n})\nexport class AXInlineReactionComponent {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly document = inject(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n\n readonly emojis = input<readonly AXEmoji[]>([]);\n\n readonly size = input(24);\n\n /** Whether the reaction bar is expanded to show all emojis. */\n readonly expanded = signal(false);\n\n /**\n * Maximum number of emojis to display in the bar.\n *\n * @defaultValue 8\n */\n readonly maxVisible = input(8);\n\n /**\n * When true, hides the expand button and always shows the collapsed bar only.\n *\n * @defaultValue false\n */\n readonly showExpanded = input(false);\n\n /**\n * When true, collapses the bar when the user clicks outside the component.\n *\n * @defaultValue true\n */\n readonly closeOnClickOutside = input(true);\n\n /**\n * Emits when the user clicks a quick reaction.\n */\n readonly selected = output<AXEmoji>();\n\n /**\n * Emits when the expanded state changes (expand button or click outside).\n */\n readonly expandedChange = output<boolean>();\n\n protected readonly visibleEmojis = computed(() => {\n if (this.expanded()) {\n return this.emojis();\n }\n\n return this.emojis().slice(0, this.maxVisible());\n });\n\n constructor() {\n effect((onCleanup) => {\n if (!isPlatformBrowser(this.platformId) || !this.closeOnClickOutside() || !this.expanded()) {\n return;\n }\n\n const onDocumentClick = (event: MouseEvent): void => {\n if (this.elementRef.nativeElement.contains(event.target as Node)) {\n return;\n }\n\n this.setExpanded(false);\n };\n\n const timeoutId = globalThis.setTimeout(() => {\n this.document.addEventListener('click', onDocumentClick, true);\n }, 0);\n\n onCleanup(() => {\n globalThis.clearTimeout(timeoutId);\n this.document.removeEventListener('click', onDocumentClick, true);\n });\n });\n }\n\n protected toggleExpanded(event: Event): void {\n event.stopPropagation();\n this.setExpanded(!this.expanded());\n }\n\n private setExpanded(value: boolean): void {\n if (this.expanded() === value) {\n return;\n }\n\n this.expanded.set(value);\n this.expandedChange.emit(value);\n }\n}\n","<div\n class=\"ax-inline-reaction\"\n [class.ax-inline-reaction-expanded]=\"expanded()\"\n [style.--ax-comp-inline-reaction-item-size.px]=\"size()\"\n [style.--ax-comp-inline-reaction-max-visible]=\"maxVisible()\"\n>\n <div class=\"ax-inline-reaction-items\">\n @for (emoji of visibleEmojis(); track emoji.code) {\n <button\n type=\"button\"\n class=\"ax-inline-reaction-item\"\n [attr.aria-label]=\"emoji.name\"\n [title]=\"emoji.name\"\n (click)=\"selected.emit(emoji)\"\n >\n <ax-emoji [emoji]=\"emoji\" [size]=\"size()\" />\n </button>\n }\n </div>\n\n @if (!showExpanded() && emojis().length > maxVisible()) {\n <button\n type=\"button\"\n class=\"ax-inline-reaction-expand\"\n [class.ax-inline-reaction-expand-open]=\"expanded()\"\n (click)=\"toggleExpanded($event)\"\n >\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"!expanded()\" [class.fa-chevron-up]=\"expanded()\"></i>\n </button>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { AXInlineReactionComponent } from './inline-reaction.component';\n\n@NgModule({\n imports: [AXInlineReactionComponent],\n exports: [AXInlineReactionComponent],\n})\nexport class AXInlineReactionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA4Ba,yBAAyB,CAAA;AAmDpC,IAAA,WAAA,GAAA;AAlDiB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,EAAC,UAAu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C,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,gBAAgB,CAAC,EAAA,SAAA,EAChB,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAA,yBAA2B,EAAE,CAAC,EAAA,QAAA,EAAA,w/BAAA,EAAA,MAAA,EAAA,CAAA,88IAAA,CAAA,EAAA;;;MEnBlE,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAtB,sBAAsB,EAAA,OAAA,EAAA,CAHvB,yBAAyB,CAAA,EAAA,OAAA,EAAA,CACzB,yBAAyB,CAAA,EAAA,CAAA,CAAA;AAExB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAHvB,yBAAyB,CAAA,EAAA,CAAA,CAAA;;2FAGxB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,yBAAyB,CAAC;oBACpC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACrC,iBAAA;;;ACND;;AAEG;;"}
1
+ {"version":3,"file":"acorex-components-inline-reaction.mjs","sources":["../../../../packages/components/inline-reaction/src/lib/inline-reaction.component.ts","../../../../packages/components/inline-reaction/src/lib/inline-reaction.component.html","../../../../packages/components/inline-reaction/src/lib/inline-reaction.module.ts","../../../../packages/components/inline-reaction/src/acorex-components-inline-reaction.ts"],"sourcesContent":["import { AXComponent } from '@acorex/cdk/common';\nimport { AXEmoji } from '@acorex/core/constants';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n input,\n output,\n PLATFORM_ID,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXEmojiComponent } from '@acorex/components/emoji';\n\n@Component({\n selector: 'ax-inline-reaction',\n templateUrl: './inline-reaction.component.html',\n styleUrls: ['./inline-reaction.component.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXEmojiComponent],\n providers: [{ provide: AXComponent, useExisting: AXInlineReactionComponent }],\n})\nexport class AXInlineReactionComponent {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly document = inject(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n\n readonly emojis = input<readonly AXEmoji[]>([]);\n\n readonly size = input(24);\n\n /** Whether the reaction bar is expanded to show all emojis. */\n readonly expanded = signal(false);\n\n /**\n * Maximum number of emojis to display in the bar.\n *\n * @defaultValue 8\n */\n readonly maxVisible = input(8);\n\n /**\n * When true, hides the expand button and always shows the collapsed bar only.\n *\n * @defaultValue false\n */\n readonly showExpanded = input(false);\n\n /**\n * When true, collapses the bar when the user clicks outside the component.\n *\n * @defaultValue true\n */\n readonly closeOnClickOutside = input(true);\n\n /**\n * Emits when the user clicks a quick reaction.\n */\n readonly selected = output<AXEmoji>();\n\n /**\n * Emits when the expanded state changes (expand button or click outside).\n */\n readonly expandedChange = output<boolean>();\n\n /** True when the overflow toggle is shown and the bar can grow. */\n protected readonly showToggle = computed(\n () => !this.showExpanded() && this.emojis().length > Math.max(this.maxVisible(), 0),\n );\n\n /**\n * Grid columns. The toggle occupies the last cell of the first row, so the\n * closed bar and the open panel share one width and lower rows fill that cell.\n */\n protected readonly columns = computed(() => {\n const limit = Math.max(this.maxVisible(), 0);\n if (this.showToggle()) {\n return limit + 1;\n }\n\n return Math.max(Math.min(this.emojis().length, limit), 1);\n });\n\n /** Row count once every emoji, including the toggle cell, is placed. */\n protected readonly expandedRows = computed(() => {\n if (!this.showToggle()) {\n return 1;\n }\n\n const extra = this.emojis().length - Math.max(this.maxVisible(), 0);\n return 1 + Math.ceil(extra / this.columns());\n });\n\n protected readonly visibleEmojis = computed(() => {\n if (this.showExpanded()) {\n return this.emojis().slice(0, Math.max(this.maxVisible(), 0));\n }\n\n return this.emojis();\n });\n\n constructor() {\n effect((onCleanup) => {\n if (!isPlatformBrowser(this.platformId) || !this.closeOnClickOutside() || !this.expanded()) {\n return;\n }\n\n const onDocumentClick = (event: MouseEvent): void => {\n if (this.elementRef.nativeElement.contains(event.target as Node)) {\n return;\n }\n\n this.setExpanded(false);\n };\n\n const timeoutId = globalThis.setTimeout(() => {\n this.document.addEventListener('click', onDocumentClick, true);\n }, 0);\n\n onCleanup(() => {\n globalThis.clearTimeout(timeoutId);\n this.document.removeEventListener('click', onDocumentClick, true);\n });\n });\n }\n\n protected toggleExpanded(event: Event): void {\n event.stopPropagation();\n this.setExpanded(!this.expanded());\n }\n\n private setExpanded(value: boolean): void {\n if (this.expanded() === value) {\n return;\n }\n\n this.expanded.set(value);\n this.expandedChange.emit(value);\n }\n}\n","<div\n class=\"ax-inline-reaction\"\n [class.ax-inline-reaction-expanded]=\"expanded()\"\n [class.ax-inline-reaction-has-toggle]=\"showToggle()\"\n [style.--ax-comp-inline-reaction-item-size.px]=\"size()\"\n [style.--ax-comp-inline-reaction-columns]=\"columns()\"\n [style.--ax-comp-inline-reaction-rows]=\"expandedRows()\"\n>\n <div class=\"ax-inline-reaction-items\">\n @for (emoji of visibleEmojis(); track $index) {\n @if (showToggle() && $index === maxVisible()) {\n <button\n type=\"button\"\n class=\"ax-inline-reaction-expand\"\n [class.ax-inline-reaction-expand-open]=\"expanded()\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggleExpanded($event)\"\n >\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n }\n <button\n type=\"button\"\n class=\"ax-inline-reaction-item\"\n [class.ax-inline-reaction-item-extra]=\"showToggle() && $index >= maxVisible()\"\n [style.--ax-inline-reaction-index]=\"showToggle() ? $index - maxVisible() : 0\"\n [attr.aria-label]=\"emoji.name\"\n [title]=\"emoji.name\"\n [inert]=\"showToggle() && !expanded() && $index >= maxVisible()\"\n (click)=\"selected.emit(emoji)\"\n >\n <ax-emoji [emoji]=\"emoji\" [size]=\"size()\" />\n </button>\n }\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { AXInlineReactionComponent } from './inline-reaction.component';\n\n@NgModule({\n imports: [AXInlineReactionComponent],\n exports: [AXInlineReactionComponent],\n})\nexport class AXInlineReactionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA4Ba,yBAAyB,CAAA;AA+EpC,IAAA,WAAA,GAAA;AA9EiB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;AAC5C,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAExC,IAAA,CAAA,MAAM,GAAG,KAAK,CAAqB,EAAE;mFAAC;QAEtC,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,EAAE;iFAAC;;QAGhB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEjC;;;;AAIG;QACM,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,CAAC;uFAAC;AAE9B;;;;AAIG;QACM,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,KAAK;yFAAC;AAEpC;;;;AAIG;QACM,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAC,IAAI;gGAAC;AAE1C;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAW;AAErC;;AAEG;QACM,IAAA,CAAA,cAAc,GAAG,MAAM,EAAW;;AAGxB,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CACtC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,IAAI,CAAC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  this.editable = input(false, /* @ts-ignore */
37
37
  ...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
38
+ /** Whether to show the add button and picker when editable. */
39
+ this.showAddButton = input(true, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "showAddButton" }] : /* istanbul ignore next */ []));
38
41
  /**
39
42
  * When true, the emoji picker popover is opened.
40
43
  *
@@ -113,15 +116,15 @@ class AXReactionComponent {
113
116
  return `${item.emoji.name}, ${item.count}${selected}`;
114
117
  }
115
118
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXReactionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
116
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXReactionComponent, isStandalone: true, selector: "ax-reaction", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, showPicker: { classPropertyName: "showPicker", publicName: "showPicker", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { add: "add", remove: "remove" }, host: { properties: { "class.ax-reaction-editable": "editable()" }, classAttribute: "ax-reaction-host" }, providers: [{ provide: AXComponent, useExisting: AXReactionComponent }], viewQueries: [{ propertyName: "pickerPopover", first: true, predicate: ["pickerPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ax-reaction\">\n @for (item of items(); track item.emoji.code) {\n <button\n type=\"button\"\n class=\"ax-reaction-item\"\n [class.ax-reaction-item-selected]=\"item.selected\"\n [class.ax-reaction-item-interactive]=\"editable()\"\n [attr.aria-label]=\"itemAriaLabel(item)\"\n [attr.aria-pressed]=\"item.selected ? true : null\"\n [title]=\"item.emoji.name\"\n (click)=\"onItemClick(item)\"\n >\n <ax-emoji [emoji]=\"item.emoji\" [size]=\"size()\" />\n\n <span class=\"ax-reaction-count\">\n {{ item.count }}\n </span>\n </button>\n }\n\n @if (editable()) {\n <button\n #addButton\n type=\"button\"\n class=\"ax-reaction-item ax-reaction-add\"\n [class.ax-reaction-item-selected]=\"isPickerVisible()\"\n [attr.aria-label]=\"'Add reaction'\"\n [attr.aria-expanded]=\"isPickerVisible()\"\n [attr.aria-haspopup]=\"true\"\n title=\"Add reaction\"\n (click)=\"togglePicker($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n >\n <span class=\"ax-reaction-add-icon\" aria-hidden=\"true\"></span>\n </button>\n\n <ax-popover\n #pickerPopover\n [target]=\"addButton\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n panelClass=\"ax-reaction-picker-panel\"\n (onOpened)=\"onPickerOpened()\"\n (onClosed)=\"onPickerClosed()\"\n >\n <ax-emoji-picker (selected)=\"onPickerSelected($event)\" />\n </ax-popover>\n }\n</div>\n", styles: ["@layer properties;@layer components{ax-reaction{--ax-comp-reaction-gap: .25rem;--ax-comp-reaction-item-gap: .25rem;--ax-comp-reaction-item-padding-x: .4rem;--ax-comp-reaction-item-padding-y: .125rem;--ax-comp-reaction-item-min-height: 1.5rem;--ax-comp-reaction-item-radius: 9999px;--ax-comp-reaction-item-font-size: .6875rem;--ax-comp-reaction-item-bg: var(--color-surface);--ax-comp-reaction-item-border: var(--color-border-lightest);--ax-comp-reaction-item-color: var(--color-on-surface);--ax-comp-reaction-item-hover-bg: var(--color-lightest);--ax-comp-reaction-item-selected-bg: color-mix(in srgb, rgba(var(--ax-sys-color-primary-surface)) 18%, rgba(var(--ax-sys-color-surface)));--ax-comp-reaction-item-selected-border: var(--color-border-primary);position:relative;display:inline-flex;align-items:center}@supports (color: color-mix(in lab,red,red)){ax-reaction{--ax-comp-reaction-item-selected-bg: color-mix(in oklab, var(--color-primary) 18%, var(--color-surface))}}ax-reaction .ax-reaction{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--ax-comp-reaction-gap)}ax-reaction .ax-reaction-item{display:inline-flex;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:1px;gap:var(--ax-comp-reaction-item-gap);min-height:var(--ax-comp-reaction-item-min-height);padding:var(--ax-comp-reaction-item-padding-y) var(--ax-comp-reaction-item-padding-x);border-radius:var(--ax-comp-reaction-item-radius);border-color:var(--ax-comp-reaction-item-border);background-color:var(--ax-comp-reaction-item-bg);color:var(--ax-comp-reaction-item-color);font-size:var(--ax-comp-reaction-item-font-size);line-height:1;cursor:default}ax-reaction .ax-reaction-item ax-emoji{pointer-events:none}ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add{cursor:pointer}:is(ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add):hover{background-color:var(--ax-comp-reaction-item-hover-bg);border-color:var(--color-border-light)}:is(ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add):focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-reaction .ax-reaction-item-selected{background-color:var(--ax-comp-reaction-item-selected-bg);border-color:var(--ax-comp-reaction-item-selected-border)}ax-reaction .ax-reaction-count{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);color:var(--ax-comp-reaction-item-color);opacity:.7}ax-reaction .ax-reaction-item-selected .ax-reaction-count{color:var(--color-primary);opacity:.95}ax-reaction .ax-reaction-add{aspect-ratio:1 / 1;min-width:1.5rem;padding-inline:calc(var(--spacing, .25rem) * 0)}ax-reaction .ax-reaction-add-icon{position:relative;display:block;width:calc(var(--spacing, .25rem) * 2.5);height:calc(var(--spacing, .25rem) * 2.5)}ax-reaction .ax-reaction-add-icon:before,ax-reaction .ax-reaction-add-icon:after{position:absolute;inset:calc(var(--spacing, .25rem) * 0);margin:auto;border-radius:calc(infinity * 1px);content:\"\";background-color:currentColor}ax-reaction .ax-reaction-add-icon:before{width:100%;height:1.5px}ax-reaction .ax-reaction-add-icon:after{width:1.5px;height:100%}ax-reaction ax-popover{display:contents}.ax-reaction-picker-panel ax-emoji-picker{width:min(22rem,92vw);border:none;box-shadow:none;border-radius:0}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXEmojiComponent, selector: "ax-emoji", inputs: ["emoji", "appearance", "size"] }, { kind: "component", type: AXEmojiPickerComponent, selector: "ax-emoji-picker", inputs: ["items", "size", "appearance", "showSearch", "showRecent", "columns", "searchPlaceholder", "excludeCategories", "excludeCodes", "excludeUnicode", "recentItems"], outputs: ["selected", "recentChanged"] }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "restoreFocusOnClose", "openAfter", "closeAfter", "closeOnScroll", "closeOnNavigation", "backdropClass", "panelClass", "adaptivityEnabled", "draggable"], outputs: ["onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
119
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXReactionComponent, isStandalone: true, selector: "ax-reaction", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, showAddButton: { classPropertyName: "showAddButton", publicName: "showAddButton", isSignal: true, isRequired: false, transformFunction: null }, showPicker: { classPropertyName: "showPicker", publicName: "showPicker", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { add: "add", remove: "remove" }, host: { properties: { "class.ax-reaction-editable": "editable()" }, classAttribute: "ax-reaction-host" }, providers: [{ provide: AXComponent, useExisting: AXReactionComponent }], viewQueries: [{ propertyName: "pickerPopover", first: true, predicate: ["pickerPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ax-reaction\">\n @for (item of items(); track item.emoji.unicode) {\n <button\n type=\"button\"\n class=\"ax-reaction-item\"\n [class.ax-reaction-item-selected]=\"item.selected\"\n [class.ax-reaction-item-interactive]=\"editable()\"\n [attr.aria-label]=\"itemAriaLabel(item)\"\n [attr.aria-pressed]=\"editable() || item.selected ? !!item.selected : null\"\n [title]=\"item.emoji.name\"\n (click)=\"onItemClick(item)\"\n >\n <ax-emoji [emoji]=\"item.emoji\" [size]=\"size()\" />\n\n <span class=\"ax-reaction-count\">\n {{ item.count }}\n </span>\n </button>\n }\n\n @if (editable() && showAddButton()) {\n <button\n #addButton\n type=\"button\"\n class=\"ax-reaction-item ax-reaction-add\"\n [class.ax-reaction-item-selected]=\"isPickerVisible()\"\n [attr.aria-label]=\"'Add reaction'\"\n [attr.aria-expanded]=\"isPickerVisible()\"\n [attr.aria-haspopup]=\"true\"\n title=\"Add reaction\"\n (click)=\"togglePicker($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n >\n <span class=\"ax-reaction-add-icon\" aria-hidden=\"true\"></span>\n </button>\n\n <ax-popover\n #pickerPopover\n [target]=\"addButton\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n panelClass=\"ax-reaction-picker-panel\"\n (onOpened)=\"onPickerOpened()\"\n (onClosed)=\"onPickerClosed()\"\n >\n <ax-emoji-picker (selected)=\"onPickerSelected($event)\" />\n </ax-popover>\n }\n</div>\n", styles: ["@layer properties;@layer components{ax-reaction{--ax-comp-reaction-gap: .25rem;--ax-comp-reaction-item-gap: .25rem;--ax-comp-reaction-item-padding-x: .4rem;--ax-comp-reaction-item-padding-y: .125rem;--ax-comp-reaction-item-min-height: 1.5rem;--ax-comp-reaction-item-radius: 9999px;--ax-comp-reaction-item-font-size: .6875rem;--ax-comp-reaction-item-bg: var(--color-surface);--ax-comp-reaction-item-border: var(--color-border-lightest);--ax-comp-reaction-item-color: var(--color-on-surface);--ax-comp-reaction-item-hover-bg: var(--color-lightest);--ax-comp-reaction-item-selected-bg: color-mix(in srgb, rgba(var(--ax-sys-color-primary-surface)) 18%, rgba(var(--ax-sys-color-surface)));--ax-comp-reaction-item-selected-border: var(--color-border-primary);position:relative;display:inline-flex;align-items:center}@supports (color: color-mix(in lab,red,red)){ax-reaction{--ax-comp-reaction-item-selected-bg: color-mix(in oklab, var(--color-primary) 18%, var(--color-surface))}}ax-reaction .ax-reaction{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--ax-comp-reaction-gap)}ax-reaction .ax-reaction-item{display:inline-flex;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:1px;gap:var(--ax-comp-reaction-item-gap);min-height:var(--ax-comp-reaction-item-min-height);padding:var(--ax-comp-reaction-item-padding-y) var(--ax-comp-reaction-item-padding-x);border-radius:var(--ax-comp-reaction-item-radius);border-color:var(--ax-comp-reaction-item-border);background-color:var(--ax-comp-reaction-item-bg);color:var(--ax-comp-reaction-item-color);font-size:var(--ax-comp-reaction-item-font-size);line-height:1;cursor:default}ax-reaction .ax-reaction-item ax-emoji{pointer-events:none}ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add{cursor:pointer}:is(ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add):hover{background-color:var(--ax-comp-reaction-item-hover-bg);border-color:var(--color-border-light)}:is(ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add):focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-reaction .ax-reaction-item-selected{background-color:var(--ax-comp-reaction-item-selected-bg);border-color:var(--ax-comp-reaction-item-selected-border)}ax-reaction .ax-reaction-count{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);color:var(--ax-comp-reaction-item-color);opacity:.7}ax-reaction .ax-reaction-item-selected .ax-reaction-count{color:var(--color-primary);opacity:.95}ax-reaction .ax-reaction-add{aspect-ratio:1 / 1;min-width:1.5rem;padding-inline:calc(var(--spacing, .25rem) * 0)}ax-reaction .ax-reaction-add-icon{position:relative;display:block;width:calc(var(--spacing, .25rem) * 2.5);height:calc(var(--spacing, .25rem) * 2.5)}ax-reaction .ax-reaction-add-icon:before,ax-reaction .ax-reaction-add-icon:after{position:absolute;inset:calc(var(--spacing, .25rem) * 0);margin:auto;border-radius:calc(infinity * 1px);content:\"\";background-color:currentColor}ax-reaction .ax-reaction-add-icon:before{width:100%;height:1.5px}ax-reaction .ax-reaction-add-icon:after{width:1.5px;height:100%}ax-reaction ax-popover{display:contents}.ax-reaction-picker-panel ax-emoji-picker{width:min(22rem,92vw);border:none;box-shadow:none;border-radius:0}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXEmojiComponent, selector: "ax-emoji", inputs: ["emoji", "appearance", "size"] }, { kind: "component", type: AXEmojiPickerComponent, selector: "ax-emoji-picker", inputs: ["items", "size", "appearance", "showSearch", "showRecent", "columns", "searchPlaceholder", "excludeCategories", "excludeCodes", "excludeUnicode", "recentItems"], outputs: ["selected", "recentChanged"] }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "restoreFocusOnClose", "openAfter", "closeAfter", "closeOnScroll", "closeOnNavigation", "backdropClass", "panelClass", "adaptivityEnabled", "draggable"], outputs: ["onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
117
120
  }
118
121
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXReactionComponent, decorators: [{
119
122
  type: Component,
120
123
  args: [{ selector: 'ax-reaction', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
121
124
  class: 'ax-reaction-host',
122
125
  '[class.ax-reaction-editable]': 'editable()',
123
- }, imports: [AXEmojiComponent, AXEmojiPickerComponent, AXPopoverComponent], providers: [{ provide: AXComponent, useExisting: AXReactionComponent }], template: "<div class=\"ax-reaction\">\n @for (item of items(); track item.emoji.code) {\n <button\n type=\"button\"\n class=\"ax-reaction-item\"\n [class.ax-reaction-item-selected]=\"item.selected\"\n [class.ax-reaction-item-interactive]=\"editable()\"\n [attr.aria-label]=\"itemAriaLabel(item)\"\n [attr.aria-pressed]=\"item.selected ? true : null\"\n [title]=\"item.emoji.name\"\n (click)=\"onItemClick(item)\"\n >\n <ax-emoji [emoji]=\"item.emoji\" [size]=\"size()\" />\n\n <span class=\"ax-reaction-count\">\n {{ item.count }}\n </span>\n </button>\n }\n\n @if (editable()) {\n <button\n #addButton\n type=\"button\"\n class=\"ax-reaction-item ax-reaction-add\"\n [class.ax-reaction-item-selected]=\"isPickerVisible()\"\n [attr.aria-label]=\"'Add reaction'\"\n [attr.aria-expanded]=\"isPickerVisible()\"\n [attr.aria-haspopup]=\"true\"\n title=\"Add reaction\"\n (click)=\"togglePicker($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n >\n <span class=\"ax-reaction-add-icon\" aria-hidden=\"true\"></span>\n </button>\n\n <ax-popover\n #pickerPopover\n [target]=\"addButton\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n panelClass=\"ax-reaction-picker-panel\"\n (onOpened)=\"onPickerOpened()\"\n (onClosed)=\"onPickerClosed()\"\n >\n <ax-emoji-picker (selected)=\"onPickerSelected($event)\" />\n </ax-popover>\n }\n</div>\n", styles: ["@layer properties;@layer components{ax-reaction{--ax-comp-reaction-gap: .25rem;--ax-comp-reaction-item-gap: .25rem;--ax-comp-reaction-item-padding-x: .4rem;--ax-comp-reaction-item-padding-y: .125rem;--ax-comp-reaction-item-min-height: 1.5rem;--ax-comp-reaction-item-radius: 9999px;--ax-comp-reaction-item-font-size: .6875rem;--ax-comp-reaction-item-bg: var(--color-surface);--ax-comp-reaction-item-border: var(--color-border-lightest);--ax-comp-reaction-item-color: var(--color-on-surface);--ax-comp-reaction-item-hover-bg: var(--color-lightest);--ax-comp-reaction-item-selected-bg: color-mix(in srgb, rgba(var(--ax-sys-color-primary-surface)) 18%, rgba(var(--ax-sys-color-surface)));--ax-comp-reaction-item-selected-border: var(--color-border-primary);position:relative;display:inline-flex;align-items:center}@supports (color: color-mix(in lab,red,red)){ax-reaction{--ax-comp-reaction-item-selected-bg: color-mix(in oklab, var(--color-primary) 18%, var(--color-surface))}}ax-reaction .ax-reaction{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--ax-comp-reaction-gap)}ax-reaction .ax-reaction-item{display:inline-flex;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:1px;gap:var(--ax-comp-reaction-item-gap);min-height:var(--ax-comp-reaction-item-min-height);padding:var(--ax-comp-reaction-item-padding-y) var(--ax-comp-reaction-item-padding-x);border-radius:var(--ax-comp-reaction-item-radius);border-color:var(--ax-comp-reaction-item-border);background-color:var(--ax-comp-reaction-item-bg);color:var(--ax-comp-reaction-item-color);font-size:var(--ax-comp-reaction-item-font-size);line-height:1;cursor:default}ax-reaction .ax-reaction-item ax-emoji{pointer-events:none}ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add{cursor:pointer}:is(ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add):hover{background-color:var(--ax-comp-reaction-item-hover-bg);border-color:var(--color-border-light)}:is(ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add):focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-reaction .ax-reaction-item-selected{background-color:var(--ax-comp-reaction-item-selected-bg);border-color:var(--ax-comp-reaction-item-selected-border)}ax-reaction .ax-reaction-count{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);color:var(--ax-comp-reaction-item-color);opacity:.7}ax-reaction .ax-reaction-item-selected .ax-reaction-count{color:var(--color-primary);opacity:.95}ax-reaction .ax-reaction-add{aspect-ratio:1 / 1;min-width:1.5rem;padding-inline:calc(var(--spacing, .25rem) * 0)}ax-reaction .ax-reaction-add-icon{position:relative;display:block;width:calc(var(--spacing, .25rem) * 2.5);height:calc(var(--spacing, .25rem) * 2.5)}ax-reaction .ax-reaction-add-icon:before,ax-reaction .ax-reaction-add-icon:after{position:absolute;inset:calc(var(--spacing, .25rem) * 0);margin:auto;border-radius:calc(infinity * 1px);content:\"\";background-color:currentColor}ax-reaction .ax-reaction-add-icon:before{width:100%;height:1.5px}ax-reaction .ax-reaction-add-icon:after{width:1.5px;height:100%}ax-reaction ax-popover{display:contents}.ax-reaction-picker-panel ax-emoji-picker{width:min(22rem,92vw);border:none;box-shadow:none;border-radius:0}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
124
- }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], showPicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPicker", required: false }] }], add: [{ type: i0.Output, args: ["add"] }], remove: [{ type: i0.Output, args: ["remove"] }], pickerPopover: [{ type: i0.ViewChild, args: ['pickerPopover', { isSignal: true }] }] } });
126
+ }, imports: [AXEmojiComponent, AXEmojiPickerComponent, AXPopoverComponent], providers: [{ provide: AXComponent, useExisting: AXReactionComponent }], template: "<div class=\"ax-reaction\">\n @for (item of items(); track item.emoji.unicode) {\n <button\n type=\"button\"\n class=\"ax-reaction-item\"\n [class.ax-reaction-item-selected]=\"item.selected\"\n [class.ax-reaction-item-interactive]=\"editable()\"\n [attr.aria-label]=\"itemAriaLabel(item)\"\n [attr.aria-pressed]=\"editable() || item.selected ? !!item.selected : null\"\n [title]=\"item.emoji.name\"\n (click)=\"onItemClick(item)\"\n >\n <ax-emoji [emoji]=\"item.emoji\" [size]=\"size()\" />\n\n <span class=\"ax-reaction-count\">\n {{ item.count }}\n </span>\n </button>\n }\n\n @if (editable() && showAddButton()) {\n <button\n #addButton\n type=\"button\"\n class=\"ax-reaction-item ax-reaction-add\"\n [class.ax-reaction-item-selected]=\"isPickerVisible()\"\n [attr.aria-label]=\"'Add reaction'\"\n [attr.aria-expanded]=\"isPickerVisible()\"\n [attr.aria-haspopup]=\"true\"\n title=\"Add reaction\"\n (click)=\"togglePicker($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n >\n <span class=\"ax-reaction-add-icon\" aria-hidden=\"true\"></span>\n </button>\n\n <ax-popover\n #pickerPopover\n [target]=\"addButton\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n panelClass=\"ax-reaction-picker-panel\"\n (onOpened)=\"onPickerOpened()\"\n (onClosed)=\"onPickerClosed()\"\n >\n <ax-emoji-picker (selected)=\"onPickerSelected($event)\" />\n </ax-popover>\n }\n</div>\n", styles: ["@layer properties;@layer components{ax-reaction{--ax-comp-reaction-gap: .25rem;--ax-comp-reaction-item-gap: .25rem;--ax-comp-reaction-item-padding-x: .4rem;--ax-comp-reaction-item-padding-y: .125rem;--ax-comp-reaction-item-min-height: 1.5rem;--ax-comp-reaction-item-radius: 9999px;--ax-comp-reaction-item-font-size: .6875rem;--ax-comp-reaction-item-bg: var(--color-surface);--ax-comp-reaction-item-border: var(--color-border-lightest);--ax-comp-reaction-item-color: var(--color-on-surface);--ax-comp-reaction-item-hover-bg: var(--color-lightest);--ax-comp-reaction-item-selected-bg: color-mix(in srgb, rgba(var(--ax-sys-color-primary-surface)) 18%, rgba(var(--ax-sys-color-surface)));--ax-comp-reaction-item-selected-border: var(--color-border-primary);position:relative;display:inline-flex;align-items:center}@supports (color: color-mix(in lab,red,red)){ax-reaction{--ax-comp-reaction-item-selected-bg: color-mix(in oklab, var(--color-primary) 18%, var(--color-surface))}}ax-reaction .ax-reaction{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--ax-comp-reaction-gap)}ax-reaction .ax-reaction-item{display:inline-flex;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:1px;gap:var(--ax-comp-reaction-item-gap);min-height:var(--ax-comp-reaction-item-min-height);padding:var(--ax-comp-reaction-item-padding-y) var(--ax-comp-reaction-item-padding-x);border-radius:var(--ax-comp-reaction-item-radius);border-color:var(--ax-comp-reaction-item-border);background-color:var(--ax-comp-reaction-item-bg);color:var(--ax-comp-reaction-item-color);font-size:var(--ax-comp-reaction-item-font-size);line-height:1;cursor:default}ax-reaction .ax-reaction-item ax-emoji{pointer-events:none}ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add{cursor:pointer}:is(ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add):hover{background-color:var(--ax-comp-reaction-item-hover-bg);border-color:var(--color-border-light)}:is(ax-reaction .ax-reaction-item-interactive,ax-reaction .ax-reaction-add):focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}ax-reaction .ax-reaction-item-selected{background-color:var(--ax-comp-reaction-item-selected-bg);border-color:var(--ax-comp-reaction-item-selected-border)}ax-reaction .ax-reaction-count{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);color:var(--ax-comp-reaction-item-color);opacity:.7}ax-reaction .ax-reaction-item-selected .ax-reaction-count{color:var(--color-primary);opacity:.95}ax-reaction .ax-reaction-add{aspect-ratio:1 / 1;min-width:1.5rem;padding-inline:calc(var(--spacing, .25rem) * 0)}ax-reaction .ax-reaction-add-icon{position:relative;display:block;width:calc(var(--spacing, .25rem) * 2.5);height:calc(var(--spacing, .25rem) * 2.5)}ax-reaction .ax-reaction-add-icon:before,ax-reaction .ax-reaction-add-icon:after{position:absolute;inset:calc(var(--spacing, .25rem) * 0);margin:auto;border-radius:calc(infinity * 1px);content:\"\";background-color:currentColor}ax-reaction .ax-reaction-add-icon:before{width:100%;height:1.5px}ax-reaction .ax-reaction-add-icon:after{width:1.5px;height:100%}ax-reaction ax-popover{display:contents}.ax-reaction-picker-panel ax-emoji-picker{width:min(22rem,92vw);border:none;box-shadow:none;border-radius:0}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
127
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], showAddButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAddButton", required: false }] }], showPicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPicker", required: false }] }], add: [{ type: i0.Output, args: ["add"] }], remove: [{ type: i0.Output, args: ["remove"] }], pickerPopover: [{ type: i0.ViewChild, args: ['pickerPopover', { isSignal: true }] }] } });
125
128
 
126
129
  class AXReactionModule {
127
130
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXReactionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-reaction.mjs","sources":["../../../../packages/components/reaction/src/lib/reaction.component.ts","../../../../packages/components/reaction/src/lib/reaction.component.html","../../../../packages/components/reaction/src/lib/reaction.module.ts","../../../../packages/components/reaction/src/acorex-components-reaction.ts"],"sourcesContent":["import { AXComponent } from '@acorex/cdk/common';\nimport { AXEmoji } from '@acorex/core/constants';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n input,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXEmojiComponent } from '@acorex/components/emoji';\nimport { AXEmojiPickerComponent } from '@acorex/components/emojipicker';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXReactionItem } from './reaction.type';\n\n/**\n * Telegram-style reaction chips for chat messages.\n * Renders emojis with {@link AXEmojiComponent} and opens {@link AXEmojiPickerComponent}\n * inside {@link AXPopoverComponent} when editable.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-reaction',\n templateUrl: './reaction.component.html',\n styleUrls: ['./reaction.component.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ax-reaction-host',\n '[class.ax-reaction-editable]': 'editable()',\n },\n imports: [AXEmojiComponent, AXEmojiPickerComponent, AXPopoverComponent],\n providers: [{ provide: AXComponent, useExisting: AXReactionComponent }],\n})\nexport class AXReactionComponent {\n /**\n * Aggregated reactions to display.\n *\n * @defaultValue []\n */\n readonly items = input<readonly AXReactionItem[]>([]);\n\n /**\n * Rendered emoji size in pixels.\n *\n * @defaultValue 18\n */\n readonly size = input(18);\n\n /**\n * When true, reactions are interactive and an add button opens the emoji picker popover.\n *\n * @defaultValue false\n */\n readonly editable = input(false);\n\n /**\n * When true, the emoji picker popover is opened.\n *\n * @defaultValue false\n */\n readonly showPicker = input(false);\n\n /**\n * Emits when the user selects a new reaction or an unselected existing one.\n */\n readonly add = output<AXEmoji>();\n\n /**\n * Emits when the user removes their own reaction.\n */\n readonly remove = output<AXEmoji>();\n\n private readonly pickerPopover = viewChild<AXPopoverComponent>('pickerPopover');\n\n /** Whether the emoji picker popover is currently open. */\n protected readonly pickerOpen = signal(false);\n\n /** Whether the add button should appear pressed while the picker is open. */\n protected readonly isPickerVisible = computed(() => this.showPicker() || this.pickerOpen());\n\n constructor() {\n effect(() => {\n const show = this.showPicker();\n const popover = this.pickerPopover();\n if (!popover) {\n return;\n }\n\n if (show && !popover.isOpen) {\n void popover.open();\n }\n });\n }\n\n /** Toggles a reaction without mutating counts; parent owns state. */\n protected onItemClick(item: AXReactionItem): void {\n if (!this.editable()) {\n return;\n }\n\n if (item.selected) {\n this.remove.emit(item.emoji);\n return;\n }\n\n this.add.emit(item.emoji);\n }\n\n /** Opens or closes the emoji picker popover. */\n protected togglePicker(event?: Event): void {\n event?.preventDefault();\n event?.stopPropagation();\n\n const popover = this.pickerPopover();\n if (!popover) {\n return;\n }\n\n if (popover.isOpen) {\n popover.close();\n return;\n }\n\n void popover.open();\n }\n\n /** Forwards a picker selection as `add` and closes the popover. */\n protected onPickerSelected(emoji: AXEmoji): void {\n this.add.emit(emoji);\n this.pickerPopover()?.close();\n }\n\n /** Syncs the add-button pressed state when the popover opens. */\n protected onPickerOpened(): void {\n this.pickerOpen.set(true);\n }\n\n /** Syncs the add-button pressed state when the popover closes. */\n protected onPickerClosed(): void {\n this.pickerOpen.set(false);\n }\n\n /** Accessible name for an existing reaction chip. */\n protected itemAriaLabel(item: AXReactionItem): string {\n const selected = item.selected ? ', selected' : '';\n return `${item.emoji.name}, ${item.count}${selected}`;\n }\n}\n","<div class=\"ax-reaction\">\n @for (item of items(); track item.emoji.code) {\n <button\n type=\"button\"\n class=\"ax-reaction-item\"\n [class.ax-reaction-item-selected]=\"item.selected\"\n [class.ax-reaction-item-interactive]=\"editable()\"\n [attr.aria-label]=\"itemAriaLabel(item)\"\n [attr.aria-pressed]=\"item.selected ? true : null\"\n [title]=\"item.emoji.name\"\n (click)=\"onItemClick(item)\"\n >\n <ax-emoji [emoji]=\"item.emoji\" [size]=\"size()\" />\n\n <span class=\"ax-reaction-count\">\n {{ item.count }}\n </span>\n </button>\n }\n\n @if (editable()) {\n <button\n #addButton\n type=\"button\"\n class=\"ax-reaction-item ax-reaction-add\"\n [class.ax-reaction-item-selected]=\"isPickerVisible()\"\n [attr.aria-label]=\"'Add reaction'\"\n [attr.aria-expanded]=\"isPickerVisible()\"\n [attr.aria-haspopup]=\"true\"\n title=\"Add reaction\"\n (click)=\"togglePicker($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n >\n <span class=\"ax-reaction-add-icon\" aria-hidden=\"true\"></span>\n </button>\n\n <ax-popover\n #pickerPopover\n [target]=\"addButton\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n panelClass=\"ax-reaction-picker-panel\"\n (onOpened)=\"onPickerOpened()\"\n (onClosed)=\"onPickerClosed()\"\n >\n <ax-emoji-picker (selected)=\"onPickerSelected($event)\" />\n </ax-popover>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { AXReactionComponent } from './reaction.component';\n\n@NgModule({\n imports: [AXReactionComponent],\n exports: [AXReactionComponent],\n})\nexport class AXReactionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAkBA;;;;;;AAMG;MAcU,mBAAmB,CAAA;AA+C9B,IAAA,WAAA,GAAA;AA9CA;;;;AAIG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAA4B,EAAE;kFAAC;AAErD;;;;AAIG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,EAAE;iFAAC;AAEzB;;;;AAIG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK;qFAAC;AAEhC;;;;AAIG;QACM,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK;uFAAC;AAElC;;AAEG;QACM,IAAA,CAAA,GAAG,GAAG,MAAM,EAAW;AAEhC;;AAEG;QACM,IAAA,CAAA,MAAM,GAAG,MAAM,EAAW;QAElB,IAAA,CAAA,aAAa,GAAG,SAAS,CAAqB,eAAe;0FAAC;;QAG5D,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,KAAK;uFAAC;;AAG1B,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;4FAAC;QAGzF,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE;AAC9B,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,EAAE;YACpC,IAAI,CAAC,OAAO,EAAE;gBACZ;YACF;AAEA,YAAA,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;AAC3B,gBAAA,KAAK,OAAO,CAAC,IAAI,EAAE;YACrB;AACF,QAAA,CAAC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,EACzC;AACJ,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,8BAA8B,EAAE,YAAY;AAC7C,qBAAA,EAAA,OAAA,EACQ,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,kBAAkB,CAAC,EAAA,SAAA,EAC5D,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAA,mBAAqB,EAAE,CAAC,EAAA,QAAA,EAAA,uhDAAA,EAAA,MAAA,EAAA,CAAA,q1IAAA,CAAA,EAAA;ujBAyCR,eAAe,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;MEtEnE,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAhB,gBAAgB,EAAA,OAAA,EAAA,CAHjB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACnB,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAElB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAHjB,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAGlB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,mBAAmB,CAAC;oBAC9B,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA;;;ACND;;AAEG;;"}
1
+ {"version":3,"file":"acorex-components-reaction.mjs","sources":["../../../../packages/components/reaction/src/lib/reaction.component.ts","../../../../packages/components/reaction/src/lib/reaction.component.html","../../../../packages/components/reaction/src/lib/reaction.module.ts","../../../../packages/components/reaction/src/acorex-components-reaction.ts"],"sourcesContent":["import { AXComponent } from '@acorex/cdk/common';\nimport { AXEmoji } from '@acorex/core/constants';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n input,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXEmojiComponent } from '@acorex/components/emoji';\nimport { AXEmojiPickerComponent } from '@acorex/components/emojipicker';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXReactionItem } from './reaction.type';\n\n/**\n * Telegram-style reaction chips for chat messages.\n * Renders emojis with {@link AXEmojiComponent} and opens {@link AXEmojiPickerComponent}\n * inside {@link AXPopoverComponent} when editable.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-reaction',\n templateUrl: './reaction.component.html',\n styleUrls: ['./reaction.component.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ax-reaction-host',\n '[class.ax-reaction-editable]': 'editable()',\n },\n imports: [AXEmojiComponent, AXEmojiPickerComponent, AXPopoverComponent],\n providers: [{ provide: AXComponent, useExisting: AXReactionComponent }],\n})\nexport class AXReactionComponent {\n /**\n * Aggregated reactions to display.\n *\n * @defaultValue []\n */\n readonly items = input<readonly AXReactionItem[]>([]);\n\n /**\n * Rendered emoji size in pixels.\n *\n * @defaultValue 18\n */\n readonly size = input(18);\n\n /**\n * When true, reactions are interactive and an add button opens the emoji picker popover.\n *\n * @defaultValue false\n */\n readonly editable = input(false);\n\n /** Whether to show the add button and picker when editable. */\n readonly showAddButton = input(true);\n\n /**\n * When true, the emoji picker popover is opened.\n *\n * @defaultValue false\n */\n readonly showPicker = input(false);\n\n /**\n * Emits when the user selects a new reaction or an unselected existing one.\n */\n readonly add = output<AXEmoji>();\n\n /**\n * Emits when the user removes their own reaction.\n */\n readonly remove = output<AXEmoji>();\n\n private readonly pickerPopover = viewChild<AXPopoverComponent>('pickerPopover');\n\n /** Whether the emoji picker popover is currently open. */\n protected readonly pickerOpen = signal(false);\n\n /** Whether the add button should appear pressed while the picker is open. */\n protected readonly isPickerVisible = computed(() => this.showPicker() || this.pickerOpen());\n\n constructor() {\n effect(() => {\n const show = this.showPicker();\n const popover = this.pickerPopover();\n if (!popover) {\n return;\n }\n\n if (show && !popover.isOpen) {\n void popover.open();\n }\n });\n }\n\n /** Toggles a reaction without mutating counts; parent owns state. */\n protected onItemClick(item: AXReactionItem): void {\n if (!this.editable()) {\n return;\n }\n\n if (item.selected) {\n this.remove.emit(item.emoji);\n return;\n }\n\n this.add.emit(item.emoji);\n }\n\n /** Opens or closes the emoji picker popover. */\n protected togglePicker(event?: Event): void {\n event?.preventDefault();\n event?.stopPropagation();\n\n const popover = this.pickerPopover();\n if (!popover) {\n return;\n }\n\n if (popover.isOpen) {\n popover.close();\n return;\n }\n\n void popover.open();\n }\n\n /** Forwards a picker selection as `add` and closes the popover. */\n protected onPickerSelected(emoji: AXEmoji): void {\n this.add.emit(emoji);\n this.pickerPopover()?.close();\n }\n\n /** Syncs the add-button pressed state when the popover opens. */\n protected onPickerOpened(): void {\n this.pickerOpen.set(true);\n }\n\n /** Syncs the add-button pressed state when the popover closes. */\n protected onPickerClosed(): void {\n this.pickerOpen.set(false);\n }\n\n /** Accessible name for an existing reaction chip. */\n protected itemAriaLabel(item: AXReactionItem): string {\n const selected = item.selected ? ', selected' : '';\n return `${item.emoji.name}, ${item.count}${selected}`;\n }\n}\n","<div class=\"ax-reaction\">\n @for (item of items(); track item.emoji.unicode) {\n <button\n type=\"button\"\n class=\"ax-reaction-item\"\n [class.ax-reaction-item-selected]=\"item.selected\"\n [class.ax-reaction-item-interactive]=\"editable()\"\n [attr.aria-label]=\"itemAriaLabel(item)\"\n [attr.aria-pressed]=\"editable() || item.selected ? !!item.selected : null\"\n [title]=\"item.emoji.name\"\n (click)=\"onItemClick(item)\"\n >\n <ax-emoji [emoji]=\"item.emoji\" [size]=\"size()\" />\n\n <span class=\"ax-reaction-count\">\n {{ item.count }}\n </span>\n </button>\n }\n\n @if (editable() && showAddButton()) {\n <button\n #addButton\n type=\"button\"\n class=\"ax-reaction-item ax-reaction-add\"\n [class.ax-reaction-item-selected]=\"isPickerVisible()\"\n [attr.aria-label]=\"'Add reaction'\"\n [attr.aria-expanded]=\"isPickerVisible()\"\n [attr.aria-haspopup]=\"true\"\n title=\"Add reaction\"\n (click)=\"togglePicker($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n >\n <span class=\"ax-reaction-add-icon\" aria-hidden=\"true\"></span>\n </button>\n\n <ax-popover\n #pickerPopover\n [target]=\"addButton\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n panelClass=\"ax-reaction-picker-panel\"\n (onOpened)=\"onPickerOpened()\"\n (onClosed)=\"onPickerClosed()\"\n >\n <ax-emoji-picker (selected)=\"onPickerSelected($event)\" />\n </ax-popover>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { AXReactionComponent } from './reaction.component';\n\n@NgModule({\n imports: [AXReactionComponent],\n exports: [AXReactionComponent],\n})\nexport class AXReactionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAkBA;;;;;;AAMG;MAcU,mBAAmB,CAAA;AAkD9B,IAAA,WAAA,GAAA;AAjDA;;;;AAIG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAA4B,EAAE;kFAAC;AAErD;;;;AAIG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,EAAE;iFAAC;AAEzB;;;;AAIG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK;qFAAC;;QAGvB,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,IAAI;0FAAC;AAEpC;;;;AAIG;QACM,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK;uFAAC;AAElC;;AAEG;QACM,IAAA,CAAA,GAAG,GAAG,MAAM,EAAW;AAEhC;;AAEG;QACM,IAAA,CAAA,MAAM,GAAG,MAAM,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