Bug: T343910 Bug: T347107 Bug: T350644 Bug: T350946 Bug: T356103 Bug: T356537 Bug: T356540 Bug: T356541 Bug: T357165 Bug: T357173 Bug: T357185 Bug: T357324 Depends-On: Ia561e6123ab8fa52b4498074867fc1b5e92f1e02 Change-Id: I363a97d33d85a9033da753f2a8fe730d80206639
1 line
19 KiB
JavaScript
1 line
19 KiB
JavaScript
"use strict";var Vt=Object.defineProperty,It=Object.defineProperties;var jt=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var wt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable;var vt=(t,e,n)=>e in t?Vt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,C=(t,e)=>{for(var n in e||(e={}))wt.call(e,n)&&vt(t,n,e[n]);if(Q)for(var n of Q(e))yt.call(e,n)&&vt(t,n,e[n]);return t},T=(t,e)=>It(t,jt(e));var Z=(t,e)=>{var n={};for(var o in t)wt.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Q)for(var o of Q(t))e.indexOf(o)<0&&yt.call(t,o)&&(n[o]=t[o]);return n};var W=(t,e,n)=>new Promise((o,r)=>{var s=c=>{try{a(n.next(c))}catch(l){r(l)}},i=c=>{try{a(n.throw(c))}catch(l){r(l)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});const g=require("vue"),Xt=["top","right","bottom","left"],K=Math.min,A=Math.max,et=Math.round,tt=Math.floor,k=t=>({x:t,y:t}),Yt={left:"right",right:"left",bottom:"top",top:"bottom"},qt={start:"end",end:"start"};function rt(t,e){return typeof t=="function"?t(e):t}function I(t){return t.split("-")[0]}function st(t){return t.split("-")[1]}function Ut(t){return t==="x"?"y":"x"}function Dt(t){return t==="y"?"height":"width"}function ft(t){return["top","bottom"].includes(I(t))?"y":"x"}function Ft(t){return Ut(ft(t))}function Kt(t,e,n){n===void 0&&(n=!1);const o=st(t),r=Ft(t),s=Dt(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=nt(i)),[i,nt(i)]}function Gt(t){const e=nt(t);return[at(t),e,at(e)]}function at(t){return t.replace(/start|end/g,e=>qt[e])}function Jt(t,e,n){const o=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?s:i;default:return[]}}function Qt(t,e,n,o){const r=st(t);let s=Jt(I(t),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),e&&(s=s.concat(s.map(at)))),s}function nt(t){return t.replace(/left|right|bottom|top/g,e=>Yt[e])}function Zt(t){return C({top:0,right:0,bottom:0,left:0},t)}function te(t){return typeof t!="number"?Zt(t):{top:t,right:t,bottom:t,left:t}}function ot(t){return T(C({},t),{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}function xt(t,e,n){let{reference:o,floating:r}=t;const s=ft(e),i=Ft(e),a=Dt(i),c=I(e),l=s==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let d;switch(c){case"top":d={x:u,y:o.y-r.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:f};break;case"left":d={x:o.x-r.width,y:f};break;default:d={x:o.x,y:o.y}}switch(st(e)){case"start":d[i]-=p*(n&&l?-1:1);break;case"end":d[i]+=p*(n&&l?-1:1);break}return d}const ee=(t,e,n)=>W(exports,null,function*(){const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=yield i.isRTL==null?void 0:i.isRTL(e);let l=yield i.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=xt(l,o,c),p=o,d={},w=0;for(let h=0;h<a.length;h++){const{name:v,fn:m}=a[h],{x:y,y:b,data:O,reset:R}=yield m({x:u,y:f,initialPlacement:o,placement:p,strategy:r,middlewareData:d,rects:l,platform:i,elements:{reference:t,floating:e}});u=y!=null?y:u,f=b!=null?b:f,d=T(C({},d),{[v]:C(C({},d[v]),O)}),R&&w<=50&&(w++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(l=R.rects===!0?yield i.getElementRects({reference:t,floating:e,strategy:r}):R.rects),{x:u,y:f}=xt(l,p,c)),h=-1)}return{x:u,y:f,placement:p,strategy:r,middlewareData:d}});function it(t,e){return W(this,null,function*(){var n;e===void 0&&(e={});const{x:o,y:r,platform:s,rects:i,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=rt(e,t),w=te(d),v=a[p?f==="floating"?"reference":"floating":f],m=ot(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(v))==null||n?v:v.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),y=f==="floating"?T(C({},i.floating),{x:o,y:r}):i.reference,b=yield s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating),O=(yield s.isElement==null?void 0:s.isElement(b))?(yield s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},R=ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:b,strategy:c}):y);return{top:(m.top-R.top+w.top)/O.y,bottom:(R.bottom-m.bottom+w.bottom)/O.y,left:(m.left-R.left+w.left)/O.x,right:(R.right-m.right+w.right)/O.x}})}const ne=function(t){return t===void 0&&(t={}),{name:"flip",options:t,fn(n){return W(this,null,function*(){var o,r;const{placement:s,middlewareData:i,rects:a,initialPlacement:c,platform:l,elements:u}=n,mt=rt(t,n),{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0}=mt,m=Z(mt,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((o=i.arrow)!=null&&o.alignmentOffset)return{};const y=I(s),b=I(c)===c,O=yield l.isRTL==null?void 0:l.isRTL(u.floating),R=d||(b||!v?[nt(c)]:Gt(c));!d&&h!=="none"&&R.push(...Qt(c,v,h,O));const F=[c,...R],x=yield it(n,m),E=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&E.push(x[y]),p){const P=Kt(s,a,O);E.push(x[P[0]],x[P[1]])}if(D=[...D,{placement:s,overflows:E}],!E.every(P=>P<=0)){var X,Y;const P=(((X=i.flip)==null?void 0:X.index)||0)+1,gt=F[P];if(gt)return{data:{index:P,overflows:D},reset:{placement:gt}};let q=(Y=D.filter(_=>_.overflows[0]<=0).sort((_,z)=>_.overflows[1]-z.overflows[1])[0])==null?void 0:Y.placement;if(!q)switch(w){case"bestFit":{var ht;const _=(ht=D.map(z=>[z.placement,z.overflows.filter(U=>U>0).reduce((U,zt)=>U+zt,0)]).sort((z,U)=>z[1]-U[1])[0])==null?void 0:ht[0];_&&(q=_);break}case"initialPlacement":q=c;break}if(s!==q)return{reset:{placement:q}}}return{}})}}};function bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Rt(t){return Xt.some(e=>t[e]>=0)}const oe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,fn(n){return W(this,null,function*(){const{rects:o}=n,i=rt(t,n),{strategy:r="referenceHidden"}=i,s=Z(i,["strategy"]);switch(r){case"referenceHidden":{const a=yield it(n,T(C({},s),{elementContext:"reference"})),c=bt(a,o.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Rt(c)}}}case"escaped":{const a=yield it(n,T(C({},s),{altBoundary:!0})),c=bt(a,o.floating);return{data:{escapedOffsets:c,escaped:Rt(c)}}}default:return{}}})}}},ie=function(t){return t===void 0&&(t={}),{name:"size",options:t,fn(n){return W(this,null,function*(){const{placement:o,rects:r,platform:s,elements:i}=n,x=rt(t,n),{apply:a=()=>{}}=x,c=Z(x,["apply"]),l=yield it(n,c),u=I(o),f=st(o),p=ft(o)==="y",{width:d,height:w}=r.floating;let h,v;u==="top"||u==="bottom"?(h=u,v=f===((yield s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,h=f==="end"?"top":"bottom");const m=w-l[h],y=d-l[v],b=!n.middlewareData.shift;let O=m,R=y;if(p){const E=d-l.left-l.right;R=f||b?K(y,E):E}else{const E=w-l.top-l.bottom;O=f||b?K(m,E):E}if(b&&!f){const E=A(l.left,0),D=A(l.right,0),X=A(l.top,0),Y=A(l.bottom,0);p?R=d-2*(E!==0||D!==0?E+D:A(l.left,l.right)):O=w-2*(X!==0||Y!==0?X+Y:A(l.top,l.bottom))}yield a(T(C({},n),{availableWidth:R,availableHeight:O}));const F=yield s.getDimensions(i.floating);return d!==F.width||w!==F.height?{reset:{rects:!0}}:{}})}}};function $(t){return Mt(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function H(t){var e;return(e=(Mt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Mt(t){return t instanceof Node||t instanceof L(t).Node}function B(t){return t instanceof Element||t instanceof L(t).Element}function M(t){return t instanceof HTMLElement||t instanceof L(t).HTMLElement}function Ot(t){return typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof L(t).ShadowRoot}function J(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=S(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function re(t){return["table","td","th"].includes($(t))}function ut(t){const e=dt(),n=S(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function se(t){let e=j(t);for(;M(e)&&!lt(e);){if(ut(e))return e;e=j(e)}return null}function dt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lt(t){return["html","body","#document"].includes($(t))}function S(t){return L(t).getComputedStyle(t)}function ct(t){return B(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function j(t){if($(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ot(t)&&t.host||H(t);return Ot(e)?e.host:e}function Bt(t){const e=j(t);return lt(e)?t.ownerDocument?t.ownerDocument.body:t.body:M(e)&&J(e)?e:Bt(e)}function G(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Bt(t),s=r===((o=t.ownerDocument)==null?void 0:o.body),i=L(r);return s?e.concat(i,i.visualViewport||[],J(r)?r:[],i.frameElement&&n?G(i.frameElement):[]):e.concat(r,G(r,[],n))}function Ht(t){const e=S(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=M(t),s=r?t.offsetWidth:n,i=r?t.offsetHeight:o,a=et(n)!==s||et(o)!==i;return a&&(n=s,o=i),{width:n,height:o,$:a}}function pt(t){return B(t)?t:t.contextElement}function V(t){const e=pt(t);if(!M(e))return k(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:s}=Ht(e);let i=(s?et(n.width):n.width)/o,a=(s?et(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const le=k(0);function kt(t){const e=L(t);return!dt()||!e.visualViewport?le:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ce(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function N(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=pt(t);let i=k(1);e&&(o?B(o)&&(i=V(o)):i=V(t));const a=ce(s,n,o)?kt(s):k(0);let c=(r.left+a.x)/i.x,l=(r.top+a.y)/i.y,u=r.width/i.x,f=r.height/i.y;if(s){const p=L(s),d=o&&B(o)?L(o):o;let w=p,h=w.frameElement;for(;h&&o&&d!==w;){const v=V(h),m=h.getBoundingClientRect(),y=S(h),b=m.left+(h.clientLeft+parseFloat(y.paddingLeft))*v.x,O=m.top+(h.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,f*=v.y,c+=b,l+=O,w=L(h),h=w.frameElement}}return ot({width:u,height:f,x:c,y:l})}const ae=[":popover-open",":modal"];function $t(t){return ae.some(e=>{try{return t.matches(e)}catch(n){return!1}})}function fe(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const s=r==="fixed",i=H(o),a=e?$t(e.floating):!1;if(o===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=k(1);const u=k(0),f=M(o);if((f||!f&&!s)&&(($(o)!=="body"||J(i))&&(c=ct(o)),M(o))){const p=N(o);l=V(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function ue(t){return Array.from(t.getClientRects())}function Pt(t){return N(H(t)).left+ct(t).scrollLeft}function de(t){const e=H(t),n=ct(t),o=t.ownerDocument.body,r=A(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=A(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Pt(t);const a=-n.scrollTop;return S(o).direction==="rtl"&&(i+=A(e.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:a}}function pe(t,e){const n=L(t),o=H(t),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,a=0,c=0;if(r){s=r.width,i=r.height;const l=dt();(!l||l&&e==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:s,height:i,x:a,y:c}}function he(t,e){const n=N(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,s=M(t)?V(t):k(1),i=t.clientWidth*s.x,a=t.clientHeight*s.y,c=r*s.x,l=o*s.y;return{width:i,height:a,x:c,y:l}}function Ct(t,e,n){let o;if(e==="viewport")o=pe(t,n);else if(e==="document")o=de(H(t));else if(B(e))o=he(e,n);else{const r=kt(t);o=T(C({},e),{x:e.x-r.x,y:e.y-r.y})}return ot(o)}function Wt(t,e){const n=j(t);return n===e||!B(n)||lt(n)?!1:S(n).position==="fixed"||Wt(n,e)}function me(t,e){const n=e.get(t);if(n)return n;let o=G(t,[],!1).filter(a=>B(a)&&$(a)!=="body"),r=null;const s=S(t).position==="fixed";let i=s?j(t):t;for(;B(i)&&!lt(i);){const a=S(i),c=ut(i);!c&&a.position==="fixed"&&(r=null),(s?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||J(i)&&!c&&Wt(t,i))?o=o.filter(u=>u!==i):r=a,i=j(i)}return e.set(t,o),o}function ge(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[...n==="clippingAncestors"?me(e,this._c):[].concat(n),o],a=i[0],c=i.reduce((l,u)=>{const f=Ct(e,u,r);return l.top=A(f.top,l.top),l.right=K(f.right,l.right),l.bottom=K(f.bottom,l.bottom),l.left=A(f.left,l.left),l},Ct(e,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ve(t){const{width:e,height:n}=Ht(t);return{width:e,height:n}}function we(t,e,n){const o=M(e),r=H(e),s=n==="fixed",i=N(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=k(0);if(o||!o&&!s)if(($(e)!=="body"||J(r))&&(a=ct(e)),o){const f=N(e,!0,s,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else r&&(c.x=Pt(r));const l=i.left+a.scrollLeft-c.x,u=i.top+a.scrollTop-c.y;return{x:l,y:u,width:i.width,height:i.height}}function Et(t,e){return!M(t)||S(t).position==="fixed"?null:e?e(t):t.offsetParent}function Nt(t,e){const n=L(t);if(!M(t)||$t(t))return n;let o=Et(t,e);for(;o&&re(o)&&S(o).position==="static";)o=Et(o,e);return o&&($(o)==="html"||$(o)==="body"&&S(o).position==="static"&&!ut(o))?n:o||se(t)||n}const ye=function(t){return W(this,null,function*(){const e=this.getOffsetParent||Nt,n=this.getDimensions;return{reference:we(t.reference,yield e(t.floating),t.strategy),floating:C({x:0,y:0},yield n(t.floating))}})};function xe(t){return S(t).direction==="rtl"}const be={convertOffsetParentRelativeRectToViewportRelativeRect:fe,getDocumentElement:H,getClippingRect:ge,getOffsetParent:Nt,getElementRects:ye,getClientRects:ue,getDimensions:ve,getScale:V,isElement:B,isRTL:xe};function Re(t,e){let n=null,o;const r=H(t);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:l,top:u,width:f,height:p}=t.getBoundingClientRect();if(a||e(),!f||!p)return;const d=tt(u),w=tt(r.clientWidth-(l+f)),h=tt(r.clientHeight-(u+p)),v=tt(l),y={rootMargin:-d+"px "+-w+"px "+-h+"px "+-v+"px",threshold:A(0,K(1,c))||1};let b=!0;function O(R){const F=R[0].intersectionRatio;if(F!==c){if(!b)return i();F?i(!1,F):o=setTimeout(()=>{i(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(O,T(C({},y),{root:r.ownerDocument}))}catch(R){n=new IntersectionObserver(O,y)}n.observe(t)}return i(!0),s}function Oe(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=pt(t),u=r||s?[...l?G(l):[],...G(e)]:[];u.forEach(m=>{r&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const f=l&&a?Re(l,n):null;let p=-1,d=null;i&&(d=new ResizeObserver(m=>{let[y]=m;y&&y.target===l&&d&&(d.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(e)})),n()}),l&&!c&&d.observe(l),d.observe(e));let w,h=c?N(t):null;c&&v();function v(){const m=N(t);h&&(m.x!==h.x||m.y!==h.y||m.width!==h.width||m.height!==h.height)&&n(),h=m,w=requestAnimationFrame(v)}return n(),()=>{var m;u.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f==null||f(),(m=d)==null||m.disconnect(),d=null,c&&cancelAnimationFrame(w)}}const Ce=ne,Ee=ie,Lt=oe,Le=(t,e,n)=>{const o=new Map,r=C({platform:be},n),s=T(C({},r.platform),{_c:o});return ee(t,e,T(C({},r),{platform:s}))};function Tt(t){var e;return(e=t==null?void 0:t.$el)!=null?e:t}function _t(t){return typeof window=="undefined"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function At(t,e){const n=_t(t);return Math.round(e*n)/n}function Te(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,r=g.computed(()=>{var x;return(x=g.unref(n.open))!=null?x:!0}),s=g.computed(()=>g.unref(n.middleware)),i=g.computed(()=>{var x;return(x=g.unref(n.placement))!=null?x:"bottom"}),a=g.computed(()=>{var x;return(x=g.unref(n.strategy))!=null?x:"absolute"}),c=g.computed(()=>{var x;return(x=g.unref(n.transform))!=null?x:!0}),l=g.computed(()=>Tt(t.value)),u=g.computed(()=>Tt(e.value)),f=g.ref(0),p=g.ref(0),d=g.ref(a.value),w=g.ref(i.value),h=g.shallowRef({}),v=g.ref(!1),m=g.computed(()=>{const x={position:d.value,left:"0",top:"0"};if(!u.value)return x;const E=At(u.value,f.value),D=At(u.value,p.value);return c.value?C(T(C({},x),{transform:"translate("+E+"px, "+D+"px)"}),_t(u.value)>=1.5&&{willChange:"transform"}):{position:d.value,left:E+"px",top:D+"px"}});let y;function b(){l.value==null||u.value==null||Le(l.value,u.value,{middleware:s.value,placement:i.value,strategy:a.value}).then(x=>{f.value=x.x,p.value=x.y,d.value=x.strategy,w.value=x.placement,h.value=x.middlewareData,v.value=!0})}function O(){typeof y=="function"&&(y(),y=void 0)}function R(){if(O(),o===void 0){b();return}if(l.value!=null&&u.value!=null){y=o(l.value,u.value,b);return}}function F(){r.value||(v.value=!1)}return g.watch([s,i,a],b,{flush:"sync"}),g.watch([l,u],R,{flush:"sync"}),g.watch(r,F,{flush:"sync"}),g.getCurrentScope()&&g.onScopeDispose(O),{x:g.shallowReadonly(f),y:g.shallowReadonly(p),strategy:g.shallowReadonly(d),placement:g.shallowReadonly(w),middlewareData:g.shallowReadonly(h),isPositioned:g.shallowReadonly(v),floatingStyles:m,update:b}}function Ae(t){return t&&"$el"in t?t.$el:t}const St=16,Se=128;function De(t,e){const n=()=>{var u;return(u=e.value)==null?void 0:u.isExpanded()},o=[Ee({padding:St,apply({rects:u,elements:f,availableHeight:p}){Object.assign(f.floating.style,{width:"".concat(u.reference.width,"px"),maxHeight:"".concat(Math.max(Se,p),"px")})}}),Ce({padding:St,fallbackStrategy:"initialPlacement"}),Lt({strategy:"escaped"}),Lt()],{floatingStyles:r,placement:s,middlewareData:i,update:a}=Te(t,e,{middleware:o}),c=g.computed(()=>{var f,p;return!n()||!!((f=i.value.hide)!=null&&f.escaped)||((p=i.value.hide)==null?void 0:p.referenceHidden)?"hidden":"visible"});g.watch([r,c,s],([u,f,p])=>{var d,w,h,v,m;Object.assign((w=(d=e.value)==null?void 0:d.$el.style)!=null?w:{},{visibility:f,position:u.position,top:"".concat(u.top,"px"),right:"unset",left:"".concat(u.left,"px"),transform:(h=u.transform)!=null?h:"none",borderTopLeftRadius:p==="bottom"&&f==="visible"?"0":"",borderTopRightRadius:p==="bottom"&&f==="visible"?"0":"",borderBottomLeftRadius:p==="top"&&f==="visible"?"0":"",borderBottomRightRadius:p==="top"&&f==="visible"?"0":""}),Object.assign((m=(v=Ae(t.value))==null?void 0:v.style)!=null?m:{},{borderTopLeftRadius:p==="top"&&f==="visible"?"0":"",borderTopRightRadius:p==="top"&&f==="visible"?"0":"",borderBottomLeftRadius:p==="bottom"&&f==="visible"?"0":"",borderBottomRightRadius:p==="bottom"&&f==="visible"?"0":""})});let l=null;g.watch(n,u=>{var f;u?l=Oe(t.value&&"$el"in t.value?t.value.$el:t,(f=e.value)==null?void 0:f.$el,a):l&&(l(),l=null)})}module.exports=De;
|