@floating-ui-legacy-82e00343.js 20 KB

12
  1. !function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var t,e={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof x?e:x,i=Object.create(o.prototype),c=new D(n||[]);return a(i,"_invoke",{value:j(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",g={};function x(){}function w(){}function b(){}var L={};s(L,u,(function(){return this}));var E=Object.getPrototypeOf,O=E&&E(E(_([])));O&&O!==o&&i.call(O,u)&&(L=O);var S=b.prototype=x.prototype=Object.create(L);function k(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(o,a,c,u){var f=p(t[o],t,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==n(s)&&i.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(s).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,u)}))}u(f.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function j(e,r,n){var o=y;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var f=p(e,r,n);if("normal"===f.type){if(o=n.done?m:d,f.arg===g)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=m,n.method="throw",n.arg=f.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(R,this),this.reset(!0)}function _(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return w.prototype=b,a(S,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(T.prototype),s(T.prototype,f,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new T(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),s(S,l,"Generator"),s(S,u,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=_,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:_(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(f){return void r(f)}c.done?e(u):Promise.resolve(u).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function c(t){o(a,n,i,c,u,"next",t)}function u(t){o(a,n,i,c,u,"throw",t)}c(void 0)}))}}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function u(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register([],(function(e,o){"use strict";return{execute:function(){var o=Math.min,a=Math.max,f=Math.round,l=function(t){return{x:t,y:t}};function s(t,e,r){return a(t,o(e,r))}function h(t,e){return"function"==typeof t?t(e):t}function p(t){return t.split("-")[0]}function y(t){return t.split("-")[1]}function d(t){return"y"===t?"height":"width"}function v(t){return["top","bottom"].includes(p(t))?"y":"x"}function m(t){return"x"===v(t)?"y":"x"}function g(t){return"number"!=typeof t?function(t){return c({top:0,right:0,bottom:0,left:0},t)}(t):{top:t,right:t,bottom:t,left:t}}function x(t){return c(c({},t),{},{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}function w(t,e,r){var n,o=t.reference,i=t.floating,a=v(e),c=m(e),u=d(c),f=p(e),l="y"===a,s=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,g=o[u]/2-i[u]/2;switch(f){case"top":n={x:s,y:o.y-i.height};break;case"bottom":n={x:s,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:h};break;case"left":n={x:o.x-i.width,y:h};break;default:n={x:o.x,y:o.y}}switch(y(e)){case"start":n[c]-=g*(r&&l?-1:1);break;case"end":n[c]+=g*(r&&l?-1:1)}return n}var b=function(){var t=i(r().mark((function t(e,o,i){var a,f,l,s,h,p,y,d,v,m,g,x,b,L,E,O,S,k,T,j,P,R,A,D,_,N;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=i.placement,f=void 0===a?"bottom":a,l=i.strategy,s=void 0===l?"absolute":l,h=i.middleware,p=void 0===h?[]:h,y=i.platform,d=p.filter(Boolean),t.next=4,null==y.isRTL?void 0:y.isRTL(o);case 4:return v=t.sent,t.next=7,y.getElementRects({reference:e,floating:o,strategy:s});case 7:m=t.sent,g=w(m,f,v),x=g.x,b=g.y,L=f,E={},O=0,S=0;case 13:if(!(S<d.length)){t.next=46;break}return k=d[S],T=k.name,j=k.fn,t.next=17,j({x:x,y:b,initialPlacement:f,placement:L,strategy:s,middlewareData:E,rects:m,platform:y,elements:{reference:e,floating:o}});case 17:if(P=t.sent,R=P.x,A=P.y,D=P.data,_=P.reset,x=null!=R?R:x,b=null!=A?A:b,E=c(c({},E),{},u({},T,c(c({},E[T]),D))),!(_&&O<=50)){t.next=43;break}if(O++,"object"!==n(_)){t.next=41;break}if(_.placement&&(L=_.placement),!_.rects){t.next=38;break}if(!0!==_.rects){t.next=36;break}return t.next=33,y.getElementRects({reference:e,floating:o,strategy:s});case 33:t.t0=t.sent,t.next=37;break;case 36:t.t0=_.rects;case 37:m=t.t0;case 38:N=w(m,L,v),x=N.x,b=N.y;case 41:return S=-1,t.abrupt("continue",43);case 43:S++,t.next=13;break;case 46:return t.abrupt("return",{x:x,y:b,placement:L,strategy:s,middlewareData:E});case 47:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}();e("a",(function(t){return{name:"arrow",options:t,fn:function(e){return i(r().mark((function n(){var i,a,f,l,p,v,x,w,b,L,E,O,S,k,T,j,P,R,A,D,_,N,C,F,H,W,G,M,V,I,B,Y,$,X;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=e.x,a=e.y,f=e.placement,l=e.rects,p=e.platform,v=e.elements,x=e.middlewareData,w=h(t,e)||{},b=w.element,L=w.padding,E=void 0===L?0:L,null!=b){r.next=4;break}return r.abrupt("return",{});case 4:return O=g(E),S={x:i,y:a},k=m(f),T=d(k),r.next=10,p.getDimensions(b);case 10:return j=r.sent,R=(P="y"===k)?"top":"left",A=P?"bottom":"right",D=P?"clientHeight":"clientWidth",_=l.reference[T]+l.reference[k]-S[k]-l.floating[T],N=S[k]-l.reference[k],r.next=19,null==p.getOffsetParent?void 0:p.getOffsetParent(b);case 19:if(C=r.sent,F=C?C[D]:0,r.t0=!F,r.t0){r.next=26;break}return r.next=25,null==p.isElement?void 0:p.isElement(C);case 25:r.t0=!r.sent;case 26:if(!r.t0){r.next=28;break}F=v.floating[D]||l.floating[T];case 28:return H=_/2-N/2,W=F/2-j[T]/2-1,G=o(O[R],W),M=o(O[A],W),V=G,I=F-j[T]-M,B=F/2-j[T]/2+H,Y=s(V,B,I),$=!x.arrow&&null!=y(f)&&B!=Y&&l.reference[T]/2-(B<V?G:M)-j[T]/2<0,X=$?B<V?B-V:B-I:0,r.abrupt("return",u(u(u({},k,S[k]+X),"data",c(u(u({},k,Y),"centerOffset",B-Y-X),$&&{alignmentOffset:X})),"reset",$));case 39:case"end":return r.stop()}}),n)})))()}}}));function L(t,e){return E.apply(this,arguments)}function E(){return E=i(r().mark((function t(e,n){var o,i,a,u,f,l,s,d,m,g,x,w,b,L;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.placement,i=e.platform,a=e.elements,t.next=3,null==i.isRTL?void 0:i.isRTL(a.floating);case 3:return u=t.sent,f=p(o),l=y(o),s="y"===v(o),d=["left","top"].includes(f)?-1:1,m=u&&s?-1:1,g=h(n,e),x="number"==typeof g?{mainAxis:g,crossAxis:0,alignmentAxis:null}:c({mainAxis:0,crossAxis:0,alignmentAxis:null},g),w=x.mainAxis,b=x.crossAxis,L=x.alignmentAxis,l&&"number"==typeof L&&(b="end"===l?-1*L:L),t.abrupt("return",s?{x:b*m,y:w*d}:{x:w*d,y:b*m});case 13:case"end":return t.stop()}}),t)}))),E.apply(this,arguments)}e("o",(function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(e){return i(r().mark((function n(){var o,i,a;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.x,i=e.y,r.next=3,L(e,t);case 3:return a=r.sent,r.abrupt("return",{x:o+a.x,y:i+a.y,data:a});case 5:case"end":return r.stop()}}),n)})))()}}}));function O(t){return T(t)?(t.nodeName||"").toLowerCase():"#document"}function S(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function k(t){var e;return null==(e=(T(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function T(t){return t instanceof Node||t instanceof S(t).Node}function j(t){return t instanceof Element||t instanceof S(t).Element}function P(t){return t instanceof HTMLElement||t instanceof S(t).HTMLElement}function R(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof S(t).ShadowRoot)}function A(t){var e=F(t),r=e.overflow,n=e.overflowX,o=e.overflowY,i=e.display;return/auto|scroll|overlay|hidden|clip/.test(r+o+n)&&!["inline","contents"].includes(i)}function D(t){return["table","td","th"].includes(O(t))}function _(t){var e=N(),r=F(t);return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!e&&!!r.backdropFilter&&"none"!==r.backdropFilter||!e&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((function(t){return(r.willChange||"").includes(t)}))||["paint","layout","strict","content"].some((function(t){return(r.contain||"").includes(t)}))}function N(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function C(t){return["html","body","#document"].includes(O(t))}function F(t){return S(t).getComputedStyle(t)}function H(t){return j(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function W(t){if("html"===O(t))return t;var e=t.assignedSlot||t.parentNode||R(t)&&t.host||k(t);return R(e)?e.host:e}function G(t){var e=W(t);return C(e)?t.ownerDocument?t.ownerDocument.body:t.body:P(e)&&A(e)?e:G(e)}function M(t,e,r){var n;void 0===e&&(e=[]),void 0===r&&(r=!0);var o=G(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),a=S(o);return i?e.concat(a,a.visualViewport||[],A(o)?o:[],a.frameElement&&r?M(a.frameElement):[]):e.concat(o,M(o,[],r))}function V(t){var e=F(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,o=P(t),i=o?t.offsetWidth:r,a=o?t.offsetHeight:n,c=f(r)!==i||f(n)!==a;return c&&(r=i,n=a),{width:r,height:n,$:c}}function I(t){return j(t)?t:t.contextElement}function B(t){var e=I(t);if(!P(e))return l(1);var r=e.getBoundingClientRect(),n=V(e),o=n.width,i=n.height,a=n.$,c=(a?f(r.width):r.width)/o,u=(a?f(r.height):r.height)/i;return c&&Number.isFinite(c)||(c=1),u&&Number.isFinite(u)||(u=1),{x:c,y:u}}var Y=l(0);function $(t){var e=S(t);return N()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Y}function X(t,e,r,n){void 0===e&&(e=!1),void 0===r&&(r=!1);var o=t.getBoundingClientRect(),i=I(t),a=l(1);e&&(n?j(n)&&(a=B(n)):a=B(t));var c=function(t,e,r){return void 0===e&&(e=!1),!(!r||e&&r!==S(t))&&e}(i,r,n)?$(i):l(0),u=(o.left+c.x)/a.x,f=(o.top+c.y)/a.y,s=o.width/a.x,h=o.height/a.y;if(i)for(var p=S(i),y=n&&j(n)?S(n):n,d=p.frameElement;d&&n&&y!==p;){var v=B(d),m=d.getBoundingClientRect(),g=F(d),w=m.left+(d.clientLeft+parseFloat(g.paddingLeft))*v.x,b=m.top+(d.clientTop+parseFloat(g.paddingTop))*v.y;u*=v.x,f*=v.y,s*=v.x,h*=v.y,u+=w,f+=b,d=S(d).frameElement}return x({width:s,height:h,x:u,y:f})}function U(t){return X(k(t)).left+H(t).scrollLeft}function q(t,e,r){var n;if("viewport"===e)n=function(t,e){var r=S(t),n=k(t),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,c=0,u=0;if(o){i=o.width,a=o.height;var f=N();(!f||f&&"fixed"===e)&&(c=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:c,y:u}}(t,r);else if("document"===e)n=function(t){var e=k(t),r=H(t),n=t.ownerDocument.body,o=a(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=a(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),c=-r.scrollLeft+U(t),u=-r.scrollTop;return"rtl"===F(n).direction&&(c+=a(e.clientWidth,n.clientWidth)-o),{width:o,height:i,x:c,y:u}}(k(t));else if(j(e))n=function(t,e){var r=X(t,!0,"fixed"===e),n=r.top+t.clientTop,o=r.left+t.clientLeft,i=P(t)?B(t):l(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:o*i.x,y:n*i.y}}(e,r);else{var o=$(t);n=c(c({},e),{},{x:e.x-o.x,y:e.y-o.y})}return x(n)}function z(t,e){var r=W(t);return!(r===e||!j(r)||C(r))&&("fixed"===F(r).position||z(r,e))}function J(t,e,r){var n=P(e),o=k(e),i="fixed"===r,a=X(t,!0,i,e),c={scrollLeft:0,scrollTop:0},u=l(0);if(n||!n&&!i)if(("body"!==O(e)||A(o))&&(c=H(e)),n){var f=X(e,!0,i,e);u.x=f.x+e.clientLeft,u.y=f.y+e.clientTop}else o&&(u.x=U(o));return{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function K(t,e){return P(t)&&"fixed"!==F(t).position?e?e(t):t.offsetParent:null}function Q(t,e){var r=S(t);if(!P(t))return r;for(var n=K(t,e);n&&D(n)&&"static"===F(n).position;)n=K(n,e);return n&&("html"===O(n)||"body"===O(n)&&"static"===F(n).position&&!_(n))?r:n||function(t){for(var e=W(t);P(e)&&!C(e);){if(_(e))return e;e=W(e)}return null}(t)||r}var Z=function(){var t=i(r().mark((function t(e){var n,o,i,a,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.reference,o=e.floating,i=e.strategy,a=this.getOffsetParent||Q,u=this.getDimensions,t.t0=J,t.t1=n,t.next=7,a(o);case 7:return t.t2=t.sent,t.t3=i,t.t4=(0,t.t0)(t.t1,t.t2,t.t3),t.t5=c,t.t6={x:0,y:0},t.next=14,u(o);case 14:return t.t7=t.sent,t.t8=(0,t.t5)(t.t6,t.t7),t.abrupt("return",{reference:t.t4,floating:t.t8});case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}();var tt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var e=t.rect,r=t.offsetParent,n=t.strategy,o=P(r),i=k(r);if(r===i)return e;var a={scrollLeft:0,scrollTop:0},c=l(1),u=l(0);if((o||!o&&"fixed"!==n)&&(("body"!==O(r)||A(i))&&(a=H(r)),P(r))){var f=X(r);c=B(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-a.scrollLeft*c.x+u.x,y:e.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:k,getClippingRect:function(e){var r=e.element,n=e.boundary,i=e.rootBoundary,c=e.strategy,u="clippingAncestors"===n?function(t,e){var r=e.get(t);if(r)return r;for(var n=M(t,[],!1).filter((function(t){return j(t)&&"body"!==O(t)})),o=null,i="fixed"===F(t).position,a=i?W(t):t;j(a)&&!C(a);){var c=F(a),u=_(a);u||"fixed"!==c.position||(o=null),(i?!u&&!o:!u&&"static"===c.position&&o&&["absolute","fixed"].includes(o.position)||A(a)&&!u&&z(t,a))?n=n.filter((function(t){return t!==a})):o=c,a=W(a)}return e.set(t,n),n}(r,this._c):[].concat(n),f=[].concat(t(u),[i]),l=f[0],s=f.reduce((function(t,e){var n=q(r,e,c);return t.top=a(n.top,t.top),t.right=o(n.right,t.right),t.bottom=o(n.bottom,t.bottom),t.left=a(n.left,t.left),t}),q(r,l,c));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Q,getElementRects:Z,getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return V(t)},getScale:B,isElement:j,isRTL:function(t){return"rtl"===F(t).direction}};e("c",(function(t,e,r){var n=new Map,o=c({platform:tt},r),i=c(c({},o.platform),{},{_c:n});return b(t,e,c(c({},o),{},{platform:i}))}))}}}))}();