@popperjs/core
Advanced tools
Comparing version 2.6.0 to 2.7.0
/** | ||
* @popperjs/core v2.6.0 - MIT License | ||
* @popperjs/core v2.7.0 - MIT License | ||
*/ | ||
@@ -216,3 +216,3 @@ | ||
var scrollParent = getScrollParent(element); | ||
var isBody = getNodeName(scrollParent) === 'body'; | ||
var isBody = scrollParent === element.ownerDocument.body; | ||
var win = getWindow(scrollParent); | ||
@@ -219,0 +219,0 @@ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; |
/** | ||
* @popperjs/core v2.6.0 - MIT License | ||
* @popperjs/core v2.7.0 - MIT License | ||
*/ | ||
@@ -216,3 +216,3 @@ | ||
var scrollParent = getScrollParent(element); | ||
var isBody = getNodeName(scrollParent) === 'body'; | ||
var isBody = scrollParent === element.ownerDocument.body; | ||
var win = getWindow(scrollParent); | ||
@@ -1096,2 +1096,3 @@ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; | ||
var round = Math.round; | ||
var unsetSides = { | ||
@@ -1112,4 +1113,4 @@ top: 'auto', | ||
return { | ||
x: Math.round(x * dpr) / dpr || 0, | ||
y: Math.round(y * dpr) / dpr || 0 | ||
x: round(round(x * dpr) / dpr) || 0, | ||
y: round(round(y * dpr) / dpr) || 0 | ||
}; | ||
@@ -1130,3 +1131,3 @@ } | ||
var _ref3 = roundOffsets ? roundOffsetsByDPR(offsets) : offsets, | ||
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, | ||
_ref3$x = _ref3.x, | ||
@@ -1133,0 +1134,0 @@ x = _ref3$x === void 0 ? 0 : _ref3$x, |
/** | ||
* @popperjs/core v2.6.0 - MIT License | ||
* @popperjs/core v2.7.0 - MIT License | ||
*/ | ||
@@ -216,3 +216,3 @@ | ||
var scrollParent = getScrollParent(element); | ||
var isBody = getNodeName(scrollParent) === 'body'; | ||
var isBody = scrollParent === element.ownerDocument.body; | ||
var win = getWindow(scrollParent); | ||
@@ -1102,2 +1102,3 @@ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; | ||
var round = Math.round; | ||
var unsetSides = { | ||
@@ -1118,4 +1119,4 @@ top: 'auto', | ||
return { | ||
x: Math.round(x * dpr) / dpr || 0, | ||
y: Math.round(y * dpr) / dpr || 0 | ||
x: round(round(x * dpr) / dpr) || 0, | ||
y: round(round(y * dpr) / dpr) || 0 | ||
}; | ||
@@ -1136,3 +1137,3 @@ } | ||
var _ref3 = roundOffsets ? roundOffsetsByDPR(offsets) : offsets, | ||
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, | ||
_ref3$x = _ref3.x, | ||
@@ -1139,0 +1140,0 @@ x = _ref3$x === void 0 ? 0 : _ref3$x, |
import getScrollParent from "./getScrollParent.js"; | ||
import getParentNode from "./getParentNode.js"; | ||
import getNodeName from "./getNodeName.js"; | ||
import getWindow from "./getWindow.js"; | ||
@@ -19,3 +18,3 @@ import isScrollParent from "./isScrollParent.js"; | ||
var scrollParent = getScrollParent(element); | ||
var isBody = getNodeName(scrollParent) === 'body'; | ||
var isBody = scrollParent === element.ownerDocument.body; | ||
var win = getWindow(scrollParent); | ||
@@ -22,0 +21,0 @@ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; |
@@ -8,2 +8,3 @@ import { top, left, right, bottom } from "../enums.js"; | ||
var round = Math.round; | ||
var unsetSides = { | ||
@@ -24,4 +25,4 @@ top: 'auto', | ||
return { | ||
x: Math.round(x * dpr) / dpr || 0, | ||
y: Math.round(y * dpr) / dpr || 0 | ||
x: round(round(x * dpr) / dpr) || 0, | ||
y: round(round(y * dpr) / dpr) || 0 | ||
}; | ||
@@ -42,3 +43,3 @@ } | ||
var _ref3 = roundOffsets ? roundOffsetsByDPR(offsets) : offsets, | ||
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, | ||
_ref3$x = _ref3.x, | ||
@@ -45,0 +46,0 @@ x = _ref3$x === void 0 ? 0 : _ref3$x, |
/** | ||
* @popperjs/core v2.6.0 - MIT License | ||
* @popperjs/core v2.7.0 - MIT License | ||
*/ | ||
@@ -218,3 +218,3 @@ | ||
var scrollParent = getScrollParent(element); | ||
var isBody = getNodeName(scrollParent) === 'body'; | ||
var isBody = scrollParent === element.ownerDocument.body; | ||
var win = getWindow(scrollParent); | ||
@@ -221,0 +221,0 @@ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; |
/** | ||
* @popperjs/core v2.6.0 - MIT License | ||
* @popperjs/core v2.7.0 - MIT License | ||
*/ | ||
"use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Popper={})}(this,(function(t){function e(t){return{width:(t=t.getBoundingClientRect()).width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function n(t){return"[object Window]"!==t.toString()?(t=t.ownerDocument)&&t.defaultView||window:t}function o(t){return{scrollLeft:(t=n(t)).pageXOffset,scrollTop:t.pageYOffset}}function i(t){return t instanceof n(t).Element||t instanceof Element}function r(t){return t instanceof n(t).HTMLElement||t instanceof HTMLElement}function f(t){return t?(t.nodeName||"").toLowerCase():null}function a(t){return((i(t)?t.ownerDocument:t.document)||window.document).documentElement}function c(t){return e(a(t)).left+o(t).scrollLeft}function s(t){return n(t).getComputedStyle(t)}function u(t){return t=s(t),/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function l(t,i,s){void 0===s&&(s=!1);var l=a(i);t=e(t);var d=r(i),p={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(d||!d&&!s)&&(("body"!==f(i)||u(l))&&(p=i!==n(i)&&r(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:o(i)),r(i)?((h=e(i)).x+=i.clientLeft,h.y+=i.clientTop):l&&(h.x=c(l))),{x:t.left+p.scrollLeft-h.x,y:t.top+p.scrollTop-h.y,width:t.width,height:t.height}}function d(t){return"html"===f(t)?t:t.assignedSlot||t.parentNode||t.host||a(t)}function p(t,e){void 0===e&&(e=[]);var o=function t(e){return 0<=["html","body","#document"].indexOf(f(e))?e.ownerDocument.body:r(e)&&u(e)?e:t(d(e))}(t);t="body"===f(o);var i=n(o);return o=t?[i].concat(i.visualViewport||[],u(o)?o:[]):o,e=e.concat(o),t?e:e.concat(p(d(o)))}function h(t){if(!r(t)||"fixed"===s(t).position)return null;if(t=t.offsetParent){var e=a(t);if("body"===f(t)&&"static"===s(t).position&&"static"!==s(e).position)return e}return t}function m(t){for(var e=n(t),o=h(t);o&&0<=["table","td","th"].indexOf(f(o))&&"static"===s(o).position;)o=h(o);if(o&&"body"===f(o)&&"static"===s(o).position)return e;if(!o)t:{for(t=d(t);r(t)&&0>["html","body"].indexOf(f(t));){if("none"!==(o=s(t)).transform||"none"!==o.perspective||o.willChange&&"auto"!==o.willChange){o=t;break t}t=t.parentNode}o=null}return o||e}function g(t){var e=new Map,n=new Set,o=[];return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||function t(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(o){n.has(o)||(o=e.get(o))&&t(o)})),o.push(i)}(t)})),o}function b(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function v(t){return Object.assign(Object.assign({},t),{},{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function y(t,i){if("viewport"===i){i=n(t);var f=a(t);i=i.visualViewport;var u=f.clientWidth;f=f.clientHeight;var l=0,d=0;i&&(u=i.width,f=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=i.offsetLeft,d=i.offsetTop)),t=v(t={width:u,height:f,x:l+c(t),y:d})}else r(i)?((t=e(i)).top+=i.clientTop,t.left+=i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top):(d=a(t),t=a(d),l=o(d),i=d.ownerDocument.body,u=Math.max(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),f=Math.max(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),d=-l.scrollLeft+c(d),l=-l.scrollTop,"rtl"===s(i||t).direction&&(d+=Math.max(t.clientWidth,i?i.clientWidth:0)-u),t=v({width:u,height:f,x:d,y:l}));return t}function w(t,e,o){return e="clippingParents"===e?function(t){var e=p(d(t)),o=0<=["absolute","fixed"].indexOf(s(t).position)&&r(t)?m(t):t;return i(o)?e.filter((function(t){var e;if(e=i(t))t:if(e=o.getRootNode&&o.getRootNode(),t.contains(o))e=!0;else{var r;if((r=e)&&(r=e instanceof(r=n(e).ShadowRoot)||e instanceof ShadowRoot),r){e=o;do{if(e&&t.isSameNode(e)){e=!0;break t}e=e.parentNode||e.host}while(e)}e=!1}return e&&"body"!==f(t)})):[]}(t):[].concat(e),(o=(o=[].concat(e,[o])).reduce((function(e,n){return n=y(t,n),e.top=Math.max(n.top,e.top),e.right=Math.min(n.right,e.right),e.bottom=Math.min(n.bottom,e.bottom),e.left=Math.max(n.left,e.left),e}),y(t,o[0]))).width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function x(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function O(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,o=void 0===(t=t.defaultOptions)?E:t;return function(t,e,r){function f(){c.forEach((function(t){return t()})),c=[]}void 0===r&&(r=o);var a={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},E),o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],s=!1,u={state:a,setOptions:function(r){return f(),a.options=Object.assign(Object.assign(Object.assign({},o),a.options),r),a.scrollParents={reference:i(t)?p(t):t.contextElement?p(t.contextElement):[],popper:p(e)},r=function(t){var e=g(t);return M.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}(function(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign(Object.assign(Object.assign({},n),e),{},{options:Object.assign(Object.assign({},n.options),e.options),data:Object.assign(Object.assign({},n.data),e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,a.options.modifiers))),a.orderedModifiers=r.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,n=t.options;n=void 0===n?{}:n,"function"==typeof(t=t.effect)&&(e=t({state:a,name:e,instance:u,options:n}),c.push(e||function(){}))})),u.update()},forceUpdate:function(){if(!s){var t=a.elements,e=t.reference;if(x(e,t=t.popper))for(a.rects={reference:l(e,m(t),"fixed"===a.options.strategy),popper:{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)})),e=0;e<a.orderedModifiers.length;e++)if(!0===a.reset)a.reset=!1,e=-1;else{var n=a.orderedModifiers[e];t=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof t&&(a=t({state:a,options:o,name:n,instance:u})||a)}}},update:b((function(){return new Promise((function(t){u.forceUpdate(),t(a)}))})),destroy:function(){f(),s=!0}};return x(t,e)?(u.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),u):u}}var j=["top","bottom","right","left"],M="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),E={placement:"bottom",modifiers:[],strategy:"absolute"},L=O();t.createPopper=L,t.detectOverflow=function(t,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?t.placement:n;var r=o.boundary,f=void 0===r?"clippingParents":r,c=void 0===(r=o.rootBoundary)?"viewport":r;r=void 0===(r=o.elementContext)?"popper":r;var s=o.altBoundary,u=void 0!==s&&s;o=function(t){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),t)}("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:function(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}(o,j));var l=t.elements.reference;s=t.rects.popper,f=w(i(u=t.elements[u?"popper"===r?"reference":"popper":r])?u:u.contextElement||a(t.elements.popper),f,c),u=function(t){var e=t.reference,n=t.element,o=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var i=e.x+e.width/2-n.width/2,r=e.y+e.height/2-n.height/2;switch(o){case"top":i={x:i,y:e.y-n.height};break;case"bottom":i={x:i,y:e.y+e.height};break;case"right":i={x:e.x+e.width,y:r};break;case"left":i={x:e.x-n.width,y:r};break;default:i={x:e.x,y:e.y}}if(null!=(o=o?0<=["top","bottom"].indexOf(o)?"x":"y":null))switch(r="y"===o?"height":"width",t){case"start":i[o]-=e[r]/2-n[r]/2;break;case"end":i[o]+=e[r]/2-n[r]/2}return i}({reference:c=e(l),element:s,strategy:"absolute",placement:n}),s=v(Object.assign(Object.assign({},s),u)),c="popper"===r?s:c;var d={top:f.top-c.top+o.top,bottom:c.bottom-f.bottom+o.bottom,left:f.left-c.left+o.left,right:c.right-f.right+o.right};if(t=t.modifiersData.offset,"popper"===r&&t){var p=t[n];Object.keys(d).forEach((function(t){var e=0<=["right","bottom"].indexOf(t)?1:-1,n=0<=["top","bottom"].indexOf(t)?"y":"x";d[t]+=p[n]*e}))}return d},t.popperGenerator=O,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
"use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Popper={})}(this,(function(t){function e(t){return{width:(t=t.getBoundingClientRect()).width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function n(t){return"[object Window]"!==t.toString()?(t=t.ownerDocument)&&t.defaultView||window:t}function o(t){return{scrollLeft:(t=n(t)).pageXOffset,scrollTop:t.pageYOffset}}function i(t){return t instanceof n(t).Element||t instanceof Element}function r(t){return t instanceof n(t).HTMLElement||t instanceof HTMLElement}function f(t){return t?(t.nodeName||"").toLowerCase():null}function c(t){return((i(t)?t.ownerDocument:t.document)||window.document).documentElement}function a(t){return e(c(t)).left+o(t).scrollLeft}function s(t){return n(t).getComputedStyle(t)}function u(t){return t=s(t),/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function l(t,i,s){void 0===s&&(s=!1);var l=c(i);t=e(t);var d=r(i),p={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(d||!d&&!s)&&(("body"!==f(i)||u(l))&&(p=i!==n(i)&&r(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:o(i)),r(i)?((h=e(i)).x+=i.clientLeft,h.y+=i.clientTop):l&&(h.x=a(l))),{x:t.left+p.scrollLeft-h.x,y:t.top+p.scrollTop-h.y,width:t.width,height:t.height}}function d(t){return"html"===f(t)?t:t.assignedSlot||t.parentNode||t.host||c(t)}function p(t,e){void 0===e&&(e=[]);var o=function t(e){return 0<=["html","body","#document"].indexOf(f(e))?e.ownerDocument.body:r(e)&&u(e)?e:t(d(e))}(t);t=o===t.ownerDocument.body;var i=n(o);return o=t?[i].concat(i.visualViewport||[],u(o)?o:[]):o,e=e.concat(o),t?e:e.concat(p(d(o)))}function h(t){if(!r(t)||"fixed"===s(t).position)return null;if(t=t.offsetParent){var e=c(t);if("body"===f(t)&&"static"===s(t).position&&"static"!==s(e).position)return e}return t}function m(t){for(var e=n(t),o=h(t);o&&0<=["table","td","th"].indexOf(f(o))&&"static"===s(o).position;)o=h(o);if(o&&"body"===f(o)&&"static"===s(o).position)return e;if(!o)t:{for(t=d(t);r(t)&&0>["html","body"].indexOf(f(t));){if("none"!==(o=s(t)).transform||"none"!==o.perspective||o.willChange&&"auto"!==o.willChange){o=t;break t}t=t.parentNode}o=null}return o||e}function g(t){var e=new Map,n=new Set,o=[];return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||function t(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(o){n.has(o)||(o=e.get(o))&&t(o)})),o.push(i)}(t)})),o}function b(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function v(t){return Object.assign(Object.assign({},t),{},{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function y(t,i){if("viewport"===i){i=n(t);var f=c(t);i=i.visualViewport;var u=f.clientWidth;f=f.clientHeight;var l=0,d=0;i&&(u=i.width,f=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=i.offsetLeft,d=i.offsetTop)),t=v(t={width:u,height:f,x:l+a(t),y:d})}else r(i)?((t=e(i)).top+=i.clientTop,t.left+=i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top):(d=c(t),t=c(d),l=o(d),i=d.ownerDocument.body,u=Math.max(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),f=Math.max(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),d=-l.scrollLeft+a(d),l=-l.scrollTop,"rtl"===s(i||t).direction&&(d+=Math.max(t.clientWidth,i?i.clientWidth:0)-u),t=v({width:u,height:f,x:d,y:l}));return t}function w(t,e,o){return e="clippingParents"===e?function(t){var e=p(d(t)),o=0<=["absolute","fixed"].indexOf(s(t).position)&&r(t)?m(t):t;return i(o)?e.filter((function(t){var e;if(e=i(t))t:if(e=o.getRootNode&&o.getRootNode(),t.contains(o))e=!0;else{var r;if((r=e)&&(r=e instanceof(r=n(e).ShadowRoot)||e instanceof ShadowRoot),r){e=o;do{if(e&&t.isSameNode(e)){e=!0;break t}e=e.parentNode||e.host}while(e)}e=!1}return e&&"body"!==f(t)})):[]}(t):[].concat(e),(o=(o=[].concat(e,[o])).reduce((function(e,n){return n=y(t,n),e.top=Math.max(n.top,e.top),e.right=Math.min(n.right,e.right),e.bottom=Math.min(n.bottom,e.bottom),e.left=Math.max(n.left,e.left),e}),y(t,o[0]))).width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function x(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function O(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,o=void 0===(t=t.defaultOptions)?E:t;return function(t,e,r){function f(){a.forEach((function(t){return t()})),a=[]}void 0===r&&(r=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},E),o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},a=[],s=!1,u={state:c,setOptions:function(r){return f(),c.options=Object.assign(Object.assign(Object.assign({},o),c.options),r),c.scrollParents={reference:i(t)?p(t):t.contextElement?p(t.contextElement):[],popper:p(e)},r=function(t){var e=g(t);return M.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}(function(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign(Object.assign(Object.assign({},n),e),{},{options:Object.assign(Object.assign({},n.options),e.options),data:Object.assign(Object.assign({},n.data),e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,c.options.modifiers))),c.orderedModifiers=r.filter((function(t){return t.enabled})),c.orderedModifiers.forEach((function(t){var e=t.name,n=t.options;n=void 0===n?{}:n,"function"==typeof(t=t.effect)&&(e=t({state:c,name:e,instance:u,options:n}),a.push(e||function(){}))})),u.update()},forceUpdate:function(){if(!s){var t=c.elements,e=t.reference;if(x(e,t=t.popper))for(c.rects={reference:l(e,m(t),"fixed"===c.options.strategy),popper:{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach((function(t){return c.modifiersData[t.name]=Object.assign({},t.data)})),e=0;e<c.orderedModifiers.length;e++)if(!0===c.reset)c.reset=!1,e=-1;else{var n=c.orderedModifiers[e];t=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof t&&(c=t({state:c,options:o,name:n,instance:u})||c)}}},update:b((function(){return new Promise((function(t){u.forceUpdate(),t(c)}))})),destroy:function(){f(),s=!0}};return x(t,e)?(u.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),u):u}}var j=["top","bottom","right","left"],M="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),E={placement:"bottom",modifiers:[],strategy:"absolute"},L=O();t.createPopper=L,t.detectOverflow=function(t,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?t.placement:n;var r=o.boundary,f=void 0===r?"clippingParents":r,a=void 0===(r=o.rootBoundary)?"viewport":r;r=void 0===(r=o.elementContext)?"popper":r;var s=o.altBoundary,u=void 0!==s&&s;o=function(t){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),t)}("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:function(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}(o,j));var l=t.elements.reference;s=t.rects.popper,f=w(i(u=t.elements[u?"popper"===r?"reference":"popper":r])?u:u.contextElement||c(t.elements.popper),f,a),u=function(t){var e=t.reference,n=t.element,o=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var i=e.x+e.width/2-n.width/2,r=e.y+e.height/2-n.height/2;switch(o){case"top":i={x:i,y:e.y-n.height};break;case"bottom":i={x:i,y:e.y+e.height};break;case"right":i={x:e.x+e.width,y:r};break;case"left":i={x:e.x-n.width,y:r};break;default:i={x:e.x,y:e.y}}if(null!=(o=o?0<=["top","bottom"].indexOf(o)?"x":"y":null))switch(r="y"===o?"height":"width",t){case"start":i[o]-=e[r]/2-n[r]/2;break;case"end":i[o]+=e[r]/2-n[r]/2}return i}({reference:a=e(l),element:s,strategy:"absolute",placement:n}),s=v(Object.assign(Object.assign({},s),u)),a="popper"===r?s:a;var d={top:f.top-a.top+o.top,bottom:a.bottom-f.bottom+o.bottom,left:f.left-a.left+o.left,right:a.right-f.right+o.right};if(t=t.modifiersData.offset,"popper"===r&&t){var p=t[n];Object.keys(d).forEach((function(t){var e=0<=["right","bottom"].indexOf(t)?1:-1,n=0<=["top","bottom"].indexOf(t)?"y":"x";d[t]+=p[n]*e}))}return d},t.popperGenerator=O,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper-base.min.js.map |
/** | ||
* @popperjs/core v2.6.0 - MIT License | ||
* @popperjs/core v2.7.0 - MIT License | ||
*/ | ||
@@ -218,3 +218,3 @@ | ||
var scrollParent = getScrollParent(element); | ||
var isBody = getNodeName(scrollParent) === 'body'; | ||
var isBody = scrollParent === element.ownerDocument.body; | ||
var win = getWindow(scrollParent); | ||
@@ -1098,2 +1098,3 @@ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; | ||
var round = Math.round; | ||
var unsetSides = { | ||
@@ -1114,4 +1115,4 @@ top: 'auto', | ||
return { | ||
x: Math.round(x * dpr) / dpr || 0, | ||
y: Math.round(y * dpr) / dpr || 0 | ||
x: round(round(x * dpr) / dpr) || 0, | ||
y: round(round(y * dpr) / dpr) || 0 | ||
}; | ||
@@ -1132,3 +1133,3 @@ } | ||
var _ref3 = roundOffsets ? roundOffsetsByDPR(offsets) : offsets, | ||
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, | ||
_ref3$x = _ref3.x, | ||
@@ -1135,0 +1136,0 @@ x = _ref3$x === void 0 ? 0 : _ref3$x, |
/** | ||
* @popperjs/core v2.6.0 - MIT License | ||
* @popperjs/core v2.7.0 - MIT License | ||
*/ | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function o(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function s(e){return e?(e.nodeName||"").toLowerCase():null}function a(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function c(e){return t(a(e)).left+o(e).scrollLeft}function f(e){return n(e).getComputedStyle(e)}function p(e){return e=f(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function l(e,r,f){void 0===f&&(f=!1);var l=a(r);e=t(e);var u=i(r),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(u||!u&&!f)&&(("body"!==s(r)||p(l))&&(d=r!==n(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:o(r)),i(r)?((h=t(r)).x+=r.clientLeft,h.y+=r.clientTop):l&&(h.x=c(l))),{x:e.left+d.scrollLeft-h.x,y:e.top+d.scrollTop-h.y,width:e.width,height:e.height}}function u(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||e.host||a(e)}function d(e,t){void 0===t&&(t=[]);var o=function e(t){return 0<=["html","body","#document"].indexOf(s(t))?t.ownerDocument.body:i(t)&&p(t)?t:e(u(t))}(e);e="body"===s(o);var r=n(o);return o=e?[r].concat(r.visualViewport||[],p(o)?o:[]):o,t=t.concat(o),e?t:t.concat(d(u(o)))}function h(e){if(!i(e)||"fixed"===f(e).position)return null;if(e=e.offsetParent){var t=a(e);if("body"===s(e)&&"static"===f(e).position&&"static"!==f(t).position)return t}return e}function m(e){for(var t=n(e),o=h(e);o&&0<=["table","td","th"].indexOf(s(o))&&"static"===f(o).position;)o=h(o);if(o&&"body"===s(o)&&"static"===f(o).position)return t;if(!o)e:{for(e=u(e);i(e)&&0>["html","body"].indexOf(s(e));){if("none"!==(o=f(e)).transform||"none"!==o.perspective||o.willChange&&"auto"!==o.willChange){o=e;break e}e=e.parentNode}o=null}return o||t}function g(e){var t=new Map,n=new Set,o=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(r){n.add(r.name),[].concat(r.requires||[],r.requiresIfExists||[]).forEach((function(o){n.has(o)||(o=t.get(o))&&e(o)})),o.push(r)}(e)})),o}function b(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function v(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function y(e,r){if("viewport"===r){r=n(e);var s=a(e);r=r.visualViewport;var p=s.clientWidth;s=s.clientHeight;var l=0,u=0;r&&(p=r.width,s=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=r.offsetLeft,u=r.offsetTop)),e=v(e={width:p,height:s,x:l+c(e),y:u})}else i(r)?((e=t(r)).top+=r.clientTop,e.left+=r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top):(u=a(e),e=a(u),l=o(u),r=u.ownerDocument.body,p=Math.max(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Math.max(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-l.scrollLeft+c(u),l=-l.scrollTop,"rtl"===f(r||e).direction&&(u+=Math.max(e.clientWidth,r?r.clientWidth:0)-p),e=v({width:p,height:s,x:u,y:l}));return e}function O(e,t,o){return t="clippingParents"===t?function(e){var t=d(u(e)),o=0<=["absolute","fixed"].indexOf(f(e).position)&&i(e)?m(e):e;return r(o)?t.filter((function(e){var t;if(t=r(e))e:if(t=o.getRootNode&&o.getRootNode(),e.contains(o))t=!0;else{var i;if((i=t)&&(i=t instanceof(i=n(t).ShadowRoot)||t instanceof ShadowRoot),i){t=o;do{if(t&&e.isSameNode(t)){t=!0;break e}t=t.parentNode||t.host}while(t)}t=!1}return t&&"body"!==s(e)})):[]}(e):[].concat(t),(o=(o=[].concat(t,[o])).reduce((function(t,n){return n=y(e,n),t.top=Math.max(n.top,t.top),t.right=Math.min(n.right,t.right),t.bottom=Math.min(n.bottom,t.bottom),t.left=Math.max(n.left,t.left),t}),y(e,o[0]))).width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function w(e){var t=e.reference,n=e.element,o=(e=e.placement)?e.split("-")[0]:null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?0<=["top","bottom"].indexOf(o)?"x":"y":null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function x(){for(var e=arguments.length,t=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.defaultModifiers,n=void 0===t?[]:t,o=void 0===(e=e.defaultOptions)?P:e;return function(e,t,i){function s(){c.forEach((function(e){return e()})),c=[]}void 0===i&&(i=o);var a={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},P),o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],f=!1,p={state:a,setOptions:function(i){return s(),a.options=Object.assign(Object.assign(Object.assign({},o),a.options),i),a.scrollParents={reference:r(e)?d(e):e.contextElement?d(e.contextElement):[],popper:d(t)},i=function(e){var t=g(e);return L.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(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,a.options.modifiers))),a.orderedModifiers=i.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:a,name:t,instance:p,options:n}),c.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!f){var e=a.elements,t=e.reference;if(x(t,e=e.popper))for(a.rects={reference:l(t,m(e),"fixed"===a.options.strategy),popper:{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<a.orderedModifiers.length;t++)if(!0===a.reset)a.reset=!1,t=-1;else{var n=a.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(a=e({state:a,options:o,name:n,instance:p})||a)}}},update:b((function(){return new Promise((function(e){p.forceUpdate(),e(a)}))})),destroy:function(){s(),f=!0}};return x(e,t)?(p.setOptions(i).then((function(e){!f&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function E(e){var t,o=e.popper,r=e.popperRect,i=e.placement,s=e.offsets,c=e.position,f=e.gpuAcceleration,p=e.adaptive;e.roundOffsets?(e=window.devicePixelRatio||1,e={x:Math.round(s.x*e)/e||0,y:Math.round(s.y*e)/e||0}):e=s;var l=e;e=void 0===(e=l.x)?0:e,l=void 0===(l=l.y)?0:l;var u=s.hasOwnProperty("x");s=s.hasOwnProperty("y");var d,h="left",g="top",b=window;if(p){var v=m(o);v===n(o)&&(v=a(o)),"top"===i&&(g="bottom",l-=v.clientHeight-r.height,l*=f?1:-1),"left"===i&&(h="right",e-=v.clientWidth-r.width,e*=f?1:-1)}return o=Object.assign({position:c},p&&k),f?Object.assign(Object.assign({},o),{},((d={})[g]=s?"0":"",d[h]=u?"0":"",d.transform=2>(b.devicePixelRatio||1)?"translate("+e+"px, "+l+"px)":"translate3d("+e+"px, "+l+"px, 0)",d)):Object.assign(Object.assign({},o),{},((t={})[g]=s?l+"px":"",t[h]=u?e+"px":"",t.transform="",t))}var M=["top","bottom","right","left"],L="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),P={placement:"bottom",modifiers:[],strategy:"absolute"},W={passive:!0},k={top:"auto",right:"auto",bottom:"auto",left:"auto"},D=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,s=void 0===(e=e.resize)||e,a=n(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",o.update,W)})),s&&a.addEventListener("resize",o.update,W),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",o.update,W)})),s&&a.removeEventListener("resize",o.update,W)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=w({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;e=void 0===(e=n.gpuAcceleration)||e;var o=n.adaptive;o=void 0===o||o,n=void 0===(n=n.roundOffsets)||n,e={placement:t.placement.split("-")[0],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),E(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),E(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign(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]||{},o=t.attributes[e]||{},r=t.elements[e];i(r)&&s(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.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.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(o)&&s(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]}],R=j({defaultModifiers:D});e.createPopper=R,e.defaultModifiers=D,e.detectOverflow=function(e,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?e.placement:n;var i=o.boundary,s=void 0===i?"clippingParents":i,c=void 0===(i=o.rootBoundary)?"viewport":i;i=void 0===(i=o.elementContext)?"popper":i;var f=o.altBoundary,p=void 0!==f&&f;o=function(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:function(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}(o,M));var l=e.elements.reference;f=e.rects.popper,s=O(r(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||a(e.elements.popper),s,c),p=w({reference:c=t(l),element:f,strategy:"absolute",placement:n}),f=v(Object.assign(Object.assign({},f),p)),c="popper"===i?f:c;var u={top:s.top-c.top+o.top,bottom:c.bottom-s.bottom+o.bottom,left:s.left-c.left+o.left,right:c.right-s.right+o.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u},e.popperGenerator=j,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function o(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function s(e){return e?(e.nodeName||"").toLowerCase():null}function a(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function c(e){return t(a(e)).left+o(e).scrollLeft}function f(e){return n(e).getComputedStyle(e)}function p(e){return e=f(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function l(e,r,f){void 0===f&&(f=!1);var l=a(r);e=t(e);var u=i(r),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(u||!u&&!f)&&(("body"!==s(r)||p(l))&&(d=r!==n(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:o(r)),i(r)?((h=t(r)).x+=r.clientLeft,h.y+=r.clientTop):l&&(h.x=c(l))),{x:e.left+d.scrollLeft-h.x,y:e.top+d.scrollTop-h.y,width:e.width,height:e.height}}function u(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||e.host||a(e)}function d(e,t){void 0===t&&(t=[]);var o=function e(t){return 0<=["html","body","#document"].indexOf(s(t))?t.ownerDocument.body:i(t)&&p(t)?t:e(u(t))}(e);e=o===e.ownerDocument.body;var r=n(o);return o=e?[r].concat(r.visualViewport||[],p(o)?o:[]):o,t=t.concat(o),e?t:t.concat(d(u(o)))}function h(e){if(!i(e)||"fixed"===f(e).position)return null;if(e=e.offsetParent){var t=a(e);if("body"===s(e)&&"static"===f(e).position&&"static"!==f(t).position)return t}return e}function m(e){for(var t=n(e),o=h(e);o&&0<=["table","td","th"].indexOf(s(o))&&"static"===f(o).position;)o=h(o);if(o&&"body"===s(o)&&"static"===f(o).position)return t;if(!o)e:{for(e=u(e);i(e)&&0>["html","body"].indexOf(s(e));){if("none"!==(o=f(e)).transform||"none"!==o.perspective||o.willChange&&"auto"!==o.willChange){o=e;break e}e=e.parentNode}o=null}return o||t}function g(e){var t=new Map,n=new Set,o=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(r){n.add(r.name),[].concat(r.requires||[],r.requiresIfExists||[]).forEach((function(o){n.has(o)||(o=t.get(o))&&e(o)})),o.push(r)}(e)})),o}function b(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function v(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function y(e,r){if("viewport"===r){r=n(e);var s=a(e);r=r.visualViewport;var p=s.clientWidth;s=s.clientHeight;var l=0,u=0;r&&(p=r.width,s=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=r.offsetLeft,u=r.offsetTop)),e=v(e={width:p,height:s,x:l+c(e),y:u})}else i(r)?((e=t(r)).top+=r.clientTop,e.left+=r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top):(u=a(e),e=a(u),l=o(u),r=u.ownerDocument.body,p=Math.max(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Math.max(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-l.scrollLeft+c(u),l=-l.scrollTop,"rtl"===f(r||e).direction&&(u+=Math.max(e.clientWidth,r?r.clientWidth:0)-p),e=v({width:p,height:s,x:u,y:l}));return e}function O(e,t,o){return t="clippingParents"===t?function(e){var t=d(u(e)),o=0<=["absolute","fixed"].indexOf(f(e).position)&&i(e)?m(e):e;return r(o)?t.filter((function(e){var t;if(t=r(e))e:if(t=o.getRootNode&&o.getRootNode(),e.contains(o))t=!0;else{var i;if((i=t)&&(i=t instanceof(i=n(t).ShadowRoot)||t instanceof ShadowRoot),i){t=o;do{if(t&&e.isSameNode(t)){t=!0;break e}t=t.parentNode||t.host}while(t)}t=!1}return t&&"body"!==s(e)})):[]}(e):[].concat(t),(o=(o=[].concat(t,[o])).reduce((function(t,n){return n=y(e,n),t.top=Math.max(n.top,t.top),t.right=Math.min(n.right,t.right),t.bottom=Math.min(n.bottom,t.bottom),t.left=Math.max(n.left,t.left),t}),y(e,o[0]))).width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function w(e){var t=e.reference,n=e.element,o=(e=e.placement)?e.split("-")[0]:null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?0<=["top","bottom"].indexOf(o)?"x":"y":null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function x(){for(var e=arguments.length,t=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.defaultModifiers,n=void 0===t?[]:t,o=void 0===(e=e.defaultOptions)?P:e;return function(e,t,i){function s(){c.forEach((function(e){return e()})),c=[]}void 0===i&&(i=o);var a={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},P),o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],f=!1,p={state:a,setOptions:function(i){return s(),a.options=Object.assign(Object.assign(Object.assign({},o),a.options),i),a.scrollParents={reference:r(e)?d(e):e.contextElement?d(e.contextElement):[],popper:d(t)},i=function(e){var t=g(e);return L.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(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,a.options.modifiers))),a.orderedModifiers=i.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:a,name:t,instance:p,options:n}),c.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!f){var e=a.elements,t=e.reference;if(x(t,e=e.popper))for(a.rects={reference:l(t,m(e),"fixed"===a.options.strategy),popper:{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<a.orderedModifiers.length;t++)if(!0===a.reset)a.reset=!1,t=-1;else{var n=a.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(a=e({state:a,options:o,name:n,instance:p})||a)}}},update:b((function(){return new Promise((function(e){p.forceUpdate(),e(a)}))})),destroy:function(){s(),f=!0}};return x(e,t)?(p.setOptions(i).then((function(e){!f&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function E(e){var t,o=e.popper,r=e.popperRect,i=e.placement,s=e.offsets,c=e.position,f=e.gpuAcceleration,p=e.adaptive;if(!0===(e=e.roundOffsets)){e=s.y;var l=window.devicePixelRatio||1;e={x:k(k(s.x*l)/l)||0,y:k(k(e*l)/l)||0}}else e="function"==typeof e?e(s):s;e=void 0===(e=(l=e).x)?0:e,l=void 0===(l=l.y)?0:l;var u=s.hasOwnProperty("x");s=s.hasOwnProperty("y");var d,h="left",g="top",b=window;if(p){var v=m(o);v===n(o)&&(v=a(o)),"top"===i&&(g="bottom",l-=v.clientHeight-r.height,l*=f?1:-1),"left"===i&&(h="right",e-=v.clientWidth-r.width,e*=f?1:-1)}return o=Object.assign({position:c},p&&D),f?Object.assign(Object.assign({},o),{},((d={})[g]=s?"0":"",d[h]=u?"0":"",d.transform=2>(b.devicePixelRatio||1)?"translate("+e+"px, "+l+"px)":"translate3d("+e+"px, "+l+"px, 0)",d)):Object.assign(Object.assign({},o),{},((t={})[g]=s?l+"px":"",t[h]=u?e+"px":"",t.transform="",t))}var M=["top","bottom","right","left"],L="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),P={placement:"bottom",modifiers:[],strategy:"absolute"},W={passive:!0},k=Math.round,D={top:"auto",right:"auto",bottom:"auto",left:"auto"},R=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,s=void 0===(e=e.resize)||e,a=n(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",o.update,W)})),s&&a.addEventListener("resize",o.update,W),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",o.update,W)})),s&&a.removeEventListener("resize",o.update,W)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=w({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;e=void 0===(e=n.gpuAcceleration)||e;var o=n.adaptive;o=void 0===o||o,n=void 0===(n=n.roundOffsets)||n,e={placement:t.placement.split("-")[0],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),E(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),E(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign(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]||{},o=t.attributes[e]||{},r=t.elements[e];i(r)&&s(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.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.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(o)&&s(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]}],T=j({defaultModifiers:R});e.createPopper=T,e.defaultModifiers=R,e.detectOverflow=function(e,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?e.placement:n;var i=o.boundary,s=void 0===i?"clippingParents":i,c=void 0===(i=o.rootBoundary)?"viewport":i;i=void 0===(i=o.elementContext)?"popper":i;var f=o.altBoundary,p=void 0!==f&&f;o=function(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:function(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}(o,M));var l=e.elements.reference;f=e.rects.popper,s=O(r(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||a(e.elements.popper),s,c),p=w({reference:c=t(l),element:f,strategy:"absolute",placement:n}),f=v(Object.assign(Object.assign({},f),p)),c="popper"===i?f:c;var u={top:s.top-c.top+o.top,bottom:c.bottom-s.bottom+o.bottom,left:s.left-c.left+o.left,right:c.right-s.right+o.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u},e.popperGenerator=j,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper-lite.min.js.map |
/** | ||
* @popperjs/core v2.6.0 - MIT License | ||
* @popperjs/core v2.7.0 - MIT License | ||
*/ | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function r(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return t(s(e)).left+r(e).scrollLeft}function c(e){return n(e).getComputedStyle(e)}function p(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function l(e,o,c){void 0===c&&(c=!1);var l=s(o);e=t(e);var u=i(o),d={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(u||!u&&!c)&&(("body"!==a(o)||p(l))&&(d=o!==n(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:r(o)),i(o)?((m=t(o)).x+=o.clientLeft,m.y+=o.clientTop):l&&(m.x=f(l))),{x:e.left+d.scrollLeft-m.x,y:e.top+d.scrollTop-m.y,width:e.width,height:e.height}}function u(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function d(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||e.host||s(e)}function m(e,t){void 0===t&&(t=[]);var r=function e(t){return 0<=["html","body","#document"].indexOf(a(t))?t.ownerDocument.body:i(t)&&p(t)?t:e(d(t))}(e);e="body"===a(r);var o=n(r);return r=e?[o].concat(o.visualViewport||[],p(r)?r:[]):r,t=t.concat(r),e?t:t.concat(m(d(r)))}function h(e){if(!i(e)||"fixed"===c(e).position)return null;if(e=e.offsetParent){var t=s(e);if("body"===a(e)&&"static"===c(e).position&&"static"!==c(t).position)return t}return e}function g(e){for(var t=n(e),r=h(e);r&&0<=["table","td","th"].indexOf(a(r))&&"static"===c(r).position;)r=h(r);if(r&&"body"===a(r)&&"static"===c(r).position)return t;if(!r)e:{for(e=d(e);i(e)&&0>["html","body"].indexOf(a(e));){if("none"!==(r=c(e)).transform||"none"!==r.perspective||r.willChange&&"auto"!==r.willChange){r=e;break e}e=e.parentNode}r=null}return r||t}function v(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(r){n.has(r)||(r=t.get(r))&&e(r)})),r.push(o)}(e)})),r}function b(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function y(e){return e.split("-")[0]}function O(e,t){var r,o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if((r=o)&&(r=o instanceof(r=n(o).ShadowRoot)||o instanceof ShadowRoot),r)do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function w(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function x(e,o){if("viewport"===o){o=n(e);var a=s(e);o=o.visualViewport;var p=a.clientWidth;a=a.clientHeight;var l=0,u=0;o&&(p=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=o.offsetLeft,u=o.offsetTop)),e=w(e={width:p,height:a,x:l+f(e),y:u})}else i(o)?((e=t(o)).top+=o.clientTop,e.left+=o.clientLeft,e.bottom=e.top+o.clientHeight,e.right=e.left+o.clientWidth,e.width=o.clientWidth,e.height=o.clientHeight,e.x=e.left,e.y=e.top):(u=s(e),e=s(u),l=r(u),o=u.ownerDocument.body,p=Math.max(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Math.max(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-l.scrollLeft+f(u),l=-l.scrollTop,"rtl"===c(o||e).direction&&(u+=Math.max(e.clientWidth,o?o.clientWidth:0)-p),e=w({width:p,height:a,x:u,y:l}));return e}function j(e,t,n){return t="clippingParents"===t?function(e){var t=m(d(e)),n=0<=["absolute","fixed"].indexOf(c(e).position)&&i(e)?g(e):e;return o(n)?t.filter((function(e){return o(e)&&O(e,n)&&"body"!==a(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=x(e,n),t.top=Math.max(n.top,t.top),t.right=Math.min(n.right,t.right),t.bottom=Math.min(n.bottom,t.bottom),t.left=Math.max(n.left,t.left),t}),x(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function M(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function E(e){var t=e.reference,n=e.element,r=(e=e.placement)?y(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(r){case"top":o={x:o,y:t.y-n.height};break;case"bottom":o={x:o,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:i};break;case"left":o={x:t.x-n.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(r=r?M(r):null))switch(i="y"===r?"height":"width",e){case"start":o[r]-=t[i]/2-n[i]/2;break;case"end":o[r]+=t[i]/2-n[i]/2}return o}function D(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function P(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function L(e,n){void 0===n&&(n={});var r=n;n=void 0===(n=r.placement)?e.placement:n;var i=r.boundary,a=void 0===i?"clippingParents":i,f=void 0===(i=r.rootBoundary)?"viewport":i;i=void 0===(i=r.elementContext)?"popper":i;var c=r.altBoundary,p=void 0!==c&&c;r=D("number"!=typeof(r=void 0===(r=r.padding)?0:r)?r:P(r,T));var l=e.elements.reference;c=e.rects.popper,a=j(o(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||s(e.elements.popper),a,f),p=E({reference:f=t(l),element:c,strategy:"absolute",placement:n}),c=w(Object.assign(Object.assign({},c),p)),f="popper"===i?c:f;var u={top:a.top-f.top+r.top,bottom:f.bottom-a.bottom+r.bottom,left:a.left-f.left+r.left,right:f.right-a.right+r.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u}function k(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function B(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?V:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},V),r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:s,setOptions:function(i){return a(),s.options=Object.assign(Object.assign(Object.assign({},r),s.options),i),s.scrollParents={reference:o(e)?m(e):e.contextElement?m(e.contextElement):[],popper:m(t)},i=function(e){var t=v(e);return N.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(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:p,options:n}),f.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference;if(k(t,e=e.popper))for(s.rects={reference:l(t,g(e),"fixed"===s.options.strategy),popper:u(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var r=n.options;r=void 0===r?{}:r,n=n.name,"function"==typeof e&&(s=e({state:s,options:r,name:n,instance:p})||s)}}},update:b((function(){return new Promise((function(e){p.forceUpdate(),e(s)}))})),destroy:function(){a(),c=!0}};return k(e,t)?(p.setOptions(i).then((function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function W(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,f=e.position,c=e.gpuAcceleration,p=e.adaptive;e.roundOffsets?(e=window.devicePixelRatio||1,e={x:Math.round(a.x*e)/e||0,y:Math.round(a.y*e)/e||0}):e=a;var l=e;e=void 0===(e=l.x)?0:e,l=void 0===(l=l.y)?0:l;var u=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,m="left",h="top",v=window;if(p){var b=g(r);b===n(r)&&(b=s(r)),"top"===i&&(h="bottom",l-=b.clientHeight-o.height,l*=c?1:-1),"left"===i&&(m="right",e-=b.clientWidth-o.width,e*=c?1:-1)}return r=Object.assign({position:f},p&&z),c?Object.assign(Object.assign({},r),{},((d={})[h]=a?"0":"",d[m]=u?"0":"",d.transform=2>(v.devicePixelRatio||1)?"translate("+e+"px, "+l+"px)":"translate3d("+e+"px, "+l+"px, 0)",d)):Object.assign(Object.assign({},r),{},((t={})[h]=a?l+"px":"",t[m]=u?e+"px":"",t.transform="",t))}function A(e){return e.replace(/left|right|bottom|top/g,(function(e){return G[e]}))}function H(e){return e.replace(/start|end/g,(function(e){return J[e]}))}function R(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 S(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var T=["top","bottom","right","left"],q=T.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),C=[].concat(T,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),N="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),V={placement:"bottom",modifiers:[],strategy:"absolute"},I={passive:!0},_={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,o=(e=e.options).scroll,i=void 0===o||o,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",r.update,I)})),a&&s.addEventListener("resize",r.update,I),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",r.update,I)})),a&&s.removeEventListener("resize",r.update,I)}},data:{}},U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=E({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},z={top:"auto",right:"auto",bottom:"auto",left:"auto"},F={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var r=n.adaptive;r=void 0===r||r,n=void 0===(n=n.roundOffsets)||n,e={placement:y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),W(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),W(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})},data:{}},X={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];i(o)&&a(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.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]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(r)&&a(r)&&(Object.assign(r.style,e),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},Y={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,r=void 0===(e=e.options.offset)?[0,0]:e,o=(e=C.reduce((function(e,n){var o=t.rects,i=y(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof r?r(Object.assign(Object.assign({},o),{},{placement:n})):r;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:o}:{x:o,y:s},e[n]=i,e}),{}))[t.placement],i=o.x;o=o.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=o),t.modifiersData[n]=e}},G={left:"right",right:"left",bottom:"top",top:"bottom"},J={start:"end",end:"start"},K={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var r=n.mainAxis;r=void 0===r||r;var o=n.altAxis;o=void 0===o||o;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,c=n.altBoundary,p=n.flipVariations,l=void 0===p||p,u=n.allowedAutoPlacements;p=y(n=t.options.placement),i=i||(p!==n&&l?function(e){if("auto"===y(e))return[];var t=A(e);return[H(e),t,H(t)]}(n):[A(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===y(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,r=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?C:a,f=t.placement.split("-")[1];0===(i=(t=f?i?q:q.filter((function(e){return e.split("-")[1]===f})):T).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var c=i.reduce((function(t,i){return t[i]=L(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[y(i)],t}),{});return Object.keys(c).sort((function(e,t){return c[e]-c[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var m=new Map;p=!0;for(var h=d[0],g=0;g<d.length;g++){var v=d[g],b=y(v),O="start"===v.split("-")[1],w=0<=["top","bottom"].indexOf(b),x=w?"width":"height",j=L(t,{placement:v,boundary:s,rootBoundary:f,altBoundary:c,padding:a});if(O=w?O?"right":"left":O?"bottom":"top",n[x]>i[x]&&(O=A(O)),x=A(O),w=[],r&&w.push(0>=j[b]),o&&w.push(0>=j[O],0>=j[x]),w.every((function(e){return e}))){h=v,p=!1;break}m.set(v,w)}if(p)for(r=function(e){var t=d.find((function(t){if(t=m.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return h=t,"break"},o=l?3:1;0<o&&"break"!==r(o);o--);t.placement!==h&&(t.modifiersData[e]._skip=!0,t.placement=h,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Q={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var r=n.mainAxis,o=void 0===r||r;r=void 0!==(r=n.altAxis)&&r;var i=n.tether;i=void 0===i||i;var a=n.tetherOffset,s=void 0===a?0:a;n=L(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),a=y(t.placement);var f=t.placement.split("-")[1],c=!f,p=M(a);a="x"===p?"y":"x";var l=t.modifiersData.popperOffsets,d=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):s;if(s={x:0,y:0},l){if(o){var v="y"===p?"top":"left",b="y"===p?"bottom":"right",O="y"===p?"height":"width";o=l[p];var w=l[p]+n[v],x=l[p]-n[b],j=i?-m[O]/2:0,E="start"===f?d[O]:m[O];f="start"===f?-m[O]:-d[O],m=t.elements.arrow,m=i&&m?u(m):{width:0,height:0};var D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=D[v],b=D[b],m=Math.max(0,Math.min(d[O],m[O])),E=c?d[O]/2-j-m-v-h:E-m-v-h,c=c?-d[O]/2+j+m+b+h:f+m+b+h,h=t.elements.arrow&&g(t.elements.arrow),d=t.modifiersData.offset?t.modifiersData.offset[t.placement][p]:0,h=l[p]+E-d-(h?"y"===p?h.clientTop||0:h.clientLeft||0:0),c=l[p]+c-d,i=Math.max(i?Math.min(w,h):w,Math.min(o,i?Math.max(x,c):x)),l[p]=i,s[p]=i-o}r&&(r=l[a],i=Math.max(r+n["x"===p?"top":"left"],Math.min(r,r-n["x"===p?"bottom":"right"])),l[a]=i,s[a]=i-r),t.modifiersData[e]=s}},requiresIfExists:["offset"]},Z={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state;e=e.name;var r=n.elements.arrow,o=n.modifiersData.popperOffsets,i=y(n.placement),a=M(i);if(i=0<=["left","right"].indexOf(i)?"height":"width",r&&o){var s=n.modifiersData[e+"#persistent"].padding,f=u(r),c="y"===a?"top":"left",p="y"===a?"bottom":"right",l=n.rects.reference[i]+n.rects.reference[a]-o[a]-n.rects.popper[i];o=o[a]-n.rects.reference[a],l=(r=(r=g(r))?"y"===a?r.clientHeight||0:r.clientWidth||0:0)/2-f[i]/2+(l/2-o/2),i=Math.max(s[c],Math.min(l,r-f[i]-s[p])),n.modifiersData[e]=((t={})[a]=i,t.centerOffset=i-l,t)}},effect:function(e){var t=e.state,n=e.options;e=e.name;var r=n.element;if(r=void 0===r?"[data-popper-arrow]":r,n=void 0===(n=n.padding)?0:n,null!=r){if("string"==typeof r&&!(r=t.elements.popper.querySelector(r)))return;O(t.elements.popper,r)&&(t.elements.arrow=r,t.modifiersData[e+"#persistent"]={padding:D("number"!=typeof n?n:P(n,T))})}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},$={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,i=L(t,{elementContext:"reference"}),a=L(t,{altBoundary:!0});n=R(i,n),r=R(a,r,o),o=S(n),a=S(r),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:r,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":o,"data-popper-escaped":a})}},ee=B({defaultModifiers:[_,U,F,X]}),te=[_,U,F,X,Y,K,Q,Z,$],ne=B({defaultModifiers:te});e.applyStyles=X,e.arrow=Z,e.computeStyles=F,e.createPopper=ne,e.createPopperLite=ee,e.defaultModifiers=te,e.detectOverflow=L,e.eventListeners=_,e.flip=K,e.hide=$,e.offset=Y,e.popperGenerator=B,e.popperOffsets=U,e.preventOverflow=Q,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function r(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return t(s(e)).left+r(e).scrollLeft}function c(e){return n(e).getComputedStyle(e)}function p(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function l(e,o,c){void 0===c&&(c=!1);var l=s(o);e=t(e);var u=i(o),d={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(u||!u&&!c)&&(("body"!==a(o)||p(l))&&(d=o!==n(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:r(o)),i(o)?((m=t(o)).x+=o.clientLeft,m.y+=o.clientTop):l&&(m.x=f(l))),{x:e.left+d.scrollLeft-m.x,y:e.top+d.scrollTop-m.y,width:e.width,height:e.height}}function u(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function d(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||e.host||s(e)}function m(e,t){void 0===t&&(t=[]);var r=function e(t){return 0<=["html","body","#document"].indexOf(a(t))?t.ownerDocument.body:i(t)&&p(t)?t:e(d(t))}(e);e=r===e.ownerDocument.body;var o=n(r);return r=e?[o].concat(o.visualViewport||[],p(r)?r:[]):r,t=t.concat(r),e?t:t.concat(m(d(r)))}function h(e){if(!i(e)||"fixed"===c(e).position)return null;if(e=e.offsetParent){var t=s(e);if("body"===a(e)&&"static"===c(e).position&&"static"!==c(t).position)return t}return e}function g(e){for(var t=n(e),r=h(e);r&&0<=["table","td","th"].indexOf(a(r))&&"static"===c(r).position;)r=h(r);if(r&&"body"===a(r)&&"static"===c(r).position)return t;if(!r)e:{for(e=d(e);i(e)&&0>["html","body"].indexOf(a(e));){if("none"!==(r=c(e)).transform||"none"!==r.perspective||r.willChange&&"auto"!==r.willChange){r=e;break e}e=e.parentNode}r=null}return r||t}function v(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(r){n.has(r)||(r=t.get(r))&&e(r)})),r.push(o)}(e)})),r}function b(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function y(e){return e.split("-")[0]}function O(e,t){var r,o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if((r=o)&&(r=o instanceof(r=n(o).ShadowRoot)||o instanceof ShadowRoot),r)do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function w(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function x(e,o){if("viewport"===o){o=n(e);var a=s(e);o=o.visualViewport;var p=a.clientWidth;a=a.clientHeight;var l=0,u=0;o&&(p=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=o.offsetLeft,u=o.offsetTop)),e=w(e={width:p,height:a,x:l+f(e),y:u})}else i(o)?((e=t(o)).top+=o.clientTop,e.left+=o.clientLeft,e.bottom=e.top+o.clientHeight,e.right=e.left+o.clientWidth,e.width=o.clientWidth,e.height=o.clientHeight,e.x=e.left,e.y=e.top):(u=s(e),e=s(u),l=r(u),o=u.ownerDocument.body,p=Math.max(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Math.max(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-l.scrollLeft+f(u),l=-l.scrollTop,"rtl"===c(o||e).direction&&(u+=Math.max(e.clientWidth,o?o.clientWidth:0)-p),e=w({width:p,height:a,x:u,y:l}));return e}function j(e,t,n){return t="clippingParents"===t?function(e){var t=m(d(e)),n=0<=["absolute","fixed"].indexOf(c(e).position)&&i(e)?g(e):e;return o(n)?t.filter((function(e){return o(e)&&O(e,n)&&"body"!==a(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=x(e,n),t.top=Math.max(n.top,t.top),t.right=Math.min(n.right,t.right),t.bottom=Math.min(n.bottom,t.bottom),t.left=Math.max(n.left,t.left),t}),x(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function M(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function E(e){var t=e.reference,n=e.element,r=(e=e.placement)?y(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(r){case"top":o={x:o,y:t.y-n.height};break;case"bottom":o={x:o,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:i};break;case"left":o={x:t.x-n.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(r=r?M(r):null))switch(i="y"===r?"height":"width",e){case"start":o[r]-=t[i]/2-n[i]/2;break;case"end":o[r]+=t[i]/2-n[i]/2}return o}function D(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function P(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function L(e,n){void 0===n&&(n={});var r=n;n=void 0===(n=r.placement)?e.placement:n;var i=r.boundary,a=void 0===i?"clippingParents":i,f=void 0===(i=r.rootBoundary)?"viewport":i;i=void 0===(i=r.elementContext)?"popper":i;var c=r.altBoundary,p=void 0!==c&&c;r=D("number"!=typeof(r=void 0===(r=r.padding)?0:r)?r:P(r,T));var l=e.elements.reference;c=e.rects.popper,a=j(o(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||s(e.elements.popper),a,f),p=E({reference:f=t(l),element:c,strategy:"absolute",placement:n}),c=w(Object.assign(Object.assign({},c),p)),f="popper"===i?c:f;var u={top:a.top-f.top+r.top,bottom:f.bottom-a.bottom+r.bottom,left:a.left-f.left+r.left,right:f.right-a.right+r.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u}function k(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function B(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?V:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},V),r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:s,setOptions:function(i){return a(),s.options=Object.assign(Object.assign(Object.assign({},r),s.options),i),s.scrollParents={reference:o(e)?m(e):e.contextElement?m(e.contextElement):[],popper:m(t)},i=function(e){var t=v(e);return N.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(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:p,options:n}),f.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference;if(k(t,e=e.popper))for(s.rects={reference:l(t,g(e),"fixed"===s.options.strategy),popper:u(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var r=n.options;r=void 0===r?{}:r,n=n.name,"function"==typeof e&&(s=e({state:s,options:r,name:n,instance:p})||s)}}},update:b((function(){return new Promise((function(e){p.forceUpdate(),e(s)}))})),destroy:function(){a(),c=!0}};return k(e,t)?(p.setOptions(i).then((function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function W(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,f=e.position,c=e.gpuAcceleration,p=e.adaptive;if(!0===(e=e.roundOffsets)){e=a.y;var l=window.devicePixelRatio||1;e={x:z(z(a.x*l)/l)||0,y:z(z(e*l)/l)||0}}else e="function"==typeof e?e(a):a;e=void 0===(e=(l=e).x)?0:e,l=void 0===(l=l.y)?0:l;var u=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,m="left",h="top",v=window;if(p){var b=g(r);b===n(r)&&(b=s(r)),"top"===i&&(h="bottom",l-=b.clientHeight-o.height,l*=c?1:-1),"left"===i&&(m="right",e-=b.clientWidth-o.width,e*=c?1:-1)}return r=Object.assign({position:f},p&&F),c?Object.assign(Object.assign({},r),{},((d={})[h]=a?"0":"",d[m]=u?"0":"",d.transform=2>(v.devicePixelRatio||1)?"translate("+e+"px, "+l+"px)":"translate3d("+e+"px, "+l+"px, 0)",d)):Object.assign(Object.assign({},r),{},((t={})[h]=a?l+"px":"",t[m]=u?e+"px":"",t.transform="",t))}function A(e){return e.replace(/left|right|bottom|top/g,(function(e){return J[e]}))}function H(e){return e.replace(/start|end/g,(function(e){return K[e]}))}function R(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 S(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var T=["top","bottom","right","left"],q=T.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),C=[].concat(T,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),N="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),V={placement:"bottom",modifiers:[],strategy:"absolute"},I={passive:!0},_={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,o=(e=e.options).scroll,i=void 0===o||o,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",r.update,I)})),a&&s.addEventListener("resize",r.update,I),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",r.update,I)})),a&&s.removeEventListener("resize",r.update,I)}},data:{}},U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=E({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},z=Math.round,F={top:"auto",right:"auto",bottom:"auto",left:"auto"},X={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var r=n.adaptive;r=void 0===r||r,n=void 0===(n=n.roundOffsets)||n,e={placement:y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),W(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),W(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})},data:{}},Y={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];i(o)&&a(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.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]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(r)&&a(r)&&(Object.assign(r.style,e),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},G={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,r=void 0===(e=e.options.offset)?[0,0]:e,o=(e=C.reduce((function(e,n){var o=t.rects,i=y(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof r?r(Object.assign(Object.assign({},o),{},{placement:n})):r;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:o}:{x:o,y:s},e[n]=i,e}),{}))[t.placement],i=o.x;o=o.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=o),t.modifiersData[n]=e}},J={left:"right",right:"left",bottom:"top",top:"bottom"},K={start:"end",end:"start"},Q={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var r=n.mainAxis;r=void 0===r||r;var o=n.altAxis;o=void 0===o||o;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,c=n.altBoundary,p=n.flipVariations,l=void 0===p||p,u=n.allowedAutoPlacements;p=y(n=t.options.placement),i=i||(p!==n&&l?function(e){if("auto"===y(e))return[];var t=A(e);return[H(e),t,H(t)]}(n):[A(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===y(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,r=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?C:a,f=t.placement.split("-")[1];0===(i=(t=f?i?q:q.filter((function(e){return e.split("-")[1]===f})):T).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var c=i.reduce((function(t,i){return t[i]=L(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[y(i)],t}),{});return Object.keys(c).sort((function(e,t){return c[e]-c[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var m=new Map;p=!0;for(var h=d[0],g=0;g<d.length;g++){var v=d[g],b=y(v),O="start"===v.split("-")[1],w=0<=["top","bottom"].indexOf(b),x=w?"width":"height",j=L(t,{placement:v,boundary:s,rootBoundary:f,altBoundary:c,padding:a});if(O=w?O?"right":"left":O?"bottom":"top",n[x]>i[x]&&(O=A(O)),x=A(O),w=[],r&&w.push(0>=j[b]),o&&w.push(0>=j[O],0>=j[x]),w.every((function(e){return e}))){h=v,p=!1;break}m.set(v,w)}if(p)for(r=function(e){var t=d.find((function(t){if(t=m.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return h=t,"break"},o=l?3:1;0<o&&"break"!==r(o);o--);t.placement!==h&&(t.modifiersData[e]._skip=!0,t.placement=h,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Z={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var r=n.mainAxis,o=void 0===r||r;r=void 0!==(r=n.altAxis)&&r;var i=n.tether;i=void 0===i||i;var a=n.tetherOffset,s=void 0===a?0:a;n=L(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),a=y(t.placement);var f=t.placement.split("-")[1],c=!f,p=M(a);a="x"===p?"y":"x";var l=t.modifiersData.popperOffsets,d=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):s;if(s={x:0,y:0},l){if(o){var v="y"===p?"top":"left",b="y"===p?"bottom":"right",O="y"===p?"height":"width";o=l[p];var w=l[p]+n[v],x=l[p]-n[b],j=i?-m[O]/2:0,E="start"===f?d[O]:m[O];f="start"===f?-m[O]:-d[O],m=t.elements.arrow,m=i&&m?u(m):{width:0,height:0};var D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=D[v],b=D[b],m=Math.max(0,Math.min(d[O],m[O])),E=c?d[O]/2-j-m-v-h:E-m-v-h,c=c?-d[O]/2+j+m+b+h:f+m+b+h,h=t.elements.arrow&&g(t.elements.arrow),d=t.modifiersData.offset?t.modifiersData.offset[t.placement][p]:0,h=l[p]+E-d-(h?"y"===p?h.clientTop||0:h.clientLeft||0:0),c=l[p]+c-d,i=Math.max(i?Math.min(w,h):w,Math.min(o,i?Math.max(x,c):x)),l[p]=i,s[p]=i-o}r&&(r=l[a],i=Math.max(r+n["x"===p?"top":"left"],Math.min(r,r-n["x"===p?"bottom":"right"])),l[a]=i,s[a]=i-r),t.modifiersData[e]=s}},requiresIfExists:["offset"]},$={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state;e=e.name;var r=n.elements.arrow,o=n.modifiersData.popperOffsets,i=y(n.placement),a=M(i);if(i=0<=["left","right"].indexOf(i)?"height":"width",r&&o){var s=n.modifiersData[e+"#persistent"].padding,f=u(r),c="y"===a?"top":"left",p="y"===a?"bottom":"right",l=n.rects.reference[i]+n.rects.reference[a]-o[a]-n.rects.popper[i];o=o[a]-n.rects.reference[a],l=(r=(r=g(r))?"y"===a?r.clientHeight||0:r.clientWidth||0:0)/2-f[i]/2+(l/2-o/2),i=Math.max(s[c],Math.min(l,r-f[i]-s[p])),n.modifiersData[e]=((t={})[a]=i,t.centerOffset=i-l,t)}},effect:function(e){var t=e.state,n=e.options;e=e.name;var r=n.element;if(r=void 0===r?"[data-popper-arrow]":r,n=void 0===(n=n.padding)?0:n,null!=r){if("string"==typeof r&&!(r=t.elements.popper.querySelector(r)))return;O(t.elements.popper,r)&&(t.elements.arrow=r,t.modifiersData[e+"#persistent"]={padding:D("number"!=typeof n?n:P(n,T))})}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},ee={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,i=L(t,{elementContext:"reference"}),a=L(t,{altBoundary:!0});n=R(i,n),r=R(a,r,o),o=S(n),a=S(r),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:r,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":o,"data-popper-escaped":a})}},te=B({defaultModifiers:[_,U,X,Y]}),ne=[_,U,X,Y,G,Q,Z,$,ee],re=B({defaultModifiers:ne});e.applyStyles=Y,e.arrow=$,e.computeStyles=X,e.createPopper=re,e.createPopperLite=te,e.defaultModifiers=ne,e.detectOverflow=L,e.eventListeners=_,e.flip=Q,e.hide=ee,e.offset=G,e.popperGenerator=B,e.popperOffsets=U,e.preventOverflow=Z,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper.min.js.map |
import getScrollParent from "./getScrollParent.js"; | ||
import getParentNode from "./getParentNode.js"; | ||
import getNodeName from "./getNodeName.js"; | ||
import getWindow from "./getWindow.js"; | ||
@@ -19,3 +18,3 @@ import isScrollParent from "./isScrollParent.js"; | ||
var scrollParent = getScrollParent(element); | ||
var isBody = getNodeName(scrollParent) === 'body'; | ||
var isBody = scrollParent === element.ownerDocument.body; | ||
var win = getWindow(scrollParent); | ||
@@ -22,0 +21,0 @@ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; |
@@ -1,7 +0,12 @@ | ||
import { PositioningStrategy, Modifier, Rect } from "../types"; | ||
import { PositioningStrategy, Offsets, Modifier, Rect } from "../types"; | ||
import { BasePlacement } from "../enums"; | ||
export declare type RoundOffsets = (offsets: Partial<{ | ||
x: number; | ||
y: number; | ||
centerOffset: number; | ||
}>) => Offsets; | ||
export declare type Options = { | ||
gpuAcceleration: boolean; | ||
adaptive: boolean; | ||
roundOffsets: boolean; | ||
roundOffsets?: boolean | RoundOffsets; | ||
}; | ||
@@ -20,3 +25,3 @@ export declare function mapToStyles({ popper, popperRect, placement, offsets, position, gpuAcceleration, adaptive, roundOffsets }: { | ||
adaptive: boolean; | ||
roundOffsets: boolean; | ||
roundOffsets: boolean | RoundOffsets; | ||
}): { | ||
@@ -23,0 +28,0 @@ transform: string; |
@@ -8,2 +8,3 @@ import { top, left, right, bottom } from "../enums.js"; | ||
var round = Math.round; | ||
var unsetSides = { | ||
@@ -24,4 +25,4 @@ top: 'auto', | ||
return { | ||
x: Math.round(x * dpr) / dpr || 0, | ||
y: Math.round(y * dpr) / dpr || 0 | ||
x: round(round(x * dpr) / dpr) || 0, | ||
y: round(round(y * dpr) / dpr) || 0 | ||
}; | ||
@@ -42,3 +43,3 @@ } | ||
var _ref3 = roundOffsets ? roundOffsetsByDPR(offsets) : offsets, | ||
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, | ||
_ref3$x = _ref3.x, | ||
@@ -45,0 +46,0 @@ x = _ref3$x === void 0 ? 0 : _ref3$x, |
{ | ||
"name": "@popperjs/core", | ||
"version": "2.6.0", | ||
"version": "2.7.0", | ||
"description": "Tooltip and Popover Positioning Engine", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/popper.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1474657
11062