forked from sent/waves
1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
"use strict";(self.webpackChunkcrazygames_gameframe=self.webpackChunkcrazygames_gameframe||[]).push([[859],{80859:(e,t,n)=>{n.d(t,{Z:()=>Ce});var r=n(87462),o=n(63366),i=n(47313),a=n(47472),s=n(2678),f=n(49081);function c(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function p(e){return e instanceof c(e).Element||e instanceof Element}function u(e){return e instanceof c(e).HTMLElement||e instanceof HTMLElement}function l(e){return"undefined"!==typeof ShadowRoot&&(e instanceof c(e).ShadowRoot||e instanceof ShadowRoot)}var d=Math.max,m=Math.min,h=Math.round;function v(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function y(){return!/^((?!chrome|android).)*safari/i.test(v())}function g(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&u(e)&&(o=e.offsetWidth>0&&h(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&h(r.height)/e.offsetHeight||1);var a=(p(e)?c(e):window).visualViewport,s=!y()&&n,f=(r.left+(s&&a?a.offsetLeft:0))/o,l=(r.top+(s&&a?a.offsetTop:0))/i,d=r.width/o,m=r.height/i;return{width:d,height:m,top:l,right:f+d,bottom:l+m,left:f,x:f,y:l}}function b(e){var t=c(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function w(e){return e?(e.nodeName||"").toLowerCase():null}function x(e){return((p(e)?e.ownerDocument:e.document)||window.document).documentElement}function O(e){return g(x(e)).left+b(e).scrollLeft}function j(e){return c(e).getComputedStyle(e)}function E(e){var t=j(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function P(e,t,n){void 0===n&&(n=!1);var r=u(t),o=u(t)&&function(e){var t=e.getBoundingClientRect(),n=h(t.width)/e.offsetWidth||1,r=h(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=x(t),a=g(e,o,n),s={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(r||!r&&!n)&&(("body"!==w(t)||E(i))&&(s=function(e){return e!==c(e)&&u(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:b(e);var t}(t)),u(t)?((f=g(t,!0)).x+=t.clientLeft,f.y+=t.clientTop):i&&(f.x=O(i))),{x:a.left+s.scrollLeft-f.x,y:a.top+s.scrollTop-f.y,width:a.width,height:a.height}}function D(e){var t=g(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function R(e){return"html"===w(e)?e:e.assignedSlot||e.parentNode||(l(e)?e.host:null)||x(e)}function k(e){return["html","body","#document"].indexOf(w(e))>=0?e.ownerDocument.body:u(e)&&E(e)?e:k(R(e))}function A(e,t){var n;void 0===t&&(t=[]);var r=k(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=c(r),a=o?[i].concat(i.visualViewport||[],E(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(A(R(a)))}function M(e){return["table","td","th"].indexOf(w(e))>=0}function Z(e){return u(e)&&"fixed"!==j(e).position?e.offsetParent:null}function L(e){for(var t=c(e),n=Z(e);n&&M(n)&&"static"===j(n).position;)n=Z(n);return n&&("html"===w(n)||"body"===w(n)&&"static"===j(n).position)?t:n||function(e){var t=/firefox/i.test(v());if(/Trident/i.test(v())&&u(e)&&"fixed"===j(e).position)return null;var n=R(e);for(l(n)&&(n=n.host);u(n)&&["html","body"].indexOf(w(n))<0;){var r=j(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var W="top",T="bottom",B="right",H="left",S="auto",C=[W,T,B,H],V="start",q="end",N="viewport",U="popper",I=C.reduce((function(e,t){return e.concat([t+"-"+V,t+"-"+q])}),[]),z=[].concat(C,[S]).reduce((function(e,t){return e.concat([t,t+"-"+V,t+"-"+q])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function X(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Y={placement:"bottom",modifiers:[],strategy:"absolute"};function G(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function J(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Y:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Y,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,f={state:o,setOptions:function(n){var s="function"===typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:p(e)?A(e):e.contextElement?A(e.contextElement):[],popper:A(t)};var u=function(e){var t=_(e);return F.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=u.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"===typeof i){var s=i({state:o,name:t,instance:f,options:r}),c=function(){};a.push(s||c)}})),f.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(G(t,n)){o.rects={reference:P(t,L(n),"fixed"===o.options.strategy),popper:D(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,p=void 0===c?{}:c,u=i.name;"function"===typeof a&&(o=a({state:o,options:p,name:u,instance:f})||o)}else o.reset=!1,r=-1}}},update:X((function(){return new Promise((function(e){f.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!G(e,t))return f;function c(){a.forEach((function(e){return e()})),a=[]}return f.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),f}}var K={passive:!0};function Q(e){return e.split("-")[0]}function $(e){return e.split("-")[1]}function ee(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function te(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Q(o):null,a=o?$(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case W:t={x:s,y:n.y-r.height};break;case T:t={x:s,y:n.y+n.height};break;case B:t={x:n.x+n.width,y:f};break;case H:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?ee(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case V:t[c]=t[c]-(n[p]/2-r[p]/2);break;case q:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}var ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,f=e.gpuAcceleration,p=e.adaptive,u=e.roundOffsets,l=e.isFixed,d=a.x,m=void 0===d?0:d,v=a.y,y=void 0===v?0:v,g="function"===typeof u?u({x:m,y:y}):{x:m,y:y};m=g.x,y=g.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),O=H,E=W,P=window;if(p){var D=L(n),R="clientHeight",k="clientWidth";if(D===c(n)&&"static"!==j(D=x(n)).position&&"absolute"===s&&(R="scrollHeight",k="scrollWidth"),o===W||(o===H||o===B)&&i===q)E=T,y-=(l&&D===P&&P.visualViewport?P.visualViewport.height:D[R])-r.height,y*=f?1:-1;if(o===H||(o===W||o===T)&&i===q)O=B,m-=(l&&D===P&&P.visualViewport?P.visualViewport.width:D[k])-r.width,m*=f?1:-1}var A,M=Object.assign({position:s},p&&ne),Z=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:h(t*r)/r||0,y:h(n*r)/r||0}}({x:m,y:y}):{x:m,y:y};return m=Z.x,y=Z.y,f?Object.assign({},M,((A={})[E]=w?"0":"",A[O]=b?"0":"",A.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",A)):Object.assign({},M,((t={})[E]=w?y+"px":"",t[O]=b?m+"px":"",t.transform="",t))}const oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=z.reduce((function(e,n){return e[n]=function(e,t,n){var r=Q(e),o=[H,W].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[H,B].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var ie={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&l(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function pe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ue(e,t,n){return t===N?pe(function(e,t){var n=c(e),r=x(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,f=0;if(o){i=o.width,a=o.height;var p=y();(p||!p&&"fixed"===t)&&(s=o.offsetLeft,f=o.offsetTop)}return{width:i,height:a,x:s+O(e),y:f}}(e,n)):p(t)?function(e,t){var n=g(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):pe(function(e){var t,n=x(e),r=b(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=d(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=d(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+O(e),f=-r.scrollTop;return"rtl"===j(o||n).direction&&(s+=d(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}(x(e)))}function le(e,t,n,r){var o="clippingParents"===t?function(e){var t=A(R(e)),n=["absolute","fixed"].indexOf(j(e).position)>=0&&u(e)?L(e):e;return p(n)?t.filter((function(e){return p(e)&&ce(e,n)&&"body"!==w(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=ue(e,n,r);return t.top=d(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=d(o.left,t.left),t}),ue(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function de(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function me(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function he(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,f=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?N:c,l=n.elementContext,d=void 0===l?U:l,m=n.altBoundary,h=void 0!==m&&m,v=n.padding,y=void 0===v?0:v,b=de("number"!==typeof y?y:me(y,C)),w=d===U?"reference":U,O=e.rects.popper,j=e.elements[h?w:d],E=le(p(j)?j:j.contextElement||x(e.elements.popper),f,u,a),P=g(e.elements.reference),D=te({reference:P,element:O,strategy:"absolute",placement:o}),R=pe(Object.assign({},O,D)),k=d===U?R:P,A={top:E.top-k.top+b.top,bottom:k.bottom-E.bottom+b.bottom,left:E.left-k.left+b.left,right:k.right-E.right+b.right},M=e.modifiersData.offset;if(d===U&&M){var Z=M[o];Object.keys(A).forEach((function(e){var t=[B,T].indexOf(e)>=0?1:-1,n=[W,T].indexOf(e)>=0?"y":"x";A[e]+=Z[n]*t}))}return A}function ve(e,t,n){return d(e,m(t,n))}const ye={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,f=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,l=n.tether,h=void 0===l||l,v=n.tetherOffset,y=void 0===v?0:v,g=he(t,{boundary:f,rootBoundary:c,padding:u,altBoundary:p}),b=Q(t.placement),w=$(t.placement),x=!w,O=ee(b),j="x"===O?"y":"x",E=t.modifiersData.popperOffsets,P=t.rects.reference,R=t.rects.popper,k="function"===typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,A="number"===typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Z={x:0,y:0};if(E){if(i){var S,C="y"===O?W:H,q="y"===O?T:B,N="y"===O?"height":"width",U=E[O],I=U+g[C],z=U-g[q],F=h?-R[N]/2:0,_=w===V?P[N]:R[N],X=w===V?-R[N]:-P[N],Y=t.elements.arrow,G=h&&Y?D(Y):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=J[C],te=J[q],ne=ve(0,P[N],G[N]),re=x?P[N]/2-F-ne-K-A.mainAxis:_-ne-K-A.mainAxis,oe=x?-P[N]/2+F+ne+te+A.mainAxis:X+ne+te+A.mainAxis,ie=t.elements.arrow&&L(t.elements.arrow),ae=ie?"y"===O?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(S=null==M?void 0:M[O])?S:0,fe=U+oe-se,ce=ve(h?m(I,U+re-se-ae):I,U,h?d(z,fe):z);E[O]=ce,Z[O]=ce-U}if(s){var pe,ue="x"===O?W:H,le="x"===O?T:B,de=E[j],me="y"===j?"height":"width",ye=de+g[ue],ge=de-g[le],be=-1!==[W,H].indexOf(b),we=null!=(pe=null==M?void 0:M[j])?pe:0,xe=be?ye:de-P[me]-R[me]-we+A.altAxis,Oe=be?de+P[me]+R[me]-we-A.altAxis:ge,je=h&&be?function(e,t,n){var r=ve(e,t,n);return r>n?n:r}(xe,de,Oe):ve(h?xe:ye,de,h?Oe:ge);E[j]=je,Z[j]=je-de}t.modifiersData[r]=Z}},requiresIfExists:["offset"]};const ge={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Q(n.placement),f=ee(s),c=[H,B].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return de("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:me(e,C))}(o.padding,n),u=D(i),l="y"===f?W:H,d="y"===f?T:B,m=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],h=a[f]-n.rects.reference[f],v=L(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,g=m/2-h/2,b=p[l],w=y-u[c]-p[d],x=y/2-u[c]/2+g,O=ve(b,x,w),j=f;n.modifiersData[r]=((t={})[j]=O,t.centerOffset=O-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&ce(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function be(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function we(e){return[W,B,T,H].some((function(t){return e[t]>=0}))}var xe=J({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,f=c(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&p.forEach((function(e){e.addEventListener("scroll",n.update,K)})),s&&f.addEventListener("resize",n.update,K),function(){i&&p.forEach((function(e){e.removeEventListener("scroll",n.update,K)})),s&&f.removeEventListener("resize",n.update,K)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=te({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:Q(t.placement),variation:$(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];u(o)&&w(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});u(r)&&w(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},oe,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,m=void 0===d||d,h=n.allowedAutoPlacements,v=t.options.placement,y=Q(v),g=f||(y===v||!m?[ae(v)]:function(e){if(Q(e)===S)return[];var t=ae(e);return[fe(e),t,fe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(Q(n)===S?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?z:f,p=$(r),u=p?s?I:I.filter((function(e){return $(e)===p})):C,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=he(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Q(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,j=!0,E=b[0],P=0;P<b.length;P++){var D=b[P],R=Q(D),k=$(D)===V,A=[W,T].indexOf(R)>=0,M=A?"width":"height",Z=he(t,{placement:D,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),L=A?k?B:H:k?T:W;w[M]>x[M]&&(L=ae(L));var q=ae(L),N=[];if(i&&N.push(Z[R]<=0),s&&N.push(Z[L]<=0,Z[q]<=0),N.every((function(e){return e}))){E=D,j=!1;break}O.set(D,N)}if(j)for(var U=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},F=m?3:1;F>0;F--){if("break"===U(F))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ye,ge,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=he(t,{elementContext:"reference"}),s=he(t,{altBoundary:!0}),f=be(a,r),c=be(s,o,i),p=we(f),u=we(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}}]}),Oe=n(21921),je=n(12871),Ee=n(32298);function Pe(e){return(0,Ee.Z)("MuiPopperUnstyled",e)}(0,n(77430).Z)("MuiPopperUnstyled",["root"]);var De=n(55229),Re=n(46417);const ke=["anchorEl","children","component","components","componentsProps","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","TransitionProps"],Ae=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"];function Me(e){return"function"===typeof e?e():e}const Ze={},Le=i.forwardRef((function(e,t){var n;const{anchorEl:f,children:c,component:p,components:u={},componentsProps:l={},direction:d,disablePortal:m,modifiers:h,open:v,ownerState:y,placement:g,popperOptions:b,popperRef:w,TransitionProps:x}=e,O=(0,o.Z)(e,ke),j=i.useRef(null),E=(0,a.Z)(j,t),P=i.useRef(null),D=(0,a.Z)(P,w),R=i.useRef(D);(0,s.Z)((()=>{R.current=D}),[D]),i.useImperativeHandle(w,(()=>P.current),[]);const k=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(g,d),[A,M]=i.useState(k);i.useEffect((()=>{P.current&&P.current.forceUpdate()})),(0,s.Z)((()=>{if(!f||!v)return;Me(f);let e=[{name:"preventOverflow",options:{altBoundary:m}},{name:"flip",options:{altBoundary:m}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;M(t.placement)}}];null!=h&&(e=e.concat(h)),b&&null!=b.modifiers&&(e=e.concat(b.modifiers));const t=xe(Me(f),j.current,(0,r.Z)({placement:k},b,{modifiers:e}));return R.current(t),()=>{t.destroy(),R.current(null)}}),[f,m,h,v,b,k]);const Z={placement:A};null!==x&&(Z.TransitionProps=x);const L=(0,Oe.Z)({root:["root"]},Pe,{}),W=null!=(n=null!=p?p:u.Root)?n:"div",T=(0,De.Z)({elementType:W,externalSlotProps:l.root,externalForwardedProps:O,additionalProps:{role:"tooltip",ref:E},ownerState:(0,r.Z)({},e,y),className:L.root});return(0,Re.jsx)(W,(0,r.Z)({},T,{children:"function"===typeof c?c(Z):c}))})),We=i.forwardRef((function(e,t){const{anchorEl:n,children:a,container:s,direction:c="ltr",disablePortal:p=!1,keepMounted:u=!1,modifiers:l,open:d,placement:m="bottom",popperOptions:h=Ze,popperRef:v,style:y,transition:g=!1}=e,b=(0,o.Z)(e,Ae),[w,x]=i.useState(!0);if(!u&&!d&&(!g||w))return null;const O=s||(n?(0,f.Z)(Me(n)).body:void 0);return(0,Re.jsx)(je.Z,{disablePortal:p,container:O,children:(0,Re.jsx)(Le,(0,r.Z)({anchorEl:n,direction:c,disablePortal:p,modifiers:l,ref:t,open:g?!w:d,placement:m,popperOptions:h,popperRef:v},b,{style:(0,r.Z)({position:"fixed",top:0,left:0,display:d||!u||g&&!w?null:"none"},y),TransitionProps:g?{in:d,onEnter:()=>{x(!1)},onExited:()=>{x(!0)}}:null,children:a}))})}));var Te=n(14976),Be=n(42379),He=n(32772);const Se=(0,Be.ZP)(We,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ce=i.forwardRef((function(e,t){const n=(0,Te.Z)(),o=(0,He.Z)({props:e,name:"MuiPopper"});return(0,Re.jsx)(Se,(0,r.Z)({direction:null==n?void 0:n.direction},o,{ref:t}))}))}}]); |