mini-rbac/backend/static/assets/useState.01763bb3.js

2 lines
46 KiB
JavaScript

import{m as M,e as P,a4 as Pt,aT as Kt,D as S,ad as He,E as q,r as y,af as Ct,B as ie,H as U,a3 as Tt,R as Gt,q as Ke,c as k,A as we,Y as ke,ae as Zt,an as xt,n as Ot,aN as Jt,aO as Qt,aP as en,aJ as Ge,x as tn,aU as nn,_ as Ze,X as O,i as St,y as Mt,ac as ve,aV as on,aW as rn,aX as Je,V as an,aY as un,F as sn,f as ln,P as fn,Z as cn}from"./index.ab0d47a4.js";import{c as ee,a as ae,s as ue,u as vn,P as Qe,b as dn}from"./KeyCode.99f746d5.js";import{w as te}from"./default.76e08716.js";import{x as At,v as pn}from"./useFlexGapSupport.f5eec5c4.js";import{i as hn,R as Nt}from"./index.9c196d1a.js";var Dt=["moz","ms","webkit"];function mn(){var t=0;return function(e){var n=new Date().getTime(),i=Math.max(0,16-(n-t)),o=window.setTimeout(function(){e(n+i)},i);return t=n+i,o}}function gn(){if(typeof window>"u")return function(){};if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);var t=Dt.filter(function(e){return"".concat(e,"RequestAnimationFrame")in window})[0];return t?window["".concat(t,"RequestAnimationFrame")]:mn()}function yn(t){if(typeof window>"u")return null;if(window.cancelAnimationFrame)return window.cancelAnimationFrame(t);var e=Dt.filter(function(n){return"".concat(n,"CancelAnimationFrame")in window||"".concat(n,"CancelRequestAnimationFrame")in window})[0];return e?(window["".concat(e,"CancelAnimationFrame")]||window["".concat(e,"CancelRequestAnimationFrame")]).call(this,t):clearTimeout(t)}var et=gn(),wn=function(e){return yn(e.id)},bn=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=Date.now();function o(){Date.now()-i>=n?e.call():r.id=et(o)}var r={id:et(o)};return r},Be={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},Pn=M(M({},Be),{mobile:{type:Object}}),Cn=M(M({},Be),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function Rt(t){var e=t.prefixCls,n=t.animation,i=t.transitionName;return n?{name:"".concat(e,"-").concat(n)}:i?{name:i}:{}}function Et(t){var e=t.prefixCls,n=t.visible,i=t.zIndex,o=t.mask,r=t.maskAnimation,a=t.maskTransitionName;if(!o)return null;var u={};return(a||r)&&(u=Rt({prefixCls:e,transitionName:a,animation:r})),P(He,S({appear:!0},u),{default:function(){return[Pt(P("div",{style:{zIndex:i},class:"".concat(e,"-mask")},null),[[Kt("if"),n]])]}})}Et.displayName="Mask";const Tn=q({name:"MobilePopupInner",inheritAttrs:!1,props:Pn,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup:function(e,n){var i=n.expose,o=n.slots,r=y();return i({forceAlign:function(){},getElement:function(){return r.value}}),function(){var a,u=e.zIndex,s=e.visible,f=e.prefixCls,l=e.mobile;l=l===void 0?{}:l;var m=l.popupClassName,v=l.popupStyle,c=l.popupMotion,h=c===void 0?{}:c,d=l.popupRender,T=M({zIndex:u},v),g=Ct((a=o.default)===null||a===void 0?void 0:a.call(o));g.length>1&&(g=P("div",{class:"".concat(f,"-content")},[g])),d&&(g=d(g));var w=ie(f,m);return P(He,S({ref:r},h),{default:function(){return[s?P("div",{class:w,style:T},[g]):null]}})}}});var xn=globalThis&&globalThis.__awaiter||function(t,e,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function u(l){try{f(i.next(l))}catch(m){a(m)}}function s(l){try{f(i.throw(l))}catch(m){a(m)}}function f(l){l.done?r(l.value):o(l.value).then(u,s)}f((i=i.apply(t,e||[])).next())})},tt=["measure","align",null,"motion"];const On=function(t,e){var n=y(null),i=y(),o=y(!1);function r(s){o.value||(n.value=s)}function a(){te.cancel(i.value)}function u(s){a(),i.value=te(function(){var f=n.value;switch(n.value){case"align":f="motion";break;case"motion":f="stable";break}r(f),s==null||s()})}return U(t,function(){r("measure")},{immediate:!0,flush:"post"}),Tt(function(){U(n,function(){switch(n.value){case"measure":e();break}n.value&&(i.value=te(function(){return xn(void 0,void 0,void 0,Ke.mark(function s(){var f,l;return Ke.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:f=tt.indexOf(n.value),l=tt[f+1],l&&f!==-1&&r(l);case 3:case"end":return v.stop()}},s)}))}))},{immediate:!0,flush:"post"})}),Gt(function(){o.value=!0,a()}),[n,u]},Sn=function(t){var e=y({width:0,height:0});function n(o){e.value={width:o.offsetWidth,height:o.offsetHeight}}var i=k(function(){var o={};if(t.value){var r=e.value,a=r.width,u=r.height;t.value.indexOf("height")!==-1&&u?o.height="".concat(u,"px"):t.value.indexOf("minHeight")!==-1&&u&&(o.minHeight="".concat(u,"px")),t.value.indexOf("width")!==-1&&a?o.width="".concat(a,"px"):t.value.indexOf("minWidth")!==-1&&a&&(o.minWidth="".concat(a,"px"))}return o});return[i,n]};function nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function it(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nt(Object(n),!0).forEach(function(i){Mn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function ge(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ge=function(e){return typeof e}:ge=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(t)}function Mn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var re,An={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function be(){if(re!==void 0)return re;re="";var t=document.createElement("p").style,e="Transform";for(var n in An)n+e in t&&(re=n);return re}function kt(){return be()?"".concat(be(),"TransitionProperty"):"transitionProperty"}function Pe(){return be()?"".concat(be(),"Transform"):"transform"}function ot(t,e){var n=kt();n&&(t.style[n]=e,n!=="transitionProperty"&&(t.style.transitionProperty=e))}function Ae(t,e){var n=Pe();n&&(t.style[n]=e,n!=="transform"&&(t.style.transform=e))}function Nn(t){return t.style.transitionProperty||t.style[kt()]}function Dn(t){var e=window.getComputedStyle(t,null),n=e.getPropertyValue("transform")||e.getPropertyValue(Pe());if(n&&n!=="none"){var i=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(i[12]||i[4],0),y:parseFloat(i[13]||i[5],0)}}return{x:0,y:0}}var Rn=/matrix\((.*)\)/,En=/matrix3d\((.*)\)/;function kn(t,e){var n=window.getComputedStyle(t,null),i=n.getPropertyValue("transform")||n.getPropertyValue(Pe());if(i&&i!=="none"){var o,r=i.match(Rn);if(r)r=r[1],o=r.split(",").map(function(u){return parseFloat(u,10)}),o[4]=e.x,o[5]=e.y,Ae(t,"matrix(".concat(o.join(","),")"));else{var a=i.match(En)[1];o=a.split(",").map(function(u){return parseFloat(u,10)}),o[12]=e.x,o[13]=e.y,Ae(t,"matrix3d(".concat(o.join(","),")"))}}else Ae(t,"translateX(".concat(e.x,"px) translateY(").concat(e.y,"px) translateZ(0)"))}var _n=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,fe;function rt(t){var e=t.style.display;t.style.display="none",t.offsetHeight,t.style.display=e}function ne(t,e,n){var i=n;if(ge(e)==="object"){for(var o in e)e.hasOwnProperty(o)&&ne(t,o,e[o]);return}if(typeof i<"u"){typeof i=="number"&&(i="".concat(i,"px")),t.style[e]=i;return}return fe(t,e)}function Vn(t){var e,n,i,o=t.ownerDocument,r=o.body,a=o&&o.documentElement;return e=t.getBoundingClientRect(),n=Math.floor(e.left),i=Math.floor(e.top),n-=a.clientLeft||r.clientLeft||0,i-=a.clientTop||r.clientTop||0,{left:n,top:i}}function _t(t,e){var n=t["page".concat(e?"Y":"X","Offset")],i="scroll".concat(e?"Top":"Left");if(typeof n!="number"){var o=t.document;n=o.documentElement[i],typeof n!="number"&&(n=o.body[i])}return n}function Vt(t){return _t(t)}function $t(t){return _t(t,!0)}function le(t){var e=Vn(t),n=t.ownerDocument,i=n.defaultView||n.parentWindow;return e.left+=Vt(i),e.top+=$t(i),e}function Ie(t){return t!=null&&t==t.window}function Ft(t){return Ie(t)?t.document:t.nodeType===9?t:t.ownerDocument}function $n(t,e,n){var i=n,o="",r=Ft(t);return i=i||r.defaultView.getComputedStyle(t,null),i&&(o=i.getPropertyValue(e)||i[e]),o}var Fn=new RegExp("^(".concat(_n,")(?!px)[a-z%]+$"),"i"),Hn=/^(top|right|bottom|left)$/,Ne="currentStyle",De="runtimeStyle",G="left",Bn="px";function In(t,e){var n=t[Ne]&&t[Ne][e];if(Fn.test(n)&&!Hn.test(e)){var i=t.style,o=i[G],r=t[De][G];t[De][G]=t[Ne][G],i[G]=e==="fontSize"?"1em":n||0,n=i.pixelLeft+Bn,i[G]=o,t[De][G]=r}return n===""?"auto":n}typeof window<"u"&&(fe=window.getComputedStyle?$n:In);function de(t,e){return t==="left"?e.useCssRight?"right":t:e.useCssBottom?"bottom":t}function at(t){if(t==="left")return"right";if(t==="right")return"left";if(t==="top")return"bottom";if(t==="bottom")return"top"}function ut(t,e,n){ne(t,"position")==="static"&&(t.style.position="relative");var i=-999,o=-999,r=de("left",n),a=de("top",n),u=at(r),s=at(a);r!=="left"&&(i=999),a!=="top"&&(o=999);var f="",l=le(t);("left"in e||"top"in e)&&(f=Nn(t)||"",ot(t,"none")),"left"in e&&(t.style[u]="",t.style[r]="".concat(i,"px")),"top"in e&&(t.style[s]="",t.style[a]="".concat(o,"px")),rt(t);var m=le(t),v={};for(var c in e)if(e.hasOwnProperty(c)){var h=de(c,n),d=c==="left"?i:o,T=l[c]-m[c];h===c?v[h]=d+T:v[h]=d-T}ne(t,v),rt(t),("left"in e||"top"in e)&&ot(t,f);var g={};for(var w in e)if(e.hasOwnProperty(w)){var b=de(w,n),N=e[w]-l[w];w===b?g[b]=v[b]+N:g[b]=v[b]-N}ne(t,g)}function zn(t,e){var n=le(t),i=Dn(t),o={x:i.x,y:i.y};"left"in e&&(o.x=i.x+e.left-n.left),"top"in e&&(o.y=i.y+e.top-n.top),kn(t,o)}function Wn(t,e,n){if(n.ignoreShake){var i=le(t),o=i.left.toFixed(0),r=i.top.toFixed(0),a=e.left.toFixed(0),u=e.top.toFixed(0);if(o===a&&r===u)return}n.useCssRight||n.useCssBottom?ut(t,e,n):n.useCssTransform&&Pe()in document.body.style?zn(t,e):ut(t,e,n)}function ze(t,e){for(var n=0;n<t.length;n++)e(t[n])}function Ht(t){return fe(t,"boxSizing")==="border-box"}var jn=["margin","border","padding"],_e=-1,Xn=2,Ve=1,Yn=0;function Ln(t,e,n){var i={},o=t.style,r;for(r in e)e.hasOwnProperty(r)&&(i[r]=o[r],o[r]=e[r]);n.call(t);for(r in e)e.hasOwnProperty(r)&&(o[r]=i[r])}function se(t,e,n){var i=0,o,r,a;for(r=0;r<e.length;r++)if(o=e[r],o)for(a=0;a<n.length;a++){var u=void 0;o==="border"?u="".concat(o).concat(n[a],"Width"):u=o+n[a],i+=parseFloat(fe(t,u))||0}return i}var X={getParent:function(e){var n=e;do n.nodeType===11&&n.host?n=n.host:n=n.parentNode;while(n&&n.nodeType!==1&&n.nodeType!==9);return n}};ze(["Width","Height"],function(t){X["doc".concat(t)]=function(e){var n=e.document;return Math.max(n.documentElement["scroll".concat(t)],n.body["scroll".concat(t)],X["viewport".concat(t)](n))},X["viewport".concat(t)]=function(e){var n="client".concat(t),i=e.document,o=i.body,r=i.documentElement,a=r[n];return i.compatMode==="CSS1Compat"&&a||o&&o[n]||a}});function st(t,e,n){var i=n;if(Ie(t))return e==="width"?X.viewportWidth(t):X.viewportHeight(t);if(t.nodeType===9)return e==="width"?X.docWidth(t):X.docHeight(t);var o=e==="width"?["Left","Right"]:["Top","Bottom"],r=Math.floor(e==="width"?t.getBoundingClientRect().width:t.getBoundingClientRect().height),a=Ht(t),u=0;(r==null||r<=0)&&(r=void 0,u=fe(t,e),(u==null||Number(u)<0)&&(u=t.style[e]||0),u=parseFloat(u)||0),i===void 0&&(i=a?Ve:_e);var s=r!==void 0||a,f=r||u;return i===_e?s?f-se(t,["border","padding"],o):u:s?i===Ve?f:f+(i===Xn?-se(t,["border"],o):se(t,["margin"],o)):u+se(t,jn.slice(i),o)}var Un={position:"absolute",visibility:"hidden",display:"block"};function lt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i,o=e[0];return o.offsetWidth!==0?i=st.apply(void 0,e):Ln(o,Un,function(){i=st.apply(void 0,e)}),i}ze(["width","height"],function(t){var e=t.charAt(0).toUpperCase()+t.slice(1);X["outer".concat(e)]=function(i,o){return i&&lt(i,t,o?Yn:Ve)};var n=t==="width"?["Left","Right"]:["Top","Bottom"];X[t]=function(i,o){var r=o;if(r!==void 0){if(i){var a=Ht(i);return a&&(r+=se(i,["padding","border"],n)),ne(i,t,r)}return}return i&&lt(i,t,_e)}});function Bt(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var p={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var n=e.ownerDocument||e;return n.defaultView||n.parentWindow},getDocument:Ft,offset:function(e,n,i){if(typeof n<"u")Wn(e,n,i||{});else return le(e)},isWindow:Ie,each:ze,css:ne,clone:function(e){var n,i={};for(n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);var o=e.overflow;if(o)for(n in e)e.hasOwnProperty(n)&&(i.overflow[n]=e.overflow[n]);return i},mix:Bt,getWindowScrollLeft:function(e){return Vt(e)},getWindowScrollTop:function(e){return $t(e)},merge:function(){for(var e={},n=0;n<arguments.length;n++)p.mix(e,n<0||arguments.length<=n?void 0:arguments[n]);return e},viewportWidth:0,viewportHeight:0};Bt(p,X);var Re=p.getParent;function $e(t){if(p.isWindow(t)||t.nodeType===9)return null;var e=p.getDocument(t),n=e.body,i,o=p.css(t,"position"),r=o==="fixed"||o==="absolute";if(!r)return t.nodeName.toLowerCase()==="html"?null:Re(t);for(i=Re(t);i&&i!==n&&i.nodeType!==9;i=Re(i))if(o=p.css(i,"position"),o!=="static")return i;return null}var ft=p.getParent;function qn(t){if(p.isWindow(t)||t.nodeType===9)return!1;var e=p.getDocument(t),n=e.body,i=null;for(i=ft(t);i&&i!==n&&i!==e;i=ft(i)){var o=p.css(i,"position");if(o==="fixed")return!0}return!1}function We(t,e){for(var n={left:0,right:1/0,top:0,bottom:1/0},i=$e(t),o=p.getDocument(t),r=o.defaultView||o.parentWindow,a=o.body,u=o.documentElement;i;){if((navigator.userAgent.indexOf("MSIE")===-1||i.clientWidth!==0)&&i!==a&&i!==u&&p.css(i,"overflow")!=="visible"){var s=p.offset(i);s.left+=i.clientLeft,s.top+=i.clientTop,n.top=Math.max(n.top,s.top),n.right=Math.min(n.right,s.left+i.clientWidth),n.bottom=Math.min(n.bottom,s.top+i.clientHeight),n.left=Math.max(n.left,s.left)}else if(i===a||i===u)break;i=$e(i)}var f=null;if(!p.isWindow(t)&&t.nodeType!==9){f=t.style.position;var l=p.css(t,"position");l==="absolute"&&(t.style.position="fixed")}var m=p.getWindowScrollLeft(r),v=p.getWindowScrollTop(r),c=p.viewportWidth(r),h=p.viewportHeight(r),d=u.scrollWidth,T=u.scrollHeight,g=window.getComputedStyle(a);if(g.overflowX==="hidden"&&(d=r.innerWidth),g.overflowY==="hidden"&&(T=r.innerHeight),t.style&&(t.style.position=f),e||qn(t))n.left=Math.max(n.left,m),n.top=Math.max(n.top,v),n.right=Math.min(n.right,m+c),n.bottom=Math.min(n.bottom,v+h);else{var w=Math.max(d,m+c);n.right=Math.min(n.right,w);var b=Math.max(T,v+h);n.bottom=Math.min(n.bottom,b)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Kn(t,e,n,i){var o=p.clone(t),r={width:e.width,height:e.height};return i.adjustX&&o.left<n.left&&(o.left=n.left),i.resizeWidth&&o.left>=n.left&&o.left+r.width>n.right&&(r.width-=o.left+r.width-n.right),i.adjustX&&o.left+r.width>n.right&&(o.left=Math.max(n.right-r.width,n.left)),i.adjustY&&o.top<n.top&&(o.top=n.top),i.resizeHeight&&o.top>=n.top&&o.top+r.height>n.bottom&&(r.height-=o.top+r.height-n.bottom),i.adjustY&&o.top+r.height>n.bottom&&(o.top=Math.max(n.bottom-r.height,n.top)),p.mix(o,r)}function je(t){var e,n,i;if(!p.isWindow(t)&&t.nodeType!==9)e=p.offset(t),n=p.outerWidth(t),i=p.outerHeight(t);else{var o=p.getWindow(t);e={left:p.getWindowScrollLeft(o),top:p.getWindowScrollTop(o)},n=p.viewportWidth(o),i=p.viewportHeight(o)}return e.width=n,e.height=i,e}function ct(t,e){var n=e.charAt(0),i=e.charAt(1),o=t.width,r=t.height,a=t.left,u=t.top;return n==="c"?u+=r/2:n==="b"&&(u+=r),i==="c"?a+=o/2:i==="r"&&(a+=o),{left:a,top:u}}function pe(t,e,n,i,o){var r=ct(e,n[1]),a=ct(t,n[0]),u=[a.left-r.left,a.top-r.top];return{left:Math.round(t.left-u[0]+i[0]-o[0]),top:Math.round(t.top-u[1]+i[1]-o[1])}}function vt(t,e,n){return t.left<n.left||t.left+e.width>n.right}function dt(t,e,n){return t.top<n.top||t.top+e.height>n.bottom}function Gn(t,e,n){return t.left>n.right||t.left+e.width<n.left}function Zn(t,e,n){return t.top>n.bottom||t.top+e.height<n.top}function he(t,e,n){var i=[];return p.each(t,function(o){i.push(o.replace(e,function(r){return n[r]}))}),i}function me(t,e){return t[e]=-t[e],t}function pt(t,e){var n;return/%$/.test(t)?n=parseInt(t.substring(0,t.length-1),10)/100*e:n=parseInt(t,10),n||0}function ht(t,e){t[0]=pt(t[0],e.width),t[1]=pt(t[1],e.height)}function It(t,e,n,i){var o=n.points,r=n.offset||[0,0],a=n.targetOffset||[0,0],u=n.overflow,s=n.source||t;r=[].concat(r),a=[].concat(a),u=u||{};var f={},l=0,m=!!(u&&u.alwaysByViewport),v=We(s,m),c=je(s);ht(r,c),ht(a,e);var h=pe(c,e,o,r,a),d=p.merge(c,h);if(v&&(u.adjustX||u.adjustY)&&i){if(u.adjustX&&vt(h,c,v)){var T=he(o,/[lr]/gi,{l:"r",r:"l"}),g=me(r,0),w=me(a,0),b=pe(c,e,T,g,w);Gn(b,c,v)||(l=1,o=T,r=g,a=w)}if(u.adjustY&&dt(h,c,v)){var N=he(o,/[tb]/gi,{t:"b",b:"t"}),V=me(r,1),D=me(a,1),F=pe(c,e,N,V,D);Zn(F,c,v)||(l=1,o=N,r=V,a=D)}l&&(h=pe(c,e,o,r,a),p.mix(d,h));var _=vt(h,c,v),Y=dt(h,c,v);if(_||Y){var I=o;_&&(I=he(o,/[lr]/gi,{l:"r",r:"l"})),Y&&(I=he(o,/[tb]/gi,{t:"b",b:"t"})),o=I,r=n.offset||[0,0],a=n.targetOffset||[0,0]}f.adjustX=u.adjustX&&_,f.adjustY=u.adjustY&&Y,(f.adjustX||f.adjustY)&&(d=Kn(h,c,v,f))}return d.width!==c.width&&p.css(s,"width",p.width(s)+d.width-c.width),d.height!==c.height&&p.css(s,"height",p.height(s)+d.height-c.height),p.offset(s,{left:d.left,top:d.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:r,targetOffset:a,overflow:f}}function Jn(t,e){var n=We(t,e),i=je(t);return!n||i.left+i.width<=n.left||i.top+i.height<=n.top||i.left>=n.right||i.top>=n.bottom}function Xe(t,e,n){var i=n.target||e,o=je(i),r=!Jn(i,n.overflow&&n.overflow.alwaysByViewport);return It(t,o,n,r)}Xe.__getOffsetParent=$e;Xe.__getVisibleRectForElement=We;function Qn(t,e,n){var i,o,r=p.getDocument(t),a=r.defaultView||r.parentWindow,u=p.getWindowScrollLeft(a),s=p.getWindowScrollTop(a),f=p.viewportWidth(a),l=p.viewportHeight(a);"pageX"in e?i=e.pageX:i=u+e.clientX,"pageY"in e?o=e.pageY:o=s+e.clientY;var m={left:i,top:o,width:0,height:0},v=i>=0&&i<=u+f&&o>=0&&o<=s+l,c=[n.points[0],"cc"];return It(t,m,it(it({},n),{},{points:c}),v)}const ei=function(t){if(!t)return!1;if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox();if(e.width||e.height)return!0}if(t.getBoundingClientRect){var n=t.getBoundingClientRect();if(n.width||n.height)return!0}return!1};function ti(t,e){return t===e?!0:!t||!e?!1:"pageX"in e&&"pageY"in e?t.pageX===e.pageX&&t.pageY===e.pageY:"clientX"in e&&"clientY"in e?t.clientX===e.clientX&&t.clientY===e.clientY:!1}function ni(t,e){t!==document.activeElement&&ee(e,t)&&typeof t.focus=="function"&&t.focus()}function mt(t,e){var n=null,i=null;function o(a){var u=we(a,1),s=u[0].target;if(!!document.documentElement.contains(s)){var f=s.getBoundingClientRect(),l=f.width,m=f.height,v=Math.floor(l),c=Math.floor(m);(n!==v||i!==c)&&Promise.resolve().then(function(){e({width:v,height:c})}),n=v,i=c}}var r=new hn(o);return t&&r.observe(t),function(){r.disconnect()}}const ii=function(t,e){var n=!1,i=null;function o(){clearTimeout(i)}function r(a){if(!n||a===!0){if(t()===!1)return;n=!0,o(),i=setTimeout(function(){n=!1},e.value)}else o(),i=setTimeout(function(){n=!1,r()},e.value)}return[r,function(){n=!1,o()}]};var oi={align:Object,target:[Object,Function],onAlign:Function,monitorBufferTime:Number,monitorWindowResize:Boolean,disabled:Boolean};function gt(t){return typeof t!="function"?null:t()}function yt(t){return Ot(t)!=="object"||!t?null:t}const ri=q({name:"Align",props:oi,emits:["align"],setup:function(e,n){var i=n.expose,o=n.slots,r=y({}),a=y(),u=ii(function(){var d=e.disabled,T=e.target,g=e.align,w=e.onAlign;if(!d&&T&&a.value){var b=a.value,N,V=gt(T),D=yt(T);r.value.element=V,r.value.point=D,r.value.align=g;var F=document,_=F.activeElement;return V&&ei(V)?N=Xe(b,V,g):D&&(N=Qn(b,D,g)),ni(_,b),w&&N&&w(b,N),!0}return!1},k(function(){return e.monitorBufferTime})),s=we(u,2),f=s[0],l=s[1],m=y({cancel:function(){}}),v=y({cancel:function(){}}),c=function(){var T=e.target,g=gt(T),w=yt(T);a.value!==v.value.element&&(v.value.cancel(),v.value.element=a.value,v.value.cancel=mt(a.value,f)),(r.value.element!==g||!ti(r.value.point,w)||!pn(r.value.align,e.align))&&(f(),m.value.element!==g&&(m.value.cancel(),m.value.element=g,m.value.cancel=mt(g,f)))};Tt(function(){ke(function(){c()})}),Zt(function(){ke(function(){c()})}),U(function(){return e.disabled},function(d){d?l():f()},{immediate:!0,flush:"post"});var h=y(null);return U(function(){return e.monitorWindowResize},function(d){d?h.value||(h.value=ae(window,"resize",f)):h.value&&(h.value.remove(),h.value=null)},{flush:"post"}),xt(function(){m.value.cancel(),v.value.cancel(),h.value&&h.value.remove(),l()}),i({forceAlign:function(){return f(!0)}}),function(){var d=o==null?void 0:o.default();return d?At(d[0],{ref:a},!0,!0):null}}}),ai=q({name:"PopupInner",inheritAttrs:!1,props:Be,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup:function(e,n){var i=n.expose,o=n.attrs,r=n.slots,a=y(),u=y(),s=y(),f=Sn(Jt(e,"stretch")),l=we(f,2),m=l[0],v=l[1],c=function(){e.stretch&&v(e.getRootDomNode())},h=y(!1),d;U(function(){return e.visible},function(R){clearTimeout(d),R?d=setTimeout(function(){h.value=e.visible}):h.value=!1},{immediate:!0});var T=On(h,c),g=we(T,2),w=g[0],b=g[1],N=y(),V=function(){return e.point?e.point:e.getRootDomNode},D=function(){var $;($=a.value)===null||$===void 0||$.forceAlign()},F=function($,z){var W,L=e.getClassNameFromAlign(z),x=s.value;s.value!==L&&(s.value=L),w.value==="align"&&(x!==L?Promise.resolve().then(function(){D()}):b(function(){var C;(C=N.value)===null||C===void 0||C.call(N)}),(W=e.onAlign)===null||W===void 0||W.call(e,$,z))},_=k(function(){var R=Ot(e.animation)==="object"?e.animation:Rt(e);return["onAfterEnter","onAfterLeave"].forEach(function($){var z=R[$];R[$]=function(W){b(),w.value="stable",z==null||z(W)}}),R}),Y=function(){return new Promise(function($){N.value=$})};U([_,w],function(){!_.value&&w.value==="motion"&&b()},{immediate:!0}),i({forceAlign:D,getElement:function(){return u.value.$el||u.value}});var I=k(function(){var R;return!(((R=e.align)===null||R===void 0?void 0:R.points)&&(w.value==="align"||w.value==="stable"))});return function(){var R,$=e.zIndex,z=e.align,W=e.prefixCls,L=e.destroyPopupOnHide,x=e.onMouseenter,C=e.onMouseleave,A=e.onTouchstart,E=A===void 0?function(){}:A,B=e.onMousedown,Z=w.value,Te=[M(M({},m.value),{zIndex:$,opacity:Z==="motion"||Z==="stable"||!h.value?null:0,pointerEvents:!h.value&&Z!=="stable"?"none":null}),o.style],K=Ct((R=r.default)===null||R===void 0?void 0:R.call(r,{visible:e.visible}));K.length>1&&(K=P("div",{class:"".concat(W,"-content")},[K]));var ce=ie(W,o.class,s.value),xe=h.value||!e.visible,Oe=xe?Qt(_.value.name,_.value):{};return P(He,S(S({ref:u},Oe),{},{onBeforeEnter:Y}),{default:function(){return!L||e.visible?Pt(P(ri,{target:V(),key:"popup",ref:a,monitorWindowResize:!0,disabled:I.value,align:z,onAlign:F},{default:function(){return P("div",S(S({class:ce,onMouseenter:x,onMouseleave:C,onMousedown:Ge(B,["capture"])},tn({},ue?"onTouchstartPassive":"onTouchstart",Ge(E,["capture"]))),{},{style:Te}),[K])}}),[[en,h.value]]):null}})}}}),ui=q({name:"Popup",inheritAttrs:!1,props:Cn,setup:function(e,n){var i=n.attrs,o=n.slots,r=n.expose,a=y(!1),u=y(!1),s=y();return U([function(){return e.visible},function(){return e.mobile}],function(){a.value=e.visible,e.visible&&e.mobile&&(u.value=!0)},{immediate:!0,flush:"post"}),r({forceAlign:function(){var l;(l=s.value)===null||l===void 0||l.forceAlign()},getElement:function(){var l;return(l=s.value)===null||l===void 0?void 0:l.getElement()}}),function(){var f=M(M(M({},e),i),{visible:a.value}),l=u.value?P(Tn,S(S({},f),{},{mobile:e.mobile,ref:s}),{default:o.default}):P(ai,S(S({},f),{},{ref:s}),{default:o.default});return P("div",null,[P(Et,f,null),l])}}});function si(t,e,n){return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function wt(t,e,n){var i=t[e]||{};return M(M({},i),n)}function li(t,e,n,i){for(var o=n.points,r=Object.keys(t),a=0;a<r.length;a+=1){var u=r[a];if(si(t[u].points,o,i))return"".concat(e,"-placement-").concat(u)}return""}const fi={methods:{setState:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){var o=this.getDerivedStateFromProps(nn(this),M(M({},this.$data),i));if(o===null)return;i=M(M({},i),o||{})}M(this.$data,i),this._.isMounted&&this.$forceUpdate(),ke(function(){n&&n()})},__emit:function(){var e=[].slice.call(arguments,0),n=e[0];n="on".concat(n[0].toUpperCase()).concat(n.substring(1));var i=this.$props[n]||this.$attrs[n];if(e.length&&i)if(Array.isArray(i))for(var o=0,r=i.length;o<r;o++)i[o].apply(i,Ze(e.slice(1)));else i.apply(void 0,Ze(e.slice(1)))}}};function bt(){}function ci(){return""}function vi(t){return t?t.ownerDocument:window.document}var di=["onClick","onMousedown","onTouchstart","onMouseenter","onMouseleave","onFocus","onBlur","onContextmenu"];const Oi=q({name:"Trigger",mixins:[fi],inheritAttrs:!1,props:{action:O.oneOfType([O.string,O.arrayOf(O.string)]).def([]),showAction:O.any.def([]),hideAction:O.any.def([]),getPopupClassNameFromAlign:O.any.def(ci),onPopupVisibleChange:Function,afterPopupVisibleChange:O.func.def(bt),popup:O.any,popupStyle:{type:Object,default:void 0},prefixCls:O.string.def("rc-trigger-popup"),popupClassName:O.string.def(""),popupPlacement:String,builtinPlacements:O.object,popupTransitionName:String,popupAnimation:O.any,mouseEnterDelay:O.number.def(0),mouseLeaveDelay:O.number.def(.1),zIndex:Number,focusDelay:O.number.def(0),blurDelay:O.number.def(.15),getPopupContainer:Function,getDocument:O.func.def(vi),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:O.object.def(function(){return{}}),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function},setup:function(e){var n=k(function(){var s=e.popupPlacement,f=e.popupAlign,l=e.builtinPlacements;return s&&l?wt(l,s,f):f}),i=vn(),o=i.setPortal,r=i.popPortal,a=y(null),u=function(f){a.value=f};return{popPortal:r,setPortal:o,vcTriggerContext:St("vcTriggerContext",{}),popupRef:a,setPopupRef:u,triggerRef:y(null),align:n,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data:function(){var e=this,n,i,o=this.$props,r;return this.popupVisible!==void 0?r=!!o.popupVisible:r=!!o.defaultPopupVisible,di.forEach(function(a){e["fire".concat(a)]=function(u){e.fireEvents(a,u)}}),(i=(n=this).setPortal)===null||i===void 0||i.call(n,P(Qe,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},{default:this.getComponent})),{prevPopupVisible:r,sPopupVisible:r,point:null}},watch:{popupVisible:function(e){e!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=e)}},created:function(){Mt("vcTriggerContext",{onPopupMouseDown:this.onPopupMouseDown}),dn(this)},deactivated:function(){this.setPopupVisible(!1)},mounted:function(){var e=this;this.$nextTick(function(){e.updatedCal()})},updated:function(){var e=this;this.$nextTick(function(){e.updatedCal()})},beforeUnmount:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),te.cancel(this.attachId)},methods:{updatedCal:function(){var e=this.$props,n=this.$data;if(n.sPopupVisible){var i;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(i=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=ae(i,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(i=i||e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=ae(i,"touchstart",this.onDocumentClick,ue?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(i=i||e.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=ae(i,"scroll",this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=ae(window,"blur",this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter:function(e){var n=this.$props.mouseEnterDelay;this.fireEvents("onMouseenter",e),this.delaySetPopupVisible(!0,n,n?null:e)},onMouseMove:function(e){this.fireEvents("onMousemove",e),this.setPoint(e)},onMouseleave:function(e){this.fireEvents("onMouseleave",e),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter:function(){this.clearDelayTimer()},onPopupMouseleave:function(e){var n;e&&e.relatedTarget&&!e.relatedTarget.setTimeout&&ee((n=this.popupRef)===null||n===void 0?void 0:n.getElement(),e.relatedTarget)||this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onFocus:function(e){this.fireEvents("onFocus",e),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown:function(e){this.fireEvents("onMousedown",e),this.preClickTime=Date.now()},onTouchstart:function(e){this.fireEvents("onTouchstart",e),this.preTouchTime=Date.now()},onBlur:function(e){ee(e.target,e.relatedTarget||document.activeElement)||(this.fireEvents("onBlur",e),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu:function(e){e.preventDefault(),this.fireEvents("onContextmenu",e),this.setPopupVisible(!0,e)},onContextmenuClose:function(){this.isContextmenuToShow()&&this.close()},onClick:function(e){if(this.fireEvents("onClick",e),this.focusTime){var n;if(this.preClickTime&&this.preTouchTime?n=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?n=this.preClickTime:this.preTouchTime&&(n=this.preTouchTime),Math.abs(n-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault(),e&&e.domEvent&&e.domEvent.preventDefault();var i=!this.$data.sPopupVisible;(this.isClickToHide()&&!i||i&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,e)},onPopupMouseDown:function(){var e=this,n=this.vcTriggerContext,i=n===void 0?{}:n;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(function(){e.hasPopupMouseDown=!1},0),i.onPopupMouseDown&&i.onPopupMouseDown.apply(i,arguments)},onDocumentClick:function(e){if(!(this.$props.mask&&!this.$props.maskClosable)){var n=e.target,i=this.getRootDomNode(),o=this.getPopupDomNode();(!ee(i,n)||this.isContextMenuOnly())&&!ee(o,n)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)}},getPopupDomNode:function(){var e;return((e=this.popupRef)===null||e===void 0?void 0:e.getElement())||null},getRootDomNode:function(){var e=this.$props.getTriggerDOMNode;if(e){var n=ve(this.triggerRef);return ve(e(n))}try{var i=ve(this.triggerRef);if(i)return i}catch{}return ve(this)},handleGetPopupClassFromAlign:function(e){var n=[],i=this.$props,o=i.popupPlacement,r=i.builtinPlacements,a=i.prefixCls,u=i.alignPoint,s=i.getPopupClassNameFromAlign;return o&&r&&n.push(li(r,a,e,u)),s&&n.push(s(e)),n.join(" ")},getPopupAlign:function(){var e=this.$props,n=e.popupPlacement,i=e.popupAlign,o=e.builtinPlacements;return n&&o?wt(o,n,i):i},getComponent:function(){var e=this,n={};this.isMouseEnterToShow()&&(n.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(n.onMouseleave=this.onPopupMouseleave),n.onMousedown=this.onPopupMouseDown,n[ue?"onTouchstartPassive":"onTouchstart"]=this.onPopupMouseDown;var i=this.handleGetPopupClassFromAlign,o=this.getRootDomNode,r=this.getContainer,a=this.$attrs,u=this.$props,s=u.prefixCls,f=u.destroyPopupOnHide,l=u.popupClassName,m=u.popupAnimation,v=u.popupTransitionName,c=u.popupStyle,h=u.mask,d=u.maskAnimation,T=u.maskTransitionName,g=u.zIndex,w=u.stretch,b=u.alignPoint,N=u.mobile,V=u.forceRender,D=this.$data,F=D.sPopupVisible,_=D.point,Y=M(M({prefixCls:s,destroyPopupOnHide:f,visible:F,point:b?_:null,align:this.align,animation:m,getClassNameFromAlign:i,stretch:w,getRootDomNode:o,mask:h,zIndex:g,transitionName:v,maskAnimation:d,maskTransitionName:T,getContainer:r,class:l,style:c,onAlign:a.onPopupAlign||bt},n),{ref:this.setPopupRef,mobile:N,forceRender:V});return P(ui,Y,{default:this.$slots.popup||function(){return on(e,"popup")}})},attachParent:function(e){var n=this;te.cancel(this.attachId);var i=this.$props,o=i.getPopupContainer,r=i.getDocument,a=this.getRootDomNode(),u;o?(a||o.length===0)&&(u=o(a)):u=r(this.getRootDomNode()).body,u?u.appendChild(e):this.attachId=te(function(){n.attachParent(e)})},getContainer:function(){var e=this.$props,n=e.getDocument,i=n(this.getRootDomNode()).createElement("div");return i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.width="100%",this.attachParent(i),i},setPopupVisible:function(e,n){var i=this.alignPoint,o=this.sPopupVisible,r=this.onPopupVisibleChange;this.clearDelayTimer(),o!==e&&(rn(this,"popupVisible")||this.setState({sPopupVisible:e,prevPopupVisible:o}),r&&r(e)),i&&n&&e&&this.setPoint(n)},setPoint:function(e){var n=this.$props.alignPoint;!n||!e||this.setState({point:{pageX:e.pageX,pageY:e.pageY}})},handlePortalUpdate:function(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible:function(e,n,i){var o=this,r=n*1e3;if(this.clearDelayTimer(),r){var a=i?{pageX:i.pageX,pageY:i.pageY}:null;this.delayTimer=bn(function(){o.setPopupVisible(e,a),o.clearDelayTimer()},r)}else this.setPopupVisible(e,i)},clearDelayTimer:function(){this.delayTimer&&(wn(this.delayTimer),this.delayTimer=null)},clearOutsideHandler:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextmenuOutsideHandler1&&(this.contextmenuOutsideHandler1.remove(),this.contextmenuOutsideHandler1=null),this.contextmenuOutsideHandler2&&(this.contextmenuOutsideHandler2.remove(),this.contextmenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},createTwoChains:function(e){var n=function(){},i=Je(this);return this.childOriginEvents[e]&&i[e]?this["fire".concat(e)]:(n=this.childOriginEvents[e]||i[e]||n,n)},isClickToShow:function(){var e=this.$props,n=e.action,i=e.showAction;return n.indexOf("click")!==-1||i.indexOf("click")!==-1},isContextMenuOnly:function(){var e=this.$props.action;return e==="contextmenu"||e.length===1&&e[0]==="contextmenu"},isContextmenuToShow:function(){var e=this.$props,n=e.action,i=e.showAction;return n.indexOf("contextmenu")!==-1||i.indexOf("contextmenu")!==-1},isClickToHide:function(){var e=this.$props,n=e.action,i=e.hideAction;return n.indexOf("click")!==-1||i.indexOf("click")!==-1},isMouseEnterToShow:function(){var e=this.$props,n=e.action,i=e.showAction;return n.indexOf("hover")!==-1||i.indexOf("mouseenter")!==-1},isMouseLeaveToHide:function(){var e=this.$props,n=e.action,i=e.hideAction;return n.indexOf("hover")!==-1||i.indexOf("mouseleave")!==-1},isFocusToShow:function(){var e=this.$props,n=e.action,i=e.showAction;return n.indexOf("focus")!==-1||i.indexOf("focus")!==-1},isBlurToHide:function(){var e=this.$props,n=e.action,i=e.hideAction;return n.indexOf("focus")!==-1||i.indexOf("blur")!==-1},forcePopupAlign:function(){var e;this.$data.sPopupVisible&&((e=this.popupRef)===null||e===void 0||e.forceAlign())},fireEvents:function(e,n){this.childOriginEvents[e]&&this.childOriginEvents[e](n);var i=this.$props[e]||this.$attrs[e];i&&i(n)},close:function(){this.setPopupVisible(!1)}},render:function(){var e=this,n=this.$attrs,i=an(un(this)),o=this.$props.alignPoint,r=i[0];this.childOriginEvents=Je(r);var a={key:"trigger"};this.isContextmenuToShow()?a.onContextmenu=this.onContextmenu:a.onContextmenu=this.createTwoChains("onContextmenu"),this.isClickToHide()||this.isClickToShow()?(a.onClick=this.onClick,a.onMousedown=this.onMousedown,a[ue?"onTouchstartPassive":"onTouchstart"]=this.onTouchstart):(a.onClick=this.createTwoChains("onClick"),a.onMousedown=this.createTwoChains("onMousedown"),a[ue?"onTouchstartPassive":"onTouchstart"]=this.createTwoChains("onTouchstart")),this.isMouseEnterToShow()?(a.onMouseenter=this.onMouseenter,o&&(a.onMousemove=this.onMouseMove)):a.onMouseenter=this.createTwoChains("onMouseenter"),this.isMouseLeaveToHide()?a.onMouseleave=this.onMouseleave:a.onMouseleave=this.createTwoChains("onMouseleave"),this.isFocusToShow()||this.isBlurToHide()?(a.onFocus=this.onFocus,a.onBlur=this.onBlur):(a.onFocus=this.createTwoChains("onFocus"),a.onBlur=function(l){l&&(!l.relatedTarget||!ee(l.target,l.relatedTarget))&&e.createTwoChains("onBlur")(l)});var u=ie(r&&r.props&&r.props.class,n.class);u&&(a.class=u);var s=At(r,M(M({},a),{ref:"triggerRef"}),!0,!0);if(this.popPortal)return s;var f=P(Qe,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},{default:this.getComponent});return P(sn,null,[f,s])}});var zt=Symbol("OverflowContextProviderKey"),Fe=q({name:"OverflowContextProvider",inheritAttrs:!1,props:{value:{type:Object}},setup:function(e,n){var i=n.slots;return Mt(zt,k(function(){return e.value})),function(){var o;return(o=i.default)===null||o===void 0?void 0:o.call(i)}}}),pi=function(){return St(zt,k(function(){return null}))},hi=globalThis&&globalThis.__rest||function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n},Q=void 0;const ye=q({name:"Item",props:{prefixCls:String,item:O.any,renderItem:Function,responsive:Boolean,itemKey:{type:[String,Number]},registerSize:Function,display:Boolean,order:Number,component:O.any,invalidate:Boolean},setup:function(e,n){var i=n.slots,o=n.expose,r=k(function(){return e.responsive&&!e.display}),a=y();o({itemNodeRef:a});function u(s){e.registerSize(e.itemKey,s)}return xt(function(){u(null)}),function(){var s,f=e.prefixCls,l=e.invalidate,m=e.item,v=e.renderItem,c=e.responsive;e.registerSize,e.itemKey,e.display;var h=e.order,d=e.component,T=d===void 0?"div":d,g=hi(e,["prefixCls","invalidate","item","renderItem","responsive","registerSize","itemKey","display","order","component"]),w=(s=i.default)===null||s===void 0?void 0:s.call(i),b=v&&m!==Q?v(m):w,N;l||(N={opacity:r.value?0:1,height:r.value?0:Q,overflowY:r.value?"hidden":Q,order:c?h:Q,pointerEvents:r.value?"none":Q,position:r.value?"absolute":Q});var V={};return r.value&&(V["aria-hidden"]=!0),P(Nt,{disabled:!c,onResize:function(F){var _=F.offsetWidth;u(_)}},{default:function(){return P(T,S(S(S({class:ie(!l&&f),style:N},V),g),{},{ref:a}),{default:function(){return[b]}})}})}}});var Ee=globalThis&&globalThis.__rest||function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n};const mi=q({name:"RawItem",inheritAttrs:!1,props:{component:O.any,title:O.any,id:String,onMouseenter:{type:Function},onMouseleave:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onFocus:{type:Function}},setup:function(e,n){var i=n.slots,o=n.attrs,r=pi();return function(){var a;if(!r.value){var u=e.component,s=u===void 0?"div":u,f=Ee(e,["component"]);return P(s,S(S({},f),o),{default:function(){return[(a=i.default)===null||a===void 0?void 0:a.call(i)]}})}var l=r.value,m=l.className,v=Ee(l,["className"]),c=o.class,h=Ee(o,["class"]);return P(Fe,{value:null},{default:function(){return[P(ye,S(S(S({class:ie(m,c)},v),h),e),i)]}})}}});var gi=globalThis&&globalThis.__rest||function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n},Wt="responsive",jt="invalidate";function yi(t){return"+ ".concat(t.length," ...")}var wi=function(){return{id:String,prefixCls:String,data:Array,itemKey:[String,Number,Function],itemWidth:{type:Number,default:10},renderItem:Function,renderRawItem:Function,maxCount:[Number,String],renderRest:Function,renderRawRest:Function,suffix:O.any,component:String,itemComponent:O.any,onVisibleChange:Function,ssr:String,onMousedown:Function}},Ce=q({name:"Overflow",inheritAttrs:!1,props:wi(),emits:["visibleChange"],setup:function(e,n){var i=n.attrs,o=n.emit,r=n.slots,a=k(function(){return e.ssr==="full"}),u=y(null),s=k(function(){return u.value||0}),f=y(new Map),l=y(0),m=y(0),v=y(0),c=y(null),h=y(null),d=k(function(){return h.value===null&&a.value?Number.MAX_SAFE_INTEGER:h.value||0}),T=y(!1),g=k(function(){return"".concat(e.prefixCls,"-item")}),w=k(function(){return Math.max(l.value,m.value)}),b=k(function(){return!!(e.data.length&&e.maxCount===Wt)}),N=k(function(){return e.maxCount===jt}),V=k(function(){return b.value||typeof e.maxCount=="number"&&e.data.length>e.maxCount}),D=k(function(){var x=e.data;return b.value?u.value===null&&a.value?x=e.data:x=e.data.slice(0,Math.min(e.data.length,s.value/e.itemWidth)):typeof e.maxCount=="number"&&(x=e.data.slice(0,e.maxCount)),x}),F=k(function(){return b.value?e.data.slice(d.value+1):e.data.slice(D.value.length)}),_=function(C,A){var E,B;return typeof e.itemKey=="function"?e.itemKey(C):(B=e.itemKey&&((E=C)===null||E===void 0?void 0:E[e.itemKey]))!==null&&B!==void 0?B:A},Y=k(function(){return e.renderItem||function(x){return x}}),I=function(C,A){h.value=C,A||(T.value=C<e.data.length-1,o("visibleChange",C))},R=function(C,A){u.value=A.clientWidth},$=function(C,A){var E=new Map(f.value);A===null?E.delete(C):E.set(C,A),f.value=E},z=function(C,A){l.value=m.value,m.value=A},W=function(C,A){v.value=A},L=function(C){return f.value.get(_(D.value[C],C))};return U([s,f,m,v,function(){return e.itemKey},D],function(){if(s.value&&w.value&&D.value){var x=v.value,C=D.value.length,A=C-1;if(!C){I(0),c.value=null;return}for(var E=0;E<C;E+=1){var B=L(E);if(B===void 0){I(E-1,!0);break}if(x+=B,A===0&&x<=s.value||E===A-1&&x+L(A)<=s.value){I(A),c.value=null;break}else if(x+w.value>s.value){I(E-1),c.value=x-B-v.value+m.value;break}}e.suffix&&L(0)+v.value>s.value&&(c.value=null)}}),function(){var x=T.value&&!!F.value.length,C=e.itemComponent,A=e.renderRawItem,E=e.renderRawRest,B=e.renderRest,Z=e.prefixCls,Te=Z===void 0?"rc-overflow":Z,K=e.suffix,ce=e.component,xe=ce===void 0?"div":ce,Oe=e.id,Ye=e.onMousedown,Le=i.class,Xt=i.style,Yt=gi(i,["class","style"]),Ue={};c.value!==null&&b.value&&(Ue={position:"absolute",left:"".concat(c.value,"px"),top:0});var oe={prefixCls:g.value,responsive:b.value,component:C,invalidate:N.value},Lt=A?function(j,H){var J=_(j,H);return P(Fe,{key:J,value:M(M({},oe),{order:H,item:j,itemKey:J,registerSize:$,display:H<=d.value})},{default:function(){return[A(j,H)]}})}:function(j,H){var J=_(j,H);return P(ye,S(S({},oe),{},{order:H,key:J,item:j,renderItem:Y.value,itemKey:J,registerSize:$,display:H<=d.value}),null)},Se=function(){return null},qe={order:x?d.value:Number.MAX_SAFE_INTEGER,className:"".concat(g.value," ").concat(g.value,"-rest"),registerSize:z,display:x};if(E)E&&(Se=function(){return P(Fe,{value:M(M({},oe),qe)},{default:function(){return[E(F.value)]}})});else{var Me=B||yi;Se=function(){return P(ye,S(S({},oe),qe),{default:function(){return typeof Me=="function"?Me(F.value):Me}})}}var Ut=function(){var H;return P(xe,S({id:Oe,class:ie(!N.value&&Te,Le),style:Xt,onMousedown:Ye},Yt),{default:function(){return[D.value.map(Lt),V.value?Se():null,K&&P(ye,S(S({},oe),{},{order:d.value,class:"".concat(g.value,"-suffix"),registerSize:W,display:!0,style:Ue}),{default:function(){return K}}),(H=r.default)===null||H===void 0?void 0:H.call(r)]}})};return P(Nt,{disabled:!b.value,onResize:R},{default:Ut})}}});Ce.Item=mi;Ce.RESPONSIVE=Wt;Ce.INVALIDATE=jt;const Si=Ce,Mi=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4)))};function Ai(t,e){var n=e||{},i=n.defaultValue,o=n.value,r=o===void 0?y():o,a=typeof t=="function"?t():t;r.value!==void 0&&(a=ln(r)),i!==void 0&&(a=typeof i=="function"?i():i);var u=y(a),s=y(a);fn(function(){var l=r.value!==void 0?r.value:u.value;e.postState&&(l=e.postState(l)),s.value=l});function f(l){var m=s.value;u.value=l,cn(s.value)!==l&&e.onChange&&e.onChange(l,m)}return U(r,function(){u.value=r.value}),[s,f]}function Ni(t){var e=typeof t=="function"?t():t,n=y(e);function i(o){n.value=o}return[n,i]}export{fi as B,Si as O,Oi as T,Ni as a,ei as b,Mi as i,Ai as u};