PageSourceSearch

https://m.wingu.se/packs/popover-CMoU7E4P.js

js wingu.se collected 2026-09-29 15:10:47 UTC 22,855 bytes, 2 lines download raw bytes

vendor: 4,859 bytes, line 1
1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{t as n}from"./jsx-runtime-BdxMnOeJ.js";import{t as r}from"./react-dom-BddMPX6d.js";var i=e(t(),1),a=[`top`,`right`,`bottom`,`left`],o=Math.min,s=Math.max,c=Math.round,l=Math.floor,u=e=>({x:e,y:e}),d={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function f(e,t,n){return s(e,o(t,n))}function p(e,t){return typeof e==`function`?e(t):e}function m(e){return e.split(`-`)[0]}function h(e){return e.split(`-`)[1]}function g(e){return e===`x`?`y`:`x`}function _(e){return e===`y`?`height`:`width`}function v(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function y(e){return g(v(e))}function b(e,t,n){n===void 0&&(n=!1);let r=h(e),i=y(e),a=_(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=k(o)),[o,k(o)]}function x(e){let t=k(e);return[S(e),t,S(t)]}function S(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var C=[`left`,`right`],w=[`right`,`left`],T=[`top`,`bottom`],E=[`bottom`,`top`];function D(e,t,n){switch(e){case`top`:case`bottom`:return n?t?w:C:t?C:w;case`left`:case`right`:return t?T:E;default:return[]}}function O(e,t,n,r){let i=h(e),a=D(m(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(S)))),a}function k(e){let t=m(e);return d[t]+e.slice(t.length)}function A(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function j(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:A(e)}function M(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function N(e,t,n){let{reference:r,floating:i}=e,a=v(t),o=y(t),s=_(o),c=m(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let g=h(t);return g&&(p[o]+=f*(g===`end`?1:-1)*(n&&l?-1:1)),p}async function ee(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=p(t,e),m=j(f),h=o[d?u===`floating`?`reference`:`floating`:u],g=M(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(h))??!0?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),_=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),y=await(i.isElement==null?void 0:i.isElement(v))&&await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1},b=M(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:_,offsetParent:v,strategy:s}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}var te=50,ne=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ee},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=N(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<te&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=N(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},re=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:h=`none`,flipAlignment:g=!0,..._}=p(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let y=m(r),S=v(o),C=m(o)===o,w=await(s.isRTL==null?void 0:s.isRTL(c.floating)),T=d||(C||!g?[k(o)]:x(o)),E=h!==`none`;!d&&E&&T.push(...O(o,g,h,w));let D=[o,...T],A=await s.detectOverflow(t,_),j=[],M=i.flip?.overflows||[];if(l&&j.push(A[y]),u){let e=b(r,a,w);j.push(A[e[0]],A[e[1]])}if(M=[...M,{placement:r,overflows:j}],!j.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=D[e];if(t&&(u!==`alignment`||S===v(t)||M.every(e=>v(e.placement)!==S||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}};let n=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>
1e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=M.filter(e=>{if(E){let t=v(e.placement);return t===S||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function ie(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ae(e){return a.some(t=>e[t]>=0)}var oe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=p(e,t);switch(i){case`referenceHidden`:{let e=ie(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ae(e)}}}case`escaped`:{let e=ie(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ae(e)}}}default:return{}}}}};function se(e){let t=o(...e.map(e=>e.left)),n=o(...e.map(e=>e.top)),r=s(...e.map(e=>e.right)),i=s(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function ce(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>M(se(e)))}var le=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:c}=t,{padding:l=2,x:u,y:d}=p(e,t),f=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!f.length)return{};let h=ce(f),g=M(se(f)),_=j(l);function y(){if(h.length===2&&(h[0].left>h[1].right||h[1].left>h[0].right)&&u!=null&&d!=null)return h.find(e=>u>e.left-_.left&&u<e.right+_.right&&d>e.top-_.top&&d<e.bottom+_.bottom)||g;if(h.length>=2){if(v(n)===`y`){let e=h[0],t=h[h.length-1],r=m(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return M({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=m(n)===`left`,t=s(...h.map(e=>e.right)),r=o(...h.map(e=>e.left)),i=h.filter(n=>e?n.left===r:n.right===t),a=i[0].top,c=i[i.length-1].bottom;return M({x:r,y:a,width:t-r,height:c-a})}return g}let b=await a.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:c});return i.reference.x!==b.reference.x||i.reference.y!==b.reference.y||i.reference.width!==b.reference.width||i.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},ue=new Set([`left`,`top`]);async function de(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=m(n),s=h(n),c=v(n)===`y`,l=ue.has(o)?-1:1,u=a&&c?-1:1,d=p(t,e),{mainAxis:f,crossAxis:g,alignmentAxis:_}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof _==`number`&&(g=s===`end`?_*-1:_),c?{x:g*u,y:f*l}:{x:f*l,y:g*u}}var fe=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await de(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},pe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=p(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),m=v(i),h=g(m),_=u[h],y=u[m],b=(e,t)=>f(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(_=b(h,_)),s&&(y=b(m,y));let x=c.fn({...t,[h]:_,[m]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[h]:o,[m]:s}}}}}},me=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:c=()=>{},...l}=p(e,t),u=await i.detectOverflow(t,l),d=m(n),f=h(n),g=v(n)===`y`,{width:_,height:y}=r.floating,b,x;d===`top`||d===`bottom`?(b=d,x=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(x=d,b=f===`end`?`top`:`bottom`);let S=y-u.top-u.bottom,C=_-u.left-u.right,w=o(y-u[b],S),T=o(_-u[x],C),E=t.middlewareData.shift,D=!E,O=w,k=T;E!=null&&E.enabled.x&&(k=C),E!=null&&E.enabled.y&&(O=S),D&&!f&&(g?k=_-2*s(u.left,u.right):O=y-2*s(u.top,u.bottom)),await c({...t,availableWidth:k,availableHeight:O});let A=await i.getDimensions(a.floating);return _!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function P(){return typeof window<`u`}function F(e){return he(e)?(e.nodeName||``).toLowerCase():`#document`}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function L(e){return((he(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function he(e){return P()?e instanceof Node||e instanceof I(e).Node:!1}function R(e){return P()?e instanceof Element||e instanceof I(e).Element:!1}function z(e){return P()?e instanceof HTMLElement||e instanceof I(e).HTMLElement:!1}function ge(e){return!P()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}function B(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function _e(e){return/^(table|td|th)$/.test(F(e))}function V(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ve=/transform|translate|scale|rotate|perspective|filter/,ye=/paint|layout|strict|content/,H=e=>!!e&&e!==`none`,be;function U(e){let t=R(e)?G(e):e;return H(t.transform)||H(t.translate)||H(t.scale)||H(t.rotate)||H(t.perspective)||!Se()&&(H(t.backdropFilter)||H(t.filter))||ve.test(t.willChange||``)||ye.test(t.contain||``)}function xe(e){let t=q(e);for(;z(t)&&!W(t);){if(U(t))return t;if(V(t))return null;t=q(t)}return null}function Se(){return be??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),be}function W(e){return/^(html|body|#document)$/.test(F(e))}function G(e){return I(e).getComputedStyle(e)}function K(e){return R(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if(F(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ge(e)&&e.host||L(e);return ge(t)?t.host:t}function Ce(e){let t=q(e);return W(t)?(e.ownerDocument||e).body:z(t)&&B(t)?t:Ce(t)}function J(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ce(e),i=r===e.ownerDocument?.body,a=I(r);if(i){let e=we(a);
vendor: 4,162 bytes, line 1
1return t.concat(a,a.visualViewport||[],B(r)?r:[],e&&n?J(e):[])}return t.concat(r,J(r,[],n))}function we(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Te(e){let t=G(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=z(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=c(n)!==a||c(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ee(e){return R(e)?e:e.contextElement}function Y(e){let t=Ee(e);if(!z(t))return u(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Te(t),o=(a?c(n.width):n.width)/r,s=(a?c(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var De=u(0);function Oe(e){let t=I(e);return!Se()||!t.visualViewport?De:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ke(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===I(e)}function X(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ee(e),o=u(1);t&&(r?R(r)&&(o=Y(r)):o=Y(e));let s=ke(a,n,r)?Oe(a):u(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(a&&r){let e=I(a),t=R(r)?I(r):r,n=e,i=we(n);for(;i&&t!==n;){let e=Y(i),t=i.getBoundingClientRect(),r=G(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,d*=e.x,f*=e.y,c+=a,l+=o,n=I(i),i=we(n)}}return M({width:d,height:f,x:c,y:l})}function Z(e,t){let n=K(e).scrollLeft;return t?t.left+n:X(L(e)).left+n}function Ae(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Z(e,n),y:n.top+t.scrollTop}}function je(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=L(r),s=t?V(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=u(1),d=u(0),f=z(r);if((f||!a)&&((F(r)!==`body`||B(o))&&(c=K(r)),f)){let e=X(r);l=Y(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=o&&!f&&!a?Ae(o,c):u(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-c.scrollTop*l.y+d.y+p.y}}function Me(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ne(e){let t=K(e),n=e.ownerDocument.body,r=s(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=s(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Z(e),o=-t.scrollTop;return G(n).direction===`rtl`&&(a+=s(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Pe=25;function Fe(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=I(e),a=L(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Se()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Z(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Pe&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ie(e,t){let n=X(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Y(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Le(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Fe(e,n,t);else if(t===`document`)r=Ne(L(e));else if(R(t))r=Ie(t,n);else{let n=Oe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return M(r)}function Re(e,t){let n=t.get(e);if(n)return n;let r=J(e,[],!1).filter(e=>R(e)&&F(e)!==`body`),i=null,a=G(e).position===`fixed`,o=a?q(e):e;for(;R(o)&&!W(o);){let e=G(o),t=U(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=q(o)}return t.set(e,r),r}function ze(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?V(t)?[]:Re(t,this._c):[].concat(n),r],c=Le(t,a[0],i),l=c.top,u=c.right,d=c.bottom,f=c.left;for(let e=1;e<a.length;e++){let n=Le(t,a[e],i);l=s(n.top,l),u=o(n.right,u),d=o(n.bottom,d),f=s(n.left,f)}return{width:u-f,height:d-l,x:f,y:l}}function Be(e){let{width:t,height:n}=Te(e);return{width:t,height:n}}function Ve(e,t,n){let r=z(t),i=L(t),a=n===`fixed`,o=X(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=u(0);
vendor: 4,186 bytes, line 1
1if((r||!a)&&((F(t)!==`body`||B(i))&&(s=K(t)),r)){let e=X(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Z(i));let l=i&&!r&&!a?Ae(i,s):u(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function He(e){return G(e).position===`static`}function Ue(e,t){if(!z(e)||G(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return L(e)===n&&(n=n.ownerDocument.body),n}function We(e,t){let n=I(e);if(V(e))return n;if(!z(e)){let t=q(e);for(;t&&!W(t);){if(R(t)&&!He(t))return t;t=q(t)}return n}let r=Ue(e,t);for(;r&&_e(r)&&He(r);)r=Ue(r,t);return r&&W(r)&&He(r)&&!U(r)?n:r||xe(e)||n}var Ge=async function(e){let t=this.getOffsetParent||We,n=this.getDimensions,r=await n(e.floating);return{reference:Ve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ke(e){return G(e).direction===`rtl`}var qe={convertOffsetParentRelativeRectToViewportRelativeRect:je,getDocumentElement:L,getClippingRect:ze,getOffsetParent:We,getElementRects:Ge,getClientRects:Me,getDimensions:Be,getScale:Y,isElement:R,isRTL:Ke};function Je(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ye(e,t,n){let r=null,i,a=L(e);function c(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function u(n,d){n===void 0&&(n=!1),d===void 0&&(d=1),c();let f=e.getBoundingClientRect(),{left:p,top:m,width:h,height:g}=f;if(n||t(),!h||!g)return;let _=l(m),v=l(a.clientWidth-(p+h)),y=l(a.clientHeight-(m+g)),b=l(p),x={rootMargin:-_+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:s(0,o(1,d))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!Je(f,e.getBoundingClientRect()))return u();if(n!==d){if(!S)return u();n?u(!1,n):i=setTimeout(()=>{u(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}let d=I(e),f=()=>u(n);return d.addEventListener(`resize`,f),u(!0),()=>{d.removeEventListener(`resize`,f),c()}}function Xe(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ee(e),u=i||a?[...l?J(l):[],...t?J(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ye(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?X(e):null;c&&g();function g(){let t=X(e);h&&!Je(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ze=fe,Qe=pe,$e=re,et=me,tt=oe,nt=le,rt=(e,t,n)=>{let r=new Map,i=n??{},a={...qe,...i.platform,_c:r};return ne(e,t,{...i,platform:a})},it=e(r(),1),Q=typeof document<`u`?i.useLayoutEffect:function(){};function $(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!$(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function at(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ot(e,t){let n=at(e);return Math.round(t*n)/n}function st(e){let t=i.useRef(e);return Q(()=>{t.current=e}),t}function ct(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:a,elements:{reference:o,floating:s}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=i.useState(r);$(p,r)||m(r);let[h,g]=i.useState(null),[_,v]=i.useState(null),y=i.useCallback(e=>
1{e!==C.current&&(C.current=e,g(e))},[]),b=i.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=o||h,S=s||_,C=i.useRef(null),w=i.useRef(null),T=i.useRef(d),E=l!=null,D=st(l),O=st(a),k=st(u),A=i.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),rt(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!$(T.current,t)&&(T.current=t,it.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);Q(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let j=i.useRef(!1);Q(()=>(j.current=!0,()=>{j.current=!1}),[]),Q(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=i.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=i.useMemo(()=>({reference:x,floating:S}),[x,S]),ee=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=ot(N.floating,d.x),r=ot(N.floating,d.y);return c?{...e,transform:`translate(`+t+`px, `+r+`px)`,...at(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,c,N.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:A,refs:M,elements:N,floatingStyles:ee}),[d,A,M,N,ee])}var lt=(e,t)=>{let n=Ze(e);return{name:n.name,fn:n.fn,options:[e,t]}},ut=(e,t)=>{let n=Qe(e);return{name:n.name,fn:n.fn,options:[e,t]}},dt=(e,t)=>{let n=$e(e);return{name:n.name,fn:n.fn,options:[e,t]}},ft=(e,t)=>{let n=et(e);return{name:n.name,fn:n.fn,options:[e,t]}},pt=(e,t)=>{let n=tt(e);return{name:n.name,fn:n.fn,options:[e,t]}},mt=(e,t)=>{let n=nt(e);return{name:n.name,fn:n.fn,options:[e,t]}};function ht(e,t,n=!0){let r=(0,i.useEffectEvent)(n=>{let r=Array.isArray(e)?e:[e];for(let e of r){let t=e instanceof Element?e:e?.current;if(t&&(t===n.target||t===document.activeElement||t.contains(n.target)||t.contains(document.activeElement)))return}t(n)});(0,i.useEffect)(()=>n?(document.addEventListener(`click`,r),()=>{document.removeEventListener(`click`,r)}):()=>null,[n])}var gt=({container:e,children:t})=>e===null?t:(0,it.createPortal)(t,e??document.body),_t=n(),vt=({isOpen:e,onClose:t,reference:n,popoverElement:r,placement:a=`bottom`,offset:o,strategy:s=`fixed`,flip:c=!0,container:l,matchReferenceWidth:u=!1,closeOnClickOutside:d=!0,children:f})=>{let{placement:p,update:m,refs:h,floatingStyles:g,middlewareData:_,elements:v}=ct({elements:{reference:n,floating:r},placement:a,strategy:s,whileElementsMounted:Xe,middleware:[lt(o),mt(),ut(),c?dt():null,u?ft({apply({rects:e,elements:t}){Object.assign(t.floating.style,{minWidth:`${e.reference.width}px`})}}):null,pt()]});return ht([v.floating,v.reference instanceof Element?v.reference:null],e=>{t(e)},e&&d),(0,i.useEffect)(()=>{if(!e)return()=>null;function n(e){e.key===`Escape`&&t(e)}return document.addEventListener(`keyup`,n),()=>{document.removeEventListener(`keyup`,n)}},[e,t]),e?(0,_t.jsx)(gt,{container:l,children:f({placement:p,update:m,props:{ref:r?void 0:h.setFloating,style:g,"data-popover-placement":p,"data-popover-reference-hidden":_.hide?.referenceHidden,"data-popover-escaped":_.hide?.escaped}})}):null};export{Xe as n,vt as t};
2//# sourceMappingURL=popover-CMoU7E4P.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.