{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ViewEncapsulation, Input, Output, ChangeDetectionStrategy, ContentChildren, ViewChild, NgModule } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { ZIndexUtils } from 'primeng/utils';\nimport * as i5 from 'primeng/api';\nimport { PrimeTemplate } from 'primeng/api';\nimport * as i4 from '@angular/router';\nimport { RouterModule } from '@angular/router';\nimport * as i3 from 'primeng/ripple';\nimport { RippleModule } from 'primeng/ripple';\nimport * as i2 from 'primeng/tooltip';\nimport { TooltipModule } from 'primeng/tooltip';\n\nconst _c0 = function (a0) {\n return {\n \"p-hidden\": a0\n };\n};\n\nfunction MenubarSub_ng_template_1_li_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"li\", 4);\n }\n\n if (rf & 2) {\n const child_r1 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(1, _c0, child_r1.visible === false));\n }\n}\n\nfunction MenubarSub_ng_template_1_li_1_a_2_span_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 15);\n }\n\n if (rf & 2) {\n const child_r1 = i0.ɵɵnextContext(3).$implicit;\n i0.ɵɵproperty(\"ngClass\", child_r1.icon);\n }\n}\n\nfunction MenubarSub_ng_template_1_li_1_a_2_span_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 16);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const child_r1 = i0.ɵɵnextContext(3).$implicit;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate(child_r1.label);\n }\n}\n\nfunction MenubarSub_ng_template_1_li_1_a_2_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 17);\n }\n\n if (rf & 2) {\n const child_r1 = i0.ɵɵnextContext(3).$implicit;\n i0.ɵɵproperty(\"innerHTML\", child_r1.label, i0.ɵɵsanitizeHtml);\n }\n}\n\nconst _c1 = function (a0, a1) {\n return {\n \"pi-angle-down\": a0,\n \"pi-angle-right\": a1\n };\n};\n\nfunction MenubarSub_ng_template_1_li_1_a_2_span_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 18);\n }\n\n if (rf & 2) {\n const ctx_r13 = i0.ɵɵnextContext(4);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(1, _c1, ctx_r13.root, !ctx_r13.root));\n }\n}\n\nconst _c2 = function (a1) {\n return {\n \"p-menuitem-link\": true,\n \"p-disabled\": a1\n };\n};\n\nfunction MenubarSub_ng_template_1_li_1_a_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r19 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"a\", 10);\n i0.ɵɵlistener(\"click\", function MenubarSub_ng_template_1_li_1_a_2_Template_a_click_0_listener($event) {\n i0.ɵɵrestoreView(_r19);\n const child_r1 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r17 = i0.ɵɵnextContext();\n return ctx_r17.onItemClick($event, child_r1);\n })(\"mouseenter\", function MenubarSub_ng_template_1_li_1_a_2_Template_a_mouseenter_0_listener($event) {\n i0.ɵɵrestoreView(_r19);\n const child_r1 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r20 = i0.ɵɵnextContext();\n return ctx_r20.onItemMouseEnter($event, child_r1);\n });\n i0.ɵɵtemplate(1, MenubarSub_ng_template_1_li_1_a_2_span_1_Template, 1, 1, \"span\", 11);\n i0.ɵɵtemplate(2, MenubarSub_ng_template_1_li_1_a_2_span_2_Template, 2, 1, \"span\", 12);\n i0.ɵɵtemplate(3, MenubarSub_ng_template_1_li_1_a_2_ng_template_3_Template, 1, 1, \"ng-template\", null, 13, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵtemplate(5, MenubarSub_ng_template_1_li_1_a_2_span_5_Template, 1, 4, \"span\", 14);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const _r11 = i0.ɵɵreference(4);\n\n const child_r1 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r6 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(13, _c2, child_r1.disabled));\n i0.ɵɵattribute(\"href\", child_r1.url, i0.ɵɵsanitizeUrl)(\"data-automationid\", child_r1.automationId)(\"target\", child_r1.target)(\"title\", child_r1.title)(\"id\", child_r1.id)(\"tabindex\", child_r1.disabled ? null : \"0\")(\"aria-haspopup\", ctx_r6.item.items != null)(\"aria-expanded\", ctx_r6.item === ctx_r6.activeItem);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", child_r1.icon);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", child_r1.escape !== false)(\"ngIfElse\", _r11);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", child_r1.items);\n }\n}\n\nfunction MenubarSub_ng_template_1_li_1_a_3_span_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 15);\n }\n\n if (rf & 2) {\n const child_r1 = i0.ɵɵnextContext(3).$implicit;\n i0.ɵɵproperty(\"ngClass\", child_r1.icon);\n }\n}\n\nfunction MenubarSub_ng_template_1_li_1_a_3_span_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 16);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const child_r1 = i0.ɵɵnextContext(3).$implicit;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate(child_r1.label);\n }\n}\n\nfunction MenubarSub_ng_template_1_li_1_a_3_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 17);\n }\n\n if (rf & 2) {\n const child_r1 = i0.ɵɵnextContext(3).$implicit;\n i0.ɵɵproperty(\"innerHTML\", child_r1.label, i0.ɵɵsanitizeHtml);\n }\n}\n\nfunction MenubarSub_ng_template_1_li_1_a_3_span_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 18);\n }\n\n if (rf & 2) {\n const ctx_r27 = i0.ɵɵnextContext(4);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(1, _c1, ctx_r27.root, !ctx_r27.root));\n }\n}\n\nconst _c3 = function () {\n return {\n exact: false\n };\n};\n\nfunction MenubarSub_ng_template_1_li_1_a_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r33 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"a\", 19);\n i0.ɵɵlistener(\"click\", function MenubarSub_ng_template_1_li_1_a_3_Template_a_click_0_listener($event) {\n i0.ɵɵrestoreView(_r33);\n const child_r1 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r31 = i0.ɵɵnextContext();\n return ctx_r31.onItemClick($event, child_r1);\n })(\"mouseenter\", function MenubarSub_ng_template_1_li_1_a_3_Template_a_mouseenter_0_listener($event) {\n i0.ɵɵrestoreView(_r33);\n const child_r1 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r34 = i0.ɵɵnextContext();\n return ctx_r34.onItemMouseEnter($event, child_r1);\n });\n i0.ɵɵtemplate(1, MenubarSub_ng_template_1_li_1_a_3_span_1_Template, 1, 1, \"span\", 11);\n i0.ɵɵtemplate(2, MenubarSub_ng_template_1_li_1_a_3_span_2_Template, 2, 1, \"span\", 12);\n i0.ɵɵtemplate(3, MenubarSub_ng_template_1_li_1_a_3_ng_template_3_Template, 1, 1, \"ng-template\", null, 20, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵtemplate(5, MenubarSub_ng_template_1_li_1_a_3_span_5_Template, 1, 4, \"span\", 14);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const _r25 = i0.ɵɵreference(4);\n\n const child_r1 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵproperty(\"routerLink\", child_r1.routerLink)(\"queryParams\", child_r1.queryParams)(\"routerLinkActive\", \"p-menuitem-link-active\")(\"routerLinkActiveOptions\", child_r1.routerLinkActiveOptions || i0.ɵɵpureFunction0(20, _c3))(\"ngClass\", i0.ɵɵpureFunction1(21, _c2, child_r1.disabled))(\"fragment\", child_r1.fragment)(\"queryParamsHandling\", child_r1.queryParamsHandling)(\"preserveFragment\", child_r1.preserveFragment)(\"skipLocationChange\", child_r1.skipLocationChange)(\"replaceUrl\", child_r1.replaceUrl)(\"state\", child_r1.state);\n i0.ɵɵattribute(\"data-automationid\", child_r1.automationId)(\"target\", child_r1.target)(\"title\", child_r1.title)(\"id\", child_r1.id)(\"tabindex\", child_r1.disabled ? null : \"0\");\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", child_r1.icon);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", child_r1.escape !== false)(\"ngIfElse\", _r25);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", child_r1.items);\n }\n}\n\nfunction MenubarSub_ng_template_1_li_1_p_menubarSub_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r38 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"p-menubarSub\", 21);\n i0.ɵɵlistener(\"leafClick\", function MenubarSub_ng_template_1_li_1_p_menubarSub_4_Template_p_menubarSub_leafClick_0_listener() {\n i0.ɵɵrestoreView(_r38);\n const ctx_r37 = i0.ɵɵnextContext(3);\n return ctx_r37.onLeafClick();\n });\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const child_r1 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r8 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"parentActive\", child_r1 === ctx_r8.activeItem)(\"item\", child_r1)(\"mobileActive\", ctx_r8.mobileActive)(\"autoDisplay\", ctx_r8.autoDisplay);\n }\n}\n\nconst _c4 = function (a1, a2) {\n return {\n \"p-menuitem\": true,\n \"p-menuitem-active\": a1,\n \"p-hidden\": a2\n };\n};\n\nfunction MenubarSub_ng_template_1_li_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"li\", 5, 6);\n i0.ɵɵtemplate(2, MenubarSub_ng_template_1_li_1_a_2_Template, 6, 15, \"a\", 7);\n i0.ɵɵtemplate(3, MenubarSub_ng_template_1_li_1_a_3_Template, 6, 23, \"a\", 8);\n i0.ɵɵtemplate(4, MenubarSub_ng_template_1_li_1_p_menubarSub_4_Template, 1, 4, \"p-menubarSub\", 9);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const child_r1 = i0.ɵɵnextContext().$implicit;\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(child_r1.styleClass);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(8, _c4, child_r1 === ctx_r3.activeItem, child_r1.visible === false))(\"ngStyle\", child_r1.style)(\"tooltipOptions\", child_r1.tooltipOptions);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !child_r1.routerLink);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", child_r1.routerLink);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", child_r1.items);\n }\n}\n\nfunction MenubarSub_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, MenubarSub_ng_template_1_li_0_Template, 1, 3, \"li\", 2);\n i0.ɵɵtemplate(1, MenubarSub_ng_template_1_li_1_Template, 5, 11, \"li\", 3);\n }\n\n if (rf & 2) {\n const child_r1 = ctx.$implicit;\n i0.ɵɵproperty(\"ngIf\", child_r1.separator);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", !child_r1.separator);\n }\n}\n\nconst _c5 = function (a0, a1) {\n return {\n \"p-submenu-list\": a0,\n \"p-menubar-root-list\": a1\n };\n};\n\nconst _c6 = [\"menubutton\"];\nconst _c7 = [\"rootmenu\"];\n\nfunction Menubar_div_1_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nfunction Menubar_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 9);\n i0.ɵɵtemplate(1, Menubar_div_1_ng_container_1_Template, 1, 0, \"ng-container\", 10);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.startTemplate);\n }\n}\n\nfunction Menubar_div_7_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\n\nfunction Menubar_div_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 11);\n i0.ɵɵtemplate(1, Menubar_div_7_ng_container_1_Template, 1, 0, \"ng-container\", 10);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r3.endTemplate);\n }\n}\n\nfunction Menubar_ng_template_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 11);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n }\n}\n\nconst _c8 = function (a1) {\n return {\n \"p-menubar p-component\": true,\n \"p-menubar-mobile-active\": a1\n };\n};\n\nconst _c9 = [\"*\"];\n\nclass MenubarSub {\n constructor(el, renderer, cd) {\n this.el = el;\n this.renderer = renderer;\n this.cd = cd;\n this.autoZIndex = true;\n this.baseZIndex = 0;\n this.leafClick = new EventEmitter();\n this.menuHoverActive = false;\n }\n\n get parentActive() {\n return this._parentActive;\n }\n\n set parentActive(value) {\n if (!this.root) {\n this._parentActive = value;\n if (!value) this.activeItem = null;\n }\n }\n\n onItemClick(event, item) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n if (!item.url && !item.routerLink) {\n event.preventDefault();\n }\n\n if (item.command) {\n item.command({\n originalEvent: event,\n item: item\n });\n }\n\n if (item.items) {\n if (this.activeItem && item === this.activeItem) {\n this.activeItem = null;\n this.unbindDocumentClickListener();\n } else {\n this.activeItem = item;\n\n if (this.root) {\n this.bindDocumentClickListener();\n }\n }\n }\n\n if (!item.items) {\n this.onLeafClick();\n }\n }\n\n onItemMouseEnter(event, item) {\n if (item.disabled || this.mobileActive) {\n event.preventDefault();\n return;\n }\n\n if (this.root) {\n if (this.activeItem || this.autoDisplay) {\n this.activeItem = item;\n this.bindDocumentClickListener();\n }\n } else {\n this.activeItem = item;\n this.bindDocumentClickListener();\n }\n }\n\n onLeafClick() {\n this.activeItem = null;\n\n if (this.root) {\n this.unbindDocumentClickListener();\n }\n\n this.leafClick.emit();\n }\n\n bindDocumentClickListener() {\n if (!this.documentClickListener) {\n this.documentClickListener = event => {\n if (this.el && !this.el.nativeElement.contains(event.target)) {\n this.activeItem = null;\n this.cd.markForCheck();\n this.unbindDocumentClickListener();\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n\n unbindDocumentClickListener() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n\n ngOnDestroy() {\n this.unbindDocumentClickListener();\n }\n\n}\n\nMenubarSub.ɵfac = function MenubarSub_Factory(t) {\n return new (t || MenubarSub)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n};\n\nMenubarSub.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MenubarSub,\n selectors: [[\"p-menubarSub\"]],\n hostAttrs: [1, \"p-element\"],\n inputs: {\n item: \"item\",\n root: \"root\",\n autoZIndex: \"autoZIndex\",\n baseZIndex: \"baseZIndex\",\n mobileActive: \"mobileActive\",\n autoDisplay: \"autoDisplay\",\n parentActive: \"parentActive\"\n },\n outputs: {\n leafClick: \"leafClick\"\n },\n decls: 2,\n vars: 6,\n consts: [[3, \"ngClass\"], [\"ngFor\", \"\", 3, \"ngForOf\"], [\"class\", \"p-menu-separator\", \"role\", \"separator\", 3, \"ngClass\", 4, \"ngIf\"], [\"role\", \"none\", \"pTooltip\", \"\", 3, \"ngClass\", \"ngStyle\", \"class\", \"tooltipOptions\", 4, \"ngIf\"], [\"role\", \"separator\", 1, \"p-menu-separator\", 3, \"ngClass\"], [\"role\", \"none\", \"pTooltip\", \"\", 3, \"ngClass\", \"ngStyle\", \"tooltipOptions\"], [\"listItem\", \"\"], [\"role\", \"menuitem\", \"pRipple\", \"\", 3, \"ngClass\", \"click\", \"mouseenter\", 4, \"ngIf\"], [\"role\", \"menuitem\", \"pRipple\", \"\", 3, \"routerLink\", \"queryParams\", \"routerLinkActive\", \"routerLinkActiveOptions\", \"ngClass\", \"fragment\", \"queryParamsHandling\", \"preserveFragment\", \"skipLocationChange\", \"replaceUrl\", \"state\", \"click\", \"mouseenter\", 4, \"ngIf\"], [3, \"parentActive\", \"item\", \"mobileActive\", \"autoDisplay\", \"leafClick\", 4, \"ngIf\"], [\"role\", \"menuitem\", \"pRipple\", \"\", 3, \"ngClass\", \"click\", \"mouseenter\"], [\"class\", \"p-menuitem-icon\", 3, \"ngClass\", 4, \"ngIf\"], [\"class\", \"p-menuitem-text\", 4, \"ngIf\", \"ngIfElse\"], [\"htmlLabel\", \"\"], [\"class\", \"p-submenu-icon pi\", 3, \"ngClass\", 4, \"ngIf\"], [1, \"p-menuitem-icon\", 3, \"ngClass\"], [1, \"p-menuitem-text\"], [1, \"p-menuitem-text\", 3, \"innerHTML\"], [1, \"p-submenu-icon\", \"pi\", 3, \"ngClass\"], [\"role\", \"menuitem\", \"pRipple\", \"\", 3, \"routerLink\", \"queryParams\", \"routerLinkActive\", \"routerLinkActiveOptions\", \"ngClass\", \"fragment\", \"queryParamsHandling\", \"preserveFragment\", \"skipLocationChange\", \"replaceUrl\", \"state\", \"click\", \"mouseenter\"], [\"htmlRouteLabel\", \"\"], [3, \"parentActive\", \"item\", \"mobileActive\", \"autoDisplay\", \"leafClick\"]],\n template: function MenubarSub_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ul\", 0);\n i0.ɵɵtemplate(1, MenubarSub_ng_template_1_Template, 2, 2, \"ng-template\", 1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(3, _c5, !ctx.root, ctx.root));\n i0.ɵɵattribute(\"role\", ctx.root ? \"menubar\" : \"menu\");\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.root ? ctx.item : ctx.item.items);\n }\n },\n directives: [i1.NgClass, i1.NgForOf, i1.NgIf, i2.Tooltip, i1.NgStyle, i3.Ripple, i4.RouterLinkWithHref, i4.RouterLinkActive, MenubarSub],\n encapsulation: 2\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(MenubarSub, [{\n type: Component,\n args: [{\n selector: 'p-menubarSub',\n template: `\n