!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.round;function a(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),o=1,a=1;return r(e)&&t&&(o=n.width/e.offsetWidth||1,a=n.height/e.offsetHeight||1),{width:i(n.width/o),height:i(n.height/a),top:i(n.top/a),right:i(n.right/o),bottom:i(n.bottom/a),left:i(n.left/o),x:i(n.left/o),y:i(n.top/a)}}function s(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function f(e){return e?(e.nodeName||"").toLowerCase():null}function c(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function p(e){return a(c(e)).left+s(e).scrollLeft}function l(e){return t(e).getComputedStyle(e)}function u(e){var t=l(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function d(e,n,o){void 0===o&&(o=!1);var i,l,d=r(n),m=r(n)&&function(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return 1!==n||1!==r}(n),h=c(n),v=a(e,m),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(d||!d&&!o)&&(("body"!==f(n)||u(h))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(l=i).scrollLeft,scrollTop:l.scrollTop}:s(i)),r(n)?((b=a(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):h&&(b.x=p(h))),{x:v.left+g.scrollLeft-b.x,y:v.top+g.scrollTop-b.y,width:v.width,height:v.height}}function m(e){var t=a(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 h(e){return"html"===f(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||c(e)}function v(e){return["html","body","#document"].indexOf(f(e))>=0?e.ownerDocument.body:r(e)&&u(e)?e:v(h(e))}function g(e,n){var r;void 0===n&&(n=[]);var o=v(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],u(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(g(h(s)))}function b(e){return["table","td","th"].indexOf(f(e))>=0}function y(e){return r(e)&&"fixed"!==l(e).position?e.offsetParent:null}function w(e){for(var n=t(e),o=y(e);o&&b(o)&&"static"===l(o).position;)o=y(o);return o&&("html"===f(o)||"body"===f(o)&&"static"===l(o).position)?n:o||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&r(e)&&"fixed"===l(e).position)return null;for(var n=h(e);r(n)&&["html","body"].indexOf(f(n))<0;){var o=l(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||n}var x="top",O="bottom",j="right",E="left",S="auto",P=[x,O,j,E],k="start",D="end",M="viewport",L="popper",A=P.reduce((function(e,t){return e.concat([t+"-"+k,t+"-"+D])}),[]),T=[].concat(P,[S]).reduce((function(e,t){return e.concat([t,t+"-"+k,t+"-"+D])}),[]),q=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function W(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 B(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0&&r(e)?w(e):e;return n(o)?t.filter((function(e){return n(e)&&U(e,o)&&"body"!==f(e)})):[]}(e):[].concat(t),a=[].concat(i,[o]),s=a[0],c=a.reduce((function(t,n){var r=F(e,n);return t.top=I(r.top,t.top),t.right=V(r.right,t.right),t.bottom=V(r.bottom,t.bottom),t.left=I(r.left,t.left),t}),F(e,s));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function G(e){return e.split("-")[1]}function X(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Y(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?R(o):null,a=o?G(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case x:t={x:s,y:n.y-r.height};break;case O:t={x:s,y:n.y+n.height};break;case j:t={x:n.x+n.width,y:f};break;case E:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?X(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case k:t[c]=t[c]-(n[p]/2-r[p]/2);break;case D:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function J(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function K(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Q(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,s=r.boundary,f=void 0===s?"clippingParents":s,p=r.rootBoundary,l=void 0===p?M:p,u=r.elementContext,d=void 0===u?L:u,m=r.altBoundary,h=void 0!==m&&m,v=r.padding,g=void 0===v?0:v,b=J("number"!=typeof g?g:K(g,P)),y=d===L?"reference":L,w=e.elements.reference,E=e.rects.popper,S=e.elements[h?y:d],k=z(n(S)?S:S.contextElement||c(e.elements.popper),f,l),D=a(w),A=Y({reference:D,element:E,strategy:"absolute",placement:i}),T=_(Object.assign({},E,A)),q=d===L?T:D,W={top:k.top-q.top+b.top,bottom:q.bottom-k.bottom+b.bottom,left:k.left-q.left+b.left,right:q.right-k.right+b.right},B=e.modifiersData.offset;if(d===L&&B){var H=B[i];Object.keys(W).forEach((function(e){var t=[j,O].indexOf(e)>=0?1:-1,n=[x,O].indexOf(e)>=0?"y":"x";W[e]+=H[n]*t}))}return W}var Z="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",$={placement:"bottom",modifiers:[],strategy:"absolute"};function ee(){for(var e=arguments.length,t=new Array(e),n=0;n100){console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.");break}if(!0!==f.reset){var i=f.orderedModifiers[o],a=i.fn,s=i.options,c=void 0===s?{}:s,l=i.name;"function"==typeof a&&(f=a({state:f,options:c,name:l,instance:u})||f)}else f.reset=!1,o=-1}}else console.error(Z)}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(f)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){h(),p=!0}};if(!ee(e,t))return console.error(Z),u;function h(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(r).then((function(e){!p&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}var ne={passive:!0};var re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,r=e.instance,o=e.options,i=o.scroll,a=void 0===i||i,s=o.resize,f=void 0===s||s,c=t(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&p.forEach((function(e){e.addEventListener("scroll",r.update,ne)})),f&&c.addEventListener("resize",r.update,ne),function(){a&&p.forEach((function(e){e.removeEventListener("scroll",r.update,ne)})),f&&c.removeEventListener("resize",r.update,ne)}},data:{}};var oe={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Y({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ie={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ae(e){var n,r=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,s=e.position,f=e.gpuAcceleration,p=e.adaptive,u=e.roundOffsets,d=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:N(N(t*r)/r)||0,y:N(N(n*r)/r)||0}}(a):"function"==typeof u?u(a):a,m=d.x,h=void 0===m?0:m,v=d.y,g=void 0===v?0:v,b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),S=E,P=x,k=window;if(p){var D=w(r),M="clientHeight",L="clientWidth";D===t(r)&&"static"!==l(D=c(r)).position&&(M="scrollHeight",L="scrollWidth"),i===x&&(P=O,g-=D[M]-o.height,g*=f?1:-1),i===E&&(S=j,h-=D[L]-o.width,h*=f?1:-1)}var A,T=Object.assign({position:s},p&&ie);return f?Object.assign({},T,((A={})[P]=y?"0":"",A[S]=b?"0":"",A.transform=(k.devicePixelRatio||1)<2?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",A)):Object.assign({},T,((n={})[P]=y?g+"px":"",n[S]=b?h+"px":"",n.transform="",n))}var se={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=l(t.elements.popper).transitionProperty||"";a&&["transform","top","right","bottom","left"].some((function(e){return c.indexOf(e)>=0}))&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',"\n\n",'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.","\n\n","We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var p={placement:R(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ae(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ae(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var fe={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]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&f(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.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 o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(o)&&f(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ce={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=T.reduce((function(e,n){return e[n]=function(e,t,n){var r=R(e),o=[E,x].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,[E,j].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}},pe={left:"right",right:"left",bottom:"top",top:"bottom"};function le(e){return e.replace(/left|right|bottom|top/g,(function(e){return pe[e]}))}var ue={start:"end",end:"start"};function de(e){return e.replace(/start|end/g,(function(e){return ue[e]}))}function me(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?T:f,p=G(r),l=p?s?A:A.filter((function(e){return G(e)===p})):P,u=l.filter((function(e){return c.indexOf(e)>=0}));0===u.length&&(u=l,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var d=u.reduce((function(t,n){return t[n]=Q(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[R(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var he={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,l=n.rootBoundary,u=n.altBoundary,d=n.flipVariations,m=void 0===d||d,h=n.allowedAutoPlacements,v=t.options.placement,g=R(v),b=f||(g===v||!m?[le(v)]:function(e){if(R(e)===S)return[];var t=le(e);return[de(e),t,de(t)]}(v)),y=[v].concat(b).reduce((function(e,n){return e.concat(R(n)===S?me(t,{placement:n,boundary:p,rootBoundary:l,padding:c,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),w=t.rects.reference,P=t.rects.popper,D=new Map,M=!0,L=y[0],A=0;A=0,H=B?"width":"height",C=Q(t,{placement:T,boundary:p,rootBoundary:l,altBoundary:u,padding:c}),I=B?W?j:E:W?O:x;w[H]>P[H]&&(I=le(I));var V=le(I),N=[];if(i&&N.push(C[q]<=0),s&&N.push(C[I]<=0,C[V]<=0),N.every((function(e){return e}))){L=T,M=!1;break}D.set(T,N)}if(M)for(var U=function(e){var t=y.find((function(t){var n=D.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return L=t,"break"},_=m?3:1;_>0;_--){if("break"===U(_))break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ve(e,t,n){return I(e,V(t,n))}var ge={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,l=n.padding,u=n.tether,d=void 0===u||u,h=n.tetherOffset,v=void 0===h?0:h,g=Q(t,{boundary:f,rootBoundary:c,padding:l,altBoundary:p}),b=R(t.placement),y=G(t.placement),S=!y,P=X(b),D="x"===P?"y":"x",M=t.modifiersData.popperOffsets,L=t.rects.reference,A=t.rects.popper,T="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,q={x:0,y:0};if(M){if(i||s){var W="y"===P?x:E,B="y"===P?O:j,H="y"===P?"height":"width",C=M[P],N=M[P]+g[W],U=M[P]-g[B],_=d?-A[H]/2:0,F=y===k?L[H]:A[H],z=y===k?-A[H]:-L[H],Y=t.elements.arrow,J=d&&Y?m(Y):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Z=K[W],$=K[B],ee=ve(0,L[H],J[H]),te=S?L[H]/2-_-ee-Z-T:F-ee-Z-T,ne=S?-L[H]/2+_+ee+$+T:z+ee+$+T,re=t.elements.arrow&&w(t.elements.arrow),oe=re?"y"===P?re.clientTop||0:re.clientLeft||0:0,ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][P]:0,ae=M[P]+te-ie-oe,se=M[P]+ne-ie;if(i){var fe=ve(d?V(N,ae):N,C,d?I(U,se):U);M[P]=fe,q[P]=fe-C}if(s){var ce="x"===P?x:E,pe="x"===P?O:j,le=M[D],ue=le+g[ce],de=le-g[pe],me=ve(d?V(ue,ae):ue,le,d?I(de,se):de);M[D]=me,q[D]=me-le}}t.modifiersData[r]=q}},requiresIfExists:["offset"]};var be={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=R(n.placement),f=X(s),c=[E,j].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return J("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:K(e,P))}(o.padding,n),l=m(i),u="y"===f?x:E,d="y"===f?O:j,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],v=a[f]-n.rects.reference[f],g=w(i),b=g?"y"===f?g.clientHeight||0:g.clientWidth||0:0,y=h/2-v/2,S=p[u],k=b-l[c]-p[d],D=b/2-l[c]/2+y,M=ve(S,D,k),L=f;n.modifiersData[r]=((t={})[L]=M,t.centerOffset=M-D,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&(r(o)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" ")),U(t.elements.popper,o)?t.elements.arrow=o:console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" ")))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ye(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[x,j,O,E].some((function(t){return e[t]>=0}))}var xe={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=Q(t,{elementContext:"reference"}),s=Q(t,{altBoundary:!0}),f=ye(a,r),c=ye(s,o,i),p=we(f),l=we(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:l},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":l})}},Oe=te({defaultModifiers:[re,oe,se,fe]}),je=[re,oe,se,fe,ce,he,ge,be,xe],Ee=te({defaultModifiers:je});e.applyStyles=fe,e.arrow=be,e.computeStyles=se,e.createPopper=Ee,e.createPopperLite=Oe,e.defaultModifiers=je,e.detectOverflow=Q,e.eventListeners=re,e.flip=he,e.hide=xe,e.offset=ce,e.popperGenerator=te,e.popperOffsets=oe,e.preventOverflow=ge,Object.defineProperty(e,"__esModule",{value:!0})}));