1 line
27 KiB
JavaScript
1 line
27 KiB
JavaScript
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7563],{84069:(e,t,n)=>{n.d(t,{UE:()=>ec,ll:()=>ei,rD:()=>ed,UU:()=>ea,jD:()=>eu,ER:()=>es,cY:()=>eo,BN:()=>el,Ej:()=>ef});let r=["top","right","bottom","left"],i=Math.min,o=Math.max,l=Math.round,a=Math.floor,f=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function s(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function m(e){return"y"===e?"height":"width"}function g(e){return["top","bottom"].includes(d(e))?"y":"x"}function y(e){return e.replace(/start|end/g,e=>c[e])}function w(e){return e.replace(/left|right|bottom|top/g,e=>u[e])}function v(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function x(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 b(e,t,n){let r,{reference:i,floating:o}=e,l=g(t),a=h(g(t)),f=m(a),u=d(t),c="y"===l,s=i.x+i.width/2-o.width/2,y=i.y+i.height/2-o.height/2,w=i[f]/2-o[f]/2;switch(u){case"top":r={x:s,y:i.y-o.height};break;case"bottom":r={x:s,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:y};break;case"left":r={x:i.x-o.width,y:y};break;default:r={x:i.x,y:i.y}}switch(p(t)){case"start":r[a]-=w*(n&&c?-1:1);break;case"end":r[a]+=w*(n&&c?-1:1)}return r}let A=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),f=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:s}=b(u,r,f),d=r,p={},h=0;for(let n=0;n<a.length;n++){let{name:o,fn:m}=a[n],{x:g,y:y,data:w,reset:v}=await m({x:c,y:s,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:u,platform:l,elements:{reference:e,floating:t}});c=null!=g?g:c,s=null!=y?y:s,p={...p,[o]:{...p[o],...w}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(d=v.placement),v.rects&&(u=!0===v.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):v.rects),{x:c,y:s}=b(u,d,f)),n=-1)}return{x:c,y:s,placement:d,strategy:i,middlewareData:p}};async function R(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:l,elements:a,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=s(t,e),m=v(h),g=a[p?"floating"===d?"reference":"floating":d],y=x(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:f})),w="floating"===d?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,b=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),A=await (null==o.isElement?void 0:o.isElement(b))&&await (null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},R=x(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:f}):w);return{top:(y.top-R.top+m.top)/A.y,bottom:(R.bottom-y.bottom+m.bottom)/A.y,left:(y.left-R.left+m.left)/A.x,right:(R.right-y.right+m.right)/A.x}}function E(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function L(e){return r.some(t=>e[t]>=0)}async function S(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),l=d(n),a=p(n),f="y"===g(n),u=["left","top"].includes(l)?-1:1,c=o&&f?-1:1,h=s(t,e),{mainAxis:m,crossAxis:y,alignmentAxis:w}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof w&&(y="end"===a?-1*w:w),f?{x:y*c,y:m*u}:{x:m*u,y:y*c}}function T(){return"undefined"!=typeof window}function C(e){return N(e)?(e.nodeName||"").toLowerCase():"#document"}function O(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){var t;return null==(t=(N(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function N(e){return!!T()&&(e instanceof Node||e instanceof O(e).Node)}function D(e){return!!T()&&(e instanceof Element||e instanceof O(e).Element)}function j(e){return!!T()&&(e instanceof HTMLElement||e instanceof O(e).HTMLElement)}function k(e){return!!T()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof O(e).ShadowRoot)}function H(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function M(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function B(e){let t=F(),n=D(e)?z(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function F(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function W(e){return["html","body","#document"].includes(C(e))}function z(e){return O(e).getComputedStyle(e)}function U(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _(e){if("html"===C(e))return e;let t=e.assignedSlot||e.parentNode||k(e)&&e.host||P(e);return k(t)?t.host:t}function V(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=_(t);return W(n)?t.ownerDocument?t.ownerDocument.body:t.body:j(n)&&H(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=O(i);if(o){let e=Y(l);return t.concat(l,l.visualViewport||[],H(i)?i:[],e&&n?V(e):[])}return t.concat(i,V(i,[],n))}function Y(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $(e){let t=z(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=j(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,f=l(n)!==o||l(r)!==a;return f&&(n=o,r=a),{width:n,height:r,$:f}}function X(e){return D(e)?e:e.contextElement}function I(e){let t=X(e);if(!j(t))return f(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=$(t),a=(o?l(n.width):n.width)/r,u=(o?l(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}let G=f(0);function q(e){let t=O(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:G}function J(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),l=X(e),a=f(1);t&&(r?D(r)&&(a=I(r)):a=I(e));let u=(void 0===(i=n)&&(i=!1),r&&(!i||r===O(l))&&i)?q(l):f(0),c=(o.left+u.x)/a.x,s=(o.top+u.y)/a.y,d=o.width/a.x,p=o.height/a.y;if(l){let e=O(l),t=r&&D(r)?O(r):r,n=e,i=Y(n);for(;i&&r&&t!==n;){let e=I(i),t=i.getBoundingClientRect(),r=z(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,d*=e.x,p*=e.y,c+=o,s+=l,i=Y(n=O(i))}}return x({width:d,height:p,x:c,y:s})}function K(e,t){let n=U(e).scrollLeft;return t?t.left+n:J(P(e)).left+n}function Q(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=O(e),r=P(e),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,a=0,f=0;if(i){o=i.width,l=i.height;let e=F();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,f=i.offsetTop)}return{width:o,height:l,x:a,y:f}}(e,n);else if("document"===t)r=function(e){let t=P(e),n=U(e),r=e.ownerDocument.body,i=o(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=o(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+K(e),f=-n.scrollTop;return"rtl"===z(r).direction&&(a+=o(t.clientWidth,r.clientWidth)-i),{width:i,height:l,x:a,y:f}}(P(e));else if(D(t))r=function(e,t){let n=J(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=j(e)?I(e):f(1),l=e.clientWidth*o.x;return{width:l,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=q(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return x(r)}function Z(e){return"static"===z(e).position}function ee(e,t){if(!j(e)||"fixed"===z(e).position)return null;if(t)return t(e);let n=e.offsetParent;return P(e)===n&&(n=n.ownerDocument.body),n}function et(e,t){let n=O(e);if(M(e))return n;if(!j(e)){let t=_(e);for(;t&&!W(t);){if(D(t)&&!Z(t))return t;t=_(t)}return n}let r=ee(e,t);for(;r&&["table","td","th"].includes(C(r))&&Z(r);)r=ee(r,t);return r&&W(r)&&Z(r)&&!B(r)?n:r||function(e){let t=_(e);for(;j(t)&&!W(t);){if(B(t))return t;if(M(t))break;t=_(t)}return null}(e)||n}let en=async function(e){let t=this.getOffsetParent||et,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=j(t),i=P(t),o="fixed"===n,l=J(e,!0,o,t),a={scrollLeft:0,scrollTop:0},u=f(0);if(r||!r&&!o){if(("body"!==C(t)||H(i))&&(a=U(t)),r){let e=J(t,!0,o,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else i&&(u.x=K(i))}let c=0,s=0;if(i&&!r&&!o){let e=i.getBoundingClientRect();s=e.top+a.scrollTop,c=e.left+a.scrollLeft-K(i,e)}return{x:l.left+a.scrollLeft-u.x-c,y:l.top+a.scrollTop-u.y-s,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},er={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,l=P(r),a=!!t&&M(t.floating);if(r===l||a&&o)return n;let u={scrollLeft:0,scrollTop:0},c=f(1),s=f(0),d=j(r);if((d||!d&&!o)&&(("body"!==C(r)||H(l))&&(u=U(r)),j(r))){let e=J(r);c=I(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+s.x,y:n.y*c.y-u.scrollTop*c.y+s.y}},getDocumentElement:P,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e,a=[..."clippingAncestors"===n?M(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=V(e,[],!1).filter(e=>D(e)&&"body"!==C(e)),i=null,o="fixed"===z(e).position,l=o?_(e):e;for(;D(l)&&!W(l);){let t=z(l),n=B(l);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||H(l)&&!n&&function e(t,n){let r=_(t);return!(r===n||!D(r)||W(r))&&("fixed"===z(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):i=t,l=_(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],f=a[0],u=a.reduce((e,n)=>{let r=Q(t,n,l);return e.top=o(r.top,e.top),e.right=i(r.right,e.right),e.bottom=i(r.bottom,e.bottom),e.left=o(r.left,e.left),e},Q(t,f,l));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:et,getElementRects:en,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=$(e);return{width:t,height:n}},getScale:I,isElement:D,isRTL:function(e){return"rtl"===z(e).direction}};function ei(e,t,n,r){let l;void 0===r&&(r={});let{ancestorScroll:f=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,p=X(e),h=f||u?[...p?V(p):[],...V(t)]:[];h.forEach(e=>{f&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let m=p&&s?function(e,t){let n,r=null,l=P(e);function f(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function u(c,s){void 0===c&&(c=!1),void 0===s&&(s=1),f();let{left:d,top:p,width:h,height:m}=e.getBoundingClientRect();if(c||t(),!h||!m)return;let g=a(p),y=a(l.clientWidth-(d+h)),w={rootMargin:-g+"px "+-y+"px "+-a(l.clientHeight-(p+m))+"px "+-a(d)+"px",threshold:o(0,i(1,s))||1},v=!0;function x(e){let t=e[0].intersectionRatio;if(t!==s){if(!v)return u();t?u(!1,t):n=setTimeout(()=>{u(!1,1e-7)},1e3)}v=!1}try{r=new IntersectionObserver(x,{...w,root:l.ownerDocument})}catch(e){r=new IntersectionObserver(x,w)}r.observe(e)}(!0),f}(p,n):null,g=-1,y=null;c&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),p&&!d&&y.observe(p),y.observe(t));let w=d?J(e):null;return d&&function t(){let r=J(e);w&&(r.x!==w.x||r.y!==w.y||r.width!==w.width||r.height!==w.height)&&n(),w=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{f&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(l)}}let eo=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:o,placement:l,middlewareData:a}=t,f=await S(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}},el=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:l}=t,{mainAxis:a=!0,crossAxis:f=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=s(e,t),p={x:n,y:r},m=await R(t,c),y=g(d(l)),w=h(y),v=p[w],x=p[y];if(a){let e="y"===w?"top":"left",t="y"===w?"bottom":"right",n=v+m[e],r=v-m[t];v=o(n,i(v,r))}if(f){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=x+m[e],r=x-m[t];x=o(n,i(x,r))}let b=u.fn({...t,[w]:v,[y]:x});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[w]:a,[y]:f}}}}}},ea=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o,l;let{placement:a,middlewareData:f,rects:u,initialPlacement:c,platform:v,elements:x}=t,{mainAxis:b=!0,crossAxis:A=!0,fallbackPlacements:E,fallbackStrategy:L="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:T=!0,...C}=s(e,t);if(null!=(n=f.arrow)&&n.alignmentOffset)return{};let O=d(a),P=g(c),N=d(c)===c,D=await (null==v.isRTL?void 0:v.isRTL(x.floating)),j=E||(N||!T?[w(c)]:function(e){let t=w(e);return[y(e),t,y(t)]}(c)),k="none"!==S;!E&&k&&j.push(...function(e,t,n,r){let i=p(e),o=function(e,t,n){let r=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":if(n)return t?i:r;return t?r:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(d(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(y)))),o}(c,T,S,D));let H=[c,...j],M=await R(t,C),B=[],F=(null==(r=f.flip)?void 0:r.overflows)||[];if(b&&B.push(M[O]),A){let e=function(e,t,n){void 0===n&&(n=!1);let r=p(e),i=h(g(e)),o=m(i),l="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=w(l)),[l,w(l)]}(a,u,D);B.push(M[e[0]],M[e[1]])}if(F=[...F,{placement:a,overflows:B}],!B.every(e=>e<=0)){let e=((null==(i=f.flip)?void 0:i.index)||0)+1,t=H[e];if(t)return{data:{index:e,overflows:F},reset:{placement:t}};let n=null==(o=F.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(L){case"bestFit":{let e=null==(l=F.filter(e=>{if(k){let t=g(e.placement);return t===P||"y"===t}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])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=c}if(a!==n)return{reset:{placement:n}}}return{}}}},ef=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let l,a;let{placement:f,rects:u,platform:c,elements:h}=t,{apply:m=()=>{},...y}=s(e,t),w=await R(t,y),v=d(f),x=p(f),b="y"===g(f),{width:A,height:E}=u.floating;"top"===v||"bottom"===v?(l=v,a=x===(await (null==c.isRTL?void 0:c.isRTL(h.floating))?"start":"end")?"left":"right"):(a=v,l="end"===x?"top":"bottom");let L=E-w.top-w.bottom,S=A-w.left-w.right,T=i(E-w[l],L),C=i(A-w[a],S),O=!t.middlewareData.shift,P=T,N=C;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(N=S),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(P=L),O&&!x){let e=o(w.left,0),t=o(w.right,0),n=o(w.top,0),r=o(w.bottom,0);b?N=A-2*(0!==e||0!==t?e+t:o(w.left,w.right)):P=E-2*(0!==n||0!==r?n+r:o(w.top,w.bottom))}await m({...t,availableWidth:N,availableHeight:P});let D=await c.getDimensions(h.floating);return A!==D.width||E!==D.height?{reset:{rects:!0}}:{}}}},eu=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...i}=s(e,t);switch(r){case"referenceHidden":{let e=E(await R(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:L(e)}}}case"escaped":{let e=E(await R(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:L(e)}}}default:return{}}}}},ec=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:l,rects:a,platform:f,elements:u,middlewareData:c}=t,{element:d,padding:y=0}=s(e,t)||{};if(null==d)return{};let w=v(y),x={x:n,y:r},b=h(g(l)),A=m(b),R=await f.getDimensions(d),E="y"===b,L=E?"clientHeight":"clientWidth",S=a.reference[A]+a.reference[b]-x[b]-a.floating[A],T=x[b]-a.reference[b],C=await (null==f.getOffsetParent?void 0:f.getOffsetParent(d)),O=C?C[L]:0;O&&await (null==f.isElement?void 0:f.isElement(C))||(O=u.floating[L]||a.floating[A]);let P=O/2-R[A]/2-1,N=i(w[E?"top":"left"],P),D=i(w[E?"bottom":"right"],P),j=O-R[A]-D,k=O/2-R[A]/2+(S/2-T/2),H=o(N,i(k,j)),M=!c.arrow&&null!=p(l)&&k!==H&&a.reference[A]/2-(k<N?N:D)-R[A]/2<0,B=M?k<N?k-N:k-j:0;return{[b]:x[b]+B,data:{[b]:H,centerOffset:k-H-B,...M&&{alignmentOffset:B}},reset:M}}}),es=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:a=0,mainAxis:f=!0,crossAxis:u=!0}=s(e,t),c={x:n,y:r},p=g(i),m=h(p),y=c[m],w=c[p],v=s(a,t),x="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(f){let e="y"===m?"height":"width",t=o.reference[m]-o.floating[e]+x.mainAxis,n=o.reference[m]+o.reference[e]-x.mainAxis;y<t?y=t:y>n&&(y=n)}if(u){var b,A;let e="y"===m?"width":"height",t=["top","left"].includes(d(i)),n=o.reference[p]-o.floating[e]+(t&&(null==(b=l.offset)?void 0:b[p])||0)+(t?0:x.crossAxis),r=o.reference[p]+o.reference[e]+(t?0:(null==(A=l.offset)?void 0:A[p])||0)-(t?x.crossAxis:0);w<n?w=n:w>r&&(w=r)}return{[m]:y,[p]:w}}}},ed=(e,t,n)=>{let r=new Map,i={platform:er,...n},o={...i.platform,_c:r};return A(e,t,{...i,platform:o})}},9895:(e,t,n)=>{n.d(t,{BN:()=>h,ER:()=>m,Ej:()=>y,UE:()=>v,UU:()=>g,cY:()=>p,jD:()=>w,we:()=>s});var r=n(84069),i=n(20107),o=n(25642),l="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function a(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!a(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!a(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function f(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u(e,t){let n=f(e);return Math.round(t*n)/n}function c(e){let t=i.useRef(e);return l(()=>{t.current=e}),t}function s(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:d,elements:{reference:p,floating:h}={},transform:m=!0,whileElementsMounted:g,open:y}=e,[w,v]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,b]=i.useState(s);a(x,s)||b(s);let[A,R]=i.useState(null),[E,L]=i.useState(null),S=i.useCallback(e=>{e!==P.current&&(P.current=e,R(e))},[]),T=i.useCallback(e=>{e!==N.current&&(N.current=e,L(e))},[]),C=p||A,O=h||E,P=i.useRef(null),N=i.useRef(null),D=i.useRef(w),j=null!=g,k=c(g),H=c(d),M=c(y),B=i.useCallback(()=>{if(!P.current||!N.current)return;let e={placement:t,strategy:n,middleware:x};H.current&&(e.platform=H.current),(0,r.rD)(P.current,N.current,e).then(e=>{let t={...e,isPositioned:!1!==M.current};F.current&&!a(D.current,t)&&(D.current=t,o.flushSync(()=>{v(t)}))})},[x,t,n,H,M]);l(()=>{!1===y&&D.current.isPositioned&&(D.current.isPositioned=!1,v(e=>({...e,isPositioned:!1})))},[y]);let F=i.useRef(!1);l(()=>(F.current=!0,()=>{F.current=!1}),[]),l(()=>{if(C&&(P.current=C),O&&(N.current=O),C&&O){if(k.current)return k.current(C,O,B);B()}},[C,O,B,k,j]);let W=i.useMemo(()=>({reference:P,floating:N,setReference:S,setFloating:T}),[S,T]),z=i.useMemo(()=>({reference:C,floating:O}),[C,O]),U=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!z.floating)return e;let t=u(z.floating,w.x),r=u(z.floating,w.y);return m?{...e,transform:"translate("+t+"px, "+r+"px)",...f(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,m,z.floating,w.x,w.y]);return i.useMemo(()=>({...w,update:B,refs:W,elements:z,floatingStyles:U}),[w,B,W,z,U])}let d=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:i}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.UE)({element:n.current,padding:i}).fn(t):{}:n?(0,r.UE)({element:n,padding:i}).fn(t):{}}}),p=(e,t)=>({...(0,r.cY)(e),options:[e,t]}),h=(e,t)=>({...(0,r.BN)(e),options:[e,t]}),m=(e,t)=>({...(0,r.ER)(e),options:[e,t]}),g=(e,t)=>({...(0,r.UU)(e),options:[e,t]}),y=(e,t)=>({...(0,r.Ej)(e),options:[e,t]}),w=(e,t)=>({...(0,r.jD)(e),options:[e,t]}),v=(e,t)=>({...d(e),options:[e,t]})},54379:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(20107),i=n(20475);function o(e,t=[]){let n=[],l=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return l.scopeName=e,[function(t,o){let l=r.createContext(o),a=n.length;function f(t){let{scope:n,children:o,...f}=t,u=n?.[e][a]||l,c=r.useMemo(()=>f,Object.values(f));return(0,i.jsx)(u.Provider,{value:c,children:o})}return n=[...n,o],f.displayName=t+"Provider",[f,function(n,i){let f=i?.[e][a]||l,u=r.useContext(f);if(u)return u;if(void 0!==o)return o;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}(l,...t)]}},57563:(e,t,n)=>{n.d(t,{Mz:()=>j,i3:()=>H,UC:()=>k,bL:()=>D,Bk:()=>g});var r=n(20107),i=n(9895),o=n(84069),l=n(34544),a=n(20475),f=r.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,a.jsx)(l.sG.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,a.jsx)("polygon",{points:"0,0 30,0 15,10"})})});f.displayName="Arrow";var u=n(64236),c=n(54379),s=n(46774),d=n(54122),p=n(63620),h="Popper",[m,g]=(0,c.A)(h),[y,w]=m(h),v=e=>{let{__scopePopper:t,children:n}=e,[i,o]=r.useState(null);return(0,a.jsx)(y,{scope:t,anchor:i,onAnchorChange:o,children:n})};v.displayName=h;var x="PopperAnchor",b=r.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:i,...o}=e,f=w(x,n),c=r.useRef(null),s=(0,u.s)(t,c);return r.useEffect(()=>{f.onAnchorChange((null==i?void 0:i.current)||c.current)}),i?null:(0,a.jsx)(l.sG.div,{...o,ref:s})});b.displayName=x;var A="PopperContent",[R,E]=m(A),L=r.forwardRef((e,t)=>{var n,f,c,h,m,g,y,v;let{__scopePopper:x,side:b="bottom",sideOffset:E=0,align:L="center",alignOffset:S=0,arrowPadding:T=0,avoidCollisions:C=!0,collisionBoundary:D=[],collisionPadding:j=0,sticky:k="partial",hideWhenDetached:H=!1,updatePositionStrategy:M="optimized",onPlaced:B,...F}=e,W=w(A,x),[z,U]=r.useState(null),_=(0,u.s)(t,e=>U(e)),[V,Y]=r.useState(null),$=(0,p.X)(V),X=null!==(y=null==$?void 0:$.width)&&void 0!==y?y:0,I=null!==(v=null==$?void 0:$.height)&&void 0!==v?v:0,G="number"==typeof j?j:{top:0,right:0,bottom:0,left:0,...j},q=Array.isArray(D)?D:[D],J=q.length>0,K={padding:G,boundary:q.filter(O),altBoundary:J},{refs:Q,floatingStyles:Z,placement:ee,isPositioned:et,middlewareData:en}=(0,i.we)({strategy:"fixed",placement:b+("center"!==L?"-"+L:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.ll)(...t,{animationFrame:"always"===M})},elements:{reference:W.anchor},middleware:[(0,i.cY)({mainAxis:E+I,alignmentAxis:S}),C&&(0,i.BN)({mainAxis:!0,crossAxis:!1,limiter:"partial"===k?(0,i.ER)():void 0,...K}),C&&(0,i.UU)({...K}),(0,i.Ej)({...K,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:i}=e,{width:o,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(i,"px")),a.setProperty("--radix-popper-anchor-width","".concat(o,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),V&&(0,i.UE)({element:V,padding:T}),P({arrowWidth:X,arrowHeight:I}),H&&(0,i.jD)({strategy:"referenceHidden",...K})]}),[er,ei]=N(ee),eo=(0,s.c)(B);(0,d.N)(()=>{et&&(null==eo||eo())},[et,eo]);let el=null===(n=en.arrow)||void 0===n?void 0:n.x,ea=null===(f=en.arrow)||void 0===f?void 0:f.y,ef=(null===(c=en.arrow)||void 0===c?void 0:c.centerOffset)!==0,[eu,ec]=r.useState();return(0,d.N)(()=>{z&&ec(window.getComputedStyle(z).zIndex)},[z]),(0,a.jsx)("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:et?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eu,"--radix-popper-transform-origin":[null===(h=en.transformOrigin)||void 0===h?void 0:h.x,null===(m=en.transformOrigin)||void 0===m?void 0:m.y].join(" "),...(null===(g=en.hide)||void 0===g?void 0:g.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,a.jsx)(R,{scope:x,placedSide:er,onArrowChange:Y,arrowX:el,arrowY:ea,shouldHideArrow:ef,children:(0,a.jsx)(l.sG.div,{"data-side":er,"data-align":ei,...F,ref:_,style:{...F.style,animation:et?void 0:"none"}})})})});L.displayName=A;var S="PopperArrow",T={top:"bottom",right:"left",bottom:"top",left:"right"},C=r.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=E(S,n),o=T[i.placedSide];return(0,a.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,a.jsx)(f,{...r,ref:t,style:{...r.style,display:"block"}})})});function O(e){return null!==e}C.displayName=S;var P=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,l;let{placement:a,rects:f,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,s=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[p,h]=N(a),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(o=null===(r=u.arrow)||void 0===r?void 0:r.x)&&void 0!==o?o:0)+s/2,y=(null!==(l=null===(i=u.arrow)||void 0===i?void 0:i.y)&&void 0!==l?l:0)+d/2,w="",v="";return"bottom"===p?(w=c?m:"".concat(g,"px"),v="".concat(-d,"px")):"top"===p?(w=c?m:"".concat(g,"px"),v="".concat(f.floating.height+d,"px")):"right"===p?(w="".concat(-d,"px"),v=c?m:"".concat(y,"px")):"left"===p&&(w="".concat(f.floating.width+d,"px"),v=c?m:"".concat(y,"px")),{data:{x:w,y:v}}}});function N(e){let[t,n="center"]=e.split("-");return[t,n]}var D=v,j=b,k=L,H=C},63620:(e,t,n)=>{n.d(t,{X:()=>o});var r=n(20107),i=n(54122);function o(e){let[t,n]=r.useState(void 0);return(0,i.N)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}}}]); |