bkui-vue 0.0.1-beta.364 → 0.0.1-beta.365

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/index.cjs.js CHANGED
@@ -55,7 +55,7 @@ ${oo(n)}`),i}})}function HC(e){const t=Object.keys(e),n=t.filter(s=>{var o;retur
55
55
  * @return {boolean} True if the event is supported.
56
56
  * @internal
57
57
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
58
- */function Ew(e,t){if(!L6.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i=typeof s[n]=="function"}return!i&&k6&&e==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var Aw=Ew,Pw=jw,Vw=Aw,l9=10,o9=40,c9=800;function T6(e){var t=0,n=0,i=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),i=t*l9,s=n*l9,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(e.deltaMode==1?(i*=o9,s*=o9):(i*=c9,s*=c9)),i&&!t&&(t=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:i,pixelY:s}}T6.getEventType=function(){return Pw.firefox()?"DOMMouseScroll":Vw("wheel")?"wheel":"mousewheel"};var Jw=T6,Rw=Jw;const Qw=typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,_w=function(e,t){e!=null&&e.addEventListener&&e.addEventListener(Qw?"DOMMouseScroll":"mousewheel",function(n){const i=Rw(n);t==null||t.apply(this,[n,i])})},Ww={beforeMount(e,t){console.error(e,t),_w(e,t.value)}},Hw=e=>typeof Element=="undefined"?!1:e instanceof Element,Ji=new Map;let x6;document.addEventListener("mousedown",e=>x6=e);document.addEventListener("mouseup",e=>{for(const t of Ji.values())for(const{documentHandler:n}of t)n(e,x6)});function u9(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:Hw(t.arg)&&n.push(t.arg),function(i,s){const{popperRef:o}=t.instance,c=i.target,d=s==null?void 0:s.target,u=!t||!t.instance,f=!c||!d,m=e.contains(c)||e.contains(d),v=e===c,y=n.length&&n.some(C=>C==null?void 0:C.contains(c))||n.length&&n.includes(d),p=o&&(o.contains(c)||o.contains(d));u||f||m||v||y||p||t.value(i,s)}}const En={beforeMount(e,t){Ji.has(e)||Ji.set(e,[]),Ji.get(e).push({documentHandler:u9(e,t),bindingFn:t.value})},updated(e,t){Ji.has(e)||Ji.set(e,[]);const n=Ji.get(e),i=n.findIndex(o=>o.bindingFn===t.oldValue),s={documentHandler:u9(e,t),bindingFn:t.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(e){Ji.delete(e)}};En.install=e=>{e.directive("bkTooltips",En)};const Hi=new Map,Io={beforeMount(e,t){const n=d9(t),{trigger:i}=n,s=Fw(n);if(i==="hover"){let o=null;e.addEventListener("mouseenter",()=>{Ou(e),clearTimeout(o)}),s.addEventListener("mouseenter",()=>{clearTimeout(o)}),e.addEventListener("mouseleave",()=>{o=setTimeout(()=>{Ja(e)},100)}),e.addEventListener("click",()=>{Ja(e)}),s.addEventListener("mouseleave",()=>{o=setTimeout(()=>{Ja(e)},100)})}else i==="click"&&document.body.addEventListener("click",o=>{e.contains(o.target)&&!s.hasAttribute("data-show")?Ou(e):s.hasAttribute("data-show")&&Ja(e)});Hi.set(e,{opts:n,popper:s,popperInstance:null})},updated(e,t){Hi.get(e).opts=d9(t)},unmounted(e){Ja(e),Hi.delete(e)}};function Bw(){return{arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,extCls:"",onShow:()=>{},onHide:()=>{}}}function d9(e){const t=Bw();return typeof e.value=="object"?Object.assign(t,e.value):t.content=e.value,t}function Fw(e){const{content:t,arrow:n,theme:i,extCls:s}=e,o=i==="light",c=Kn.getPopperIndex(),d=document.createElement("div");if(d.className=`bk-popper ${o?"light":"dark"} ${s}`,d.innerText=t,d.style.zIndex=String(c),n){const u=S6();d.appendChild(u)}return d}function S6(){const e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function Gw(e,t){const{opts:n}=Hi.get(e),{placement:i,distance:s,showOnInit:o}=n,c=A3(e,t,{placement:i,modifiers:[{name:"offset",options:{offset:[0,s]}}]});return o&&Ou(e),c}function Ou(e){const{popper:t,opts:n}=Hi.get(e),{disabled:i,content:s,arrow:o,onShow:c}=n;if(i)return;if(t.innerText=s,o){const u=S6();t.appendChild(u)}document.body.appendChild(t);const d=Gw(e,t);c(),t.setAttribute("data-show",""),d.setOptions(u=>Te(Y({},u),{modifiers:[...u.modifiers,{name:"eventListeners",enabled:!0}]})),d.forceUpdate(),Hi.get(e).popperInstance=d}function Ja(e){if(!Hi.get(e))return;const{popper:t,popperInstance:n,opts:i}=Hi.get(e),{onHide:s}=i;t&&document.body.contains(t)&&(t.removeAttribute("data-show"),n==null||n.destroy(),document.body.removeChild(t),s())}const iu={},Eu=e=>document.querySelector(e)instanceof HTMLElement,Zw=()=>(iu.fullscreenReferId||(iu.fullscreenReferId=`id_${Bi.v4()}`),iu.fullscreenReferId);function Bd(e){let t=null,n=null,i=null;const s=Te(Y({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),o=y=>y instanceof Element||y instanceof HTMLDocument,c={name:"$popover",setup(y,{expose:p}){const C=r.ref(s),k=r.ref(),T=r.ref({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),L=O=>{if(o(O)){const{x:B,y:W,width:ne,height:oe}=O.getBoundingClientRect();Object.assign(T.value,{width:`${ne}px`,height:`${oe}px`,transform:`translate3d(${B}px,${W}px,0)`});return}const{clientX:_,clientY:E}=O;Object.assign(T.value,{transform:`translate3d(${_}px,${E}px,0)`,width:"10px",height:"10px"})};L(C.value.target);const M=()=>{setTimeout(()=>{var O,_;(_=(O=k.value)==null?void 0:O.show)==null||_.call(O)})},b=()=>{var O,_;(_=(O=k.value)==null?void 0:O.hide)==null||_.call(O)},N=()=>{var O,_;(_=(O=k.value)==null?void 0:O.stopHide)==null||_.call(O)},I=r.computed(()=>{const O=["target"];return Object.keys(C.value).filter(_=>!O.includes(_)).reduce((_,E)=>Te(Y({},_),{[E]:C.value[E]}),{})}),x=O=>{var _,E;C.value.target=O,L(O),(E=(_=k.value)==null?void 0:_.updatePopover)==null||E.call(_),r.nextTick(()=>{var B,W;(W=(B=k.value)==null?void 0:B.updatePopover)==null||W.call(B)})},z=()=>{var O;(O=s.onContentMouseenter)==null||O.call(s)},D=()=>{var O;(O=s.onContentMouseleave)==null||O.call(s)};return p({show:M,hide:b,updateTarget:x,stopHide:N}),()=>r.createVNode(_6,r.mergeProps(I.value,{ref:k,onContentMouseenter:z,onContentMouseleave:D}),{default:()=>[r.createVNode("span",{style:T.value},null)]})}};function d(y){return/^body$/i.test(y)?document.body:/^parent$/i.test(y)?o(s.target)?s.target.parentNode:s.target.target.parentNode:typeof y=="string"&&Eu(y)?document.querySelector(y):document.body}t===null&&(i=document.createElement("div"),d(s.boundary).append(i),setTimeout(()=>{t=r.createApp(c),n=t.mount(i)}));function u(){t&&(t.unmount(),n=null,t=null,i.remove())}function f(){n==null||n.show()}function m(y){n==null||n.updateTarget(y)}function v(){n==null||n.hide()}return{close:u,show:f,hide:v,update:m,get vm(){return n},get $el(){return n.$el}}}const f9=(e,t)=>{const n={content:"",target:e};return typeof t.value=="object"?Object.assign(n,t.value):n.content=t.value,n},Fd=(e,t)=>{let n=null,i=null,s=null;const o=f9(e,t),{disabled:c}=o;if(c||n)return;const d=()=>{s&&clearTimeout(s),s=null},u=()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},f=()=>{i&&clearTimeout(i),i=setTimeout(()=>{const y=f9(e,t);y.content=y.content||e.innerHTML,Object.assign(y,{onContentMouseenter:d,onContentMouseleave:u}),n=Bd(y),setTimeout(()=>{n.show()})},100)},m=()=>{s=setTimeout(()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},120)};return e.addEventListener("mouseenter",f),e.addEventListener("mouseleave",m),Object.assign(t,{__cached:{handleMouseEnter:f,handleMouseLeave:m}}),{destroyInstance:y=>{var p,C;m(),(p=y!=null?y:e)==null||p.removeEventListener("mouseenter",f),(C=y!=null?y:e)==null||C.removeEventListener("mouseleave",m)},instance:n}},Yw={mounted(e,t){Fd(e,t)},beforeUnmount(e,t){if(t.__cached){const{handleMouseEnter:n,handleMouseLeave:i}=t.__cached;e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",i),t.__cached=null}}};var h9=r.defineComponent({name:"PopArrow",render(){const e=je("pop2-arrow");return r.createVNode("div",{class:e},null)}});const Hr=(...e)=>!0;let jn;(function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"})(jn||(jn={}));const Uw={[jn.SHOW]:Hr,[jn.HIDE]:Hr,[jn.CLICK_OUTSIDE]:Hr,[jn.CONTENT_MOUSEENTER]:Hr,[jn.CONTENT_MOUSELEAVE]:Hr,[jn.STOP_HIDE]:Hr};var g9=r.defineComponent({name:"PopContent",props:{width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),maxHeight:g.oneOfType([g.string,g.number]).def("auto")},setup(e){const t=i=>/^\d+\.?\d*$/.test(`${i}`)?`${i}px`:i;return{style:r.computed(()=>({width:t(e.width),height:t(e.height),maxHeight:t(e.maxHeight)}))}},render(){var t,n,i,s,o,c;const e=[je("popover"),je("pop2-content")];return r.createVNode("div",{class:e,tabindex:"-1",style:this.style},[(i=(n=(t=this.$slots).arrow)==null?void 0:n.call(t))!=null?i:"",(c=(o=(s=this.$slots).default)==null?void 0:o.call(s))!=null?c:""])}});const $w={onAfterHidden:Function,onAfterShow:Function},Kw=Y({isShow:g.bool.def(!1),always:g.bool.def(!1),disabled:g.bool.def(!1),width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),maxHeight:g.oneOfType([g.string,g.number]).def("auto"),content:g.oneOfType([g.string,g.number]).def(""),placement:Y3().def(Rl.TOP),theme:g.string.def("dark"),trigger:U3(),renderType:ZC(),arrow:g.bool.def(!0),padding:g.number.def(5),offset:g.oneOfType([g.number,g.shape({})]).def(6),boundary:g.oneOfType([g.string.def("parent"),g.instanceOf(HTMLElement)]),zIndex:g.number.def(void 0),disableTeleport:g.bool.def(!1),autoPlacement:g.bool.def(!1),autoVisibility:g.bool.def(!0),disableOutsideClick:g.bool.def(!1),disableTransform:g.bool.def(!1),reference:g.any.def(null),modifiers:g.array.def([]),popoverDelay:g.number.def(100)},$w);var Xw=r.defineComponent({name:"PopReference",render(){var e,t,n;return(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""}}),m9=r.defineComponent({props:{class:g.string.def("")},render(){var e,t;return r.createVNode(r.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});function bi(e){return e.split("-")[0]}function Cr(e){return e.split("-")[1]}function ga(e){return["top","bottom"].includes(bi(e))?"x":"y"}function Gd(e){return e==="y"?"height":"width"}function v9(e,t,n){let{reference:i,floating:s}=e;const o=i.x+i.width/2-s.width/2,c=i.y+i.height/2-s.height/2,d=ga(t),u=Gd(d),f=i[u]/2-s[u]/2,m=bi(t),v=d==="x";let y;switch(m){case"top":y={x:o,y:i.y-s.height};break;case"bottom":y={x:o,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:c};break;case"left":y={x:i.x-s.width,y:c};break;default:y={x:i.x,y:i.y}}switch(Cr(t)){case"start":y[d]-=f*(n&&v?-1:1);break;case"end":y[d]+=f*(n&&v?-1:1);break}return y}const qw=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:c}=n,d=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:m}=v9(u,i,d),v=i,y={};for(let p=0;p<o.length;p++){const{name:C,fn:k}=o[p],{x:T,y:L,data:M,reset:b}=await k({x:f,y:m,initialPlacement:i,placement:v,strategy:s,middlewareData:y,rects:u,platform:c,elements:{reference:e,floating:t}});if(f=T!=null?T:f,m=L!=null?L:m,y=Te(Y({},y),{[C]:Y(Y({},y[C]),M)}),b){typeof b=="object"&&(b.placement&&(v=b.placement),b.rects&&(u=b.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):b.rects),{x:f,y:m}=v9(u,v,d)),p=-1;continue}}return{x:f,y:m,placement:v,strategy:s,middlewareData:y}};function eM(e){return Y({top:0,right:0,bottom:0,left:0},e)}function Zd(e){return typeof e!="number"?eM(e):{top:e,right:e,bottom:e,left:e}}function us(e){return Te(Y({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function ds(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:c,elements:d,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:v="floating",altBoundary:y=!1,padding:p=0}=t,C=Zd(p),T=d[y?v==="floating"?"reference":"floating":v],L=us(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(T)))==null||n?T:T.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:f,rootBoundary:m,strategy:u})),M=us(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v==="floating"?Te(Y({},c.floating),{x:i,y:s}):c.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),strategy:u}):c[v]);return{top:L.top-M.top+C.top,bottom:M.bottom-L.bottom+C.bottom,left:L.left-M.left+C.left,right:M.right-L.right+C.right}}const D6=Math.min,j6=Math.max;function Au(e,t,n){return j6(e,D6(t,n))}const tM=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:i=0}=e!=null?e:{},{x:s,y:o,placement:c,rects:d,platform:u}=t;if(n==null)return{};const f=Zd(i),m={x:s,y:o},v=ga(c),y=Cr(c),p=Gd(v),C=await u.getDimensions(n),k=v==="y"?"top":"left",T=v==="y"?"bottom":"right",L=d.reference[p]+d.reference[v]-m[v]-d.floating[p],M=m[v]-d.reference[v],b=await(u.getOffsetParent==null?void 0:u.getOffsetParent(n));let N=b?v==="y"?b.clientHeight||0:b.clientWidth||0:0;N===0&&(N=d.floating[p]);const I=L/2-M/2,x=f[k],z=N-C[p]-f[T],D=N/2-C[p]/2+I,O=Au(x,D,z),B=(y==="start"?f[k]:f[T])>0&&D!==O&&d.reference[p]<=d.floating[p]?D<x?x-D:z-D:0;return{[v]:m[v]-B,data:{[v]:O,centerOffset:D-O}}}}),nM={left:"right",right:"left",bottom:"top",top:"bottom"};function Hl(e){return e.replace(/left|right|bottom|top/g,t=>nM[t])}function z6(e,t,n){n===void 0&&(n=!1);const i=Cr(e),s=ga(e),o=Gd(s);let c=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=Hl(c)),{main:c,cross:Hl(c)}}const iM={start:"end",end:"start"};function Pu(e){return e.replace(/start|end/g,t=>iM[t])}const O6=["top","right","bottom","left"],rM=O6.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function aM(e,t,n){return(e?[...n.filter(s=>Cr(s)===e),...n.filter(s=>Cr(s)!==e)]:n.filter(s=>bi(s)===s)).filter(s=>e?Cr(s)===e||(t?Pu(s)!==s:!1):!0)}const sM=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,s,o,c;const{x:d,y:u,rects:f,middlewareData:m,placement:v,platform:y,elements:p}=t,ne=e,{alignment:C=null,allowedPlacements:k=rM,autoAlignment:T=!0}=ne,L=ur(ne,["alignment","allowedPlacements","autoAlignment"]),M=aM(C,T,k),b=await ds(t,L),N=(n=(i=m.autoPlacement)==null?void 0:i.index)!=null?n:0,I=M[N];if(I==null)return{};const{main:x,cross:z}=z6(I,f,await(y.isRTL==null?void 0:y.isRTL(p.floating)));if(v!==I)return{x:d,y:u,reset:{placement:M[0]}};const D=[b[bi(I)],b[x],b[z]],O=[...(s=(o=m.autoPlacement)==null?void 0:o.overflows)!=null?s:[],{placement:I,overflows:D}],_=M[N+1];if(_)return{data:{index:N+1,overflows:O},reset:{placement:_}};const E=O.slice().sort((oe,we)=>oe.overflows[0]-we.overflows[0]),B=(c=E.find(oe=>{let{overflows:we}=oe;return we.every(Ie=>Ie<=0)}))==null?void 0:c.placement,W=B!=null?B:E[0].placement;return W!==v?{data:{index:N+1,overflows:O},reset:{placement:W}}:{}}}};function lM(e){const t=Hl(e);return[Pu(e),t,Pu(t)]}const oM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:i,middlewareData:s,rects:o,initialPlacement:c,platform:d,elements:u}=t,O=e,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",flipAlignment:p=!0}=O,C=ur(O,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),k=bi(i),L=v||(k===c||!p?[Hl(c)]:lM(c)),M=[c,...L],b=await ds(t,C),N=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&N.push(b[k]),m){const{main:_,cross:E}=z6(i,o,await(d.isRTL==null?void 0:d.isRTL(u.floating)));N.push(b[_],b[E])}if(I=[...I,{placement:i,overflows:N}],!N.every(_=>_<=0)){var x,z;const _=((x=(z=s.flip)==null?void 0:z.index)!=null?x:0)+1,E=M[_];if(E)return{data:{index:_,overflows:I},reset:{placement:E}};let B="bottom";switch(y){case"bestFit":{var D;const W=(D=I.map(ne=>[ne,ne.overflows.filter(oe=>oe>0).reduce((oe,we)=>oe+we,0)]).sort((ne,oe)=>ne[1]-oe[1])[0])==null?void 0:D[0].placement;W&&(B=W);break}case"initialPlacement":B=c;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function p9(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function b9(e){return O6.some(t=>e[t]>=0)}const cM=function(e){let i=e===void 0?{}:e,{strategy:t="referenceHidden"}=i,n=ur(i,["strategy"]);return{name:"hide",async fn(s){const{rects:o}=s;switch(t){case"referenceHidden":{const c=await ds(s,Te(Y({},n),{elementContext:"reference"})),d=p9(c,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:b9(d)}}}case"escaped":{const c=await ds(s,Te(Y({},n),{altBoundary:!0})),d=p9(c,o.floating);return{data:{escapedOffsets:d,escaped:b9(d)}}}default:return{}}}}};async function uM(e,t){const{placement:n,platform:i,elements:s}=e,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=bi(n),d=Cr(n),u=ga(n)==="x",f=["left","top"].includes(c)?-1:1,m=o&&u?-1:1,v=typeof t=="function"?t(e):t;let{mainAxis:y,crossAxis:p,alignmentAxis:C}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:Y({mainAxis:0,crossAxis:0,alignmentAxis:null},v);return d&&typeof C=="number"&&(p=d==="end"?C*-1:C),u?{x:p*m,y:y*f}:{x:y*f,y:p*m}}const dM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:i}=t,s=await uM(t,e);return{x:n+s.x,y:i+s.y,data:s}}}};function fM(e){return e==="x"?"y":"x"}const hM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,T=e,{mainAxis:o=!0,crossAxis:c=!1,limiter:d={fn:L=>{let{x:M,y:b}=L;return{x:M,y:b}}}}=T,u=ur(T,["mainAxis","crossAxis","limiter"]),f={x:n,y:i},m=await ds(t,u),v=ga(bi(s)),y=fM(v);let p=f[v],C=f[y];if(o){const L=v==="y"?"top":"left",M=v==="y"?"bottom":"right",b=p+m[L],N=p-m[M];p=Au(b,p,N)}if(c){const L=y==="y"?"top":"left",M=y==="y"?"bottom":"right",b=C+m[L],N=C-m[M];C=Au(b,C,N)}const k=d.fn(Te(Y({},t),{[v]:p,[y]:C}));return Te(Y({},k),{data:{x:k.x-n,y:k.y-i}})}}},gM=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:i,elements:s,rects:o,platform:c,strategy:d}=t,{padding:u=2,x:f,y:m}=e,v=us(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(c.getOffsetParent==null?void 0:c.getOffsetParent(s.floating)),strategy:d}):o.reference),y=(n=await(c.getClientRects==null?void 0:c.getClientRects(s.reference)))!=null?n:[],p=Zd(u);function C(){if(y.length===2&&y[0].left>y[1].right&&f!=null&&m!=null){var T;return(T=y.find(L=>f>L.left-p.left&&f<L.right+p.right&&m>L.top-p.top&&m<L.bottom+p.bottom))!=null?T:v}if(y.length>=2){if(ga(i)==="x"){const E=y[0],B=y[y.length-1],W=bi(i)==="top",ne=E.top,oe=B.bottom,we=W?E.left:B.left,Ie=W?E.right:B.right,de=Ie-we,fe=oe-ne;return{top:ne,bottom:oe,left:we,right:Ie,width:de,height:fe,x:we,y:ne}}const L=bi(i)==="left",M=j6(...y.map(E=>E.right)),b=D6(...y.map(E=>E.left)),N=y.filter(E=>L?E.left===b:E.right===M),I=N[0].top,x=N[N.length-1].bottom,z=b,D=M,O=D-z,_=x-I;return{top:I,bottom:x,left:z,right:D,width:O,height:_,x:z,y:I}}return v}const k=await c.getElementRects({reference:{getBoundingClientRect:C},floating:s.floating,strategy:d});return o.reference.x!==k.reference.x||o.reference.y!==k.reference.y||o.reference.width!==k.reference.width||o.reference.height!==k.reference.height?{reset:{rects:k}}:{}}}};function E6(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function wi(e){if(e==null)return window;if(!E6(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function ws(e){return wi(e).getComputedStyle(e)}function yi(e){return E6(e)?"":e?(e.nodeName||"").toLowerCase():""}function A6(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function qn(e){return e instanceof wi(e).HTMLElement}function Zi(e){return e instanceof wi(e).Element}function mM(e){return e instanceof wi(e).Node}function Yd(e){if(typeof ShadowRoot=="undefined")return!1;const t=wi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function No(e){const{overflow:t,overflowX:n,overflowY:i}=ws(e);return/auto|scroll|overlay|hidden/.test(t+i+n)}function vM(e){return["table","td","th"].includes(yi(e))}function P6(e){const t=/firefox/i.test(A6()),n=ws(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function V6(){return!/^((?!chrome|android).)*safari/i.test(A6())}const y9=Math.min,Xa=Math.max,Bl=Math.round;function Ci(e,t,n){var i,s,o,c;t===void 0&&(t=!1),n===void 0&&(n=!1);const d=e.getBoundingClientRect();let u=1,f=1;t&&qn(e)&&(u=e.offsetWidth>0&&Bl(d.width)/e.offsetWidth||1,f=e.offsetHeight>0&&Bl(d.height)/e.offsetHeight||1);const m=Zi(e)?wi(e):window,v=!V6()&&n,y=(d.left+(v&&(i=(s=m.visualViewport)==null?void 0:s.offsetLeft)!=null?i:0))/u,p=(d.top+(v&&(o=(c=m.visualViewport)==null?void 0:c.offsetTop)!=null?o:0))/f,C=d.width/u,k=d.height/f;return{width:C,height:k,top:p,right:y+C,bottom:p+k,left:y,x:y,y:p}}function Ui(e){return((mM(e)?e.ownerDocument:e.document)||window.document).documentElement}function Lo(e){return Zi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function J6(e){return Ci(Ui(e)).left+Lo(e).scrollLeft}function pM(e){const t=Ci(e);return Bl(t.width)!==e.offsetWidth||Bl(t.height)!==e.offsetHeight}function bM(e,t,n){const i=qn(t),s=Ui(t),o=Ci(e,i&&pM(t),n==="fixed");let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if(i||!i&&n!=="fixed")if((yi(t)!=="body"||No(s))&&(c=Lo(t)),qn(t)){const u=Ci(t,!0);d.x=u.x+t.clientLeft,d.y=u.y+t.clientTop}else s&&(d.x=J6(s));return{x:o.left+c.scrollLeft-d.x,y:o.top+c.scrollTop-d.y,width:o.width,height:o.height}}function R6(e){return yi(e)==="html"?e:e.assignedSlot||e.parentNode||(Yd(e)?e.host:null)||Ui(e)}function C9(e){return!qn(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function yM(e){let t=R6(e);for(Yd(t)&&(t=t.host);qn(t)&&!["html","body"].includes(yi(t));){if(P6(t))return t;t=t.parentNode}return null}function Vu(e){const t=wi(e);let n=C9(e);for(;n&&vM(n)&&getComputedStyle(n).position==="static";)n=C9(n);return n&&(yi(n)==="html"||yi(n)==="body"&&getComputedStyle(n).position==="static"&&!P6(n))?t:n||yM(e)||t}function w9(e){if(qn(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Ci(e);return{width:t.width,height:t.height}}function CM(e){let{rect:t,offsetParent:n,strategy:i}=e;const s=qn(n),o=Ui(n);if(n===o)return t;let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if((s||!s&&i!=="fixed")&&((yi(n)!=="body"||No(o))&&(c=Lo(n)),qn(n))){const u=Ci(n,!0);d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}return Te(Y({},t),{x:t.x-c.scrollLeft+d.x,y:t.y-c.scrollTop+d.y})}function wM(e,t){const n=wi(e),i=Ui(e),s=n.visualViewport;let o=i.clientWidth,c=i.clientHeight,d=0,u=0;if(s){o=s.width,c=s.height;const f=V6();(f||!f&&t==="fixed")&&(d=s.offsetLeft,u=s.offsetTop)}return{width:o,height:c,x:d,y:u}}function MM(e){var t;const n=Ui(e),i=Lo(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=Xa(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=Xa(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-i.scrollLeft+J6(e);const u=-i.scrollTop;return ws(s||n).direction==="rtl"&&(d+=Xa(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:d,y:u}}function Q6(e){const t=R6(e);return["html","body","#document"].includes(yi(t))?e.ownerDocument.body:qn(t)&&No(t)?t:Q6(t)}function Fl(e,t){var n;t===void 0&&(t=[]);const i=Q6(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=wi(i),c=s?[o].concat(o.visualViewport||[],No(i)?i:[]):i,d=t.concat(c);return s?d:d.concat(Fl(c))}function IM(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yd(n)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function NM(e,t){const n=Ci(e,!1,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft;return{top:i,left:s,x:s,y:i,right:s+e.clientWidth,bottom:i+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function M9(e,t,n){return t==="viewport"?us(wM(e,n)):Zi(t)?NM(t,n):us(MM(Ui(e)))}function LM(e){const t=Fl(e),i=["absolute","fixed"].includes(ws(e).position)&&qn(e)?Vu(e):e;return Zi(i)?t.filter(s=>Zi(s)&&IM(s,i)&&yi(s)!=="body"):[]}function kM(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const c=[...n==="clippingAncestors"?LM(t):[].concat(n),i],d=c[0],u=c.reduce((f,m)=>{const v=M9(t,m,s);return f.top=Xa(v.top,f.top),f.right=y9(v.right,f.right),f.bottom=y9(v.bottom,f.bottom),f.left=Xa(v.left,f.left),f},M9(t,d,s));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}const TM={getClippingRect:kM,convertOffsetParentRelativeRectToViewportRelativeRect:CM,isElement:Zi,getDimensions:w9,getOffsetParent:Vu,getDocumentElement:Ui,getElementRects:e=>{let{reference:t,floating:n,strategy:i}=e;return{reference:bM(t,Vu(n),i),floating:Te(Y({},w9(n)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>ws(e).direction==="rtl"};function xM(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:c=!0,animationFrame:d=!1}=i,u=s&&!d,f=o&&!d,m=u||f?[...Zi(e)?Fl(e):[],...Fl(t)]:[];m.forEach(k=>{u&&k.addEventListener("scroll",n,{passive:!0}),f&&k.addEventListener("resize",n)});let v=null;c&&(v=new ResizeObserver(n),Zi(e)&&!d&&v.observe(e),v.observe(t));let y,p=d?Ci(e):null;d&&C();function C(){const k=Ci(e);p&&(k.x!==p.x||k.y!==p.y||k.width!==p.width||k.height!==p.height)&&n(),p=k,y=requestAnimationFrame(C)}return c||n(),()=>{var k;m.forEach(T=>{u&&T.removeEventListener("scroll",n),f&&T.removeEventListener("resize",n)}),(k=v)==null||k.disconnect(),v=null,d&&cancelAnimationFrame(y)}}const SM=(e,t,n)=>qw(e,t,Y({platform:TM},n));var DM=e=>({getElementRects:({reference:s,floating:o})=>{const c=s.getBoundingClientRect(),d=o.getBoundingClientRect();return{reference:{width:c.width,height:c.height,x:c.x,y:c.y},floating:{width:d.width,height:d.height,x:d.x,y:d.y}}},getDimensions:s=>{const{width:o,height:c}=s.getBoundingClientRect();return{width:o,height:c}},getClippingRect:({})=>{var c;const{width:s=0,height:o=0}=(c=e==null?void 0:e.getBoundingClientRect())!=null?c:{};return{width:s,height:o,x:0,y:0}}}),jM=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{const c=r.ref(!1),d=r.ref(),u=()=>{var X,le,Z;const se=L((X=n.value)==null?void 0:X.$el);return(le=document.fullscreenElement)!=null&&le.shadowRoot?document.fullscreenElement.shadowRoot.contains(se):(Z=document.fullscreenElement)==null?void 0:Z.contains(se)},f=se=>u()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(se):document.fullscreenElement.querySelector(se):document.body,m=["dark","light"],v=r.computed(()=>{var Z,V;const se=(V=(Z=e.theme)==null?void 0:Z.split(/\s+/))!=null?V:[];se.sort((P,K)=>Number(m.includes(K))-Number(m.includes(P)));const X=se,le=se.filter(P=>!m.includes(P));return{systemThemes:X,customThemes:le}}),y=()=>e.autoVisibility,p=()=>e.autoPlacement,C=()=>{var V,P,K,j;const se=L((V=n.value)==null?void 0:V.$el),X=L((P=i.value)==null?void 0:P.$el),le=e.arrow?L((K=s.value)==null?void 0:K.$el):null,Z=L((j=o.value)==null?void 0:j.$el);return{elReference:se,elContent:X,elArrow:le,root:Z}},k=()=>{const se={};return Array.isArray(e.modifiers)&&e.modifiers.forEach(X=>{var Z,V,P,K;let le;if(X.name==="offset"){if(typeof((Z=X.options)==null?void 0:Z.offset)=="number"&&(le=(V=X.options)==null?void 0:V.offset),Array.isArray((P=X.options)==null?void 0:P.offset)){const[j,Q]=(K=X.options)==null?void 0:K.offset;le={mainAxis:j,crossAxis:Q}}Object.assign(se,{offset:le})}}),se},T=(se,X)=>{var P;const le=k(),Z=[dM(le.offset||X.offset),hM({padding:X.padding})],V={placement:X.placement,middleware:Z};if(X.arrow&&Z.push(tM({element:se})),p()?Z.push(sM()):(Z.unshift(gM()),Z.push(oM())),y()&&V.middleware.push(cM()),u()||X.isVirtualEl){const{getElementRects:K,getDimensions:j,getClippingRect:Q}=DM(d.value);Object.assign(V,{platform:Te(Y({},(P=X==null?void 0:X.platform)!=null?P:{}),{getElementRects:K,getDimensions:j,getClippingRect:Q})})}return V},L=se=>se instanceof HTMLElement?se:se instanceof Text?L(se.nextElementSibling):typeof(se==null?void 0:se.getBoundingClientRect)=="function"?se:null,M=v.value.customThemes.join(" "),b=v.value.customThemes.reduce((se,X)=>Y({[`data-${X}-theme`]:!0},se),{}),N=`${M}`;let I=null;const x=se=>{const X=window.devicePixelRatio||1;return Math.round(se*X)/X||0},z=(se,X,le,Z)=>{var P;e.disableTransform?Object.assign(se.style,{left:`${x(X)}px`,top:`${x(le)}px`}):Object.assign(se.style,{left:"0",top:"0",transform:`translate3d(${x(X)}px,${x(le)}px,0)`});const V=y()?(P=Z.hide)==null?void 0:P.referenceHidden:!1;Object.assign(se.style,{visibility:V?"hidden":"visible"})},D=(se,X,le)=>{var Z;if(e.arrow){const{x:V,y:P}=(Z=le.arrow)!=null?Z:{};se.setAttribute("data-arrow",X);const K={left:"",top:"",bottom:"",right:""};Object.assign(se.style,K);const j={top:"bottom",right:"left",bottom:"top",left:"right"}[X];Object.assign(se.style,{left:V!==null?`${V}px`:"",top:P!==null?`${P}px`:"",[j]:"-4px"})}},O=()=>{const{elReference:se,elContent:X}=C();I=xM(se,X,()=>{_(null,e)})},_=(se=null,X={})=>{const{elReference:le,elContent:Z,elArrow:V}=C(),P=se||le;if(!P||!Z)return;const K=T(V,X);SM(P,Z,K).then(({x:j,y:Q,placement:R,middlewareData:ge})=>{const ce=Z.className;Z.className=`${ce.replace(N,"")} ${N}`.replace(/\s+/mg," ").replace(/^\s+|\s+$/g,""),Object.keys(b).forEach(re=>{Z.setAttribute(re,b[re])});const pe=R.split("-")[0];let q=pe;["left","right","top","bottom"].includes(pe)||(q="top"),z(Z,j,Q,ge),D(V,q,ge)})};let E,B=!1;const W=()=>{setTimeout(()=>{!e.disabled&&(c.value=!0)},e.popoverDelay)},ne=()=>{E=setTimeout(()=>{c.value=!1},e.popoverDelay)},oe=()=>{var X;const se=L((X=i.value)==null?void 0:X.$el);se.style.setProperty("display","block"),se.style.setProperty("z-index",`${e.zIndex?e.zIndex:Kn.getPopperIndex()}`),_(),t.emit("afterShow",{isShow:!0})},we=()=>{var X;L((X=i.value)==null?void 0:X.$el).style.setProperty("display","none"),t.emit("afterHidden",{isShow:!1})},Ie=()=>{c.value?ne():W()},de=()=>{Ie()},fe=()=>{e.trigger==="hover"&&(E&&(B=!0,clearTimeout(E),E=void 0),$())},ee=()=>{B&&(ne(),B=!1,F())},$=()=>{t.emit(jn.CONTENT_MOUSEENTER)},F=()=>{t.emit(jn.CONTENT_MOUSELEAVE)},H=()=>{var X;return(X={hover:{content:[["mouseenter",fe],["mouseleave",ee]],reference:[["mouseenter",W],["mouseleave",ne],["focus",W],["blur",ne]]},click:[["click",de]],manual:{content:[["mouseenter",$],["mouseleave",F]],reference:[[]]}}[e.trigger])!=null?X:[]},he=se=>{d.value=se};return r.watch(c,se=>{se?oe():we()}),{showPopover:W,hidePopover:ne,resolveTriggerEvents:H,updatePopover:_,triggerPopover:Ie,resolvePopElements:C,isElementFullScreen:u,resolveTargetElement:L,createPopInstance:O,updateFullscreenTarget:he,getFullscreenRoot:f,stopHide:()=>{E&&(B=!0,clearTimeout(E),E=void 0)},localIsShow:c,cleanup:I}};let Ai=null,wl=null;var zM=(e,t="#")=>{const n=i=>{let s=null;const o=u=>{s===null&&u()},c=()=>{if(/^parent$/i.test(e.boundary)){s=`${t}${Ai}`;const{parentNode:u}=i||{};u!=null&&u.parentNode&&(u.parentNode.setAttribute("data-pnode-id",wl),s=`[data-pnode-id=${wl}]`)}},d=()=>{if(!/^body$/i.test(e.boundary)&&typeof e.boundary=="string"){if(!Eu(e.boundary)){console.error("props.boundary is not available selector"),s="body";return}s=e.boundary}};return o(c),o(d),o(()=>{s=typeof e.boundary=="string"?e.boundary:`${t}${Ai}`}),s};if(Ai===null||!Eu(`#${Ai}`)){Ai=`id_${Bi.v4()}`;const i=document.createElement("div");i.setAttribute("id",Ai),i.setAttribute("data-popper-id",Ai),document.body.append(i)}return wl===null&&(wl=`id_${Bi.v4()}`),{popContainerId:Ai,prefixId:n(),getPrefixId:n}},OM=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{let c=null;const d=r.ref(!1),u=Zw(),f=r.ref(),{localIsShow:m,showPopover:v,hidePopover:y,updatePopover:p,resolveTriggerEvents:C,resolvePopElements:k,isElementFullScreen:T,updateFullscreenTarget:L,createPopInstance:M,getFullscreenRoot:b,stopHide:N}=jM(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o}),I=()=>{v()},x=()=>{y()},z=()=>{M(),e.always?v():D()},D=()=>{const{elReference:F,elContent:H}=k();if(c=C(),Array.isArray(c))O(F,c);else{const{content:he,reference:ae}=c;O(F,ae),O(H,he)}},O=(F,H)=>{H.forEach(([he,ae])=>{he&&typeof ae=="function"&&F.addEventListener(he,ae)})},_=()=>{if(c!=null&&c.length){const{elReference:F}=k();F&&c.forEach(([H,he])=>{H&&typeof he=="function"&&F.removeEventListener(H,he)}),c=null}},E=()=>{const{elReference:F,root:H}=k();if(d.value){oe.value=f==null?void 0:f.value;return}oe.value=B(H||F)},{getPrefixId:B}=zM(e,"#"),W=()=>{var F;(F=f==null?void 0:f.value)==null||F.setAttribute("data-fllsrn-id",u)},ne=()=>{var H,he;const F=`[data-fllsrn-id=${u}]`;((he=(H=f==null?void 0:f.value)==null?void 0:H.querySelectorAll(F))!=null?he:[]).forEach(ae=>{ae==null||ae.removeAttribute("data-fllsrn-id")})},oe=r.ref(),we=()=>{_()},Ie=F=>{f.value=F,L(F),d.value=T(),W()},de=F=>{document.fullscreenElement||ne(),Ie(F.target),E(),p(null,e)};return{onMountedFn:()=>{if(!e.disabled){if(z(),T()){const F=`[data-fllsrn-id=${u}]`,H=b(F);Ie(H)}E(),document.body.addEventListener("fullscreenchange",de)}},onUnmountedFn:()=>{we(),document.body.removeEventListener("fullscreenchange",de)},handleClickOutside:F=>{t.emit(jn.CLICK_OUTSIDE,{isShow:m.value,event:F}),!(e.disableOutsideClick||e.always||e.disabled||e.trigger==="manual")&&m.value&&x()},beforeInstanceUnmount:we,updateBoundary:E,initPopInstance:z,updatePopover:p,showPopover:v,hidePopover:y,showFn:I,hideFn:x,stopHide:N,isFullscreen:d,boundary:oe,localIsShow:m}},_6=r.defineComponent({name:"Popover",components:{Content:g9,Arrow:h9,Root:m9},directives:{clickoutside:En},props:Kw,emits:Uw,setup(e,t){const{content:n,theme:i,disableTeleport:s}=e,{reference:o}=r.toRefs(e),c=r.ref(),d=r.ref(),u=r.ref(),f=r.ref(),m=r.computed(()=>o.value||c.value),{onMountedFn:v,onUnmountedFn:y,handleClickOutside:p,beforeInstanceUnmount:C,updateBoundary:k,initPopInstance:T,showFn:L,hideFn:M,showPopover:b,hidePopover:N,updatePopover:I,stopHide:x,localIsShow:z,boundary:D}=OM(e,t,{refReference:m,refContent:d,refArrow:u,refRoot:f});!e.always&&!e.disabled&&r.watch(()=>e.isShow,()=>{e.isShow?b():N()},{immediate:!0}),r.watch(()=>[e.disabled],W=>{W[0]?C():T()}),k(),r.onMounted(v),r.onBeforeUnmount(y);const O=r.computed(()=>!s),_=()=>{L()},E=()=>{M()},B=r.computed(()=>e.renderType===Cd.AUTO?!0:z.value);return{boundary:D,arrow:e.arrow,refDefaultReference:c,refContent:d,refArrow:u,content:n,theme:i,transBoundary:O,handleClickOutside:p,updatePopover:I,hide:E,show:_,stopHide:x,contentIsShow:B}},render(){return r.createVNode(m9,{ref:"refRoot"},{default:()=>[r.createVNode(Xw,{ref:"refDefaultReference"},{default:()=>{var e,t,n;return[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:r.createVNode("span",null,null)]}}),r.createVNode(r.Teleport,{to:this.boundary,disabled:!this.transBoundary},{default:()=>[r.withDirectives(r.createVNode(g9,{ref:"refContent","data-theme":this.theme,width:this.width,height:this.height,maxHeight:this.maxHeight},{default:()=>{var e,t,n;return[this.contentIsShow?(n=(t=(e=this.$slots).content)==null?void 0:t.call(e))!=null?n:this.content:""]},arrow:()=>this.arrow?r.createVNode(h9,{ref:"refArrow"},{default:()=>{var e,t;return[(t=(e=this.$slots).arrow)==null?void 0:t.call(e)]}}):""}),[[r.resolveDirective("clickoutside"),this.handleClickOutside]])]})]})}});const kn=Ge(_6);var EM=r.defineComponent({name:"Popover2",setup(){return()=>r.createVNode("code",null,["<bk-popover2></bk-popover2>\u5DF2\u7ECF\u5408\u5E76\u4E3A<bk-popover></bk-popover>\uFF0C\u8BF7\u66FF\u6362\u4E3A<bk-popover></bk-popover>"])}});const W6=Ge(EM),AM=(e,{attrs:t,slots:n})=>{const{width:i,percent:s,strokeWidth:o,color:c,strokeLinecap:d,theme:u,type:f,bgColor:m,titleStyle:v}=t,y=o||6,p=i||126,C={width:typeof p=="number"?`${p}px`:p,height:typeof p=="number"?`${p}px`:p,fontSize:`${p*.15+6}px`},k=50-y/2,T=f==="dashboard",L=Math.PI*2*k,M=T&&.75||1,b=`${-1*L*(1-M)/2}px`,N="stroke-dasharray 0.6s ease 0s, stroke 0.6s ease",I={strokeDasharray:`${L*M}px, ${L}px`,strokeDashoffset:b},x={strokeDasharray:`${L*M*(s/100)}px, ${L}px`,strokeDashoffset:b,transition:N},z=`
58
+ */function Ew(e,t){if(!L6.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i=typeof s[n]=="function"}return!i&&k6&&e==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var Aw=Ew,Pw=jw,Vw=Aw,l9=10,o9=40,c9=800;function T6(e){var t=0,n=0,i=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),i=t*l9,s=n*l9,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(e.deltaMode==1?(i*=o9,s*=o9):(i*=c9,s*=c9)),i&&!t&&(t=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:i,pixelY:s}}T6.getEventType=function(){return Pw.firefox()?"DOMMouseScroll":Vw("wheel")?"wheel":"mousewheel"};var Jw=T6,Rw=Jw;const Qw=typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,_w=function(e,t){e!=null&&e.addEventListener&&e.addEventListener(Qw?"DOMMouseScroll":"mousewheel",function(n){const i=Rw(n);t==null||t.apply(this,[n,i])})},Ww={beforeMount(e,t){console.error(e,t),_w(e,t.value)}},Hw=e=>typeof Element=="undefined"?!1:e instanceof Element,Ji=new Map;let x6;document.addEventListener("mousedown",e=>x6=e);document.addEventListener("mouseup",e=>{for(const t of Ji.values())for(const{documentHandler:n}of t)n(e,x6)});function u9(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:Hw(t.arg)&&n.push(t.arg),function(i,s){const{popperRef:o}=t.instance,c=i.target,d=s==null?void 0:s.target,u=!t||!t.instance,f=!c||!d,m=e.contains(c)||e.contains(d),v=e===c,y=n.length&&n.some(C=>C==null?void 0:C.contains(c))||n.length&&n.includes(d),p=o&&(o.contains(c)||o.contains(d));u||f||m||v||y||p||t.value(i,s)}}const En={beforeMount(e,t){Ji.has(e)||Ji.set(e,[]),Ji.get(e).push({documentHandler:u9(e,t),bindingFn:t.value})},updated(e,t){Ji.has(e)||Ji.set(e,[]);const n=Ji.get(e),i=n.findIndex(o=>o.bindingFn===t.oldValue),s={documentHandler:u9(e,t),bindingFn:t.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(e){Ji.delete(e)}};En.install=e=>{e.directive("bkTooltips",En)};const Hi=new Map,Io={beforeMount(e,t){const n=d9(t),{trigger:i}=n,s=Fw(n);let o=null;if(i==="hover"){let c=null;e.addEventListener("mouseenter",()=>{o=setTimeout(()=>{Ou(e),clearTimeout(c),clearTimeout(o)},n.delay)}),s.addEventListener("mouseenter",()=>{clearTimeout(c)}),e.addEventListener("mouseleave",()=>{clearTimeout(o),c=setTimeout(()=>{Ja(e)},100)}),e.addEventListener("click",()=>{Ja(e)}),s.addEventListener("mouseleave",()=>{clearTimeout(o),c=setTimeout(()=>{Ja(e)},100)})}else i==="click"&&document.body.addEventListener("click",c=>{e.contains(c.target)&&!s.hasAttribute("data-show")?o=setTimeout(()=>{Ou(e),clearTimeout(o)},n.delay):s.hasAttribute("data-show")&&Ja(e)});Hi.set(e,{opts:n,popper:s,popperInstance:null})},updated(e,t){Hi.get(e).opts=d9(t)},unmounted(e){Ja(e),Hi.delete(e)}};function Bw(){return{arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,extCls:"",delay:0,onShow:()=>{},onHide:()=>{}}}function d9(e){const t=Bw();return typeof e.value=="object"?Object.assign(t,e.value):t.content=e.value,t}function Fw(e){const{content:t,arrow:n,theme:i,extCls:s}=e,o=i==="light",c=Kn.getPopperIndex(),d=document.createElement("div");if(d.className=`bk-popper ${o?"light":"dark"} ${s}`,d.innerText=t,d.style.zIndex=String(c),n){const u=S6();d.appendChild(u)}return d}function S6(){const e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function Gw(e,t){const{opts:n}=Hi.get(e),{placement:i,distance:s,showOnInit:o}=n,c=A3(e,t,{placement:i,modifiers:[{name:"offset",options:{offset:[0,s]}}]});return o&&Ou(e),c}function Ou(e){const{popper:t,opts:n}=Hi.get(e),{disabled:i,content:s,arrow:o,onShow:c}=n;if(i)return;if(t.innerText=s,o){const u=S6();t.appendChild(u)}document.body.appendChild(t);const d=Gw(e,t);c(),t.setAttribute("data-show",""),d.setOptions(u=>Te(Y({},u),{modifiers:[...u.modifiers,{name:"eventListeners",enabled:!0}]})),d.forceUpdate(),Hi.get(e).popperInstance=d}function Ja(e){if(!Hi.get(e))return;const{popper:t,popperInstance:n,opts:i}=Hi.get(e),{onHide:s}=i;t&&document.body.contains(t)&&(t.removeAttribute("data-show"),n==null||n.destroy(),document.body.removeChild(t),s())}const iu={},Eu=e=>document.querySelector(e)instanceof HTMLElement,Zw=()=>(iu.fullscreenReferId||(iu.fullscreenReferId=`id_${Bi.v4()}`),iu.fullscreenReferId);function Bd(e){let t=null,n=null,i=null;const s=Te(Y({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),o=y=>y instanceof Element||y instanceof HTMLDocument,c={name:"$popover",setup(y,{expose:p}){const C=r.ref(s),k=r.ref(),T=r.ref({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),L=O=>{if(o(O)){const{x:B,y:W,width:ne,height:oe}=O.getBoundingClientRect();Object.assign(T.value,{width:`${ne}px`,height:`${oe}px`,transform:`translate3d(${B}px,${W}px,0)`});return}const{clientX:_,clientY:E}=O;Object.assign(T.value,{transform:`translate3d(${_}px,${E}px,0)`,width:"10px",height:"10px"})};L(C.value.target);const M=()=>{setTimeout(()=>{var O,_;(_=(O=k.value)==null?void 0:O.show)==null||_.call(O)})},b=()=>{var O,_;(_=(O=k.value)==null?void 0:O.hide)==null||_.call(O)},N=()=>{var O,_;(_=(O=k.value)==null?void 0:O.stopHide)==null||_.call(O)},I=r.computed(()=>{const O=["target"];return Object.keys(C.value).filter(_=>!O.includes(_)).reduce((_,E)=>Te(Y({},_),{[E]:C.value[E]}),{})}),x=O=>{var _,E;C.value.target=O,L(O),(E=(_=k.value)==null?void 0:_.updatePopover)==null||E.call(_),r.nextTick(()=>{var B,W;(W=(B=k.value)==null?void 0:B.updatePopover)==null||W.call(B)})},z=()=>{var O;(O=s.onContentMouseenter)==null||O.call(s)},D=()=>{var O;(O=s.onContentMouseleave)==null||O.call(s)};return p({show:M,hide:b,updateTarget:x,stopHide:N}),()=>r.createVNode(_6,r.mergeProps(I.value,{ref:k,onContentMouseenter:z,onContentMouseleave:D}),{default:()=>[r.createVNode("span",{style:T.value},null)]})}};function d(y){return/^body$/i.test(y)?document.body:/^parent$/i.test(y)?o(s.target)?s.target.parentNode:s.target.target.parentNode:typeof y=="string"&&Eu(y)?document.querySelector(y):document.body}t===null&&(i=document.createElement("div"),d(s.boundary).append(i),setTimeout(()=>{t=r.createApp(c),n=t.mount(i)}));function u(){t&&(t.unmount(),n=null,t=null,i.remove())}function f(){n==null||n.show()}function m(y){n==null||n.updateTarget(y)}function v(){n==null||n.hide()}return{close:u,show:f,hide:v,update:m,get vm(){return n},get $el(){return n.$el}}}const f9=(e,t)=>{const n={content:"",target:e};return typeof t.value=="object"?Object.assign(n,t.value):n.content=t.value,n},Fd=(e,t)=>{let n=null,i=null,s=null;const o=f9(e,t),{disabled:c}=o;if(c||n)return;const d=()=>{s&&clearTimeout(s),s=null},u=()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},f=()=>{i&&clearTimeout(i),i=setTimeout(()=>{const y=f9(e,t);y.content=y.content||e.innerHTML,Object.assign(y,{onContentMouseenter:d,onContentMouseleave:u}),n=Bd(y),setTimeout(()=>{n.show()})},100)},m=()=>{s=setTimeout(()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},120)};return e.addEventListener("mouseenter",f),e.addEventListener("mouseleave",m),Object.assign(t,{__cached:{handleMouseEnter:f,handleMouseLeave:m}}),{destroyInstance:y=>{var p,C;m(),(p=y!=null?y:e)==null||p.removeEventListener("mouseenter",f),(C=y!=null?y:e)==null||C.removeEventListener("mouseleave",m)},instance:n}},Yw={mounted(e,t){Fd(e,t)},beforeUnmount(e,t){if(t.__cached){const{handleMouseEnter:n,handleMouseLeave:i}=t.__cached;e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",i),t.__cached=null}}};var h9=r.defineComponent({name:"PopArrow",render(){const e=je("pop2-arrow");return r.createVNode("div",{class:e},null)}});const Hr=(...e)=>!0;let jn;(function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"})(jn||(jn={}));const Uw={[jn.SHOW]:Hr,[jn.HIDE]:Hr,[jn.CLICK_OUTSIDE]:Hr,[jn.CONTENT_MOUSEENTER]:Hr,[jn.CONTENT_MOUSELEAVE]:Hr,[jn.STOP_HIDE]:Hr};var g9=r.defineComponent({name:"PopContent",props:{width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),maxHeight:g.oneOfType([g.string,g.number]).def("auto")},setup(e){const t=i=>/^\d+\.?\d*$/.test(`${i}`)?`${i}px`:i;return{style:r.computed(()=>({width:t(e.width),height:t(e.height),maxHeight:t(e.maxHeight)}))}},render(){var t,n,i,s,o,c;const e=[je("popover"),je("pop2-content")];return r.createVNode("div",{class:e,tabindex:"-1",style:this.style},[(i=(n=(t=this.$slots).arrow)==null?void 0:n.call(t))!=null?i:"",(c=(o=(s=this.$slots).default)==null?void 0:o.call(s))!=null?c:""])}});const $w={onAfterHidden:Function,onAfterShow:Function},Kw=Y({isShow:g.bool.def(!1),always:g.bool.def(!1),disabled:g.bool.def(!1),width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),maxHeight:g.oneOfType([g.string,g.number]).def("auto"),content:g.oneOfType([g.string,g.number]).def(""),placement:Y3().def(Rl.TOP),theme:g.string.def("dark"),trigger:U3(),renderType:ZC(),arrow:g.bool.def(!0),padding:g.number.def(5),offset:g.oneOfType([g.number,g.shape({})]).def(6),boundary:g.oneOfType([g.string.def("parent"),g.instanceOf(HTMLElement)]),zIndex:g.number.def(void 0),disableTeleport:g.bool.def(!1),autoPlacement:g.bool.def(!1),autoVisibility:g.bool.def(!0),disableOutsideClick:g.bool.def(!1),disableTransform:g.bool.def(!1),reference:g.any.def(null),modifiers:g.array.def([]),popoverDelay:g.number.def(100)},$w);var Xw=r.defineComponent({name:"PopReference",render(){var e,t,n;return(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""}}),m9=r.defineComponent({props:{class:g.string.def("")},render(){var e,t;return r.createVNode(r.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});function bi(e){return e.split("-")[0]}function Cr(e){return e.split("-")[1]}function ga(e){return["top","bottom"].includes(bi(e))?"x":"y"}function Gd(e){return e==="y"?"height":"width"}function v9(e,t,n){let{reference:i,floating:s}=e;const o=i.x+i.width/2-s.width/2,c=i.y+i.height/2-s.height/2,d=ga(t),u=Gd(d),f=i[u]/2-s[u]/2,m=bi(t),v=d==="x";let y;switch(m){case"top":y={x:o,y:i.y-s.height};break;case"bottom":y={x:o,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:c};break;case"left":y={x:i.x-s.width,y:c};break;default:y={x:i.x,y:i.y}}switch(Cr(t)){case"start":y[d]-=f*(n&&v?-1:1);break;case"end":y[d]+=f*(n&&v?-1:1);break}return y}const qw=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:c}=n,d=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:m}=v9(u,i,d),v=i,y={};for(let p=0;p<o.length;p++){const{name:C,fn:k}=o[p],{x:T,y:L,data:M,reset:b}=await k({x:f,y:m,initialPlacement:i,placement:v,strategy:s,middlewareData:y,rects:u,platform:c,elements:{reference:e,floating:t}});if(f=T!=null?T:f,m=L!=null?L:m,y=Te(Y({},y),{[C]:Y(Y({},y[C]),M)}),b){typeof b=="object"&&(b.placement&&(v=b.placement),b.rects&&(u=b.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):b.rects),{x:f,y:m}=v9(u,v,d)),p=-1;continue}}return{x:f,y:m,placement:v,strategy:s,middlewareData:y}};function eM(e){return Y({top:0,right:0,bottom:0,left:0},e)}function Zd(e){return typeof e!="number"?eM(e):{top:e,right:e,bottom:e,left:e}}function us(e){return Te(Y({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function ds(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:c,elements:d,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:v="floating",altBoundary:y=!1,padding:p=0}=t,C=Zd(p),T=d[y?v==="floating"?"reference":"floating":v],L=us(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(T)))==null||n?T:T.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:f,rootBoundary:m,strategy:u})),M=us(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v==="floating"?Te(Y({},c.floating),{x:i,y:s}):c.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),strategy:u}):c[v]);return{top:L.top-M.top+C.top,bottom:M.bottom-L.bottom+C.bottom,left:L.left-M.left+C.left,right:M.right-L.right+C.right}}const D6=Math.min,j6=Math.max;function Au(e,t,n){return j6(e,D6(t,n))}const tM=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:i=0}=e!=null?e:{},{x:s,y:o,placement:c,rects:d,platform:u}=t;if(n==null)return{};const f=Zd(i),m={x:s,y:o},v=ga(c),y=Cr(c),p=Gd(v),C=await u.getDimensions(n),k=v==="y"?"top":"left",T=v==="y"?"bottom":"right",L=d.reference[p]+d.reference[v]-m[v]-d.floating[p],M=m[v]-d.reference[v],b=await(u.getOffsetParent==null?void 0:u.getOffsetParent(n));let N=b?v==="y"?b.clientHeight||0:b.clientWidth||0:0;N===0&&(N=d.floating[p]);const I=L/2-M/2,x=f[k],z=N-C[p]-f[T],D=N/2-C[p]/2+I,O=Au(x,D,z),B=(y==="start"?f[k]:f[T])>0&&D!==O&&d.reference[p]<=d.floating[p]?D<x?x-D:z-D:0;return{[v]:m[v]-B,data:{[v]:O,centerOffset:D-O}}}}),nM={left:"right",right:"left",bottom:"top",top:"bottom"};function Hl(e){return e.replace(/left|right|bottom|top/g,t=>nM[t])}function z6(e,t,n){n===void 0&&(n=!1);const i=Cr(e),s=ga(e),o=Gd(s);let c=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=Hl(c)),{main:c,cross:Hl(c)}}const iM={start:"end",end:"start"};function Pu(e){return e.replace(/start|end/g,t=>iM[t])}const O6=["top","right","bottom","left"],rM=O6.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function aM(e,t,n){return(e?[...n.filter(s=>Cr(s)===e),...n.filter(s=>Cr(s)!==e)]:n.filter(s=>bi(s)===s)).filter(s=>e?Cr(s)===e||(t?Pu(s)!==s:!1):!0)}const sM=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,s,o,c;const{x:d,y:u,rects:f,middlewareData:m,placement:v,platform:y,elements:p}=t,ne=e,{alignment:C=null,allowedPlacements:k=rM,autoAlignment:T=!0}=ne,L=ur(ne,["alignment","allowedPlacements","autoAlignment"]),M=aM(C,T,k),b=await ds(t,L),N=(n=(i=m.autoPlacement)==null?void 0:i.index)!=null?n:0,I=M[N];if(I==null)return{};const{main:x,cross:z}=z6(I,f,await(y.isRTL==null?void 0:y.isRTL(p.floating)));if(v!==I)return{x:d,y:u,reset:{placement:M[0]}};const D=[b[bi(I)],b[x],b[z]],O=[...(s=(o=m.autoPlacement)==null?void 0:o.overflows)!=null?s:[],{placement:I,overflows:D}],_=M[N+1];if(_)return{data:{index:N+1,overflows:O},reset:{placement:_}};const E=O.slice().sort((oe,we)=>oe.overflows[0]-we.overflows[0]),B=(c=E.find(oe=>{let{overflows:we}=oe;return we.every(Ie=>Ie<=0)}))==null?void 0:c.placement,W=B!=null?B:E[0].placement;return W!==v?{data:{index:N+1,overflows:O},reset:{placement:W}}:{}}}};function lM(e){const t=Hl(e);return[Pu(e),t,Pu(t)]}const oM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:i,middlewareData:s,rects:o,initialPlacement:c,platform:d,elements:u}=t,O=e,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",flipAlignment:p=!0}=O,C=ur(O,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),k=bi(i),L=v||(k===c||!p?[Hl(c)]:lM(c)),M=[c,...L],b=await ds(t,C),N=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&N.push(b[k]),m){const{main:_,cross:E}=z6(i,o,await(d.isRTL==null?void 0:d.isRTL(u.floating)));N.push(b[_],b[E])}if(I=[...I,{placement:i,overflows:N}],!N.every(_=>_<=0)){var x,z;const _=((x=(z=s.flip)==null?void 0:z.index)!=null?x:0)+1,E=M[_];if(E)return{data:{index:_,overflows:I},reset:{placement:E}};let B="bottom";switch(y){case"bestFit":{var D;const W=(D=I.map(ne=>[ne,ne.overflows.filter(oe=>oe>0).reduce((oe,we)=>oe+we,0)]).sort((ne,oe)=>ne[1]-oe[1])[0])==null?void 0:D[0].placement;W&&(B=W);break}case"initialPlacement":B=c;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function p9(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function b9(e){return O6.some(t=>e[t]>=0)}const cM=function(e){let i=e===void 0?{}:e,{strategy:t="referenceHidden"}=i,n=ur(i,["strategy"]);return{name:"hide",async fn(s){const{rects:o}=s;switch(t){case"referenceHidden":{const c=await ds(s,Te(Y({},n),{elementContext:"reference"})),d=p9(c,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:b9(d)}}}case"escaped":{const c=await ds(s,Te(Y({},n),{altBoundary:!0})),d=p9(c,o.floating);return{data:{escapedOffsets:d,escaped:b9(d)}}}default:return{}}}}};async function uM(e,t){const{placement:n,platform:i,elements:s}=e,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=bi(n),d=Cr(n),u=ga(n)==="x",f=["left","top"].includes(c)?-1:1,m=o&&u?-1:1,v=typeof t=="function"?t(e):t;let{mainAxis:y,crossAxis:p,alignmentAxis:C}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:Y({mainAxis:0,crossAxis:0,alignmentAxis:null},v);return d&&typeof C=="number"&&(p=d==="end"?C*-1:C),u?{x:p*m,y:y*f}:{x:y*f,y:p*m}}const dM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:i}=t,s=await uM(t,e);return{x:n+s.x,y:i+s.y,data:s}}}};function fM(e){return e==="x"?"y":"x"}const hM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,T=e,{mainAxis:o=!0,crossAxis:c=!1,limiter:d={fn:L=>{let{x:M,y:b}=L;return{x:M,y:b}}}}=T,u=ur(T,["mainAxis","crossAxis","limiter"]),f={x:n,y:i},m=await ds(t,u),v=ga(bi(s)),y=fM(v);let p=f[v],C=f[y];if(o){const L=v==="y"?"top":"left",M=v==="y"?"bottom":"right",b=p+m[L],N=p-m[M];p=Au(b,p,N)}if(c){const L=y==="y"?"top":"left",M=y==="y"?"bottom":"right",b=C+m[L],N=C-m[M];C=Au(b,C,N)}const k=d.fn(Te(Y({},t),{[v]:p,[y]:C}));return Te(Y({},k),{data:{x:k.x-n,y:k.y-i}})}}},gM=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:i,elements:s,rects:o,platform:c,strategy:d}=t,{padding:u=2,x:f,y:m}=e,v=us(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(c.getOffsetParent==null?void 0:c.getOffsetParent(s.floating)),strategy:d}):o.reference),y=(n=await(c.getClientRects==null?void 0:c.getClientRects(s.reference)))!=null?n:[],p=Zd(u);function C(){if(y.length===2&&y[0].left>y[1].right&&f!=null&&m!=null){var T;return(T=y.find(L=>f>L.left-p.left&&f<L.right+p.right&&m>L.top-p.top&&m<L.bottom+p.bottom))!=null?T:v}if(y.length>=2){if(ga(i)==="x"){const E=y[0],B=y[y.length-1],W=bi(i)==="top",ne=E.top,oe=B.bottom,we=W?E.left:B.left,Ie=W?E.right:B.right,de=Ie-we,fe=oe-ne;return{top:ne,bottom:oe,left:we,right:Ie,width:de,height:fe,x:we,y:ne}}const L=bi(i)==="left",M=j6(...y.map(E=>E.right)),b=D6(...y.map(E=>E.left)),N=y.filter(E=>L?E.left===b:E.right===M),I=N[0].top,x=N[N.length-1].bottom,z=b,D=M,O=D-z,_=x-I;return{top:I,bottom:x,left:z,right:D,width:O,height:_,x:z,y:I}}return v}const k=await c.getElementRects({reference:{getBoundingClientRect:C},floating:s.floating,strategy:d});return o.reference.x!==k.reference.x||o.reference.y!==k.reference.y||o.reference.width!==k.reference.width||o.reference.height!==k.reference.height?{reset:{rects:k}}:{}}}};function E6(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function wi(e){if(e==null)return window;if(!E6(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function ws(e){return wi(e).getComputedStyle(e)}function yi(e){return E6(e)?"":e?(e.nodeName||"").toLowerCase():""}function A6(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function qn(e){return e instanceof wi(e).HTMLElement}function Zi(e){return e instanceof wi(e).Element}function mM(e){return e instanceof wi(e).Node}function Yd(e){if(typeof ShadowRoot=="undefined")return!1;const t=wi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function No(e){const{overflow:t,overflowX:n,overflowY:i}=ws(e);return/auto|scroll|overlay|hidden/.test(t+i+n)}function vM(e){return["table","td","th"].includes(yi(e))}function P6(e){const t=/firefox/i.test(A6()),n=ws(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function V6(){return!/^((?!chrome|android).)*safari/i.test(A6())}const y9=Math.min,Xa=Math.max,Bl=Math.round;function Ci(e,t,n){var i,s,o,c;t===void 0&&(t=!1),n===void 0&&(n=!1);const d=e.getBoundingClientRect();let u=1,f=1;t&&qn(e)&&(u=e.offsetWidth>0&&Bl(d.width)/e.offsetWidth||1,f=e.offsetHeight>0&&Bl(d.height)/e.offsetHeight||1);const m=Zi(e)?wi(e):window,v=!V6()&&n,y=(d.left+(v&&(i=(s=m.visualViewport)==null?void 0:s.offsetLeft)!=null?i:0))/u,p=(d.top+(v&&(o=(c=m.visualViewport)==null?void 0:c.offsetTop)!=null?o:0))/f,C=d.width/u,k=d.height/f;return{width:C,height:k,top:p,right:y+C,bottom:p+k,left:y,x:y,y:p}}function Ui(e){return((mM(e)?e.ownerDocument:e.document)||window.document).documentElement}function Lo(e){return Zi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function J6(e){return Ci(Ui(e)).left+Lo(e).scrollLeft}function pM(e){const t=Ci(e);return Bl(t.width)!==e.offsetWidth||Bl(t.height)!==e.offsetHeight}function bM(e,t,n){const i=qn(t),s=Ui(t),o=Ci(e,i&&pM(t),n==="fixed");let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if(i||!i&&n!=="fixed")if((yi(t)!=="body"||No(s))&&(c=Lo(t)),qn(t)){const u=Ci(t,!0);d.x=u.x+t.clientLeft,d.y=u.y+t.clientTop}else s&&(d.x=J6(s));return{x:o.left+c.scrollLeft-d.x,y:o.top+c.scrollTop-d.y,width:o.width,height:o.height}}function R6(e){return yi(e)==="html"?e:e.assignedSlot||e.parentNode||(Yd(e)?e.host:null)||Ui(e)}function C9(e){return!qn(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function yM(e){let t=R6(e);for(Yd(t)&&(t=t.host);qn(t)&&!["html","body"].includes(yi(t));){if(P6(t))return t;t=t.parentNode}return null}function Vu(e){const t=wi(e);let n=C9(e);for(;n&&vM(n)&&getComputedStyle(n).position==="static";)n=C9(n);return n&&(yi(n)==="html"||yi(n)==="body"&&getComputedStyle(n).position==="static"&&!P6(n))?t:n||yM(e)||t}function w9(e){if(qn(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Ci(e);return{width:t.width,height:t.height}}function CM(e){let{rect:t,offsetParent:n,strategy:i}=e;const s=qn(n),o=Ui(n);if(n===o)return t;let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if((s||!s&&i!=="fixed")&&((yi(n)!=="body"||No(o))&&(c=Lo(n)),qn(n))){const u=Ci(n,!0);d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}return Te(Y({},t),{x:t.x-c.scrollLeft+d.x,y:t.y-c.scrollTop+d.y})}function wM(e,t){const n=wi(e),i=Ui(e),s=n.visualViewport;let o=i.clientWidth,c=i.clientHeight,d=0,u=0;if(s){o=s.width,c=s.height;const f=V6();(f||!f&&t==="fixed")&&(d=s.offsetLeft,u=s.offsetTop)}return{width:o,height:c,x:d,y:u}}function MM(e){var t;const n=Ui(e),i=Lo(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=Xa(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=Xa(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-i.scrollLeft+J6(e);const u=-i.scrollTop;return ws(s||n).direction==="rtl"&&(d+=Xa(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:d,y:u}}function Q6(e){const t=R6(e);return["html","body","#document"].includes(yi(t))?e.ownerDocument.body:qn(t)&&No(t)?t:Q6(t)}function Fl(e,t){var n;t===void 0&&(t=[]);const i=Q6(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=wi(i),c=s?[o].concat(o.visualViewport||[],No(i)?i:[]):i,d=t.concat(c);return s?d:d.concat(Fl(c))}function IM(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yd(n)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function NM(e,t){const n=Ci(e,!1,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft;return{top:i,left:s,x:s,y:i,right:s+e.clientWidth,bottom:i+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function M9(e,t,n){return t==="viewport"?us(wM(e,n)):Zi(t)?NM(t,n):us(MM(Ui(e)))}function LM(e){const t=Fl(e),i=["absolute","fixed"].includes(ws(e).position)&&qn(e)?Vu(e):e;return Zi(i)?t.filter(s=>Zi(s)&&IM(s,i)&&yi(s)!=="body"):[]}function kM(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const c=[...n==="clippingAncestors"?LM(t):[].concat(n),i],d=c[0],u=c.reduce((f,m)=>{const v=M9(t,m,s);return f.top=Xa(v.top,f.top),f.right=y9(v.right,f.right),f.bottom=y9(v.bottom,f.bottom),f.left=Xa(v.left,f.left),f},M9(t,d,s));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}const TM={getClippingRect:kM,convertOffsetParentRelativeRectToViewportRelativeRect:CM,isElement:Zi,getDimensions:w9,getOffsetParent:Vu,getDocumentElement:Ui,getElementRects:e=>{let{reference:t,floating:n,strategy:i}=e;return{reference:bM(t,Vu(n),i),floating:Te(Y({},w9(n)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>ws(e).direction==="rtl"};function xM(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:c=!0,animationFrame:d=!1}=i,u=s&&!d,f=o&&!d,m=u||f?[...Zi(e)?Fl(e):[],...Fl(t)]:[];m.forEach(k=>{u&&k.addEventListener("scroll",n,{passive:!0}),f&&k.addEventListener("resize",n)});let v=null;c&&(v=new ResizeObserver(n),Zi(e)&&!d&&v.observe(e),v.observe(t));let y,p=d?Ci(e):null;d&&C();function C(){const k=Ci(e);p&&(k.x!==p.x||k.y!==p.y||k.width!==p.width||k.height!==p.height)&&n(),p=k,y=requestAnimationFrame(C)}return c||n(),()=>{var k;m.forEach(T=>{u&&T.removeEventListener("scroll",n),f&&T.removeEventListener("resize",n)}),(k=v)==null||k.disconnect(),v=null,d&&cancelAnimationFrame(y)}}const SM=(e,t,n)=>qw(e,t,Y({platform:TM},n));var DM=e=>({getElementRects:({reference:s,floating:o})=>{const c=s.getBoundingClientRect(),d=o.getBoundingClientRect();return{reference:{width:c.width,height:c.height,x:c.x,y:c.y},floating:{width:d.width,height:d.height,x:d.x,y:d.y}}},getDimensions:s=>{const{width:o,height:c}=s.getBoundingClientRect();return{width:o,height:c}},getClippingRect:({})=>{var c;const{width:s=0,height:o=0}=(c=e==null?void 0:e.getBoundingClientRect())!=null?c:{};return{width:s,height:o,x:0,y:0}}}),jM=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{const c=r.ref(!1),d=r.ref(),u=()=>{var X,le,Z;const se=L((X=n.value)==null?void 0:X.$el);return(le=document.fullscreenElement)!=null&&le.shadowRoot?document.fullscreenElement.shadowRoot.contains(se):(Z=document.fullscreenElement)==null?void 0:Z.contains(se)},f=se=>u()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(se):document.fullscreenElement.querySelector(se):document.body,m=["dark","light"],v=r.computed(()=>{var Z,V;const se=(V=(Z=e.theme)==null?void 0:Z.split(/\s+/))!=null?V:[];se.sort((P,K)=>Number(m.includes(K))-Number(m.includes(P)));const X=se,le=se.filter(P=>!m.includes(P));return{systemThemes:X,customThemes:le}}),y=()=>e.autoVisibility,p=()=>e.autoPlacement,C=()=>{var V,P,K,j;const se=L((V=n.value)==null?void 0:V.$el),X=L((P=i.value)==null?void 0:P.$el),le=e.arrow?L((K=s.value)==null?void 0:K.$el):null,Z=L((j=o.value)==null?void 0:j.$el);return{elReference:se,elContent:X,elArrow:le,root:Z}},k=()=>{const se={};return Array.isArray(e.modifiers)&&e.modifiers.forEach(X=>{var Z,V,P,K;let le;if(X.name==="offset"){if(typeof((Z=X.options)==null?void 0:Z.offset)=="number"&&(le=(V=X.options)==null?void 0:V.offset),Array.isArray((P=X.options)==null?void 0:P.offset)){const[j,Q]=(K=X.options)==null?void 0:K.offset;le={mainAxis:j,crossAxis:Q}}Object.assign(se,{offset:le})}}),se},T=(se,X)=>{var P;const le=k(),Z=[dM(le.offset||X.offset),hM({padding:X.padding})],V={placement:X.placement,middleware:Z};if(X.arrow&&Z.push(tM({element:se})),p()?Z.push(sM()):(Z.unshift(gM()),Z.push(oM())),y()&&V.middleware.push(cM()),u()||X.isVirtualEl){const{getElementRects:K,getDimensions:j,getClippingRect:Q}=DM(d.value);Object.assign(V,{platform:Te(Y({},(P=X==null?void 0:X.platform)!=null?P:{}),{getElementRects:K,getDimensions:j,getClippingRect:Q})})}return V},L=se=>se instanceof HTMLElement?se:se instanceof Text?L(se.nextElementSibling):typeof(se==null?void 0:se.getBoundingClientRect)=="function"?se:null,M=v.value.customThemes.join(" "),b=v.value.customThemes.reduce((se,X)=>Y({[`data-${X}-theme`]:!0},se),{}),N=`${M}`;let I=null;const x=se=>{const X=window.devicePixelRatio||1;return Math.round(se*X)/X||0},z=(se,X,le,Z)=>{var P;e.disableTransform?Object.assign(se.style,{left:`${x(X)}px`,top:`${x(le)}px`}):Object.assign(se.style,{left:"0",top:"0",transform:`translate3d(${x(X)}px,${x(le)}px,0)`});const V=y()?(P=Z.hide)==null?void 0:P.referenceHidden:!1;Object.assign(se.style,{visibility:V?"hidden":"visible"})},D=(se,X,le)=>{var Z;if(e.arrow){const{x:V,y:P}=(Z=le.arrow)!=null?Z:{};se.setAttribute("data-arrow",X);const K={left:"",top:"",bottom:"",right:""};Object.assign(se.style,K);const j={top:"bottom",right:"left",bottom:"top",left:"right"}[X];Object.assign(se.style,{left:V!==null?`${V}px`:"",top:P!==null?`${P}px`:"",[j]:"-4px"})}},O=()=>{const{elReference:se,elContent:X}=C();I=xM(se,X,()=>{_(null,e)})},_=(se=null,X={})=>{const{elReference:le,elContent:Z,elArrow:V}=C(),P=se||le;if(!P||!Z)return;const K=T(V,X);SM(P,Z,K).then(({x:j,y:Q,placement:R,middlewareData:ge})=>{const ce=Z.className;Z.className=`${ce.replace(N,"")} ${N}`.replace(/\s+/mg," ").replace(/^\s+|\s+$/g,""),Object.keys(b).forEach(re=>{Z.setAttribute(re,b[re])});const pe=R.split("-")[0];let q=pe;["left","right","top","bottom"].includes(pe)||(q="top"),z(Z,j,Q,ge),D(V,q,ge)})};let E,B=!1;const W=()=>{setTimeout(()=>{!e.disabled&&(c.value=!0)},e.popoverDelay)},ne=()=>{E=setTimeout(()=>{c.value=!1},e.popoverDelay)},oe=()=>{var X;const se=L((X=i.value)==null?void 0:X.$el);se.style.setProperty("display","block"),se.style.setProperty("z-index",`${e.zIndex?e.zIndex:Kn.getPopperIndex()}`),_(),t.emit("afterShow",{isShow:!0})},we=()=>{var X;L((X=i.value)==null?void 0:X.$el).style.setProperty("display","none"),t.emit("afterHidden",{isShow:!1})},Ie=()=>{c.value?ne():W()},de=()=>{Ie()},fe=()=>{e.trigger==="hover"&&(E&&(B=!0,clearTimeout(E),E=void 0),$())},ee=()=>{B&&(ne(),B=!1,F())},$=()=>{t.emit(jn.CONTENT_MOUSEENTER)},F=()=>{t.emit(jn.CONTENT_MOUSELEAVE)},H=()=>{var X;return(X={hover:{content:[["mouseenter",fe],["mouseleave",ee]],reference:[["mouseenter",W],["mouseleave",ne],["focus",W],["blur",ne]]},click:[["click",de]],manual:{content:[["mouseenter",$],["mouseleave",F]],reference:[[]]}}[e.trigger])!=null?X:[]},he=se=>{d.value=se};return r.watch(c,se=>{se?oe():we()}),{showPopover:W,hidePopover:ne,resolveTriggerEvents:H,updatePopover:_,triggerPopover:Ie,resolvePopElements:C,isElementFullScreen:u,resolveTargetElement:L,createPopInstance:O,updateFullscreenTarget:he,getFullscreenRoot:f,stopHide:()=>{E&&(B=!0,clearTimeout(E),E=void 0)},localIsShow:c,cleanup:I}};let Ai=null,wl=null;var zM=(e,t="#")=>{const n=i=>{let s=null;const o=u=>{s===null&&u()},c=()=>{if(/^parent$/i.test(e.boundary)){s=`${t}${Ai}`;const{parentNode:u}=i||{};u!=null&&u.parentNode&&(u.parentNode.setAttribute("data-pnode-id",wl),s=`[data-pnode-id=${wl}]`)}},d=()=>{if(!/^body$/i.test(e.boundary)&&typeof e.boundary=="string"){if(!Eu(e.boundary)){console.error("props.boundary is not available selector"),s="body";return}s=e.boundary}};return o(c),o(d),o(()=>{s=typeof e.boundary=="string"?e.boundary:`${t}${Ai}`}),s};if(Ai===null||!Eu(`#${Ai}`)){Ai=`id_${Bi.v4()}`;const i=document.createElement("div");i.setAttribute("id",Ai),i.setAttribute("data-popper-id",Ai),document.body.append(i)}return wl===null&&(wl=`id_${Bi.v4()}`),{popContainerId:Ai,prefixId:n(),getPrefixId:n}},OM=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{let c=null;const d=r.ref(!1),u=Zw(),f=r.ref(),{localIsShow:m,showPopover:v,hidePopover:y,updatePopover:p,resolveTriggerEvents:C,resolvePopElements:k,isElementFullScreen:T,updateFullscreenTarget:L,createPopInstance:M,getFullscreenRoot:b,stopHide:N}=jM(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o}),I=()=>{v()},x=()=>{y()},z=()=>{M(),e.always?v():D()},D=()=>{const{elReference:F,elContent:H}=k();if(c=C(),Array.isArray(c))O(F,c);else{const{content:he,reference:ae}=c;O(F,ae),O(H,he)}},O=(F,H)=>{H.forEach(([he,ae])=>{he&&typeof ae=="function"&&F.addEventListener(he,ae)})},_=()=>{if(c!=null&&c.length){const{elReference:F}=k();F&&c.forEach(([H,he])=>{H&&typeof he=="function"&&F.removeEventListener(H,he)}),c=null}},E=()=>{const{elReference:F,root:H}=k();if(d.value){oe.value=f==null?void 0:f.value;return}oe.value=B(H||F)},{getPrefixId:B}=zM(e,"#"),W=()=>{var F;(F=f==null?void 0:f.value)==null||F.setAttribute("data-fllsrn-id",u)},ne=()=>{var H,he;const F=`[data-fllsrn-id=${u}]`;((he=(H=f==null?void 0:f.value)==null?void 0:H.querySelectorAll(F))!=null?he:[]).forEach(ae=>{ae==null||ae.removeAttribute("data-fllsrn-id")})},oe=r.ref(),we=()=>{_()},Ie=F=>{f.value=F,L(F),d.value=T(),W()},de=F=>{document.fullscreenElement||ne(),Ie(F.target),E(),p(null,e)};return{onMountedFn:()=>{if(!e.disabled){if(z(),T()){const F=`[data-fllsrn-id=${u}]`,H=b(F);Ie(H)}E(),document.body.addEventListener("fullscreenchange",de)}},onUnmountedFn:()=>{we(),document.body.removeEventListener("fullscreenchange",de)},handleClickOutside:F=>{t.emit(jn.CLICK_OUTSIDE,{isShow:m.value,event:F}),!(e.disableOutsideClick||e.always||e.disabled||e.trigger==="manual")&&m.value&&x()},beforeInstanceUnmount:we,updateBoundary:E,initPopInstance:z,updatePopover:p,showPopover:v,hidePopover:y,showFn:I,hideFn:x,stopHide:N,isFullscreen:d,boundary:oe,localIsShow:m}},_6=r.defineComponent({name:"Popover",components:{Content:g9,Arrow:h9,Root:m9},directives:{clickoutside:En},props:Kw,emits:Uw,setup(e,t){const{content:n,theme:i,disableTeleport:s}=e,{reference:o}=r.toRefs(e),c=r.ref(),d=r.ref(),u=r.ref(),f=r.ref(),m=r.computed(()=>o.value||c.value),{onMountedFn:v,onUnmountedFn:y,handleClickOutside:p,beforeInstanceUnmount:C,updateBoundary:k,initPopInstance:T,showFn:L,hideFn:M,showPopover:b,hidePopover:N,updatePopover:I,stopHide:x,localIsShow:z,boundary:D}=OM(e,t,{refReference:m,refContent:d,refArrow:u,refRoot:f});!e.always&&!e.disabled&&r.watch(()=>e.isShow,()=>{e.isShow?b():N()},{immediate:!0}),r.watch(()=>[e.disabled],W=>{W[0]?C():T()}),k(),r.onMounted(v),r.onBeforeUnmount(y);const O=r.computed(()=>!s),_=()=>{L()},E=()=>{M()},B=r.computed(()=>e.renderType===Cd.AUTO?!0:z.value);return{boundary:D,arrow:e.arrow,refDefaultReference:c,refContent:d,refArrow:u,content:n,theme:i,transBoundary:O,handleClickOutside:p,updatePopover:I,hide:E,show:_,stopHide:x,contentIsShow:B}},render(){return r.createVNode(m9,{ref:"refRoot"},{default:()=>[r.createVNode(Xw,{ref:"refDefaultReference"},{default:()=>{var e,t,n;return[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:r.createVNode("span",null,null)]}}),r.createVNode(r.Teleport,{to:this.boundary,disabled:!this.transBoundary},{default:()=>[r.withDirectives(r.createVNode(g9,{ref:"refContent","data-theme":this.theme,width:this.width,height:this.height,maxHeight:this.maxHeight},{default:()=>{var e,t,n;return[this.contentIsShow?(n=(t=(e=this.$slots).content)==null?void 0:t.call(e))!=null?n:this.content:""]},arrow:()=>this.arrow?r.createVNode(h9,{ref:"refArrow"},{default:()=>{var e,t;return[(t=(e=this.$slots).arrow)==null?void 0:t.call(e)]}}):""}),[[r.resolveDirective("clickoutside"),this.handleClickOutside]])]})]})}});const kn=Ge(_6);var EM=r.defineComponent({name:"Popover2",setup(){return()=>r.createVNode("code",null,["<bk-popover2></bk-popover2>\u5DF2\u7ECF\u5408\u5E76\u4E3A<bk-popover></bk-popover>\uFF0C\u8BF7\u66FF\u6362\u4E3A<bk-popover></bk-popover>"])}});const W6=Ge(EM),AM=(e,{attrs:t,slots:n})=>{const{width:i,percent:s,strokeWidth:o,color:c,strokeLinecap:d,theme:u,type:f,bgColor:m,titleStyle:v}=t,y=o||6,p=i||126,C={width:typeof p=="number"?`${p}px`:p,height:typeof p=="number"?`${p}px`:p,fontSize:`${p*.15+6}px`},k=50-y/2,T=f==="dashboard",L=Math.PI*2*k,M=T&&.75||1,b=`${-1*L*(1-M)/2}px`,N="stroke-dasharray 0.6s ease 0s, stroke 0.6s ease",I={strokeDasharray:`${L*M}px, ${L}px`,strokeDashoffset:b},x={strokeDasharray:`${L*M*(s/100)}px, ${L}px`,strokeDashoffset:b,transition:N},z=`
59
59
  M 50 50
60
60
  m 0 ${T?"":"-"}${k}
61
61
  a ${k} ${k} 0 1 1 0 ${T?"-":""}${k*2}
package/dist/index.esm.js CHANGED
@@ -11235,16 +11235,21 @@ const tooltips = {
11235
11235
  const opts = getOpts(binding);
11236
11236
  const { trigger } = opts;
11237
11237
  const popper2 = renderContent(opts);
11238
+ let delayTimeout = null;
11238
11239
  if (trigger === "hover") {
11239
11240
  let hideTimeout = null;
11240
11241
  el.addEventListener("mouseenter", () => {
11241
- show(el);
11242
- clearTimeout(hideTimeout);
11242
+ delayTimeout = setTimeout(() => {
11243
+ show(el);
11244
+ clearTimeout(hideTimeout);
11245
+ clearTimeout(delayTimeout);
11246
+ }, opts.delay);
11243
11247
  });
11244
11248
  popper2.addEventListener("mouseenter", () => {
11245
11249
  clearTimeout(hideTimeout);
11246
11250
  });
11247
11251
  el.addEventListener("mouseleave", () => {
11252
+ clearTimeout(delayTimeout);
11248
11253
  hideTimeout = setTimeout(() => {
11249
11254
  hide$1(el);
11250
11255
  }, 100);
@@ -11253,6 +11258,7 @@ const tooltips = {
11253
11258
  hide$1(el);
11254
11259
  });
11255
11260
  popper2.addEventListener("mouseleave", () => {
11261
+ clearTimeout(delayTimeout);
11256
11262
  hideTimeout = setTimeout(() => {
11257
11263
  hide$1(el);
11258
11264
  }, 100);
@@ -11260,7 +11266,10 @@ const tooltips = {
11260
11266
  } else if (trigger === "click") {
11261
11267
  document.body.addEventListener("click", (event) => {
11262
11268
  if (el.contains(event.target) && !popper2.hasAttribute("data-show")) {
11263
- show(el);
11269
+ delayTimeout = setTimeout(() => {
11270
+ show(el);
11271
+ clearTimeout(delayTimeout);
11272
+ }, opts.delay);
11264
11273
  } else if (popper2.hasAttribute("data-show")) {
11265
11274
  hide$1(el);
11266
11275
  }
@@ -11291,6 +11300,7 @@ function initOptions() {
11291
11300
  placement: "top",
11292
11301
  distance: 8,
11293
11302
  extCls: "",
11303
+ delay: 0,
11294
11304
  onShow: () => {
11295
11305
  },
11296
11306
  onHide: () => {
package/dist/index.umd.js CHANGED
@@ -55,7 +55,7 @@ ${Os(n)}`),i}})}function S2(e){const t=Object.keys(e),n=t.filter(s=>{var o;retur
55
55
  * @return {boolean} True if the event is supported.
56
56
  * @internal
57
57
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
58
- */function vp(e,t){if(!J0.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i=typeof s[n]=="function"}return!i&&R0&&e==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var wp=vp,Mp=bp,Ip=wp,Q0=10,_0=40,W0=800;function H0(e){var t=0,n=0,i=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),i=t*Q0,s=n*Q0,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(e.deltaMode==1?(i*=_0,s*=_0):(i*=W0,s*=W0)),i&&!t&&(t=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:i,pixelY:s}}H0.getEventType=function(){return Mp.firefox()?"DOMMouseScroll":Ip("wheel")?"wheel":"mousewheel"};var Np=H0,Lp=Np;const kp=typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,Tp=function(e,t){e!=null&&e.addEventListener&&e.addEventListener(kp?"DOMMouseScroll":"mousewheel",function(n){const i=Lp(n);t==null||t.apply(this,[n,i])})},xp={beforeMount(e,t){console.error(e,t),Tp(e,t.value)}},Sp=e=>typeof Element=="undefined"?!1:e instanceof Element,Oi=new Map;let B0;document.addEventListener("mousedown",e=>B0=e),document.addEventListener("mouseup",e=>{for(const t of Oi.values())for(const{documentHandler:n}of t)n(e,B0)});function F0(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:Sp(t.arg)&&n.push(t.arg),function(i,s){const{popperRef:o}=t.instance,c=i.target,d=s==null?void 0:s.target,u=!t||!t.instance,f=!c||!d,m=e.contains(c)||e.contains(d),p=e===c,C=n.length&&n.some(v=>v==null?void 0:v.contains(c))||n.length&&n.includes(d),b=o&&(o.contains(c)||o.contains(d));u||f||m||p||C||b||t.value(i,s)}}const On={beforeMount(e,t){Oi.has(e)||Oi.set(e,[]),Oi.get(e).push({documentHandler:F0(e,t),bindingFn:t.value})},updated(e,t){Oi.has(e)||Oi.set(e,[]);const n=Oi.get(e),i=n.findIndex(o=>o.bindingFn===t.oldValue),s={documentHandler:F0(e,t),bindingFn:t.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(e){Oi.delete(e)}};On.install=e=>{e.directive("bkTooltips",On)};const Ei=new Map,il={beforeMount(e,t){const n=G0(t),{trigger:i}=n,s=jp(n);if(i==="hover"){let o=null;e.addEventListener("mouseenter",()=>{Qc(e),clearTimeout(o)}),s.addEventListener("mouseenter",()=>{clearTimeout(o)}),e.addEventListener("mouseleave",()=>{o=setTimeout(()=>{Rr(e)},100)}),e.addEventListener("click",()=>{Rr(e)}),s.addEventListener("mouseleave",()=>{o=setTimeout(()=>{Rr(e)},100)})}else i==="click"&&document.body.addEventListener("click",o=>{e.contains(o.target)&&!s.hasAttribute("data-show")?Qc(e):s.hasAttribute("data-show")&&Rr(e)});Ei.set(e,{opts:n,popper:s,popperInstance:null})},updated(e,t){Ei.get(e).opts=G0(t)},unmounted(e){Rr(e),Ei.delete(e)}};function Dp(){return{arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,extCls:"",onShow:()=>{},onHide:()=>{}}}function G0(e){const t=Dp();return typeof e.value=="object"?Object.assign(t,e.value):t.content=e.value,t}function jp(e){const{content:t,arrow:n,theme:i,extCls:s}=e,o=i==="light",c=_n.getPopperIndex(),d=document.createElement("div");if(d.className=`bk-popper ${o?"light":"dark"} ${s}`,d.innerText=t,d.style.zIndex=String(c),n){const u=Z0();d.appendChild(u)}return d}function Z0(){const e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function zp(e,t){const{opts:n}=Ei.get(e),{placement:i,distance:s,showOnInit:o}=n,c=_f(e,t,{placement:i,modifiers:[{name:"offset",options:{offset:[0,s]}}]});return o&&Qc(e),c}function Qc(e){const{popper:t,opts:n}=Ei.get(e),{disabled:i,content:s,arrow:o,onShow:c}=n;if(i)return;if(t.innerText=s,o){const u=Z0();t.appendChild(u)}document.body.appendChild(t);const d=zp(e,t);c(),t.setAttribute("data-show",""),d.setOptions(u=>xe(Y({},u),{modifiers:[...u.modifiers,{name:"eventListeners",enabled:!0}]})),d.forceUpdate(),Ei.get(e).popperInstance=d}function Rr(e){if(!Ei.get(e))return;const{popper:t,popperInstance:n,opts:i}=Ei.get(e),{onHide:s}=i;t&&document.body.contains(t)&&(t.removeAttribute("data-show"),n==null||n.destroy(),document.body.removeChild(t),s())}const _c={},Wc=e=>document.querySelector(e)instanceof HTMLElement,Op=()=>(_c.fullscreenReferId||(_c.fullscreenReferId=`id_${ki.v4()}`),_c.fullscreenReferId);function Hc(e){let t=null,n=null,i=null;const s=xe(Y({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),o=C=>C instanceof Element||C instanceof HTMLDocument,c={name:"$popover",setup(C,{expose:b}){const v=a.ref(s),k=a.ref(),T=a.ref({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),L=O=>{if(o(O)){const{x:B,y:W,width:ne,height:oe}=O.getBoundingClientRect();Object.assign(T.value,{width:`${ne}px`,height:`${oe}px`,transform:`translate3d(${B}px,${W}px,0)`});return}const{clientX:_,clientY:E}=O;Object.assign(T.value,{transform:`translate3d(${_}px,${E}px,0)`,width:"10px",height:"10px"})};L(v.value.target);const M=()=>{setTimeout(()=>{var O,_;(_=(O=k.value)==null?void 0:O.show)==null||_.call(O)})},y=()=>{var O,_;(_=(O=k.value)==null?void 0:O.hide)==null||_.call(O)},N=()=>{var O,_;(_=(O=k.value)==null?void 0:O.stopHide)==null||_.call(O)},I=a.computed(()=>{const O=["target"];return Object.keys(v.value).filter(_=>!O.includes(_)).reduce((_,E)=>xe(Y({},_),{[E]:v.value[E]}),{})}),x=O=>{var _,E;v.value.target=O,L(O),(E=(_=k.value)==null?void 0:_.updatePopover)==null||E.call(_),a.nextTick(()=>{var B,W;(W=(B=k.value)==null?void 0:B.updatePopover)==null||W.call(B)})},z=()=>{var O;(O=s.onContentMouseenter)==null||O.call(s)},D=()=>{var O;(O=s.onContentMouseleave)==null||O.call(s)};return b({show:M,hide:y,updateTarget:x,stopHide:N}),()=>a.createVNode(ph,a.mergeProps(I.value,{ref:k,onContentMouseenter:z,onContentMouseleave:D}),{default:()=>[a.createVNode("span",{style:T.value},null)]})}};function d(C){return/^body$/i.test(C)?document.body:/^parent$/i.test(C)?o(s.target)?s.target.parentNode:s.target.target.parentNode:typeof C=="string"&&Wc(C)?document.querySelector(C):document.body}t===null&&(i=document.createElement("div"),d(s.boundary).append(i),setTimeout(()=>{t=a.createApp(c),n=t.mount(i)}));function u(){t&&(t.unmount(),n=null,t=null,i.remove())}function f(){n==null||n.show()}function m(C){n==null||n.updateTarget(C)}function p(){n==null||n.hide()}return{close:u,show:f,hide:p,update:m,get vm(){return n},get $el(){return n.$el}}}const Y0=(e,t)=>{const n={content:"",target:e};return typeof t.value=="object"?Object.assign(n,t.value):n.content=t.value,n},Bc=(e,t)=>{let n=null,i=null,s=null;const o=Y0(e,t),{disabled:c}=o;if(c||n)return;const d=()=>{s&&clearTimeout(s),s=null},u=()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},f=()=>{i&&clearTimeout(i),i=setTimeout(()=>{const C=Y0(e,t);C.content=C.content||e.innerHTML,Object.assign(C,{onContentMouseenter:d,onContentMouseleave:u}),n=Hc(C),setTimeout(()=>{n.show()})},100)},m=()=>{s=setTimeout(()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},120)};return e.addEventListener("mouseenter",f),e.addEventListener("mouseleave",m),Object.assign(t,{__cached:{handleMouseEnter:f,handleMouseLeave:m}}),{destroyInstance:C=>{var b,v;m(),(b=C!=null?C:e)==null||b.removeEventListener("mouseenter",f),(v=C!=null?C:e)==null||v.removeEventListener("mouseleave",m)},instance:n}},Ep={mounted(e,t){Bc(e,t)},beforeUnmount(e,t){if(t.__cached){const{handleMouseEnter:n,handleMouseLeave:i}=t.__cached;e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",i),t.__cached=null}}};var U0=a.defineComponent({name:"PopArrow",render(){const e=ze("pop2-arrow");return a.createVNode("div",{class:e},null)}});const Ba=(...e)=>!0;let En;(function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"})(En||(En={}));const Ap={[En.SHOW]:Ba,[En.HIDE]:Ba,[En.CLICK_OUTSIDE]:Ba,[En.CONTENT_MOUSEENTER]:Ba,[En.CONTENT_MOUSELEAVE]:Ba,[En.STOP_HIDE]:Ba};var $0=a.defineComponent({name:"PopContent",props:{width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),maxHeight:g.oneOfType([g.string,g.number]).def("auto")},setup(e){const t=i=>/^\d+\.?\d*$/.test(`${i}`)?`${i}px`:i;return{style:a.computed(()=>({width:t(e.width),height:t(e.height),maxHeight:t(e.maxHeight)}))}},render(){var t,n,i,s,o,c;const e=[ze("popover"),ze("pop2-content")];return a.createVNode("div",{class:e,tabindex:"-1",style:this.style},[(i=(n=(t=this.$slots).arrow)==null?void 0:n.call(t))!=null?i:"",(c=(o=(s=this.$slots).default)==null?void 0:o.call(s))!=null?c:""])}});const Pp={onAfterHidden:Function,onAfterShow:Function},Vp=Y({isShow:g.bool.def(!1),always:g.bool.def(!1),disabled:g.bool.def(!1),width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),maxHeight:g.oneOfType([g.string,g.number]).def("auto"),content:g.oneOfType([g.string,g.number]).def(""),placement:i0().def(Ps.TOP),theme:g.string.def("dark"),trigger:a0(),renderType:O2(),arrow:g.bool.def(!0),padding:g.number.def(5),offset:g.oneOfType([g.number,g.shape({})]).def(6),boundary:g.oneOfType([g.string.def("parent"),g.instanceOf(HTMLElement)]),zIndex:g.number.def(void 0),disableTeleport:g.bool.def(!1),autoPlacement:g.bool.def(!1),autoVisibility:g.bool.def(!0),disableOutsideClick:g.bool.def(!1),disableTransform:g.bool.def(!1),reference:g.any.def(null),modifiers:g.array.def([]),popoverDelay:g.number.def(100)},Pp);var Jp=a.defineComponent({name:"PopReference",render(){var e,t,n;return(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""}}),K0=a.defineComponent({props:{class:g.string.def("")},render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});function ri(e){return e.split("-")[0]}function la(e){return e.split("-")[1]}function Fa(e){return["top","bottom"].includes(ri(e))?"x":"y"}function Fc(e){return e==="y"?"height":"width"}function X0(e,t,n){let{reference:i,floating:s}=e;const o=i.x+i.width/2-s.width/2,c=i.y+i.height/2-s.height/2,d=Fa(t),u=Fc(d),f=i[u]/2-s[u]/2,m=ri(t),p=d==="x";let C;switch(m){case"top":C={x:o,y:i.y-s.height};break;case"bottom":C={x:o,y:i.y+i.height};break;case"right":C={x:i.x+i.width,y:c};break;case"left":C={x:i.x-s.width,y:c};break;default:C={x:i.x,y:i.y}}switch(la(t)){case"start":C[d]-=f*(n&&p?-1:1);break;case"end":C[d]+=f*(n&&p?-1:1);break}return C}const Rp=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:c}=n,d=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:m}=X0(u,i,d),p=i,C={};for(let b=0;b<o.length;b++){const{name:v,fn:k}=o[b],{x:T,y:L,data:M,reset:y}=await k({x:f,y:m,initialPlacement:i,placement:p,strategy:s,middlewareData:C,rects:u,platform:c,elements:{reference:e,floating:t}});if(f=T!=null?T:f,m=L!=null?L:m,C=xe(Y({},C),{[v]:Y(Y({},C[v]),M)}),y){typeof y=="object"&&(y.placement&&(p=y.placement),y.rects&&(u=y.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):y.rects),{x:f,y:m}=X0(u,p,d)),b=-1;continue}}return{x:f,y:m,placement:p,strategy:s,middlewareData:C}};function Qp(e){return Y({top:0,right:0,bottom:0,left:0},e)}function Gc(e){return typeof e!="number"?Qp(e):{top:e,right:e,bottom:e,left:e}}function Qr(e){return xe(Y({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function _r(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:c,elements:d,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:C=!1,padding:b=0}=t,v=Gc(b),T=d[C?p==="floating"?"reference":"floating":p],L=Qr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(T)))==null||n?T:T.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:f,rootBoundary:m,strategy:u})),M=Qr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?xe(Y({},c.floating),{x:i,y:s}):c.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),strategy:u}):c[p]);return{top:L.top-M.top+v.top,bottom:M.bottom-L.bottom+v.bottom,left:L.left-M.left+v.left,right:M.right-L.right+v.right}}const q0=Math.min,eh=Math.max;function Zc(e,t,n){return eh(e,q0(t,n))}const _p=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:i=0}=e!=null?e:{},{x:s,y:o,placement:c,rects:d,platform:u}=t;if(n==null)return{};const f=Gc(i),m={x:s,y:o},p=Fa(c),C=la(c),b=Fc(p),v=await u.getDimensions(n),k=p==="y"?"top":"left",T=p==="y"?"bottom":"right",L=d.reference[b]+d.reference[p]-m[p]-d.floating[b],M=m[p]-d.reference[p],y=await(u.getOffsetParent==null?void 0:u.getOffsetParent(n));let N=y?p==="y"?y.clientHeight||0:y.clientWidth||0:0;N===0&&(N=d.floating[b]);const I=L/2-M/2,x=f[k],z=N-v[b]-f[T],D=N/2-v[b]/2+I,O=Zc(x,D,z),B=(C==="start"?f[k]:f[T])>0&&D!==O&&d.reference[b]<=d.floating[b]?D<x?x-D:z-D:0;return{[p]:m[p]-B,data:{[p]:O,centerOffset:D-O}}}}),Wp={left:"right",right:"left",bottom:"top",top:"bottom"};function al(e){return e.replace(/left|right|bottom|top/g,t=>Wp[t])}function th(e,t,n){n===void 0&&(n=!1);const i=la(e),s=Fa(e),o=Fc(s);let c=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=al(c)),{main:c,cross:al(c)}}const Hp={start:"end",end:"start"};function Yc(e){return e.replace(/start|end/g,t=>Hp[t])}const nh=["top","right","bottom","left"],Bp=nh.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function Fp(e,t,n){return(e?[...n.filter(s=>la(s)===e),...n.filter(s=>la(s)!==e)]:n.filter(s=>ri(s)===s)).filter(s=>e?la(s)===e||(t?Yc(s)!==s:!1):!0)}const Gp=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,s,o,c;const{x:d,y:u,rects:f,middlewareData:m,placement:p,platform:C,elements:b}=t,ne=e,{alignment:v=null,allowedPlacements:k=Bp,autoAlignment:T=!0}=ne,L=Sa(ne,["alignment","allowedPlacements","autoAlignment"]),M=Fp(v,T,k),y=await _r(t,L),N=(n=(i=m.autoPlacement)==null?void 0:i.index)!=null?n:0,I=M[N];if(I==null)return{};const{main:x,cross:z}=th(I,f,await(C.isRTL==null?void 0:C.isRTL(b.floating)));if(p!==I)return{x:d,y:u,reset:{placement:M[0]}};const D=[y[ri(I)],y[x],y[z]],O=[...(s=(o=m.autoPlacement)==null?void 0:o.overflows)!=null?s:[],{placement:I,overflows:D}],_=M[N+1];if(_)return{data:{index:N+1,overflows:O},reset:{placement:_}};const E=O.slice().sort((oe,we)=>oe.overflows[0]-we.overflows[0]),B=(c=E.find(oe=>{let{overflows:we}=oe;return we.every(Ie=>Ie<=0)}))==null?void 0:c.placement,W=B!=null?B:E[0].placement;return W!==p?{data:{index:N+1,overflows:O},reset:{placement:W}}:{}}}};function Zp(e){const t=al(e);return[Yc(e),t,Yc(t)]}const Yp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:i,middlewareData:s,rects:o,initialPlacement:c,platform:d,elements:u}=t,O=e,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:C="bestFit",flipAlignment:b=!0}=O,v=Sa(O,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),k=ri(i),L=p||(k===c||!b?[al(c)]:Zp(c)),M=[c,...L],y=await _r(t,v),N=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&N.push(y[k]),m){const{main:_,cross:E}=th(i,o,await(d.isRTL==null?void 0:d.isRTL(u.floating)));N.push(y[_],y[E])}if(I=[...I,{placement:i,overflows:N}],!N.every(_=>_<=0)){var x,z;const _=((x=(z=s.flip)==null?void 0:z.index)!=null?x:0)+1,E=M[_];if(E)return{data:{index:_,overflows:I},reset:{placement:E}};let B="bottom";switch(C){case"bestFit":{var D;const W=(D=I.map(ne=>[ne,ne.overflows.filter(oe=>oe>0).reduce((oe,we)=>oe+we,0)]).sort((ne,oe)=>ne[1]-oe[1])[0])==null?void 0:D[0].placement;W&&(B=W);break}case"initialPlacement":B=c;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function ih(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ah(e){return nh.some(t=>e[t]>=0)}const Up=function(e){let i=e===void 0?{}:e,{strategy:t="referenceHidden"}=i,n=Sa(i,["strategy"]);return{name:"hide",async fn(s){const{rects:o}=s;switch(t){case"referenceHidden":{const c=await _r(s,xe(Y({},n),{elementContext:"reference"})),d=ih(c,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:ah(d)}}}case"escaped":{const c=await _r(s,xe(Y({},n),{altBoundary:!0})),d=ih(c,o.floating);return{data:{escapedOffsets:d,escaped:ah(d)}}}default:return{}}}}};async function $p(e,t){const{placement:n,platform:i,elements:s}=e,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=ri(n),d=la(n),u=Fa(n)==="x",f=["left","top"].includes(c)?-1:1,m=o&&u?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:C,crossAxis:b,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:Y({mainAxis:0,crossAxis:0,alignmentAxis:null},p);return d&&typeof v=="number"&&(b=d==="end"?v*-1:v),u?{x:b*m,y:C*f}:{x:C*f,y:b*m}}const Kp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:i}=t,s=await $p(t,e);return{x:n+s.x,y:i+s.y,data:s}}}};function Xp(e){return e==="x"?"y":"x"}const qp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,T=e,{mainAxis:o=!0,crossAxis:c=!1,limiter:d={fn:L=>{let{x:M,y}=L;return{x:M,y}}}}=T,u=Sa(T,["mainAxis","crossAxis","limiter"]),f={x:n,y:i},m=await _r(t,u),p=Fa(ri(s)),C=Xp(p);let b=f[p],v=f[C];if(o){const L=p==="y"?"top":"left",M=p==="y"?"bottom":"right",y=b+m[L],N=b-m[M];b=Zc(y,b,N)}if(c){const L=C==="y"?"top":"left",M=C==="y"?"bottom":"right",y=v+m[L],N=v-m[M];v=Zc(y,v,N)}const k=d.fn(xe(Y({},t),{[p]:b,[C]:v}));return xe(Y({},k),{data:{x:k.x-n,y:k.y-i}})}}},e5=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:i,elements:s,rects:o,platform:c,strategy:d}=t,{padding:u=2,x:f,y:m}=e,p=Qr(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(c.getOffsetParent==null?void 0:c.getOffsetParent(s.floating)),strategy:d}):o.reference),C=(n=await(c.getClientRects==null?void 0:c.getClientRects(s.reference)))!=null?n:[],b=Gc(u);function v(){if(C.length===2&&C[0].left>C[1].right&&f!=null&&m!=null){var T;return(T=C.find(L=>f>L.left-b.left&&f<L.right+b.right&&m>L.top-b.top&&m<L.bottom+b.bottom))!=null?T:p}if(C.length>=2){if(Fa(i)==="x"){const E=C[0],B=C[C.length-1],W=ri(i)==="top",ne=E.top,oe=B.bottom,we=W?E.left:B.left,Ie=W?E.right:B.right,de=Ie-we,he=oe-ne;return{top:ne,bottom:oe,left:we,right:Ie,width:de,height:he,x:we,y:ne}}const L=ri(i)==="left",M=eh(...C.map(E=>E.right)),y=q0(...C.map(E=>E.left)),N=C.filter(E=>L?E.left===y:E.right===M),I=N[0].top,x=N[N.length-1].bottom,z=y,D=M,O=D-z,_=x-I;return{top:I,bottom:x,left:z,right:D,width:O,height:_,x:z,y:I}}return p}const k=await c.getElementRects({reference:{getBoundingClientRect:v},floating:s.floating,strategy:d});return o.reference.x!==k.reference.x||o.reference.y!==k.reference.y||o.reference.width!==k.reference.width||o.reference.height!==k.reference.height?{reset:{rects:k}}:{}}}};function rh(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function si(e){if(e==null)return window;if(!rh(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Wr(e){return si(e).getComputedStyle(e)}function li(e){return rh(e)?"":e?(e.nodeName||"").toLowerCase():""}function sh(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Fn(e){return e instanceof si(e).HTMLElement}function Ai(e){return e instanceof si(e).Element}function t5(e){return e instanceof si(e).Node}function Uc(e){if(typeof ShadowRoot=="undefined")return!1;const t=si(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function rl(e){const{overflow:t,overflowX:n,overflowY:i}=Wr(e);return/auto|scroll|overlay|hidden/.test(t+i+n)}function n5(e){return["table","td","th"].includes(li(e))}function lh(e){const t=/firefox/i.test(sh()),n=Wr(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function oh(){return!/^((?!chrome|android).)*safari/i.test(sh())}const ch=Math.min,Hr=Math.max,sl=Math.round;function oi(e,t,n){var i,s,o,c;t===void 0&&(t=!1),n===void 0&&(n=!1);const d=e.getBoundingClientRect();let u=1,f=1;t&&Fn(e)&&(u=e.offsetWidth>0&&sl(d.width)/e.offsetWidth||1,f=e.offsetHeight>0&&sl(d.height)/e.offsetHeight||1);const m=Ai(e)?si(e):window,p=!oh()&&n,C=(d.left+(p&&(i=(s=m.visualViewport)==null?void 0:s.offsetLeft)!=null?i:0))/u,b=(d.top+(p&&(o=(c=m.visualViewport)==null?void 0:c.offsetTop)!=null?o:0))/f,v=d.width/u,k=d.height/f;return{width:v,height:k,top:b,right:C+v,bottom:b+k,left:C,x:C,y:b}}function Pi(e){return((t5(e)?e.ownerDocument:e.document)||window.document).documentElement}function ll(e){return Ai(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function uh(e){return oi(Pi(e)).left+ll(e).scrollLeft}function i5(e){const t=oi(e);return sl(t.width)!==e.offsetWidth||sl(t.height)!==e.offsetHeight}function a5(e,t,n){const i=Fn(t),s=Pi(t),o=oi(e,i&&i5(t),n==="fixed");let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if(i||!i&&n!=="fixed")if((li(t)!=="body"||rl(s))&&(c=ll(t)),Fn(t)){const u=oi(t,!0);d.x=u.x+t.clientLeft,d.y=u.y+t.clientTop}else s&&(d.x=uh(s));return{x:o.left+c.scrollLeft-d.x,y:o.top+c.scrollTop-d.y,width:o.width,height:o.height}}function dh(e){return li(e)==="html"?e:e.assignedSlot||e.parentNode||(Uc(e)?e.host:null)||Pi(e)}function fh(e){return!Fn(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function r5(e){let t=dh(e);for(Uc(t)&&(t=t.host);Fn(t)&&!["html","body"].includes(li(t));){if(lh(t))return t;t=t.parentNode}return null}function $c(e){const t=si(e);let n=fh(e);for(;n&&n5(n)&&getComputedStyle(n).position==="static";)n=fh(n);return n&&(li(n)==="html"||li(n)==="body"&&getComputedStyle(n).position==="static"&&!lh(n))?t:n||r5(e)||t}function hh(e){if(Fn(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=oi(e);return{width:t.width,height:t.height}}function s5(e){let{rect:t,offsetParent:n,strategy:i}=e;const s=Fn(n),o=Pi(n);if(n===o)return t;let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if((s||!s&&i!=="fixed")&&((li(n)!=="body"||rl(o))&&(c=ll(n)),Fn(n))){const u=oi(n,!0);d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}return xe(Y({},t),{x:t.x-c.scrollLeft+d.x,y:t.y-c.scrollTop+d.y})}function l5(e,t){const n=si(e),i=Pi(e),s=n.visualViewport;let o=i.clientWidth,c=i.clientHeight,d=0,u=0;if(s){o=s.width,c=s.height;const f=oh();(f||!f&&t==="fixed")&&(d=s.offsetLeft,u=s.offsetTop)}return{width:o,height:c,x:d,y:u}}function o5(e){var t;const n=Pi(e),i=ll(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=Hr(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=Hr(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-i.scrollLeft+uh(e);const u=-i.scrollTop;return Wr(s||n).direction==="rtl"&&(d+=Hr(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:d,y:u}}function gh(e){const t=dh(e);return["html","body","#document"].includes(li(t))?e.ownerDocument.body:Fn(t)&&rl(t)?t:gh(t)}function ol(e,t){var n;t===void 0&&(t=[]);const i=gh(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=si(i),c=s?[o].concat(o.visualViewport||[],rl(i)?i:[]):i,d=t.concat(c);return s?d:d.concat(ol(c))}function c5(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Uc(n)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function u5(e,t){const n=oi(e,!1,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft;return{top:i,left:s,x:s,y:i,right:s+e.clientWidth,bottom:i+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function mh(e,t,n){return t==="viewport"?Qr(l5(e,n)):Ai(t)?u5(t,n):Qr(o5(Pi(e)))}function d5(e){const t=ol(e),i=["absolute","fixed"].includes(Wr(e).position)&&Fn(e)?$c(e):e;return Ai(i)?t.filter(s=>Ai(s)&&c5(s,i)&&li(s)!=="body"):[]}function f5(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const c=[...n==="clippingAncestors"?d5(t):[].concat(n),i],d=c[0],u=c.reduce((f,m)=>{const p=mh(t,m,s);return f.top=Hr(p.top,f.top),f.right=ch(p.right,f.right),f.bottom=ch(p.bottom,f.bottom),f.left=Hr(p.left,f.left),f},mh(t,d,s));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}const h5={getClippingRect:f5,convertOffsetParentRelativeRectToViewportRelativeRect:s5,isElement:Ai,getDimensions:hh,getOffsetParent:$c,getDocumentElement:Pi,getElementRects:e=>{let{reference:t,floating:n,strategy:i}=e;return{reference:a5(t,$c(n),i),floating:xe(Y({},hh(n)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Wr(e).direction==="rtl"};function g5(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:c=!0,animationFrame:d=!1}=i,u=s&&!d,f=o&&!d,m=u||f?[...Ai(e)?ol(e):[],...ol(t)]:[];m.forEach(k=>{u&&k.addEventListener("scroll",n,{passive:!0}),f&&k.addEventListener("resize",n)});let p=null;c&&(p=new ResizeObserver(n),Ai(e)&&!d&&p.observe(e),p.observe(t));let C,b=d?oi(e):null;d&&v();function v(){const k=oi(e);b&&(k.x!==b.x||k.y!==b.y||k.width!==b.width||k.height!==b.height)&&n(),b=k,C=requestAnimationFrame(v)}return c||n(),()=>{var k;m.forEach(T=>{u&&T.removeEventListener("scroll",n),f&&T.removeEventListener("resize",n)}),(k=p)==null||k.disconnect(),p=null,d&&cancelAnimationFrame(C)}}const m5=(e,t,n)=>Rp(e,t,Y({platform:h5},n));var p5=e=>({getElementRects:({reference:s,floating:o})=>{const c=s.getBoundingClientRect(),d=o.getBoundingClientRect();return{reference:{width:c.width,height:c.height,x:c.x,y:c.y},floating:{width:d.width,height:d.height,x:d.x,y:d.y}}},getDimensions:s=>{const{width:o,height:c}=s.getBoundingClientRect();return{width:o,height:c}},getClippingRect:({})=>{var c;const{width:s=0,height:o=0}=(c=e==null?void 0:e.getBoundingClientRect())!=null?c:{};return{width:s,height:o,x:0,y:0}}}),b5=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{const c=a.ref(!1),d=a.ref(),u=()=>{var X,le,Z;const se=L((X=n.value)==null?void 0:X.$el);return(le=document.fullscreenElement)!=null&&le.shadowRoot?document.fullscreenElement.shadowRoot.contains(se):(Z=document.fullscreenElement)==null?void 0:Z.contains(se)},f=se=>u()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(se):document.fullscreenElement.querySelector(se):document.body,m=["dark","light"],p=a.computed(()=>{var Z,V;const se=(V=(Z=e.theme)==null?void 0:Z.split(/\s+/))!=null?V:[];se.sort((P,K)=>Number(m.includes(K))-Number(m.includes(P)));const X=se,le=se.filter(P=>!m.includes(P));return{systemThemes:X,customThemes:le}}),C=()=>e.autoVisibility,b=()=>e.autoPlacement,v=()=>{var V,P,K,j;const se=L((V=n.value)==null?void 0:V.$el),X=L((P=i.value)==null?void 0:P.$el),le=e.arrow?L((K=s.value)==null?void 0:K.$el):null,Z=L((j=o.value)==null?void 0:j.$el);return{elReference:se,elContent:X,elArrow:le,root:Z}},k=()=>{const se={};return Array.isArray(e.modifiers)&&e.modifiers.forEach(X=>{var Z,V,P,K;let le;if(X.name==="offset"){if(typeof((Z=X.options)==null?void 0:Z.offset)=="number"&&(le=(V=X.options)==null?void 0:V.offset),Array.isArray((P=X.options)==null?void 0:P.offset)){const[j,Q]=(K=X.options)==null?void 0:K.offset;le={mainAxis:j,crossAxis:Q}}Object.assign(se,{offset:le})}}),se},T=(se,X)=>{var P;const le=k(),Z=[Kp(le.offset||X.offset),qp({padding:X.padding})],V={placement:X.placement,middleware:Z};if(X.arrow&&Z.push(_p({element:se})),b()?Z.push(Gp()):(Z.unshift(e5()),Z.push(Yp())),C()&&V.middleware.push(Up()),u()||X.isVirtualEl){const{getElementRects:K,getDimensions:j,getClippingRect:Q}=p5(d.value);Object.assign(V,{platform:xe(Y({},(P=X==null?void 0:X.platform)!=null?P:{}),{getElementRects:K,getDimensions:j,getClippingRect:Q})})}return V},L=se=>se instanceof HTMLElement?se:se instanceof Text?L(se.nextElementSibling):typeof(se==null?void 0:se.getBoundingClientRect)=="function"?se:null,M=p.value.customThemes.join(" "),y=p.value.customThemes.reduce((se,X)=>Y({[`data-${X}-theme`]:!0},se),{}),N=`${M}`;let I=null;const x=se=>{const X=window.devicePixelRatio||1;return Math.round(se*X)/X||0},z=(se,X,le,Z)=>{var P;e.disableTransform?Object.assign(se.style,{left:`${x(X)}px`,top:`${x(le)}px`}):Object.assign(se.style,{left:"0",top:"0",transform:`translate3d(${x(X)}px,${x(le)}px,0)`});const V=C()?(P=Z.hide)==null?void 0:P.referenceHidden:!1;Object.assign(se.style,{visibility:V?"hidden":"visible"})},D=(se,X,le)=>{var Z;if(e.arrow){const{x:V,y:P}=(Z=le.arrow)!=null?Z:{};se.setAttribute("data-arrow",X);const K={left:"",top:"",bottom:"",right:""};Object.assign(se.style,K);const j={top:"bottom",right:"left",bottom:"top",left:"right"}[X];Object.assign(se.style,{left:V!==null?`${V}px`:"",top:P!==null?`${P}px`:"",[j]:"-4px"})}},O=()=>{const{elReference:se,elContent:X}=v();I=g5(se,X,()=>{_(null,e)})},_=(se=null,X={})=>{const{elReference:le,elContent:Z,elArrow:V}=v(),P=se||le;if(!P||!Z)return;const K=T(V,X);m5(P,Z,K).then(({x:j,y:Q,placement:R,middlewareData:me})=>{const ce=Z.className;Z.className=`${ce.replace(N,"")} ${N}`.replace(/\s+/mg," ").replace(/^\s+|\s+$/g,""),Object.keys(y).forEach(ae=>{Z.setAttribute(ae,y[ae])});const be=R.split("-")[0];let q=be;["left","right","top","bottom"].includes(be)||(q="top"),z(Z,j,Q,me),D(V,q,me)})};let E,B=!1;const W=()=>{setTimeout(()=>{!e.disabled&&(c.value=!0)},e.popoverDelay)},ne=()=>{E=setTimeout(()=>{c.value=!1},e.popoverDelay)},oe=()=>{var X;const se=L((X=i.value)==null?void 0:X.$el);se.style.setProperty("display","block"),se.style.setProperty("z-index",`${e.zIndex?e.zIndex:_n.getPopperIndex()}`),_(),t.emit("afterShow",{isShow:!0})},we=()=>{var X;L((X=i.value)==null?void 0:X.$el).style.setProperty("display","none"),t.emit("afterHidden",{isShow:!1})},Ie=()=>{c.value?ne():W()},de=()=>{Ie()},he=()=>{e.trigger==="hover"&&(E&&(B=!0,clearTimeout(E),E=void 0),$())},ee=()=>{B&&(ne(),B=!1,F())},$=()=>{t.emit(En.CONTENT_MOUSEENTER)},F=()=>{t.emit(En.CONTENT_MOUSELEAVE)},H=()=>{var X;return(X={hover:{content:[["mouseenter",he],["mouseleave",ee]],reference:[["mouseenter",W],["mouseleave",ne],["focus",W],["blur",ne]]},click:[["click",de]],manual:{content:[["mouseenter",$],["mouseleave",F]],reference:[[]]}}[e.trigger])!=null?X:[]},ge=se=>{d.value=se};return a.watch(c,se=>{se?oe():we()}),{showPopover:W,hidePopover:ne,resolveTriggerEvents:H,updatePopover:_,triggerPopover:Ie,resolvePopElements:v,isElementFullScreen:u,resolveTargetElement:L,createPopInstance:O,updateFullscreenTarget:ge,getFullscreenRoot:f,stopHide:()=>{E&&(B=!0,clearTimeout(E),E=void 0)},localIsShow:c,cleanup:I}};let Vi=null,cl=null;var y5=(e,t="#")=>{const n=i=>{let s=null;const o=u=>{s===null&&u()},c=()=>{if(/^parent$/i.test(e.boundary)){s=`${t}${Vi}`;const{parentNode:u}=i||{};u!=null&&u.parentNode&&(u.parentNode.setAttribute("data-pnode-id",cl),s=`[data-pnode-id=${cl}]`)}},d=()=>{if(!/^body$/i.test(e.boundary)&&typeof e.boundary=="string"){if(!Wc(e.boundary)){console.error("props.boundary is not available selector"),s="body";return}s=e.boundary}};return o(c),o(d),o(()=>{s=typeof e.boundary=="string"?e.boundary:`${t}${Vi}`}),s};if(Vi===null||!Wc(`#${Vi}`)){Vi=`id_${ki.v4()}`;const i=document.createElement("div");i.setAttribute("id",Vi),i.setAttribute("data-popper-id",Vi),document.body.append(i)}return cl===null&&(cl=`id_${ki.v4()}`),{popContainerId:Vi,prefixId:n(),getPrefixId:n}},C5=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{let c=null;const d=a.ref(!1),u=Op(),f=a.ref(),{localIsShow:m,showPopover:p,hidePopover:C,updatePopover:b,resolveTriggerEvents:v,resolvePopElements:k,isElementFullScreen:T,updateFullscreenTarget:L,createPopInstance:M,getFullscreenRoot:y,stopHide:N}=b5(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o}),I=()=>{p()},x=()=>{C()},z=()=>{M(),e.always?p():D()},D=()=>{const{elReference:F,elContent:H}=k();if(c=v(),Array.isArray(c))O(F,c);else{const{content:ge,reference:re}=c;O(F,re),O(H,ge)}},O=(F,H)=>{H.forEach(([ge,re])=>{ge&&typeof re=="function"&&F.addEventListener(ge,re)})},_=()=>{if(c!=null&&c.length){const{elReference:F}=k();F&&c.forEach(([H,ge])=>{H&&typeof ge=="function"&&F.removeEventListener(H,ge)}),c=null}},E=()=>{const{elReference:F,root:H}=k();if(d.value){oe.value=f==null?void 0:f.value;return}oe.value=B(H||F)},{getPrefixId:B}=y5(e,"#"),W=()=>{var F;(F=f==null?void 0:f.value)==null||F.setAttribute("data-fllsrn-id",u)},ne=()=>{var H,ge;const F=`[data-fllsrn-id=${u}]`;((ge=(H=f==null?void 0:f.value)==null?void 0:H.querySelectorAll(F))!=null?ge:[]).forEach(re=>{re==null||re.removeAttribute("data-fllsrn-id")})},oe=a.ref(),we=()=>{_()},Ie=F=>{f.value=F,L(F),d.value=T(),W()},de=F=>{document.fullscreenElement||ne(),Ie(F.target),E(),b(null,e)};return{onMountedFn:()=>{if(!e.disabled){if(z(),T()){const F=`[data-fllsrn-id=${u}]`,H=y(F);Ie(H)}E(),document.body.addEventListener("fullscreenchange",de)}},onUnmountedFn:()=>{we(),document.body.removeEventListener("fullscreenchange",de)},handleClickOutside:F=>{t.emit(En.CLICK_OUTSIDE,{isShow:m.value,event:F}),!(e.disableOutsideClick||e.always||e.disabled||e.trigger==="manual")&&m.value&&x()},beforeInstanceUnmount:we,updateBoundary:E,initPopInstance:z,updatePopover:b,showPopover:p,hidePopover:C,showFn:I,hideFn:x,stopHide:N,isFullscreen:d,boundary:oe,localIsShow:m}},ph=a.defineComponent({name:"Popover",components:{Content:$0,Arrow:U0,Root:K0},directives:{clickoutside:On},props:Vp,emits:Ap,setup(e,t){const{content:n,theme:i,disableTeleport:s}=e,{reference:o}=a.toRefs(e),c=a.ref(),d=a.ref(),u=a.ref(),f=a.ref(),m=a.computed(()=>o.value||c.value),{onMountedFn:p,onUnmountedFn:C,handleClickOutside:b,beforeInstanceUnmount:v,updateBoundary:k,initPopInstance:T,showFn:L,hideFn:M,showPopover:y,hidePopover:N,updatePopover:I,stopHide:x,localIsShow:z,boundary:D}=C5(e,t,{refReference:m,refContent:d,refArrow:u,refRoot:f});!e.always&&!e.disabled&&a.watch(()=>e.isShow,()=>{e.isShow?y():N()},{immediate:!0}),a.watch(()=>[e.disabled],W=>{W[0]?v():T()}),k(),a.onMounted(p),a.onBeforeUnmount(C);const O=a.computed(()=>!s),_=()=>{L()},E=()=>{M()},B=a.computed(()=>e.renderType===tc.AUTO?!0:z.value);return{boundary:D,arrow:e.arrow,refDefaultReference:c,refContent:d,refArrow:u,content:n,theme:i,transBoundary:O,handleClickOutside:b,updatePopover:I,hide:E,show:_,stopHide:x,contentIsShow:B}},render(){return a.createVNode(K0,{ref:"refRoot"},{default:()=>[a.createVNode(Jp,{ref:"refDefaultReference"},{default:()=>{var e,t,n;return[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:a.createVNode("span",null,null)]}}),a.createVNode(a.Teleport,{to:this.boundary,disabled:!this.transBoundary},{default:()=>[a.withDirectives(a.createVNode($0,{ref:"refContent","data-theme":this.theme,width:this.width,height:this.height,maxHeight:this.maxHeight},{default:()=>{var e,t,n;return[this.contentIsShow?(n=(t=(e=this.$slots).content)==null?void 0:t.call(e))!=null?n:this.content:""]},arrow:()=>this.arrow?a.createVNode(U0,{ref:"refArrow"},{default:()=>{var e,t;return[(t=(e=this.$slots).arrow)==null?void 0:t.call(e)]}}):""}),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])]})]})}});const pn=Ge(ph);var v5=a.defineComponent({name:"Popover2",setup(){return()=>a.createVNode("code",null,["<bk-popover2></bk-popover2>\u5DF2\u7ECF\u5408\u5E76\u4E3A<bk-popover></bk-popover>\uFF0C\u8BF7\u66FF\u6362\u4E3A<bk-popover></bk-popover>"])}});const bh=Ge(v5),w5=(e,{attrs:t,slots:n})=>{const{width:i,percent:s,strokeWidth:o,color:c,strokeLinecap:d,theme:u,type:f,bgColor:m,titleStyle:p}=t,C=o||6,b=i||126,v={width:typeof b=="number"?`${b}px`:b,height:typeof b=="number"?`${b}px`:b,fontSize:`${b*.15+6}px`},k=50-C/2,T=f==="dashboard",L=Math.PI*2*k,M=T&&.75||1,y=`${-1*L*(1-M)/2}px`,N="stroke-dasharray 0.6s ease 0s, stroke 0.6s ease",I={strokeDasharray:`${L*M}px, ${L}px`,strokeDashoffset:y},x={strokeDasharray:`${L*M*(s/100)}px, ${L}px`,strokeDashoffset:y,transition:N},z=`
58
+ */function vp(e,t){if(!J0.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i=typeof s[n]=="function"}return!i&&R0&&e==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var wp=vp,Mp=bp,Ip=wp,Q0=10,_0=40,W0=800;function H0(e){var t=0,n=0,i=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),i=t*Q0,s=n*Q0,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(e.deltaMode==1?(i*=_0,s*=_0):(i*=W0,s*=W0)),i&&!t&&(t=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:i,pixelY:s}}H0.getEventType=function(){return Mp.firefox()?"DOMMouseScroll":Ip("wheel")?"wheel":"mousewheel"};var Np=H0,Lp=Np;const kp=typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,Tp=function(e,t){e!=null&&e.addEventListener&&e.addEventListener(kp?"DOMMouseScroll":"mousewheel",function(n){const i=Lp(n);t==null||t.apply(this,[n,i])})},xp={beforeMount(e,t){console.error(e,t),Tp(e,t.value)}},Sp=e=>typeof Element=="undefined"?!1:e instanceof Element,Oi=new Map;let B0;document.addEventListener("mousedown",e=>B0=e),document.addEventListener("mouseup",e=>{for(const t of Oi.values())for(const{documentHandler:n}of t)n(e,B0)});function F0(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:Sp(t.arg)&&n.push(t.arg),function(i,s){const{popperRef:o}=t.instance,c=i.target,d=s==null?void 0:s.target,u=!t||!t.instance,f=!c||!d,m=e.contains(c)||e.contains(d),p=e===c,C=n.length&&n.some(v=>v==null?void 0:v.contains(c))||n.length&&n.includes(d),b=o&&(o.contains(c)||o.contains(d));u||f||m||p||C||b||t.value(i,s)}}const On={beforeMount(e,t){Oi.has(e)||Oi.set(e,[]),Oi.get(e).push({documentHandler:F0(e,t),bindingFn:t.value})},updated(e,t){Oi.has(e)||Oi.set(e,[]);const n=Oi.get(e),i=n.findIndex(o=>o.bindingFn===t.oldValue),s={documentHandler:F0(e,t),bindingFn:t.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(e){Oi.delete(e)}};On.install=e=>{e.directive("bkTooltips",On)};const Ei=new Map,il={beforeMount(e,t){const n=G0(t),{trigger:i}=n,s=jp(n);let o=null;if(i==="hover"){let c=null;e.addEventListener("mouseenter",()=>{o=setTimeout(()=>{Qc(e),clearTimeout(c),clearTimeout(o)},n.delay)}),s.addEventListener("mouseenter",()=>{clearTimeout(c)}),e.addEventListener("mouseleave",()=>{clearTimeout(o),c=setTimeout(()=>{Rr(e)},100)}),e.addEventListener("click",()=>{Rr(e)}),s.addEventListener("mouseleave",()=>{clearTimeout(o),c=setTimeout(()=>{Rr(e)},100)})}else i==="click"&&document.body.addEventListener("click",c=>{e.contains(c.target)&&!s.hasAttribute("data-show")?o=setTimeout(()=>{Qc(e),clearTimeout(o)},n.delay):s.hasAttribute("data-show")&&Rr(e)});Ei.set(e,{opts:n,popper:s,popperInstance:null})},updated(e,t){Ei.get(e).opts=G0(t)},unmounted(e){Rr(e),Ei.delete(e)}};function Dp(){return{arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,extCls:"",delay:0,onShow:()=>{},onHide:()=>{}}}function G0(e){const t=Dp();return typeof e.value=="object"?Object.assign(t,e.value):t.content=e.value,t}function jp(e){const{content:t,arrow:n,theme:i,extCls:s}=e,o=i==="light",c=_n.getPopperIndex(),d=document.createElement("div");if(d.className=`bk-popper ${o?"light":"dark"} ${s}`,d.innerText=t,d.style.zIndex=String(c),n){const u=Z0();d.appendChild(u)}return d}function Z0(){const e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function zp(e,t){const{opts:n}=Ei.get(e),{placement:i,distance:s,showOnInit:o}=n,c=_f(e,t,{placement:i,modifiers:[{name:"offset",options:{offset:[0,s]}}]});return o&&Qc(e),c}function Qc(e){const{popper:t,opts:n}=Ei.get(e),{disabled:i,content:s,arrow:o,onShow:c}=n;if(i)return;if(t.innerText=s,o){const u=Z0();t.appendChild(u)}document.body.appendChild(t);const d=zp(e,t);c(),t.setAttribute("data-show",""),d.setOptions(u=>xe(Y({},u),{modifiers:[...u.modifiers,{name:"eventListeners",enabled:!0}]})),d.forceUpdate(),Ei.get(e).popperInstance=d}function Rr(e){if(!Ei.get(e))return;const{popper:t,popperInstance:n,opts:i}=Ei.get(e),{onHide:s}=i;t&&document.body.contains(t)&&(t.removeAttribute("data-show"),n==null||n.destroy(),document.body.removeChild(t),s())}const _c={},Wc=e=>document.querySelector(e)instanceof HTMLElement,Op=()=>(_c.fullscreenReferId||(_c.fullscreenReferId=`id_${ki.v4()}`),_c.fullscreenReferId);function Hc(e){let t=null,n=null,i=null;const s=xe(Y({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),o=C=>C instanceof Element||C instanceof HTMLDocument,c={name:"$popover",setup(C,{expose:b}){const v=a.ref(s),k=a.ref(),T=a.ref({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),L=O=>{if(o(O)){const{x:B,y:W,width:ne,height:oe}=O.getBoundingClientRect();Object.assign(T.value,{width:`${ne}px`,height:`${oe}px`,transform:`translate3d(${B}px,${W}px,0)`});return}const{clientX:_,clientY:E}=O;Object.assign(T.value,{transform:`translate3d(${_}px,${E}px,0)`,width:"10px",height:"10px"})};L(v.value.target);const M=()=>{setTimeout(()=>{var O,_;(_=(O=k.value)==null?void 0:O.show)==null||_.call(O)})},y=()=>{var O,_;(_=(O=k.value)==null?void 0:O.hide)==null||_.call(O)},N=()=>{var O,_;(_=(O=k.value)==null?void 0:O.stopHide)==null||_.call(O)},I=a.computed(()=>{const O=["target"];return Object.keys(v.value).filter(_=>!O.includes(_)).reduce((_,E)=>xe(Y({},_),{[E]:v.value[E]}),{})}),x=O=>{var _,E;v.value.target=O,L(O),(E=(_=k.value)==null?void 0:_.updatePopover)==null||E.call(_),a.nextTick(()=>{var B,W;(W=(B=k.value)==null?void 0:B.updatePopover)==null||W.call(B)})},z=()=>{var O;(O=s.onContentMouseenter)==null||O.call(s)},D=()=>{var O;(O=s.onContentMouseleave)==null||O.call(s)};return b({show:M,hide:y,updateTarget:x,stopHide:N}),()=>a.createVNode(ph,a.mergeProps(I.value,{ref:k,onContentMouseenter:z,onContentMouseleave:D}),{default:()=>[a.createVNode("span",{style:T.value},null)]})}};function d(C){return/^body$/i.test(C)?document.body:/^parent$/i.test(C)?o(s.target)?s.target.parentNode:s.target.target.parentNode:typeof C=="string"&&Wc(C)?document.querySelector(C):document.body}t===null&&(i=document.createElement("div"),d(s.boundary).append(i),setTimeout(()=>{t=a.createApp(c),n=t.mount(i)}));function u(){t&&(t.unmount(),n=null,t=null,i.remove())}function f(){n==null||n.show()}function m(C){n==null||n.updateTarget(C)}function p(){n==null||n.hide()}return{close:u,show:f,hide:p,update:m,get vm(){return n},get $el(){return n.$el}}}const Y0=(e,t)=>{const n={content:"",target:e};return typeof t.value=="object"?Object.assign(n,t.value):n.content=t.value,n},Bc=(e,t)=>{let n=null,i=null,s=null;const o=Y0(e,t),{disabled:c}=o;if(c||n)return;const d=()=>{s&&clearTimeout(s),s=null},u=()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},f=()=>{i&&clearTimeout(i),i=setTimeout(()=>{const C=Y0(e,t);C.content=C.content||e.innerHTML,Object.assign(C,{onContentMouseenter:d,onContentMouseleave:u}),n=Hc(C),setTimeout(()=>{n.show()})},100)},m=()=>{s=setTimeout(()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},120)};return e.addEventListener("mouseenter",f),e.addEventListener("mouseleave",m),Object.assign(t,{__cached:{handleMouseEnter:f,handleMouseLeave:m}}),{destroyInstance:C=>{var b,v;m(),(b=C!=null?C:e)==null||b.removeEventListener("mouseenter",f),(v=C!=null?C:e)==null||v.removeEventListener("mouseleave",m)},instance:n}},Ep={mounted(e,t){Bc(e,t)},beforeUnmount(e,t){if(t.__cached){const{handleMouseEnter:n,handleMouseLeave:i}=t.__cached;e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",i),t.__cached=null}}};var U0=a.defineComponent({name:"PopArrow",render(){const e=ze("pop2-arrow");return a.createVNode("div",{class:e},null)}});const Ba=(...e)=>!0;let En;(function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"})(En||(En={}));const Ap={[En.SHOW]:Ba,[En.HIDE]:Ba,[En.CLICK_OUTSIDE]:Ba,[En.CONTENT_MOUSEENTER]:Ba,[En.CONTENT_MOUSELEAVE]:Ba,[En.STOP_HIDE]:Ba};var $0=a.defineComponent({name:"PopContent",props:{width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),maxHeight:g.oneOfType([g.string,g.number]).def("auto")},setup(e){const t=i=>/^\d+\.?\d*$/.test(`${i}`)?`${i}px`:i;return{style:a.computed(()=>({width:t(e.width),height:t(e.height),maxHeight:t(e.maxHeight)}))}},render(){var t,n,i,s,o,c;const e=[ze("popover"),ze("pop2-content")];return a.createVNode("div",{class:e,tabindex:"-1",style:this.style},[(i=(n=(t=this.$slots).arrow)==null?void 0:n.call(t))!=null?i:"",(c=(o=(s=this.$slots).default)==null?void 0:o.call(s))!=null?c:""])}});const Pp={onAfterHidden:Function,onAfterShow:Function},Vp=Y({isShow:g.bool.def(!1),always:g.bool.def(!1),disabled:g.bool.def(!1),width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),maxHeight:g.oneOfType([g.string,g.number]).def("auto"),content:g.oneOfType([g.string,g.number]).def(""),placement:i0().def(Ps.TOP),theme:g.string.def("dark"),trigger:a0(),renderType:O2(),arrow:g.bool.def(!0),padding:g.number.def(5),offset:g.oneOfType([g.number,g.shape({})]).def(6),boundary:g.oneOfType([g.string.def("parent"),g.instanceOf(HTMLElement)]),zIndex:g.number.def(void 0),disableTeleport:g.bool.def(!1),autoPlacement:g.bool.def(!1),autoVisibility:g.bool.def(!0),disableOutsideClick:g.bool.def(!1),disableTransform:g.bool.def(!1),reference:g.any.def(null),modifiers:g.array.def([]),popoverDelay:g.number.def(100)},Pp);var Jp=a.defineComponent({name:"PopReference",render(){var e,t,n;return(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""}}),K0=a.defineComponent({props:{class:g.string.def("")},render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});function ri(e){return e.split("-")[0]}function la(e){return e.split("-")[1]}function Fa(e){return["top","bottom"].includes(ri(e))?"x":"y"}function Fc(e){return e==="y"?"height":"width"}function X0(e,t,n){let{reference:i,floating:s}=e;const o=i.x+i.width/2-s.width/2,c=i.y+i.height/2-s.height/2,d=Fa(t),u=Fc(d),f=i[u]/2-s[u]/2,m=ri(t),p=d==="x";let C;switch(m){case"top":C={x:o,y:i.y-s.height};break;case"bottom":C={x:o,y:i.y+i.height};break;case"right":C={x:i.x+i.width,y:c};break;case"left":C={x:i.x-s.width,y:c};break;default:C={x:i.x,y:i.y}}switch(la(t)){case"start":C[d]-=f*(n&&p?-1:1);break;case"end":C[d]+=f*(n&&p?-1:1);break}return C}const Rp=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:c}=n,d=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:m}=X0(u,i,d),p=i,C={};for(let b=0;b<o.length;b++){const{name:v,fn:k}=o[b],{x:T,y:L,data:M,reset:y}=await k({x:f,y:m,initialPlacement:i,placement:p,strategy:s,middlewareData:C,rects:u,platform:c,elements:{reference:e,floating:t}});if(f=T!=null?T:f,m=L!=null?L:m,C=xe(Y({},C),{[v]:Y(Y({},C[v]),M)}),y){typeof y=="object"&&(y.placement&&(p=y.placement),y.rects&&(u=y.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):y.rects),{x:f,y:m}=X0(u,p,d)),b=-1;continue}}return{x:f,y:m,placement:p,strategy:s,middlewareData:C}};function Qp(e){return Y({top:0,right:0,bottom:0,left:0},e)}function Gc(e){return typeof e!="number"?Qp(e):{top:e,right:e,bottom:e,left:e}}function Qr(e){return xe(Y({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function _r(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:c,elements:d,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:C=!1,padding:b=0}=t,v=Gc(b),T=d[C?p==="floating"?"reference":"floating":p],L=Qr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(T)))==null||n?T:T.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:f,rootBoundary:m,strategy:u})),M=Qr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?xe(Y({},c.floating),{x:i,y:s}):c.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),strategy:u}):c[p]);return{top:L.top-M.top+v.top,bottom:M.bottom-L.bottom+v.bottom,left:L.left-M.left+v.left,right:M.right-L.right+v.right}}const q0=Math.min,eh=Math.max;function Zc(e,t,n){return eh(e,q0(t,n))}const _p=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:i=0}=e!=null?e:{},{x:s,y:o,placement:c,rects:d,platform:u}=t;if(n==null)return{};const f=Gc(i),m={x:s,y:o},p=Fa(c),C=la(c),b=Fc(p),v=await u.getDimensions(n),k=p==="y"?"top":"left",T=p==="y"?"bottom":"right",L=d.reference[b]+d.reference[p]-m[p]-d.floating[b],M=m[p]-d.reference[p],y=await(u.getOffsetParent==null?void 0:u.getOffsetParent(n));let N=y?p==="y"?y.clientHeight||0:y.clientWidth||0:0;N===0&&(N=d.floating[b]);const I=L/2-M/2,x=f[k],z=N-v[b]-f[T],D=N/2-v[b]/2+I,O=Zc(x,D,z),B=(C==="start"?f[k]:f[T])>0&&D!==O&&d.reference[b]<=d.floating[b]?D<x?x-D:z-D:0;return{[p]:m[p]-B,data:{[p]:O,centerOffset:D-O}}}}),Wp={left:"right",right:"left",bottom:"top",top:"bottom"};function al(e){return e.replace(/left|right|bottom|top/g,t=>Wp[t])}function th(e,t,n){n===void 0&&(n=!1);const i=la(e),s=Fa(e),o=Fc(s);let c=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=al(c)),{main:c,cross:al(c)}}const Hp={start:"end",end:"start"};function Yc(e){return e.replace(/start|end/g,t=>Hp[t])}const nh=["top","right","bottom","left"],Bp=nh.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function Fp(e,t,n){return(e?[...n.filter(s=>la(s)===e),...n.filter(s=>la(s)!==e)]:n.filter(s=>ri(s)===s)).filter(s=>e?la(s)===e||(t?Yc(s)!==s:!1):!0)}const Gp=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,s,o,c;const{x:d,y:u,rects:f,middlewareData:m,placement:p,platform:C,elements:b}=t,ne=e,{alignment:v=null,allowedPlacements:k=Bp,autoAlignment:T=!0}=ne,L=Sa(ne,["alignment","allowedPlacements","autoAlignment"]),M=Fp(v,T,k),y=await _r(t,L),N=(n=(i=m.autoPlacement)==null?void 0:i.index)!=null?n:0,I=M[N];if(I==null)return{};const{main:x,cross:z}=th(I,f,await(C.isRTL==null?void 0:C.isRTL(b.floating)));if(p!==I)return{x:d,y:u,reset:{placement:M[0]}};const D=[y[ri(I)],y[x],y[z]],O=[...(s=(o=m.autoPlacement)==null?void 0:o.overflows)!=null?s:[],{placement:I,overflows:D}],_=M[N+1];if(_)return{data:{index:N+1,overflows:O},reset:{placement:_}};const E=O.slice().sort((oe,we)=>oe.overflows[0]-we.overflows[0]),B=(c=E.find(oe=>{let{overflows:we}=oe;return we.every(Ie=>Ie<=0)}))==null?void 0:c.placement,W=B!=null?B:E[0].placement;return W!==p?{data:{index:N+1,overflows:O},reset:{placement:W}}:{}}}};function Zp(e){const t=al(e);return[Yc(e),t,Yc(t)]}const Yp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:i,middlewareData:s,rects:o,initialPlacement:c,platform:d,elements:u}=t,O=e,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:C="bestFit",flipAlignment:b=!0}=O,v=Sa(O,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),k=ri(i),L=p||(k===c||!b?[al(c)]:Zp(c)),M=[c,...L],y=await _r(t,v),N=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&N.push(y[k]),m){const{main:_,cross:E}=th(i,o,await(d.isRTL==null?void 0:d.isRTL(u.floating)));N.push(y[_],y[E])}if(I=[...I,{placement:i,overflows:N}],!N.every(_=>_<=0)){var x,z;const _=((x=(z=s.flip)==null?void 0:z.index)!=null?x:0)+1,E=M[_];if(E)return{data:{index:_,overflows:I},reset:{placement:E}};let B="bottom";switch(C){case"bestFit":{var D;const W=(D=I.map(ne=>[ne,ne.overflows.filter(oe=>oe>0).reduce((oe,we)=>oe+we,0)]).sort((ne,oe)=>ne[1]-oe[1])[0])==null?void 0:D[0].placement;W&&(B=W);break}case"initialPlacement":B=c;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function ih(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ah(e){return nh.some(t=>e[t]>=0)}const Up=function(e){let i=e===void 0?{}:e,{strategy:t="referenceHidden"}=i,n=Sa(i,["strategy"]);return{name:"hide",async fn(s){const{rects:o}=s;switch(t){case"referenceHidden":{const c=await _r(s,xe(Y({},n),{elementContext:"reference"})),d=ih(c,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:ah(d)}}}case"escaped":{const c=await _r(s,xe(Y({},n),{altBoundary:!0})),d=ih(c,o.floating);return{data:{escapedOffsets:d,escaped:ah(d)}}}default:return{}}}}};async function $p(e,t){const{placement:n,platform:i,elements:s}=e,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=ri(n),d=la(n),u=Fa(n)==="x",f=["left","top"].includes(c)?-1:1,m=o&&u?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:C,crossAxis:b,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:Y({mainAxis:0,crossAxis:0,alignmentAxis:null},p);return d&&typeof v=="number"&&(b=d==="end"?v*-1:v),u?{x:b*m,y:C*f}:{x:C*f,y:b*m}}const Kp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:i}=t,s=await $p(t,e);return{x:n+s.x,y:i+s.y,data:s}}}};function Xp(e){return e==="x"?"y":"x"}const qp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,T=e,{mainAxis:o=!0,crossAxis:c=!1,limiter:d={fn:L=>{let{x:M,y}=L;return{x:M,y}}}}=T,u=Sa(T,["mainAxis","crossAxis","limiter"]),f={x:n,y:i},m=await _r(t,u),p=Fa(ri(s)),C=Xp(p);let b=f[p],v=f[C];if(o){const L=p==="y"?"top":"left",M=p==="y"?"bottom":"right",y=b+m[L],N=b-m[M];b=Zc(y,b,N)}if(c){const L=C==="y"?"top":"left",M=C==="y"?"bottom":"right",y=v+m[L],N=v-m[M];v=Zc(y,v,N)}const k=d.fn(xe(Y({},t),{[p]:b,[C]:v}));return xe(Y({},k),{data:{x:k.x-n,y:k.y-i}})}}},e5=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:i,elements:s,rects:o,platform:c,strategy:d}=t,{padding:u=2,x:f,y:m}=e,p=Qr(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(c.getOffsetParent==null?void 0:c.getOffsetParent(s.floating)),strategy:d}):o.reference),C=(n=await(c.getClientRects==null?void 0:c.getClientRects(s.reference)))!=null?n:[],b=Gc(u);function v(){if(C.length===2&&C[0].left>C[1].right&&f!=null&&m!=null){var T;return(T=C.find(L=>f>L.left-b.left&&f<L.right+b.right&&m>L.top-b.top&&m<L.bottom+b.bottom))!=null?T:p}if(C.length>=2){if(Fa(i)==="x"){const E=C[0],B=C[C.length-1],W=ri(i)==="top",ne=E.top,oe=B.bottom,we=W?E.left:B.left,Ie=W?E.right:B.right,de=Ie-we,he=oe-ne;return{top:ne,bottom:oe,left:we,right:Ie,width:de,height:he,x:we,y:ne}}const L=ri(i)==="left",M=eh(...C.map(E=>E.right)),y=q0(...C.map(E=>E.left)),N=C.filter(E=>L?E.left===y:E.right===M),I=N[0].top,x=N[N.length-1].bottom,z=y,D=M,O=D-z,_=x-I;return{top:I,bottom:x,left:z,right:D,width:O,height:_,x:z,y:I}}return p}const k=await c.getElementRects({reference:{getBoundingClientRect:v},floating:s.floating,strategy:d});return o.reference.x!==k.reference.x||o.reference.y!==k.reference.y||o.reference.width!==k.reference.width||o.reference.height!==k.reference.height?{reset:{rects:k}}:{}}}};function rh(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function si(e){if(e==null)return window;if(!rh(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Wr(e){return si(e).getComputedStyle(e)}function li(e){return rh(e)?"":e?(e.nodeName||"").toLowerCase():""}function sh(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Fn(e){return e instanceof si(e).HTMLElement}function Ai(e){return e instanceof si(e).Element}function t5(e){return e instanceof si(e).Node}function Uc(e){if(typeof ShadowRoot=="undefined")return!1;const t=si(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function rl(e){const{overflow:t,overflowX:n,overflowY:i}=Wr(e);return/auto|scroll|overlay|hidden/.test(t+i+n)}function n5(e){return["table","td","th"].includes(li(e))}function lh(e){const t=/firefox/i.test(sh()),n=Wr(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function oh(){return!/^((?!chrome|android).)*safari/i.test(sh())}const ch=Math.min,Hr=Math.max,sl=Math.round;function oi(e,t,n){var i,s,o,c;t===void 0&&(t=!1),n===void 0&&(n=!1);const d=e.getBoundingClientRect();let u=1,f=1;t&&Fn(e)&&(u=e.offsetWidth>0&&sl(d.width)/e.offsetWidth||1,f=e.offsetHeight>0&&sl(d.height)/e.offsetHeight||1);const m=Ai(e)?si(e):window,p=!oh()&&n,C=(d.left+(p&&(i=(s=m.visualViewport)==null?void 0:s.offsetLeft)!=null?i:0))/u,b=(d.top+(p&&(o=(c=m.visualViewport)==null?void 0:c.offsetTop)!=null?o:0))/f,v=d.width/u,k=d.height/f;return{width:v,height:k,top:b,right:C+v,bottom:b+k,left:C,x:C,y:b}}function Pi(e){return((t5(e)?e.ownerDocument:e.document)||window.document).documentElement}function ll(e){return Ai(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function uh(e){return oi(Pi(e)).left+ll(e).scrollLeft}function i5(e){const t=oi(e);return sl(t.width)!==e.offsetWidth||sl(t.height)!==e.offsetHeight}function a5(e,t,n){const i=Fn(t),s=Pi(t),o=oi(e,i&&i5(t),n==="fixed");let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if(i||!i&&n!=="fixed")if((li(t)!=="body"||rl(s))&&(c=ll(t)),Fn(t)){const u=oi(t,!0);d.x=u.x+t.clientLeft,d.y=u.y+t.clientTop}else s&&(d.x=uh(s));return{x:o.left+c.scrollLeft-d.x,y:o.top+c.scrollTop-d.y,width:o.width,height:o.height}}function dh(e){return li(e)==="html"?e:e.assignedSlot||e.parentNode||(Uc(e)?e.host:null)||Pi(e)}function fh(e){return!Fn(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function r5(e){let t=dh(e);for(Uc(t)&&(t=t.host);Fn(t)&&!["html","body"].includes(li(t));){if(lh(t))return t;t=t.parentNode}return null}function $c(e){const t=si(e);let n=fh(e);for(;n&&n5(n)&&getComputedStyle(n).position==="static";)n=fh(n);return n&&(li(n)==="html"||li(n)==="body"&&getComputedStyle(n).position==="static"&&!lh(n))?t:n||r5(e)||t}function hh(e){if(Fn(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=oi(e);return{width:t.width,height:t.height}}function s5(e){let{rect:t,offsetParent:n,strategy:i}=e;const s=Fn(n),o=Pi(n);if(n===o)return t;let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if((s||!s&&i!=="fixed")&&((li(n)!=="body"||rl(o))&&(c=ll(n)),Fn(n))){const u=oi(n,!0);d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}return xe(Y({},t),{x:t.x-c.scrollLeft+d.x,y:t.y-c.scrollTop+d.y})}function l5(e,t){const n=si(e),i=Pi(e),s=n.visualViewport;let o=i.clientWidth,c=i.clientHeight,d=0,u=0;if(s){o=s.width,c=s.height;const f=oh();(f||!f&&t==="fixed")&&(d=s.offsetLeft,u=s.offsetTop)}return{width:o,height:c,x:d,y:u}}function o5(e){var t;const n=Pi(e),i=ll(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=Hr(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=Hr(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-i.scrollLeft+uh(e);const u=-i.scrollTop;return Wr(s||n).direction==="rtl"&&(d+=Hr(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:d,y:u}}function gh(e){const t=dh(e);return["html","body","#document"].includes(li(t))?e.ownerDocument.body:Fn(t)&&rl(t)?t:gh(t)}function ol(e,t){var n;t===void 0&&(t=[]);const i=gh(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=si(i),c=s?[o].concat(o.visualViewport||[],rl(i)?i:[]):i,d=t.concat(c);return s?d:d.concat(ol(c))}function c5(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Uc(n)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function u5(e,t){const n=oi(e,!1,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft;return{top:i,left:s,x:s,y:i,right:s+e.clientWidth,bottom:i+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function mh(e,t,n){return t==="viewport"?Qr(l5(e,n)):Ai(t)?u5(t,n):Qr(o5(Pi(e)))}function d5(e){const t=ol(e),i=["absolute","fixed"].includes(Wr(e).position)&&Fn(e)?$c(e):e;return Ai(i)?t.filter(s=>Ai(s)&&c5(s,i)&&li(s)!=="body"):[]}function f5(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const c=[...n==="clippingAncestors"?d5(t):[].concat(n),i],d=c[0],u=c.reduce((f,m)=>{const p=mh(t,m,s);return f.top=Hr(p.top,f.top),f.right=ch(p.right,f.right),f.bottom=ch(p.bottom,f.bottom),f.left=Hr(p.left,f.left),f},mh(t,d,s));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}const h5={getClippingRect:f5,convertOffsetParentRelativeRectToViewportRelativeRect:s5,isElement:Ai,getDimensions:hh,getOffsetParent:$c,getDocumentElement:Pi,getElementRects:e=>{let{reference:t,floating:n,strategy:i}=e;return{reference:a5(t,$c(n),i),floating:xe(Y({},hh(n)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Wr(e).direction==="rtl"};function g5(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:c=!0,animationFrame:d=!1}=i,u=s&&!d,f=o&&!d,m=u||f?[...Ai(e)?ol(e):[],...ol(t)]:[];m.forEach(k=>{u&&k.addEventListener("scroll",n,{passive:!0}),f&&k.addEventListener("resize",n)});let p=null;c&&(p=new ResizeObserver(n),Ai(e)&&!d&&p.observe(e),p.observe(t));let C,b=d?oi(e):null;d&&v();function v(){const k=oi(e);b&&(k.x!==b.x||k.y!==b.y||k.width!==b.width||k.height!==b.height)&&n(),b=k,C=requestAnimationFrame(v)}return c||n(),()=>{var k;m.forEach(T=>{u&&T.removeEventListener("scroll",n),f&&T.removeEventListener("resize",n)}),(k=p)==null||k.disconnect(),p=null,d&&cancelAnimationFrame(C)}}const m5=(e,t,n)=>Rp(e,t,Y({platform:h5},n));var p5=e=>({getElementRects:({reference:s,floating:o})=>{const c=s.getBoundingClientRect(),d=o.getBoundingClientRect();return{reference:{width:c.width,height:c.height,x:c.x,y:c.y},floating:{width:d.width,height:d.height,x:d.x,y:d.y}}},getDimensions:s=>{const{width:o,height:c}=s.getBoundingClientRect();return{width:o,height:c}},getClippingRect:({})=>{var c;const{width:s=0,height:o=0}=(c=e==null?void 0:e.getBoundingClientRect())!=null?c:{};return{width:s,height:o,x:0,y:0}}}),b5=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{const c=a.ref(!1),d=a.ref(),u=()=>{var X,le,Z;const se=L((X=n.value)==null?void 0:X.$el);return(le=document.fullscreenElement)!=null&&le.shadowRoot?document.fullscreenElement.shadowRoot.contains(se):(Z=document.fullscreenElement)==null?void 0:Z.contains(se)},f=se=>u()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(se):document.fullscreenElement.querySelector(se):document.body,m=["dark","light"],p=a.computed(()=>{var Z,V;const se=(V=(Z=e.theme)==null?void 0:Z.split(/\s+/))!=null?V:[];se.sort((P,K)=>Number(m.includes(K))-Number(m.includes(P)));const X=se,le=se.filter(P=>!m.includes(P));return{systemThemes:X,customThemes:le}}),C=()=>e.autoVisibility,b=()=>e.autoPlacement,v=()=>{var V,P,K,j;const se=L((V=n.value)==null?void 0:V.$el),X=L((P=i.value)==null?void 0:P.$el),le=e.arrow?L((K=s.value)==null?void 0:K.$el):null,Z=L((j=o.value)==null?void 0:j.$el);return{elReference:se,elContent:X,elArrow:le,root:Z}},k=()=>{const se={};return Array.isArray(e.modifiers)&&e.modifiers.forEach(X=>{var Z,V,P,K;let le;if(X.name==="offset"){if(typeof((Z=X.options)==null?void 0:Z.offset)=="number"&&(le=(V=X.options)==null?void 0:V.offset),Array.isArray((P=X.options)==null?void 0:P.offset)){const[j,Q]=(K=X.options)==null?void 0:K.offset;le={mainAxis:j,crossAxis:Q}}Object.assign(se,{offset:le})}}),se},T=(se,X)=>{var P;const le=k(),Z=[Kp(le.offset||X.offset),qp({padding:X.padding})],V={placement:X.placement,middleware:Z};if(X.arrow&&Z.push(_p({element:se})),b()?Z.push(Gp()):(Z.unshift(e5()),Z.push(Yp())),C()&&V.middleware.push(Up()),u()||X.isVirtualEl){const{getElementRects:K,getDimensions:j,getClippingRect:Q}=p5(d.value);Object.assign(V,{platform:xe(Y({},(P=X==null?void 0:X.platform)!=null?P:{}),{getElementRects:K,getDimensions:j,getClippingRect:Q})})}return V},L=se=>se instanceof HTMLElement?se:se instanceof Text?L(se.nextElementSibling):typeof(se==null?void 0:se.getBoundingClientRect)=="function"?se:null,M=p.value.customThemes.join(" "),y=p.value.customThemes.reduce((se,X)=>Y({[`data-${X}-theme`]:!0},se),{}),N=`${M}`;let I=null;const x=se=>{const X=window.devicePixelRatio||1;return Math.round(se*X)/X||0},z=(se,X,le,Z)=>{var P;e.disableTransform?Object.assign(se.style,{left:`${x(X)}px`,top:`${x(le)}px`}):Object.assign(se.style,{left:"0",top:"0",transform:`translate3d(${x(X)}px,${x(le)}px,0)`});const V=C()?(P=Z.hide)==null?void 0:P.referenceHidden:!1;Object.assign(se.style,{visibility:V?"hidden":"visible"})},D=(se,X,le)=>{var Z;if(e.arrow){const{x:V,y:P}=(Z=le.arrow)!=null?Z:{};se.setAttribute("data-arrow",X);const K={left:"",top:"",bottom:"",right:""};Object.assign(se.style,K);const j={top:"bottom",right:"left",bottom:"top",left:"right"}[X];Object.assign(se.style,{left:V!==null?`${V}px`:"",top:P!==null?`${P}px`:"",[j]:"-4px"})}},O=()=>{const{elReference:se,elContent:X}=v();I=g5(se,X,()=>{_(null,e)})},_=(se=null,X={})=>{const{elReference:le,elContent:Z,elArrow:V}=v(),P=se||le;if(!P||!Z)return;const K=T(V,X);m5(P,Z,K).then(({x:j,y:Q,placement:R,middlewareData:me})=>{const ce=Z.className;Z.className=`${ce.replace(N,"")} ${N}`.replace(/\s+/mg," ").replace(/^\s+|\s+$/g,""),Object.keys(y).forEach(ae=>{Z.setAttribute(ae,y[ae])});const be=R.split("-")[0];let q=be;["left","right","top","bottom"].includes(be)||(q="top"),z(Z,j,Q,me),D(V,q,me)})};let E,B=!1;const W=()=>{setTimeout(()=>{!e.disabled&&(c.value=!0)},e.popoverDelay)},ne=()=>{E=setTimeout(()=>{c.value=!1},e.popoverDelay)},oe=()=>{var X;const se=L((X=i.value)==null?void 0:X.$el);se.style.setProperty("display","block"),se.style.setProperty("z-index",`${e.zIndex?e.zIndex:_n.getPopperIndex()}`),_(),t.emit("afterShow",{isShow:!0})},we=()=>{var X;L((X=i.value)==null?void 0:X.$el).style.setProperty("display","none"),t.emit("afterHidden",{isShow:!1})},Ie=()=>{c.value?ne():W()},de=()=>{Ie()},he=()=>{e.trigger==="hover"&&(E&&(B=!0,clearTimeout(E),E=void 0),$())},ee=()=>{B&&(ne(),B=!1,F())},$=()=>{t.emit(En.CONTENT_MOUSEENTER)},F=()=>{t.emit(En.CONTENT_MOUSELEAVE)},H=()=>{var X;return(X={hover:{content:[["mouseenter",he],["mouseleave",ee]],reference:[["mouseenter",W],["mouseleave",ne],["focus",W],["blur",ne]]},click:[["click",de]],manual:{content:[["mouseenter",$],["mouseleave",F]],reference:[[]]}}[e.trigger])!=null?X:[]},ge=se=>{d.value=se};return a.watch(c,se=>{se?oe():we()}),{showPopover:W,hidePopover:ne,resolveTriggerEvents:H,updatePopover:_,triggerPopover:Ie,resolvePopElements:v,isElementFullScreen:u,resolveTargetElement:L,createPopInstance:O,updateFullscreenTarget:ge,getFullscreenRoot:f,stopHide:()=>{E&&(B=!0,clearTimeout(E),E=void 0)},localIsShow:c,cleanup:I}};let Vi=null,cl=null;var y5=(e,t="#")=>{const n=i=>{let s=null;const o=u=>{s===null&&u()},c=()=>{if(/^parent$/i.test(e.boundary)){s=`${t}${Vi}`;const{parentNode:u}=i||{};u!=null&&u.parentNode&&(u.parentNode.setAttribute("data-pnode-id",cl),s=`[data-pnode-id=${cl}]`)}},d=()=>{if(!/^body$/i.test(e.boundary)&&typeof e.boundary=="string"){if(!Wc(e.boundary)){console.error("props.boundary is not available selector"),s="body";return}s=e.boundary}};return o(c),o(d),o(()=>{s=typeof e.boundary=="string"?e.boundary:`${t}${Vi}`}),s};if(Vi===null||!Wc(`#${Vi}`)){Vi=`id_${ki.v4()}`;const i=document.createElement("div");i.setAttribute("id",Vi),i.setAttribute("data-popper-id",Vi),document.body.append(i)}return cl===null&&(cl=`id_${ki.v4()}`),{popContainerId:Vi,prefixId:n(),getPrefixId:n}},C5=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{let c=null;const d=a.ref(!1),u=Op(),f=a.ref(),{localIsShow:m,showPopover:p,hidePopover:C,updatePopover:b,resolveTriggerEvents:v,resolvePopElements:k,isElementFullScreen:T,updateFullscreenTarget:L,createPopInstance:M,getFullscreenRoot:y,stopHide:N}=b5(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o}),I=()=>{p()},x=()=>{C()},z=()=>{M(),e.always?p():D()},D=()=>{const{elReference:F,elContent:H}=k();if(c=v(),Array.isArray(c))O(F,c);else{const{content:ge,reference:re}=c;O(F,re),O(H,ge)}},O=(F,H)=>{H.forEach(([ge,re])=>{ge&&typeof re=="function"&&F.addEventListener(ge,re)})},_=()=>{if(c!=null&&c.length){const{elReference:F}=k();F&&c.forEach(([H,ge])=>{H&&typeof ge=="function"&&F.removeEventListener(H,ge)}),c=null}},E=()=>{const{elReference:F,root:H}=k();if(d.value){oe.value=f==null?void 0:f.value;return}oe.value=B(H||F)},{getPrefixId:B}=y5(e,"#"),W=()=>{var F;(F=f==null?void 0:f.value)==null||F.setAttribute("data-fllsrn-id",u)},ne=()=>{var H,ge;const F=`[data-fllsrn-id=${u}]`;((ge=(H=f==null?void 0:f.value)==null?void 0:H.querySelectorAll(F))!=null?ge:[]).forEach(re=>{re==null||re.removeAttribute("data-fllsrn-id")})},oe=a.ref(),we=()=>{_()},Ie=F=>{f.value=F,L(F),d.value=T(),W()},de=F=>{document.fullscreenElement||ne(),Ie(F.target),E(),b(null,e)};return{onMountedFn:()=>{if(!e.disabled){if(z(),T()){const F=`[data-fllsrn-id=${u}]`,H=y(F);Ie(H)}E(),document.body.addEventListener("fullscreenchange",de)}},onUnmountedFn:()=>{we(),document.body.removeEventListener("fullscreenchange",de)},handleClickOutside:F=>{t.emit(En.CLICK_OUTSIDE,{isShow:m.value,event:F}),!(e.disableOutsideClick||e.always||e.disabled||e.trigger==="manual")&&m.value&&x()},beforeInstanceUnmount:we,updateBoundary:E,initPopInstance:z,updatePopover:b,showPopover:p,hidePopover:C,showFn:I,hideFn:x,stopHide:N,isFullscreen:d,boundary:oe,localIsShow:m}},ph=a.defineComponent({name:"Popover",components:{Content:$0,Arrow:U0,Root:K0},directives:{clickoutside:On},props:Vp,emits:Ap,setup(e,t){const{content:n,theme:i,disableTeleport:s}=e,{reference:o}=a.toRefs(e),c=a.ref(),d=a.ref(),u=a.ref(),f=a.ref(),m=a.computed(()=>o.value||c.value),{onMountedFn:p,onUnmountedFn:C,handleClickOutside:b,beforeInstanceUnmount:v,updateBoundary:k,initPopInstance:T,showFn:L,hideFn:M,showPopover:y,hidePopover:N,updatePopover:I,stopHide:x,localIsShow:z,boundary:D}=C5(e,t,{refReference:m,refContent:d,refArrow:u,refRoot:f});!e.always&&!e.disabled&&a.watch(()=>e.isShow,()=>{e.isShow?y():N()},{immediate:!0}),a.watch(()=>[e.disabled],W=>{W[0]?v():T()}),k(),a.onMounted(p),a.onBeforeUnmount(C);const O=a.computed(()=>!s),_=()=>{L()},E=()=>{M()},B=a.computed(()=>e.renderType===tc.AUTO?!0:z.value);return{boundary:D,arrow:e.arrow,refDefaultReference:c,refContent:d,refArrow:u,content:n,theme:i,transBoundary:O,handleClickOutside:b,updatePopover:I,hide:E,show:_,stopHide:x,contentIsShow:B}},render(){return a.createVNode(K0,{ref:"refRoot"},{default:()=>[a.createVNode(Jp,{ref:"refDefaultReference"},{default:()=>{var e,t,n;return[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:a.createVNode("span",null,null)]}}),a.createVNode(a.Teleport,{to:this.boundary,disabled:!this.transBoundary},{default:()=>[a.withDirectives(a.createVNode($0,{ref:"refContent","data-theme":this.theme,width:this.width,height:this.height,maxHeight:this.maxHeight},{default:()=>{var e,t,n;return[this.contentIsShow?(n=(t=(e=this.$slots).content)==null?void 0:t.call(e))!=null?n:this.content:""]},arrow:()=>this.arrow?a.createVNode(U0,{ref:"refArrow"},{default:()=>{var e,t;return[(t=(e=this.$slots).arrow)==null?void 0:t.call(e)]}}):""}),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])]})]})}});const pn=Ge(ph);var v5=a.defineComponent({name:"Popover2",setup(){return()=>a.createVNode("code",null,["<bk-popover2></bk-popover2>\u5DF2\u7ECF\u5408\u5E76\u4E3A<bk-popover></bk-popover>\uFF0C\u8BF7\u66FF\u6362\u4E3A<bk-popover></bk-popover>"])}});const bh=Ge(v5),w5=(e,{attrs:t,slots:n})=>{const{width:i,percent:s,strokeWidth:o,color:c,strokeLinecap:d,theme:u,type:f,bgColor:m,titleStyle:p}=t,C=o||6,b=i||126,v={width:typeof b=="number"?`${b}px`:b,height:typeof b=="number"?`${b}px`:b,fontSize:`${b*.15+6}px`},k=50-C/2,T=f==="dashboard",L=Math.PI*2*k,M=T&&.75||1,y=`${-1*L*(1-M)/2}px`,N="stroke-dasharray 0.6s ease 0s, stroke 0.6s ease",I={strokeDasharray:`${L*M}px, ${L}px`,strokeDashoffset:y},x={strokeDasharray:`${L*M*(s/100)}px, ${L}px`,strokeDashoffset:y,transition:N},z=`
59
59
  M 50 50
60
60
  m 0 ${T?"":"-"}${k}
61
61
  a ${k} ${k} 0 1 1 0 ${T?"-":""}${k*2}
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("../shared"),require("@popperjs/core"),require("../plugin-popover"));else if("function"==typeof define&&define.amd)define(["../shared","@popperjs/core","../plugin-popover"],n);else{var t="object"==typeof exports?n(require("../shared"),require("@popperjs/core"),require("../plugin-popover")):n(e["../shared"],e["@popperjs/core"],e["../plugin-popover"]);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,((e,n,t)=>(()=>{var r={2439:(e,n,t)=>{e.exports=t(2527)},7430:e=>{"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),t={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=t},6377:e=>{var n,t,r,o,i,a,u,c,s,l,d,f,p,v,m,b=!1;function h(){if(!b){b=!0;var e=navigator.userAgent,h=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),y=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(f=/\b(iPhone|iP[ao]d)/.exec(e),p=/\b(iP[ao]d)/.exec(e),l=/Android/i.exec(e),v=/FBAN\/\w+;/i.exec(e),m=/Mobile/i.exec(e),d=!!/Win64/.exec(e),h){(n=h[1]?parseFloat(h[1]):h[5]?parseFloat(h[5]):NaN)&&document&&document.documentMode&&(n=document.documentMode);var g=/(?:Trident\/(\d+.\d+))/.exec(e);a=g?parseFloat(g[1])+4:n,t=h[2]?parseFloat(h[2]):NaN,r=h[3]?parseFloat(h[3]):NaN,(o=h[4]?parseFloat(h[4]):NaN)?(h=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=h&&h[1]?parseFloat(h[1]):NaN):i=NaN}else n=t=r=i=o=NaN;if(y){if(y[1]){var w=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);u=!w||parseFloat(w[1].replace("_","."))}else u=!1;c=!!y[2],s=!!y[3]}else u=c=s=!1}}var y={ie:function(){return h()||n},ieCompatibilityMode:function(){return h()||a>n},ie64:function(){return y.ie()&&d},firefox:function(){return h()||t},opera:function(){return h()||r},webkit:function(){return h()||o},safari:function(){return y.webkit()},chrome:function(){return h()||i},windows:function(){return h()||c},osx:function(){return h()||u},linux:function(){return h()||s},iphone:function(){return h()||f},mobile:function(){return h()||f||p||l||m},nativeApp:function(){return h()||v},android:function(){return h()||l},ipad:function(){return h()||p}};e.exports=y},3541:(e,n,t)=>{"use strict";var r,o=t(7430);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,n){if(!o.canUseDOM||n&&!("addEventListener"in document))return!1;var t="on"+e,i=t in document;if(!i){var a=document.createElement("div");a.setAttribute(t,"return;"),i="function"==typeof a[t]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},2527:(e,n,t)=>{"use strict";var r=t(6377),o=t(3541);function i(e){var n=0,t=0,r=0,o=0;return"detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(n=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(n=t,t=0),r=10*n,o=10*t,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!n&&(n=r<1?-1:1),o&&!t&&(t=o<1?-1:1),{spinX:n,spinY:t,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},9706:e=>{"use strict";e.exports=t},4212:n=>{"use strict";n.exports=e},5798:e=>{"use strict";e.exports=n}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var t=o[e]={exports:{}};return r[e](t,t.exports,i),t.exports}i.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return i.d(n,{a:n}),n},i.d=(e,n)=>{for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";i.r(a),i.d(a,{bkEllipsis:()=>j,bkEllipsisInstance:()=>S,bkTooltips:()=>E,clickoutside:()=>f,mousewheel:()=>r});var e=i(2439),n=i.n(e),t="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1;const r={beforeMount:function(e,r){var o,i;console.error(e,r),o=e,i=r.value,(null==o?void 0:o.addEventListener)&&o.addEventListener(t?"DOMMouseScroll":"mousewheel",(function(e){var t=n()(e);null==i||i.apply(this,[e,t])}))}};function o(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(c)throw i}}}}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var c,s=new Map;function l(e,n){var t,r=[];return Array.isArray(n.arg)?r=n.arg:(t=n.arg,"undefined"!=typeof Element&&t instanceof Element&&r.push(n.arg)),function(t,o){var i=n.instance.popperRef,a=t.target,u=null==o?void 0:o.target,c=!n||!n.instance,s=!a||!u,l=e.contains(a)||e.contains(u),d=e===a,f=r.length&&r.some((function(e){return null==e?void 0:e.contains(a)}))||r.length&&r.includes(u),p=i&&(i.contains(a)||i.contains(u));c||s||l||d||f||p||n.value(t,o)}}document.addEventListener("mousedown",(function(e){return c=e})),document.addEventListener("mouseup",(function(e){var n,t=o(s.values());try{for(t.s();!(n=t.n()).done;){var r,i=o(n.value);try{for(i.s();!(r=i.n()).done;)(0,r.value.documentHandler)(e,c)}catch(e){i.e(e)}finally{i.f()}}}catch(e){t.e(e)}finally{t.f()}}));var d={beforeMount:function(e,n){s.has(e)||s.set(e,[]),s.get(e).push({documentHandler:l(e,n),bindingFn:n.value})},updated:function(e,n){s.has(e)||s.set(e,[]);var t=s.get(e),r=t.findIndex((function(e){return e.bindingFn===n.oldValue})),o={documentHandler:l(e,n),bindingFn:n.value};r>=0?t.splice(r,1,o):t.push(o)},unmounted:function(e){s.delete(e)},install:function(e){e.directive("bkTooltips",d)}};const f=d;function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}var m=i(4212),b=i(5798),h=new Map;function y(e){var n={arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,extCls:"",onShow:function(){},onHide:function(){}};return"object"===v(e.value)?Object.assign(n,e.value):n.content=e.value,n}function g(){var e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function w(e){var n=h.get(e),t=n.popper,r=n.opts,o=r.disabled,i=r.content,a=r.arrow,u=r.onShow;if(!o){if(t.innerText=i,a){var c=g();t.appendChild(c)}document.body.appendChild(t);var s=function(e,n){var t=h.get(e).opts,r=t.placement,o=t.distance,i=t.showOnInit,a=(0,b.createPopper)(e,n,{placement:r,modifiers:[{name:"offset",options:{offset:[0,o]}}]});return i&&w(e),a}(e,t);u(),t.setAttribute("data-show",""),s.setOptions((function(e){return Object.assign(Object.assign({},e),{modifiers:[].concat((n=e.modifiers,function(e){if(Array.isArray(e))return p(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return p(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?p(e,n):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[{name:"eventListeners",enabled:!0}])});var n})),s.forceUpdate(),h.get(e).popperInstance=s}}function x(e){if(h.get(e)){var n=h.get(e),t=n.popper,r=n.popperInstance,o=n.opts.onHide;t&&document.body.contains(t)&&(t.removeAttribute("data-show"),null==r||r.destroy(),document.body.removeChild(t),o())}}const E={beforeMount:function(e,n){var t=y(n),r=t.trigger,o=function(e){var n=e.content,t=e.arrow,r=e.theme,o=e.extCls,i="light"===r,a=m.bkZIndexManager.getPopperIndex(),u=document.createElement("div");if(u.className="bk-popper ".concat(i?"light":"dark"," ").concat(o),u.innerText=n,u.style.zIndex=String(a),t){var c=g();u.appendChild(c)}return u}(t);if("hover"===r){var i=null;e.addEventListener("mouseenter",(function(){w(e),clearTimeout(i)})),o.addEventListener("mouseenter",(function(){clearTimeout(i)})),e.addEventListener("mouseleave",(function(){i=setTimeout((function(){x(e)}),100)})),e.addEventListener("click",(function(){x(e)})),o.addEventListener("mouseleave",(function(){i=setTimeout((function(){x(e)}),100)}))}else"click"===r&&document.body.addEventListener("click",(function(n){e.contains(n.target)&&!o.hasAttribute("data-show")?w(e):o.hasAttribute("data-show")&&x(e)}));h.set(e,{opts:t,popper:o,popperInstance:null})},updated:function(e,n){h.get(e).opts=y(n)},unmounted:function(e){x(e),h.delete(e)}};var M=i(9706),A=i.n(M),O=function(e,n){var t={content:"",target:e};return"object"===v(n.value)?Object.assign(t,n.value):t.content=n.value,t},S=function(e,n){var t=null,r=null,o=null;if(!O(e,n).disabled&&!t){var i=function(){o&&clearTimeout(o),o=null},a=function(){r&&clearTimeout(r),null==t||t.hide(),null==t||t.close(),t=null},u=function(){r&&clearTimeout(r),r=setTimeout((function(){var r=O(e,n);r.content=r.content||e.innerHTML,Object.assign(r,{onContentMouseenter:i,onContentMouseleave:a}),t=A()(r),setTimeout((function(){t.show()}))}),100)},c=function(){o=setTimeout((function(){r&&clearTimeout(r),null==t||t.hide(),null==t||t.close(),t=null}),120)};return e.addEventListener("mouseenter",u),e.addEventListener("mouseleave",c),Object.assign(n,{__cached:{handleMouseEnter:u,handleMouseLeave:c}}),{destroyInstance:function(n){var t,r;c(),null===(t=null!=n?n:e)||void 0===t||t.removeEventListener("mouseenter",u),null===(r=null!=n?n:e)||void 0===r||r.removeEventListener("mouseleave",c)},instance:t}}};const j={mounted:function(e,n){S(e,n)},beforeUnmount:function(e,n){if(n.__cached){var t=n.__cached,r=t.handleMouseEnter,o=t.handleMouseLeave;e.removeEventListener("mouseenter",r),e.removeEventListener("mouseleave",o),n.__cached=null}}}})(),a})()));
2
+ !function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("../shared"),require("@popperjs/core"),require("../plugin-popover"));else if("function"==typeof define&&define.amd)define(["../shared","@popperjs/core","../plugin-popover"],n);else{var t="object"==typeof exports?n(require("../shared"),require("@popperjs/core"),require("../plugin-popover")):n(e["../shared"],e["@popperjs/core"],e["../plugin-popover"]);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,((e,n,t)=>(()=>{var r={2439:(e,n,t)=>{e.exports=t(2527)},7430:e=>{"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),t={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=t},6377:e=>{var n,t,r,o,i,a,u,c,l,s,d,f,p,v,m,b=!1;function h(){if(!b){b=!0;var e=navigator.userAgent,h=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),y=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(f=/\b(iPhone|iP[ao]d)/.exec(e),p=/\b(iP[ao]d)/.exec(e),s=/Android/i.exec(e),v=/FBAN\/\w+;/i.exec(e),m=/Mobile/i.exec(e),d=!!/Win64/.exec(e),h){(n=h[1]?parseFloat(h[1]):h[5]?parseFloat(h[5]):NaN)&&document&&document.documentMode&&(n=document.documentMode);var g=/(?:Trident\/(\d+.\d+))/.exec(e);a=g?parseFloat(g[1])+4:n,t=h[2]?parseFloat(h[2]):NaN,r=h[3]?parseFloat(h[3]):NaN,(o=h[4]?parseFloat(h[4]):NaN)?(h=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=h&&h[1]?parseFloat(h[1]):NaN):i=NaN}else n=t=r=i=o=NaN;if(y){if(y[1]){var w=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);u=!w||parseFloat(w[1].replace("_","."))}else u=!1;c=!!y[2],l=!!y[3]}else u=c=l=!1}}var y={ie:function(){return h()||n},ieCompatibilityMode:function(){return h()||a>n},ie64:function(){return y.ie()&&d},firefox:function(){return h()||t},opera:function(){return h()||r},webkit:function(){return h()||o},safari:function(){return y.webkit()},chrome:function(){return h()||i},windows:function(){return h()||c},osx:function(){return h()||u},linux:function(){return h()||l},iphone:function(){return h()||f},mobile:function(){return h()||f||p||s||m},nativeApp:function(){return h()||v},android:function(){return h()||s},ipad:function(){return h()||p}};e.exports=y},3541:(e,n,t)=>{"use strict";var r,o=t(7430);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,n){if(!o.canUseDOM||n&&!("addEventListener"in document))return!1;var t="on"+e,i=t in document;if(!i){var a=document.createElement("div");a.setAttribute(t,"return;"),i="function"==typeof a[t]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},2527:(e,n,t)=>{"use strict";var r=t(6377),o=t(3541);function i(e){var n=0,t=0,r=0,o=0;return"detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(n=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(n=t,t=0),r=10*n,o=10*t,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!n&&(n=r<1?-1:1),o&&!t&&(t=o<1?-1:1),{spinX:n,spinY:t,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},9706:e=>{"use strict";e.exports=t},4212:n=>{"use strict";n.exports=e},5798:e=>{"use strict";e.exports=n}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var t=o[e]={exports:{}};return r[e](t,t.exports,i),t.exports}i.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return i.d(n,{a:n}),n},i.d=(e,n)=>{for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";i.r(a),i.d(a,{bkEllipsis:()=>S,bkEllipsisInstance:()=>O,bkTooltips:()=>E,clickoutside:()=>f,mousewheel:()=>r});var e=i(2439),n=i.n(e),t="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1;const r={beforeMount:function(e,r){var o,i;console.error(e,r),o=e,i=r.value,(null==o?void 0:o.addEventListener)&&o.addEventListener(t?"DOMMouseScroll":"mousewheel",(function(e){var t=n()(e);null==i||i.apply(this,[e,t])}))}};function o(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(c)throw i}}}}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var c,l=new Map;function s(e,n){var t,r=[];return Array.isArray(n.arg)?r=n.arg:(t=n.arg,"undefined"!=typeof Element&&t instanceof Element&&r.push(n.arg)),function(t,o){var i=n.instance.popperRef,a=t.target,u=null==o?void 0:o.target,c=!n||!n.instance,l=!a||!u,s=e.contains(a)||e.contains(u),d=e===a,f=r.length&&r.some((function(e){return null==e?void 0:e.contains(a)}))||r.length&&r.includes(u),p=i&&(i.contains(a)||i.contains(u));c||l||s||d||f||p||n.value(t,o)}}document.addEventListener("mousedown",(function(e){return c=e})),document.addEventListener("mouseup",(function(e){var n,t=o(l.values());try{for(t.s();!(n=t.n()).done;){var r,i=o(n.value);try{for(i.s();!(r=i.n()).done;)(0,r.value.documentHandler)(e,c)}catch(e){i.e(e)}finally{i.f()}}}catch(e){t.e(e)}finally{t.f()}}));var d={beforeMount:function(e,n){l.has(e)||l.set(e,[]),l.get(e).push({documentHandler:s(e,n),bindingFn:n.value})},updated:function(e,n){l.has(e)||l.set(e,[]);var t=l.get(e),r=t.findIndex((function(e){return e.bindingFn===n.oldValue})),o={documentHandler:s(e,n),bindingFn:n.value};r>=0?t.splice(r,1,o):t.push(o)},unmounted:function(e){l.delete(e)},install:function(e){e.directive("bkTooltips",d)}};const f=d;function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}var m=i(4212),b=i(5798),h=new Map;function y(e){var n={arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,extCls:"",delay:0,onShow:function(){},onHide:function(){}};return"object"===v(e.value)?Object.assign(n,e.value):n.content=e.value,n}function g(){var e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function w(e){var n=h.get(e),t=n.popper,r=n.opts,o=r.disabled,i=r.content,a=r.arrow,u=r.onShow;if(!o){if(t.innerText=i,a){var c=g();t.appendChild(c)}document.body.appendChild(t);var l=function(e,n){var t=h.get(e).opts,r=t.placement,o=t.distance,i=t.showOnInit,a=(0,b.createPopper)(e,n,{placement:r,modifiers:[{name:"offset",options:{offset:[0,o]}}]});return i&&w(e),a}(e,t);u(),t.setAttribute("data-show",""),l.setOptions((function(e){return Object.assign(Object.assign({},e),{modifiers:[].concat((n=e.modifiers,function(e){if(Array.isArray(e))return p(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return p(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?p(e,n):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[{name:"eventListeners",enabled:!0}])});var n})),l.forceUpdate(),h.get(e).popperInstance=l}}function x(e){if(h.get(e)){var n=h.get(e),t=n.popper,r=n.popperInstance,o=n.opts.onHide;t&&document.body.contains(t)&&(t.removeAttribute("data-show"),null==r||r.destroy(),document.body.removeChild(t),o())}}const E={beforeMount:function(e,n){var t=y(n),r=t.trigger,o=function(e){var n=e.content,t=e.arrow,r=e.theme,o=e.extCls,i="light"===r,a=m.bkZIndexManager.getPopperIndex(),u=document.createElement("div");if(u.className="bk-popper ".concat(i?"light":"dark"," ").concat(o),u.innerText=n,u.style.zIndex=String(a),t){var c=g();u.appendChild(c)}return u}(t),i=null;if("hover"===r){var a=null;e.addEventListener("mouseenter",(function(){i=setTimeout((function(){w(e),clearTimeout(a),clearTimeout(i)}),t.delay)})),o.addEventListener("mouseenter",(function(){clearTimeout(a)})),e.addEventListener("mouseleave",(function(){clearTimeout(i),a=setTimeout((function(){x(e)}),100)})),e.addEventListener("click",(function(){x(e)})),o.addEventListener("mouseleave",(function(){clearTimeout(i),a=setTimeout((function(){x(e)}),100)}))}else"click"===r&&document.body.addEventListener("click",(function(n){e.contains(n.target)&&!o.hasAttribute("data-show")?i=setTimeout((function(){w(e),clearTimeout(i)}),t.delay):o.hasAttribute("data-show")&&x(e)}));h.set(e,{opts:t,popper:o,popperInstance:null})},updated:function(e,n){h.get(e).opts=y(n)},unmounted:function(e){x(e),h.delete(e)}};var M=i(9706),T=i.n(M),A=function(e,n){var t={content:"",target:e};return"object"===v(n.value)?Object.assign(t,n.value):t.content=n.value,t},O=function(e,n){var t=null,r=null,o=null;if(!A(e,n).disabled&&!t){var i=function(){o&&clearTimeout(o),o=null},a=function(){r&&clearTimeout(r),null==t||t.hide(),null==t||t.close(),t=null},u=function(){r&&clearTimeout(r),r=setTimeout((function(){var r=A(e,n);r.content=r.content||e.innerHTML,Object.assign(r,{onContentMouseenter:i,onContentMouseleave:a}),t=T()(r),setTimeout((function(){t.show()}))}),100)},c=function(){o=setTimeout((function(){r&&clearTimeout(r),null==t||t.hide(),null==t||t.close(),t=null}),120)};return e.addEventListener("mouseenter",u),e.addEventListener("mouseleave",c),Object.assign(n,{__cached:{handleMouseEnter:u,handleMouseLeave:c}}),{destroyInstance:function(n){var t,r;c(),null===(t=null!=n?n:e)||void 0===t||t.removeEventListener("mouseenter",u),null===(r=null!=n?n:e)||void 0===r||r.removeEventListener("mouseleave",c)},instance:t}}};const S={mounted:function(e,n){O(e,n)},beforeUnmount:function(e,n){if(n.__cached){var t=n.__cached,r=t.handleMouseEnter,o=t.handleMouseLeave;e.removeEventListener("mouseenter",r),e.removeEventListener("mouseleave",o),n.__cached=null}}}})(),a})()));
@@ -10,6 +10,7 @@ export declare type IOptions = {
10
10
  trigger: string;
11
11
  distance: number;
12
12
  extCls: string;
13
+ delay: number;
13
14
  onShow: () => void;
14
15
  onHide: () => void;
15
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "0.0.1-beta.364",
3
+ "version": "0.0.1-beta.365",
4
4
  "workspaces": {
5
5
  "packages": [
6
6
  "packages/!(**.bak)*",