Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds webpack-cli to package.json #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 124 additions & 50 deletions dist/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -14355,7 +14355,7 @@ return jQuery;
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* WEBPACK VAR INJECTION */(function(global) {/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.12.9
* @version 1.14.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
Expand Down Expand Up @@ -14497,13 +14497,48 @@ function getScrollParent(element) {
overflowX = _getStyleComputedProp.overflowX,
overflowY = _getStyleComputedProp.overflowY;

if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {
if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
return element;
}

return getScrollParent(getParentNode(element));
}

/**
* Tells if you are running Internet Explorer
* @method
* @memberof Popper.Utils
* @argument {number} version to check
* @returns {Boolean} isIE
*/
var cache = {};

var isIE = function () {
var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';

version = version.toString();
if (cache.hasOwnProperty(version)) {
return cache[version];
}
switch (version) {
case '11':
cache[version] = navigator.userAgent.indexOf('Trident') !== -1;
break;
case '10':
cache[version] = navigator.appVersion.indexOf('MSIE 10') !== -1;
break;
case 'all':
cache[version] = navigator.userAgent.indexOf('Trident') !== -1 || navigator.userAgent.indexOf('MSIE') !== -1;
break;
}

//Set IE
cache.all = cache.all || Object.keys(cache).some(function (key) {
return cache[key];
});
return cache[version];
};

/**
* Returns the offset parent of the given element
* @method
Expand All @@ -14512,16 +14547,23 @@ function getScrollParent(element) {
* @returns {Element} offset parent
*/
function getOffsetParent(element) {
if (!element) {
return document.documentElement;
}

var noOffsetParent = isIE(10) ? document.body : null;

// NOTE: 1 DOM access here
var offsetParent = element && element.offsetParent;
var offsetParent = element.offsetParent;
// Skip hidden elements which don't have an offsetParent
while (offsetParent === noOffsetParent && element.nextElementSibling) {
offsetParent = (element = element.nextElementSibling).offsetParent;
}

var nodeName = offsetParent && offsetParent.nodeName;

if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
if (element) {
return element.ownerDocument.documentElement;
}

return document.documentElement;
return element ? element.ownerDocument.documentElement : document.documentElement;
}

// .offsetParent will return the closest TD or TABLE in case
Expand Down Expand Up @@ -14663,29 +14705,14 @@ function getBordersSize(styles, axis) {
return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
}

/**
* Tells if you are running Internet Explorer 10
* @method
* @memberof Popper.Utils
* @returns {Boolean} isIE10
*/
var isIE10 = undefined;

var isIE10$1 = function () {
if (isIE10 === undefined) {
isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1;
}
return isIE10;
};

function getSize(axis, body, html, computedStyle) {
return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);
return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);
}

function getWindowSizes() {
var body = document.body;
var html = document.documentElement;
var computedStyle = isIE10$1() && getComputedStyle(html);
var computedStyle = isIE(10) && getComputedStyle(html);

return {
height: getSize('Height', body, html, computedStyle),
Expand Down Expand Up @@ -14777,19 +14804,19 @@ function getBoundingClientRect(element) {
// IE10 10 FIX: Please, don't ask, the element isn't
// considered in DOM in some circumstances...
// This isn't reproducible in IE10 compatibility mode of IE11
if (isIE10$1()) {
try {
try {
if (isIE(10)) {
rect = element.getBoundingClientRect();
var scrollTop = getScroll(element, 'top');
var scrollLeft = getScroll(element, 'left');
rect.top += scrollTop;
rect.left += scrollLeft;
rect.bottom += scrollTop;
rect.right += scrollLeft;
} catch (err) {}
} else {
rect = element.getBoundingClientRect();
}
} else {
rect = element.getBoundingClientRect();
}
} catch (e) {}

var result = {
left: rect.left,
Expand Down Expand Up @@ -14821,7 +14848,9 @@ function getBoundingClientRect(element) {
}

function getOffsetRectRelativeToArbitraryNode(children, parent) {
var isIE10 = isIE10$1();
var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

var isIE10 = isIE(10);
var isHTML = parent.nodeName === 'HTML';
var childrenRect = getBoundingClientRect(children);
var parentRect = getBoundingClientRect(parent);
Expand All @@ -14831,6 +14860,11 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);

// In cases where the parent is fixed, we must ignore negative scroll in offset calc
if (fixedPosition && parent.nodeName === 'HTML') {
parentRect.top = Math.max(parentRect.top, 0);
parentRect.left = Math.max(parentRect.left, 0);
}
var offsets = getClientRect({
top: childrenRect.top - parentRect.top - borderTopWidth,
left: childrenRect.left - parentRect.left - borderLeftWidth,
Expand Down Expand Up @@ -14858,21 +14892,23 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
offsets.marginLeft = marginLeft;
}

if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
offsets = includeScroll(offsets, parent);
}

return offsets;
}

function getViewportOffsetRectRelativeToArtbitraryNode(element) {
var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

var html = element.ownerDocument.documentElement;
var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
var width = Math.max(html.clientWidth, window.innerWidth || 0);
var height = Math.max(html.clientHeight, window.innerHeight || 0);

var scrollTop = getScroll(html);
var scrollLeft = getScroll(html, 'left');
var scrollTop = !excludeScroll ? getScroll(html) : 0;
var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;

var offset = {
top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
Expand Down Expand Up @@ -14903,6 +14939,26 @@ function isFixed(element) {
return isFixed(getParentNode(element));
}

/**
* Finds the first parent of an element that has a transformed property defined
* @method
* @memberof Popper.Utils
* @argument {Element} element
* @returns {Element} first transformed parent or documentElement
*/

function getFixedPositionOffsetParent(element) {
// This check is needed to avoid errors in case one of the elements isn't defined for any reason
if (!element || !element.parentElement || isIE()) {
return document.documentElement;
}
var el = element.parentElement;
while (el && getStyleComputedProperty(el, 'transform') === 'none') {
el = el.parentElement;
}
return el || document.documentElement;
}

/**
* Computed the boundaries limits and return them
* @method
Expand All @@ -14911,16 +14967,20 @@ function isFixed(element) {
* @param {HTMLElement} reference
* @param {number} padding
* @param {HTMLElement} boundariesElement - Element used to define the boundaries
* @param {Boolean} fixedPosition - Is in fixed position mode
* @returns {Object} Coordinates of the boundaries
*/
function getBoundaries(popper, reference, padding, boundariesElement) {
var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;

// NOTE: 1 DOM access here

var boundaries = { top: 0, left: 0 };
var offsetParent = findCommonOffsetParent(popper, reference);
var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);

// Handle viewport case
if (boundariesElement === 'viewport') {
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
} else {
// Handle other cases based on DOM element used as boundaries
var boundariesNode = void 0;
Expand All @@ -14935,7 +14995,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) {
boundariesNode = boundariesElement;
}

var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);
var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);

// In case of HTML, we need a different computation
if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
Expand Down Expand Up @@ -15036,11 +15096,14 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE
* @param {Object} state
* @param {Element} popper - the popper element
* @param {Element} reference - the reference element (the popper will be relative to this)
* @param {Element} fixedPosition - is in fixed position mode
* @returns {Object} An object containing the offsets which will be applied to the popper
*/
function getReferenceOffsets(state, popper, reference) {
var commonOffsetParent = findCommonOffsetParent(popper, reference);
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);
var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
}

/**
Expand Down Expand Up @@ -15213,7 +15276,7 @@ function update() {
};

// compute reference element offsets
data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);
data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);

// compute auto placement, store placement inside the data object,
// modifiers will be able to edit `placement` if needed
Expand All @@ -15223,9 +15286,11 @@ function update() {
// store the computed placement inside `originalPlacement`
data.originalPlacement = data.placement;

data.positionFixed = this.options.positionFixed;

// compute the popper offsets
data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
data.offsets.popper.position = 'absolute';
data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';

// run the modifiers
data = runModifiers(this.modifiers, data);
Expand Down Expand Up @@ -15265,7 +15330,7 @@ function getSupportedPropertyName(property) {
var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
var upperProp = property.charAt(0).toUpperCase() + property.slice(1);

for (var i = 0; i < prefixes.length - 1; i++) {
for (var i = 0; i < prefixes.length; i++) {
var prefix = prefixes[i];
var toCheck = prefix ? '' + prefix + upperProp : property;
if (typeof document.body.style[toCheck] !== 'undefined') {
Expand All @@ -15286,9 +15351,12 @@ function destroy() {
// touch DOM only if `applyStyle` modifier is enabled
if (isModifierEnabled(this.modifiers, 'applyStyle')) {
this.popper.removeAttribute('x-placement');
this.popper.style.left = '';
this.popper.style.position = '';
this.popper.style.top = '';
this.popper.style.left = '';
this.popper.style.right = '';
this.popper.style.bottom = '';
this.popper.style.willChange = '';
this.popper.style[getSupportedPropertyName('transform')] = '';
}

Expand Down Expand Up @@ -15476,12 +15544,12 @@ function applyStyle(data) {
* @method
* @memberof Popper.modifiers
* @param {HTMLElement} reference - The reference element used to position the popper
* @param {HTMLElement} popper - The HTML element used as popper.
* @param {HTMLElement} popper - The HTML element used as popper
* @param {Object} options - Popper.js options
*/
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
// compute reference element offsets
var referenceOffsets = getReferenceOffsets(state, popper, reference);
var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);

// compute auto placement, store placement inside the data object,
// modifiers will be able to edit `placement` if needed
Expand All @@ -15492,7 +15560,7 @@ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {

// Apply `position` to popper before anything else because
// without the position applied we can't guarantee correct computations
setStyles(popper, { position: 'absolute' });
setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });

return options;
}
Expand Down Expand Up @@ -15795,7 +15863,7 @@ function flip(data, options) {
return data;
}

var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement);
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);

var placement = data.placement.split('-')[0];
var placementOpposite = getOppositePlacement(placement);
Expand Down Expand Up @@ -16087,7 +16155,7 @@ function preventOverflow(data, options) {
boundariesElement = getOffsetParent(boundariesElement);
}

var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement);
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
options.boundaries = boundaries;

var order = options.priority;
Expand Down Expand Up @@ -16584,6 +16652,12 @@ var Defaults = {
*/
placement: 'bottom',

/**
* Set this to true if you want popper to position it self in 'fixed' mode
* @prop {Boolean} positionFixed=false
*/
positionFixed: false,

/**
* Whether events (resize, scroll) are initially enabled
* @prop {Boolean} eventsEnabled=true
Expand Down Expand Up @@ -17416,7 +17490,7 @@ module.exports = function (css) {
.replace(/^'(.*)'$/, function(o, $1){ return $1; });

// already a full url? no change
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
return fullMatch;
}

Expand Down
Loading