{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from 'primeng/api';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { UniqueComponentId, ZIndexUtils } from 'primeng/utils';\nimport * as i2 from 'primeng/ripple';\nimport { RippleModule } from 'primeng/ripple';\nimport { trigger, state, style, transition, animate, query, animateChild } from '@angular/animations';\nconst _c0 = [\"container\"];\n\nconst _c1 = function (a0, a1, a2, a3) {\n return {\n \"pi-info-circle\": a0,\n \"pi-exclamation-triangle\": a1,\n \"pi-times-circle\": a2,\n \"pi-check\": a3\n };\n};\n\nfunction ToastItem_ng_container_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"span\", 6);\n i0.ɵɵelementStart(2, \"div\", 7);\n i0.ɵɵelementStart(3, \"div\", 8);\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"div\", 9);\n i0.ɵɵtext(6);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵclassMap(\"p-toast-message-icon pi\" + (ctx_r1.message.icon ? \" \" + ctx_r1.message.icon : \"\"));\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction4(5, _c1, ctx_r1.message.severity == \"info\", ctx_r1.message.severity == \"warn\", ctx_r1.message.severity == \"error\", ctx_r1.message.severity == \"success\"));\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx_r1.message.summary);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx_r1.message.detail);\n }\n}\n\nfunction ToastItem_ng_container_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nfunction ToastItem_button_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"button\", 10);\n i0.ɵɵlistener(\"click\", function ToastItem_button_5_Template_button_click_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r4 = i0.ɵɵnextContext();\n return ctx_r4.onCloseIconClick($event);\n })(\"keydown.enter\", function ToastItem_button_5_Template_button_keydown_enter_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r6 = i0.ɵɵnextContext();\n return ctx_r6.onCloseIconClick($event);\n });\n i0.ɵɵelement(1, \"span\", 11);\n i0.ɵɵelementEnd();\n }\n}\n\nconst _c2 = function (a0) {\n return [a0, \"p-toast-message\"];\n};\n\nconst _c3 = function (a0, a1, a2, a3) {\n return {\n showTransformParams: a0,\n hideTransformParams: a1,\n showTransitionParams: a2,\n hideTransitionParams: a3\n };\n};\n\nconst _c4 = function (a1) {\n return {\n value: \"visible\",\n params: a1\n };\n};\n\nconst _c5 = function (a0) {\n return {\n $implicit: a0\n };\n};\n\nfunction Toast_p_toastItem_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"p-toastItem\", 3);\n i0.ɵɵlistener(\"onClose\", function Toast_p_toastItem_2_Template_p_toastItem_onClose_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r4 = i0.ɵɵnextContext();\n return ctx_r4.onMessageClose($event);\n })(\"@toastAnimation.start\", function Toast_p_toastItem_2_Template_p_toastItem_animation_toastAnimation_start_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r6 = i0.ɵɵnextContext();\n return ctx_r6.onAnimationStart($event);\n })(\"@toastAnimation.done\", function Toast_p_toastItem_2_Template_p_toastItem_animation_toastAnimation_done_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r7 = i0.ɵɵnextContext();\n return ctx_r7.onAnimationEnd($event);\n });\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const msg_r2 = ctx.$implicit;\n const i_r3 = ctx.index;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"message\", msg_r2)(\"index\", i_r3)(\"template\", ctx_r1.template)(\"@toastAnimation\", undefined)(\"showTransformOptions\", ctx_r1.showTransformOptions)(\"hideTransformOptions\", ctx_r1.hideTransformOptions)(\"showTransitionOptions\", ctx_r1.showTransitionOptions)(\"hideTransitionOptions\", ctx_r1.hideTransitionOptions);\n }\n}\n\nclass ToastItem {\n constructor(zone) {\n this.zone = zone;\n this.onClose = new EventEmitter();\n }\n\n ngAfterViewInit() {\n this.initTimeout();\n }\n\n initTimeout() {\n if (!this.message.sticky) {\n this.zone.runOutsideAngular(() => {\n this.timeout = setTimeout(() => {\n this.onClose.emit({\n index: this.index,\n message: this.message\n });\n }, this.message.life || 3000);\n });\n }\n }\n\n clearTimeout() {\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n }\n\n onMouseEnter() {\n this.clearTimeout();\n }\n\n onMouseLeave() {\n this.initTimeout();\n }\n\n onCloseIconClick(event) {\n this.clearTimeout();\n this.onClose.emit({\n index: this.index,\n message: this.message\n });\n event.preventDefault();\n }\n\n ngOnDestroy() {\n this.clearTimeout();\n }\n\n}\n\nToastItem.ɵfac = function ToastItem_Factory(t) {\n return new (t || ToastItem)(i0.ɵɵdirectiveInject(i0.NgZone));\n};\n\nToastItem.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ToastItem,\n selectors: [[\"p-toastItem\"]],\n viewQuery: function ToastItem_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n }\n\n if (rf & 2) {\n let _t;\n\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.containerViewChild = _t.first);\n }\n },\n hostAttrs: [1, \"p-element\"],\n inputs: {\n message: \"message\",\n index: \"index\",\n template: \"template\",\n showTransformOptions: \"showTransformOptions\",\n hideTransformOptions: \"hideTransformOptions\",\n showTransitionOptions: \"showTransitionOptions\",\n hideTransitionOptions: \"hideTransitionOptions\"\n },\n outputs: {\n onClose: \"onClose\"\n },\n decls: 6,\n vars: 21,\n consts: [[3, \"ngClass\", \"mouseenter\", \"mouseleave\"], [\"container\", \"\"], [\"role\", \"alert\", \"aria-live\", \"assertive\", \"aria-atomic\", \"true\", 1, \"p-toast-message-content\", 3, \"ngClass\"], [4, \"ngIf\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [\"type\", \"button\", \"class\", \"p-toast-icon-close p-link\", \"pRipple\", \"\", 3, \"click\", \"keydown.enter\", 4, \"ngIf\"], [3, \"ngClass\"], [1, \"p-toast-message-text\"], [1, \"p-toast-summary\"], [1, \"p-toast-detail\"], [\"type\", \"button\", \"pRipple\", \"\", 1, \"p-toast-icon-close\", \"p-link\", 3, \"click\", \"keydown.enter\"], [1, \"p-toast-icon-close-icon\", \"pi\", \"pi-times\"]],\n template: function ToastItem_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0, 1);\n i0.ɵɵlistener(\"mouseenter\", function ToastItem_Template_div_mouseenter_0_listener() {\n return ctx.onMouseEnter();\n })(\"mouseleave\", function ToastItem_Template_div_mouseleave_0_listener() {\n return ctx.onMouseLeave();\n });\n i0.ɵɵelementStart(2, \"div\", 2);\n i0.ɵɵtemplate(3, ToastItem_ng_container_3_Template, 7, 10, \"ng-container\", 3);\n i0.ɵɵtemplate(4, ToastItem_ng_container_4_Template, 1, 0, \"ng-container\", 4);\n i0.ɵɵtemplate(5, ToastItem_button_5_Template, 2, 0, \"button\", 5);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n i0.ɵɵclassMap(ctx.message.styleClass);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(10, _c2, \"p-toast-message-\" + ctx.message.severity))(\"@messageState\", i0.ɵɵpureFunction1(17, _c4, i0.ɵɵpureFunction4(12, _c3, ctx.showTransformOptions, ctx.hideTransformOptions, ctx.showTransitionOptions, ctx.hideTransitionOptions)));\n i0.ɵɵattribute(\"id\", ctx.message.id);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngClass\", ctx.message.contentStyleClass);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", !ctx.template);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx.template)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction1(19, _c5, ctx.message));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.message.closable !== false);\n }\n },\n directives: [i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, i2.Ripple],\n encapsulation: 2,\n data: {\n animation: [trigger('messageState', [state('visible', style({\n transform: 'translateY(0)',\n opacity: 1\n })), transition('void => *', [style({\n transform: '{{showTransformParams}}',\n opacity: 0\n }), animate('{{showTransitionParams}}')]), transition('* => void', [animate('{{hideTransitionParams}}', style({\n height: 0,\n opacity: 0,\n transform: '{{hideTransformParams}}'\n }))])])]\n },\n changeDetection: 0\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(ToastItem, [{\n type: Component,\n args: [{\n selector: 'p-toastItem',\n template: `\n