react-popper
Advanced tools
Comparing version 0.7.2 to 0.7.3
## CHANGELOG | ||
### 0.7.3 | ||
Upgraded dependencies [#44](https://github.com/souporserious/react-popper/pull/44) | ||
Fix missing data-x-out-of-boundaries attribute [#45](https://github.com/souporserious/react-popper/pull/45) | ||
Update how react-popper.d.ts imports PopperJS [#51](https://github.com/souporserious/react-popper/pull/51) | ||
### 0.7.2 | ||
@@ -3,0 +10,0 @@ Fix `top` and `left` arrow calculation. Disregard the note below about changing the CSS positioning, this was an error on `react-popper`'s part. |
/*! | ||
* React Popper 0.7.2 | ||
* React Popper 0.7.3 | ||
* https://github.com/souporserious/react-popper | ||
* Copyright (c) 2017 React Popper Authors | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ReactPopper=t(require("react"),require("prop-types")):e.ReactPopper=t(e.React,e.PropTypes)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=t.Popper=t.Target=t.Manager=void 0;var o=n(1),i=r(o),a=n(4),f=r(a),p=n(5),s=r(p),u=n(9),c=r(u);t.Manager=i.default,t.Target=f.default,t.Popper=s.default,t.Arrow=c.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),u=(r(s),n(3)),c=r(u),l=function(e){function t(){var e,n,r,o;i(this,t);for(var f=arguments.length,p=Array(f),s=0;s<f;s++)p[s]=arguments[s];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(p))),r._setTargetNode=function(e){r._targetNode=e},r._getTargetNode=function(){return r._targetNode},o=n,a(r,o)}return f(t,e),p(t,[{key:"getChildContext",value:function(){return{popperManager:{setTargetNode:this._setTargetNode,getTargetNode:this._getTargetNode}}}},{key:"render",value:function(){var e=this.props,t=e.tag,n=e.children,r=o(e,["tag","children"]);return t!==!1?(0,s.createElement)(t,r,n):n}}]),t}(s.Component);l.childContextTypes={popperManager:c.default.object.isRequired},l.propTypes={tag:c.default.oneOfType([c.default.string,c.default.bool])},l.defaultProps={tag:"div"},t.default=l},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(2),f=(r(a),n(3)),p=r(f),s=function(e,t){var n=e.component,r=void 0===n?"div":n,f=e.innerRef,p=e.children,s=o(e,["component","innerRef","children"]),u=t.popperManager,c=function(e){u.setTargetNode(e),"function"==typeof f&&f(e)};if("function"==typeof p){var l={ref:c};return p({targetProps:l,restProps:s})}var d=i({},s);return"string"==typeof r?d.ref=c:d.innerRef=c,(0,a.createElement)(r,d,p)};s.contextTypes={popperManager:p.default.object.isRequired},s.propTypes={component:p.default.oneOfType([p.default.node,p.default.func]),innerRef:p.default.func,children:p.default.oneOfType([p.default.node,p.default.func])},t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),l=(r(c),n(3)),d=r(l),h=n(6),m=r(h),v=n(7),b=r(v),Popper=function(e){function Popper(){var e,t,n,r;a(this,Popper);for(var o=arguments.length,i=Array(o),p=0;p<o;p++)i[p]=arguments[p];return t=n=f(this,(e=Popper.__proto__||Object.getPrototypeOf(Popper)).call.apply(e,[this].concat(i))),n.state={},n._setArrowNode=function(e){n._arrowNode=e},n._getTargetNode=function(){return n.context.popperManager.getTargetNode()},n._updateStateModifier={enabled:!0,order:900,fn:function(e){return(n.state.data&&!(0,b.default)(e.offsets,n.state.data.offsets)||!n.state.data)&&n.setState({data:e}),e}},n._getPopperStyle=function(){var e=n.state.data;if(!n._popper||!e)return{position:"absolute",pointerEvents:"none",opacity:0};var t=e.offsets.popper,r=(t.top,t.left,t.position);return s({position:r},e.styles)},n._getPopperPlacement=function(){return n.state.data?n.state.data.placement:void 0},n._getArrowStyle=function(){if(n.state.data&&n.state.data.offsets.arrow){var e=n.state.data.offsets.arrow,t=e.top,r=e.left;return{top:t,left:r}}return{}},r=t,f(n,r)}return p(Popper,e),u(Popper,[{key:"getChildContext",value:function(){return{popper:{setArrowNode:this._setArrowNode,getArrowStyle:this._getArrowStyle}}}},{key:"componentDidMount",value:function(){this._updatePopper()}},{key:"componentDidUpdate",value:function(e){e.placement===this.props.placement&&e.eventsEnabled===this.props.eventsEnabled||this._updatePopper(),this._popper&&e.children!==this.props.children&&this._popper.scheduleUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyPopper()}},{key:"_updatePopper",value:function(){this._destroyPopper(),this._node&&this._createPopper()}},{key:"_createPopper",value:function(){var e=this.props,t=e.placement,n=e.eventsEnabled,r=s({},this.props.modifiers,{applyStyle:{enabled:!1},updateState:this._updateStateModifier});this._arrowNode&&(r.arrow={element:this._arrowNode}),this._popper=new m.default(this._getTargetNode(),this._node,{placement:t,eventsEnabled:n,modifiers:r}),this._popper.scheduleUpdate()}},{key:"_destroyPopper",value:function(){this._popper&&this._popper.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.component,r=t.innerRef,a=(t.placement,t.eventsEnabled,t.modifiers,t.children),f=i(t,["component","innerRef","placement","eventsEnabled","modifiers","children"]),p=function(t){e._node=t,"function"==typeof r&&r(t)},u=this._getPopperStyle(),l=this._getPopperPlacement();if("function"==typeof a){var d=o({ref:p,style:u},"data-placement",l);return a({popperProps:d,restProps:f,scheduleUpdate:this._popper&&this._popper.scheduleUpdate})}var h=s({},f,{style:s({},f.style,u),"data-placement":l});return"string"==typeof n?h.ref=p:h.innerRef=p,(0,c.createElement)(n,h,a)}}]),Popper}(c.Component);Popper.contextTypes={popperManager:d.default.object.isRequired},Popper.childContextTypes={popper:d.default.object.isRequired},Popper.propTypes={component:d.default.oneOfType([d.default.node,d.default.func]),innerRef:d.default.func,placement:d.default.oneOf(m.default.placements),eventsEnabled:d.default.bool,modifiers:d.default.object,children:d.default.oneOfType([d.default.node,d.default.func])},Popper.defaultProps={component:"div",placement:"bottom",eventsEnabled:!0,modifiers:{}},t.default=Popper},function(e,t,n){var r,o;(function(i){"use strict";var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};/**! | ||
* @fileOverview Kickass library to create and place poppers near their reference elements. | ||
* @version 1.10.8 | ||
* @license | ||
* Copyright (c) 2016 Federico Zivolo and contributors | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
!function(i,f){"object"===a(t)&&"undefined"!=typeof e?e.exports=f():(r=f,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o)))}(void 0,function(){function e(e){var t=!1,n=0,r=document.createElement("span"),o=new MutationObserver(function(){e(),t=!1});return o.observe(r,{attributes:!0}),function(){t||(t=!0,r.setAttribute("x-index",n),n+=1)}}function t(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},se))}}function n(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function r(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function o(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function a(e){if(!e||["HTML","BODY","#document"].indexOf(e.nodeName)!==-1)return window.document.body;var t=r(e),n=t.overflow,i=t.overflowX,f=t.overflowY;return/(auto|scroll)/.test(n+f+i)?e:a(o(e))}function f(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function p(e){return null!==e.parentNode?p(e.parentNode):e}function s(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function u(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return f(a)?a:s(a);var c=p(e);return c.host?u(c.host,t):u(e,p(t).host)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=window.document.documentElement,i=window.document.scrollingElement||o;return i[n]}return e[n]}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=c(t,"top"),o=c(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function d(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+r+"Width"].split("px")[0]}function h(e,t,n,r){return Math.max(t["offset"+e],n["client"+e],n["offset"+e],he()?n["offset"+e]+r["margin"+("Height"===e?"Top":"Left")]+r["margin"+("Height"===e?"Bottom":"Right")]:0)}function m(){var e=window.document.body,t=window.document.documentElement,n=he()&&window.getComputedStyle(t);return{height:h("Height",e,t,n),width:h("Width",e,t,n)}}function v(e){return ye({},e,{right:e.left+e.width,bottom:e.top+e.height})}function b(e){var t={};if(he())try{t=e.getBoundingClientRect();var n=c(e,"top"),o=c(e,"left");t.top+=n,t.left+=o,t.bottom+=n,t.right+=o}catch(e){}else t=e.getBoundingClientRect();var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?m():{},f=a.width||e.clientWidth||i.right-i.left,p=a.height||e.clientHeight||i.bottom-i.top,s=e.offsetWidth-f,u=e.offsetHeight-p;if(s||u){var l=r(e);s-=d(l,"x"),u-=d(l,"y"),i.width-=s,i.height-=u}return v(i)}function y(e,t){var n=he(),o="HTML"===t.nodeName,i=b(e),f=b(t),p=a(e),s=r(t),u=+s.borderTopWidth.split("px")[0],c=+s.borderLeftWidth.split("px")[0],d=v({top:i.top-f.top-u,left:i.left-f.left-c,width:i.width,height:i.height});if(d.marginTop=0,d.marginLeft=0,!n&&o){var h=+s.marginTop.split("px")[0],m=+s.marginLeft.split("px")[0];d.top-=u-h,d.bottom-=u-h,d.left-=c-m,d.right-=c-m,d.marginTop=h,d.marginLeft=m}return(n?t.contains(p):t===p&&"BODY"!==p.nodeName)&&(d=l(d,t)),d}function g(e){var t=window.document.documentElement,n=y(e,t),r=Math.max(t.clientWidth,window.innerWidth||0),o=Math.max(t.clientHeight,window.innerHeight||0),i=c(t),a=c(t,"left"),f={top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:o};return v(f)}function w(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===r(e,"position")||w(o(e)))}function O(e,t,n,r){var i={top:0,left:0},f=u(e,t);if("viewport"===r)i=g(f);else{var p=void 0;"scrollParent"===r?(p=a(o(e)),"BODY"===p.nodeName&&(p=window.document.documentElement)):p="window"===r?window.document.documentElement:r;var s=y(p,f);if("HTML"!==p.nodeName||w(f))i=s;else{var c=m(),l=c.height,d=c.width;i.top+=s.top-s.marginTop,i.bottom=l+s.top,i.left+=s.left-s.marginLeft,i.right=d+s.left}}return i.left+=n,i.top+=n,i.right-=n,i.bottom-=n,i}function x(e){var t=e.width,n=e.height;return t*n}function _(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var a=O(n,r,i,o),f={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},p=Object.keys(f).map(function(e){return ye({key:e},f[e],{area:x(f[e])})}).sort(function(e,t){return t.area-e.area}),s=p.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),u=s.length>0?s[0].key:p[0].key,c=e.split("-")[1];return u+(c?"-"+c:"")}function E(e,t,n){var r=u(t,n);return y(n,r)}function P(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight),o={width:e.offsetWidth+r,height:e.offsetHeight+n};return o}function T(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function j(e,t,n){n=n.split("-")[0];var r=P(e),o={width:r.width,height:r.height},i=["right","left"].indexOf(n)!==-1,a=i?"top":"left",f=i?"left":"top",p=i?"height":"width",s=i?"width":"height";return o[a]=t[a]+t[p]/2-r[p]/2,n===f?o[f]=t[f]-r[s]:o[f]=t[T(f)],o}function M(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function N(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=M(e,function(e){return e[t]===n});return e.indexOf(r)}function S(e,t,r){var o=void 0===r?e:e.slice(0,N(e,"name",r));return o.forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=e.function||e.fn;e.enabled&&n(r)&&(t.offsets.popper=v(t.offsets.popper),t.offsets.reference=v(t.offsets.reference),t=r(t,e))}),t}function C(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=E(this.state,this.popper,this.reference),e.placement=_(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=j(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=S(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function L(e,t){return e.some(function(e){var n=e.name,r=e.enabled;return r&&n===t})}function k(e){for(var t=[!1,"ms","webkit","moz","o"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length-1;r++){var o=t[r],i=o?""+o+n:e;if("undefined"!=typeof window.document.body.style[i])return i}return null}function R(){return this.state.isDestroyed=!0,L(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[k("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function A(e,t,n,r){var o="BODY"===e.nodeName,i=o?window:e;i.addEventListener(t,n,{passive:!0}),o||A(a(i.parentNode),t,n,r),r.push(i)}function W(e,t,n,r){n.updateBound=r,window.addEventListener("resize",n.updateBound,{passive:!0});var o=a(e);return A(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function D(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function H(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function B(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=H(this.reference,this.state))}function U(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function q(e,t){Object.keys(t).forEach(function(n){var r="";["width","height","top","right","bottom","left"].indexOf(n)!==-1&&U(t[n])&&(r="px"),e.style[n]=t[n]+r})}function I(e,t){Object.keys(t).forEach(function(n){var r=t[n];r!==!1?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function F(e){return q(e.instance.popper,e.styles),I(e.instance.popper,e.attributes),e.offsets.arrow&&q(e.arrowElement,e.offsets.arrow),e}function Y(e,t,n,r,o){var i=E(o,t,e),a=_(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),q(t,{position:"absolute"}),n}function K(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=M(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,f=s(e.instance.popper),p=b(f),u={position:o.position},c={left:Math.floor(o.left),top:Math.floor(o.top),bottom:Math.floor(o.bottom),right:Math.floor(o.right)},l="bottom"===n?"top":"bottom",d="right"===r?"left":"right",h=k("transform"),m=void 0,v=void 0;if(v="bottom"===l?-p.height+c.bottom:c.top,m="right"===d?-p.width+c.right:c.left,a&&h)u[h]="translate3d("+m+"px, "+v+"px, 0)",u[l]=0,u[d]=0,u.willChange="transform";else{var y="bottom"===l?-1:1,g="right"===d?-1:1;u[l]=v*y,u[d]=m*g,u.willChange=l+", "+d}var w={"x-placement":e.placement};return e.attributes=ye({},w,e.attributes),e.styles=ye({},u,e.styles),e}function z(e,t,n){var r=M(e,function(e){var n=e.name;return n===t}),o=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function G(e,t){if(!z(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],o=e.offsets,i=o.popper,a=o.reference,f=["left","right"].indexOf(r)!==-1,p=f?"height":"width",s=f?"top":"left",u=f?"left":"top",c=f?"bottom":"right",l=P(n)[p];a[c]-l<i[s]&&(e.offsets.popper[s]-=i[s]-(a[c]-l)),a[s]+l>i[c]&&(e.offsets.popper[s]+=a[s]+l-i[c]);var d=a[s]+a[p]/2-l/2,h=d-v(e.offsets.popper)[s];return h=Math.max(Math.min(i[p]-l,h),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[s]=Math.round(h),e.offsets.arrow[u]="",e}function V(e){return"end"===e?"start":"start"===e?"end":e}function X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=we.indexOf(e),r=we.slice(n+1).concat(we.slice(0,n));return t?r.reverse():r}function J(e,t){if(L(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=O(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),r=e.placement.split("-")[0],o=T(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Oe.FLIP:a=[r,o];break;case Oe.CLOCKWISE:a=X(r);break;case Oe.COUNTERCLOCKWISE:a=X(r,!0);break;default:a=t.behavior}return a.forEach(function(f,p){if(r!==f||a.length===p+1)return e;r=e.placement.split("-")[0],o=T(r);var s=e.offsets.popper,u=e.offsets.reference,c=Math.floor,l="left"===r&&c(s.right)>c(u.left)||"right"===r&&c(s.left)<c(u.right)||"top"===r&&c(s.bottom)>c(u.top)||"bottom"===r&&c(s.top)<c(u.bottom),d=c(s.left)<c(n.left),h=c(s.right)>c(n.right),m=c(s.top)<c(n.top),v=c(s.bottom)>c(n.bottom),b="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=["top","bottom"].indexOf(r)!==-1,g=!!t.flipVariations&&(y&&"start"===i&&d||y&&"end"===i&&h||!y&&"start"===i&&m||!y&&"end"===i&&v);(l||b||g)&&(e.flipped=!0,(l||b)&&(r=a[p+1]),g&&(i=V(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=ye({},e.offsets.popper,j(e.instance.popper,e.offsets.reference,e.placement)),e=S(e.instance.modifiers,e,"flip"))}),e}function Q(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=["top","bottom"].indexOf(o)!==-1,f=a?"right":"bottom",p=a?"left":"top",s=a?"width":"height";return n[f]<i(r[p])&&(e.offsets.popper[p]=i(r[p])-n[s]),n[p]>i(r[f])&&(e.offsets.popper[p]=i(r[f])),e}function Z(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var f=void 0;switch(a){case"%p":f=n;break;case"%":case"%r":default:f=r}var p=v(f);return p[t]/100*i}if("vh"===a||"vw"===a){var s=void 0;return s="vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),s/100*i}return i}function $(e,t,n,r){var o=[0,0],i=["right","left"].indexOf(r)!==-1,a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),f=a.indexOf(M(a,function(e){return e.search(/,|\s/)!==-1}));a[f]&&a[f].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var p=/\s*,\s*|\s+/,s=f!==-1?[a.slice(0,f).concat([a[f].split(p)[0]]),[a[f].split(p)[1]].concat(a.slice(f+1))]:[a];return s=s.map(function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&["+","-"].indexOf(t)!==-1?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return Z(e,o,t,n)})}),s.forEach(function(e,t){e.forEach(function(n,r){U(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))})}),o}function ee(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,f=r.split("-")[0],p=void 0;return p=U(+n)?[+n,0]:$(n,i,a,f),"left"===f?(i.top+=p[0],i.left-=p[1]):"right"===f?(i.top+=p[0],i.left+=p[1]):"top"===f?(i.left+=p[0],i.top-=p[1]):"bottom"===f&&(i.left+=p[0],i.top+=p[1]),e.popper=i,e}function te(e,t){var n=t.boundariesElement||s(e.instance.popper);e.instance.reference===n&&(n=s(n));var r=O(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=r;var o=t.priority,i=e.offsets.popper,a={primary:function(e){var n=i[e];return i[e]<r[e]&&!t.escapeWithReference&&(n=Math.max(i[e],r[e])),be({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=i[n];return i[e]>r[e]&&!t.escapeWithReference&&(o=Math.min(i[n],r[e]-("right"===e?i.width:i.height))),be({},n,o)}};return o.forEach(function(e){var t=["left","top"].indexOf(e)!==-1?"primary":"secondary";i=ye({},i,a[t](e))}),e.offsets.popper=i,e}function ne(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,f=["bottom","top"].indexOf(n)!==-1,p=f?"left":"top",s=f?"width":"height",u={start:be({},p,i[p]),end:be({},p,i[p]+i[s]-a[s])};e.offsets.popper=ye({},a,u[r])}return e}function re(e){if(!z(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=M(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function oe(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=["left","right"].indexOf(n)!==-1,f=["top","left"].indexOf(n)===-1;return o[a?"left":"top"]=i[t]-(f?o[a?"width":"height"]:0),e.placement=T(t),e.offsets.popper=v(o),e}for(var ie=["native code","[object MutationObserverConstructor]"],ae=function(e){return ie.some(function(t){return(e||"").toString().indexOf(t)>-1})},fe="undefined"!=typeof window,pe=["Edge","Trident","Firefox"],se=0,ue=0;ue<pe.length;ue+=1)if(fe&&navigator.userAgent.indexOf(pe[ue])>=0){se=1;break}var ce=fe&&ae(window.MutationObserver),le=ce?e:t,de=void 0,he=function(){return void 0===de&&(de=navigator.appVersion.indexOf("MSIE 10")!==-1),de},me=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ve=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),be=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ge=["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"],we=ge.slice(3),Oe={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},xe={shift:{order:100,enabled:!0,fn:ne},offset:{order:200,enabled:!0,fn:ee,offset:0},preventOverflow:{order:300,enabled:!0,fn:te,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:Q},arrow:{order:500,enabled:!0,fn:G,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:J,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:oe},hide:{order:800,enabled:!0,fn:re},computeStyle:{order:850,enabled:!0,fn:K,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:F,onLoad:Y,gpuAcceleration:void 0}},_e={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:xe},Popper=function(){function Popper(e,t){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};me(this,Popper),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=le(this.update.bind(this)),this.options=ye({},Popper.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e.jquery?e[0]:e,this.popper=t.jquery?t[0]:t,this.options.modifiers={},Object.keys(ye({},Popper.Defaults.modifiers,o.modifiers)).forEach(function(e){r.options.modifiers[e]=ye({},Popper.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return ye({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&n(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return ve(Popper,[{key:"update",value:function(){return C.call(this)}},{key:"destroy",value:function(){return R.call(this)}},{key:"enableEventListeners",value:function(){return D.call(this)}},{key:"disableEventListeners",value:function(){return B.call(this)}}]),Popper}();return Popper.Utils=("undefined"!=typeof window?window:i).PopperUtils,Popper.placements=ge,Popper.Defaults=_e,Popper})}).call(t,function(){return this}())},function(e,t,n){/*! | ||
* is-equal-shallow <https://github.com/jonschlinkert/is-equal-shallow> | ||
* | ||
* Copyright (c) 2015, Jon Schlinkert. | ||
* Licensed under the MIT License. | ||
*/ | ||
"use strict";var r=n(8);e.exports=function(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;var n,o=0,i=0;for(n in t)if(i++,!r(t[n])||!e.hasOwnProperty(n)||e[n]!==t[n])return!1;for(n in e)o++;return o===i}},function(e,t){/*! | ||
* is-primitive <https://github.com/jonschlinkert/is-primitive> | ||
* | ||
* Copyright (c) 2014-2015, Jon Schlinkert. | ||
* Licensed under the MIT License. | ||
*/ | ||
"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return null==e||"function"!=typeof e&&"object"!==("undefined"==typeof e?"undefined":n(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(2),f=(r(a),n(3)),p=r(f),s=function(e,t){var n=e.component,r=void 0===n?"span":n,f=e.innerRef,p=e.children,s=o(e,["component","innerRef","children"]),u=t.popper,c=function(e){u.setArrowNode(e),"function"==typeof f&&f(e)},l=u.getArrowStyle();if("function"==typeof p){var d={ref:c,style:l};return p({arrowProps:d,restProps:s})}var h=i({},s,{style:i({},l,s.style)});return"string"==typeof r?h.ref=c:h.innerRef=c,(0,a.createElement)(r,h,p)};s.contextTypes={popper:p.default.object.isRequired},s.propTypes={component:p.default.oneOfType([p.default.node,p.default.func]),innerRef:p.default.func,children:p.default.oneOfType([p.default.node,p.default.func])},t.default=s}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ReactPopper=t(require("react"),require("prop-types")):e.ReactPopper=t(e.React,e.PropTypes)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="dist/",t(t.s=2)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=t.Popper=t.Target=t.Manager=void 0;var o=n(3),i=r(o),a=n(4),f=r(a),s=n(5),p=r(s),u=n(8),c=r(u);t.Manager=i.default,t.Target=f.default,t.Popper=p.default,t.Arrow=c.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),u=(r(p),n(1)),c=r(u),l=function(e){function t(){var e,n,r,o;i(this,t);for(var f=arguments.length,s=Array(f),p=0;p<f;p++)s[p]=arguments[p];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r._setTargetNode=function(e){r._targetNode=e},r._getTargetNode=function(){return r._targetNode},o=n,a(r,o)}return f(t,e),s(t,[{key:"getChildContext",value:function(){return{popperManager:{setTargetNode:this._setTargetNode,getTargetNode:this._getTargetNode}}}},{key:"render",value:function(){var e=this.props,t=e.tag,n=e.children,r=o(e,["tag","children"]);return!1!==t?(0,p.createElement)(t,r,n):n}}]),t}(p.Component);l.childContextTypes={popperManager:c.default.object.isRequired},l.propTypes={tag:c.default.oneOfType([c.default.string,c.default.bool])},l.defaultProps={tag:"div"},t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),f=(r(a),n(1)),s=r(f),p=function(e,t){var n=e.component,r=void 0===n?"div":n,f=e.innerRef,s=e.children,p=o(e,["component","innerRef","children"]),u=t.popperManager,c=function(e){u.setTargetNode(e),"function"==typeof f&&f(e)};if("function"==typeof s){return s({targetProps:{ref:c},restProps:p})}var l=i({},p);return"string"==typeof r?l.ref=c:l.innerRef=c,(0,a.createElement)(r,l,s)};p.contextTypes={popperManager:s.default.object.isRequired},p.propTypes={component:s.default.oneOfType([s.default.node,s.default.func]),innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),l=(r(c),n(1)),d=r(l),h=n(6),m=r(h),Popper=function(e){function Popper(){var e,t,n,r;a(this,Popper);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return t=n=f(this,(e=Popper.__proto__||Object.getPrototypeOf(Popper)).call.apply(e,[this].concat(i))),n.state={},n._setArrowNode=function(e){n._arrowNode=e},n._getTargetNode=function(){return n.context.popperManager.getTargetNode()},n._getOffsets=function(e){return Object.keys(e.offsets).map(function(t){return e.offsets[t]})},n._isDataDirty=function(e){return!n.state.data||JSON.stringify(n._getOffsets(n.state.data))!==JSON.stringify(n._getOffsets(e))},n._updateStateModifier={enabled:!0,order:900,fn:function(e){return n._isDataDirty(e)&&n.setState({data:e}),e}},n._getPopperStyle=function(){var e=n.state.data;if(!n._popper||!e)return{position:"absolute",pointerEvents:"none",opacity:0};var t=e.offsets.popper,r=(t.top,t.left,t.position);return p({position:r},e.styles)},n._getPopperPlacement=function(){return n.state.data?n.state.data.placement:void 0},n._getPopperHide=function(){return n.state.data&&n.state.data.hide?"":void 0},n._getArrowStyle=function(){if(n.state.data&&n.state.data.offsets.arrow){var e=n.state.data.offsets.arrow;return{top:e.top,left:e.left}}return{}},r=t,f(n,r)}return s(Popper,e),u(Popper,[{key:"getChildContext",value:function(){return{popper:{setArrowNode:this._setArrowNode,getArrowStyle:this._getArrowStyle}}}},{key:"componentDidMount",value:function(){this._updatePopper()}},{key:"componentDidUpdate",value:function(e){e.placement===this.props.placement&&e.eventsEnabled===this.props.eventsEnabled||this._updatePopper(),this._popper&&e.children!==this.props.children&&this._popper.scheduleUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyPopper()}},{key:"_updatePopper",value:function(){this._destroyPopper(),this._node&&this._createPopper()}},{key:"_createPopper",value:function(){var e=this.props,t=e.placement,n=e.eventsEnabled,r=p({},this.props.modifiers,{applyStyle:{enabled:!1},updateState:this._updateStateModifier});this._arrowNode&&(r.arrow={element:this._arrowNode}),this._popper=new m.default(this._getTargetNode(),this._node,{placement:t,eventsEnabled:n,modifiers:r}),this._popper.scheduleUpdate()}},{key:"_destroyPopper",value:function(){this._popper&&this._popper.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.component,r=t.innerRef,a=(t.placement,t.eventsEnabled,t.modifiers,t.children),f=i(t,["component","innerRef","placement","eventsEnabled","modifiers","children"]),s=function(t){e._node=t,"function"==typeof r&&r(t)},u=this._getPopperStyle(),l=this._getPopperPlacement(),d=this._getPopperHide();if("function"==typeof a){var h;return a({popperProps:(h={ref:s,style:u},o(h,"data-placement",l),o(h,"data-x-out-of-boundaries",d),h),restProps:f,scheduleUpdate:this._popper&&this._popper.scheduleUpdate})}var m=p({},f,{style:p({},f.style,u),"data-placement":l,"data-x-out-of-boundaries":d});return"string"==typeof n?m.ref=s:m.innerRef=s,(0,c.createElement)(n,m,a)}}]),Popper}(c.Component);Popper.contextTypes={popperManager:d.default.object.isRequired},Popper.childContextTypes={popper:d.default.object.isRequired},Popper.propTypes={component:d.default.oneOfType([d.default.node,d.default.func]),innerRef:d.default.func,placement:d.default.oneOf(m.default.placements),eventsEnabled:d.default.bool,modifiers:d.default.object,children:d.default.oneOfType([d.default.node,d.default.func])},Popper.defaultProps={component:"div",placement:"bottom",eventsEnabled:!0,modifiers:{}},t.default=Popper},function(e,t,n){"use strict";(function(e){function n(e){var t=!1,n=0,r=document.createElement("span");return new MutationObserver(function(){e(),t=!1}).observe(r,{attributes:!0}),function(){t||(t=!0,r.setAttribute("x-index",n),n+=1)}}function r(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},pe))}}function o(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function i(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function a(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function f(e){if(!e||-1!==["HTML","BODY","#document"].indexOf(e.nodeName))return window.document.body;var t=i(e),n=t.overflow,r=t.overflowX;return/(auto|scroll)/.test(n+t.overflowY+r)?e:f(a(e))}function s(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(t.nodeName)&&"static"===i(t,"position")?s(t):t:window.document.documentElement}function p(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||s(e.firstElementChild)===e)}function u(e){return null!==e.parentNode?u(e.parentNode):e}function c(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return p(a)?a:s(a);var f=u(e);return f.host?c(f.host,t):c(e,u(t).host)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=window.document.documentElement;return(window.document.scrollingElement||o)[n]}return e[n]}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=l(t,"top"),o=l(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function h(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+r+"Width"].split("px")[0]}function m(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],he()?n["offset"+e]+r["margin"+("Height"===e?"Top":"Left")]+r["margin"+("Height"===e?"Bottom":"Right")]:0)}function v(){var e=window.document.body,t=window.document.documentElement,n=he()&&window.getComputedStyle(t);return{height:m("Height",e,t,n),width:m("Width",e,t,n)}}function g(e){return be({},e,{right:e.left+e.width,bottom:e.top+e.height})}function b(e){var t={};if(he())try{t=e.getBoundingClientRect();var n=l(e,"top"),r=l(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}catch(e){}else t=e.getBoundingClientRect();var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?v():{},f=a.width||e.clientWidth||o.right-o.left,s=a.height||e.clientHeight||o.bottom-o.top,p=e.offsetWidth-f,u=e.offsetHeight-s;if(p||u){var c=i(e);p-=h(c,"x"),u-=h(c,"y"),o.width-=p,o.height-=u}return g(o)}function y(e,t){var n=he(),r="HTML"===t.nodeName,o=b(e),a=b(t),s=f(e),p=i(t),u=+p.borderTopWidth.split("px")[0],c=+p.borderLeftWidth.split("px")[0],l=g({top:o.top-a.top-u,left:o.left-a.left-c,width:o.width,height:o.height});if(l.marginTop=0,l.marginLeft=0,!n&&r){var h=+p.marginTop.split("px")[0],m=+p.marginLeft.split("px")[0];l.top-=u-h,l.bottom-=u-h,l.left-=c-m,l.right-=c-m,l.marginTop=h,l.marginLeft=m}return(n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(l=d(l,t)),l}function w(e){var t=window.document.documentElement,n=y(e,t),r=Math.max(t.clientWidth,window.innerWidth||0),o=Math.max(t.clientHeight,window.innerHeight||0),i=l(t),a=l(t,"left");return g({top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:o})}function O(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===i(e,"position")||O(a(e)))}function _(e,t,n,r){var o={top:0,left:0},i=c(e,t);if("viewport"===r)o=w(i);else{var s=void 0;"scrollParent"===r?(s=f(a(e)),"BODY"===s.nodeName&&(s=window.document.documentElement)):s="window"===r?window.document.documentElement:r;var p=y(s,i);if("HTML"!==s.nodeName||O(i))o=p;else{var u=v(),l=u.height,d=u.width;o.top+=p.top-p.marginTop,o.bottom=l+p.top,o.left+=p.left-p.marginLeft,o.right=d+p.left}}return o.left+=n,o.top+=n,o.right-=n,o.bottom-=n,o}function x(e){return e.width*e.height}function E(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=_(n,r,i,o),f={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},s=Object.keys(f).map(function(e){return be({key:e},f[e],{area:x(f[e])})}).sort(function(e,t){return t.area-e.area}),p=s.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),u=p.length>0?p[0].key:s[0].key,c=e.split("-")[1];return u+(c?"-"+c:"")}function P(e,t,n){return y(n,c(t,n))}function T(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function j(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function M(e,t,n){n=n.split("-")[0];var r=T(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",f=i?"left":"top",s=i?"height":"width",p=i?"width":"height";return o[a]=t[a]+t[s]/2-r[s]/2,o[f]=n===f?t[f]-r[p]:t[j(f)],o}function N(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function S(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=N(e,function(e){return e[t]===n});return e.indexOf(r)}function L(e,t,n){return(void 0===n?e:e.slice(0,S(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t.offsets.popper=g(t.offsets.popper),t.offsets.reference=g(t.offsets.reference),t=n(t,e))}),t}function C(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=P(this.state,this.popper,this.reference),e.placement=E(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=M(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=L(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function k(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function R(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length-1;r++){var o=t[r],i=o?""+o+n:e;if(void 0!==window.document.body.style[i])return i}return null}function A(){return this.state.isDestroyed=!0,k(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[R("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function D(e,t,n,r){var o="BODY"===e.nodeName,i=o?window:e;i.addEventListener(t,n,{passive:!0}),o||D(f(i.parentNode),t,n,r),r.push(i)}function W(e,t,n,r){n.updateBound=r,window.addEventListener("resize",n.updateBound,{passive:!0});var o=f(e);return D(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function H(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function B(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function U(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=B(this.reference,this.state))}function q(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function F(e,t){Object.keys(t).forEach(function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&q(t[n])&&(r="px"),e.style[n]=t[n]+r})}function I(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function Y(e){return F(e.instance.popper,e.styles),I(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&F(e.arrowElement,e.arrowStyles),e}function K(e,t,n,r,o){var i=P(o,t,e),a=E(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),F(t,{position:"absolute"}),n}function z(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=N(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,f=s(e.instance.popper),p=b(f),u={position:o.position},c={left:Math.floor(o.left),top:Math.floor(o.top),bottom:Math.floor(o.bottom),right:Math.floor(o.right)},l="bottom"===n?"top":"bottom",d="right"===r?"left":"right",h=R("transform"),m=void 0,v=void 0;if(v="bottom"===l?-p.height+c.bottom:c.top,m="right"===d?-p.width+c.right:c.left,a&&h)u[h]="translate3d("+m+"px, "+v+"px, 0)",u[l]=0,u[d]=0,u.willChange="transform";else{var g="bottom"===l?-1:1,y="right"===d?-1:1;u[l]=v*g,u[d]=m*y,u.willChange=l+", "+d}var w={"x-placement":e.placement};return e.attributes=be({},w,e.attributes),e.styles=be({},u,e.styles),e.arrowStyles=be({},e.offsets.arrow,e.arrowStyles),e}function G(e,t,n){var r=N(e,function(e){return e.name===t}),o=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function J(e,t){if(!G(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],o=e.offsets,a=o.popper,f=o.reference,s=-1!==["left","right"].indexOf(r),p=s?"height":"width",u=s?"Top":"Left",c=u.toLowerCase(),l=s?"left":"top",d=s?"bottom":"right",h=T(n)[p];f[d]-h<a[c]&&(e.offsets.popper[c]-=a[c]-(f[d]-h)),f[c]+h>a[d]&&(e.offsets.popper[c]+=f[c]+h-a[d]);var m=f[c]+f[p]/2-h/2,v=i(e.instance.popper,"margin"+u).replace("px",""),b=m-g(e.offsets.popper)[c]-v;return b=Math.max(Math.min(a[p]-h,b),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[c]=Math.round(b),e.offsets.arrow[l]="",e}function V(e){return"end"===e?"start":"start"===e?"end":e}function X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=we.indexOf(e),r=we.slice(n+1).concat(we.slice(0,n));return t?r.reverse():r}function Q(e,t){if(k(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=_(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),r=e.placement.split("-")[0],o=j(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Oe.FLIP:a=[r,o];break;case Oe.CLOCKWISE:a=X(r);break;case Oe.COUNTERCLOCKWISE:a=X(r,!0);break;default:a=t.behavior}return a.forEach(function(f,s){if(r!==f||a.length===s+1)return e;r=e.placement.split("-")[0],o=j(r);var p=e.offsets.popper,u=e.offsets.reference,c=Math.floor,l="left"===r&&c(p.right)>c(u.left)||"right"===r&&c(p.left)<c(u.right)||"top"===r&&c(p.bottom)>c(u.top)||"bottom"===r&&c(p.top)<c(u.bottom),d=c(p.left)<c(n.left),h=c(p.right)>c(n.right),m=c(p.top)<c(n.top),v=c(p.bottom)>c(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,b=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(b&&"start"===i&&d||b&&"end"===i&&h||!b&&"start"===i&&m||!b&&"end"===i&&v);(l||g||y)&&(e.flipped=!0,(l||g)&&(r=a[s+1]),y&&(i=V(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=be({},e.offsets.popper,M(e.instance.popper,e.offsets.reference,e.placement)),e=L(e.instance.modifiers,e,"flip"))}),e}function Z(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),f=a?"right":"bottom",s=a?"left":"top",p=a?"width":"height";return n[f]<i(r[s])&&(e.offsets.popper[s]=i(r[s])-n[p]),n[s]>i(r[f])&&(e.offsets.popper[s]=i(r[f])),e}function $(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var f=void 0;switch(a){case"%p":f=n;break;case"%":case"%r":default:f=r}return g(f)[t]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}function ee(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),f=a.indexOf(N(a,function(e){return-1!==e.search(/,|\s/)}));a[f]&&-1===a[f].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,p=-1!==f?[a.slice(0,f).concat([a[f].split(s)[0]]),[a[f].split(s)[1]].concat(a.slice(f+1))]:[a];return p=p.map(function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return $(e,o,t,n)})}),p.forEach(function(e,t){e.forEach(function(n,r){q(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))})}),o}function te(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,f=r.split("-")[0],s=void 0;return s=q(+n)?[+n,0]:ee(n,i,a,f),"left"===f?(i.top+=s[0],i.left-=s[1]):"right"===f?(i.top+=s[0],i.left+=s[1]):"top"===f?(i.left+=s[0],i.top-=s[1]):"bottom"===f&&(i.left+=s[0],i.top+=s[1]),e.popper=i,e}function ne(e,t){var n=t.boundariesElement||s(e.instance.popper);e.instance.reference===n&&(n=s(n));var r=_(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=r;var o=t.priority,i=e.offsets.popper,a={primary:function(e){var n=i[e];return i[e]<r[e]&&!t.escapeWithReference&&(n=Math.max(i[e],r[e])),ge({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=i[n];return i[e]>r[e]&&!t.escapeWithReference&&(o=Math.min(i[n],r[e]-("right"===e?i.width:i.height))),ge({},n,o)}};return o.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";i=be({},i,a[t](e))}),e.offsets.popper=i,e}function re(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,f=-1!==["bottom","top"].indexOf(n),s=f?"left":"top",p=f?"width":"height",u={start:ge({},s,i[s]),end:ge({},s,i[s]+i[p]-a[p])};e.offsets.popper=be({},a,u[r])}return e}function oe(e){if(!G(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=N(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function ie(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),f=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(f?o[a?"width":"height"]:0),e.placement=j(t),e.offsets.popper=g(o),e}Object.defineProperty(t,"__esModule",{value:!0});for(var ae=["native code","[object MutationObserverConstructor]"],fe="undefined"!=typeof window,se=["Edge","Trident","Firefox"],pe=0,ue=0;ue<se.length;ue+=1)if(fe&&navigator.userAgent.indexOf(se[ue])>=0){pe=1;break}var ce=fe&&function(e){return ae.some(function(t){return(e||"").toString().indexOf(t)>-1})}(window.MutationObserver),le=ce?n:r,de=void 0,he=function(){return void 0===de&&(de=-1!==navigator.appVersion.indexOf("MSIE 10")),de},me=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ve=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ge=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye=["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"],we=ye.slice(3),Oe={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},_e={shift:{order:100,enabled:!0,fn:re},offset:{order:200,enabled:!0,fn:te,offset:0},preventOverflow:{order:300,enabled:!0,fn:ne,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:Z},arrow:{order:500,enabled:!0,fn:J,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Q,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ie},hide:{order:800,enabled:!0,fn:oe},computeStyle:{order:850,enabled:!0,fn:z,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:Y,onLoad:K,gpuAcceleration:void 0}},xe={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:_e},Popper=function(){function Popper(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};me(this,Popper),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=le(this.update.bind(this)),this.options=be({},Popper.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e.jquery?e[0]:e,this.popper=t.jquery?t[0]:t,this.options.modifiers={},Object.keys(be({},Popper.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=be({},Popper.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return be({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return ve(Popper,[{key:"update",value:function(){return C.call(this)}},{key:"destroy",value:function(){return A.call(this)}},{key:"enableEventListeners",value:function(){return H.call(this)}},{key:"disableEventListeners",value:function(){return U.call(this)}}]),Popper}();Popper.Utils=("undefined"!=typeof window?window:e).PopperUtils,Popper.placements=ye,Popper.Defaults=xe,t.default=Popper}).call(t,n(7))},function(e,t,n){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":o(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),f=(r(a),n(1)),s=r(f),p=function(e,t){var n=e.component,r=void 0===n?"span":n,f=e.innerRef,s=e.children,p=o(e,["component","innerRef","children"]),u=t.popper,c=function(e){u.setArrowNode(e),"function"==typeof f&&f(e)},l=u.getArrowStyle();if("function"==typeof s){return s({arrowProps:{ref:c,style:l},restProps:p})}var d=i({},p,{style:i({},l,p.style)});return"string"==typeof r?d.ref=c:d.innerRef=c,(0,a.createElement)(r,d,s)};p.contextTypes={popper:s.default.object.isRequired},p.propTypes={component:s.default.oneOfType([s.default.node,s.default.func]),innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=p}])}); |
@@ -23,6 +23,2 @@ 'use strict'; | ||
var _isEqualShallow = require('is-equal-shallow'); | ||
var _isEqualShallow2 = _interopRequireDefault(_isEqualShallow); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -62,2 +58,12 @@ | ||
return _this.context.popperManager.getTargetNode(); | ||
}, _this._getOffsets = function (data) { | ||
return Object.keys(data.offsets).map(function (key) { | ||
return data.offsets[key]; | ||
}); | ||
}, _this._isDataDirty = function (data) { | ||
if (_this.state.data) { | ||
return JSON.stringify(_this._getOffsets(_this.state.data)) !== JSON.stringify(_this._getOffsets(data)); | ||
} else { | ||
return true; | ||
} | ||
}, _this._updateStateModifier = { | ||
@@ -67,3 +73,3 @@ enabled: true, | ||
fn: function fn(data) { | ||
if (_this.state.data && !(0, _isEqualShallow2.default)(data.offsets, _this.state.data.offsets) || !_this.state.data) { | ||
if (_this._isDataDirty(data)) { | ||
_this.setState({ data: data }); | ||
@@ -98,2 +104,4 @@ } | ||
return !!_this.state.data ? _this.state.data.placement : undefined; | ||
}, _this._getPopperHide = function () { | ||
return !!_this.state.data && _this.state.data.hide ? '' : undefined; | ||
}, _this._getArrowStyle = function () { | ||
@@ -208,8 +216,11 @@ if (!_this.state.data || !_this.state.data.offsets.arrow) { | ||
var popperPlacement = this._getPopperPlacement(); | ||
var popperHide = this._getPopperHide(); | ||
if (typeof children === 'function') { | ||
var popperProps = _defineProperty({ | ||
var _popperProps; | ||
var popperProps = (_popperProps = { | ||
ref: popperRef, | ||
style: popperStyle | ||
}, 'data-placement', popperPlacement); | ||
}, _defineProperty(_popperProps, 'data-placement', popperPlacement), _defineProperty(_popperProps, 'data-x-out-of-boundaries', popperHide), _popperProps); | ||
return children({ | ||
@@ -224,3 +235,4 @@ popperProps: popperProps, | ||
style: _extends({}, restProps.style, popperStyle), | ||
'data-placement': popperPlacement | ||
'data-placement': popperPlacement, | ||
'data-x-out-of-boundaries': popperHide | ||
}); | ||
@@ -227,0 +239,0 @@ |
{ | ||
"name": "react-popper", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "React wrapper around PopperJS.", | ||
@@ -10,5 +10,7 @@ "main": "lib/react-popper.js", | ||
"build:lib": "babel src --out-dir lib", | ||
"build": "npm run build:lib && NODE_ENV=production webpack --config webpack.prod.config.js", | ||
"build": | ||
"npm run build:lib && NODE_ENV=production webpack --config webpack.prod.config.js", | ||
"dev": "webpack-dev-server --hot --progress --host 0.0.0.0", | ||
"postbuild": "NODE_ENV=production TARGET=minify webpack --config webpack.prod.config.js", | ||
"postbuild": | ||
"NODE_ENV=production TARGET=minify webpack --config webpack.prod.config.js", | ||
"prebuild": "rm -rf dist && mkdir dist", | ||
@@ -30,3 +32,4 @@ "prepublish": "npm run build" | ||
], | ||
"author": "Travis Arnold <travis@souporserious.com> (http://souporserious.com)", | ||
"author": | ||
"Travis Arnold <travis@souporserious.com> (http://souporserious.com)", | ||
"license": "MIT", | ||
@@ -42,4 +45,3 @@ "bugs": { | ||
"dependencies": { | ||
"is-equal-shallow": "^0.1.3", | ||
"popper.js": "^1.10.8", | ||
"popper.js": "^1.12.5", | ||
"prop-types": "^15.5.10" | ||
@@ -50,3 +52,3 @@ }, | ||
"babel-core": "^6.17.0", | ||
"babel-loader": "^6.2.5", | ||
"babel-loader": "^7.1.1", | ||
"babel-plugin-external-helpers": "^6.18.0", | ||
@@ -57,22 +59,23 @@ "babel-preset-es2015": "^6.16.0", | ||
"chokidar": "^1.6.1", | ||
"css-loader": "^0.25.0", | ||
"css-loader": "^0.28.4", | ||
"glamor": "3.0.0-1", | ||
"html-tag-names": "^1.1.1", | ||
"http-server": "^0.9.0", | ||
"node-libs-browser": "^1.0.0", | ||
"node-sass": "^3.2.0", | ||
"html-tag-names": "^1.1.2", | ||
"http-server": "^0.10.0", | ||
"node-libs-browser": "^2.0.0", | ||
"node-sass": "^4.5.3", | ||
"outy": "^0.1.2", | ||
"postcss-loader": "^0.13.0", | ||
"react": "15.3.2", | ||
"react-dom": "15.3.2", | ||
"react-measure": "^1.4.6", | ||
"react-motion-ui-pack": "^0.10.2", | ||
"postcss-loader": "^2.0.6", | ||
"prettier": "^1.7.0", | ||
"react": "^15.6.1", | ||
"react-dom": "^15.6.1", | ||
"react-measure": "^2.0.2", | ||
"react-motion-ui-pack": "^0.10.3", | ||
"react-travel": "^1.3.0", | ||
"sass-loader": "^4.0.2", | ||
"style-loader": "^0.13.1", | ||
"svg-tag-names": "^1.1.0", | ||
"sass-loader": "^6.0.6", | ||
"style-loader": "^0.18.2", | ||
"svg-tag-names": "^1.1.1", | ||
"velocity-react": "^1.2.2", | ||
"webpack": "^1.13.2", | ||
"webpack-dev-server": "^1.9.0" | ||
"webpack": "^3.4.1", | ||
"webpack-dev-server": "^2.6.1" | ||
} | ||
} |
declare module "react-popper" { | ||
import * as React from "react"; | ||
import * as PopperJS from "popper.js"; | ||
import PopperJS from "popper.js"; | ||
@@ -5,0 +5,0 @@ interface IRestProps { |
Sorry, the diff of this file is too big to display
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances 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
4
179814
28
3400
4
- Removedis-equal-shallow@^0.1.3
- Removedis-equal-shallow@0.1.3(transitive)
- Removedis-primitive@2.0.0(transitive)
Updatedpopper.js@^1.12.5