text: this.primevue=this.primevue||{},this.primevue.contextmenu=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o={emits:["leaf-click"],name:"sub-menu",props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1}},watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),methods:{onItemMouseEnter(e,t){t.disabled?e.preventDefault():this.activeItem=t},onItemClick(e,t,n){t.disabled?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onEnter(){this.position()},position(){const t=this.$refs.container.parentElement,n=e.DomHandler.getOffset(this.$refs.container.parentElement),i=e.DomHandler.getViewport(),o=this.$refs.container.offsetParent?this.$refs.container.offsetWidth:e.DomHandler.getHiddenElementOuterWidth(this.$refs.container),s=e.DomHandler.getOuterWidth(t.children[0]);this.$refs.container.style.top="0px",parseInt(n.left,10)+s+o>i.width-e.DomHandler.calculateScrollbarWidth()?this.$refs.container.style.left=-1*o+"px":this.$refs.container.style.left=s+"px"},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},getLinkClass:e=>["p-menuitem-link",{"p-disabled":e.disabled}],visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible},computed:{containerClass(){return{"p-submenu-list":!this.root}}},directives:{ripple:i(t).default}};const s={class:"p-menuitem-text"},l={class:"p-menuitem-text"},r={key:0,class:"p-submenu-icon pi pi-angle-right"};o.render=function(e,t,i,o,a,c){const u=n.resolveComponent("router-link"),d=n.resolveComponent("sub-menu"),m=n.resolveDirective("ripple");return n.openBlock(),n.createBlock(n.Transition,{name:"p-contextmenusub",onEnter:c.onEnter},{default:n.withCtx((()=>[i.root||i.parentActive?(n.openBlock(),n.createBlock("ul",{key:0,ref:"container",class:c.containerClass,role:"menu"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:e.label+t.toString()},[c.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,role:"none",class:c.getItemClass(e),style:e.style,onMouseenter:t=>c.onItemMouseEnter(t,e)},[e.to&&!e.disabled?(n.openBlock(),n.createBlock(u,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:n=>c.onItemClick(n,e,t),class:c.getLinkClass(e),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",s,n.toDisplayString(e.label),1)],10,["href","onClick"]),[[m]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:c.getLinkClass(e),target:e.target,onClick:t=>c.onItemClick(t,e),"aria-haspopup":null!=e.items,"aria-expanded":e===a.activeItem,role:"menuitem",tabindex:e.disabled?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",l,n.toDisplayString(e.label),1),e.items?(n.openBlock(),n.createBlock("span",r)):n.createCommentVNode("",!0)],10,["href","target","onClick","aria-haspopup","aria-expanded","tabindex"])),[[m]]),c.visible(e)&&e.items?(n.openBlock(),n.createBlock(d,{model:e.items,key:e.label+"_sub_",onLeafClick:c.onLeafClick,parentActive:e===a.activeItem},null,8,["model","onLeafClick","parentActive"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),c.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],2)):n.createCommentVNode("",!0)])),_:1},8,["onEnter"])};var a={inheritAttrs:!1,props:{model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1}},target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,pageX:null,pageY:null,container:null,data:()=>({visible:!1}),beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},mounted(){this.global&&this.bindDocumentContextMenuListener()},methods:{itemClick(e){const t=e.item;t.command&&(t.command(e),e.originalEvent.preventDefault()),this.hide()},toggle(e){this.visible?this.hide():this.show(e)},onLeafClick(){this.hide()},show(e){this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide(){this.visible=!1},onEnter(t){this.position(),this.bindOutsideClickListener(),this.bindResizeListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu)},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener()},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},position(){let t=this.pageX+1,n=this.pageY+1,i=this.container.offsetParent?this.container.offsetWidth:e.DomHandler.getHiddenElementOuterWidth(this.container),o=this.container.offsetParent?this.container.offsetHeight:e.DomHandler.getHiddenElementOuterHeight(this.container),s=e.DomHandler.getViewport();t+i-document.body.scrollLeft>s.width&&(t-=i),n+o-document.body.scrollTop>s.height&&(n-=o),t<document.body.scrollLeft&&(t=document.body.scrollLeft),n<document.body.scrollTop&&(n=document.body.scrollTop),this.container.style.left=t+"px",this.container.style.top=n+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!e.ctrlKey&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindDocumentContextMenuListener(){this.documentContextMenuListener||(this.documentContextMenuListener=e=>{this.show(e)},document.addEventListener("contextmenu",this.documentContextMenuListener))},unbindDocumentContextMenuListener(){this.documentContextMenuListener&&(document.removeEventListener("contextmenu",this.documentContextMenuListener),this.documentContextMenuListener=null)},containerRef(e){this.container=e}},components:{ContextMenuSub:o}};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-contextmenu {\n    position: absolute;\n}\n.p-contextmenu ul {\n    margin: 0;\n    padding: 0;\n    list-style: none;\n}\n.p-contextmenu .p-submenu-list {\n    position: absolute;\n    min-width: 100%;\n    z-index: 1;\n}\n.p-contextmenu .p-menuitem-link {\n    cursor: pointer;\n    display: -webkit-box;\n    display: -ms-flexbox;\n    display: flex;\n    -webkit-box-align: center;\n        -ms-flex-align: center;\n            align-items: center;\n    text-decoration: none;\n    overflow: hidden;\n    position: relative;\n}\n.p-contextmenu .p-menuitem-text {\n    line-height: 1;\n}\n.p-contextmenu .p-menuitem {\n    position: relative;\n}\n.p-contextmenu .p-menuitem-link .p-submenu-icon {\n    margin-left: auto;\n}\n.p-contextmenu-enter-from {\n    opacity: 0;\n}\n.p-contextmenu-enter-active {\n    -webkit-transition: opacity 250ms;\n    transition: opacity 250ms;\n}\n"),a.render=function(e,t,i,o,s,l){const r=n.resolveComponent("ContextMenuSub");return n.openBlock(),n.createBlock(n.Teleport,{to:i.appendTo},[n.createVNode(n.Transition,{name:"p-contextmenu",onEnter:l.onEnter,onLeave:l.onLeave,onAfterLeave:l.onAfterLeave},{default:n.withCtx((()=>[s.visible?(n.openBlock(),n.createBlock("div",n.mergeProps({key:0,ref:l.containerRef,class:"p-contextmenu p-component"},e.$attrs),[n.createVNode(r,{model:i.model,root:!0,onLeafClick:l.onLeafClick},null,8,["model","onLeafClick"])],16)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])],8,["to"])},a}(primevue.utils,primevue.ripple,Vue);
  