index.js 20 KB

1
  1. "use strict";var M="top",W="bottom",R="right",k="left",he="auto",Q=[M,W,R,k],X="start",Z="end",Xe="clippingParents",je="viewport",ee="popper",Ye="reference",De=Q.reduce(function(e,t){return e.concat([t+"-"+X,t+"-"+Z])},[]),Ee=[].concat(Q,[he]).reduce(function(e,t){return e.concat([t,t+"-"+X,t+"-"+Z])},[]),Je="beforeRead",Ke="read",Qe="afterRead",Ze="beforeMain",et="main",tt="afterMain",nt="beforeWrite",rt="write",ot="afterWrite",it=[Je,Ke,Qe,Ze,et,tt,nt,rt,ot];function V(e){return e?(e.nodeName||"").toLowerCase():null}function T(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Y(e){var t=T(e).Element;return e instanceof t||e instanceof Element}function B(e){var t=T(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Pe(e){if(typeof ShadowRoot=="undefined")return!1;var t=T(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Rt(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},a=t.elements[n];!B(a)||!V(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(c){var s=o[c];s===!1?a.removeAttribute(c):a.setAttribute(c,s===!0?"":s)}))})}function Tt(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(r){var o=t.elements[r],a=t.attributes[r]||{},c=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=c.reduce(function(i,f){return i[f]="",i},{});!B(o)||!V(o)||(Object.assign(o.style,s),Object.keys(a).forEach(function(i){o.removeAttribute(i)}))})}}var Ae={name:"applyStyles",enabled:!0,phase:"write",fn:Rt,effect:Tt,requires:["computeStyles"]};function C(e){return e.split("-")[0]}var J=Math.max,ve=Math.min,te=Math.round;function Me(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function at(){return!/^((?!chrome|android).)*safari/i.test(Me())}function ne(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&B(e)&&(o=e.offsetWidth>0&&te(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&te(r.height)/e.offsetHeight||1);var c=Y(e)?T(e):window,s=c.visualViewport,i=!at()&&n,f=(r.left+(i&&s?s.offsetLeft:0))/o,u=(r.top+(i&&s?s.offsetTop:0))/a,h=r.width/o,m=r.height/a;return{width:h,height:m,top:u,right:f+h,bottom:u+m,left:f,x:f,y:u}}function ke(e){var t=ne(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 st(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Pe(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function I(e){return T(e).getComputedStyle(e)}function Bt(e){return["table","td","th"].indexOf(V(e))>=0}function N(e){return((Y(e)?e.ownerDocument:e.document)||window.document).documentElement}function ye(e){return V(e)==="html"?e:e.assignedSlot||e.parentNode||(Pe(e)?e.host:null)||N(e)}function ft(e){return!B(e)||I(e).position==="fixed"?null:e.offsetParent}function Ht(e){var t=/firefox/i.test(Me()),n=/Trident/i.test(Me());if(n&&B(e)){var r=I(e);if(r.position==="fixed")return null}var o=ye(e);for(Pe(o)&&(o=o.host);B(o)&&["html","body"].indexOf(V(o))<0;){var a=I(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function se(e){for(var t=T(e),n=ft(e);n&&Bt(n)&&I(n).position==="static";)n=ft(n);return n&&(V(n)==="html"||V(n)==="body"&&I(n).position==="static")?t:n||Ht(e)||t}function Le(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fe(e,t,n){return J(e,ve(t,n))}function St(e,t,n){var r=fe(e,t,n);return r>n?n:r}function ct(){return{top:0,right:0,bottom:0,left:0}}function ut(e){return Object.assign({},ct(),e)}function pt(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Vt=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ut(typeof e!="number"?e:pt(e,Q))};function Ct(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,c=n.modifiersData.popperOffsets,s=C(n.placement),i=Le(s),f=[k,R].indexOf(s)>=0,u=f?"height":"width";if(!(!a||!c)){var h=Vt(o.padding,n),m=ke(a),l=i==="y"?M:k,g=i==="y"?W:R,p=n.rects.reference[u]+n.rects.reference[i]-c[i]-n.rects.popper[u],y=c[i]-n.rects.reference[i],b=se(a),x=b?i==="y"?b.clientHeight||0:b.clientWidth||0:0,O=p/2-y/2,d=h[l],v=x-m[u]-h[g],w=x/2-m[u]/2+O,$=fe(d,w,v),j=i;n.modifiersData[r]=(t={},t[j]=$,t.centerOffset=$-w,t)}}function qt(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||st(t.elements.popper,o)&&(t.elements.arrow=o))}var lt={name:"arrow",enabled:!0,phase:"main",fn:Ct,effect:qt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function re(e){return e.split("-")[1]}var It={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Nt(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:te(n*o)/o||0,y:te(r*o)/o||0}}function dt(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,c=e.offsets,s=e.position,i=e.gpuAcceleration,f=e.adaptive,u=e.roundOffsets,h=e.isFixed,m=c.x,l=m===void 0?0:m,g=c.y,p=g===void 0?0:g,y=typeof u=="function"?u({x:l,y:p}):{x:l,y:p};l=y.x,p=y.y;var b=c.hasOwnProperty("x"),x=c.hasOwnProperty("y"),O=k,d=M,v=window;if(f){var w=se(n),$="clientHeight",j="clientWidth";if(w===T(n)&&(w=N(n),I(w).position!=="static"&&s==="absolute"&&($="scrollHeight",j="scrollWidth")),w=w,o===M||(o===k||o===R)&&a===Z){d=W;var D=h&&w===v&&v.visualViewport?v.visualViewport.height:w[$];p-=D-r.height,p*=i?1:-1}if(o===k||(o===M||o===W)&&a===Z){O=R;var E=h&&w===v&&v.visualViewport?v.visualViewport.width:w[j];l-=E-r.width,l*=i?1:-1}}var P=Object.assign({position:s},f&&It),H=u===!0?Nt({x:l,y:p},T(n)):{x:l,y:p};if(l=H.x,p=H.y,i){var A;return Object.assign({},P,(A={},A[d]=x?"0":"",A[O]=b?"0":"",A.transform=(v.devicePixelRatio||1)<=1?"translate("+l+"px, "+p+"px)":"translate3d("+l+"px, "+p+"px, 0)",A))}return Object.assign({},P,(t={},t[d]=x?p+"px":"",t[O]=b?l+"px":"",t.transform="",t))}function Ft(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,c=a===void 0?!0:a,s=n.roundOffsets,i=s===void 0?!0:s,f={placement:C(t.placement),variation:re(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,dt(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,dt(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var We={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ft,data:{}},ge={passive:!0};function Ut(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=o===void 0?!0:o,c=r.resize,s=c===void 0?!0:c,i=T(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(u){u.addEventListener("scroll",n.update,ge)}),s&&i.addEventListener("resize",n.update,ge),function(){a&&f.forEach(function(u){u.removeEventListener("scroll",n.update,ge)}),s&&i.removeEventListener("resize",n.update,ge)}}var Re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ut,data:{}},_t={left:"right",right:"left",bottom:"top",top:"bottom"};function be(e){return e.replace(/left|right|bottom|top/g,function(t){return _t[t]})}var zt={start:"end",end:"start"};function mt(e){return e.replace(/start|end/g,function(t){return zt[t]})}function Te(e){var t=T(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Be(e){return ne(N(e)).left+Te(e).scrollLeft}function Gt(e,t){var n=T(e),r=N(e),o=n.visualViewport,a=r.clientWidth,c=r.clientHeight,s=0,i=0;if(o){a=o.width,c=o.height;var f=at();(f||!f&&t==="fixed")&&(s=o.offsetLeft,i=o.offsetTop)}return{width:a,height:c,x:s+Be(e),y:i}}function Xt(e){var t,n=N(e),r=Te(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=J(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),c=J(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Be(e),i=-r.scrollTop;return I(o||n).direction==="rtl"&&(s+=J(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:c,x:s,y:i}}function He(e){var t=I(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function ht(e){return["html","body","#document"].indexOf(V(e))>=0?e.ownerDocument.body:B(e)&&He(e)?e:ht(ye(e))}function ce(e,t){var n;t===void 0&&(t=[]);var r=ht(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=T(r),c=o?[a].concat(a.visualViewport||[],He(r)?r:[]):r,s=t.concat(c);return o?s:s.concat(ce(ye(c)))}function Se(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yt(e,t){var n=ne(e,!1,t==="fixed");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}function vt(e,t,n){return t===je?Se(Gt(e,n)):Y(t)?Yt(t,n):Se(Xt(N(e)))}function Jt(e){var t=ce(ye(e)),n=["absolute","fixed"].indexOf(I(e).position)>=0,r=n&&B(e)?se(e):e;return Y(r)?t.filter(function(o){return Y(o)&&st(o,r)&&V(o)!=="body"}):[]}function Kt(e,t,n,r){var o=t==="clippingParents"?Jt(e):[].concat(t),a=[].concat(o,[n]),c=a[0],s=a.reduce(function(i,f){var u=vt(e,f,r);return i.top=J(u.top,i.top),i.right=ve(u.right,i.right),i.bottom=ve(u.bottom,i.bottom),i.left=J(u.left,i.left),i},vt(e,c,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function yt(e){var t=e.reference,n=e.element,r=e.placement,o=r?C(r):null,a=r?re(r):null,c=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,i;switch(o){case M:i={x:c,y:t.y-n.height};break;case W:i={x:c,y:t.y+t.height};break;case R:i={x:t.x+t.width,y:s};break;case k:i={x:t.x-n.width,y:s};break;default:i={x:t.x,y:t.y}}var f=o?Le(o):null;if(f!=null){var u=f==="y"?"height":"width";switch(a){case X:i[f]=i[f]-(t[u]/2-n[u]/2);break;case Z:i[f]=i[f]+(t[u]/2-n[u]/2);break}}return i}function oe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,a=n.strategy,c=a===void 0?e.strategy:a,s=n.boundary,i=s===void 0?Xe:s,f=n.rootBoundary,u=f===void 0?je:f,h=n.elementContext,m=h===void 0?ee:h,l=n.altBoundary,g=l===void 0?!1:l,p=n.padding,y=p===void 0?0:p,b=ut(typeof y!="number"?y:pt(y,Q)),x=m===ee?Ye:ee,O=e.rects.popper,d=e.elements[g?x:m],v=Kt(Y(d)?d:d.contextElement||N(e.elements.popper),i,u,c),w=ne(e.elements.reference),$=yt({reference:w,element:O,placement:o}),j=Se(Object.assign({},O,$)),D=m===ee?j:w,E={top:v.top-D.top+b.top,bottom:D.bottom-v.bottom+b.bottom,left:v.left-D.left+b.left,right:D.right-v.right+b.right},P=e.modifiersData.offset;if(m===ee&&P){var H=P[o];Object.keys(E).forEach(function(A){var F=[R,W].indexOf(A)>=0?1:-1,U=[M,W].indexOf(A)>=0?"y":"x";E[A]+=H[U]*F})}return E}function Qt(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,c=n.padding,s=n.flipVariations,i=n.allowedAutoPlacements,f=i===void 0?Ee:i,u=re(r),h=u?s?De:De.filter(function(g){return re(g)===u}):Q,m=h.filter(function(g){return f.indexOf(g)>=0});m.length===0&&(m=h);var l=m.reduce(function(g,p){return g[p]=oe(e,{placement:p,boundary:o,rootBoundary:a,padding:c})[C(p)],g},{});return Object.keys(l).sort(function(g,p){return l[g]-l[p]})}function Zt(e){if(C(e)===he)return[];var t=be(e);return[mt(e),t,mt(t)]}function en(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,c=n.altAxis,s=c===void 0?!0:c,i=n.fallbackPlacements,f=n.padding,u=n.boundary,h=n.rootBoundary,m=n.altBoundary,l=n.flipVariations,g=l===void 0?!0:l,p=n.allowedAutoPlacements,y=t.options.placement,b=C(y),x=b===y,O=i||(x||!g?[be(y)]:Zt(y)),d=[y].concat(O).reduce(function(z,q){return z.concat(C(q)===he?Qt(t,{placement:q,boundary:u,rootBoundary:h,padding:f,flipVariations:g,allowedAutoPlacements:p}):q)},[]),v=t.rects.reference,w=t.rects.popper,$=new Map,j=!0,D=d[0],E=0;E<d.length;E++){var P=d[E],H=C(P),A=re(P)===X,F=[M,W].indexOf(H)>=0,U=F?"width":"height",L=oe(t,{placement:P,boundary:u,rootBoundary:h,altBoundary:m,padding:f}),S=F?A?R:k:A?W:M;v[U]>w[U]&&(S=be(S));var ue=be(S),_=[];if(a&&_.push(L[H]<=0),s&&_.push(L[S]<=0,L[ue]<=0),_.every(function(z){return z})){D=P,j=!1;break}$.set(P,_)}if(j)for(var pe=g?3:1,xe=function(z){var q=d.find(function(de){var ae=$.get(de);if(ae)return ae.slice(0,z).every(function(K){return K})});if(q)return D=q,"break"},ie=pe;ie>0;ie--){var le=xe(ie);if(le==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}var gt={name:"flip",enabled:!0,phase:"main",fn:en,requiresIfExists:["offset"],data:{_skip:!1}};function bt(e,t,n){return n===void 0&&(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 wt(e){return[M,R,W,k].some(function(t){return e[t]>=0})}function tn(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,c=oe(t,{elementContext:"reference"}),s=oe(t,{altBoundary:!0}),i=bt(c,r),f=bt(s,o,a),u=wt(i),h=wt(f);t.modifiersData[n]={referenceClippingOffsets:i,popperEscapeOffsets:f,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}var xt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:tn};function nn(e,t,n){var r=C(e),o=[k,M].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=a[0],s=a[1];return c=c||0,s=(s||0)*o,[k,R].indexOf(r)>=0?{x:s,y:c}:{x:c,y:s}}function rn(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=o===void 0?[0,0]:o,c=Ee.reduce(function(u,h){return u[h]=nn(h,t.rects,a),u},{}),s=c[t.placement],i=s.x,f=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=c}var Ot={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rn};function on(e){var t=e.state,n=e.name;t.modifiersData[n]=yt({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var Ve={name:"popperOffsets",enabled:!0,phase:"read",fn:on,data:{}};function an(e){return e==="x"?"y":"x"}function sn(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=o===void 0?!0:o,c=n.altAxis,s=c===void 0?!1:c,i=n.boundary,f=n.rootBoundary,u=n.altBoundary,h=n.padding,m=n.tether,l=m===void 0?!0:m,g=n.tetherOffset,p=g===void 0?0:g,y=oe(t,{boundary:i,rootBoundary:f,padding:h,altBoundary:u}),b=C(t.placement),x=re(t.placement),O=!x,d=Le(b),v=an(d),w=t.modifiersData.popperOffsets,$=t.rects.reference,j=t.rects.popper,D=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,E=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(w){if(a){var A,F=d==="y"?M:k,U=d==="y"?W:R,L=d==="y"?"height":"width",S=w[d],ue=S+y[F],_=S-y[U],pe=l?-j[L]/2:0,xe=x===X?$[L]:j[L],ie=x===X?-j[L]:-$[L],le=t.elements.arrow,z=l&&le?ke(le):{width:0,height:0},q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ct(),de=q[F],ae=q[U],K=fe(0,$[L],z[L]),Et=O?$[L]/2-pe-K-de-E.mainAxis:xe-K-de-E.mainAxis,Pt=O?-$[L]/2+pe+K+ae+E.mainAxis:ie+K+ae+E.mainAxis,Oe=t.elements.arrow&&se(t.elements.arrow),At=Oe?d==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,Ce=(A=P==null?void 0:P[d])!=null?A:0,Mt=S+Et-Ce-At,kt=S+Pt-Ce,qe=fe(l?ve(ue,Mt):ue,S,l?J(_,kt):_);w[d]=qe,H[d]=qe-S}if(s){var Ie,Lt=d==="x"?M:k,Wt=d==="x"?W:R,G=w[v],me=v==="y"?"height":"width",Ne=G+y[Lt],Fe=G-y[Wt],$e=[M,k].indexOf(b)!==-1,Ue=(Ie=P==null?void 0:P[v])!=null?Ie:0,_e=$e?Ne:G-$[me]-j[me]-Ue+E.altAxis,ze=$e?G+$[me]+j[me]-Ue-E.altAxis:Fe,Ge=l&&$e?St(_e,G,ze):fe(l?_e:Ne,G,l?ze:Fe);w[v]=Ge,H[v]=Ge-G}t.modifiersData[r]=H}}var $t={name:"preventOverflow",enabled:!0,phase:"main",fn:sn,requiresIfExists:["offset"]};function fn(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cn(e){return e===T(e)||!B(e)?Te(e):fn(e)}function un(e){var t=e.getBoundingClientRect(),n=te(t.width)/e.offsetWidth||1,r=te(t.height)/e.offsetHeight||1;return n!==1||r!==1}function pn(e,t,n){n===void 0&&(n=!1);var r=B(t),o=B(t)&&un(t),a=N(t),c=ne(e,o,n),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(r||!r&&!n)&&((V(t)!=="body"||He(a))&&(s=cn(t)),B(t)?(i=ne(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):a&&(i.x=Be(a))),{x:c.left+s.scrollLeft-i.x,y:c.top+s.scrollTop-i.y,width:c.width,height:c.height}}function ln(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function o(a){n.add(a.name);var c=[].concat(a.requires||[],a.requiresIfExists||[]);c.forEach(function(s){if(!n.has(s)){var i=t.get(s);i&&o(i)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||o(a)}),r}function dn(e){var t=ln(e);return it.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function mn(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function hn(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var jt={placement:"bottom",modifiers:[],strategy:"absolute"};function Dt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function we(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,a=o===void 0?jt:o;return function(c,s,i){i===void 0&&(i=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},jt,a),modifiersData:{},elements:{reference:c,popper:s},attributes:{},styles:{}},u=[],h=!1,m={state:f,setOptions:function(p){var y=typeof p=="function"?p(f.options):p;g(),f.options=Object.assign({},a,f.options,y),f.scrollParents={reference:Y(c)?ce(c):c.contextElement?ce(c.contextElement):[],popper:ce(s)};var b=dn(hn([].concat(r,f.options.modifiers)));return f.orderedModifiers=b.filter(function(x){return x.enabled}),l(),m.update()},forceUpdate:function(){if(!h){var p=f.elements,y=p.reference,b=p.popper;if(Dt(y,b)){f.rects={reference:pn(y,se(b),f.options.strategy==="fixed"),popper:ke(b)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(j){return f.modifiersData[j.name]=Object.assign({},j.data)});for(var x=0;x<f.orderedModifiers.length;x++){if(f.reset===!0){f.reset=!1,x=-1;continue}var O=f.orderedModifiers[x],d=O.fn,v=O.options,w=v===void 0?{}:v,$=O.name;typeof d=="function"&&(f=d({state:f,options:w,name:$,instance:m})||f)}}}},update:mn(function(){return new Promise(function(p){m.forceUpdate(),p(f)})}),destroy:function(){g(),h=!0}};if(!Dt(c,s))return m;m.setOptions(i).then(function(p){!h&&i.onFirstUpdate&&i.onFirstUpdate(p)});function l(){f.orderedModifiers.forEach(function(p){var y=p.name,b=p.options,x=b===void 0?{}:b,O=p.effect;if(typeof O=="function"){var d=O({state:f,name:y,instance:m,options:x}),v=function(){};u.push(d||v)}})}function g(){u.forEach(function(p){return p()}),u=[]}return m}}var vn=we(),yn=[Re,Ve,We,Ae],gn=we({defaultModifiers:yn}),bn=[Re,Ve,We,Ae,Ot,gt,$t,lt,xt],wn=we({defaultModifiers:bn});exports.afterMain=tt,exports.afterRead=Qe,exports.afterWrite=ot,exports.applyStyles=Ae,exports.arrow=lt,exports.auto=he,exports.basePlacements=Q,exports.beforeMain=Ze,exports.beforeRead=Je,exports.beforeWrite=nt,exports.bottom=W,exports.clippingParents=Xe,exports.computeStyles=We,exports.createPopper=wn,exports.createPopperBase=vn,exports.createPopperLite=gn,exports.detectOverflow=oe,exports.end=Z,exports.eventListeners=Re,exports.flip=gt,exports.hide=xt,exports.left=k,exports.main=et,exports.modifierPhases=it,exports.offset=Ot,exports.placements=Ee,exports.popper=ee,exports.popperGenerator=we,exports.popperOffsets=Ve,exports.preventOverflow=$t,exports.read=Ke,exports.reference=Ye,exports.right=R,exports.start=X,exports.top=M,exports.variationPlacements=De,exports.viewport=je,exports.write=rt;