@citizenplane/pimp 9.5.2 → 9.5.3
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.
- package/dist/pimp.es.js +278 -275
- package/dist/pimp.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/CpItemActions.vue +5 -3
- package/src/stories/CpItemActions.stories.ts +4 -2
package/dist/pimp.umd.js
CHANGED
|
@@ -348,7 +348,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
`,J6={root:"p-ink"},X6=re.extend({name:"ripple-directive",style:q6,classes:J6}),Q6=U.extend({style:X6});function Vo(t){"@babel/helpers - typeof";return Vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vo(t)}function e9(t){return i9(t)||o9(t)||n9(t)||t9()}function t9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
351
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n9(t,e){if(t){if(typeof t=="string")return is(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?is(t,e):void 0}}function o9(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function i9(t){if(Array.isArray(t))return is(t)}function is(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function nc(t,e,n){return(e=r9(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r9(t){var e=s9(t,"string");return Vo(e)=="symbol"?e:e+""}function s9(t,e){if(Vo(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(Vo(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oc=Q6.extend("ripple",{watch:{"config.ripple":function(e){e?(this.createRipple(this.$host),this.bindEvents(this.$host),this.$host.setAttribute("data-pd-ripple",!0),this.$host.style.overflow="hidden",this.$host.style.position="relative"):(this.remove(this.$host),this.$host.removeAttribute("data-pd-ripple"))}},unmounted:function(e){this.remove(e)},timeout:void 0,methods:{bindEvents:function(e){e.addEventListener("mousedown",this.onMouseDown.bind(this))},unbindEvents:function(e){e.removeEventListener("mousedown",this.onMouseDown.bind(this))},createRipple:function(e){var n=this.getInk(e);n||(n=Nu("span",nc(nc({role:"presentation","aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx("root"),onAnimationEnd:this.onAnimationEnd.bind(this)},this.$attrSelector,""),"p-bind",this.ptm("root"))),e.appendChild(n),this.$el=n)},remove:function(e){var n=this.getInk(e);n&&(this.$host.style.overflow="",this.$host.style.position="",this.unbindEvents(e),n.removeEventListener("animationend",this.onAnimationEnd),n.remove())},onMouseDown:function(e){var n=this,o=e.currentTarget,r=this.getInk(o);if(!(!r||getComputedStyle(r,null).display==="none")){if(!this.isUnstyled()&&cr(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"),!rn(r)&&!sn(r)){var s=Math.max(ai(o),Ma(o));r.style.height=s+"px",r.style.width=s+"px"}var a=Ia(o),l=e.pageX-a.left+document.body.scrollTop-sn(r)/2,c=e.pageY-a.top+document.body.scrollLeft-rn(r)/2;r.style.top=c+"px",r.style.left=l+"px",!this.isUnstyled()&&$u(r,"p-ink-active"),r.setAttribute("data-p-ink-active","true"),this.timeout=setTimeout(function(){r&&(!n.isUnstyled()&&cr(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"))},401)}},onAnimationEnd:function(e){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&cr(e.currentTarget,"p-ink-active"),e.currentTarget.setAttribute("data-p-ink-active","false")},getInk:function(e){return e&&e.children?e9(e.children).find(function(n){return Bu(n,"data-pc-name")==="ripple"}):void 0}}}),a9={name:"BaseContextMenu",extends:Dn,props:{model:{type:Array,default:null},appendTo:{type:[String,Object],default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1},breakpoint:{type:String,default:"960px"},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:P6,provide:function(){return{$pcContextMenu:this,$parentInstance:this}}},ic={name:"ContextMenuSub",hostName:"ContextMenu",extends:Dn,emits:["item-click","item-mouseenter","item-mousemove"],props:{items:{type:Array,default:null},menuId:{type:String,default:null},focusedItemId:{type:String,default:null},root:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:0}},methods:{getItemId:function(e){return"".concat(this.menuId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,n,o){return e&&e.item?Ne(e.item[n],o):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getItemLabelId:function(e){return"".concat(this.menuId,"_").concat(e.key,"_label")},getPTOptions:function(e,n,o){return this.ptm(e,{context:{item:n.item,active:this.isItemActive(n),focused:this.isItemFocused(n),disabled:this.isItemDisabled(n),index:o}})},isItemActive:function(e){return this.activeItemPath.some(function(n){return n.key===e.key})},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return G(e.items)},onItemClick:function(e,n){this.getItemProp(n,"command",{originalEvent:e,item:n.item}),this.$emit("item-click",{originalEvent:e,processedItem:n,isFocus:!0})},onItemMouseEnter:function(e,n){this.$emit("item-mouseenter",{originalEvent:e,processedItem:n})},onItemMouseMove:function(e,n){this.$emit("item-mousemove",{originalEvent:e,processedItem:n,isFocus:!0})},getAriaSetSize:function(){var e=this;return this.items.filter(function(n){return e.isItemVisible(n)&&!e.getItemProp(n,"separator")}).length},getAriaPosInset:function(e){var n=this;return e-this.items.slice(0,e).filter(function(o){return n.isItemVisible(o)&&n.getItemProp(o,"separator")}).length+1},onEnter:function(){Pu(this.$refs.container,this.level)},getMenuItemProps:function(e,n){return{action:i.mergeProps({class:this.cx("itemLink"),tabindex:-1},this.getPTOptions("itemLink",e,n)),icon:i.mergeProps({class:[this.cx("itemIcon"),this.getItemProp(e,"icon")]},this.getPTOptions("itemIcon",e,n)),label:i.mergeProps({class:this.cx("itemLabel")},this.getPTOptions("itemLabel",e,n)),submenuicon:i.mergeProps({class:this.cx("submenuIcon")},this.getPTOptions("submenuicon",e,n))}}},components:{AngleRightIcon:X1},directives:{ripple:oc}},l9=["tabindex"],c9=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset","data-p-active","data-p-focused","data-p-disabled"],d9=["onClick","onMouseenter","onMousemove"],u9=["href","target"],p9=["id"],h9=["id"];function f9(t,e,n,o,r,s){var a=i.resolveComponent("AngleRightIcon"),l=i.resolveComponent("ContextMenuSub",!0),c=i.resolveDirective("ripple");return i.openBlock(),i.createBlock(i.Transition,i.mergeProps({name:"p-contextmenusub",onEnter:s.onEnter},t.ptm("menu.transition")),{default:i.withCtx(function(){return[n.root||n.visible?(i.openBlock(),i.createElementBlock("ul",i.mergeProps({key:0,ref:"container",tabindex:n.tabindex},t.ptm("rootList")),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.items,function(d,u){return i.openBlock(),i.createElementBlock(i.Fragment,{key:s.getItemKey(d)},[s.isItemVisible(d)&&!s.getItemProp(d,"separator")?(i.openBlock(),i.createElementBlock("li",i.mergeProps({key:0,id:s.getItemId(d),style:s.getItemProp(d,"style"),class:[t.cx("item",{processedItem:d}),s.getItemProp(d,"class")],role:"menuitem","aria-label":s.getItemLabel(d),"aria-disabled":s.isItemDisabled(d)||void 0,"aria-expanded":s.isItemGroup(d)?s.isItemActive(d):void 0,"aria-haspopup":s.isItemGroup(d)&&!s.getItemProp(d,"to")?"menu":void 0,"aria-level":n.level+1,"aria-setsize":s.getAriaSetSize(),"aria-posinset":s.getAriaPosInset(u)},{ref_for:!0},s.getPTOptions("item",d,u),{"data-p-active":s.isItemActive(d),"data-p-focused":s.isItemFocused(d),"data-p-disabled":s.isItemDisabled(d)}),[i.createElementVNode("div",i.mergeProps({class:t.cx("itemContent"),onClick:function(h){return s.onItemClick(h,d)},onMouseenter:function(h){return s.onItemMouseEnter(h,d)},onMousemove:function(h){return s.onItemMouseMove(h,d)}},{ref_for:!0},s.getPTOptions("itemContent",d,u)),[n.templates.item?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.item),{key:1,item:d.item,hasSubmenu:s.getItemProp(d,"items"),label:s.getItemLabel(d),props:s.getMenuItemProps(d,u)},null,8,["item","hasSubmenu","label","props"])):i.withDirectives((i.openBlock(),i.createElementBlock("a",i.mergeProps({key:0,href:s.getItemProp(d,"url"),class:t.cx("itemLink"),target:s.getItemProp(d,"target"),tabindex:"-1"},{ref_for:!0},s.getPTOptions("itemLink",d,u)),[n.templates.itemicon?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.itemicon),{key:0,item:d.item,class:i.normalizeClass(t.cx("itemIcon"))},null,8,["item","class"])):s.getItemProp(d,"icon")?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:1,class:[t.cx("itemIcon"),s.getItemProp(d,"icon")]},{ref_for:!0},s.getPTOptions("itemIcon",d,u)),null,16)):i.createCommentVNode("",!0),i.createElementVNode("span",i.mergeProps({id:s.getItemLabelId(d),class:t.cx("itemLabel")},{ref_for:!0},s.getPTOptions("itemLabel",d,u)),i.toDisplayString(s.getItemLabel(d)),17,p9),s.getItemProp(d,"items")?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[n.templates.submenuicon?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.submenuicon),{key:0,active:s.isItemActive(d),class:i.normalizeClass(t.cx("submenuIcon"))},null,8,["active","class"])):(i.openBlock(),i.createBlock(a,i.mergeProps({key:1,class:t.cx("submenuIcon")},{ref_for:!0},s.getPTOptions("submenuicon",d,u)),null,16,["class"]))],64)):i.createCommentVNode("",!0)],16,u9)),[[c]])],16,d9),s.isItemVisible(d)&&s.isItemGroup(d)?(i.openBlock(),i.createBlock(l,i.mergeProps({key:0,id:s.getItemId(d)+"_list",role:"menu",class:t.cx("submenu"),menuId:n.menuId,focusedItemId:n.focusedItemId,items:d.items,templates:n.templates,activeItemPath:n.activeItemPath,level:n.level+1,visible:s.isItemActive(d)&&s.isItemGroup(d),pt:t.pt,unstyled:t.unstyled,onItemClick:e[0]||(e[0]=function(p){return t.$emit("item-click",p)}),onItemMouseenter:e[1]||(e[1]=function(p){return t.$emit("item-mouseenter",p)}),onItemMousemove:e[2]||(e[2]=function(p){return t.$emit("item-mousemove",p)}),"aria-labelledby":s.getItemLabelId(d)},{ref_for:!0},t.ptm("submenu")),null,16,["id","class","menuId","focusedItemId","items","templates","activeItemPath","level","visible","pt","unstyled","aria-labelledby"])):i.createCommentVNode("",!0)],16,c9)):i.createCommentVNode("",!0),s.isItemVisible(d)&&s.getItemProp(d,"separator")?(i.openBlock(),i.createElementBlock("li",i.mergeProps({key:1,id:s.getItemId(d),style:s.getItemProp(d,"style"),class:[t.cx("separator"),s.getItemProp(d,"class")],role:"separator"},{ref_for:!0},t.ptm("separator")),null,16,h9)):i.createCommentVNode("",!0)],64)}),128))],16,l9)):i.createCommentVNode("",!0)]}),_:1},16,["onEnter"])}ic.render=f9;var rc={name:"ContextMenu",extends:a9,inheritAttrs:!1,emits:["focus","blur","show","hide","before-show","before-hide"],target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,matchMediaListener:null,pageX:null,pageY:null,container:null,list:null,data:function(){return{focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:""},activeItemPath:[],visible:!1,submenuVisible:!1,query:null,queryMatches:!1}},watch:{activeItemPath:function(e){G(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):this.visible||(this.unbindOutsideClickListener(),this.unbindResizeListener())}},mounted:function(){this.bindMatchMediaListener(),this.global&&this.bindDocumentContextMenuListener()},beforeUnmount:function(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.unbindMatchMediaListener(),this.container&&this.autoZIndex&&vn.clear(this.container),this.target=null,this.container=null},methods:{getItemProp:function(e,n){return e?Ne(e[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemGroup:function(e){return G(this.getItemProp(e,"items"))},isItemSeparator:function(e){return this.getItemProp(e,"separator")},getProccessedItemLabel:function(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:function(e){return e&&G(e.items)},toggle:function(e){this.visible?this.hide():this.show(e)},show:function(e){this.$emit("before-show"),this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""},st(this.list),this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide:function(){this.$emit("before-hide"),this.visible=!1,this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""}},onFocus:function(e){this.focused=!0,this.focusedItemInfo=this.focusedItemInfo.index!==-1?this.focusedItemInfo:{index:-1,level:0,parentKey:""},this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){var n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!n&&ku(e.key)&&this.searchItems(e,e.key);break}},onItemChange:function(e,n){var o=e.processedItem,r=e.isFocus;if(!At(o)){var s=o.index,a=o.key,l=o.level,c=o.parentKey,d=o.items,u=G(d),p=this.activeItemPath.filter(function(h){return h.parentKey!==c&&h.parentKey!==a});u&&(p.push(o),this.submenuVisible=!0),this.focusedItemInfo={index:s,level:l,parentKey:c},r&&st(this.list),!(n==="hover"&&this.queryMatches)&&(this.activeItemPath=p)}},onItemClick:function(e){var n=e.processedItem,o=this.isProccessedItemGroup(n),r=this.isSelected(n);if(r){var s=n.index,a=n.key,l=n.level,c=n.parentKey;this.activeItemPath=this.activeItemPath.filter(function(d){return a!==d.key&&a.startsWith(d.key)}),this.focusedItemInfo={index:s,level:l,parentKey:c},st(this.list)}else o?this.onItemChange(e):this.hide()},onItemMouseEnter:function(e){this.onItemChange(e,"hover")},onItemMouseMove:function(e){this.focused&&this.changeFocusedItemIndex(e,e.processedItem.index)},onArrowDownKey:function(e){var n=this.focusedItemInfo.index!==-1?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,n),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(this.focusedItemInfo.index!==-1){var n=this.visibleItems[this.focusedItemInfo.index],o=this.isProccessedItemGroup(n);!o&&this.onItemChange({originalEvent:e,processedItem:n})}this.popup&&this.hide(),e.preventDefault()}else{var r=this.focusedItemInfo.index!==-1?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,r),e.preventDefault()}},onArrowLeftKey:function(e){var n=this,o=this.visibleItems[this.focusedItemInfo.index],r=this.activeItemPath.find(function(a){return a.key===o.parentKey}),s=At(o.parent);s||(this.focusedItemInfo={index:-1,parentKey:r?r.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),this.activeItemPath=this.activeItemPath.filter(function(a){return a.parentKey!==n.focusedItemInfo.parentKey}),e.preventDefault()},onArrowRightKey:function(e){var n=this.visibleItems[this.focusedItemInfo.index],o=this.isProccessedItemGroup(n);o&&(this.onItemChange({originalEvent:e,processedItem:n}),this.focusedItemInfo={index:-1,parentKey:n.key},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()},onHomeKey:function(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey:function(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey:function(e){if(this.focusedItemInfo.index!==-1){var n=on(this.list,'li[id="'.concat("".concat(this.focusedItemIdx),'"]')),o=n&&on(n,'[data-pc-section="itemlink"]');o?o.click():n&&n.click();var r=this.visibleItems[this.focusedItemInfo.index],s=this.isProccessedItemGroup(r);!s&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.hide(),!this.popup&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex()),e.preventDefault()},onTabKey:function(e){if(this.focusedItemInfo.index!==-1){var n=this.visibleItems[this.focusedItemInfo.index],o=this.isProccessedItemGroup(n);!o&&this.onItemChange({originalEvent:e,processedItem:n})}this.hide()},onEnter:function(e){pr(e,{position:"absolute"}),this.position(),this.autoZIndex&&vn.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu)},onAfterEnter:function(){this.bindOutsideClickListener(),this.bindResizeListener(),this.$emit("show"),st(this.list)},onLeave:function(){this.$emit("hide"),this.container=null},onAfterLeave:function(e){this.autoZIndex&&vn.clear(e),this.unbindOutsideClickListener(),this.unbindResizeListener()},position:function(){var e=this.pageX+1,n=this.pageY+1,o=this.container.offsetParent?this.container.offsetWidth:Sa(this.container),r=this.container.offsetParent?this.container.offsetHeight:ka(this.container),s=si(),a=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop||0,l=window.scrollX||document.documentElement.scrollLeft||document.body.scrollLeft||0;e+o-l>s.width&&(e-=o),n+r-a>s.height&&(n-=r),e<l&&(e=l),n<a&&(n=a),this.container.style.left=e+"px",this.container.style.top=n+"px"},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){var o=e.container&&!e.container.contains(n.target),r=e.visible?!(e.target&&(e.target===n.target||e.target.contains(n.target))):!0;o&&r&&e.hide()},document.addEventListener("click",this.outsideClickListener,!0))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener,!0),this.outsideClickListener=null)},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!La()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindDocumentContextMenuListener:function(){var e=this;this.documentContextMenuListener||(this.documentContextMenuListener=function(n){n.button===2&&e.show(n)},document.addEventListener("contextmenu",this.documentContextMenuListener))},unbindDocumentContextMenuListener:function(){this.documentContextMenuListener&&(document.removeEventListener("contextmenu",this.documentContextMenuListener),this.documentContextMenuListener=null)},bindMatchMediaListener:function(){var e=this;if(!this.matchMediaListener){var n=matchMedia("(max-width: ".concat(this.breakpoint,")"));this.query=n,this.queryMatches=n.matches,this.matchMediaListener=function(){e.queryMatches=n.matches},this.query.addEventListener("change",this.matchMediaListener)}},unbindMatchMediaListener:function(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)},isItemMatched:function(e){var n;return this.isValidItem(e)&&((n=this.getProccessedItemLabel(e))===null||n===void 0?void 0:n.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase()))},isValidItem:function(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)&&this.isItemVisible(e.item)},isValidSelectedItem:function(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected:function(e){return this.activeItemPath.some(function(n){return n.key===e.key})},findFirstItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(n){return e.isValidItem(n)})},findLastItemIndex:function(){var e=this;return co(this.visibleItems,function(n){return e.isValidItem(n)})},findNextItemIndex:function(e){var n=this,o=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(function(r){return n.isValidItem(r)}):-1;return o>-1?o+e+1:e},findPrevItemIndex:function(e){var n=this,o=e>0?co(this.visibleItems.slice(0,e),function(r){return n.isValidItem(r)}):-1;return o>-1?o:e},findSelectedItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(n){return e.isValidSelectedItem(n)})},findFirstFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},searchItems:function(e,n){var o=this;this.searchValue=(this.searchValue||"")+n;var r=-1,s=!1;return this.focusedItemInfo.index!==-1?(r=this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function(a){return o.isItemMatched(a)}),r=r===-1?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex(function(a){return o.isItemMatched(a)}):r+this.focusedItemInfo.index):r=this.visibleItems.findIndex(function(a){return o.isItemMatched(a)}),r!==-1&&(s=!0),r===-1&&this.focusedItemInfo.index===-1&&(r=this.findFirstFocusedItemIndex()),r!==-1&&this.changeFocusedItemIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){o.searchValue="",o.searchTimeout=null},500),s},changeFocusedItemIndex:function(e,n){this.focusedItemInfo.index!==n&&(this.focusedItemInfo.index=n,this.scrollInView())},scrollInView:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,n=e!==-1?"".concat(this.$id,"_").concat(e):this.focusedItemIdx,o=on(this.list,'li[id="'.concat(n,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems:function(e){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",a=[];return e&&e.forEach(function(l,c){var d=(s!==""?s+"_":"")+c,u={item:l,index:c,level:o,key:d,parent:r,parentKey:s};u.items=n.createProcessedItems(l.items,o+1,u,d),a.push(u)}),a},containerRef:function(e){this.container=e},listRef:function(e){this.list=e?e.$el:void 0}},computed:{processedItems:function(){return this.createProcessedItems(this.model||[])},visibleItems:function(){var e=this,n=this.activeItemPath.find(function(o){return o.key===e.focusedItemInfo.parentKey});return n?n.items:this.processedItems},focusedItemIdx:function(){return this.focusedItemInfo.index!==-1?"".concat(this.$id).concat(G(this.focusedItemInfo.parentKey)?"_"+this.focusedItemInfo.parentKey:"","_").concat(this.focusedItemInfo.index):null}},components:{ContextMenuSub:ic,Portal:ns}};function m9(t,e,n,o,r,s){var a=i.resolveComponent("ContextMenuSub"),l=i.resolveComponent("Portal");return i.openBlock(),i.createBlock(l,{appendTo:t.appendTo},{default:i.withCtx(function(){return[i.createVNode(i.Transition,i.mergeProps({name:"p-contextmenu",onEnter:s.onEnter,onAfterEnter:s.onAfterEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},t.ptm("transition")),{default:i.withCtx(function(){return[r.visible?(i.openBlock(),i.createElementBlock("div",i.mergeProps({key:0,ref:s.containerRef,class:t.cx("root")},t.ptmi("root")),[i.createVNode(a,{ref:s.listRef,id:t.$id+"_list",class:i.normalizeClass(t.cx("rootList")),role:"menubar",root:!0,tabindex:t.tabindex,"aria-orientation":"vertical","aria-activedescendant":r.focused?s.focusedItemIdx:void 0,menuId:t.$id,focusedItemId:r.focused?s.focusedItemIdx:void 0,items:s.processedItems,templates:t.$slots,activeItemPath:r.activeItemPath,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,level:0,visible:r.submenuVisible,pt:t.pt,unstyled:t.unstyled,onFocus:s.onFocus,onBlur:s.onBlur,onKeydown:s.onKeyDown,onItemClick:s.onItemClick,onItemMouseenter:s.onItemMouseEnter,onItemMousemove:s.onItemMouseMove},null,8,["id","class","tabindex","aria-activedescendant","menuId","focusedItemId","items","templates","activeItemPath","aria-labelledby","aria-label","visible","pt","unstyled","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter","onItemMousemove"])],16)):i.createCommentVNode("",!0)]}),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]}),_:1},8,["appendTo"])}rc.render=m9;const y9={class:"cpMenuItem"},g9=["disabled"],C9={key:0,class:"cpMenuItem__loaderWrapper"},v9={key:0,class:"cpMenuItem__label"},rs=i.defineComponent({__name:"CpMenuItem",props:{hideLabel:{type:Boolean,default:!1},isAsync:{type:Boolean,default:!1},isCritical:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},reverseLabel:{type:Boolean,default:!1},tooltip:{default:""},label:{type:[String,Function],default:""},icon:{default:""},command:{type:Function,default:void 0},url:{},items:{},visible:{type:[Boolean,Function]},target:{},separator:{type:Boolean},style:{}},emits:["onItemClick","onAsyncCommandComplete"],setup(t,{emit:e}){const n=t,o=e,r=i.computed(()=>({"cpMenuItem__button--reverseLabel":n.reverseLabel,"cpMenuItem__button--isCritical":n.isCritical})),s=i.computed(()=>n.isLoading||n.isDisabled),a=i.computed(()=>!n.hideLabel&&n.label),l=async c=>{n.command&&(n.isAsync&&(c.stopPropagation(),await n.command({originalEvent:c,item:n}),o("onAsyncCommandComplete")),o("onItemClick"))};return(c,d)=>{const u=i.resolveComponent("cp-loader"),p=i.resolveComponent("cp-icon"),h=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("div",y9,[i.createElementVNode("button",{type:"button",class:i.normalizeClass(["cpMenuItem__button",r.value]),disabled:s.value,onClick:l},[i.createVNode(i.Transition,{name:"fade",duration:100,mode:"out-in"},{default:i.withCtx(()=>[c.isLoading?(i.openBlock(),i.createElementBlock("span",C9,[i.createVNode(u,{color:"#B2B2BD",class:"cpMenuItem__loader"})])):i.renderSlot(c.$slots,"icon",{key:1},()=>[i.createVNode(p,{type:c.icon,class:"cpMenuItem__icon"},null,8,["type"])])]),_:3}),a.value?i.withDirectives((i.openBlock(),i.createElementBlock("span",v9,[i.createTextVNode(i.toDisplayString(c.label),1)])),[[h,c.tooltip]]):i.createCommentVNode("",!0)],10,g9)])}}}),ss=i.defineComponent({__name:"CpContextualMenu",props:{items:{}},setup(t,{expose:e}){const n=i.ref(),o={root:{class:"cpContextualMenu"},item:{class:"cpContextualMenu__item"},transition:{name:"scale-elastic",duration:100}},r=a=>{const{x:l,y:c}=a;if(l!==0&&c!==0)return n.value?.show(a);const d=a.currentTarget.getBoundingClientRect(),u=new MouseEvent("click",{...a,clientX:d.left+d.width,clientY:d.bottom});n.value?.show(u)},s=()=>n.value?.hide();return e({show:r,hide:s}),(a,l)=>(i.openBlock(),i.createBlock(i.unref(rc),{ref_key:"menu",ref:n,model:a.items,pt:o},{item:i.withCtx(({item:c,props:d})=>[i.createVNode(rs,i.mergeProps({...c,...d.action},{onOnAsyncCommandComplete:s}),null,16)]),_:1},8,["model"]))}}),b9={class:"cpDate__inputs"},w9=["placeholder","required","disabled","autocomplete"],x9=["id","required","disabled","autocomplete"],_9={value:""},k9=["value"],S9=["placeholder","disabled","required","autocomplete"],I9={key:0,class:"cpDate__errorMessage"},M9=i.defineComponent({__name:"CpDate",props:{autocompleteBirthday:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},displayErrorMessage:{type:Boolean,default:!0},errorMessage:{default:""},inputsOptions:{default:()=>({})},isInvalid:{type:Boolean,default:!1},label:{default:""},locale:{default:()=>navigator.language},maxDate:{default:()=>k.now().toISO()},minDate:{default:()=>k.now().minus({year:u5}).toISO()},modelValue:{default:""},required:{type:Boolean,default:!1}},emits:["update:modelValue","onValidation"],setup(t,{emit:e}){const n=t,o=e,r=j=>k.fromISO(n.modelValue).invalid?"":k.fromISO(n.modelValue)[j],s=i.ref(r("day")),a=i.ref(r("month")),l=i.ref(r("year")),c=i.computed(()=>ht(n.label)),d=i.computed(()=>et()),u=i.computed(()=>m.value.year),p=i.computed(()=>g.value.year),h=i.computed(()=>k.fromObject({year:l.value&&l.value.length<=4?Number(l.value):k.now().year,month:a.value?Number(a.value):k.now().month,day:1}).daysInMonth),f=i.computed(()=>wt.months("long",{locale:n.locale}).map((R,z)=>({label:ht(R),value:z+1}))),y=i.computed(()=>k.fromObject({year:Number(l.value),month:Number(a.value),day:Number(s.value)}).toISODate()),m=i.computed(()=>k.fromISO(n.minDate)),g=i.computed(()=>k.fromISO(n.maxDate)),C=i.computed(()=>y.value>=m.value.toISODate()),v=i.computed(()=>y.value<=g.value.toISODate()),w=i.computed(()=>s.value===""&&a.value===""&&l.value===""),b=i.computed(()=>w.value&&!n.required?!0:!n.isInvalid&&x.value&&$.value&&O.value&&v.value&&C.value),x=i.computed(()=>Number(s.value)>=1&&Number(s.value)<=h.value),$=i.computed(()=>!!a.value),O=i.computed(()=>Number(l.value)>=u.value&&Number(l.value)<=p.value),E=i.computed(()=>b.value||!n.displayErrorMessage?"":n.errorMessage?n.errorMessage:$.value?x.value?O.value?v.value?C.value?"":`The date can't be before ${m.value.toFormat("DDD")}.`:`The date can't be after ${g.value.toFormat("DDD")}.`:`Year must be in the range ${u.value} – ${p.value}.`:`Day must be in the range 1 – ${h.value}.`:"Month is required."),P=i.computed(()=>({"cpDate--isInvalid":!b.value,"cpDate--isDisabled":n.disabled})),_=i.computed(()=>({"cpDate__month--isEmpty":!a.value})),V=i.computed(()=>n.autocompleteBirthday?{day:"bday-day",month:"bday-month",year:"bday-year"}:"off"),T=i.computed(()=>n.inputsOptions?.dayInputPlaceholder||"DD"),M=i.computed(()=>n.inputsOptions?.monthInputPlaceholder||"Months"),N=i.computed(()=>n.inputsOptions?.yearInputPlaceholder||"YYYY"),B=()=>{o("update:modelValue",y.value),o("onValidation",b.value)};return i.watch(s,B),i.watch(a,B),i.watch(l,B),(j,R)=>{const z=i.resolveComponent("transition-expand"),S=i.resolveDirective("bind-once"),Z=i.resolveDirective("maska");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["cpDate",P.value])},[j.label?i.withDirectives((i.openBlock(),i.createBlock(Mo,{key:0,"is-invalid":!b.value,required:j.required},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.value),1)]),_:1},8,["is-invalid","required"])),[[S,{for:d.value}]]):i.createCommentVNode("",!0),i.createElementVNode("div",b9,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":R[0]||(R[0]=F=>s.value=F),"data-maska":"##",placeholder:T.value,class:"cpDate__day",inputmode:"numeric",maxlength:"2",required:j.required,disabled:j.disabled,autocomplete:V.value.day},null,8,w9),[[i.vModelText,s.value],[Z]]),R[3]||(R[3]=i.createElementVNode("div",{class:"cpDate__divider"},null,-1)),i.createElementVNode("div",{class:i.normalizeClass(["cpDate__month",_.value])},[i.withDirectives(i.createElementVNode("select",{id:d.value,"onUpdate:modelValue":R[1]||(R[1]=F=>a.value=F),required:j.required,disabled:j.disabled,autocomplete:V.value.month},[i.createElementVNode("option",_9,i.toDisplayString(M.value),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.value,(F,ne)=>(i.openBlock(),i.createElementBlock("option",{key:ne,value:F.value},i.toDisplayString(F.label),9,k9))),128))],8,x9),[[i.vModelSelect,a.value]])],2),R[4]||(R[4]=i.createElementVNode("div",{class:"cpDate__divider"},null,-1)),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":R[2]||(R[2]=F=>l.value=F),"data-maska":"####",placeholder:N.value,class:"cpDate__year",inputmode:"numeric",maxlength:"4",disabled:j.disabled,required:j.required,autocomplete:V.value.year},null,8,S9),[[i.vModelText,l.value],[Z]])]),i.createVNode(z,null,{default:i.withCtx(()=>[E.value?(i.openBlock(),i.createElementBlock("div",I9,i.toDisplayString(E.value),1)):i.createCommentVNode("",!0)]),_:1})],2)}}}),$9={class:"cpDatepicker"},O9="EEE DD",T9=i.defineComponent({__name:"CpDatepicker",props:{allowPastDates:{type:Boolean,default:!1},closeAfterSelect:{type:Boolean,default:!0},errorMessage:{default:""},initDateOne:{default:""},initDateTwo:{default:""},inputValue:{default:""},isError:{type:Boolean,default:!1},isInline:{type:Boolean,default:!1},label:{default:""},locale:{default:()=>navigator.language},maxDate:{default:""},minDate:{default:()=>k.local().toISODate()},mode:{default:"single"},placeholder:{default:"Select a date"},singleMonth:{type:Boolean,default:!1},triggerElementId:{default:""}},emits:["dates"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.initDateOne||""),s=i.ref(n.mode==="range"?n.initDateTwo:""),a=i.ref(!1),l=i.ref(n.triggerElementId||et()),c=i.computed(()=>n.inputValue?n.inputValue:j1({dateOne:r.value,dateTwo:s.value,format:O9,locale:n.locale})),d=i.computed(()=>n.singleMonth?1:2),u=i.computed(()=>n.allowPastDates?"":n.minDate),p=m=>f("dateOne",m),h=m=>f("dateTwo",m),f=(m,g)=>{m==="dateOne"?r.value=g:s.value=g,o("dates",[r.value,...s.value?[s.value]:[]])},y=(m,g,C)=>{g!==C&&(m==="dateOne"?r.value=g:s.value=g)};return i.watch(()=>n.initDateOne,(m,g)=>{y("dateOne",m,g)}),i.watch(()=>n.initDateTwo,(m,g)=>{y("dateTwo",m,g)}),(m,g)=>(i.openBlock(),i.createElementBlock("div",$9,[i.withDirectives(i.createVNode(es,{id:l.value,"model-value":c.value,type:"text",placeholder:m.placeholder,"is-invalid":m.isError,"error-message":m.errorMessage,disabled:a.value,label:m.label,class:"cpDatepicker__input"},null,8,["id","model-value","placeholder","is-invalid","error-message","disabled","label"]),[[i.vShow,!m.isInline]]),i.createVNode(Xr,{"date-one":r.value,"date-two":s.value,"trigger-element-id":l.value,"close-after-select":m.closeAfterSelect,mode:m.mode,inline:m.isInline,"months-to-show":d.value,"min-date":u.value,"max-date":m.maxDate,locale:m.locale,class:i.normalizeClass(["cpDatepicker__datepicker",{"cpDatepicker__datepicker--isInline":m.isInline}]),onDateOneSelected:p,onDateTwoSelected:h,onOpened:g[0]||(g[0]=()=>a.value=!0),onClosed:g[1]||(g[1]=()=>a.value=!1)},null,8,["date-one","date-two","trigger-element-id","close-after-select","mode","inline","months-to-show","min-date","max-date","locale","class"])]))}}),sc=(t=document)=>{if(t===null)return[];const e=Array.from(t.querySelectorAll('a, button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'));return e.length?e.filter(n=>{const o=n.hasAttribute("disabled"),r=n.offsetHeight!==0&&n.offsetWidth!==0,a=n instanceof HTMLInputElement&&n.type==="radio"&&n.checked===!1;return!o&&r&&!a}):t instanceof HTMLElement?[t]:[]},L9=(t,e)=>{if(!e)return;const n=sc(e),o=n[0],r=n[n.length-1],s=!t.shiftKey&&document.activeElement===r,a=t.shiftKey&&document.activeElement===o;s?(t.preventDefault(),o?.focus()):a&&(t.preventDefault(),r?.focus())},E9={class:"cpDialog"},V9=["onKeydown"],N9={key:0,class:"cpDialog__header"},B9={class:"cpDialog__content"},D9={key:1,class:"cpDialog__footer"},P9=i.defineComponent({__name:"CpDialog",props:{maxWidth:{default:600}},emits:["close"],setup(t,{emit:e}){const n=t,o=e,r=i.useSlots(),s=i.ref(null),a=i.ref(null),l=i.computed(()=>({maxWidth:`${n.maxWidth}px`})),c=i.computed(()=>!!r.header),d=i.computed(()=>!!r.footer),u=()=>o("close"),p=m=>L9(m,a.value),h=()=>s.value?.show(),f=()=>s.value?.close(),y=()=>{const m=sc(a.value);m.length&&m[0].focus()};return i.onMounted(()=>{h(),i.nextTick(()=>y())}),i.onBeforeUnmount(()=>{f()}),(m,g)=>{const C=i.resolveComponent("cp-icon");return i.openBlock(),i.createElementBlock("div",E9,[i.createElementVNode("dialog",{ref_key:"dialogElement",ref:s,class:"cpDialog__dialog",onKeydown:i.withKeys(i.withModifiers(u,["stop","prevent"]),["esc"])},[g[0]||(g[0]=i.createElementVNode("div",{class:"cpDialog__overlay"},null,-1)),i.createElementVNode("main",{ref_key:"dialogContainer",ref:a,class:"cpDialog__container",style:i.normalizeStyle(l.value),onKeydown:i.withKeys(p,["tab"])},[c.value?(i.openBlock(),i.createElementBlock("header",N9,[i.renderSlot(m.$slots,"header"),i.createElementVNode("button",{type:"button",class:"cpDialog__close",onClick:u},[i.createVNode(C,{type:"x"})])])):i.createCommentVNode("",!0),i.renderSlot(m.$slots,"default",{},()=>[i.createElementVNode("section",B9,[i.renderSlot(m.$slots,"content")])]),d.value?(i.openBlock(),i.createElementBlock("footer",D9,[i.renderSlot(m.$slots,"footer")])):i.createCommentVNode("",!0)],36)],40,V9)])}}}),j9={},A9={class:"cpDialogWrapper"};function R9(t,e){return i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createElementVNode("div",A9,[i.createVNode(i.TransitionGroup,{name:"dialog"},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default")]),_:3})])])}const z9=L(j9,[["render",R9]]),ac=i.defineComponent({inheritAttrs:!1,__name:"CpHeading",props:{headingLevel:{default:Ur.H1},size:{default:500}},setup(t){return(e,n)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.$props.headingLevel),i.mergeProps(e.$attrs,{class:[`cpHeading--${e.size}`,"cpHeading"]}),{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),H9=i.defineComponent({__name:"CpItemActions",props:{actions:{},quickOptionsLimit:{default:2}},setup(t){const e=t,n=i.computed(()=>({"cpItemActions--isDropdownOpen":r.value})),o=i.ref(),r=i.ref(!1),s=c=>o.value?.show(c),a={icon:"more-vertical",command:c=>s(c)},l=i.computed(()=>{const c=[...e.actions];return c.length<=e.quickOptionsLimit?[...c]:[...c.slice(0,e.quickOptionsLimit),a]});return(c,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["cpItemActions",n.value])},[i.createVNode(F1,{class:"cpItemActions__buttonGroup"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,(u,p)=>(i.openBlock(),i.createBlock(rs,i.mergeProps({ref_for:!0},u,{key:p,"hide-label":"",onClick:u.command}),null,16,["onClick"]))),128))]),_:1}),i.createVNode(ss,{ref_key:"contextualMenu",ref:o,items:c.actions,onHide:d[0]||(d[0]=u=>r.value=!1),onShow:d[1]||(d[1]=u=>r.value=!0)},null,8,["items"])],2))}});function No(t){"@babel/helpers - typeof";return No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},No(t)}function F9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z9(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,U9(o.key),o)}}function W9(t,e,n){return e&&Z9(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function U9(t){var e=K9(t,"string");return No(e)=="symbol"?e:e+""}function K9(t,e){if(No(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(No(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var G9=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};F9(this,t),this.element=e,this.listener=n}return W9(t,[{key:"bindScrollListener",value:function(){this.scrollableParents=Du(this.element);for(var n=0;n<this.scrollableParents.length;n++)this.scrollableParents[n].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var n=0;n<this.scrollableParents.length;n++)this.scrollableParents[n].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}])})(),lc={name:"ChevronDownIcon",extends:Vi};function Y9(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),e[0]||(e[0]=[i.createElementVNode("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1)]),16)}lc.render=Y9;var as={name:"SpinnerIcon",extends:Vi};function q9(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),e[0]||(e[0]=[i.createElementVNode("path",{d:"M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z",fill:"currentColor"},null,-1)]),16)}as.render=q9;var cc={name:"TimesCircleIcon",extends:Vi};function J9(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),e[0]||(e[0]=[i.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"},null,-1)]),16)}cc.render=J9;var X9=`
|
|
351
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n9(t,e){if(t){if(typeof t=="string")return is(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?is(t,e):void 0}}function o9(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function i9(t){if(Array.isArray(t))return is(t)}function is(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function nc(t,e,n){return(e=r9(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r9(t){var e=s9(t,"string");return Vo(e)=="symbol"?e:e+""}function s9(t,e){if(Vo(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(Vo(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oc=Q6.extend("ripple",{watch:{"config.ripple":function(e){e?(this.createRipple(this.$host),this.bindEvents(this.$host),this.$host.setAttribute("data-pd-ripple",!0),this.$host.style.overflow="hidden",this.$host.style.position="relative"):(this.remove(this.$host),this.$host.removeAttribute("data-pd-ripple"))}},unmounted:function(e){this.remove(e)},timeout:void 0,methods:{bindEvents:function(e){e.addEventListener("mousedown",this.onMouseDown.bind(this))},unbindEvents:function(e){e.removeEventListener("mousedown",this.onMouseDown.bind(this))},createRipple:function(e){var n=this.getInk(e);n||(n=Nu("span",nc(nc({role:"presentation","aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx("root"),onAnimationEnd:this.onAnimationEnd.bind(this)},this.$attrSelector,""),"p-bind",this.ptm("root"))),e.appendChild(n),this.$el=n)},remove:function(e){var n=this.getInk(e);n&&(this.$host.style.overflow="",this.$host.style.position="",this.unbindEvents(e),n.removeEventListener("animationend",this.onAnimationEnd),n.remove())},onMouseDown:function(e){var n=this,o=e.currentTarget,r=this.getInk(o);if(!(!r||getComputedStyle(r,null).display==="none")){if(!this.isUnstyled()&&cr(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"),!rn(r)&&!sn(r)){var s=Math.max(ai(o),Ma(o));r.style.height=s+"px",r.style.width=s+"px"}var a=Ia(o),l=e.pageX-a.left+document.body.scrollTop-sn(r)/2,c=e.pageY-a.top+document.body.scrollLeft-rn(r)/2;r.style.top=c+"px",r.style.left=l+"px",!this.isUnstyled()&&$u(r,"p-ink-active"),r.setAttribute("data-p-ink-active","true"),this.timeout=setTimeout(function(){r&&(!n.isUnstyled()&&cr(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"))},401)}},onAnimationEnd:function(e){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&cr(e.currentTarget,"p-ink-active"),e.currentTarget.setAttribute("data-p-ink-active","false")},getInk:function(e){return e&&e.children?e9(e.children).find(function(n){return Bu(n,"data-pc-name")==="ripple"}):void 0}}}),a9={name:"BaseContextMenu",extends:Dn,props:{model:{type:Array,default:null},appendTo:{type:[String,Object],default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1},breakpoint:{type:String,default:"960px"},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:P6,provide:function(){return{$pcContextMenu:this,$parentInstance:this}}},ic={name:"ContextMenuSub",hostName:"ContextMenu",extends:Dn,emits:["item-click","item-mouseenter","item-mousemove"],props:{items:{type:Array,default:null},menuId:{type:String,default:null},focusedItemId:{type:String,default:null},root:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:0}},methods:{getItemId:function(e){return"".concat(this.menuId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,n,o){return e&&e.item?Ne(e.item[n],o):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getItemLabelId:function(e){return"".concat(this.menuId,"_").concat(e.key,"_label")},getPTOptions:function(e,n,o){return this.ptm(e,{context:{item:n.item,active:this.isItemActive(n),focused:this.isItemFocused(n),disabled:this.isItemDisabled(n),index:o}})},isItemActive:function(e){return this.activeItemPath.some(function(n){return n.key===e.key})},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return G(e.items)},onItemClick:function(e,n){this.getItemProp(n,"command",{originalEvent:e,item:n.item}),this.$emit("item-click",{originalEvent:e,processedItem:n,isFocus:!0})},onItemMouseEnter:function(e,n){this.$emit("item-mouseenter",{originalEvent:e,processedItem:n})},onItemMouseMove:function(e,n){this.$emit("item-mousemove",{originalEvent:e,processedItem:n,isFocus:!0})},getAriaSetSize:function(){var e=this;return this.items.filter(function(n){return e.isItemVisible(n)&&!e.getItemProp(n,"separator")}).length},getAriaPosInset:function(e){var n=this;return e-this.items.slice(0,e).filter(function(o){return n.isItemVisible(o)&&n.getItemProp(o,"separator")}).length+1},onEnter:function(){Pu(this.$refs.container,this.level)},getMenuItemProps:function(e,n){return{action:i.mergeProps({class:this.cx("itemLink"),tabindex:-1},this.getPTOptions("itemLink",e,n)),icon:i.mergeProps({class:[this.cx("itemIcon"),this.getItemProp(e,"icon")]},this.getPTOptions("itemIcon",e,n)),label:i.mergeProps({class:this.cx("itemLabel")},this.getPTOptions("itemLabel",e,n)),submenuicon:i.mergeProps({class:this.cx("submenuIcon")},this.getPTOptions("submenuicon",e,n))}}},components:{AngleRightIcon:X1},directives:{ripple:oc}},l9=["tabindex"],c9=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset","data-p-active","data-p-focused","data-p-disabled"],d9=["onClick","onMouseenter","onMousemove"],u9=["href","target"],p9=["id"],h9=["id"];function f9(t,e,n,o,r,s){var a=i.resolveComponent("AngleRightIcon"),l=i.resolveComponent("ContextMenuSub",!0),c=i.resolveDirective("ripple");return i.openBlock(),i.createBlock(i.Transition,i.mergeProps({name:"p-contextmenusub",onEnter:s.onEnter},t.ptm("menu.transition")),{default:i.withCtx(function(){return[n.root||n.visible?(i.openBlock(),i.createElementBlock("ul",i.mergeProps({key:0,ref:"container",tabindex:n.tabindex},t.ptm("rootList")),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.items,function(d,u){return i.openBlock(),i.createElementBlock(i.Fragment,{key:s.getItemKey(d)},[s.isItemVisible(d)&&!s.getItemProp(d,"separator")?(i.openBlock(),i.createElementBlock("li",i.mergeProps({key:0,id:s.getItemId(d),style:s.getItemProp(d,"style"),class:[t.cx("item",{processedItem:d}),s.getItemProp(d,"class")],role:"menuitem","aria-label":s.getItemLabel(d),"aria-disabled":s.isItemDisabled(d)||void 0,"aria-expanded":s.isItemGroup(d)?s.isItemActive(d):void 0,"aria-haspopup":s.isItemGroup(d)&&!s.getItemProp(d,"to")?"menu":void 0,"aria-level":n.level+1,"aria-setsize":s.getAriaSetSize(),"aria-posinset":s.getAriaPosInset(u)},{ref_for:!0},s.getPTOptions("item",d,u),{"data-p-active":s.isItemActive(d),"data-p-focused":s.isItemFocused(d),"data-p-disabled":s.isItemDisabled(d)}),[i.createElementVNode("div",i.mergeProps({class:t.cx("itemContent"),onClick:function(h){return s.onItemClick(h,d)},onMouseenter:function(h){return s.onItemMouseEnter(h,d)},onMousemove:function(h){return s.onItemMouseMove(h,d)}},{ref_for:!0},s.getPTOptions("itemContent",d,u)),[n.templates.item?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.item),{key:1,item:d.item,hasSubmenu:s.getItemProp(d,"items"),label:s.getItemLabel(d),props:s.getMenuItemProps(d,u)},null,8,["item","hasSubmenu","label","props"])):i.withDirectives((i.openBlock(),i.createElementBlock("a",i.mergeProps({key:0,href:s.getItemProp(d,"url"),class:t.cx("itemLink"),target:s.getItemProp(d,"target"),tabindex:"-1"},{ref_for:!0},s.getPTOptions("itemLink",d,u)),[n.templates.itemicon?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.itemicon),{key:0,item:d.item,class:i.normalizeClass(t.cx("itemIcon"))},null,8,["item","class"])):s.getItemProp(d,"icon")?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:1,class:[t.cx("itemIcon"),s.getItemProp(d,"icon")]},{ref_for:!0},s.getPTOptions("itemIcon",d,u)),null,16)):i.createCommentVNode("",!0),i.createElementVNode("span",i.mergeProps({id:s.getItemLabelId(d),class:t.cx("itemLabel")},{ref_for:!0},s.getPTOptions("itemLabel",d,u)),i.toDisplayString(s.getItemLabel(d)),17,p9),s.getItemProp(d,"items")?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[n.templates.submenuicon?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.submenuicon),{key:0,active:s.isItemActive(d),class:i.normalizeClass(t.cx("submenuIcon"))},null,8,["active","class"])):(i.openBlock(),i.createBlock(a,i.mergeProps({key:1,class:t.cx("submenuIcon")},{ref_for:!0},s.getPTOptions("submenuicon",d,u)),null,16,["class"]))],64)):i.createCommentVNode("",!0)],16,u9)),[[c]])],16,d9),s.isItemVisible(d)&&s.isItemGroup(d)?(i.openBlock(),i.createBlock(l,i.mergeProps({key:0,id:s.getItemId(d)+"_list",role:"menu",class:t.cx("submenu"),menuId:n.menuId,focusedItemId:n.focusedItemId,items:d.items,templates:n.templates,activeItemPath:n.activeItemPath,level:n.level+1,visible:s.isItemActive(d)&&s.isItemGroup(d),pt:t.pt,unstyled:t.unstyled,onItemClick:e[0]||(e[0]=function(p){return t.$emit("item-click",p)}),onItemMouseenter:e[1]||(e[1]=function(p){return t.$emit("item-mouseenter",p)}),onItemMousemove:e[2]||(e[2]=function(p){return t.$emit("item-mousemove",p)}),"aria-labelledby":s.getItemLabelId(d)},{ref_for:!0},t.ptm("submenu")),null,16,["id","class","menuId","focusedItemId","items","templates","activeItemPath","level","visible","pt","unstyled","aria-labelledby"])):i.createCommentVNode("",!0)],16,c9)):i.createCommentVNode("",!0),s.isItemVisible(d)&&s.getItemProp(d,"separator")?(i.openBlock(),i.createElementBlock("li",i.mergeProps({key:1,id:s.getItemId(d),style:s.getItemProp(d,"style"),class:[t.cx("separator"),s.getItemProp(d,"class")],role:"separator"},{ref_for:!0},t.ptm("separator")),null,16,h9)):i.createCommentVNode("",!0)],64)}),128))],16,l9)):i.createCommentVNode("",!0)]}),_:1},16,["onEnter"])}ic.render=f9;var rc={name:"ContextMenu",extends:a9,inheritAttrs:!1,emits:["focus","blur","show","hide","before-show","before-hide"],target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,matchMediaListener:null,pageX:null,pageY:null,container:null,list:null,data:function(){return{focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:""},activeItemPath:[],visible:!1,submenuVisible:!1,query:null,queryMatches:!1}},watch:{activeItemPath:function(e){G(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):this.visible||(this.unbindOutsideClickListener(),this.unbindResizeListener())}},mounted:function(){this.bindMatchMediaListener(),this.global&&this.bindDocumentContextMenuListener()},beforeUnmount:function(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.unbindMatchMediaListener(),this.container&&this.autoZIndex&&vn.clear(this.container),this.target=null,this.container=null},methods:{getItemProp:function(e,n){return e?Ne(e[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemGroup:function(e){return G(this.getItemProp(e,"items"))},isItemSeparator:function(e){return this.getItemProp(e,"separator")},getProccessedItemLabel:function(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:function(e){return e&&G(e.items)},toggle:function(e){this.visible?this.hide():this.show(e)},show:function(e){this.$emit("before-show"),this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""},st(this.list),this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide:function(){this.$emit("before-hide"),this.visible=!1,this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""}},onFocus:function(e){this.focused=!0,this.focusedItemInfo=this.focusedItemInfo.index!==-1?this.focusedItemInfo:{index:-1,level:0,parentKey:""},this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){var n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!n&&ku(e.key)&&this.searchItems(e,e.key);break}},onItemChange:function(e,n){var o=e.processedItem,r=e.isFocus;if(!At(o)){var s=o.index,a=o.key,l=o.level,c=o.parentKey,d=o.items,u=G(d),p=this.activeItemPath.filter(function(h){return h.parentKey!==c&&h.parentKey!==a});u&&(p.push(o),this.submenuVisible=!0),this.focusedItemInfo={index:s,level:l,parentKey:c},r&&st(this.list),!(n==="hover"&&this.queryMatches)&&(this.activeItemPath=p)}},onItemClick:function(e){var n=e.processedItem,o=this.isProccessedItemGroup(n),r=this.isSelected(n);if(r){var s=n.index,a=n.key,l=n.level,c=n.parentKey;this.activeItemPath=this.activeItemPath.filter(function(d){return a!==d.key&&a.startsWith(d.key)}),this.focusedItemInfo={index:s,level:l,parentKey:c},st(this.list)}else o?this.onItemChange(e):this.hide()},onItemMouseEnter:function(e){this.onItemChange(e,"hover")},onItemMouseMove:function(e){this.focused&&this.changeFocusedItemIndex(e,e.processedItem.index)},onArrowDownKey:function(e){var n=this.focusedItemInfo.index!==-1?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,n),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(this.focusedItemInfo.index!==-1){var n=this.visibleItems[this.focusedItemInfo.index],o=this.isProccessedItemGroup(n);!o&&this.onItemChange({originalEvent:e,processedItem:n})}this.popup&&this.hide(),e.preventDefault()}else{var r=this.focusedItemInfo.index!==-1?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,r),e.preventDefault()}},onArrowLeftKey:function(e){var n=this,o=this.visibleItems[this.focusedItemInfo.index],r=this.activeItemPath.find(function(a){return a.key===o.parentKey}),s=At(o.parent);s||(this.focusedItemInfo={index:-1,parentKey:r?r.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),this.activeItemPath=this.activeItemPath.filter(function(a){return a.parentKey!==n.focusedItemInfo.parentKey}),e.preventDefault()},onArrowRightKey:function(e){var n=this.visibleItems[this.focusedItemInfo.index],o=this.isProccessedItemGroup(n);o&&(this.onItemChange({originalEvent:e,processedItem:n}),this.focusedItemInfo={index:-1,parentKey:n.key},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()},onHomeKey:function(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey:function(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey:function(e){if(this.focusedItemInfo.index!==-1){var n=on(this.list,'li[id="'.concat("".concat(this.focusedItemIdx),'"]')),o=n&&on(n,'[data-pc-section="itemlink"]');o?o.click():n&&n.click();var r=this.visibleItems[this.focusedItemInfo.index],s=this.isProccessedItemGroup(r);!s&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.hide(),!this.popup&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex()),e.preventDefault()},onTabKey:function(e){if(this.focusedItemInfo.index!==-1){var n=this.visibleItems[this.focusedItemInfo.index],o=this.isProccessedItemGroup(n);!o&&this.onItemChange({originalEvent:e,processedItem:n})}this.hide()},onEnter:function(e){pr(e,{position:"absolute"}),this.position(),this.autoZIndex&&vn.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu)},onAfterEnter:function(){this.bindOutsideClickListener(),this.bindResizeListener(),this.$emit("show"),st(this.list)},onLeave:function(){this.$emit("hide"),this.container=null},onAfterLeave:function(e){this.autoZIndex&&vn.clear(e),this.unbindOutsideClickListener(),this.unbindResizeListener()},position:function(){var e=this.pageX+1,n=this.pageY+1,o=this.container.offsetParent?this.container.offsetWidth:Sa(this.container),r=this.container.offsetParent?this.container.offsetHeight:ka(this.container),s=si(),a=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop||0,l=window.scrollX||document.documentElement.scrollLeft||document.body.scrollLeft||0;e+o-l>s.width&&(e-=o),n+r-a>s.height&&(n-=r),e<l&&(e=l),n<a&&(n=a),this.container.style.left=e+"px",this.container.style.top=n+"px"},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){var o=e.container&&!e.container.contains(n.target),r=e.visible?!(e.target&&(e.target===n.target||e.target.contains(n.target))):!0;o&&r&&e.hide()},document.addEventListener("click",this.outsideClickListener,!0))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener,!0),this.outsideClickListener=null)},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!La()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindDocumentContextMenuListener:function(){var e=this;this.documentContextMenuListener||(this.documentContextMenuListener=function(n){n.button===2&&e.show(n)},document.addEventListener("contextmenu",this.documentContextMenuListener))},unbindDocumentContextMenuListener:function(){this.documentContextMenuListener&&(document.removeEventListener("contextmenu",this.documentContextMenuListener),this.documentContextMenuListener=null)},bindMatchMediaListener:function(){var e=this;if(!this.matchMediaListener){var n=matchMedia("(max-width: ".concat(this.breakpoint,")"));this.query=n,this.queryMatches=n.matches,this.matchMediaListener=function(){e.queryMatches=n.matches},this.query.addEventListener("change",this.matchMediaListener)}},unbindMatchMediaListener:function(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)},isItemMatched:function(e){var n;return this.isValidItem(e)&&((n=this.getProccessedItemLabel(e))===null||n===void 0?void 0:n.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase()))},isValidItem:function(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)&&this.isItemVisible(e.item)},isValidSelectedItem:function(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected:function(e){return this.activeItemPath.some(function(n){return n.key===e.key})},findFirstItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(n){return e.isValidItem(n)})},findLastItemIndex:function(){var e=this;return co(this.visibleItems,function(n){return e.isValidItem(n)})},findNextItemIndex:function(e){var n=this,o=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(function(r){return n.isValidItem(r)}):-1;return o>-1?o+e+1:e},findPrevItemIndex:function(e){var n=this,o=e>0?co(this.visibleItems.slice(0,e),function(r){return n.isValidItem(r)}):-1;return o>-1?o:e},findSelectedItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(n){return e.isValidSelectedItem(n)})},findFirstFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},searchItems:function(e,n){var o=this;this.searchValue=(this.searchValue||"")+n;var r=-1,s=!1;return this.focusedItemInfo.index!==-1?(r=this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function(a){return o.isItemMatched(a)}),r=r===-1?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex(function(a){return o.isItemMatched(a)}):r+this.focusedItemInfo.index):r=this.visibleItems.findIndex(function(a){return o.isItemMatched(a)}),r!==-1&&(s=!0),r===-1&&this.focusedItemInfo.index===-1&&(r=this.findFirstFocusedItemIndex()),r!==-1&&this.changeFocusedItemIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){o.searchValue="",o.searchTimeout=null},500),s},changeFocusedItemIndex:function(e,n){this.focusedItemInfo.index!==n&&(this.focusedItemInfo.index=n,this.scrollInView())},scrollInView:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,n=e!==-1?"".concat(this.$id,"_").concat(e):this.focusedItemIdx,o=on(this.list,'li[id="'.concat(n,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems:function(e){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",a=[];return e&&e.forEach(function(l,c){var d=(s!==""?s+"_":"")+c,u={item:l,index:c,level:o,key:d,parent:r,parentKey:s};u.items=n.createProcessedItems(l.items,o+1,u,d),a.push(u)}),a},containerRef:function(e){this.container=e},listRef:function(e){this.list=e?e.$el:void 0}},computed:{processedItems:function(){return this.createProcessedItems(this.model||[])},visibleItems:function(){var e=this,n=this.activeItemPath.find(function(o){return o.key===e.focusedItemInfo.parentKey});return n?n.items:this.processedItems},focusedItemIdx:function(){return this.focusedItemInfo.index!==-1?"".concat(this.$id).concat(G(this.focusedItemInfo.parentKey)?"_"+this.focusedItemInfo.parentKey:"","_").concat(this.focusedItemInfo.index):null}},components:{ContextMenuSub:ic,Portal:ns}};function m9(t,e,n,o,r,s){var a=i.resolveComponent("ContextMenuSub"),l=i.resolveComponent("Portal");return i.openBlock(),i.createBlock(l,{appendTo:t.appendTo},{default:i.withCtx(function(){return[i.createVNode(i.Transition,i.mergeProps({name:"p-contextmenu",onEnter:s.onEnter,onAfterEnter:s.onAfterEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},t.ptm("transition")),{default:i.withCtx(function(){return[r.visible?(i.openBlock(),i.createElementBlock("div",i.mergeProps({key:0,ref:s.containerRef,class:t.cx("root")},t.ptmi("root")),[i.createVNode(a,{ref:s.listRef,id:t.$id+"_list",class:i.normalizeClass(t.cx("rootList")),role:"menubar",root:!0,tabindex:t.tabindex,"aria-orientation":"vertical","aria-activedescendant":r.focused?s.focusedItemIdx:void 0,menuId:t.$id,focusedItemId:r.focused?s.focusedItemIdx:void 0,items:s.processedItems,templates:t.$slots,activeItemPath:r.activeItemPath,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,level:0,visible:r.submenuVisible,pt:t.pt,unstyled:t.unstyled,onFocus:s.onFocus,onBlur:s.onBlur,onKeydown:s.onKeyDown,onItemClick:s.onItemClick,onItemMouseenter:s.onItemMouseEnter,onItemMousemove:s.onItemMouseMove},null,8,["id","class","tabindex","aria-activedescendant","menuId","focusedItemId","items","templates","activeItemPath","aria-labelledby","aria-label","visible","pt","unstyled","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter","onItemMousemove"])],16)):i.createCommentVNode("",!0)]}),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]}),_:1},8,["appendTo"])}rc.render=m9;const y9={class:"cpMenuItem"},g9=["disabled"],C9={key:0,class:"cpMenuItem__loaderWrapper"},v9={key:0,class:"cpMenuItem__label"},rs=i.defineComponent({__name:"CpMenuItem",props:{hideLabel:{type:Boolean,default:!1},isAsync:{type:Boolean,default:!1},isCritical:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},reverseLabel:{type:Boolean,default:!1},tooltip:{default:""},label:{type:[String,Function],default:""},icon:{default:""},command:{type:Function,default:void 0},url:{},items:{},visible:{type:[Boolean,Function]},target:{},separator:{type:Boolean},style:{}},emits:["onItemClick","onAsyncCommandComplete"],setup(t,{emit:e}){const n=t,o=e,r=i.computed(()=>({"cpMenuItem__button--reverseLabel":n.reverseLabel,"cpMenuItem__button--isCritical":n.isCritical})),s=i.computed(()=>n.isLoading||n.isDisabled),a=i.computed(()=>!n.hideLabel&&n.label),l=async c=>{n.command&&(n.isAsync&&(c.stopPropagation(),await n.command({originalEvent:c,item:n}),o("onAsyncCommandComplete")),o("onItemClick"))};return(c,d)=>{const u=i.resolveComponent("cp-loader"),p=i.resolveComponent("cp-icon"),h=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("div",y9,[i.createElementVNode("button",{type:"button",class:i.normalizeClass(["cpMenuItem__button",r.value]),disabled:s.value,onClick:l},[i.createVNode(i.Transition,{name:"fade",duration:100,mode:"out-in"},{default:i.withCtx(()=>[c.isLoading?(i.openBlock(),i.createElementBlock("span",C9,[i.createVNode(u,{color:"#B2B2BD",class:"cpMenuItem__loader"})])):i.renderSlot(c.$slots,"icon",{key:1},()=>[i.createVNode(p,{type:c.icon,class:"cpMenuItem__icon"},null,8,["type"])])]),_:3}),a.value?i.withDirectives((i.openBlock(),i.createElementBlock("span",v9,[i.createTextVNode(i.toDisplayString(c.label),1)])),[[h,c.tooltip]]):i.createCommentVNode("",!0)],10,g9)])}}}),ss=i.defineComponent({__name:"CpContextualMenu",props:{items:{}},setup(t,{expose:e}){const n=i.ref(),o={root:{class:"cpContextualMenu"},item:{class:"cpContextualMenu__item"},transition:{name:"scale-elastic",duration:100}},r=a=>{const{x:l,y:c}=a;if(l!==0&&c!==0)return n.value?.show(a);const d=a.currentTarget.getBoundingClientRect(),u=new MouseEvent("click",{...a,clientX:d.left+d.width,clientY:d.bottom});n.value?.show(u)},s=()=>n.value?.hide();return e({show:r,hide:s}),(a,l)=>(i.openBlock(),i.createBlock(i.unref(rc),{ref_key:"menu",ref:n,model:a.items,pt:o},{item:i.withCtx(({item:c,props:d})=>[i.createVNode(rs,i.mergeProps({...c,...d.action},{onOnAsyncCommandComplete:s}),null,16)]),_:1},8,["model"]))}}),b9={class:"cpDate__inputs"},w9=["placeholder","required","disabled","autocomplete"],x9=["id","required","disabled","autocomplete"],_9={value:""},k9=["value"],S9=["placeholder","disabled","required","autocomplete"],I9={key:0,class:"cpDate__errorMessage"},M9=i.defineComponent({__name:"CpDate",props:{autocompleteBirthday:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},displayErrorMessage:{type:Boolean,default:!0},errorMessage:{default:""},inputsOptions:{default:()=>({})},isInvalid:{type:Boolean,default:!1},label:{default:""},locale:{default:()=>navigator.language},maxDate:{default:()=>k.now().toISO()},minDate:{default:()=>k.now().minus({year:u5}).toISO()},modelValue:{default:""},required:{type:Boolean,default:!1}},emits:["update:modelValue","onValidation"],setup(t,{emit:e}){const n=t,o=e,r=j=>k.fromISO(n.modelValue).invalid?"":k.fromISO(n.modelValue)[j],s=i.ref(r("day")),a=i.ref(r("month")),l=i.ref(r("year")),c=i.computed(()=>ht(n.label)),d=i.computed(()=>et()),u=i.computed(()=>m.value.year),p=i.computed(()=>g.value.year),h=i.computed(()=>k.fromObject({year:l.value&&l.value.length<=4?Number(l.value):k.now().year,month:a.value?Number(a.value):k.now().month,day:1}).daysInMonth),f=i.computed(()=>wt.months("long",{locale:n.locale}).map((R,z)=>({label:ht(R),value:z+1}))),y=i.computed(()=>k.fromObject({year:Number(l.value),month:Number(a.value),day:Number(s.value)}).toISODate()),m=i.computed(()=>k.fromISO(n.minDate)),g=i.computed(()=>k.fromISO(n.maxDate)),C=i.computed(()=>y.value>=m.value.toISODate()),v=i.computed(()=>y.value<=g.value.toISODate()),w=i.computed(()=>s.value===""&&a.value===""&&l.value===""),b=i.computed(()=>w.value&&!n.required?!0:!n.isInvalid&&x.value&&$.value&&O.value&&v.value&&C.value),x=i.computed(()=>Number(s.value)>=1&&Number(s.value)<=h.value),$=i.computed(()=>!!a.value),O=i.computed(()=>Number(l.value)>=u.value&&Number(l.value)<=p.value),E=i.computed(()=>b.value||!n.displayErrorMessage?"":n.errorMessage?n.errorMessage:$.value?x.value?O.value?v.value?C.value?"":`The date can't be before ${m.value.toFormat("DDD")}.`:`The date can't be after ${g.value.toFormat("DDD")}.`:`Year must be in the range ${u.value} – ${p.value}.`:`Day must be in the range 1 – ${h.value}.`:"Month is required."),P=i.computed(()=>({"cpDate--isInvalid":!b.value,"cpDate--isDisabled":n.disabled})),_=i.computed(()=>({"cpDate__month--isEmpty":!a.value})),V=i.computed(()=>n.autocompleteBirthday?{day:"bday-day",month:"bday-month",year:"bday-year"}:"off"),T=i.computed(()=>n.inputsOptions?.dayInputPlaceholder||"DD"),M=i.computed(()=>n.inputsOptions?.monthInputPlaceholder||"Months"),N=i.computed(()=>n.inputsOptions?.yearInputPlaceholder||"YYYY"),B=()=>{o("update:modelValue",y.value),o("onValidation",b.value)};return i.watch(s,B),i.watch(a,B),i.watch(l,B),(j,R)=>{const z=i.resolveComponent("transition-expand"),S=i.resolveDirective("bind-once"),Z=i.resolveDirective("maska");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["cpDate",P.value])},[j.label?i.withDirectives((i.openBlock(),i.createBlock(Mo,{key:0,"is-invalid":!b.value,required:j.required},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.value),1)]),_:1},8,["is-invalid","required"])),[[S,{for:d.value}]]):i.createCommentVNode("",!0),i.createElementVNode("div",b9,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":R[0]||(R[0]=F=>s.value=F),"data-maska":"##",placeholder:T.value,class:"cpDate__day",inputmode:"numeric",maxlength:"2",required:j.required,disabled:j.disabled,autocomplete:V.value.day},null,8,w9),[[i.vModelText,s.value],[Z]]),R[3]||(R[3]=i.createElementVNode("div",{class:"cpDate__divider"},null,-1)),i.createElementVNode("div",{class:i.normalizeClass(["cpDate__month",_.value])},[i.withDirectives(i.createElementVNode("select",{id:d.value,"onUpdate:modelValue":R[1]||(R[1]=F=>a.value=F),required:j.required,disabled:j.disabled,autocomplete:V.value.month},[i.createElementVNode("option",_9,i.toDisplayString(M.value),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.value,(F,ne)=>(i.openBlock(),i.createElementBlock("option",{key:ne,value:F.value},i.toDisplayString(F.label),9,k9))),128))],8,x9),[[i.vModelSelect,a.value]])],2),R[4]||(R[4]=i.createElementVNode("div",{class:"cpDate__divider"},null,-1)),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":R[2]||(R[2]=F=>l.value=F),"data-maska":"####",placeholder:N.value,class:"cpDate__year",inputmode:"numeric",maxlength:"4",disabled:j.disabled,required:j.required,autocomplete:V.value.year},null,8,S9),[[i.vModelText,l.value],[Z]])]),i.createVNode(z,null,{default:i.withCtx(()=>[E.value?(i.openBlock(),i.createElementBlock("div",I9,i.toDisplayString(E.value),1)):i.createCommentVNode("",!0)]),_:1})],2)}}}),$9={class:"cpDatepicker"},O9="EEE DD",T9=i.defineComponent({__name:"CpDatepicker",props:{allowPastDates:{type:Boolean,default:!1},closeAfterSelect:{type:Boolean,default:!0},errorMessage:{default:""},initDateOne:{default:""},initDateTwo:{default:""},inputValue:{default:""},isError:{type:Boolean,default:!1},isInline:{type:Boolean,default:!1},label:{default:""},locale:{default:()=>navigator.language},maxDate:{default:""},minDate:{default:()=>k.local().toISODate()},mode:{default:"single"},placeholder:{default:"Select a date"},singleMonth:{type:Boolean,default:!1},triggerElementId:{default:""}},emits:["dates"],setup(t,{emit:e}){const n=t,o=e,r=i.ref(n.initDateOne||""),s=i.ref(n.mode==="range"?n.initDateTwo:""),a=i.ref(!1),l=i.ref(n.triggerElementId||et()),c=i.computed(()=>n.inputValue?n.inputValue:j1({dateOne:r.value,dateTwo:s.value,format:O9,locale:n.locale})),d=i.computed(()=>n.singleMonth?1:2),u=i.computed(()=>n.allowPastDates?"":n.minDate),p=m=>f("dateOne",m),h=m=>f("dateTwo",m),f=(m,g)=>{m==="dateOne"?r.value=g:s.value=g,o("dates",[r.value,...s.value?[s.value]:[]])},y=(m,g,C)=>{g!==C&&(m==="dateOne"?r.value=g:s.value=g)};return i.watch(()=>n.initDateOne,(m,g)=>{y("dateOne",m,g)}),i.watch(()=>n.initDateTwo,(m,g)=>{y("dateTwo",m,g)}),(m,g)=>(i.openBlock(),i.createElementBlock("div",$9,[i.withDirectives(i.createVNode(es,{id:l.value,"model-value":c.value,type:"text",placeholder:m.placeholder,"is-invalid":m.isError,"error-message":m.errorMessage,disabled:a.value,label:m.label,class:"cpDatepicker__input"},null,8,["id","model-value","placeholder","is-invalid","error-message","disabled","label"]),[[i.vShow,!m.isInline]]),i.createVNode(Xr,{"date-one":r.value,"date-two":s.value,"trigger-element-id":l.value,"close-after-select":m.closeAfterSelect,mode:m.mode,inline:m.isInline,"months-to-show":d.value,"min-date":u.value,"max-date":m.maxDate,locale:m.locale,class:i.normalizeClass(["cpDatepicker__datepicker",{"cpDatepicker__datepicker--isInline":m.isInline}]),onDateOneSelected:p,onDateTwoSelected:h,onOpened:g[0]||(g[0]=()=>a.value=!0),onClosed:g[1]||(g[1]=()=>a.value=!1)},null,8,["date-one","date-two","trigger-element-id","close-after-select","mode","inline","months-to-show","min-date","max-date","locale","class"])]))}}),sc=(t=document)=>{if(t===null)return[];const e=Array.from(t.querySelectorAll('a, button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'));return e.length?e.filter(n=>{const o=n.hasAttribute("disabled"),r=n.offsetHeight!==0&&n.offsetWidth!==0,a=n instanceof HTMLInputElement&&n.type==="radio"&&n.checked===!1;return!o&&r&&!a}):t instanceof HTMLElement?[t]:[]},L9=(t,e)=>{if(!e)return;const n=sc(e),o=n[0],r=n[n.length-1],s=!t.shiftKey&&document.activeElement===r,a=t.shiftKey&&document.activeElement===o;s?(t.preventDefault(),o?.focus()):a&&(t.preventDefault(),r?.focus())},E9={class:"cpDialog"},V9=["onKeydown"],N9={key:0,class:"cpDialog__header"},B9={class:"cpDialog__content"},D9={key:1,class:"cpDialog__footer"},P9=i.defineComponent({__name:"CpDialog",props:{maxWidth:{default:600}},emits:["close"],setup(t,{emit:e}){const n=t,o=e,r=i.useSlots(),s=i.ref(null),a=i.ref(null),l=i.computed(()=>({maxWidth:`${n.maxWidth}px`})),c=i.computed(()=>!!r.header),d=i.computed(()=>!!r.footer),u=()=>o("close"),p=m=>L9(m,a.value),h=()=>s.value?.show(),f=()=>s.value?.close(),y=()=>{const m=sc(a.value);m.length&&m[0].focus()};return i.onMounted(()=>{h(),i.nextTick(()=>y())}),i.onBeforeUnmount(()=>{f()}),(m,g)=>{const C=i.resolveComponent("cp-icon");return i.openBlock(),i.createElementBlock("div",E9,[i.createElementVNode("dialog",{ref_key:"dialogElement",ref:s,class:"cpDialog__dialog",onKeydown:i.withKeys(i.withModifiers(u,["stop","prevent"]),["esc"])},[g[0]||(g[0]=i.createElementVNode("div",{class:"cpDialog__overlay"},null,-1)),i.createElementVNode("main",{ref_key:"dialogContainer",ref:a,class:"cpDialog__container",style:i.normalizeStyle(l.value),onKeydown:i.withKeys(p,["tab"])},[c.value?(i.openBlock(),i.createElementBlock("header",N9,[i.renderSlot(m.$slots,"header"),i.createElementVNode("button",{type:"button",class:"cpDialog__close",onClick:u},[i.createVNode(C,{type:"x"})])])):i.createCommentVNode("",!0),i.renderSlot(m.$slots,"default",{},()=>[i.createElementVNode("section",B9,[i.renderSlot(m.$slots,"content")])]),d.value?(i.openBlock(),i.createElementBlock("footer",D9,[i.renderSlot(m.$slots,"footer")])):i.createCommentVNode("",!0)],36)],40,V9)])}}}),j9={},A9={class:"cpDialogWrapper"};function R9(t,e){return i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createElementVNode("div",A9,[i.createVNode(i.TransitionGroup,{name:"dialog"},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default")]),_:3})])])}const z9=L(j9,[["render",R9]]),ac=i.defineComponent({inheritAttrs:!1,__name:"CpHeading",props:{headingLevel:{default:Ur.H1},size:{default:500}},setup(t){return(e,n)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.$props.headingLevel),i.mergeProps(e.$attrs,{class:[`cpHeading--${e.size}`,"cpHeading"]}),{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),H9=i.defineComponent({__name:"CpItemActions",props:{actions:{},quickOptionsLimit:{default:2}},setup(t){const e=t,n=i.computed(()=>({"cpItemActions--isDropdownOpen":r.value})),o=i.ref(),r=i.ref(!1),s=d=>o.value?.show(d),a={icon:"more-vertical",command:d=>s(d)},l=i.computed(()=>!!e.actions.length),c=i.computed(()=>{const d=[...e.actions];return d.length<=e.quickOptionsLimit?[...d,a]:[...d.slice(0,e.quickOptionsLimit),a]});return(d,u)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["cpItemActions",n.value])},[l.value?(i.openBlock(),i.createBlock(F1,{key:0,class:"cpItemActions__buttonGroup"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,(p,h)=>(i.openBlock(),i.createBlock(rs,i.mergeProps({ref_for:!0},p,{key:h,"hide-label":"",onClick:i.withModifiers(p.command,["stop"])}),null,16,["onClick"]))),128))]),_:1})):i.createCommentVNode("",!0),i.createVNode(ss,{ref_key:"contextualMenu",ref:o,items:d.actions,onHide:u[0]||(u[0]=p=>r.value=!1),onShow:u[1]||(u[1]=p=>r.value=!0)},null,8,["items"])],2))}});function No(t){"@babel/helpers - typeof";return No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},No(t)}function F9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z9(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,U9(o.key),o)}}function W9(t,e,n){return e&&Z9(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function U9(t){var e=K9(t,"string");return No(e)=="symbol"?e:e+""}function K9(t,e){if(No(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(No(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var G9=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};F9(this,t),this.element=e,this.listener=n}return W9(t,[{key:"bindScrollListener",value:function(){this.scrollableParents=Du(this.element);for(var n=0;n<this.scrollableParents.length;n++)this.scrollableParents[n].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var n=0;n<this.scrollableParents.length;n++)this.scrollableParents[n].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}])})(),lc={name:"ChevronDownIcon",extends:Vi};function Y9(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),e[0]||(e[0]=[i.createElementVNode("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1)]),16)}lc.render=Y9;var as={name:"SpinnerIcon",extends:Vi};function q9(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),e[0]||(e[0]=[i.createElementVNode("path",{d:"M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z",fill:"currentColor"},null,-1)]),16)}as.render=q9;var cc={name:"TimesCircleIcon",extends:Vi};function J9(t,e,n,o,r,s){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),e[0]||(e[0]=[i.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"},null,-1)]),16)}cc.render=J9;var X9=`
|
|
352
352
|
.p-chip {
|
|
353
353
|
display: inline-flex;
|
|
354
354
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cpItemActions" :class="componentDynamicClasses">
|
|
3
|
-
<cp-button-group class="cpItemActions__buttonGroup">
|
|
3
|
+
<cp-button-group v-if="hasActions" class="cpItemActions__buttonGroup">
|
|
4
4
|
<cp-menu-item
|
|
5
5
|
v-for="(action, index) in slicedActions"
|
|
6
6
|
v-bind="action"
|
|
7
7
|
:key="index"
|
|
8
8
|
hide-label
|
|
9
|
-
@click="action.command"
|
|
9
|
+
@click.stop="action.command"
|
|
10
10
|
/>
|
|
11
11
|
</cp-button-group>
|
|
12
12
|
<cp-contextual-menu
|
|
@@ -46,11 +46,13 @@ const defaultAction = {
|
|
|
46
46
|
command: (event: MouseEvent) => showContextualMenu(event),
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
const hasActions = computed(() => !!props.actions.length)
|
|
50
|
+
|
|
49
51
|
const slicedActions = computed(() => {
|
|
50
52
|
const actionsCopy = [...props.actions]
|
|
51
53
|
|
|
52
54
|
if (actionsCopy.length <= props.quickOptionsLimit) {
|
|
53
|
-
return [...actionsCopy]
|
|
55
|
+
return [...actionsCopy, defaultAction]
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
const firstActions = actionsCopy.slice(0, props.quickOptionsLimit)
|
|
@@ -51,12 +51,14 @@ export const Default: Story = {
|
|
|
51
51
|
marginBottom: '16px',
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
const parentClick = () => alert('Parent clicked')
|
|
55
|
+
|
|
56
|
+
return { actions, listItemStyle, listItems, parentClick }
|
|
55
57
|
},
|
|
56
58
|
template: `
|
|
57
59
|
<div style="padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 400px;">
|
|
58
60
|
<ul>
|
|
59
|
-
<li v-for="(item, index) in listItems" :key="item" :style="listItemStyle" cp-item-actions-trigger>
|
|
61
|
+
<li v-for="(item, index) in listItems" :key="item" :style="listItemStyle" @click="parentClick" cp-item-actions-trigger>
|
|
60
62
|
<p>Item {{ index + 1 }}</p>
|
|
61
63
|
<CpItemActions
|
|
62
64
|
size="xs"
|