@watone/wt-cli
Version:
watone tools
370 lines (361 loc) • 1.2 MB
JavaScript
import{D as q,O as dt,R as Ze,U as Ke,Z as ke,C as Su,N as It,a as Qe,s as Wc,b as Kc,t as te,P as fu,T as bu,c as $e,p as Tu,L as Qi,d as hu,k as Cu,e as Ru,f as Nu,g as vu,i as Ou,l as Iu,h as Au,j as Ai,m as Xi,n as yu,E as st,o as Du,q as Lu,r as Mu,u as xu}from"./index-ac612723.js";import{B as wu,C as ku,E as Pu,F as Pe,K as Uu,R as Fu,S as Bu,z as Gu,T as Qc,A as Yu,D as yi,G as qu,V as Hu,H as Vu,I as zu,J as $u,L as Wu,M as Ku,N as Qu,O as Xu,P as Xc,Q as Zu,U as ge,W as ie,c as Z,b as J,X as Ju,Y as ju,Z as ep,_ as tp,$ as np,i as rp,e as Di,l as ue,a0 as ap,a1 as ip,j as op,a2 as sp,a3 as lp,a4 as cp,a5 as dp,a6 as _p,a7 as up,a8 as pp,a9 as mp,aa as gp,ab as Ep,ac as Sp,ad as fp,ae as bp,af as Tp,ag as hp,ah as Cp,ai as Rp,aj as Np,ak as vp,al as Op,am as Ip,an as Ap,x as xe,ao as yp,ap as Dp,aq as Lp,ar as Mp,as as xp,at as Me,au as wp,n as ce,av as kp,h as Et,aw as Pp,ax as Up,f as Zc,ay as Fp,az as Bp,aA as Gp,o as Jc,aB as Yp,aC as qp,aD as Hp,aE as Vp,aF as zp,aG as $p,a as V,q as jc,aH as Wp,aI as Kp,p as ed,aJ as Qp,aK as Xp,aL as Zp,r as Te,aM as Jp,aN as jp,s as Je,k as We,aO as ye,aP as De,aQ as Ae,aR as em,aS as tm,aT as nm,aU as rm,aV as am,aW as im,aX as om,aY as sm,aZ as lm,a_ as cm,a$ as dm,t as Nt,b0 as _m,b1 as um,b2 as pm,b3 as mm,b4 as gm,b5 as Em,b6 as Sm,d as Ee,b7 as fm,b8 as bm,b9 as Tm,ba as hm,bb as Cm,bc as Rm,bd as Nm,be as vm,bf as Om,bg as Im,y as td,v as nd,bh as Am,bi as ym,bj as Dm,bk as Lm,bl as Mm,bm as xm,bn as wm,m as be,bo as km,g as Se,w as Pm,bp as Um,bq as Fm,br as Bm}from"./index-c614ad14.js";import{h as Gm,s as Ym,a as qm}from"./index-74e805a1.js";import{g as Hm,c as rd,a as ad}from"./_commonjsHelpers-87174ba5.js";import{_ as Vm}from"./_plugin-vue_export-helper-c27b6911.js";const zm=()=>{},$m=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:wu,Comment:ku,EffectScope:Pu,Fragment:Pe,KeepAlive:Uu,ReactiveEffect:Fu,Static:Bu,Suspense:Gu,Teleport:Qc,Text:Yu,Transition:yi,TransitionGroup:qu,VueElement:Hu,assertNumber:Vu,callWithAsyncErrorHandling:zu,callWithErrorHandling:$u,camelize:Wu,capitalize:Ku,cloneVNode:Qu,compatUtils:Xu,compile:zm,computed:Xc,createApp:Zu,createBlock:ge,createCommentVNode:ie,createElementBlock:Z,createElementVNode:J,createHydrationRenderer:Ju,createPropsRestProxy:ju,createRenderer:ep,createSSRApp:tp,createSlots:np,createStaticVNode:rp,createTextVNode:Di,createVNode:ue,customRef:ap,defineAsyncComponent:ip,defineComponent:op,defineCustomElement:sp,defineEmits:lp,defineExpose:cp,defineProps:dp,defineSSRCustomElement:_p,get devtools(){return up},effect:pp,effectScope:mp,getCurrentInstance:gp,getCurrentScope:Ep,getTransitionRawChildren:Sp,guardReactiveProps:fp,h:bp,handleError:Tp,hydrate:hp,initCustomFormatter:Cp,initDirectivesForSSR:Rp,inject:Np,isMemoSame:vp,isProxy:Op,isReactive:Ip,isReadonly:Ap,isRef:xe,isRuntimeOnly:yp,isShallow:Dp,isVNode:Lp,markRaw:Mp,mergeDefaults:xp,mergeProps:Me,nextTick:wp,normalizeClass:ce,normalizeProps:kp,normalizeStyle:Et,onActivated:Pp,onBeforeMount:Up,onBeforeUnmount:Zc,onBeforeUpdate:Fp,onDeactivated:Bp,onErrorCaptured:Gp,onMounted:Jc,onRenderTracked:Yp,onRenderTriggered:qp,onScopeDispose:Hp,onServerPrefetch:Vp,onUnmounted:zp,onUpdated:$p,openBlock:V,popScopeId:jc,provide:Wp,proxyRefs:Kp,pushScopeId:ed,queuePostFlushCb:Qp,reactive:Xp,readonly:Zp,ref:Te,registerRuntimeCompiler:Jp,render:jp,renderList:Je,renderSlot:We,resolveComponent:ye,resolveDirective:De,resolveDynamicComponent:Ae,resolveFilter:em,resolveTransitionHooks:tm,setBlockTracking:nm,setDevtoolsHook:rm,setTransitionHooks:am,shallowReactive:im,shallowReadonly:om,shallowRef:sm,ssrContextKey:lm,ssrUtils:cm,stop:dm,toDisplayString:Nt,toHandlerKey:_m,toHandlers:um,toRaw:pm,toRef:mm,toRefs:gm,transformVNodeArgs:Em,triggerRef:Sm,unref:Ee,useAttrs:fm,useCssModule:bm,useCssVars:Tm,useSSRContext:hm,useSlots:Cm,useTransitionState:Rm,vModelCheckbox:Nm,vModelDynamic:vm,vModelRadio:Om,vModelSelect:Im,vModelText:td,vShow:nd,version:Am,warn:ym,watch:Dm,watchEffect:Lm,watchPostEffect:Mm,watchSyncEffect:xm,withAsyncContext:wm,withCtx:be,withDefaults:km,withDirectives:Se,withKeys:Pm,withMemo:Um,withModifiers:Fm,withScopeId:Bm},Symbol.toStringTag,{value:"Module"}));function Wm(t,e){const{onFocusIn:n,onFocusOut:s}=e.value||{};t.$_pfocustrap_mutationobserver=new MutationObserver(l=>{l.forEach(r=>{if(r.type==="childList"&&!t.contains(document.activeElement)){const a=i=>{const c=q.isFocusableElement(i)?i:q.getFirstFocusableElement(i);return dt.isNotEmpty(c)?c:a(i.nextSibling)};q.focus(a(r.nextSibling))}})}),t.$_pfocustrap_mutationobserver.disconnect(),t.$_pfocustrap_mutationobserver.observe(t,{childList:!0}),t.$_pfocustrap_focusinlistener=l=>n&&n(l),t.$_pfocustrap_focusoutlistener=l=>s&&s(l),t.addEventListener("focusin",t.$_pfocustrap_focusinlistener),t.addEventListener("focusout",t.$_pfocustrap_focusoutlistener)}function Zi(t){t.$_pfocustrap_mutationobserver&&t.$_pfocustrap_mutationobserver.disconnect(),t.$_pfocustrap_focusinlistener&&t.removeEventListener("focusin",t.$_pfocustrap_focusinlistener)&&(t.$_pfocustrap_focusinlistener=null),t.$_pfocustrap_focusoutlistener&&t.removeEventListener("focusout",t.$_pfocustrap_focusoutlistener)&&(t.$_pfocustrap_focusoutlistener=null)}function Km(t,e){const{autoFocusSelector:n="",firstFocusableSelector:s="",autoFocus:l=!1}=e.value||{};let r=q.getFirstFocusableElement(t,`[autofocus]:not(.p-hidden-focusable)${n}`);l&&!r&&(r=q.getFirstFocusableElement(t,`:not(.p-hidden-focusable)${s}`)),q.focus(r)}function Qm(t){const{currentTarget:e,relatedTarget:n}=t,s=n===e.$_pfocustrap_lasthiddenfocusableelement?q.getFirstFocusableElement(e.parentElement,`:not(.p-hidden-focusable)${e.$_pfocustrap_focusableselector}`):e.$_pfocustrap_lasthiddenfocusableelement;q.focus(s)}function Xm(t){const{currentTarget:e,relatedTarget:n}=t,s=n===e.$_pfocustrap_firsthiddenfocusableelement?q.getLastFocusableElement(e.parentElement,`:not(.p-hidden-focusable)${e.$_pfocustrap_focusableselector}`):e.$_pfocustrap_firsthiddenfocusableelement;q.focus(s)}function Zm(t,e){const{tabIndex:n=0,firstFocusableSelector:s="",lastFocusableSelector:l=""}=e.value||{},r=c=>{const d=document.createElement("span");return d.classList="p-hidden-accessible p-hidden-focusable",d.tabIndex=n,d.setAttribute("aria-hidden","true"),d.setAttribute("role","presentation"),d.addEventListener("focus",c),d},a=r(Qm),i=r(Xm);a.$_pfocustrap_lasthiddenfocusableelement=i,a.$_pfocustrap_focusableselector=s,i.$_pfocustrap_firsthiddenfocusableelement=a,i.$_pfocustrap_focusableselector=l,t.prepend(a),t.append(i)}const id={mounted(t,e){const{disabled:n}=e.value||{};n||(Zm(t,e),Wm(t,e),Km(t,e))},updated(t,e){const{disabled:n}=e.value||{};n&&Zi(t)},unmounted(t){Zi(t)}};var Li={name:"Portal",props:{appendTo:{type:String,default:"body"},disabled:{type:Boolean,default:!1}},data(){return{mounted:!1}},mounted(){this.mounted=q.isClient()},computed:{inline(){return this.disabled||this.appendTo==="self"}}};function Jm(t,e,n,s,l,r){return r.inline?We(t.$slots,"default",{key:0}):l.mounted?(V(),ge(Qc,{key:1,to:n.appendTo},[We(t.$slots,"default")],8,["to"])):ie("",!0)}Li.render=Jm;var od={name:"GalleriaItem",emits:["start-slideshow","stop-slideshow","update:activeIndex"],props:{circular:{type:Boolean,default:!1},activeIndex:{type:Number,default:0},value:{type:Array,default:null},showItemNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},slideShowActive:{type:Boolean,default:!0},changeItemOnIndicatorHover:{type:Boolean,default:!0},autoPlay:{type:Boolean,default:!1},templates:{type:null,default:null},id:{type:String,default:null}},mounted(){this.autoPlay&&this.$emit("start-slideshow")},methods:{next(){let t=this.activeIndex+1,e=this.circular&&this.value.length-1===this.activeIndex?0:t;this.$emit("update:activeIndex",e)},prev(){let t=this.activeIndex!==0?this.activeIndex-1:0,e=this.circular&&this.activeIndex===0?this.value.length-1:t;this.$emit("update:activeIndex",e)},stopSlideShow(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},navBackward(t){this.stopSlideShow(),this.prev(),t&&t.cancelable&&t.preventDefault()},navForward(t){this.stopSlideShow(),this.next(),t&&t.cancelable&&t.preventDefault()},onIndicatorClick(t){this.stopSlideShow(),this.$emit("update:activeIndex",t)},onIndicatorMouseEnter(t){this.changeItemOnIndicatorHover&&(this.stopSlideShow(),this.$emit("update:activeIndex",t))},onIndicatorKeyDown(t,e){switch(t.code){case"Enter":case"Space":this.stopSlideShow(),this.$emit("update:activeIndex",e),t.preventDefault();break;case"ArrowDown":case"ArrowUp":t.preventDefault();break}},isIndicatorItemActive(t){return this.activeIndex===t},isNavBackwardDisabled(){return!this.circular&&this.activeIndex===0},isNavForwardDisabled(){return!this.circular&&this.activeIndex===this.value.length-1},ariaSlideNumber(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{activeItem(){return this.value[this.activeIndex]},navBackwardClass(){return["p-galleria-item-prev p-galleria-item-nav p-link",{"p-disabled":this.isNavBackwardDisabled()}]},navForwardClass(){return["p-galleria-item-next p-galleria-item-nav p-link",{"p-disabled":this.isNavForwardDisabled()}]},ariaSlideLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0}},directives:{ripple:Ze}};const jm={class:"p-galleria-item-wrapper"},eg={class:"p-galleria-item-container"},tg=["disabled"],ng=J("span",{class:"p-galleria-item-prev-icon pi pi-chevron-left"},null,-1),rg=[ng],ag=["id","aria-label","aria-roledescription"],ig=["disabled"],og=J("span",{class:"p-galleria-item-next-icon pi pi-chevron-right"},null,-1),sg=[og],lg={key:2,class:"p-galleria-caption"},cg={key:0,class:"p-galleria-indicators p-reset"},dg=["aria-label","aria-selected","aria-controls","onClick","onMouseenter","onKeydown"],_g={key:0,type:"button",tabindex:"-1",class:"p-link"};function ug(t,e,n,s,l,r){const a=De("ripple");return V(),Z("div",jm,[J("div",eg,[n.showItemNavigators?Se((V(),Z("button",{key:0,type:"button",class:ce(r.navBackwardClass),onClick:e[0]||(e[0]=i=>r.navBackward(i)),disabled:r.isNavBackwardDisabled()},rg,10,tg)),[[a]]):ie("",!0),J("div",{id:n.id+"_item_"+n.activeIndex,class:"p-galleria-item",role:"group","aria-label":r.ariaSlideNumber(n.activeIndex+1),"aria-roledescription":r.ariaSlideLabel},[n.templates.item?(V(),ge(Ae(n.templates.item),{key:0,item:r.activeItem},null,8,["item"])):ie("",!0)],8,ag),n.showItemNavigators?Se((V(),Z("button",{key:1,type:"button",class:ce(r.navForwardClass),onClick:e[1]||(e[1]=i=>r.navForward(i)),disabled:r.isNavForwardDisabled()},sg,10,ig)),[[a]]):ie("",!0),n.templates.caption?(V(),Z("div",lg,[n.templates.caption?(V(),ge(Ae(n.templates.caption),{key:0,item:r.activeItem},null,8,["item"])):ie("",!0)])):ie("",!0)]),n.showIndicators?(V(),Z("ul",cg,[(V(!0),Z(Pe,null,Je(n.value,(i,c)=>(V(),Z("li",{key:`p-galleria-indicator-${c}`,class:ce(["p-galleria-indicator",{"p-highlight":r.isIndicatorItemActive(c)}]),tabindex:"0","aria-label":r.ariaPageLabel(c+1),"aria-selected":n.activeIndex===c,"aria-controls":n.id+"_item_"+c,onClick:d=>r.onIndicatorClick(c),onMouseenter:d=>r.onIndicatorMouseEnter(c),onKeydown:d=>r.onIndicatorKeyDown(d,c)},[n.templates.indicator?ie("",!0):(V(),Z("button",_g)),n.templates.indicator?(V(),ge(Ae(n.templates.indicator),{key:1,index:c},null,8,["index"])):ie("",!0)],42,dg))),128))])):ie("",!0)])}od.render=ug;var sd={name:"GalleriaThumbnails",emits:["stop-slideshow","update:activeIndex"],props:{containerId:{type:String,default:null},value:{type:Array,default:null},numVisible:{type:Number,default:3},activeIndex:{type:Number,default:0},isVertical:{type:Boolean,default:!1},slideShowActive:{type:Boolean,default:!1},circular:{type:Boolean,default:!1},responsiveOptions:{type:Array,default:null},contentHeight:{type:String,default:"300px"},showThumbnailNavigators:{type:Boolean,default:!0},templates:{type:null,default:null},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},startPos:null,thumbnailsStyle:null,sortedResponsiveOptions:null,data(){return{d_numVisible:this.numVisible,d_oldNumVisible:this.numVisible,d_activeIndex:this.activeIndex,d_oldActiveItemIndex:this.activeIndex,totalShiftedItems:0,page:0}},watch:{numVisible(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},activeIndex(t,e){this.d_activeIndex=t,this.d_oldActiveItemIndex=e}},mounted(){this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners()},updated(){let t=this.totalShiftedItems;(this.d_oldNumVisible!==this.d_numVisible||this.d_oldActiveItemIndex!==this.d_activeIndex)&&(this.d_activeIndex<=this.getMedianItemIndex()?t=0:this.value.length-this.d_numVisible+this.getMedianItemIndex()<this.d_activeIndex?t=this.d_numVisible-this.value.length:this.value.length-this.d_numVisible<this.d_activeIndex&&this.d_numVisible%2===0?t=this.d_activeIndex*-1+this.getMedianItemIndex()+1:t=this.d_activeIndex*-1+this.getMedianItemIndex(),t!==this.totalShiftedItems&&(this.totalShiftedItems=t),this.$refs.itemsContainer.style.transform=this.isVertical?`translate3d(0, ${t*(100/this.d_numVisible)}%, 0)`:`translate3d(${t*(100/this.d_numVisible)}%, 0, 0)`,this.d_oldActiveItemIndex!==this.d_activeIndex&&(q.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.d_oldActiveItemIndex=this.d_activeIndex,this.d_oldNumVisible=this.d_numVisible)},beforeUnmount(){this.responsiveOptions&&this.unbindDocumentListeners(),this.thumbnailsStyle&&this.thumbnailsStyle.parentNode.removeChild(this.thumbnailsStyle)},methods:{step(t){let e=this.totalShiftedItems+t;t<0&&-1*e+this.d_numVisible>this.value.length-1?e=this.d_numVisible-this.value.length:t>0&&e>0&&(e=0),this.circular&&(t<0&&this.value.length-1===this.d_activeIndex?e=0:t>0&&this.d_activeIndex===0&&(e=this.d_numVisible-this.value.length)),this.$refs.itemsContainer&&(q.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical?`translate3d(0, ${e*(100/this.d_numVisible)}%, 0)`:`translate3d(${e*(100/this.d_numVisible)}%, 0, 0)`,this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=e},stopSlideShow(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},getMedianItemIndex(){let t=Math.floor(this.d_numVisible/2);return this.d_numVisible%2?t:t-1},navBackward(t){this.stopSlideShow();let e=this.d_activeIndex!==0?this.d_activeIndex-1:0,n=e+this.totalShiftedItems;this.d_numVisible-n-1>this.getMedianItemIndex()&&(-1*this.totalShiftedItems!==0||this.circular)&&this.step(1);let s=this.circular&&this.d_activeIndex===0?this.value.length-1:e;this.$emit("update:activeIndex",s),t.cancelable&&t.preventDefault()},navForward(t){this.stopSlideShow();let e=this.d_activeIndex===this.value.length-1?this.value.length-1:this.d_activeIndex+1;e+this.totalShiftedItems>this.getMedianItemIndex()&&(-1*this.totalShiftedItems<this.getTotalPageNumber()-1||this.circular)&&this.step(-1);let n=this.circular&&this.value.length-1===this.d_activeIndex?0:e;this.$emit("update:activeIndex",n),t.cancelable&&t.preventDefault()},onItemClick(t){this.stopSlideShow();let e=t;if(e!==this.d_activeIndex){const n=e+this.totalShiftedItems;let s=0;e<this.d_activeIndex?(s=this.d_numVisible-n-1-this.getMedianItemIndex(),s>0&&-1*this.totalShiftedItems!==0&&this.step(s)):(s=this.getMedianItemIndex()-n,s<0&&-1*this.totalShiftedItems<this.getTotalPageNumber()-1&&this.step(s)),this.$emit("update:activeIndex",e)}},onThumbnailKeydown(t,e){switch((t.code==="Enter"||t.code==="Space")&&(this.onItemClick(e),t.preventDefault()),t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":t.preventDefault();break;case"Tab":this.onTabKey();break}},onRightKey(){const t=q.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item"),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey(){const t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey(){const t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey(){const t=q.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item"),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey(){const t=[...q.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item")],e=t.findIndex(l=>q.hasClass(l,"p-galleria-thumbnail-item-current")),n=q.findSingle(this.$refs.itemsContainer,'.p-galleria-thumbnail-item > [tabindex="0"'),s=t.findIndex(l=>l===n.parentElement);t[s].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex(){const t=[...q.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item")],e=q.findSingle(this.$refs.itemsContainer,'.p-galleria-thumbnail-item > [tabindex="0"]');return t.findIndex(n=>n===e.parentElement)},changedFocusedIndicator(t,e){const n=q.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item");n[t].children[0].tabIndex="-1",n[e].children[0].tabIndex="0",n[e].children[0].focus()},onTransitionEnd(){this.$refs.itemsContainer&&(q.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="")},onTouchStart(t){let e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove(t){t.cancelable&&t.preventDefault()},onTouchEnd(t){let e=t.changedTouches[0];this.isVertical?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch(t,e){e<0?this.navForward(t):this.navBackward(t)},getTotalPageNumber(){return this.value.length>this.d_numVisible?this.value.length-this.d_numVisible+1:0},createStyle(){this.thumbnailsStyle||(this.thumbnailsStyle=document.createElement("style"),this.thumbnailsStyle.type="text/css",document.body.appendChild(this.thumbnailsStyle));let t=`
#${this.containerId} .p-galleria-thumbnail-item {
flex: 1 0 ${100/this.d_numVisible}%
}
`;if(this.responsiveOptions){this.sortedResponsiveOptions=[...this.responsiveOptions],this.sortedResponsiveOptions.sort((e,n)=>{const s=e.breakpoint,l=n.breakpoint;let r=null;return s==null&&l!=null?r=-1:s!=null&&l==null?r=1:s==null&&l==null?r=0:typeof s=="string"&&typeof l=="string"?r=s.localeCompare(l,void 0,{numeric:!0}):r=s<l?-1:s>l?1:0,-1*r});for(let e=0;e<this.sortedResponsiveOptions.length;e++){let n=this.sortedResponsiveOptions[e];t+=`
@media screen and (max-width: ${n.breakpoint}) {
#${this.containerId} .p-galleria-thumbnail-item {
flex: 1 0 ${100/n.numVisible}%
}
}
`}}this.thumbnailsStyle.innerHTML=t},calculatePosition(){if(this.$refs.itemsContainer&&this.sortedResponsiveOptions){let t=window.innerWidth,e={numVisible:this.numVisible};for(let n=0;n<this.sortedResponsiveOptions.length;n++){let s=this.sortedResponsiveOptions[n];parseInt(s.breakpoint,10)>=t&&(e=s)}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},bindDocumentListeners(){this.documentResizeListener||(this.documentResizeListener=()=>{this.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},isNavBackwardDisabled(){return!this.circular&&this.d_activeIndex===0||this.value.length<=this.d_numVisible},isNavForwardDisabled(){return!this.circular&&this.d_activeIndex===this.value.length-1||this.value.length<=this.d_numVisible},firstItemAciveIndex(){return this.totalShiftedItems*-1},lastItemActiveIndex(){return this.firstItemAciveIndex()+this.d_numVisible-1},isItemActive(t){return this.firstItemAciveIndex()<=t&&this.lastItemActiveIndex()>=t},ariaPageLabel(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{navBackwardClass(){return["p-galleria-thumbnail-prev p-link",{"p-disabled":this.isNavBackwardDisabled()}]},navForwardClass(){return["p-galleria-thumbnail-next p-link",{"p-disabled":this.isNavForwardDisabled()}]},navBackwardIconClass(){return["p-galleria-thumbnail-prev-icon pi",{"pi-chevron-left":!this.isVertical,"pi-chevron-up":this.isVertical}]},navForwardIconClass(){return["p-galleria-thumbnail-next-icon pi",{"pi-chevron-right":!this.isVertical,"pi-chevron-down":this.isVertical}]},ariaPrevButtonLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0}},directives:{ripple:Ze}};const pg={class:"p-galleria-thumbnail-wrapper"},mg={class:"p-galleria-thumbnail-container"},gg=["disabled","aria-label"],Eg=["aria-selected","aria-controls","onKeydown"],Sg=["tabindex","aria-label","aria-current","onClick"],fg=["disabled","aria-label"];function bg(t,e,n,s,l,r){const a=De("ripple");return V(),Z("div",pg,[J("div",mg,[n.showThumbnailNavigators?Se((V(),Z("button",Me({key:0,class:r.navBackwardClass,disabled:r.isNavBackwardDisabled(),type:"button","aria-label":r.ariaPrevButtonLabel,onClick:e[0]||(e[0]=i=>r.navBackward(i))},n.prevButtonProps),[J("span",{class:ce(r.navBackwardIconClass)},null,2)],16,gg)),[[a]]):ie("",!0),J("div",{class:"p-galleria-thumbnail-items-container",style:Et({height:n.isVertical?n.contentHeight:""})},[J("div",{ref:"itemsContainer",class:"p-galleria-thumbnail-items",role:"tablist",onTransitionend:e[1]||(e[1]=(...i)=>r.onTransitionEnd&&r.onTransitionEnd(...i)),onTouchstart:e[2]||(e[2]=i=>r.onTouchStart(i)),onTouchmove:e[3]||(e[3]=i=>r.onTouchMove(i)),onTouchend:e[4]||(e[4]=i=>r.onTouchEnd(i))},[(V(!0),Z(Pe,null,Je(n.value,(i,c)=>(V(),Z("div",{key:`p-galleria-thumbnail-item-${c}`,class:ce(["p-galleria-thumbnail-item",{"p-galleria-thumbnail-item-current":n.activeIndex===c,"p-galleria-thumbnail-item-active":r.isItemActive(c),"p-galleria-thumbnail-item-start":r.firstItemAciveIndex()===c,"p-galleria-thumbnail-item-end":r.lastItemActiveIndex()===c}]),role:"tab","aria-selected":n.activeIndex===c,"aria-controls":n.containerId+"_item_"+c,onKeydown:d=>r.onThumbnailKeydown(d,c)},[J("div",{class:"p-galleria-thumbnail-item-content",tabindex:n.activeIndex===c?"0":"-1","aria-label":r.ariaPageLabel(c+1),"aria-current":n.activeIndex===c?"page":void 0,onClick:d=>r.onItemClick(c)},[n.templates.thumbnail?(V(),ge(Ae(n.templates.thumbnail),{key:0,item:i},null,8,["item"])):ie("",!0)],8,Sg)],42,Eg))),128))],544)],4),n.showThumbnailNavigators?Se((V(),Z("button",Me({key:1,class:r.navForwardClass,disabled:r.isNavForwardDisabled(),type:"button","aria-label":r.ariaNextButtonLabel,onClick:e[5]||(e[5]=i=>r.navForward(i))},n.nextButtonProps),[J("span",{class:ce(r.navForwardIconClass)},null,2)],16,fg)),[[a]]):ie("",!0)])])}sd.render=bg;var ld={name:"GalleriaContent",inheritAttrs:!1,interval:null,emits:["activeitem-change","mask-hide"],data(){return{id:this.$attrs.id||Ke(),activeIndex:this.$attrs.activeIndex,numVisible:this.$attrs.numVisible,slideShowActive:!1}},watch:{"$attrs.value":function(t){t&&t.length<this.numVisible&&(this.numVisible=t.length)},"$attrs.activeIndex":function(t){this.activeIndex=t},"$attrs.numVisible":function(t){this.numVisible=t}},updated(){this.$emit("activeitem-change",this.activeIndex)},beforeUnmount(){this.slideShowActive&&this.stopSlideShow()},methods:{isAutoPlayActive(){return this.slideShowActive},startSlideShow(){this.interval=setInterval(()=>{let t=this.$attrs.circular&&this.$attrs.value.length-1===this.activeIndex?0:this.activeIndex+1;this.activeIndex=t},this.$attrs.transitionInterval),this.slideShowActive=!0},stopSlideShow(){this.interval&&clearInterval(this.interval),this.slideShowActive=!1},getPositionClass(t,e){const s=["top","left","bottom","right"].find(l=>l===e);return s?`${t}-${s}`:""},isVertical(){return this.$attrs.thumbnailsPosition==="left"||this.$attrs.thumbnailsPosition==="right"}},computed:{galleriaClass(){const t=this.$attrs.showThumbnails&&this.getPositionClass("p-galleria-thumbnails",this.$attrs.thumbnailsPosition),e=this.$attrs.showIndicators&&this.getPositionClass("p-galleria-indicators",this.$attrs.indicatorsPosition);return["p-galleria p-component",{"p-galleria-fullscreen":this.$attrs.fullScreen,"p-galleria-indicator-onitem":this.$attrs.showIndicatorsOnItem,"p-galleria-item-nav-onhover":this.$attrs.showItemNavigatorsOnHover&&!this.$attrs.fullScreen},t,e,this.$attrs.containerClass]},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{GalleriaItem:od,GalleriaThumbnails:sd},directives:{ripple:Ze}};const Tg=["id"],hg=["aria-label"],Cg=J("span",{class:"p-galleria-close-icon pi pi-times"},null,-1),Rg=[Cg],Ng={key:1,class:"p-galleria-header"},vg=["aria-live"],Og={key:2,class:"p-galleria-footer"};function Ig(t,e,n,s,l,r){const a=ye("GalleriaItem"),i=ye("GalleriaThumbnails"),c=De("ripple");return t.$attrs.value&&t.$attrs.value.length>0?(V(),Z("div",Me({key:0,id:l.id,class:r.galleriaClass,style:t.$attrs.containerStyle},t.$attrs.containerProps),[t.$attrs.fullScreen?Se((V(),Z("button",{key:0,autofocus:"",type:"button",class:"p-galleria-close p-link","aria-label":r.closeAriaLabel,onClick:e[0]||(e[0]=d=>t.$emit("mask-hide"))},Rg,8,hg)),[[c]]):ie("",!0),t.$attrs.templates&&t.$attrs.templates.header?(V(),Z("div",Ng,[(V(),ge(Ae(t.$attrs.templates.header)))])):ie("",!0),J("div",{class:"p-galleria-content","aria-live":t.$attrs.autoPlay?"polite":"off"},[ue(a,{id:l.id,activeIndex:l.activeIndex,"onUpdate:activeIndex":e[1]||(e[1]=d=>l.activeIndex=d),slideShowActive:l.slideShowActive,"onUpdate:slideShowActive":e[2]||(e[2]=d=>l.slideShowActive=d),value:t.$attrs.value,circular:t.$attrs.circular,templates:t.$attrs.templates,showIndicators:t.$attrs.showIndicators,changeItemOnIndicatorHover:t.$attrs.changeItemOnIndicatorHover,showItemNavigators:t.$attrs.showItemNavigators,autoPlay:t.$attrs.autoPlay,onStartSlideshow:r.startSlideShow,onStopSlideshow:r.stopSlideShow},null,8,["id","activeIndex","slideShowActive","value","circular","templates","showIndicators","changeItemOnIndicatorHover","showItemNavigators","autoPlay","onStartSlideshow","onStopSlideshow"]),t.$attrs.showThumbnails?(V(),ge(i,{key:0,activeIndex:l.activeIndex,"onUpdate:activeIndex":e[3]||(e[3]=d=>l.activeIndex=d),slideShowActive:l.slideShowActive,"onUpdate:slideShowActive":e[4]||(e[4]=d=>l.slideShowActive=d),containerId:l.id,value:t.$attrs.value,templates:t.$attrs.templates,numVisible:l.numVisible,responsiveOptions:t.$attrs.responsiveOptions,circular:t.$attrs.circular,isVertical:r.isVertical(),contentHeight:t.$attrs.verticalThumbnailViewPortHeight,showThumbnailNavigators:t.$attrs.showThumbnailNavigators,prevButtonProps:t.$attrs.prevButtonProps,nextButtonProps:t.$attrs.nextButtonProps,onStopSlideshow:r.stopSlideShow},null,8,["activeIndex","slideShowActive","containerId","value","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","prevButtonProps","nextButtonProps","onStopSlideshow"])):ie("",!0)],8,vg),t.$attrs.templates&&t.$attrs.templates.footer?(V(),Z("div",Og,[(V(),ge(Ae(t.$attrs.templates.footer)))])):ie("",!0)],16,Tg)):ie("",!0)}ld.render=Ig;var cd={name:"Galleria",inheritAttrs:!1,emits:["update:activeIndex","update:visible"],props:{id:{type:String,default:null},value:{type:Array,default:null},activeIndex:{type:Number,default:0},fullScreen:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},numVisible:{type:Number,default:3},responsiveOptions:{type:Array,default:null},showItemNavigators:{type:Boolean,default:!1},showThumbnailNavigators:{type:Boolean,default:!0},showItemNavigatorsOnHover:{type:Boolean,default:!1},changeItemOnIndicatorHover:{type:Boolean,default:!1},circular:{type:Boolean,default:!1},autoPlay:{type:Boolean,default:!1},transitionInterval:{type:Number,default:4e3},showThumbnails:{type:Boolean,default:!0},thumbnailsPosition:{type:String,default:"bottom"},verticalThumbnailViewPortHeight:{type:String,default:"300px"},showIndicators:{type:Boolean,default:!1},showIndicatorsOnItem:{type:Boolean,default:!1},indicatorsPosition:{type:String,default:"bottom"},baseZIndex:{type:Number,default:0},maskClass:{type:String,default:null},containerStyle:{type:null,default:null},containerClass:{type:null,default:null},containerProps:{type:null,default:null},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},container:null,mask:null,data(){return{containerVisible:this.visible}},updated(){this.fullScreen&&this.visible&&(this.containerVisible=this.visible)},beforeUnmount(){this.fullScreen&&q.removeClass(document.body,"p-overflow-hidden"),this.mask=null,this.container&&(ke.clear(this.container),this.container=null)},methods:{onBeforeEnter(t){ke.set("modal",t,this.baseZIndex||this.$primevue.config.zIndex.modal)},onEnter(t){this.mask.style.zIndex=String(parseInt(t.style.zIndex,10)-1),q.addClass(document.body,"p-overflow-hidden"),this.focus()},onBeforeLeave(){q.addClass(this.mask,"p-component-overlay-leave")},onAfterLeave(t){ke.clear(t),this.containerVisible=!1,q.removeClass(document.body,"p-overflow-hidden")},onActiveItemChange(t){this.activeIndex!==t&&this.$emit("update:activeIndex",t)},maskHide(){this.$emit("update:visible",!1)},containerRef(t){this.container=t},maskRef(t){this.mask=t},focus(){let t=this.container.$el.querySelector("[autofocus]");t&&t.focus()}},computed:{maskContentClass(){return["p-galleria-mask p-component-overlay p-component-overlay-enter",this.maskClass,{"p-input-filled":this.$primevue.config.inputStyle==="filled","p-ripple-disabled":this.$primevue.config.ripple===!1}]}},components:{GalleriaContent:ld,Portal:Li},directives:{focustrap:id}};const Ag=["role","aria-modal"];function yg(t,e,n,s,l,r){const a=ye("GalleriaContent"),i=ye("Portal"),c=De("focustrap");return n.fullScreen?(V(),ge(i,{key:0},{default:be(()=>[l.containerVisible?(V(),Z("div",{key:0,ref:r.maskRef,class:ce(r.maskContentClass),role:n.fullScreen?"dialog":"region","aria-modal":n.fullScreen?"true":void 0},[ue(yi,{name:"p-galleria",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onBeforeLeave:r.onBeforeLeave,onAfterLeave:r.onAfterLeave,appear:""},{default:be(()=>[n.visible?Se((V(),ge(a,Me({key:0,ref:r.containerRef},t.$props,{onMaskHide:r.maskHide,templates:t.$slots,onActiveitemChange:r.onActiveItemChange}),null,16,["onMaskHide","templates","onActiveitemChange"])),[[c]]):ie("",!0)]),_:1},8,["onBeforeEnter","onEnter","onBeforeLeave","onAfterLeave"])],10,Ag)):ie("",!0)]),_:1})):(V(),ge(a,Me({key:1},t.$props,{templates:t.$slots,onActiveitemChange:r.onActiveItemChange}),null,16,["templates","onActiveitemChange"]))}function Dg(t,e){e===void 0&&(e={});var n=e.insertAt;if(!(!t||typeof document>"u")){var s=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",n==="top"&&s.firstChild?s.insertBefore(l,s.firstChild):s.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t))}}var Lg=`
.p-galleria-content {
display: flex;
flex-direction: column;
}
.p-galleria-item-wrapper {
display: flex;
flex-direction: column;
position: relative;
}
.p-galleria-item-container {
position: relative;
display: flex;
height: 100%;
}
.p-galleria-item-nav {
position: absolute;
top: 50%;
margin-top: -0.5rem;
display: inline-flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.p-galleria-item-prev {
left: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.p-galleria-item-next {
right: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.p-galleria-item {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
}
.p-galleria-item-nav-onhover .p-galleria-item-nav {
pointer-events: none;
opacity: 0;
transition: opacity 0.2s ease-in-out;
}
.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav {
pointer-events: all;
opacity: 1;
}
.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled {
pointer-events: none;
}
.p-galleria-caption {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
/* Thumbnails */
.p-galleria-thumbnail-wrapper {
display: flex;
flex-direction: column;
overflow: auto;
flex-shrink: 0;
}
.p-galleria-thumbnail-prev,
.p-galleria-thumbnail-next {
align-self: center;
flex: 0 0 auto;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
position: relative;
}
.p-galleria-thumbnail-prev span,
.p-galleria-thumbnail-next span {
display: flex;
justify-content: center;
align-items: center;
}
.p-galleria-thumbnail-container {
display: flex;
flex-direction: row;
}
.p-galleria-thumbnail-items-container {
overflow: hidden;
width: 100%;
}
.p-galleria-thumbnail-items {
display: flex;
}
.p-galleria-thumbnail-item {
overflow: auto;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
opacity: 0.5;
}
.p-galleria-thumbnail-item:hover {
opacity: 1;
transition: opacity 0.3s;
}
.p-galleria-thumbnail-item-current {
opacity: 1;
}
/* Positions */
/* Thumbnails */
.p-galleria-thumbnails-left .p-galleria-content,
.p-galleria-thumbnails-right .p-galleria-content {
flex-direction: row;
}
.p-galleria-thumbnails-left .p-galleria-item-wrapper,
.p-galleria-thumbnails-right .p-galleria-item-wrapper {
flex-direction: row;
}
.p-galleria-thumbnails-left .p-galleria-item-wrapper,
.p-galleria-thumbnails-top .p-galleria-item-wrapper {
order: 2;
}
.p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper,
.p-galleria-thumbnails-top .p-galleria-thumbnail-wrapper {
order: 1;
}
.p-galleria-thumbnails-left .p-galleria-thumbnail-container,
.p-galleria-thumbnails-right .p-galleria-thumbnail-container {
flex-direction: column;
flex-grow: 1;
}
.p-galleria-thumbnails-left .p-galleria-thumbnail-items,
.p-galleria-thumbnails-right .p-galleria-thumbnail-items {
flex-direction: column;
height: 100%;
}
/* Indicators */
.p-galleria-indicators {
display: flex;
align-items: center;
justify-content: center;
}
.p-galleria-indicator > button {
display: inline-flex;
align-items: center;
}
.p-galleria-indicators-left .p-galleria-item-wrapper,
.p-galleria-indicators-right .p-galleria-item-wrapper {
flex-direction: row;
align-items: center;
}
.p-galleria-indicators-left .p-galleria-item-container,
.p-galleria-indicators-top .p-galleria-item-container {
order: 2;
}
.p-galleria-indicators-left .p-galleria-indicators,
.p-galleria-indicators-top .p-galleria-indicators {
order: 1;
}
.p-galleria-indicators-left .p-galleria-indicators,
.p-galleria-indicators-right .p-galleria-indicators {
flex-direction: column;
}
.p-galleria-indicator-onitem .p-galleria-indicators {
position: absolute;
display: flex;
}
.p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators {
top: 0;
left: 0;
width: 100%;
align-items: flex-start;
}
.p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators {
right: 0;
top: 0;
height: 100%;
align-items: flex-end;
}
.p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators {
bottom: 0;
left: 0;
width: 100%;
align-items: flex-end;
}
.p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators {
left: 0;
top: 0;
height: 100%;
align-items: flex-start;
}
/* FullScreen */
.p-galleria-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.p-galleria-close {
position: absolute;
top: 0;
right: 0;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.p-galleria-mask .p-galleria-item-nav {
position: fixed;
top: 50%;
margin-top: -0.5rem;
}
/* Animation */
.p-galleria-enter-active {
transition: all 150ms cubic-bezier(0, 0, 0.2, 1);
}
.p-galleria-leave-active {
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.p-galleria-enter-from,
.p-galleria-leave-to {
opacity: 0;
transform: scale(0.7);
}
.p-galleria-enter-active .p-galleria-item-nav {
opacity: 0;
}
/* Keyboard Support */
.p-items-hidden .p-galleria-thumbnail-item {
visibility: hidden;
}
.p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active {
visibility: visible;
}
`;Dg(Lg);cd.render=yg;var dd={name:"Dialog",inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:"pi pi-times"},maximizeIcon:{type:String,default:"pi pi-window-maximize"},minimizeIcon:{type:String,default:"pi pi-window-minimize"},closeButtonProps:{type:null,default:null},_instance:null},provide(){return{dialogRef:Xc(()=>this._instance)}},data(){return{containerVisible:this.visible,maximized:!1,focusable:!1}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&ke.clear(this.mask),this.container=null,this.mask=null},mounted(){this.breakpoints&&this.createStyle()},methods:{close(){this.$emit("update:visible",!1)},onBeforeEnter(t){t.setAttribute(this.attributeSelector,"")},onEnter(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&ke.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave(){this.modal&&q.addClass(this.mask,"p-component-overlay-leave")},onLeave(){this.$emit("hide"),this.focusable=!1},onAfterLeave(){this.autoZIndex&&ke.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick(t){this.dismissableMask&&this.modal&&this.mask===t.target&&this.close()},focus(){const t=n=>n.querySelector("[autofocus]");let e=this.$slots.footer&&t(this.footerContainer);e||(e=this.$slots.header&&t(this.headerContainer),e||(e=this.$slots.default&&t(this.content),e||(e=t(this.container)))),e&&(this.focusable=!0,e.focus())},maximize(t){this.maximized?(this.maximized=!1,this.$emit("unmaximize",t)):(this.maximized=!0,this.$emit("maximize",t)),this.modal||(this.maximized?q.addClass(document.body,"p-overflow-hidden"):q.removeClass(document.body,"p-overflow-hidden"))},enableDocumentSettings(){(this.modal||this.maximizable&&this.maximized)&&q.addClass(document.body,"p-overflow-hidden")},unbindDocumentState(){(this.modal||this.maximizable&&this.maximized)&&q.removeClass(document.body,"p-overflow-hidden")},onKeyDown(t){t.code==="Escape"&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},getPositionClass(){const e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(n=>n===this.position);return e?`p-dialog-${e}`:""},containerRef(t){this.container=t},maskRef(t){this.mask=t},contentRef(t){this.content=t},headerContainerRef(t){this.headerContainer=t},footerContainerRef(t){this.footerContainer=t},maximizableRef(t){this.maximizableButton=t},closeButtonRef(t){this.closeButton=t},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let t="";for(let e in this.breakpoints)t+=`
@media screen and (max-width: ${e}) {
.p-dialog[${this.attributeSelector}] {
width: ${this.breakpoints[e]} !important;
}
}
`;this.styleElement.innerHTML=t}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag(t){q.hasClass(t.target,"p-dialog-header-icon")||q.hasClass(t.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=t.pageX,this.lastPageY=t.pageY,this.container.style.margin="0",q.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener(){this.documentDragListener=t=>{if(this.dragging){let e=q.getOuterWidth(this.container),n=q.getOuterHeight(this.container),s=t.pageX-this.lastPageX,l=t.pageY-this.lastPageY,r=this.container.getBoundingClientRect(),a=r.left+s,i=r.top+l,c=q.getViewport();this.container.style.position="fixed",this.keepInViewport?(a>=this.minX&&a+e<c.width&&(this.lastPageX=t.pageX,this.container.style.left=a+"px"),i>=this.minY&&i+n<c.height&&(this.lastPageY=t.pageY,this.container.style.top=i+"px")):(this.lastPageX=t.pageX,this.container.style.left=a+"px",this.lastPageY=t.pageY,this.container.style.top=i+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener(){this.documentDragEndListener=t=>{this.dragging&&(this.dragging=!1,q.removeClass(document.body,"p-unselectable-text"),this.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maskClass(){return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":this.modal},this.getPositionClass()]},dialogClass(){return["p-dialog p-component",{"p-dialog-rtl":this.rtl,"p-dialog-maximized":this.maximizable&&this.maximized,"p-input-filled":this.$primevue.config.inputStyle==="filled","p-ripple-disabled":this.$primevue.config.ripple===!1}]},maximizeIconClass(){return["p-dialog-header-maximize-icon",{[this.maximizeIcon]:!this.maximized,[this.minimizeIcon]:this.maximized}]},ariaId(){return Ke()},ariaLabelledById(){return this.header!=null||this.$attrs["aria-labelledby"]!==null?this.ariaId+"_header":null},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector(){return Ke()},contentStyleClass(){return["p-dialog-content",this.contentClass]}},directives:{ripple:Ze,focustrap:id},components:{Portal:Li}};const Mg=["aria-labelledby","aria-modal"],xg=["id"],wg={class:"p-dialog-header-icons"},kg=["autofocus","tabindex"],Pg=["autofocus","aria-label"];function Ug(t,e,n,s,l,r){const a=ye("Portal"),i=De("ripple"),c=De("focustrap");return V(),ge(a,{appendTo:n.appendTo},{default:be(()=>[l.containerVisible?(V(),Z("div",{key:0,ref:r.maskRef,class:ce(r.maskClass),onClick:e[3]||(e[3]=(...d)=>r.onMaskClick&&r.onMaskClick(...d))},[ue(yi,{name:"p-dialog",onBeforeEnter:r.onBeforeEnter,onEnter:r.onEnter,onBeforeLeave:r.onBeforeLeave,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave,appear:""},{default:be(()=>[n.visible?Se((V(),Z("div",Me({key:0,ref:r.containerRef,class:r.dialogClass,role:"dialog","aria-labelledby":r.ariaLabelledById,"aria-modal":n.modal},t.$attrs),[n.showHeader?(V(),Z("div",{key:0,ref:r.headerContainerRef,class:"p-dialog-header",onMousedown:e[2]||(e[2]=(...d)=>r.initDrag&&r.initDrag(...d))},[We(t.$slots,"header",{},()=>[n.header?(V(),Z("span",{key:0,id:r.ariaLabelledById,class:"p-dialog-title"},Nt(n.header),9,xg)):ie("",!0)]),J("div",wg,[n.maximizable?Se((V(),Z("button",{key:0,ref:r.maximizableRef,autofocus:l.focusable,class:"p-dialog-header-icon p-dialog-header-maximize p-link",onClick:e[0]||(e[0]=(...d)=>r.maximize&&r.maximize(...d)),type:"button",tabindex:n.maximizable?"0":"-1"},[J("span",{class:ce(r.maximizeIconClass)},null,2)],8,kg)),[[i]]):ie("",!0),n.closable?Se((V(),Z("button",Me({key:1,ref:r.closeButtonRef,autofocus:l.focusable,class:"p-dialog-header-icon p-dialog-header-close p-link",onClick:e[1]||(e[1]=(...d)=>r.close&&r.close(...d)),"aria-label":r.closeAriaLabel,type:"button"},n.closeButtonProps),[J("span",{class:ce(["p-dialog-header-close-icon",n.closeIcon])},null,2)],16,Pg)),[[i]]):ie("",!0)])],544)):ie("",!0),J("div",Me({ref:r.contentRef,class:r.contentStyleClass,style:n.contentStyle},n.contentProps),[We(t.$slots,"default")],16),n.footer||t.$slots.footer?(V(),Z("div",{key:1,ref:r.footerContainerRef,class:"p-dialog-footer"},[We(t.$slots,"footer",{},()=>[Di(Nt(n.footer),1)])],512)):ie("",!0)],16,Mg)),[[c,{disabled:!n.modal}]]):ie("",!0)]),_:3},8,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],2)):ie("",!0)]),_:3},8,["appendTo"])}function Fg(t,e){e===void 0&&(e={});var n=e.insertAt;if(!(!t||typeof document>"u")){var s=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",n==="top"&&s.firstChild?s.insertBefore(l,s.firstChild):s.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t))}}var Bg=`
.p-dialog-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
pointer-events: none;
}
.p-dialog-mask.p-component-overlay {
pointer-events: auto;
}
.p-dialog {
display: flex;
flex-direction: column;
pointer-events: auto;
max-height: 90%;
transform: scale(1);
}
.p-dialog-content {
overflow-y: auto;
}
.p-dialog-header {
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
}
.p-dialog-footer {
flex-shrink: 0;
}
.p-dialog .p-dialog-header-icons {
display: flex;
align-items: center;
}
.p-dialog .p-dialog-header-icon {
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
}
/* Fluid */
.p-fluid .p-dialog-footer .p-button {
width: auto;
}
/* Animation */
/* Center */
.p-dialog-enter-active {
transition: all 150ms cubic-bezier(0, 0, 0.2, 1);
}
.p-dialog-leave-active {
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.p-dialog-enter-from,
.p-dialog-leave-to {
opacity: 0;
transform: scale(0.7);
}
/* Top, Bottom, Left, Right, Top* and Bottom* */
.p-dialog-top .p-dialog,
.p-dialog-bottom .p-dialog,
.p-dialog-left .p-dialog,
.p-dialog-right .p-dialog,
.p-dialog-topleft .p-dialog,
.p-dialog-topright .p-dialog,
.p-dialog-bottomleft .p-dialog,
.p-dialog-bottomright .p-dialog {
margin: 0.75rem;
transform: translate3d(0px, 0px, 0px);
}
.p-dialog-top .p-dialog-enter-active,
.p-dialog-top .p-dialog-leave-active,
.p-dialog-bottom .p-dialog-enter-active,
.p-dialog-bottom .p-dialog-leave-active,
.p-dialog-left .p-dialog-enter-active,
.p-dialog-left .p-dialog-leave-active,
.p-dialog-right .p-dialog-enter-active,
.p-dialog-right .p-dialog-leave-active,
.p-dialog-topleft .p-dialog-enter-active,
.p-dialog-topleft .p-dialog-leave-active,
.p-dialog-topright .p-dialog-enter-active,
.p-dialog-topright .p-dialog-leave-active,
.p-dialog-bottomleft .p-dialog-enter-active,
.p-dialog-bottomleft .p-dialog-leave-active,
.p-dialog-bottomright .p-dialog-enter-active,
.p-dialog-bottomright .p-dialog-leave-active {
transition: all 0.3s ease-out;
}
.p-dialog-top .p-dialog-enter-from,
.p-dialog-top .p-dialog-leave-to {
transform: translate3d(0px, -100%, 0px);
}
.p-dialog-bottom .p-dialog-enter-from,
.p-dialog-bottom .p-dialog-leave-to {
transform: translate3d(0px, 100%, 0px);
}
.p-dialog-left .p-dialog-enter-from,
.p-dialog-left .p-dialog-leave-to,
.p-dialog-topleft .p-dialog-enter-from,
.p-dialog-topleft .p-dialog-leave-to,
.p-dialog-bottomleft .p-dialog-enter-from,
.p-dialog-bottomleft .p-dialog-leave-to {
transform: translate3d(-1