(function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Popper=t()})(this,function(){"use strict";function ut(n){return n&&"[object Function]"==={}.toString.call(n)}function r(n,t){if(1!==n.nodeType)return[];var r=n.ownerDocument.defaultView,i=r.getComputedStyle(n,null);return t?i[t]:i}function y(n){return"HTML"===n.nodeName?n:n.parentNode||n.host}function s(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var t=r(n),i=t.overflow,u=t.overflowX,f=t.overflowY;return/(auto|scroll|overlay)/.test(i+f+u)?n:s(y(n))}function ft(n){return n&&n.referenceNode?n.referenceNode:n}function u(n){return 11===n?ii:10===n?ri:ii||ri}function f(n){var e,t,i;if(!n)return document.documentElement;for(e=u(10)?document.body:null,t=n.offsetParent||null;t===e&&n.nextElementSibling;)t=(n=n.nextElementSibling).offsetParent;return i=t&&t.nodeName,i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(t.nodeName)&&"static"===r(t,"position")?f(t):t:n?n.ownerDocument.documentElement:document.documentElement}function fi(n){var t=n.nodeName;return"BODY"!==t&&("HTML"===t||f(n.firstElementChild)===n)}function p(n){return null===n.parentNode?n:p(n.parentNode)}function l(n,t){var i,u;if(!n||!n.nodeType||!t||!t.nodeType)return document.documentElement;var e=n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=e?n:t,s=e?t:n,r=document.createRange();return(r.setStart(o,0),r.setEnd(s,0),i=r.commonAncestorContainer,n!==i&&t!==i||o.contains(s))?fi(i)?i:f(i):(u=p(n),u.host?l(u.host,t):l(n,p(t).host))}function e(n){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top",t="top"===f?"scrollTop":"scrollLeft",i=n.nodeName,r,u;return"BODY"===i||"HTML"===i?(r=n.ownerDocument.documentElement,u=n.ownerDocument.scrollingElement||r,u[t]):n[t]}function ei(n,t){var f=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=e(t,"top"),u=e(t,"left"),i=f?-1:1;return n.top+=r*i,n.bottom+=r*i,n.left+=u*i,n.right+=u*i,n}function et(n,t){var i="x"===t?"Left":"Top",r="Left"==i?"Right":"Bottom";return parseFloat(n["border"+i+"Width"])+parseFloat(n["border"+r+"Width"])}function ot(n,i,r,f){return t(i["offset"+n],i["scroll"+n],r["client"+n],r["offset"+n],r["scroll"+n],u(10)?parseInt(r["offset"+n])+parseInt(f["margin"+("Height"===n?"Top":"Left")])+parseInt(f["margin"+("Height"===n?"Bottom":"Right")]):0)}function st(n){var i=n.body,t=n.documentElement,r=u(10)&&getComputedStyle(t);return{height:ot("Height",i,t,r),width:ot("Width",i,t,r)}}function i(t){return n({},t,{right:t.left+t.width,bottom:t.top+t.height})}function w(n){var t={},o,s,l;try{u(10)?(t=n.getBoundingClientRect(),o=e(n,"top"),s=e(n,"left"),t.top+=o,t.left+=s,t.bottom+=o,t.right+=s):t=n.getBoundingClientRect()}catch(r){}var f={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===n.nodeName?st(n.ownerDocument):{},v=a.width||n.clientWidth||f.width,y=a.height||n.clientHeight||f.height,h=n.offsetWidth-v,c=n.offsetHeight-y;return(h||c)&&(l=r(n),h-=et(l,"x"),c-=et(l,"y"),f.width-=h,f.height-=c),i(f)}function b(n,f){var b=2<arguments.length&&void 0!==arguments[2]&&arguments[2],k=u(10),d="HTML"===f.nodeName,h=w(n),o=w(f),v=s(n),c=r(f),y=parseFloat(c.borderTopWidth),p=parseFloat(c.borderLeftWidth),e,l,a;return b&&d&&(o.top=t(o.top,0),o.left=t(o.left,0)),e=i({top:h.top-o.top-y,left:h.left-o.left-p,width:h.width,height:h.height}),(e.marginTop=0,e.marginLeft=0,!k&&d)&&(l=parseFloat(c.marginTop),a=parseFloat(c.marginLeft),e.top-=y-l,e.bottom-=y-l,e.left-=p-a,e.right-=p-a,e.marginTop=l,e.marginLeft=a),(k&&!b?f.contains(v):f===v&&"BODY"!==v.nodeName)&&(e=ei(e,f)),e}function oi(n){var f=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=n.ownerDocument.documentElement,u=b(n,r),o=t(r.clientWidth,window.innerWidth||0),s=t(r.clientHeight,window.innerHeight||0),h=f?0:e(r),c=f?0:e(r,"left"),l={top:h-u.top+u.marginTop,left:c-u.left+u.marginLeft,width:o,height:s};return i(l)}function ht(n){var i=n.nodeName,t;return"BODY"===i||"HTML"===i?!1:"fixed"===r(n,"position")?!0:(t=y(n),!!t&&ht(t))}function ct(n){if(!n||!n.parentElement||u())return document.documentElement;for(var t=n.parentElement;t&&"none"===r(t,"transform");)t=t.parentElement;return t||document.documentElement}function k(n,t,i,r){var h=4<arguments.length&&void 0!==arguments[4]&&arguments[4],u={top:0,left:0},c=h?ct(n):l(n,ft(t)),e,f,o;if("viewport"===r)u=oi(c,h);else if("scrollParent"===r?(e=s(y(t)),"BODY"===e.nodeName&&(e=n.ownerDocument.documentElement)):e="window"===r?n.ownerDocument.documentElement:r,f=b(e,c,h),"HTML"!==e.nodeName||ht(c))u=f;else{var a=st(n.ownerDocument),v=a.height,p=a.width;u.top+=f.top-f.marginTop;u.bottom=v+f.top;u.left+=f.left-f.marginLeft;u.right=p+f.left}return i=i||0,o="number"==typeof i,u.left+=o?i:i.left||0,u.top+=o?i:i.top||0,u.right-=o?i:i.right||0,u.bottom-=o?i:i.bottom||0,u}function si(n){var t=n.width,i=n.height;return t*i}function lt(t,i,r,u,f){var l=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var e=k(r,u,l,f),o={top:{width:e.width,height:i.top-e.top},right:{width:e.right-i.right,height:e.height},bottom:{width:e.width,height:e.bottom-i.bottom},left:{width:i.left-e.left,height:e.height}},s=Object.keys(o).map(function(t){return n({key:t},o[t],{area:si(o[t])})}).sort(function(n,t){return t.area-n.area}),h=s.filter(function(n){var t=n.width,i=n.height;return t>=r.clientWidth&&i>=r.clientHeight}),a=0<h.length?h[0].key:s[0].key,c=t.split("-")[1];return a+(c?"-"+c:"")}function at(n,t,i){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,u=r?ct(t):l(t,ft(i));return b(i,u,r)}function vt(n){var i=n.ownerDocument.defaultView,t=i.getComputedStyle(n),r=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),u=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:n.offsetWidth+u,height:n.offsetHeight+r}}function a(n){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(n){return t[n]})}function yt(n,t,i){i=i.split("-")[0];var r=vt(n),e={width:r.width,height:r.height},u=-1!==["right","left"].indexOf(i),o=u?"top":"left",f=u?"left":"top",s=u?"height":"width",h=u?"width":"height";return e[o]=t[o]+t[s]/2-r[s]/2,e[f]=i===f?t[f]-r[h]:t[a(f)],e}function h(n,t){return Array.prototype.find?n.find(t):n.filter(t)[0]}function hi(n,t,i){if(Array.prototype.findIndex)return n.findIndex(function(n){return n[t]===i});var r=h(n,function(n){return n[t]===i});return n.indexOf(r)}function pt(n,t,r){var u=void 0===r?n:n.slice(0,hi(n,"name",r));return u.forEach(function(n){n["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=n["function"]||n.fn;n.enabled&&ut(r)&&(t.offsets.popper=i(t.offsets.popper),t.offsets.reference=i(t.offsets.reference),t=r(t,n))}),t}function ci(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=at(this.state,this.popper,this.reference,this.options.positionFixed);n.placement=lt(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);n.originalPlacement=n.placement;n.positionFixed=this.options.positionFixed;n.offsets.popper=yt(this.popper,n.offsets.reference,n.placement);n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute";n=pt(this.modifiers,n);this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function wt(n,t){return n.some(function(n){var i=n.name,r=n.enabled;return r&&i===t})}function d(n){for(var i,r,u=[!1,"ms","Webkit","Moz","O"],f=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<u.length;t++)if(i=u[t],r=i?""+i+f:n,"undefined"!=typeof document.body.style[r])return r;return null}function li(){return this.state.isDestroyed=!0,wt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[d("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function bt(n){var t=n.ownerDocument;return t?t.defaultView:window}function kt(n,t,i,r){var f="BODY"===n.nodeName,u=f?n.ownerDocument.defaultView:n;u.addEventListener(t,i,{passive:!0});f||kt(s(u.parentNode),t,i,r);r.push(u)}function ai(n,t,i,r){i.updateBound=r;bt(n).addEventListener("resize",i.updateBound,{passive:!0});var u=s(n);return kt(u,"scroll",i.updateBound,i.scrollParents),i.scrollElement=u,i.eventsEnabled=!0,i}function vi(){this.state.eventsEnabled||(this.state=ai(this.reference,this.options,this.state,this.scheduleUpdate))}function yi(n,t){return bt(n).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(n){n.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function pi(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=yi(this.reference,this.state))}function g(n){return""!==n&&!isNaN(parseFloat(n))&&isFinite(n)}function nt(n,t){Object.keys(t).forEach(function(i){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&g(t[i])&&(r="px");n.style[i]=t[i]+r})}function wi(n,t){Object.keys(t).forEach(function(i){var r=t[i];!1===r?n.removeAttribute(i):n.setAttribute(i,t[i])})}function bi(n,t){var u=n.offsets,i=u.popper,l=u.reference,r=ti,f=function(n){return n},e=r(l.width),o=r(i.width),a=-1!==["left","right"].indexOf(n.placement),s=-1!==n.placement.indexOf("-"),h=t?a||s||e%2==o%2?r:tt:f,c=t?r:f;return{left:h(1==e%2&&1==o%2&&!s&&t?i.left-1:i.left),top:c(i.top),bottom:c(i.bottom),right:h(i.right)}}function dt(n,t,i){var u=h(n,function(n){var i=n.name;return i===t}),f=!!u&&n.some(function(n){return n.name===i&&n.enabled&&n.order<u.order}),r;return f||(r="`"+t+"`",console.warn("`"+i+"` modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),f}function ki(n){return"end"===n?"start":"start"===n?"end":n}function gt(n){var r=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=it.indexOf(n),i=it.slice(t+1).concat(it.slice(0,t));return r?i.reverse():i}function di(n,r,u,f){var h=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+h[1],e=h[2],s,c,l;if(!o)return n;if(0===e.indexOf("%")){switch(e){case"%p":s=u;break;case"%":case"%r":default:s=f}return c=i(s),c[r]/100*o}return"vh"===e||"vw"===e?(l="vh"===e?t(document.documentElement.clientHeight,window.innerHeight||0):t(document.documentElement.clientWidth,window.innerWidth||0),l/100*o):o}function gi(n,t,i,r){var s=[0,0],c=-1!==["right","left"].indexOf(r),u=n.split(/(\+|\-)/).map(function(n){return n.trim()}),f=u.indexOf(h(u,function(n){return-1!==n.search(/,|\s/)})),o,e;return u[f]&&-1===u[f].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),o=/\s*,\s*|\s+/,e=-1===f?[u]:[u.slice(0,f).concat([u[f].split(o)[0]]),[u[f].split(o)[1]].concat(u.slice(f+1))],e=e.map(function(n,r){var f=(1===r?!c:c)?"height":"width",u=!1;return n.reduce(function(n,t){return""===n[n.length-1]&&-1!==["+","-"].indexOf(t)?(n[n.length-1]=t,u=!0,n):u?(n[n.length-1]+=t,u=!1,n):n.concat(t)},[]).map(function(n){return di(n,f,t,i)})}),e.forEach(function(n,t){n.forEach(function(i,r){g(i)&&(s[t]+=i*("-"===n[r-1]?-1:1))})}),s}function nr(n,t){var r,f=t.offset,o=n.placement,e=n.offsets,i=e.popper,s=e.reference,u=o.split("-")[0];return r=g(+f)?[+f,0]:gi(f,i,s,u),"left"===u?(i.top+=r[0],i.left-=r[1]):"right"===u?(i.top+=r[0],i.left+=r[1]):"top"===u?(i.left+=r[0],i.top-=r[1]):"bottom"===u&&(i.left+=r[0],i.top+=r[1]),n.popper=i,n}var ni=Math.min,tt=Math.floor,ti=Math.round,t=Math.max,c="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,tr=function(){for(var t=["Edge","Trident","Firefox"],n=0;n<t.length;n+=1)if(c&&0<=navigator.userAgent.indexOf(t[n]))return 1;return 0}(),ir=c&&window.Promise,rr=ir?function(n){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1;n()}))}}:function(n){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1;n()},tr))}},ii=c&&!!(window.MSInputMethodContext&&document.documentMode),ri=c&&/MSIE 10/.test(navigator.userAgent),ur=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},fr=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),o=function(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n},n=Object.assign||function(n){for(var t,r,i=1;i<arguments.length;i++)for(r in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},er=c&&/Firefox/i.test(navigator.userAgent),ui=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],it=ui.slice(3),rt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},v=function(){function t(i,r){var u=this,f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e;ur(this,t);this.scheduleUpdate=function(){return requestAnimationFrame(u.update)};this.update=rr(this.update.bind(this));this.options=n({},t.Defaults,f);this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]};this.reference=i&&i.jquery?i[0]:i;this.popper=r&&r.jquery?r[0]:r;this.options.modifiers={};Object.keys(n({},t.Defaults.modifiers,f.modifiers)).forEach(function(i){u.options.modifiers[i]=n({},t.Defaults.modifiers[i]||{},f.modifiers?f.modifiers[i]:{})});this.modifiers=Object.keys(this.options.modifiers).map(function(t){return n({name:t},u.options.modifiers[t])}).sort(function(n,t){return n.order-t.order});this.modifiers.forEach(function(n){n.enabled&&ut(n.onLoad)&&n.onLoad(u.reference,u.popper,u.options,n,u.state)});this.update();e=this.options.eventsEnabled;e&&this.enableEventListeners();this.state.eventsEnabled=e}return fr(t,[{key:"update",value:function(){return ci.call(this)}},{key:"destroy",value:function(){return li.call(this)}},{key:"enableEventListeners",value:function(){return vi.call(this)}},{key:"disableEventListeners",value:function(){return pi.call(this)}}]),t}();return v.Utils=("undefined"==typeof window?global:window).PopperUtils,v.placements=ui,v.Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var u=t.placement,l=u.split("-")[0],f=u.split("-")[1];if(f){var e=t.offsets,r=e.reference,s=e.popper,h=-1!==["bottom","top"].indexOf(l),i=h?"left":"top",c=h?"width":"height",a={start:o({},i,r[i]),end:o({},i,r[i]+r[c]-s[c])};t.offsets.popper=n({},s,a[f])}return t}},offset:{order:200,enabled:!0,fn:nr,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(i,r){var h=r.boundariesElement||f(i.instance.popper),s;i.instance.reference===h&&(h=f(h));var c=d("transform"),e=i.instance.popper.style,l=e.top,a=e.left,v=e[c];e.top="";e.left="";e[c]="";s=k(i.instance.popper,i.instance.reference,r.padding,h,i.positionFixed);e.top=l;e.left=a;e[c]=v;r.boundaries=s;var y=r.priority,u=i.offsets.popper,p={primary:function(n){var i=u[n];return u[n]<s[n]&&!r.escapeWithReference&&(i=t(u[n],s[n])),o({},n,i)},secondary:function(n){var t="right"===n?"left":"top",i=u[t];return u[n]>s[n]&&!r.escapeWithReference&&(i=ni(u[t],s[n]-("right"===n?u.width:u.height))),o({},t,i)}};return y.forEach(function(t){var i=-1===["left","top"].indexOf(t)?"secondary":"primary";u=n({},u,p[i](t))}),i.offsets.popper=u,i},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(n){var o=n.offsets,u=o.popper,i=o.reference,s=n.placement.split("-")[0],r=tt,f=-1!==["top","bottom"].indexOf(s),e=f?"right":"bottom",t=f?"left":"top",h=f?"width":"height";return u[e]<r(i[t])&&(n.offsets.popper[t]=r(i[t])-u[h]),u[t]>r(i[e])&&(n.offsets.popper[t]=r(i[e])),n}},arrow:{order:500,enabled:!0,fn:function(n,u){var l,e;if(!dt(n.instance.modifiers,"arrow","keepTogether"))return n;if(e=u.element,"string"==typeof e){if(e=n.instance.popper.querySelector(e),!e)return n}else if(!n.instance.popper.contains(e))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var d=n.placement.split("-")[0],b=n.offsets,c=b.popper,s=b.reference,a=-1!==["left","right"].indexOf(d),y=a?"height":"width",p=a?"Top":"Left",f=p.toLowerCase(),g=a?"left":"top",v=a?"bottom":"right",h=vt(e)[y];s[v]-h<c[f]&&(n.offsets.popper[f]-=c[f]-(s[v]-h));s[f]+h>c[v]&&(n.offsets.popper[f]+=s[f]+h-c[v]);n.offsets.popper=i(n.offsets.popper);var nt=s[f]+s[y]/2-h/2,k=r(n.instance.popper),tt=parseFloat(k["margin"+p]),it=parseFloat(k["border"+p+"Width"]),w=nt-n.offsets.popper[f]-tt-it;return w=t(ni(c[y]-h,w),0),n.arrowElement=e,n.offsets.arrow=(l={},o(l,f,ti(w)),o(l,g,""),l),n},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,i){if(wt(t.instance.modifiers,"inner")||t.flipped&&t.placement===t.originalPlacement)return t;var e=k(t.instance.popper,t.instance.reference,i.padding,i.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],o=a(r),u=t.placement.split("-")[1]||"",f=[];switch(i.behavior){case rt.FLIP:f=[r,o];break;case rt.CLOCKWISE:f=gt(r);break;case rt.COUNTERCLOCKWISE:f=gt(r,!0);break;default:f=i.behavior}return f.forEach(function(s,h){if(r!==s||f.length===h+1)return t;r=t.placement.split("-")[0];o=a(r);var l=t.offsets.popper,y=t.offsets.reference,c=tt,d="left"===r&&c(l.right)>c(y.left)||"right"===r&&c(l.left)<c(y.right)||"top"===r&&c(l.bottom)>c(y.top)||"bottom"===r&&c(l.top)<c(y.bottom),p=c(l.left)<c(e.left),w=c(l.right)>c(e.right),b=c(l.top)<c(e.top),k=c(l.bottom)>c(e.bottom),g="left"===r&&p||"right"===r&&w||"top"===r&&b||"bottom"===r&&k,v=-1!==["top","bottom"].indexOf(r),it=!!i.flipVariations&&(v&&"start"===u&&p||v&&"end"===u&&w||!v&&"start"===u&&b||!v&&"end"===u&&k),rt=!!i.flipVariationsByContent&&(v&&"start"===u&&w||v&&"end"===u&&p||!v&&"start"===u&&k||!v&&"end"===u&&b),nt=it||rt;(d||g||nt)&&(t.flipped=!0,(d||g)&&(r=f[h+1]),nt&&(u=ki(u)),t.placement=r+(u?"-"+u:""),t.offsets.popper=n({},t.offsets.popper,yt(t.instance.popper,t.offsets.reference,t.placement)),t=pt(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(n){var u=n.placement,t=u.split("-")[0],f=n.offsets,r=f.popper,o=f.reference,e=-1!==["left","right"].indexOf(t),s=-1===["top","left"].indexOf(t);return r[e?"left":"top"]=o[t]-(s?r[e?"width":"height"]:0),n.placement=a(u),n.offsets.popper=i(r),n}},hide:{order:800,enabled:!0,fn:function(n){if(!dt(n.instance.modifiers,"hide","preventOverflow"))return n;var t=n.offsets.reference,i=h(n.instance.modifiers,function(n){return"preventOverflow"===n.name}).boundaries;if(t.bottom<i.top||t.left>i.right||t.top>i.bottom||t.right<i.left){if(!0===n.hide)return n;n.hide=!0;n.attributes["x-out-of-boundaries"]=""}else{if(!1===n.hide)return n;n.hide=!1;n.attributes["x-out-of-boundaries"]=!1}return n}},computeStyle:{order:850,enabled:!0,fn:function(t,i){var g=i.x,nt=i.y,tt=t.offsets.popper,c=h(t.instance.modifiers,function(n){return"applyStyle"===n.name}).gpuAcceleration,p,b,k;void 0!==c&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var l,a,it=void 0===c?i.gpuAcceleration:c,e=f(t.instance.popper),v=w(e),r={position:tt.position},u=bi(t,2>window.devicePixelRatio||!er),o="bottom"===g?"top":"bottom",s="right"===nt?"left":"right",y=d("transform");return(a="bottom"==o?"HTML"===e.nodeName?-e.clientHeight+u.bottom:-v.height+u.bottom:u.top,l="right"==s?"HTML"===e.nodeName?-e.clientWidth+u.right:-v.width+u.right:u.left,it&&y)?(r[y]="translate3d("+l+"px, "+a+"px, 0)",r[o]=0,r[s]=0,r.willChange="transform"):(p="bottom"==o?-1:1,b="right"==s?-1:1,r[o]=a*p,r[s]=l*b,r.willChange=o+", "+s),k={"x-placement":t.placement},t.attributes=n({},k,t.attributes),t.styles=n({},r,t.styles),t.arrowStyles=n({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(n){return nt(n.instance.popper,n.styles),wi(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&nt(n.arrowElement,n.arrowStyles),n},onLoad:function(n,t,i,r,u){var f=at(u,t,n,i.positionFixed),e=lt(i.placement,f,t,n,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute("x-placement",e),nt(t,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},v})