From e91de16a9fde894084d3df5de2c629b769220255 Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Thu, 2 Aug 2018 18:06:30 +0200
Subject: [PATCH 01/14] Just save change
---
themes/classic/_dev/js/cart.js | 72 +++++++++++++++-------------------
1 file changed, 32 insertions(+), 40 deletions(-)
diff --git a/themes/classic/_dev/js/cart.js b/themes/classic/_dev/js/cart.js
index d04b695dd0902..bfb5bb12ff4cb 100644
--- a/themes/classic/_dev/js/cart.js
+++ b/themes/classic/_dev/js/cart.js
@@ -16,7 +16,7 @@ let errorMsg = '';
function createSpin()
{
$.each($(spinnerSelector), function (index, spinner) {
- $(spinner).TouchSpin({
+ $(spinner).TouchSpin({
verticalbuttons: true,
verticalupclass: 'material-icons touchspin-up',
verticaldownclass: 'material-icons touchspin-down',
@@ -26,14 +26,14 @@ function createSpin()
max: 1000000
});
});
-
+
CheckUpdateQuantityOperations.switchErrorStat();
}
$(document).ready(() => {
- let productLineInCartSelector = '.js-cart-line-product-quantity';
- let promises = [];
+ const productLineInCartSelector = '.js-cart-line-product-quantity';
+ const promises = [];
prestashop.on('updateCart', () => {
$('.quickview').modal('hide');
@@ -45,7 +45,7 @@ $(document).ready(() => {
createSpin();
- let $body = $('body');
+ const $body = $('body');
function isTouchSpin(namespace) {
return namespace === 'on.startupspin' || namespace === 'on.startdownspin';
@@ -60,9 +60,9 @@ $(document).ready(() => {
if ($input.is(':focus')) {
return null;
- } else {
- return $input;
}
+
+ return $input;
}
function camelize(subject) {
@@ -224,44 +224,35 @@ $(document).ready(() => {
function updateProductQuantityInCart(event)
{
- let $target = $(event.currentTarget);
- let updateQuantityInCartUrl = $target.data('update-url');
- let baseValue = $target.attr('value');
+ const $target = $(event.currentTarget);
+ const updateQuantityInCartUrl = $target.data('update-url');
+ const baseValue = $target.attr('value');
// There should be a valid product quantity in cart
- let targetValue = $target.val();
+ const targetValue = $target.val();
if (targetValue != parseInt(targetValue) || targetValue < 0 || isNaN(targetValue)) {
$target.val(baseValue);
-
return;
}
// There should be a new product quantity in cart
- let qty = targetValue - baseValue;
- if (qty == 0) {
- return;
- }
-
- var requestData = getRequestData(qty);
-
- sendUpdateQuantityInCartRequest(updateQuantityInCartUrl, requestData, $target);
+ const qty = targetValue - baseValue;
+ sendUpdateQuantityInCartRequest(updateQuantityInCartUrl, getRequestData(qty), $target);
}
$body.on(
- 'focusout',
+ 'focusout keyup',
productLineInCartSelector,
(event) => {
- updateProductQuantityInCart(event);
- }
- );
+ if (event.type === 'keyup') {
+ if (event.keyCode === 13) {
+ updateProductQuantityInCart(event);
+ }
- $body.on(
- 'keyup',
- productLineInCartSelector,
- (event) => {
- if (event.keyCode == 13) {
- updateProductQuantityInCart(event);
+ return false;
}
+
+ updateProductQuantityInCart(event);
}
);
@@ -271,8 +262,8 @@ $(document).ready(() => {
(event) => {
event.stopPropagation();
- var $code = $(event.currentTarget);
- var $discountInput = $('[name=discount_name]');
+ const $code = $(event.currentTarget);
+ const $discountInput = $('[name=discount_name]');
$discountInput.val($code.text());
@@ -283,11 +274,11 @@ $(document).ready(() => {
const CheckUpdateQuantityOperations = {
'switchErrorStat': () => {
- /*
- if errorMsg is not empty or if notifications are shown, we have error to display
- if hasError is true, quantity was not updated : we don't disable checkout button
+ /**
+ * if errorMsg is not empty or if notifications are shown, we have error to display
+ * if hasError is true, quantity was not updated : we don't disable checkout button
*/
- let $checkoutBtn = $('.checkout a');
+ const $checkoutBtn = $('.checkout a');
if ($("#notifications article.alert-danger").length || ('' !== errorMsg && !hasError)) {
$checkoutBtn.addClass('disabled');
}
@@ -309,9 +300,9 @@ const CheckUpdateQuantityOperations = {
}
},
'checkUpdateOpertation': (resp) => {
- /*
- resp.hasError can be not defined but resp.errors not empty: quantity is updated but order cannot be placed
- when resp.hasError=true, quantity is not updated
+ /**
+ * resp.hasError can be not defined but resp.errors not empty: quantity is updated but order cannot be placed
+ * when resp.hasError=true, quantity is not updated
*/
hasError = resp.hasOwnProperty('hasError');
let errors = resp.errors || "";
@@ -321,6 +312,7 @@ const CheckUpdateQuantityOperations = {
} else {
errorMsg = errors;
}
+
isUpdateOperation = true;
}
-};
\ No newline at end of file
+};
From b0bd9ce8fa0749ba294b6c529d2e92c22622a28d Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Fri, 3 Aug 2018 17:34:03 +0200
Subject: [PATCH 02/14] Cart fixes
- Do not update cart when cart product quantity is under 0
- Prevent double event trigger on front (keyup and focusout) while
pressing ret key
- Fix webpack problem in dev / prod
---
admin-dev/themes/default/webpack.config.js | 20 ++-
admin-dev/themes/new-theme/webpack.config.js | 3 +-
classes/Cart.php | 147 +++++++++++--------
themes/classic/_dev/js/cart.js | 6 +-
themes/classic/_dev/package.json | 68 ++++-----
themes/classic/_dev/webpack.config.js | 36 ++---
themes/package.json | 30 ++--
7 files changed, 172 insertions(+), 138 deletions(-)
diff --git a/admin-dev/themes/default/webpack.config.js b/admin-dev/themes/default/webpack.config.js
index e89b26402f0cf..5cf3e07a0e770 100644
--- a/admin-dev/themes/default/webpack.config.js
+++ b/admin-dev/themes/default/webpack.config.js
@@ -22,11 +22,11 @@
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
-var path = require('path');
-var webpack = require('webpack');
-var ExtractTextPlugin = require('extract-text-webpack-plugin');
+const path = require('path');
+const webpack = require('webpack');
+const ExtractTextPlugin = require('extract-text-webpack-plugin');
-module.exports = {
+const config = {
entry: [
'./js/theme.js'
],
@@ -74,7 +74,13 @@ module.exports = {
}]
},
plugins: [
+ new webpack.HotModuleReplacementPlugin(),
new ExtractTextPlugin('theme.css'),
+ ]
+};
+
+if (process.env.NODE_ENV === 'production') {
+ config.plugins.push(
new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
compress: {
@@ -89,5 +95,7 @@ module.exports = {
comments: false
}
})
- ]
-};
+ );
+}
+
+module.exports = config;
diff --git a/admin-dev/themes/new-theme/webpack.config.js b/admin-dev/themes/new-theme/webpack.config.js
index 36eeebce0e2ac..94057309f1344 100644
--- a/admin-dev/themes/new-theme/webpack.config.js
+++ b/admin-dev/themes/new-theme/webpack.config.js
@@ -22,12 +22,13 @@
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
+
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const keepLicense = require('uglify-save-license');
-let config = {
+const config = {
entry: {
main: [
'prestakit/dist/js/prestashop-ui-kit.js',
diff --git a/classes/Cart.php b/classes/Cart.php
index 19ab15f93d458..1c465aef9cc0c 100644
--- a/classes/Cart.php
+++ b/classes/Cart.php
@@ -1241,7 +1241,12 @@ public function getProductQuantity($idProduct, $idProductAttribute = 0, $idCusto
*/
public function containsProduct($id_product, $id_product_attribute = 0, $id_customization = 0, $id_address_delivery = 0)
{
- $result = $this->getProductQuantity($id_product, $id_product_attribute, $id_customization, $id_address_delivery);
+ $result = $this->getProductQuantity(
+ $id_product,
+ $id_product_attribute,
+ $id_customization,
+ $id_address_delivery
+ );
if (empty($result['quantity'])) {
return false;
@@ -1276,10 +1281,13 @@ public function updateQty(
}
if (Context::getContext()->customer->id) {
- if ($id_address_delivery == 0 && (int)$this->id_address_delivery) { // The $id_address_delivery is null, use the cart delivery address
+ // The $id_address_delivery is null, use the cart delivery address
+ if ($id_address_delivery == 0 && (int)$this->id_address_delivery) {
$id_address_delivery = $this->id_address_delivery;
} elseif ($id_address_delivery == 0) { // The $id_address_delivery is null, get the default customer address
- $id_address_delivery = (int)Address::getFirstCustomerAddressId((int)Context::getContext()->customer->id);
+ $id_address_delivery = (int) Address::getFirstCustomerAddressId(
+ (int) Context::getContext()->customer->id
+ );
} elseif (!Customer::customerHasAddress(Context::getContext()->customer->id, $id_address_delivery)) { // The $id_address_delivery must be linked with customer
$id_address_delivery = 0;
}
@@ -1332,87 +1340,98 @@ public function updateQty(
// Hook::exec('actionBeforeCartUpdateQty', $data);
Hook::exec('actionCartUpdateQuantityBefore', $data);
- if ((int)$quantity <= 0) {
- return $this->deleteProduct($id_product, $id_product_attribute, (int)$id_customization);
- } elseif (!$product->available_for_order
- || (Configuration::isCatalogMode() && !defined('_PS_ADMIN_DIR_'))
+ if (!$product->available_for_order ||
+ Configuration::isCatalogMode() && !defined('_PS_ADMIN_DIR_') ||
+ (int) $quantity <= 0
) {
return false;
- } else {
- /* Check if the product is already in the cart */
- $cartProductQuantity = $this->getProductQuantity($id_product, $id_product_attribute, (int)$id_customization, (int)$id_address_delivery);
+ }
- /* Update quantity if product already exist */
- if (!empty($cartProductQuantity['quantity'])) {
- $productQuantity = Product::getQuantity($id_product, $id_product_attribute, null, $this);
- $availableOutOfStock = Product::isAvailableWhenOutOfStock($product->out_of_stock);
+ /* Check if the product is already in the cart */
+ $cartProductQuantity = $this->getProductQuantity(
+ $id_product,
+ $id_product_attribute,
+ (int) $id_customization,
+ (int) $id_address_delivery
+ );
- if ($operator == 'up') {
- $updateQuantity = '+ ' . $quantity;
- $newProductQuantity = $productQuantity - $quantity;
+ /* Update quantity if product already exist */
+ if (!empty($cartProductQuantity['quantity'])) {
+ $productQuantity = Product::getQuantity($id_product, $id_product_attribute, null, $this);
+ $availableOutOfStock = Product::isAvailableWhenOutOfStock($product->out_of_stock);
- if ($newProductQuantity < 0 && !$availableOutOfStock && !$skipAvailabilityCheckOutOfStock) {
- return false;
- }
- } else if ($operator == 'down') {
- $cartFirstLevelProductQuantity = $this->getProductQuantity((int) $id_product, (int) $id_product_attribute, $id_customization);
- $updateQuantity = '- ' . $quantity;
- $newProductQuantity = $productQuantity + $quantity;
+ if ($operator == 'up') {
+ $updateQuantity = '+ ' . $quantity;
+ $newProductQuantity = $productQuantity - $quantity;
- if ($cartFirstLevelProductQuantity['quantity'] <= 1) {
- return $this->deleteProduct((int)$id_product, (int)$id_product_attribute, (int)$id_customization);
- }
- } else {
+ if ($newProductQuantity < 0 && !$availableOutOfStock && !$skipAvailabilityCheckOutOfStock) {
return false;
}
- Db::getInstance()->execute(
- 'UPDATE `'._DB_PREFIX_.'cart_product`
+ } elseif ($operator == 'down') {
+ $cartFirstLevelProductQuantity = $this->getProductQuantity(
+ (int) $id_product,
+ (int) $id_product_attribute,
+ $id_customization
+ );
+ $updateQuantity = '- ' . $quantity;
+ $newProductQuantity = $productQuantity + $quantity;
+
+ if ($cartFirstLevelProductQuantity['quantity'] <= 1 ||
+ $cartProductQuantity['quantity'] - $quantity <= 0
+ ) {
+ return $this->deleteProduct((int)$id_product, (int)$id_product_attribute, (int)$id_customization);
+ }
+ } else {
+ return false;
+ }
+
+ Db::getInstance()->execute(
+ 'UPDATE `'._DB_PREFIX_.'cart_product`
SET `quantity` = `quantity` ' . $updateQuantity . '
WHERE `id_product` = '.(int)$id_product.
- ' AND `id_customization` = '.(int)$id_customization.
- (!empty($id_product_attribute) ? ' AND `id_product_attribute` = '.(int)$id_product_attribute : '').'
+ ' AND `id_customization` = '.(int)$id_customization.
+ (!empty($id_product_attribute) ? ' AND `id_product_attribute` = '.(int)$id_product_attribute : '').'
AND `id_cart` = '.(int)$this->id.(Configuration::get('PS_ALLOW_MULTISHIPPING') && $this->isMultiAddressDelivery() ? ' AND `id_address_delivery` = '.(int)$id_address_delivery : '').'
LIMIT 1'
- );
- } elseif ($operator == 'up') {
- /* Add product to the cart */
+ );
+ } elseif ($operator == 'up') {
+ /* Add product to the cart */
- $sql = 'SELECT stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity
+ $sql = 'SELECT stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity
FROM '._DB_PREFIX_.'product p
'.Product::sqlStock('p', $id_product_attribute, true, $shop).'
WHERE p.id_product = '.$id_product;
- $result2 = Db::getInstance()->getRow($sql);
+ $result2 = Db::getInstance()->getRow($sql);
- // Quantity for product pack
- if (Pack::isPack($id_product)) {
- $result2['quantity'] = Pack::getQuantity($id_product, $id_product_attribute, null, $this);
- }
+ // Quantity for product pack
+ if (Pack::isPack($id_product)) {
+ $result2['quantity'] = Pack::getQuantity($id_product, $id_product_attribute, null, $this);
+ }
- if (!Product::isAvailableWhenOutOfStock((int)$result2['out_of_stock']) && !$skipAvailabilityCheckOutOfStock) {
- if ((int)$quantity > $result2['quantity']) {
- return false;
- }
+ if (!Product::isAvailableWhenOutOfStock((int)$result2['out_of_stock']) && !$skipAvailabilityCheckOutOfStock) {
+ if ((int)$quantity > $result2['quantity']) {
+ return false;
}
+ }
- if ((int)$quantity < $minimal_quantity) {
- return -1;
- }
+ if ((int)$quantity < $minimal_quantity) {
+ return -1;
+ }
- $result_add = Db::getInstance()->insert('cart_product', array(
- 'id_product' => (int)$id_product,
- 'id_product_attribute' => (int)$id_product_attribute,
- 'id_cart' => (int)$this->id,
- 'id_address_delivery' => (int)$id_address_delivery,
- 'id_shop' => $shop->id,
- 'quantity' => (int)$quantity,
- 'date_add' => date('Y-m-d H:i:s'),
- 'id_customization' => (int)$id_customization,
- ));
-
- if (!$result_add) {
- return false;
- }
+ $result_add = Db::getInstance()->insert('cart_product', array(
+ 'id_product' => (int)$id_product,
+ 'id_product_attribute' => (int)$id_product_attribute,
+ 'id_cart' => (int)$this->id,
+ 'id_address_delivery' => (int)$id_address_delivery,
+ 'id_shop' => $shop->id,
+ 'quantity' => (int)$quantity,
+ 'date_add' => date('Y-m-d H:i:s'),
+ 'id_customization' => (int)$id_customization,
+ ));
+
+ if (!$result_add) {
+ return false;
}
}
@@ -1428,9 +1447,9 @@ public function updateQty(
if ($product->customizable) {
return $this->_updateCustomizationQuantity((int)$quantity, (int)$id_customization, (int)$id_product, (int)$id_product_attribute, (int)$id_address_delivery, $operator);
- } else {
- return true;
}
+
+ return true;
}
/**
diff --git a/themes/classic/_dev/js/cart.js b/themes/classic/_dev/js/cart.js
index bfb5bb12ff4cb..56d8a9dbc236a 100644
--- a/themes/classic/_dev/js/cart.js
+++ b/themes/classic/_dev/js/cart.js
@@ -237,6 +237,11 @@ $(document).ready(() => {
// There should be a new product quantity in cart
const qty = targetValue - baseValue;
+ if (qty === 0) {
+ return;
+ }
+
+ $target.attr('value', targetValue);
sendUpdateQuantityInCartRequest(updateQuantityInCartUrl, getRequestData(qty), $target);
}
@@ -248,7 +253,6 @@ $(document).ready(() => {
if (event.keyCode === 13) {
updateProductQuantityInCart(event);
}
-
return false;
}
diff --git a/themes/classic/_dev/package.json b/themes/classic/_dev/package.json
index 96f88607cb147..02e8a7384f95a 100644
--- a/themes/classic/_dev/package.json
+++ b/themes/classic/_dev/package.json
@@ -1,36 +1,36 @@
{
- "name": "prestashop-classic-dev-tools",
- "version": "1.0.0",
- "description": "Tools to help while developing the Classic theme",
- "main": "index.js",
- "scripts": {
- "watch": "webpack -w",
- "build": "webpack"
- },
- "author": "PrestaShop",
- "license": "AFL-3.0",
- "devDependencies": {
- "autoprefixer": "^6.7.7",
- "babel-loader": "^5.3.2",
- "bootstrap": "4.0.0-alpha.5",
- "bootstrap-touchspin": "^3.1.1",
- "bourbon": "^4.2.6",
- "css-loader": "^0.27.3",
- "expose-loader": "^0.7.3",
- "extract-text-webpack-plugin": "^2.1.0",
- "file-loader": "^0.10.1",
- "flexibility": "^1.0.5",
- "jquery": "^2.1.4",
- "material-design-icons": "^2.1.3",
- "node-sass": "^4.5.0",
- "notosans-fontface": "~1.0.1",
- "postcss-flexibility": "^1.0.2",
- "postcss-loader": "^1.3.3",
- "sass-loader": "^6.0.3",
- "style-loader": "^0.14.0",
- "tether": "^1.1.1",
- "velocity-animate": "^1.2.3",
- "webpack": "^2.2.1",
- "webpack-sources": "^0.1.0"
- }
+ "name": "prestashop-classic-dev-tools",
+ "version": "1.0.0",
+ "description": "Tools to help while developing the Classic theme",
+ "main": "index.js",
+ "scripts": {
+ "build": "NODE_ENV=production webpack --progress --colors --debug --display-chunks",
+ "watch": "webpack --progress --colors --debug --display-chunks --watch"
+ },
+ "author": "PrestaShop",
+ "license": "AFL-3.0",
+ "devDependencies": {
+ "autoprefixer": "^6.7.7",
+ "babel-loader": "^5.3.2",
+ "bootstrap": "4.0.0-alpha.5",
+ "bootstrap-touchspin": "^3.1.1",
+ "bourbon": "^4.2.6",
+ "css-loader": "^0.27.3",
+ "expose-loader": "^0.7.3",
+ "extract-text-webpack-plugin": "^2.1.0",
+ "file-loader": "^0.10.1",
+ "flexibility": "^1.0.5",
+ "jquery": "^2.1.4",
+ "material-design-icons": "^2.1.3",
+ "node-sass": "^4.5.0",
+ "notosans-fontface": "~1.0.1",
+ "postcss-flexibility": "^1.0.2",
+ "postcss-loader": "^1.3.3",
+ "sass-loader": "^6.0.3",
+ "style-loader": "^0.14.0",
+ "tether": "^1.1.1",
+ "velocity-animate": "^1.2.3",
+ "webpack": "^2.2.1",
+ "webpack-sources": "^0.1.0"
+ }
}
diff --git a/themes/classic/_dev/webpack.config.js b/themes/classic/_dev/webpack.config.js
index 65efbaeb025c7..5aaeb2bd0c35e 100644
--- a/themes/classic/_dev/webpack.config.js
+++ b/themes/classic/_dev/webpack.config.js
@@ -86,22 +86,24 @@ let config = {
]
};
-config.plugins.push(
- new webpack.optimize.UglifyJsPlugin({
- sourceMap: false,
- compress: {
- sequences: true,
- conditionals: true,
- booleans: true,
- if_return: true,
- join_vars: true,
- drop_console: true
- },
- output: {
- comments: false
- },
- minimize: true
- })
-);
+if (process.env.NODE_ENV === 'production') {
+ config.plugins.push(
+ new webpack.optimize.UglifyJsPlugin({
+ sourceMap: false,
+ compress: {
+ sequences: true,
+ conditionals: true,
+ booleans: true,
+ if_return: true,
+ join_vars: true,
+ drop_console: true
+ },
+ output: {
+ comments: false
+ },
+ minimize: true
+ })
+ );
+}
module.exports = config;
diff --git a/themes/package.json b/themes/package.json
index 4639f66dbb945..5dbf17257dd4f 100644
--- a/themes/package.json
+++ b/themes/package.json
@@ -1,17 +1,17 @@
{
- "name": "prestashop-core-theme-js",
- "version": "0.0.1",
- "description": "Tools to manage minimal assets for themes",
- "main": "index.js",
- "scripts": {
- "build": "webpack",
- "watch": "webpack -w"
- },
- "author": "PrestaShop",
- "license": "OSL-3.0",
- "devDependencies": {
- "jquery": "^2.1.4",
- "babel-loader": "^5.3.2",
- "webpack": "^1.12.2"
- }
+ "name": "prestashop-core-theme-js",
+ "version": "0.0.1",
+ "description": "Tools to manage minimal assets for themes",
+ "main": "index.js",
+ "scripts": {
+ "build": "NODE_ENV=production webpack --progress --colors --debug --display-chunks",
+ "watch": "webpack --progress --colors --debug --display-chunks --watch"
+ },
+ "author": "PrestaShop",
+ "license": "OSL-3.0",
+ "devDependencies": {
+ "jquery": "^2.1.4",
+ "babel-loader": "^5.3.2",
+ "webpack": "^1.12.2"
+ }
}
From 7a506d3c25473a625deed3f71a4690f319681fa5 Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Fri, 3 Aug 2018 17:34:14 +0200
Subject: [PATCH 03/14] Build assets
---
themes/classic/assets/js/theme.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/themes/classic/assets/js/theme.js b/themes/classic/assets/js/theme.js
index d70839a93747f..5ae77e384c3eb 100644
--- a/themes/classic/assets/js/theme.js
+++ b/themes/classic/assets/js/theme.js
@@ -1 +1 @@
-!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=26)}([function(t,e){t.exports=jQuery},function(t,e){t.exports=prestashop},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n5&&function(){var t=0;(0,a.default)(e).find(".color").each(function(e,n){e>4&&((0,a.default)(n).hide(),t++)}),(0,a.default)(e).find(".js-count").append("+"+t)}()})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";var i,r;!function(t){function e(t){var e=t.length,i=n.type(t);return"function"!==i&&!n.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t))}if(!t.jQuery){var n=function t(e,n){return new t.fn.init(e,n)};n.isWindow=function(t){return t&&t===t.window},n.type=function(t){return t?"object"==typeof t||"function"==typeof t?r[a.call(t)]||"object":typeof t:t+""},n.isArray=Array.isArray||function(t){return"array"===n.type(t)},n.isPlainObject=function(t){var e;if(!t||"object"!==n.type(t)||t.nodeType||n.isWindow(t))return!1;try{if(t.constructor&&!o.call(t,"constructor")&&!o.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}for(e in t);return void 0===e||o.call(t,e)},n.each=function(t,n,i){var r=0,o=t.length,a=e(t);if(i){if(a)for(;r0?r=a:n=a}while(Math.abs(o)>v&&++s=g?c(e,s):0===l?s:d(e,n,n+_)}function h(){E=!0,t===n&&i===r||f()}var m=4,g=.001,v=1e-7,y=10,b=11,_=1/(b-1),x="Float32Array"in e;if(4!==arguments.length)return!1;for(var w=0;w<4;++w)if("number"!=typeof arguments[w]||isNaN(arguments[w])||!isFinite(arguments[w]))return!1;t=Math.min(t,1),i=Math.min(i,1),t=Math.max(t,0),i=Math.max(i,0);var S=x?new Float32Array(b):new Array(b),E=!1,C=function(e){return E||h(),t===n&&i===r?e:0===e?0:1===e?1:l(p(e),n,r)};C.getControlPoints=function(){return[{x:t,y:n},{x:i,y:r}]};var T="generateBezier("+[t,n,i,r]+")";return C.toString=function(){return T},C}function f(t,e){var n=t;return _.isString(t)?E.Easings[t]||(n=!1):n=_.isArray(t)&&1===t.length?u.apply(null,t):_.isArray(t)&&2===t.length?C.apply(null,t.concat([e])):!(!_.isArray(t)||4!==t.length)&&c.apply(null,t),!1===n&&(n=E.Easings[E.defaults.easing]?E.defaults.easing:S),n}function d(t){if(t){var e=E.timestamp&&!0!==t?t:v.now(),n=E.State.calls.length;n>1e4&&(E.State.calls=r(E.State.calls),n=E.State.calls.length);for(var o=0;o4;t--){var e=n.createElement("div");if(e.innerHTML="\x3c!--[if IE "+t+"]>=0?e:Math.max(0,i+e),s=n<0?i+n:Math.min(n,i),l=s-a;if(l>0)if(o=new Array(l),this.charAt)for(r=0;r=0}:function(t,e){for(var n=0;n1e-4&&Math.abs(s.v)>1e-4))break;return o?function(t){return u[t*(u.length-1)|0]}:c}}();E.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},h.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){E.Easings[e[0]]=c.apply(null,e[1])});var T=E.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t=1?"":"alpha(opacity="+parseInt(100*parseFloat(n),10)+")"}else switch(t){case"name":return"opacity";case"extract":case"inject":return n}}},register:function(){function t(t,e,n){if("border-box"===T.getPropertyValue(e,"boxSizing").toString().toLowerCase()===(n||!1)){var i,r,o=0,a="width"===t?["Left","Right"]:["Top","Bottom"],s=["padding"+a[0],"padding"+a[1],"border"+a[0]+"Width","border"+a[1]+"Width"];for(i=0;i9)||E.State.isGingerbread||(T.Lists.transformsBase=T.Lists.transformsBase.concat(T.Lists.transforms3D));for(var n=0;n8)&&3===o.split(" ").length&&(o+=" 1"),o;case"inject":return/^rgb/.test(r)?r:(m<=8?4===r.split(" ").length&&(r=r.split(/\s+/).slice(0,3).join(" ")):3===r.split(" ").length&&(r+=" 1"),(m<=8?"rgb":"rgba")+"("+r.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}}();T.Normalizations.registered.innerWidth=e("width",!0),T.Normalizations.registered.innerHeight=e("height",!0),T.Normalizations.registered.outerWidth=e("width"),T.Normalizations.registered.outerHeight=e("height")}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(m||E.State.isAndroid&&!E.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(E.State.prefixMatches[t])return[E.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],n=0,i=e.length;n=4&&"("===P?k++:(k&&k<5||k>=4&&")"===P&&--k<5)&&(k=0),0===D&&"r"===P||1===D&&"g"===P||2===D&&"b"===P||3===D&&"a"===P||D>=3&&"("===P?(3===D&&"a"===P&&(N=1),D++):N&&","===P?++N>3&&(D=N=0):(N&&D<(N?5:4)||D>=(N?4:3)&&")"===P&&--D<(N?5:4))&&(D=N=0)}}C===v.length&&A===m.length||(E.debug,a=i),a&&(I.length?(E.debug,v=I,m=O,b=x=""):a=i)}a||(y=S(r,v),v=y[0],x=y[1],y=S(r,m),m=y[0].replace(/^([+-\/*])=/,function(t,e){return w=e,""}),b=y[1],v=parseFloat(v)||0,m=parseFloat(m)||0,"%"===b&&(/^(fontSize|lineHeight)$/.test(r)?(m/=100,b="em"):/^scale/.test(r)?(m/=100,b=""):/(Red|Green|Blue)$/i.test(r)&&(m=m/100*255,b="")));if(/[\/*]/.test(w))b=x;else if(x!==b&&0!==v)if(0===m)b=x;else{s=s||function(){var i={myParent:t.parentNode||n.body,position:T.getPropertyValue(t,"position"),fontSize:T.getPropertyValue(t,"fontSize")},r=i.position===F.lastPosition&&i.myParent===F.lastParent,o=i.fontSize===F.lastFontSize;F.lastParent=i.myParent,F.lastPosition=i.position,F.lastFontSize=i.fontSize;var a={};if(o&&r)a.emToPx=F.lastEmToPx,a.percentToPxWidth=F.lastPercentToPxWidth,a.percentToPxHeight=F.lastPercentToPxHeight;else{var s=c&&c.isSVG?n.createElementNS("http://www.w3.org/2000/svg","rect"):n.createElement("div");E.init(s),i.myParent.appendChild(s),h.each(["overflow","overflowX","overflowY"],function(t,e){E.CSS.setPropertyValue(s,e,"hidden")}),E.CSS.setPropertyValue(s,"position",i.position),E.CSS.setPropertyValue(s,"fontSize",i.fontSize),E.CSS.setPropertyValue(s,"boxSizing","content-box"),h.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){E.CSS.setPropertyValue(s,e,"100%")}),E.CSS.setPropertyValue(s,"paddingLeft","100em"),a.percentToPxWidth=F.lastPercentToPxWidth=(parseFloat(T.getPropertyValue(s,"width",null,!0))||1)/100,a.percentToPxHeight=F.lastPercentToPxHeight=(parseFloat(T.getPropertyValue(s,"height",null,!0))||1)/100,a.emToPx=F.lastEmToPx=(parseFloat(T.getPropertyValue(s,"paddingLeft"))||1)/100,i.myParent.removeChild(s)}return null===F.remToPx&&(F.remToPx=parseFloat(T.getPropertyValue(n.body,"fontSize"))||16),null===F.vwToPx&&(F.vwToPx=parseFloat(e.innerWidth)/100,F.vhToPx=parseFloat(e.innerHeight)/100),a.remToPx=F.remToPx,a.vwToPx=F.vwToPx,a.vhToPx=F.vhToPx,E.debug,a}();var q=/margin|padding|left|right|width|text|word|letter/i.test(r)||/X$/.test(r)||"x"===r?"x":"y";switch(x){case"%":v*="x"===q?s.percentToPxWidth:s.percentToPxHeight;break;case"px":break;default:v*=s[x+"ToPx"]}switch(b){case"%":v*=1/("x"===q?s.percentToPxWidth:s.percentToPxHeight);break;case"px":break;default:v*=1/s[b+"ToPx"]}}switch(w){case"+":m=v+m;break;case"-":m=v-m;break;case"*":m*=v;break;case"/":m=v/m}u[r]={rootPropertyValue:d,startValue:v,currentValue:v,endValue:m,unitType:b,easing:g},a&&(u[r].pattern=a),E.debug};for(var L in x)if(x.hasOwnProperty(L)){var j=T.Names.camelCase(L),B=function(e,n){var i,o,a;return _.isFunction(e)&&(e=e.call(t,r,I)),_.isArray(e)?(i=e[0],!_.isArray(e[1])&&/^[\d-]/.test(e[1])||_.isFunction(e[1])||T.RegEx.isHex.test(e[1])?a=e[1]:_.isString(e[1])&&!T.RegEx.isHex.test(e[1])&&E.Easings[e[1]]||_.isArray(e[1])?(o=n?e[1]:f(e[1],l.duration),a=e[2]):a=e[1]||e[2]):i=e,n||(o=o||l.easing),_.isFunction(i)&&(i=i.call(t,r,I)),_.isFunction(a)&&(a=a.call(t,r,I)),[i||0,o,a]}(x[L]);if(b(T.Lists.colors,j)){var V=B[0],M=B[1],H=B[2];if(T.RegEx.isHex.test(V)){for(var W=["Red","Green","Blue"],U=T.Values.hexToRgb(V),q=H?T.Values.hexToRgb(H):i,z=0;z0?"up":"down"}function d(t){var e=(0,a.default)(t.currentTarget),n=e.data("update-url"),i=e.attr("value"),r=e.val();if(r!=parseInt(r)||r<0||isNaN(r))return void e.val(i);var o=r-i;if(0!=o){s(n,c(o),e)}}var h=".js-cart-line-product-quantity",m=[];l.default.on("updateCart",function(){(0,a.default)(".quickview").modal("hide")}),l.default.on("updatedCart",function(){r()}),r();var g=(0,a.default)("body"),v=function(){for(var t;m.length>0;)t=m.pop(),t.abort()},y=function(t){return(0,a.default)(t.parents(".bootstrap-touchspin").find("input"))},b=function(t){t.preventDefault();var e=(0,a.default)(t.currentTarget),n=t.currentTarget.dataset,i=o(e,t.namespace),r={ajax:"1",action:"update"};void 0!==i&&(v(),a.default.ajax({url:i.url,method:"POST",data:r,dataType:"json",beforeSend:function(t){m.push(t)}}).then(function(t){p.checkUpdateOpertation(t),y(e).val(t.quantity),l.default.emit("updateCart",{reason:n})}).fail(function(t){l.default.emit("handleError",{eventType:"updateProductInCart",resp:t,cartAction:i.type})}))};g.on("click",'[data-link-action="delete-from-cart"], [data-link-action="remove-voucher"]',b),g.on("touchspin.on.startdownspin",u,b),g.on("touchspin.on.startupspin",u,b),g.on("focusout",h,function(t){d(t)}),g.on("keyup",h,function(t){13==t.keyCode&&d(t)}),g.on("click",".js-discount .code",function(t){t.stopPropagation();var e=(0,a.default)(t.currentTarget);return(0,a.default)("[name=discount_name]").val(e.text()),!1})});var p={switchErrorStat:function(){var t=(0,a.default)(".checkout a");if(((0,a.default)("#notifications article.alert-danger").length||""!==d&&!c)&&t.addClass("disabled"),""!==d){var e=' ";(0,a.default)("#notifications .container").html(e),d="",f=!1,c&&t.removeClass("disabled")}else!c&&f&&(c=!1,f=!1,(0,a.default)("#notifications .container").html(""),t.removeClass("disabled"))},checkUpdateOpertation:function(t){c=t.hasOwnProperty("hasError");var e=t.errors||"";d=e instanceof Array?e.join(" "):e,f=!0}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(){0!==(0,a.default)(".js-cancel-address").length&&(0,a.default)(".checkout-step:not(.js-current-step) .step-title").addClass("not-allowed"),(0,a.default)(".js-terms a").on("click",function(t){t.preventDefault();var e=(0,a.default)(t.target).attr("href");e&&(e+="?content_only=1",a.default.get(e,function(t){(0,a.default)("#modal").find(".js-modal-content").html((0,a.default)(t).find(".page-cms").contents())}).fail(function(t){l.default.emit("handleError",{eventType:"clickTerms",resp:t})})),(0,a.default)("#modal").modal("show")}),(0,a.default)(".js-gift-checkbox").on("click",function(t){(0,a.default)("#gift").collapse("toggle")})}var o=n(0),a=i(o),s=n(1),l=i(s);(0,a.default)(document).ready(function(){1===(0,a.default)("body#checkout").length&&r(),l.default.on("updatedDeliveryForm",function(t){void 0!==t.deliveryOption&&0!==t.deliveryOption.length&&((0,a.default)(".carrier-extra-content").hide(),t.deliveryOption.next(".carrier-extra-content").slideDown())})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),a=n(0),s=i(a);o.default.blockcart=o.default.blockcart||{},o.default.blockcart.showModal=function(t){function e(){return(0,s.default)("#blockcart-modal")}var n=e();n.length&&n.remove(),(0,s.default)("body").append(t),n=e(),n.modal("show").on("hidden.bs.modal",function(t){o.default.emit("updateProduct",{reason:t.currentTarget.dataset})})}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n(0,a.default)(".js-modal-mask").height()&&(t.move("down"),(0,a.default)(".js-modal-arrow-up").css("opacity","1"))})}},{key:"move",value:function(t){var e=(0,a.default)(".js-modal-product-images"),n=(0,a.default)(".js-modal-product-images li img").height()+10,i=e.position().top;e.velocity({translateY:"up"===t?i+n:i-n},function(){e.position().top>=0?(0,a.default)(".js-modal-arrow-up").css("opacity",".2"):e.position().top+e.height()<=(0,a.default)(".js-modal-mask").height()&&(0,a.default)(".js-modal-arrow-down").css("opacity",".2")})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&this.options.badge&&this.$elementFilestyle.find("label").append(' '+e.length+""),this.$elementFilestyle.find(".group-span-filestyle").removeClass("input-group-btn")}}},size:function(t){if(void 0===t)return this.options.size;var e=this.$elementFilestyle.find("label"),n=this.$elementFilestyle.find("input");e.removeClass("btn-lg btn-sm"),n.removeClass("input-lg input-sm"),"nr"!=t&&(e.addClass("btn-"+t),n.addClass("input-"+t))},placeholder:function(t){if(void 0===t)return this.options.placeholder;this.options.placeholder=t,this.$elementFilestyle.find("input").attr("placeholder",t)},buttonText:function(t){if(void 0===t)return this.options.buttonText;this.options.buttonText=t,this.$elementFilestyle.find("label .buttonText").html(this.options.buttonText)},buttonName:function(t){if(void 0===t)return this.options.buttonName;this.options.buttonName=t,this.$elementFilestyle.find("label").attr({class:"btn "+this.options.buttonName})},iconName:function(t){if(void 0===t)return this.options.iconName;this.$elementFilestyle.find(".icon-span-filestyle").attr({class:"icon-span-filestyle "+this.options.iconName})},htmlIcon:function(){return this.options.icon?' ':""},htmlInput:function(){return this.options.input?' ':""},pushNameFiles:function(){var t="",e=[];void 0===this.$element[0].files?e[0]={name:this.$element[0]&&this.$element[0].value}:e=this.$element[0].files;for(var n=0;n",i=n.options.buttonBefore?o+n.htmlInput():n.htmlInput()+o,n.$elementFilestyle=t(''+i+"
"),n.$elementFilestyle.find(".group-span-filestyle").attr("tabindex","0").keypress(function(t){if(13===t.keyCode||32===t.charCode)return n.$elementFilestyle.find("label").click(),!1}),n.$element.css({position:"absolute",clip:"rect(0px 0px 0px 0px)"}).attr("tabindex","-1").after(n.$elementFilestyle),n.options.disabled&&n.$element.attr("disabled","true"),n.$element.change(function(){var t=n.pushNameFiles();0==n.options.input&&n.options.badge?0==n.$elementFilestyle.find(".badge").length?n.$elementFilestyle.find("label").append(' '+t.length+""):0==t.length?n.$elementFilestyle.find(".badge").remove():n.$elementFilestyle.find(".badge").html(t.length):n.$elementFilestyle.find(".badge").remove()}),window.navigator.userAgent.search(/firefox/i)>-1&&n.$elementFilestyle.find("label").click(function(){return n.$element.click(),!1})}};var i=t.fn.filestyle;t.fn.filestyle=function(e,i){var r="",o=this.each(function(){if("file"===t(this).attr("type")){var o=t(this),a=o.data("filestyle"),s=t.extend({},t.fn.filestyle.defaults,e,"object"==typeof e&&e);a||(o.data("filestyle",a=new n(this,s)),a.constructor()),"string"==typeof e&&(r=a[e](i))}});return void 0!==typeof r?r:o},t.fn.filestyle.defaults={buttonText:"Choose file",iconName:"glyphicon glyphicon-folder-open",buttonName:"btn-default",size:"nr",input:!0,badge:!0,icon:!0,buttonBefore:!1,disabled:!1,placeholder:""},t.fn.filestyle.noConflict=function(){return t.fn.filestyle=i,this},t(function(){t(".filestyle").each(function(){var e=t(this),n={input:"false"!==e.attr("data-input"),icon:"false"!==e.attr("data-icon"),buttonBefore:"true"===e.attr("data-buttonBefore"),disabled:"true"===e.attr("data-disabled"),size:e.attr("data-size"),buttonText:e.attr("data-buttonText"),buttonName:e.attr("data-buttonName"),iconName:e.attr("data-iconName"),badge:"false"!==e.attr("data-badge"),placeholder:e.attr("data-placeholder")};e.filestyle(n)})})}(window.jQuery)},function(t,e,n){"use strict";!function(t){t.fn.scrollbox=function(e){var n={linear:!1,startDelay:2,delay:3,step:5,speed:32,switchItems:1,direction:"vertical",distance:"auto",autoPlay:!0,onMouseOverPause:!0,paused:!1,queue:null,listElement:"ul",listItemElement:"li",infiniteLoop:!0,switchAmount:0,afterForward:null,afterBackward:null,triggerStackable:!1};return e=t.extend(n,e),e.scrollOffset="vertical"===e.direction?"scrollTop":"scrollLeft",e.queue&&(e.queue=t("#"+e.queue)),this.each(function(){var n,i,r,o,a,s,l,u,c,f=t(this),d=null,p=null,h=!1,m=0,g=0;e.onMouseOverPause&&(f.bind("mouseover",function(){h=!0}),f.bind("mouseout",function(){h=!1})),n=f.children(e.listElement+":first-child"),!1===e.infiniteLoop&&0===e.switchAmount&&(e.switchAmount=n.children().length),s=function(){if(!h){var r,a,s,l,u;if(r=n.children(e.listItemElement+":first-child"),l="auto"!==e.distance?e.distance:"vertical"===e.direction?r.outerHeight(!0):r.outerWidth(!0),e.linear?s=Math.min(f[0][e.scrollOffset]+e.step,l):(u=Math.max(3,parseInt(.3*(l-f[0][e.scrollOffset]),10)),s=Math.min(f[0][e.scrollOffset]+u,l)),f[0][e.scrollOffset]=s,s>=l){for(a=0;a0?(n.append(e.queue.find(e.listItemElement)[0]),n.children(e.listItemElement+":first-child").remove()):n.append(n.children(e.listItemElement+":first-child")),++m;if(f[0][e.scrollOffset]=0,clearInterval(d),d=null,t.isFunction(e.afterForward)&&e.afterForward.call(f,{switchCount:m,currentFirstChild:n.children(e.listItemElement+":first-child")}),e.triggerStackable&&0!==g)return void i();if(!1===e.infiniteLoop&&m>=e.switchAmount)return;e.autoPlay&&(p=setTimeout(o,1e3*e.delay))}}},l=function(){if(!h){var r,a,s,l,u;if(0===f[0][e.scrollOffset]){for(a=0;a0?(g--,p=setTimeout(o,0)):(g++,p=setTimeout(r,0)))},o=function(){clearInterval(d),d=setInterval(s,e.speed)},r=function(){clearInterval(d),d=setInterval(l,e.speed)},u=function(){e.autoPlay=!0,h=!1,clearInterval(d),d=setInterval(s,e.speed)},c=function(){h=!0},a=function(t){e.delay=t||e.delay,clearTimeout(p),e.autoPlay&&(p=setTimeout(o,1e3*e.delay))},e.autoPlay&&(p=setTimeout(o,1e3*e.startDelay)),f.bind("resetClock",function(t){a(t)}),f.bind("forward",function(){e.triggerStackable?null!==d?g++:o():(clearTimeout(p),o())}),f.bind("backward",function(){e.triggerStackable?null!==d?g--:r():(clearTimeout(p),r())}),f.bind("pauseHover",function(){c()}),f.bind("forwardHover",function(){u()}),f.bind("speedUp",function(t,n){"undefined"===n&&(n=Math.max(1,parseInt(e.speed/2,10))),e.speed=n}),f.bind("speedDown",function(t,n){"undefined"===n&&(n=2*e.speed),e.speed=n}),f.bind("updateConfig",function(n,i){e=t.extend(e,i)})})}}(jQuery)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t){(0,a.default)("#search_filters").replaceWith(t.rendered_facets),(0,a.default)("#js-active-search-filters").replaceWith(t.rendered_active_filters),(0,a.default)("#js-product-list-top").replaceWith(t.rendered_products_top),(0,a.default)("#js-product-list").replaceWith(t.rendered_products),(0,a.default)("#js-product-list-bottom").replaceWith(t.rendered_products_bottom),(new c.default).init()}var o=n(0),a=i(o),s=n(1),l=i(s);n(4);var u=n(3),c=i(u);(0,a.default)(document).ready(function(){l.default.on("clickQuickView",function(e){var n={action:"quickview",id_product:e.dataset.idProduct,id_product_attribute:e.dataset.idProductAttribute};a.default.post(l.default.urls.pages.product,n,null,"json").then(function(e){(0,a.default)("body").append(e.quickview_html);var n=(0,a.default)("#quickview-modal-"+e.product.id+"-"+e.product.id_product_attribute);n.modal("show"),t(n),n.on("hidden.bs.modal",function(){n.remove()})}).fail(function(t){l.default.emit("handleError",{eventType:"clickQuickView",resp:t})})});var t=function(t){var n=(0,a.default)(".js-arrows"),i=t.find(".js-qv-product-images");(0,a.default)(".js-thumb").on("click",function(t){(0,a.default)(".js-thumb").hasClass("selected")&&(0,a.default)(".js-thumb").removeClass("selected"),(0,a.default)(t.currentTarget).addClass("selected"),(0,a.default)(".js-qv-product-cover").attr("src",(0,a.default)(t.target).data("image-large-src"))}),i.find("li").length<=4?n.hide():n.on("click",function(t){(0,a.default)(t.target).hasClass("arrow-up")&&(0,a.default)(".js-qv-product-images").position().top<0?(e("up"),(0,a.default)(".arrow-down").css("opacity","1")):(0,a.default)(t.target).hasClass("arrow-down")&&i.position().top+i.height()>(0,a.default)(".js-qv-mask").height()&&(e("down"),(0,a.default)(".arrow-up").css("opacity","1"))}),t.find("#quantity_wanted").TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:1,max:1e6})},e=function(t){var e=(0,a.default)(".js-qv-product-images"),n=(0,a.default)(".js-qv-product-images li img").height()+20,i=e.position().top;e.velocity({translateY:"up"===t?i+n:i-n},function(){e.position().top>=0?(0,a.default)(".arrow-up").css("opacity",".2"):e.position().top+e.height()<=(0,a.default)(".js-qv-mask").height()&&(0,a.default)(".arrow-down").css("opacity",".2")})};(0,a.default)("body").on("click","#search_filter_toggler",function(){(0,a.default)("#search_filters_wrapper").removeClass("hidden-sm-down"),(0,a.default)("#content-wrapper").addClass("hidden-sm-down"),(0,a.default)("#footer").addClass("hidden-sm-down")}),(0,a.default)("#search_filter_controls .clear").on("click",function(){(0,a.default)("#search_filters_wrapper").addClass("hidden-sm-down"),(0,a.default)("#content-wrapper").removeClass("hidden-sm-down"),(0,a.default)("#footer").removeClass("hidden-sm-down")}),(0,a.default)("#search_filter_controls .ok").on("click",function(){(0,a.default)("#search_filters_wrapper").addClass("hidden-sm-down"),(0,a.default)("#content-wrapper").removeClass("hidden-sm-down"),(0,a.default)("#footer").removeClass("hidden-sm-down")});var n=function(t){if(void 0!==t.target.dataset.searchUrl)return t.target.dataset.searchUrl;if(void 0===(0,a.default)(t.target).parent()[0].dataset.searchUrl)throw new Error("Can not parse search URL");return(0,a.default)(t.target).parent()[0].dataset.searchUrl};(0,a.default)("body").on("change","#search_filters input[data-search-url]",function(t){l.default.emit("updateFacets",n(t))}),(0,a.default)("body").on("click",".js-search-filters-clear-all",function(t){l.default.emit("updateFacets",n(t))}),(0,a.default)("body").on("click",".js-search-link",function(t){t.preventDefault(),l.default.emit("updateFacets",(0,a.default)(t.target).closest("a").get(0).href)}),(0,a.default)("body").on("change","#search_filters select",function(t){var e=(0,a.default)(t.target).closest("form");l.default.emit("updateFacets","?"+e.serialize())}),l.default.on("updateProductList",function(t){r(t)})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(0),o=i(r),a=n(1),s=i(a);(0,o.default)(document).ready(function(){function t(){(0,o.default)(".js-thumb").on("click",function(t){(0,o.default)(".js-modal-product-cover").attr("src",(0,o.default)(t.target).data("image-large-src")),(0,o.default)(".selected").removeClass("selected"),(0,o.default)(t.target).addClass("selected"),(0,o.default)(".js-qv-product-cover").prop("src",(0,o.default)(t.currentTarget).data("image-large-src"))})}function e(){(0,o.default)("#main .js-qv-product-images li").length>2?((0,o.default)("#main .js-qv-mask").addClass("scroll"),(0,o.default)(".scroll-box-arrows").addClass("scroll"),(0,o.default)("#main .js-qv-mask").scrollbox({direction:"h",distance:113,autoPlay:!1}),(0,o.default)(".scroll-box-arrows .left").click(function(){(0,o.default)("#main .js-qv-mask").trigger("backward")}),(0,o.default)(".scroll-box-arrows .right").click(function(){(0,o.default)("#main .js-qv-mask").trigger("forward")})):((0,o.default)("#main .js-qv-mask").removeClass("scroll"),(0,o.default)(".scroll-box-arrows").removeClass("scroll"))}function n(){(0,o.default)(".js-file-input").on("change",function(t){var e=void 0,n=void 0;(e=(0,o.default)(t.currentTarget)[0])&&(n=e.files[0])&&(0,o.default)(e).prev().text(n.name)})}!function(){var t=(0,o.default)("#quantity_wanted");t.TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:parseInt(t.attr("min"),10),max:1e6}),(0,o.default)("body").on("change keyup","#quantity_wanted",function(t){(0,o.default)(t.currentTarget).trigger("touchspin.stopspin"),s.default.emit("updateProduct",{eventType:"updatedProductQuantity",event:t})})}(),n(),t(),e(),s.default.on("updatedProduct",function(i){if(n(),t(),i&&i.product_minimal_quantity){var r=parseInt(i.product_minimal_quantity,10);(0,o.default)("#quantity_wanted").trigger("touchspin.updatesettings",{min:r})}e(),(0,o.default)((0,o.default)(".tabs .nav-link.active").attr("href")).addClass("active").removeClass("fade"),(0,o.default)(".js-product-images-modal").replaceWith(i.product_images_modal)})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=e.children().detach();e.empty().append(t.children().detach()),t.append(n)}function o(){u.default.responsive.mobile?(0,s.default)("*[id^='_desktop_']").each(function(t,e){var n=(0,s.default)("#"+e.id.replace("_desktop_","_mobile_"));n.length&&r((0,s.default)(e),n)}):(0,s.default)("*[id^='_mobile_']").each(function(t,e){var n=(0,s.default)("#"+e.id.replace("_mobile_","_desktop_"));n.length&&r((0,s.default)(e),n)}),u.default.emit("responsive update",{mobile:u.default.responsive.mobile})}var a=n(0),s=i(a),l=n(1),u=i(l);u.default.responsive=u.default.responsive||{},u.default.responsive.current_width=window.innerWidth,u.default.responsive.min_width=768,u.default.responsive.mobile=u.default.responsive.current_width=e&&n=e;u.default.responsive.current_width=n,u.default.responsive.mobile=u.default.responsive.current_width'+T.prefix+"",s=''+T.postfix+"";r.hasClass("input-group-btn")?(n='",r.append(n)):(n='",t(n).insertBefore(L)),o.hasClass("input-group-btn")?(i='",o.prepend(i)):(i='",t(i).insertAfter(L)),t(a).insertBefore(L),t(s).insertAfter(L),A=e}function p(){var e;e=T.verticalbuttons?''+T.prefix+''+T.postfix+'
':''+T.prefix+''+T.postfix+'
",A=t(e).insertBefore(L),t(".bootstrap-touchspin-prefix",A).after(L),L.hasClass("input-sm")?A.addClass("input-group-sm"):L.hasClass("input-lg")&&A.addClass("input-group-lg")}function h(){I={down:t(".bootstrap-touchspin-down",A),up:t(".bootstrap-touchspin-up",A),input:t("input",A),prefix:t(".bootstrap-touchspin-prefix",A).addClass(T.prefix_extraclass),postfix:t(".bootstrap-touchspin-postfix",A).addClass(T.postfix_extraclass)}}function m(){""===T.prefix&&I.prefix.hide(),""===T.postfix&&I.postfix.hide()}function g(){L.on("keydown",function(t){var e=t.keyCode||t.which;38===e?("up"!==V&&(x(),E()),t.preventDefault()):40===e&&("down"!==V&&(w(),S()),t.preventDefault())}),L.on("keyup",function(t){var e=t.keyCode||t.which;38===e?C():40===e&&C()}),L.on("blur",function(){b()}),I.down.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("down"!==V&&(w(),S()),t.preventDefault())}),I.down.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||C()}),I.up.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("up"!==V&&(x(),E()),t.preventDefault())}),I.up.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||C()}),I.down.on("mousedown.touchspin",function(t){I.down.off("touchstart.touchspin"),L.is(":disabled")||(w(),S(),t.preventDefault(),t.stopPropagation())}),I.down.on("touchstart.touchspin",function(t){I.down.off("mousedown.touchspin"),L.is(":disabled")||(w(),S(),t.preventDefault(),t.stopPropagation())}),I.up.on("mousedown.touchspin",function(t){I.up.off("touchstart.touchspin"),L.is(":disabled")||(x(),E(),t.preventDefault(),t.stopPropagation())}),I.up.on("touchstart.touchspin",function(t){I.up.off("mousedown.touchspin"),L.is(":disabled")||(x(),E(),t.preventDefault(),t.stopPropagation())}),I.up.on("mouseout touchleave touchend touchcancel",function(t){V&&(t.stopPropagation(),C())}),I.down.on("mouseout touchleave touchend touchcancel",function(t){V&&(t.stopPropagation(),C())}),I.down.on("mousemove touchmove",function(t){V&&(t.stopPropagation(),t.preventDefault())}),I.up.on("mousemove touchmove",function(t){V&&(t.stopPropagation(),t.preventDefault())}),t(document).on(n(["mouseup","touchend","touchcancel"],i).join(" "),function(t){V&&(t.preventDefault(),C())}),t(document).on(n(["mousemove","touchmove","scroll","scrollstart"],i).join(" "),function(t){V&&(t.preventDefault(),C())}),L.on("mousewheel DOMMouseScroll",function(t){if(T.mousewheel&&L.is(":focus")){var e=t.originalEvent.wheelDelta||-t.originalEvent.deltaY||-t.originalEvent.detail;t.stopPropagation(),t.preventDefault(),e<0?w():x()}})}function v(){L.on("touchspin.uponce",function(){C(),x()}),L.on("touchspin.downonce",function(){C(),w()}),L.on("touchspin.startupspin",function(){E()}),L.on("touchspin.startdownspin",function(){S()}),L.on("touchspin.stopspin",function(){C()}),L.on("touchspin.updatesettings",function(t,e){s(e)})}function y(t){switch(T.forcestepdivisibility){case"round":return(Math.round(t/T.step)*T.step).toFixed(T.decimals);case"floor":return(Math.floor(t/T.step)*T.step).toFixed(T.decimals);case"ceil":return(Math.ceil(t/T.step)*T.step).toFixed(T.decimals);default:return t}}function b(){var t,e,n;if(""===(t=L.val()))return void(""!==T.replacementval&&(L.val(T.replacementval),L.trigger("change")));T.decimals>0&&"."===t||(e=parseFloat(t),isNaN(e)&&(e=""!==T.replacementval?T.replacementval:0),n=e,e.toString()!==t&&(n=e),eT.max&&(n=T.max),n=y(n),Number(t).toString()!==n.toString()&&(L.val(n),L.trigger("change")))}function _(){if(T.booster){var t=Math.pow(2,Math.floor(B/T.boostat))*T.step;return T.maxboostedstep&&t>T.maxboostedstep&&(t=T.maxboostedstep,O=Math.round(O/t)*t),Math.max(T.step,t)}return T.step}function x(){b(),O=parseFloat(I.input.val()),isNaN(O)&&(O=0);var t=O,e=_();O+=e,O>T.max&&(O=T.max,L.trigger("touchspin.on.max"),C()),I.input.val(Number(O).toFixed(T.decimals)),t!==O&&L.trigger("change")}function w(){b(),O=parseFloat(I.input.val()),isNaN(O)&&(O=0);var t=O,e=_();O-=e,O=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;nthis._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(p.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var r=e>i?d.NEXT:d.PREVIOUS;this._slide(r,this._items[e])}},l.prototype.dispose=function(){t(this._element).off(s),t.removeData(this._element,a),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function(n){return n=t.extend({},c,n),o.typeCheckConfig(e,n,f),n},l.prototype._addEventListeners=function(){this._config.keyboard&&t(this._element).on(p.KEYDOWN,t.proxy(this._keydown,this)),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||t(this._element).on(p.MOUSEENTER,t.proxy(this.pause,this)).on(p.MOUSELEAVE,t.proxy(this.cycle,this))},l.prototype._keydown=function(t){if(t.preventDefault(),!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}},l.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(m.ITEM)),this._items.indexOf(e)},l.prototype._getItemByDirection=function(t,e){var n=t===d.NEXT,i=t===d.PREVIOUS,r=this._getItemIndex(e),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return e;var a=t===d.PREVIOUS?-1:1,s=(r+a)%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},l.prototype._triggerSlideEvent=function(e,n){var i=t.Event(p.SLIDE,{relatedTarget:e,direction:n});return t(this._element).trigger(i),i},l.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(m.ACTIVE).removeClass(h.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(h.ACTIVE)}},l.prototype._slide=function(e,n){var i=this,r=t(this._element).find(m.ACTIVE_ITEM)[0],a=n||r&&this._getItemByDirection(e,r),s=Boolean(this._interval),l=e===d.NEXT?h.LEFT:h.RIGHT;if(a&&t(a).hasClass(h.ACTIVE))return void(this._isSliding=!1);if(!this._triggerSlideEvent(a,l).isDefaultPrevented()&&r&&a){this._isSliding=!0,s&&this.pause(),this._setActiveIndicatorElement(a);var u=t.Event(p.SLID,{relatedTarget:a,direction:l});o.supportsTransitionEnd()&&t(this._element).hasClass(h.SLIDE)?(t(a).addClass(e),o.reflow(a),t(r).addClass(l),t(a).addClass(l),t(r).one(o.TRANSITION_END,function(){t(a).removeClass(l).removeClass(e),t(a).addClass(h.ACTIVE),t(r).removeClass(h.ACTIVE).removeClass(e).removeClass(l),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(u)},0)}).emulateTransitionEnd(600)):(t(r).removeClass(h.ACTIVE),t(a).addClass(h.ACTIVE),this._isSliding=!1,t(this._element).trigger(u)),s&&this.cycle()}},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r=t.extend({},c,t(this).data());"object"===(void 0===e?"undefined":i(e))&&t.extend(r,e);var o="string"==typeof e?e:r.slide;if(n||(n=new l(this,r),t(this).data(a,n)),"number"==typeof e)n.to(e);else if("string"==typeof o){if(void 0===n[o])throw new Error('No method named "'+o+'"');n[o]()}else r.interval&&(n.pause(),n.cycle())})},l._dataApiClickHandler=function(e){var n=o.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(h.CAROUSEL)){var r=t.extend({},t(i).data(),t(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),l._jQueryInterface.call(t(i),r),s&&t(i).data(a).to(s),e.preventDefault()}}},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return c}}]),l}();t(document).on(p.CLICK_DATA_API,m.DATA_SLIDE,g._dataApiClickHandler),t(window).on(p.LOAD_DATA_API,function(){t(m.DATA_RIDE).each(function(){var e=t(this);g._jQueryInterface.call(e,e.data())})}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=u,g._jQueryInterface}}(jQuery),function(t){var e="collapse",a="bs.collapse",s="."+a,l=t.fn[e],u={toggle:!0,parent:""},c={toggle:"boolean",parent:"string"},f={SHOW:"show"+s,SHOWN:"shown"+s,HIDE:"hide"+s,HIDDEN:"hidden"+s,CLICK_DATA_API:"click"+s+".data-api"},d={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},h={ACTIVES:".card > .in, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function s(e,i){n(this,s),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]')),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return s.prototype.toggle=function(){t(this._element).hasClass(d.IN)?this.hide():this.show()},s.prototype.show=function(){var e=this;if(!this._isTransitioning&&!t(this._element).hasClass(d.IN)){var n=void 0,i=void 0;if(this._parent&&(n=t.makeArray(t(h.ACTIVES)),n.length||(n=null)),!(n&&(i=t(n).data(a))&&i._isTransitioning)){var r=t.Event(f.SHOW);if(t(this._element).trigger(r),!r.isDefaultPrevented()){n&&(s._jQueryInterface.call(t(n),"hide"),i||t(n).data(a,null));var l=this._getDimension();t(this._element).removeClass(d.COLLAPSE).addClass(d.COLLAPSING),this._element.style[l]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&t(this._triggerArray).removeClass(d.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var u=function(){t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).addClass(d.IN),e._element.style[l]="",e.setTransitioning(!1),t(e._element).trigger(f.SHOWN)};if(!o.supportsTransitionEnd())return void u();var c=l[0].toUpperCase()+l.slice(1),p="scroll"+c;t(this._element).one(o.TRANSITION_END,u).emulateTransitionEnd(600),this._element.style[l]=this._element[p]+"px"}}}},s.prototype.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(d.IN)){var n=t.Event(f.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),r=i===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[r]+"px",o.reflow(this._element),t(this._element).addClass(d.COLLAPSING).removeClass(d.COLLAPSE).removeClass(d.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&t(this._triggerArray).addClass(d.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var a=function(){e.setTransitioning(!1),t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).trigger(f.HIDDEN)};return this._element.style[i]="",o.supportsTransitionEnd()?void t(this._element).one(o.TRANSITION_END,a).emulateTransitionEnd(600):void a()}}},s.prototype.setTransitioning=function(t){this._isTransitioning=t},s.prototype.dispose=function(){t.removeData(this._element,a),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},s.prototype._getConfig=function(n){return n=t.extend({},u,n),n.toggle=Boolean(n.toggle),o.typeCheckConfig(e,n,c),n},s.prototype._getDimension=function(){return t(this._element).hasClass(p.WIDTH)?p.WIDTH:p.HEIGHT},s.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(s._getTargetFromElement(n),[n])}),n},s.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(d.IN);e.setAttribute("aria-expanded",i),n.length&&t(n).toggleClass(d.COLLAPSED,!i).attr("aria-expanded",i)}},s._getTargetFromElement=function(e){var n=o.getSelectorFromElement(e);return n?t(n)[0]:null},s._jQueryInterface=function(e){return this.each(function(){var n=t(this),r=n.data(a),o=t.extend({},u,n.data(),"object"===(void 0===e?"undefined":i(e))&&e);if(!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||(r=new s(this,o),n.data(a,r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e]()}})},r(s,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}}]),s}();t(document).on(f.CLICK_DATA_API,h.DATA_TOGGLE,function(e){e.preventDefault();var n=m._getTargetFromElement(this),i=t(n).data(a),r=i?"toggle":t(this).data();m._jQueryInterface.call(t(n),r)}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=l,m._jQueryInterface}}(jQuery),function(t){var e="dropdown",i="bs.dropdown",a="."+i,s=".data-api",l=t.fn[e],u={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click"+a+s,KEYDOWN_DATA_API:"keydown"+a+s},c={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},f={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},d=function(){function e(t){n(this,e),this._element=t,this._addEventListeners()}return e.prototype.toggle=function(){if(this.disabled||t(this).hasClass(c.DISABLED))return!1;var n=e._getParentFromElement(this),i=t(n).hasClass(c.OPEN);if(e._clearMenus(),i)return!1;if("ontouchstart"in document.documentElement&&!t(n).closest(f.NAVBAR_NAV).length){var r=document.createElement("div");r.className=c.BACKDROP,t(r).insertBefore(this),t(r).on("click",e._clearMenus)}var o={relatedTarget:this},a=t.Event(u.SHOW,o);return t(n).trigger(a),!a.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded","true"),t(n).toggleClass(c.OPEN),t(n).trigger(t.Event(u.SHOWN,o)),!1)},e.prototype.dispose=function(){t.removeData(this._element,i),t(this._element).off(a),this._element=null},e.prototype._addEventListeners=function(){t(this._element).on(u.CLICK,this.toggle)},e._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(i);if(r||t(this).data(i,r=new e(this)),"string"==typeof n){if(void 0===r[n])throw new Error('No method named "'+n+'"');r[n].call(this)}})},e._clearMenus=function(n){if(!n||3!==n.which){var i=t(f.BACKDROP)[0];i&&i.parentNode.removeChild(i);for(var r=t.makeArray(t(f.DATA_TOGGLE)),o=0;o0&&s--,40===n.which&&sdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},l.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},l.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}if(this._activeTarget&&t=this._offsets[r]&&(void 0===this._offsets[r+1]||t .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},f=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!t(this._element).hasClass(u.ACTIVE)){var n=void 0,i=void 0,r=t(this._element).closest(c.UL)[0],a=o.getSelectorFromElement(this._element);r&&(i=t.makeArray(t(r).find(c.ACTIVE)),i=i[i.length-1]);var s=t.Event(l.HIDE,{relatedTarget:this._element}),f=t.Event(l.SHOW,{relatedTarget:i});if(i&&t(i).trigger(s),t(this._element).trigger(f),!f.isDefaultPrevented()&&!s.isDefaultPrevented()){a&&(n=t(a)[0]),this._activate(this._element,r);var d=function(){var n=t.Event(l.HIDDEN,{relatedTarget:e._element}),r=t.Event(l.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(r)};n?this._activate(n,n.parentNode,d):d()}}},e.prototype.dispose=function(){t.removeClass(this._element,i),this._element=null},e.prototype._activate=function(e,n,i){var r=t(n).find(c.ACTIVE_CHILD)[0],a=i&&o.supportsTransitionEnd()&&(r&&t(r).hasClass(u.FADE)||Boolean(t(n).find(c.FADE_CHILD)[0])),s=t.proxy(this._transitionComplete,this,e,r,a,i);r&&a?t(r).one(o.TRANSITION_END,s).emulateTransitionEnd(150):s(),r&&t(r).removeClass(u.IN)},e.prototype._transitionComplete=function(e,n,i,r){if(n){t(n).removeClass(u.ACTIVE);var a=t(n).find(c.DROPDOWN_ACTIVE_CHILD)[0];a&&t(a).removeClass(u.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0),i?(o.reflow(e),t(e).addClass(u.IN)):t(e).removeClass(u.FADE),e.parentNode&&t(e.parentNode).hasClass(u.DROPDOWN_MENU)){var s=t(e).closest(c.DROPDOWN)[0];s&&t(s).find(c.DROPDOWN_TOGGLE).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0)}r&&r()},e._jQueryInterface=function(n){return this.each(function(){var r=t(this),o=r.data(i);if(o||(o=o=new e(this),r.data(i,o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(l.CLICK_DATA_API,c.DATA_TOGGLE,function(e){e.preventDefault(),f._jQueryInterface.call(t(this),"show")}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){if(void 0===window.Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var e="tooltip",a="bs.tooltip",s="."+a,l=t.fn[e],u={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[]},c={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array"},f={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},d={IN:"in",OUT:"out"},p={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},h={FADE:"fade",IN:"in"},m={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},g={element:!1,enabled:!1},v={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},y=function(){function l(t,e){n(this,l),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return l.prototype.enable=function(){this._isEnabled=!0},l.prototype.disable=function(){this._isEnabled=!1},l.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},l.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(h.IN))return void this._leave(null,this);this._enter(null,this)}},l.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},l.prototype.show=function(){var e=this,n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var r=this.getTipElement(),a=o.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&t(r).addClass(h.FADE);var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,u=this._getAttachment(s);t(r).data(this.constructor.DATA_KEY,this).appendTo(document.body),t(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:u,element:r,target:this.element,classes:g,classPrefix:"bs-tether",offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),o.reflow(r),this._tether.position(),t(r).addClass(h.IN);var c=function(){var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d.OUT&&e._leave(null,e)};if(o.supportsTransitionEnd()&&t(this.tip).hasClass(h.FADE))return void t(this.tip).one(o.TRANSITION_END,c).emulateTransitionEnd(l._TRANSITION_DURATION);c()}},l.prototype.hide=function(e){var n=this,i=this.getTipElement(),r=t.Event(this.constructor.Event.HIDE),a=function(){n._hoverState!==d.IN&&i.parentNode&&i.parentNode.removeChild(i),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),n.cleanupTether(),e&&e()};t(this.element).trigger(r),r.isDefaultPrevented()||(t(i).removeClass(h.IN),o.supportsTransitionEnd()&&t(this.tip).hasClass(h.FADE)?t(i).one(o.TRANSITION_END,a).emulateTransitionEnd(150):a(),this._hoverState="")},l.prototype.isWithContent=function(){return Boolean(this.getTitle())},l.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},l.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m.TOOLTIP_INNER),this.getTitle()),e.removeClass(h.FADE).removeClass(h.IN),this.cleanupTether()},l.prototype.setElementContent=function(e,n){var r=this.config.html;"object"===(void 0===n?"undefined":i(n))&&(n.nodeType||n.jquery)?r?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[r?"html":"text"](n)},l.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},l.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},l.prototype._getAttachment=function(t){return f[t.toUpperCase()]},l.prototype._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,t.proxy(e.toggle,e));else if(n!==v.MANUAL){var i=n===v.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=n===v.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,t.proxy(e._enter,e)).on(r,e.config.selector,t.proxy(e._leave,e))}}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},l.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},l.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;return n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?v.FOCUS:v.HOVER]=!0),t(n.getTipElement()).hasClass(h.IN)||n._hoverState===d.IN?void(n._hoverState=d.IN):(clearTimeout(n._timeout),n._hoverState=d.IN,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===d.IN&&n.show()},n.config.delay.show)):void n.show())},l.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;if(n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?v.FOCUS:v.HOVER]=!1),!n._isWithActiveTrigger())return clearTimeout(n._timeout),n._hoverState=d.OUT,n.config.delay&&n.config.delay.hide?void(n._timeout=setTimeout(function(){n._hoverState===d.OUT&&n.hide()},n.config.delay.hide)):void n.hide()},l.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},l.prototype._getConfig=function(n){return n=t.extend({},this.constructor.Default,t(this.element).data(),n),n.delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),o.typeCheckConfig(e,n,this.constructor.DefaultType),n},l.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r="object"===(void 0===e?"undefined":i(e))?e:null;if((n||!/dispose|hide/.test(e))&&(n||(n=new l(this,r),t(this).data(a,n)),"string"==typeof e)){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return a}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return c}}]),l}();return t.fn[e]=y._jQueryInterface,t.fn[e].Constructor=y,t.fn[e].noConflict=function(){return t.fn[e]=l,y._jQueryInterface},y}(jQuery));!function(o){var s="popover",l="bs.popover",u="."+l,c=o.fn[s],f=o.extend({},a.Default,{placement:"right",trigger:"click",content:"",template:''}),d=o.extend({},a.DefaultType,{content:"(string|element|function)"}),p={FADE:"fade",IN:"in"},h={TITLE:".popover-title",CONTENT:".popover-content"},m={HIDE:"hide"+u,HIDDEN:"hidden"+u,SHOW:"show"+u,SHOWN:"shown"+u,INSERTED:"inserted"+u,CLICK:"click"+u,FOCUSIN:"focusin"+u,FOCUSOUT:"focusout"+u,MOUSEENTER:"mouseenter"+u,MOUSELEAVE:"mouseleave"+u},g=function(a){function c(){return n(this,c),t(this,a.apply(this,arguments))}return e(c,a),c.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},c.prototype.getTipElement=function(){return this.tip=this.tip||o(this.config.template)[0]},c.prototype.setContent=function(){var t=o(this.getTipElement());this.setElementContent(t.find(h.TITLE),this.getTitle()),this.setElementContent(t.find(h.CONTENT),this._getContent()),t.removeClass(p.FADE).removeClass(p.IN),this.cleanupTether()},c.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},c._jQueryInterface=function(t){return this.each(function(){var e=o(this).data(l),n="object"===(void 0===t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new c(this,n),o(this).data(l,e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},r(c,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return f}},{key:"NAME",get:function(){return s}},{key:"DATA_KEY",get:function(){return l}},{key:"Event",get:function(){return m}},{key:"EVENT_KEY",get:function(){return u}},{key:"DefaultType",get:function(){return d}}]),c}(a);o.fn[s]=g._jQueryInterface,o.fn[s].Constructor=g,o.fn[s].noConflict=function(){return o.fn[s]=c,g._jQueryInterface}}(jQuery)}()},function(t,e,n){"use strict";function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function o(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,n,i,o,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l0&&this._events[t].length>n&&(this._events[t].warned=!0,console.trace),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},i.prototype.removeListener=function(t,e){var n,i,o,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";var i,i;!function(e){t.exports=e()}(function(){return function t(e,n,r){function o(s,l){if(!n[s]){if(!e[s]){var u="function"==typeof i&&i;if(!l&&u)return i(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[s]={exports:{}};e[s][0].call(f.exports,function(t){var n=e[s][1][t];return o(n||t)},f,f.exports,t,e,n,r)}return n[s].exports}for(var a="function"==typeof i&&i,s=0;s1&&"flex-start"===t.style.alignContent)for(e=0;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"flex-end"===t.style.alignContent)for(e=t.flexStyle.crossSpace;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"center"===t.style.alignContent)for(e=t.flexStyle.crossSpace/2;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"space-between"===t.style.alignContent)for(n=t.flexStyle.crossSpace/(t.lines.length-1),e=0;i=t.lines[++r];)i.crossStart=e,e+=i.cross+n;else if(t.lines.length>1&&"space-around"===t.style.alignContent)for(n=2*t.flexStyle.crossSpace/(2*t.lines.length),e=n/2;i=t.lines[++r];)i.crossStart=e,e+=i.cross+n;else for(n=t.flexStyle.crossSpace/t.lines.length,e=t.flexStyle.crossInnerBefore;i=t.lines[++r];)i.crossStart=e,i.cross+=n,e+=i.cross}},{}],2:[function(t,e,n){e.exports=function(t){for(var e,n=-1;line=t.lines[++n];)for(e=-1;child=line.children[++e];){var i=child.style.alignSelf;"auto"===i&&(i=t.style.alignItems),"flex-start"===i?child.flexStyle.crossStart=line.crossStart:"flex-end"===i?child.flexStyle.crossStart=line.crossStart+line.cross-child.flexStyle.crossOuter:"center"===i?child.flexStyle.crossStart=line.crossStart+(line.cross-child.flexStyle.crossOuter)/2:(child.flexStyle.crossStart=line.crossStart,child.flexStyle.crossOuter=line.cross,child.flexStyle.cross=child.flexStyle.crossOuter-child.flexStyle.crossBefore-child.flexStyle.crossAfter)}}},{}],3:[function(t,e,n){e.exports=function(t,e){var n="row"===e||"row-reverse"===e,i=t.mainAxis;if(i){n&&"inline"===i||!n&&"block"===i||(t.flexStyle={main:t.flexStyle.cross,cross:t.flexStyle.main,mainOffset:t.flexStyle.crossOffset,crossOffset:t.flexStyle.mainOffset,mainBefore:t.flexStyle.crossBefore,mainAfter:t.flexStyle.crossAfter,crossBefore:t.flexStyle.mainBefore,crossAfter:t.flexStyle.mainAfter,mainInnerBefore:t.flexStyle.crossInnerBefore,mainInnerAfter:t.flexStyle.crossInnerAfter,crossInnerBefore:t.flexStyle.mainInnerBefore,crossInnerAfter:t.flexStyle.mainInnerAfter,mainBorderBefore:t.flexStyle.crossBorderBefore,mainBorderAfter:t.flexStyle.crossBorderAfter,crossBorderBefore:t.flexStyle.mainBorderBefore,crossBorderAfter:t.flexStyle.mainBorderAfter})}else t.flexStyle=n?{main:t.style.width,cross:t.style.height,mainOffset:t.style.offsetWidth,crossOffset:t.style.offsetHeight,mainBefore:t.style.marginLeft,mainAfter:t.style.marginRight,crossBefore:t.style.marginTop,crossAfter:t.style.marginBottom,mainInnerBefore:t.style.paddingLeft,mainInnerAfter:t.style.paddingRight,crossInnerBefore:t.style.paddingTop,crossInnerAfter:t.style.paddingBottom,mainBorderBefore:t.style.borderLeftWidth,mainBorderAfter:t.style.borderRightWidth,crossBorderBefore:t.style.borderTopWidth,crossBorderAfter:t.style.borderBottomWidth}:{main:t.style.height,cross:t.style.width,mainOffset:t.style.offsetHeight,crossOffset:t.style.offsetWidth,mainBefore:t.style.marginTop,mainAfter:t.style.marginBottom,crossBefore:t.style.marginLeft,crossAfter:t.style.marginRight,mainInnerBefore:t.style.paddingTop,mainInnerAfter:t.style.paddingBottom,crossInnerBefore:t.style.paddingLeft,crossInnerAfter:t.style.paddingRight,mainBorderBefore:t.style.borderTopWidth,mainBorderAfter:t.style.borderBottomWidth,crossBorderBefore:t.style.borderLeftWidth,crossBorderAfter:t.style.borderRightWidth},"content-box"===t.style.boxSizing&&("number"==typeof t.flexStyle.main&&(t.flexStyle.main+=t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter),"number"==typeof t.flexStyle.cross&&(t.flexStyle.cross+=t.flexStyle.crossInnerBefore+t.flexStyle.crossInnerAfter+t.flexStyle.crossBorderBefore+t.flexStyle.crossBorderAfter));t.mainAxis=n?"inline":"block",t.crossAxis=n?"block":"inline","number"==typeof t.style.flexBasis&&(t.flexStyle.main=t.style.flexBasis+t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter),t.flexStyle.mainOuter=t.flexStyle.main,t.flexStyle.crossOuter=t.flexStyle.cross,"auto"===t.flexStyle.mainOuter&&(t.flexStyle.mainOuter=t.flexStyle.mainOffset),"auto"===t.flexStyle.crossOuter&&(t.flexStyle.crossOuter=t.flexStyle.crossOffset),"number"==typeof t.flexStyle.mainBefore&&(t.flexStyle.mainOuter+=t.flexStyle.mainBefore),"number"==typeof t.flexStyle.mainAfter&&(t.flexStyle.mainOuter+=t.flexStyle.mainAfter),"number"==typeof t.flexStyle.crossBefore&&(t.flexStyle.crossOuter+=t.flexStyle.crossBefore),"number"==typeof t.flexStyle.crossAfter&&(t.flexStyle.crossOuter+=t.flexStyle.crossAfter)}},{}],4:[function(t,e,n){var i=t("../reduce");e.exports=function(t){if(t.mainSpace>0){var e=i(t.children,function(t,e){return t+parseFloat(e.style.flexGrow)},0);e>0&&(t.main=i(t.children,function(n,i){return"auto"===i.flexStyle.main?i.flexStyle.main=i.flexStyle.mainOffset+parseFloat(i.style.flexGrow)/e*t.mainSpace:i.flexStyle.main+=parseFloat(i.style.flexGrow)/e*t.mainSpace,i.flexStyle.mainOuter=i.flexStyle.main+i.flexStyle.mainBefore+i.flexStyle.mainAfter,n+i.flexStyle.mainOuter},0),t.mainSpace=0)}}},{"../reduce":12}],5:[function(t,e,n){var i=t("../reduce");e.exports=function(t){if(t.mainSpace<0){var e=i(t.children,function(t,e){return t+parseFloat(e.style.flexShrink)},0);e>0&&(t.main=i(t.children,function(n,i){return i.flexStyle.main+=parseFloat(i.style.flexShrink)/e*t.mainSpace,i.flexStyle.mainOuter=i.flexStyle.main+i.flexStyle.mainBefore+i.flexStyle.mainAfter,n+i.flexStyle.mainOuter},0),t.mainSpace=0)}}},{"../reduce":12}],6:[function(t,e,n){var i=t("../reduce");e.exports=function(t){var e;t.lines=[e={main:0,cross:0,children:[]}];for(var n,r=-1;n=t.children[++r];)"nowrap"===t.style.flexWrap||0===e.children.length||"auto"===t.flexStyle.main||t.flexStyle.main-t.flexStyle.mainInnerBefore-t.flexStyle.mainInnerAfter-t.flexStyle.mainBorderBefore-t.flexStyle.mainBorderAfter>=e.main+n.flexStyle.mainOuter?(e.main+=n.flexStyle.mainOuter,e.cross=Math.max(e.cross,n.flexStyle.crossOuter)):t.lines.push(e={main:n.flexStyle.mainOuter,cross:n.flexStyle.crossOuter,children:[]}),e.children.push(n);t.flexStyle.mainLines=i(t.lines,function(t,e){return Math.max(t,e.main)},0),t.flexStyle.crossLines=i(t.lines,function(t,e){return t+e.cross},0),"auto"===t.flexStyle.main&&(t.flexStyle.main=Math.max(t.flexStyle.mainOffset,t.flexStyle.mainLines+t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter)),"auto"===t.flexStyle.cross&&(t.flexStyle.cross=Math.max(t.flexStyle.crossOffset,t.flexStyle.crossLines+t.flexStyle.crossInnerBefore+t.flexStyle.crossInnerAfter+t.flexStyle.crossBorderBefore+t.flexStyle.crossBorderAfter)),t.flexStyle.crossSpace=t.flexStyle.cross-t.flexStyle.crossInnerBefore-t.flexStyle.crossInnerAfter-t.flexStyle.crossBorderBefore-t.flexStyle.crossBorderAfter-t.flexStyle.crossLines,t.flexStyle.mainOuter=t.flexStyle.main+t.flexStyle.mainBefore+t.flexStyle.mainAfter,t.flexStyle.crossOuter=t.flexStyle.cross+t.flexStyle.crossBefore+t.flexStyle.crossAfter}},{"../reduce":12}],7:[function(t,e,n){function i(e){for(var n,i=-1;n=e.children[++i];)t("./flex-direction")(n,e.style.flexDirection);t("./flex-direction")(e,e.style.flexDirection),t("./order")(e),t("./flexbox-lines")(e),t("./align-content")(e),i=-1;for(var r;r=e.lines[++i];)r.mainSpace=e.flexStyle.main-e.flexStyle.mainInnerBefore-e.flexStyle.mainInnerAfter-e.flexStyle.mainBorderBefore-e.flexStyle.mainBorderAfter-r.main,t("./flex-grow")(r),t("./flex-shrink")(r),t("./margin-main")(r),t("./margin-cross")(r),t("./justify-content")(r,e.style.justifyContent,e);t("./align-items")(e)}e.exports=i},{"./align-content":1,"./align-items":2,"./flex-direction":3,"./flex-grow":4,"./flex-shrink":5,"./flexbox-lines":6,"./justify-content":8,"./margin-cross":9,"./margin-main":10,"./order":11}],8:[function(t,e,n){e.exports=function(t,e,n){var i,r,o,a=n.flexStyle.mainInnerBefore,s=-1;if("flex-end"===e)for(i=t.mainSpace,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter;else if("center"===e)for(i=t.mainSpace/2,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter;else if("space-between"===e)for(r=t.mainSpace/(t.children.length-1),i=0,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter+r;else if("space-around"===e)for(r=2*t.mainSpace/(2*t.children.length),i=r/2,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter+r;else for(i=0,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter}},{}],9:[function(t,e,n){e.exports=function(t){for(var e,n=-1;e=t.children[++n];){var i=0;"auto"===e.flexStyle.crossBefore&&++i,"auto"===e.flexStyle.crossAfter&&++i;var r=t.cross-e.flexStyle.crossOuter;"auto"===e.flexStyle.crossBefore&&(e.flexStyle.crossBefore=r/i),"auto"===e.flexStyle.crossAfter&&(e.flexStyle.crossAfter=r/i),"auto"===e.flexStyle.cross?e.flexStyle.crossOuter=e.flexStyle.crossOffset+e.flexStyle.crossBefore+e.flexStyle.crossAfter:e.flexStyle.crossOuter=e.flexStyle.cross+e.flexStyle.crossBefore+e.flexStyle.crossAfter}}},{}],10:[function(t,e,n){e.exports=function(t){for(var e,n=0,i=-1;e=t.children[++i];)"auto"===e.flexStyle.mainBefore&&++n,"auto"===e.flexStyle.mainAfter&&++n;if(n>0){for(i=-1;e=t.children[++i];)"auto"===e.flexStyle.mainBefore&&(e.flexStyle.mainBefore=t.mainSpace/n),"auto"===e.flexStyle.mainAfter&&(e.flexStyle.mainAfter=t.mainSpace/n),"auto"===e.flexStyle.main?e.flexStyle.mainOuter=e.flexStyle.mainOffset+e.flexStyle.mainBefore+e.flexStyle.mainAfter:e.flexStyle.mainOuter=e.flexStyle.main+e.flexStyle.mainBefore+e.flexStyle.mainAfter;t.mainSpace=0}}},{}],11:[function(t,e,n){var i=/^(column|row)-reverse$/;e.exports=function(t){t.children.sort(function(t,e){return t.style.order-e.style.order||t.index-e.index}),i.test(t.style.flexDirection)&&t.children.reverse()}},{}],12:[function(t,e,n){function i(t,e,n){for(var i=t.length,r=-1;++r=0)&&i.push(r)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}function a(){C&&document.body.removeChild(C),C=null}function s(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var n=e.documentElement,i=r(t),o=I();return i.top-=o.top,i.left-=o.left,void 0===i.width&&(i.width=document.body.scrollWidth-i.left-i.right),void 0===i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-n.clientTop,i.left=i.left-n.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}function l(t){return t.offsetParent||document.documentElement}function u(){if(O)return O;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");c(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;n===i&&(i=e.clientWidth),document.body.removeChild(e);var r=n-i;return O={width:r,height:r}}function c(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}),t}function f(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var n=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=h(t).replace(n," ");m(t,i)}}function d(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{f(t,e);var n=h(t)+" "+e;m(t,n)}}function p(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=h(t);return new RegExp("(^| )"+e+"( |$)","gi").test(n)}function h(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function m(t,e){t.setAttribute("class",e)}function g(t,e,n){n.forEach(function(n){-1===e.indexOf(n)&&p(t,n)&&f(t,n)}),e.forEach(function(e){p(t,e)||d(t,e)})}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+n>=e&&e>=t-n}function b(){return"undefined"!=typeof performance&&void 0!==performance.now?performance.now():+new Date}function _(){for(var t={top:0,left:0},e=arguments.length,n=Array(e),i=0;i1?n-1:0),r=1;r16)return e=Math.min(e-16,250),void(n=setTimeout(i,250));void 0!==t&&b()-t<10||(null!=n&&(clearTimeout(n),n=null),t=b(),R(),e=b()-t)};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var M={center:"center",left:"right",right:"left"},H={middle:"middle",top:"bottom",bottom:"top"},W={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},U=function(t,e){var n=t.left,i=t.top;return"auto"===n&&(n=M[e.left]),"auto"===i&&(i=H[e.top]),{left:n,top:i}},q=function(t){var e=t.left,n=t.top;return void 0!==W[t.left]&&(e=W[t.left]),void 0!==W[t.top]&&(n=W[t.top]),{left:e,top:n}},z=function(t){var e=t.split(" "),n=L(e,2);return{top:n[0],left:n[1]}},$=z,Q=function(t){function e(t){var n=this;i(this,e),j(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),F.push(this),this.history=[],this.setOptions(t,!1),E.modules.forEach(function(t){void 0!==t.initialize&&t.initialize.call(n)}),this.position()}return v(e,t),S(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(i,t);var r=this.options,a=r.element,s=r.target,l=r.targetModifier;if(this.element=a,this.target=s,this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(void 0===e[t])throw new Error("Tether Error: Both element and target must be defined");void 0!==e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=$(this.options.targetAttachment),this.attachment=$(this.options.attachment),this.offset=z(this.options.offset),this.targetOffset=z(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=o(this.target),!1!==this.options.enabled&&this.enable(n)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=s(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topn.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,o=0;r&&(o=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-o,e={width:15,height:.975*a*(a/n.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},l=0;a<408&&this.target===document.body&&(l=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var u=this.target.scrollTop/(n.scrollHeight-a);return e.top=u*(a-e.height-l)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return void 0===this._cache&&(this._cache={}),void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;f(this.target,this.getClass("enabled")),f(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),F.forEach(function(e,n){e===t&&F.splice(n,1)}),0===F.length&&a()}},{key:"updateAttachClasses",value:function(t,e){var n=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var r=this._addAttachClasses;t.top&&r.push(this.getClass("element-attached")+"-"+t.top),t.left&&r.push(this.getClass("element-attached")+"-"+t.left),e.top&&r.push(this.getClass("target-attached")+"-"+e.top),e.left&&r.push(this.getClass("target-attached")+"-"+e.left);var o=[];i.forEach(function(t){o.push(n.getClass("element-attached")+"-"+t),o.push(n.getClass("target-attached")+"-"+t)}),D(function(){void 0!==n._addAttachClasses&&(g(n.element,n._addAttachClasses,o),!1!==n.options.addTargetClasses&&g(n.target,n._addAttachClasses,o),delete n._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var n=U(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var i=this.cache("element-bounds",function(){return s(t.element)}),r=i.width,o=i.height;if(0===r&&0===o&&void 0!==this.lastSize){var a=this.lastSize;r=a.width,o=a.height}else this.lastSize={width:r,height:o};var c=this.cache("target-bounds",function(){return t.getTargetBounds()}),f=c,d=x(q(this.attachment),{width:r,height:o}),p=x(q(n),f),h=x(this.offset,{width:r,height:o}),m=x(this.targetOffset,f);d=_(d,h),p=_(p,m);for(var g=c.left+p.left-d.left,v=c.top+p.top-d.top,y=0;yC.documentElement.clientHeight&&(A=this.cache("scrollbar-size",u),S.viewport.bottom-=A.height),T.innerWidth>C.documentElement.clientWidth&&(A=this.cache("scrollbar-size",u),S.viewport.right-=A.width),-1!==["","static"].indexOf(C.body.style.position)&&-1!==["","static"].indexOf(C.body.parentElement.style.position)||(S.page.bottom=C.body.scrollHeight-v-o,S.page.right=C.body.scrollWidth-g-r),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return l(t.target)}),n=t.cache("target-offsetparent-bounds",function(){return s(e)}),i=getComputedStyle(e),r=n,o={};if(["Top","Left","Bottom","Right"].forEach(function(t){o[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),n.right=C.body.scrollWidth-n.left-r.width+o.right,n.bottom=C.body.scrollHeight-n.top-r.height+o.bottom,S.page.top>=n.top+o.top&&S.page.bottom>=n.bottom&&S.page.left>=n.left+o.left&&S.page.right>=n.right){var a=e.scrollTop,u=e.scrollLeft;S.offset={top:S.page.top-n.top+a-o.top,left:S.page.left-n.left+u-o.left}}}(),this.move(S),this.history.unshift(S),this.history.length>3&&this.history.pop(),e&&N(),!0}}},{key:"move",value:function(t){var e=this;if(void 0!==this.element.parentNode){var n={};for(var i in t){n[i]={};for(var r in t[i]){for(var o=!1,a=0;a=0){var h=s.split(" "),g=L(h,2);f=g[0],c=g[1]}else c=f=s;var b=w(e,o);"target"!==f&&"both"!==f||(nb[3]&&"bottom"===v.top&&(n-=d,v.top="top")),"together"===f&&("top"===v.top&&("bottom"===y.top&&nb[3]&&n-(a-d)>=b[1]&&(n-=a-d,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&n+a>b[3]?(n-=d,v.top="top",n-=a,y.top="bottom"):"bottom"===y.top&&nb[3]&&"top"===y.top?(n-=a,y.top="bottom"):nb[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===c&&(ib[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=l,y.left="left"):"center"===v.left&&(i+l>b[2]&&"left"===y.left?(i-=l,y.left="right"):ib[3]&&"top"===y.top&&(n-=a,y.top="bottom")),"element"!==c&&"both"!==c||(ib[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof u?u=u.split(",").map(function(t){return t.trim()}):!0===u&&(u=["top","left","right","bottom"]),u=u||[];var _=[],x=[];n=0?(n=b[1],_.push("top")):x.push("top")),n+a>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-a,_.push("bottom")):x.push("bottom")),i=0?(i=b[0],_.push("left")):x.push("left")),i+l>b[2]&&(u.indexOf("right")>=0?(i=b[2]-l,_.push("right")):x.push("right")),_.length&&function(){var t=void 0;t=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),_.forEach(function(e){m.push(t+"-"+e)})}(),x.length&&function(){var t=void 0;t=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),x.forEach(function(e){m.push(t+"-"+e)})}(),(_.indexOf("left")>=0||_.indexOf("right")>=0)&&(y.left=v.left=!1),(_.indexOf("top")>=0||_.indexOf("bottom")>=0)&&(y.top=v.top=!1),v.top===r.top&&v.left===r.left&&y.top===e.attachment.top&&y.left===e.attachment.left||(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),D(function(){!1!==e.options.addTargetClasses&&g(e.target,m,h),g(e.element,m,h)}),{top:n,left:i}}});var B=E.Utils,s=B.getBounds,g=B.updateClasses,D=B.defer;E.modules.push({position:function(t){var e=this,n=t.top,i=t.left,r=this.cache("element-bounds",function(){return s(e.element)}),o=r.height,a=r.width,l=this.getTargetBounds(),u=n+o,c=i+a,f=[];n<=l.bottom&&u>=l.top&&["left","right"].forEach(function(t){var e=l[t];e!==i&&e!==c||f.push(t)}),i<=l.right&&c>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];e!==n&&e!==u||f.push(t)});var d=[],p=[],h=["left","top","right","bottom"];return d.push(this.getClass("abutted")),h.forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),f.length&&p.push(this.getClass("abutted")),f.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),D(function(){!1!==e.options.addTargetClasses&&g(e.target,p,d),g(e.element,p,d)}),!0}});var L=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return E.modules.push({position:function(t){var e=t.top,n=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:n}));var r=void 0,o=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var a=i,s=L(a,2);r=s[0],o=s[1],r=parseFloat(r,10),o=parseFloat(o,10)}else r=i.top,o=i.left;return e+=r,n+=o,{top:e,left:n}}}}),G})},function(t,e,n){"use strict";var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,n){(function(e){t.exports=e.Tether=n(23)}).call(e,n(24))},function(t,e,n){n(5),t.exports=n(6)}]);
\ No newline at end of file
+!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=26)}([function(t,e){t.exports=jQuery},function(t,e){t.exports=prestashop},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n5&&function(){var t=0;(0,a.default)(e).find(".color").each(function(e,n){e>4&&((0,a.default)(n).hide(),t++)}),(0,a.default)(e).find(".js-count").append("+"+t)}()})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";var i,r;!function(t){function e(t){var e=t.length,i=n.type(t);return"function"!==i&&!n.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t))}if(!t.jQuery){var n=function t(e,n){return new t.fn.init(e,n)};n.isWindow=function(t){return t&&t===t.window},n.type=function(t){return t?"object"==typeof t||"function"==typeof t?r[a.call(t)]||"object":typeof t:t+""},n.isArray=Array.isArray||function(t){return"array"===n.type(t)},n.isPlainObject=function(t){var e;if(!t||"object"!==n.type(t)||t.nodeType||n.isWindow(t))return!1;try{if(t.constructor&&!o.call(t,"constructor")&&!o.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}for(e in t);return void 0===e||o.call(t,e)},n.each=function(t,n,i){var r=0,o=t.length,a=e(t);if(i){if(a)for(;r0?r=a:n=a}while(Math.abs(o)>v&&++s=g?c(e,s):0===l?s:d(e,n,n+_)}function h(){E=!0,t===n&&i===r||f()}var m=4,g=.001,v=1e-7,y=10,b=11,_=1/(b-1),x="Float32Array"in e;if(4!==arguments.length)return!1;for(var w=0;w<4;++w)if("number"!=typeof arguments[w]||isNaN(arguments[w])||!isFinite(arguments[w]))return!1;t=Math.min(t,1),i=Math.min(i,1),t=Math.max(t,0),i=Math.max(i,0);var S=x?new Float32Array(b):new Array(b),E=!1,C=function(e){return E||h(),t===n&&i===r?e:0===e?0:1===e?1:l(p(e),n,r)};C.getControlPoints=function(){return[{x:t,y:n},{x:i,y:r}]};var T="generateBezier("+[t,n,i,r]+")";return C.toString=function(){return T},C}function f(t,e){var n=t;return _.isString(t)?E.Easings[t]||(n=!1):n=_.isArray(t)&&1===t.length?u.apply(null,t):_.isArray(t)&&2===t.length?C.apply(null,t.concat([e])):!(!_.isArray(t)||4!==t.length)&&c.apply(null,t),!1===n&&(n=E.Easings[E.defaults.easing]?E.defaults.easing:S),n}function d(t){if(t){var e=E.timestamp&&!0!==t?t:v.now(),n=E.State.calls.length;n>1e4&&(E.State.calls=r(E.State.calls),n=E.State.calls.length);for(var o=0;o4;t--){var e=n.createElement("div");if(e.innerHTML="\x3c!--[if IE "+t+"]>=0?e:Math.max(0,i+e),s=n<0?i+n:Math.min(n,i),l=s-a;if(l>0)if(o=new Array(l),this.charAt)for(r=0;r=0}:function(t,e){for(var n=0;n1e-4&&Math.abs(s.v)>1e-4))break;return o?function(t){return u[t*(u.length-1)|0]}:c}}();E.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},h.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){E.Easings[e[0]]=c.apply(null,e[1])});var T=E.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t=1?"":"alpha(opacity="+parseInt(100*parseFloat(n),10)+")"}else switch(t){case"name":return"opacity";case"extract":case"inject":return n}}},register:function(){function t(t,e,n){if("border-box"===T.getPropertyValue(e,"boxSizing").toString().toLowerCase()===(n||!1)){var i,r,o=0,a="width"===t?["Left","Right"]:["Top","Bottom"],s=["padding"+a[0],"padding"+a[1],"border"+a[0]+"Width","border"+a[1]+"Width"];for(i=0;i9)||E.State.isGingerbread||(T.Lists.transformsBase=T.Lists.transformsBase.concat(T.Lists.transforms3D));for(var n=0;n8)&&3===o.split(" ").length&&(o+=" 1"),o;case"inject":return/^rgb/.test(r)?r:(m<=8?4===r.split(" ").length&&(r=r.split(/\s+/).slice(0,3).join(" ")):3===r.split(" ").length&&(r+=" 1"),(m<=8?"rgb":"rgba")+"("+r.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}}();T.Normalizations.registered.innerWidth=e("width",!0),T.Normalizations.registered.innerHeight=e("height",!0),T.Normalizations.registered.outerWidth=e("width"),T.Normalizations.registered.outerHeight=e("height")}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(m||E.State.isAndroid&&!E.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(E.State.prefixMatches[t])return[E.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],n=0,i=e.length;n=4&&"("===P?k++:(k&&k<5||k>=4&&")"===P&&--k<5)&&(k=0),0===D&&"r"===P||1===D&&"g"===P||2===D&&"b"===P||3===D&&"a"===P||D>=3&&"("===P?(3===D&&"a"===P&&(N=1),D++):N&&","===P?++N>3&&(D=N=0):(N&&D<(N?5:4)||D>=(N?4:3)&&")"===P&&--D<(N?5:4))&&(D=N=0)}}C===v.length&&A===m.length||(E.debug,a=i),a&&(I.length?(E.debug,v=I,m=O,b=x=""):a=i)}a||(y=S(r,v),v=y[0],x=y[1],y=S(r,m),m=y[0].replace(/^([+-\/*])=/,function(t,e){return w=e,""}),b=y[1],v=parseFloat(v)||0,m=parseFloat(m)||0,"%"===b&&(/^(fontSize|lineHeight)$/.test(r)?(m/=100,b="em"):/^scale/.test(r)?(m/=100,b=""):/(Red|Green|Blue)$/i.test(r)&&(m=m/100*255,b="")));if(/[\/*]/.test(w))b=x;else if(x!==b&&0!==v)if(0===m)b=x;else{s=s||function(){var i={myParent:t.parentNode||n.body,position:T.getPropertyValue(t,"position"),fontSize:T.getPropertyValue(t,"fontSize")},r=i.position===F.lastPosition&&i.myParent===F.lastParent,o=i.fontSize===F.lastFontSize;F.lastParent=i.myParent,F.lastPosition=i.position,F.lastFontSize=i.fontSize;var a={};if(o&&r)a.emToPx=F.lastEmToPx,a.percentToPxWidth=F.lastPercentToPxWidth,a.percentToPxHeight=F.lastPercentToPxHeight;else{var s=c&&c.isSVG?n.createElementNS("http://www.w3.org/2000/svg","rect"):n.createElement("div");E.init(s),i.myParent.appendChild(s),h.each(["overflow","overflowX","overflowY"],function(t,e){E.CSS.setPropertyValue(s,e,"hidden")}),E.CSS.setPropertyValue(s,"position",i.position),E.CSS.setPropertyValue(s,"fontSize",i.fontSize),E.CSS.setPropertyValue(s,"boxSizing","content-box"),h.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){E.CSS.setPropertyValue(s,e,"100%")}),E.CSS.setPropertyValue(s,"paddingLeft","100em"),a.percentToPxWidth=F.lastPercentToPxWidth=(parseFloat(T.getPropertyValue(s,"width",null,!0))||1)/100,a.percentToPxHeight=F.lastPercentToPxHeight=(parseFloat(T.getPropertyValue(s,"height",null,!0))||1)/100,a.emToPx=F.lastEmToPx=(parseFloat(T.getPropertyValue(s,"paddingLeft"))||1)/100,i.myParent.removeChild(s)}return null===F.remToPx&&(F.remToPx=parseFloat(T.getPropertyValue(n.body,"fontSize"))||16),null===F.vwToPx&&(F.vwToPx=parseFloat(e.innerWidth)/100,F.vhToPx=parseFloat(e.innerHeight)/100),a.remToPx=F.remToPx,a.vwToPx=F.vwToPx,a.vhToPx=F.vhToPx,E.debug,a}();var q=/margin|padding|left|right|width|text|word|letter/i.test(r)||/X$/.test(r)||"x"===r?"x":"y";switch(x){case"%":v*="x"===q?s.percentToPxWidth:s.percentToPxHeight;break;case"px":break;default:v*=s[x+"ToPx"]}switch(b){case"%":v*=1/("x"===q?s.percentToPxWidth:s.percentToPxHeight);break;case"px":break;default:v*=1/s[b+"ToPx"]}}switch(w){case"+":m=v+m;break;case"-":m=v-m;break;case"*":m*=v;break;case"/":m=v/m}u[r]={rootPropertyValue:d,startValue:v,currentValue:v,endValue:m,unitType:b,easing:g},a&&(u[r].pattern=a),E.debug};for(var L in x)if(x.hasOwnProperty(L)){var j=T.Names.camelCase(L),B=function(e,n){var i,o,a;return _.isFunction(e)&&(e=e.call(t,r,I)),_.isArray(e)?(i=e[0],!_.isArray(e[1])&&/^[\d-]/.test(e[1])||_.isFunction(e[1])||T.RegEx.isHex.test(e[1])?a=e[1]:_.isString(e[1])&&!T.RegEx.isHex.test(e[1])&&E.Easings[e[1]]||_.isArray(e[1])?(o=n?e[1]:f(e[1],l.duration),a=e[2]):a=e[1]||e[2]):i=e,n||(o=o||l.easing),_.isFunction(i)&&(i=i.call(t,r,I)),_.isFunction(a)&&(a=a.call(t,r,I)),[i||0,o,a]}(x[L]);if(b(T.Lists.colors,j)){var V=B[0],M=B[1],H=B[2];if(T.RegEx.isHex.test(V)){for(var W=["Red","Green","Blue"],U=T.Values.hexToRgb(V),q=H?T.Values.hexToRgb(H):i,z=0;z0?"up":"down"}function d(t){var e=(0,a.default)(t.currentTarget),n=e.data("update-url"),i=e.attr("value"),r=e.val();if(r!=parseInt(r)||r<0||isNaN(r))return void e.val(i);var o=r-i;0!==o&&(e.attr("value",r),s(n,c(o),e))}var h=".js-cart-line-product-quantity",m=[];l.default.on("updateCart",function(){(0,a.default)(".quickview").modal("hide")}),l.default.on("updatedCart",function(){r()}),r();var g=(0,a.default)("body"),v=function(){for(var t;m.length>0;)t=m.pop(),t.abort()},y=function(t){return(0,a.default)(t.parents(".bootstrap-touchspin").find("input"))},b=function(t){t.preventDefault();var e=(0,a.default)(t.currentTarget),n=t.currentTarget.dataset,i=o(e,t.namespace),r={ajax:"1",action:"update"};void 0!==i&&(v(),a.default.ajax({url:i.url,method:"POST",data:r,dataType:"json",beforeSend:function(t){m.push(t)}}).then(function(t){p.checkUpdateOpertation(t),y(e).val(t.quantity),l.default.emit("updateCart",{reason:n})}).fail(function(t){l.default.emit("handleError",{eventType:"updateProductInCart",resp:t,cartAction:i.type})}))};g.on("click",'[data-link-action="delete-from-cart"], [data-link-action="remove-voucher"]',b),g.on("touchspin.on.startdownspin",u,b),g.on("touchspin.on.startupspin",u,b),g.on("focusout keyup",h,function(t){if("keyup"===t.type)return 13===t.keyCode&&d(t),!1;d(t)}),g.on("click",".js-discount .code",function(t){t.stopPropagation();var e=(0,a.default)(t.currentTarget);return(0,a.default)("[name=discount_name]").val(e.text()),!1})});var p={switchErrorStat:function(){var t=(0,a.default)(".checkout a");if(((0,a.default)("#notifications article.alert-danger").length||""!==d&&!c)&&t.addClass("disabled"),""!==d){var e=' ";(0,a.default)("#notifications .container").html(e),d="",f=!1,c&&t.removeClass("disabled")}else!c&&f&&(c=!1,f=!1,(0,a.default)("#notifications .container").html(""),t.removeClass("disabled"))},checkUpdateOpertation:function(t){c=t.hasOwnProperty("hasError");var e=t.errors||"";d=e instanceof Array?e.join(" "):e,f=!0}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(){0!==(0,a.default)(".js-cancel-address").length&&(0,a.default)(".checkout-step:not(.js-current-step) .step-title").addClass("not-allowed"),(0,a.default)(".js-terms a").on("click",function(t){t.preventDefault();var e=(0,a.default)(t.target).attr("href");e&&(e+="?content_only=1",a.default.get(e,function(t){(0,a.default)("#modal").find(".js-modal-content").html((0,a.default)(t).find(".page-cms").contents())}).fail(function(t){l.default.emit("handleError",{eventType:"clickTerms",resp:t})})),(0,a.default)("#modal").modal("show")}),(0,a.default)(".js-gift-checkbox").on("click",function(t){(0,a.default)("#gift").collapse("toggle")})}var o=n(0),a=i(o),s=n(1),l=i(s);(0,a.default)(document).ready(function(){1===(0,a.default)("body#checkout").length&&r(),l.default.on("updatedDeliveryForm",function(t){void 0!==t.deliveryOption&&0!==t.deliveryOption.length&&((0,a.default)(".carrier-extra-content").hide(),t.deliveryOption.next(".carrier-extra-content").slideDown())})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),a=n(0),s=i(a);o.default.blockcart=o.default.blockcart||{},o.default.blockcart.showModal=function(t){function e(){return(0,s.default)("#blockcart-modal")}var n=e();n.length&&n.remove(),(0,s.default)("body").append(t),n=e(),n.modal("show").on("hidden.bs.modal",function(t){o.default.emit("updateProduct",{reason:t.currentTarget.dataset,event:t})})}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n(0,a.default)(".js-modal-mask").height()&&(t.move("down"),(0,a.default)(".js-modal-arrow-up").css("opacity","1"))})}},{key:"move",value:function(t){var e=(0,a.default)(".js-modal-product-images"),n=(0,a.default)(".js-modal-product-images li img").height()+10,i=e.position().top;e.velocity({translateY:"up"===t?i+n:i-n},function(){e.position().top>=0?(0,a.default)(".js-modal-arrow-up").css("opacity",".2"):e.position().top+e.height()<=(0,a.default)(".js-modal-mask").height()&&(0,a.default)(".js-modal-arrow-down").css("opacity",".2")})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&this.options.badge&&this.$elementFilestyle.find("label").append(' '+e.length+""),this.$elementFilestyle.find(".group-span-filestyle").removeClass("input-group-btn")}}},size:function(t){if(void 0===t)return this.options.size;var e=this.$elementFilestyle.find("label"),n=this.$elementFilestyle.find("input");e.removeClass("btn-lg btn-sm"),n.removeClass("input-lg input-sm"),"nr"!=t&&(e.addClass("btn-"+t),n.addClass("input-"+t))},placeholder:function(t){if(void 0===t)return this.options.placeholder;this.options.placeholder=t,this.$elementFilestyle.find("input").attr("placeholder",t)},buttonText:function(t){if(void 0===t)return this.options.buttonText;this.options.buttonText=t,this.$elementFilestyle.find("label .buttonText").html(this.options.buttonText)},buttonName:function(t){if(void 0===t)return this.options.buttonName;this.options.buttonName=t,this.$elementFilestyle.find("label").attr({class:"btn "+this.options.buttonName})},iconName:function(t){if(void 0===t)return this.options.iconName;this.$elementFilestyle.find(".icon-span-filestyle").attr({class:"icon-span-filestyle "+this.options.iconName})},htmlIcon:function(){return this.options.icon?' ':""},htmlInput:function(){return this.options.input?' ':""},pushNameFiles:function(){var t="",e=[];void 0===this.$element[0].files?e[0]={name:this.$element[0]&&this.$element[0].value}:e=this.$element[0].files;for(var n=0;n",i=n.options.buttonBefore?o+n.htmlInput():n.htmlInput()+o,n.$elementFilestyle=t(''+i+"
"),n.$elementFilestyle.find(".group-span-filestyle").attr("tabindex","0").keypress(function(t){if(13===t.keyCode||32===t.charCode)return n.$elementFilestyle.find("label").click(),!1}),n.$element.css({position:"absolute",clip:"rect(0px 0px 0px 0px)"}).attr("tabindex","-1").after(n.$elementFilestyle),n.options.disabled&&n.$element.attr("disabled","true"),n.$element.change(function(){var t=n.pushNameFiles();0==n.options.input&&n.options.badge?0==n.$elementFilestyle.find(".badge").length?n.$elementFilestyle.find("label").append(' '+t.length+""):0==t.length?n.$elementFilestyle.find(".badge").remove():n.$elementFilestyle.find(".badge").html(t.length):n.$elementFilestyle.find(".badge").remove()}),window.navigator.userAgent.search(/firefox/i)>-1&&n.$elementFilestyle.find("label").click(function(){return n.$element.click(),!1})}};var i=t.fn.filestyle;t.fn.filestyle=function(e,i){var r="",o=this.each(function(){if("file"===t(this).attr("type")){var o=t(this),a=o.data("filestyle"),s=t.extend({},t.fn.filestyle.defaults,e,"object"==typeof e&&e);a||(o.data("filestyle",a=new n(this,s)),a.constructor()),"string"==typeof e&&(r=a[e](i))}});return void 0!==typeof r?r:o},t.fn.filestyle.defaults={buttonText:"Choose file",iconName:"glyphicon glyphicon-folder-open",buttonName:"btn-default",size:"nr",input:!0,badge:!0,icon:!0,buttonBefore:!1,disabled:!1,placeholder:""},t.fn.filestyle.noConflict=function(){return t.fn.filestyle=i,this},t(function(){t(".filestyle").each(function(){var e=t(this),n={input:"false"!==e.attr("data-input"),icon:"false"!==e.attr("data-icon"),buttonBefore:"true"===e.attr("data-buttonBefore"),disabled:"true"===e.attr("data-disabled"),size:e.attr("data-size"),buttonText:e.attr("data-buttonText"),buttonName:e.attr("data-buttonName"),iconName:e.attr("data-iconName"),badge:"false"!==e.attr("data-badge"),placeholder:e.attr("data-placeholder")};e.filestyle(n)})})}(window.jQuery)},function(t,e,n){"use strict";!function(t){t.fn.scrollbox=function(e){var n={linear:!1,startDelay:2,delay:3,step:5,speed:32,switchItems:1,direction:"vertical",distance:"auto",autoPlay:!0,onMouseOverPause:!0,paused:!1,queue:null,listElement:"ul",listItemElement:"li",infiniteLoop:!0,switchAmount:0,afterForward:null,afterBackward:null,triggerStackable:!1};return e=t.extend(n,e),e.scrollOffset="vertical"===e.direction?"scrollTop":"scrollLeft",e.queue&&(e.queue=t("#"+e.queue)),this.each(function(){var n,i,r,o,a,s,l,u,c,f=t(this),d=null,p=null,h=!1,m=0,g=0;e.onMouseOverPause&&(f.bind("mouseover",function(){h=!0}),f.bind("mouseout",function(){h=!1})),n=f.children(e.listElement+":first-child"),!1===e.infiniteLoop&&0===e.switchAmount&&(e.switchAmount=n.children().length),s=function(){if(!h){var r,a,s,l,u;if(r=n.children(e.listItemElement+":first-child"),l="auto"!==e.distance?e.distance:"vertical"===e.direction?r.outerHeight(!0):r.outerWidth(!0),e.linear?s=Math.min(f[0][e.scrollOffset]+e.step,l):(u=Math.max(3,parseInt(.3*(l-f[0][e.scrollOffset]),10)),s=Math.min(f[0][e.scrollOffset]+u,l)),f[0][e.scrollOffset]=s,s>=l){for(a=0;a0?(n.append(e.queue.find(e.listItemElement)[0]),n.children(e.listItemElement+":first-child").remove()):n.append(n.children(e.listItemElement+":first-child")),++m;if(f[0][e.scrollOffset]=0,clearInterval(d),d=null,t.isFunction(e.afterForward)&&e.afterForward.call(f,{switchCount:m,currentFirstChild:n.children(e.listItemElement+":first-child")}),e.triggerStackable&&0!==g)return void i();if(!1===e.infiniteLoop&&m>=e.switchAmount)return;e.autoPlay&&(p=setTimeout(o,1e3*e.delay))}}},l=function(){if(!h){var r,a,s,l,u;if(0===f[0][e.scrollOffset]){for(a=0;a0?(g--,p=setTimeout(o,0)):(g++,p=setTimeout(r,0)))},o=function(){clearInterval(d),d=setInterval(s,e.speed)},r=function(){clearInterval(d),d=setInterval(l,e.speed)},u=function(){e.autoPlay=!0,h=!1,clearInterval(d),d=setInterval(s,e.speed)},c=function(){h=!0},a=function(t){e.delay=t||e.delay,clearTimeout(p),e.autoPlay&&(p=setTimeout(o,1e3*e.delay))},e.autoPlay&&(p=setTimeout(o,1e3*e.startDelay)),f.bind("resetClock",function(t){a(t)}),f.bind("forward",function(){e.triggerStackable?null!==d?g++:o():(clearTimeout(p),o())}),f.bind("backward",function(){e.triggerStackable?null!==d?g--:r():(clearTimeout(p),r())}),f.bind("pauseHover",function(){c()}),f.bind("forwardHover",function(){u()}),f.bind("speedUp",function(t,n){"undefined"===n&&(n=Math.max(1,parseInt(e.speed/2,10))),e.speed=n}),f.bind("speedDown",function(t,n){"undefined"===n&&(n=2*e.speed),e.speed=n}),f.bind("updateConfig",function(n,i){e=t.extend(e,i)})})}}(jQuery)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t){(0,a.default)("#search_filters").replaceWith(t.rendered_facets),(0,a.default)("#js-active-search-filters").replaceWith(t.rendered_active_filters),(0,a.default)("#js-product-list-top").replaceWith(t.rendered_products_top),(0,a.default)("#js-product-list").replaceWith(t.rendered_products),(0,a.default)("#js-product-list-bottom").replaceWith(t.rendered_products_bottom),(new c.default).init()}var o=n(0),a=i(o),s=n(1),l=i(s);n(4);var u=n(3),c=i(u);(0,a.default)(document).ready(function(){l.default.on("clickQuickView",function(e){var n={action:"quickview",id_product:e.dataset.idProduct,id_product_attribute:e.dataset.idProductAttribute};a.default.post(l.default.urls.pages.product,n,null,"json").then(function(e){(0,a.default)("body").append(e.quickview_html);var n=(0,a.default)("#quickview-modal-"+e.product.id+"-"+e.product.id_product_attribute);n.modal("show"),t(n),n.on("hidden.bs.modal",function(){n.remove()})}).fail(function(t){l.default.emit("handleError",{eventType:"clickQuickView",resp:t})})});var t=function(t){var n=(0,a.default)(".js-arrows"),i=t.find(".js-qv-product-images");(0,a.default)(".js-thumb").on("click",function(t){(0,a.default)(".js-thumb").hasClass("selected")&&(0,a.default)(".js-thumb").removeClass("selected"),(0,a.default)(t.currentTarget).addClass("selected"),(0,a.default)(".js-qv-product-cover").attr("src",(0,a.default)(t.target).data("image-large-src"))}),i.find("li").length<=4?n.hide():n.on("click",function(t){(0,a.default)(t.target).hasClass("arrow-up")&&(0,a.default)(".js-qv-product-images").position().top<0?(e("up"),(0,a.default)(".arrow-down").css("opacity","1")):(0,a.default)(t.target).hasClass("arrow-down")&&i.position().top+i.height()>(0,a.default)(".js-qv-mask").height()&&(e("down"),(0,a.default)(".arrow-up").css("opacity","1"))}),t.find("#quantity_wanted").TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:1,max:1e6})},e=function(t){var e=(0,a.default)(".js-qv-product-images"),n=(0,a.default)(".js-qv-product-images li img").height()+20,i=e.position().top;e.velocity({translateY:"up"===t?i+n:i-n},function(){e.position().top>=0?(0,a.default)(".arrow-up").css("opacity",".2"):e.position().top+e.height()<=(0,a.default)(".js-qv-mask").height()&&(0,a.default)(".arrow-down").css("opacity",".2")})};(0,a.default)("body").on("click","#search_filter_toggler",function(){(0,a.default)("#search_filters_wrapper").removeClass("hidden-sm-down"),(0,a.default)("#content-wrapper").addClass("hidden-sm-down"),(0,a.default)("#footer").addClass("hidden-sm-down")}),(0,a.default)("#search_filter_controls .clear").on("click",function(){(0,a.default)("#search_filters_wrapper").addClass("hidden-sm-down"),(0,a.default)("#content-wrapper").removeClass("hidden-sm-down"),(0,a.default)("#footer").removeClass("hidden-sm-down")}),(0,a.default)("#search_filter_controls .ok").on("click",function(){(0,a.default)("#search_filters_wrapper").addClass("hidden-sm-down"),(0,a.default)("#content-wrapper").removeClass("hidden-sm-down"),(0,a.default)("#footer").removeClass("hidden-sm-down")});var n=function(t){if(void 0!==t.target.dataset.searchUrl)return t.target.dataset.searchUrl;if(void 0===(0,a.default)(t.target).parent()[0].dataset.searchUrl)throw new Error("Can not parse search URL");return(0,a.default)(t.target).parent()[0].dataset.searchUrl};(0,a.default)("body").on("change","#search_filters input[data-search-url]",function(t){l.default.emit("updateFacets",n(t))}),(0,a.default)("body").on("click",".js-search-filters-clear-all",function(t){l.default.emit("updateFacets",n(t))}),(0,a.default)("body").on("click",".js-search-link",function(t){t.preventDefault(),l.default.emit("updateFacets",(0,a.default)(t.target).closest("a").get(0).href)}),(0,a.default)("body").on("change","#search_filters select",function(t){var e=(0,a.default)(t.target).closest("form");l.default.emit("updateFacets","?"+e.serialize())}),l.default.on("updateProductList",function(t){r(t)})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(0),o=i(r),a=n(1),s=i(a);(0,o.default)(document).ready(function(){function t(){(0,o.default)(".js-thumb").on("click",function(t){(0,o.default)(".js-modal-product-cover").attr("src",(0,o.default)(t.target).data("image-large-src")),(0,o.default)(".selected").removeClass("selected"),(0,o.default)(t.target).addClass("selected"),(0,o.default)(".js-qv-product-cover").prop("src",(0,o.default)(t.currentTarget).data("image-large-src"))})}function e(){(0,o.default)("#main .js-qv-product-images li").length>2?((0,o.default)("#main .js-qv-mask").addClass("scroll"),(0,o.default)(".scroll-box-arrows").addClass("scroll"),(0,o.default)("#main .js-qv-mask").scrollbox({direction:"h",distance:113,autoPlay:!1}),(0,o.default)(".scroll-box-arrows .left").click(function(){(0,o.default)("#main .js-qv-mask").trigger("backward")}),(0,o.default)(".scroll-box-arrows .right").click(function(){(0,o.default)("#main .js-qv-mask").trigger("forward")})):((0,o.default)("#main .js-qv-mask").removeClass("scroll"),(0,o.default)(".scroll-box-arrows").removeClass("scroll"))}function n(){(0,o.default)(".js-file-input").on("change",function(t){var e=void 0,n=void 0;(e=(0,o.default)(t.currentTarget)[0])&&(n=e.files[0])&&(0,o.default)(e).prev().text(n.name)})}!function(){var t=(0,o.default)("#quantity_wanted");t.TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:parseInt(t.attr("min"),10),max:1e6}),(0,o.default)("body").on("change keyup","#quantity_wanted",function(t){(0,o.default)(t.currentTarget).trigger("touchspin.stopspin"),s.default.emit("updateProduct",{eventType:"updatedProductQuantity",event:t})})}(),n(),t(),e(),s.default.on("updatedProduct",function(i){if(n(),t(),i&&i.product_minimal_quantity){var r=parseInt(i.product_minimal_quantity,10);(0,o.default)("#quantity_wanted").trigger("touchspin.updatesettings",{min:r})}e(),(0,o.default)((0,o.default)(".tabs .nav-link.active").attr("href")).addClass("active").removeClass("fade"),(0,o.default)(".js-product-images-modal").replaceWith(i.product_images_modal)})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=e.children().detach();e.empty().append(t.children().detach()),t.append(n)}function o(){u.default.responsive.mobile?(0,s.default)("*[id^='_desktop_']").each(function(t,e){var n=(0,s.default)("#"+e.id.replace("_desktop_","_mobile_"));n.length&&r((0,s.default)(e),n)}):(0,s.default)("*[id^='_mobile_']").each(function(t,e){var n=(0,s.default)("#"+e.id.replace("_mobile_","_desktop_"));n.length&&r((0,s.default)(e),n)}),u.default.emit("responsive update",{mobile:u.default.responsive.mobile})}var a=n(0),s=i(a),l=n(1),u=i(l);u.default.responsive=u.default.responsive||{},u.default.responsive.current_width=window.innerWidth,u.default.responsive.min_width=768,u.default.responsive.mobile=u.default.responsive.current_width=e&&n=e;u.default.responsive.current_width=n,u.default.responsive.mobile=u.default.responsive.current_width'+T.prefix+"",s=''+T.postfix+"";r.hasClass("input-group-btn")?(n='",r.append(n)):(n='",t(n).insertBefore(L)),o.hasClass("input-group-btn")?(i='",o.prepend(i)):(i='",t(i).insertAfter(L)),t(a).insertBefore(L),t(s).insertAfter(L),A=e}function p(){var e;e=T.verticalbuttons?''+T.prefix+''+T.postfix+'
':''+T.prefix+''+T.postfix+'
",A=t(e).insertBefore(L),t(".bootstrap-touchspin-prefix",A).after(L),L.hasClass("input-sm")?A.addClass("input-group-sm"):L.hasClass("input-lg")&&A.addClass("input-group-lg")}function h(){I={down:t(".bootstrap-touchspin-down",A),up:t(".bootstrap-touchspin-up",A),input:t("input",A),prefix:t(".bootstrap-touchspin-prefix",A).addClass(T.prefix_extraclass),postfix:t(".bootstrap-touchspin-postfix",A).addClass(T.postfix_extraclass)}}function m(){""===T.prefix&&I.prefix.hide(),""===T.postfix&&I.postfix.hide()}function g(){L.on("keydown",function(t){var e=t.keyCode||t.which;38===e?("up"!==V&&(x(),E()),t.preventDefault()):40===e&&("down"!==V&&(w(),S()),t.preventDefault())}),L.on("keyup",function(t){var e=t.keyCode||t.which;38===e?C():40===e&&C()}),L.on("blur",function(){b()}),I.down.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("down"!==V&&(w(),S()),t.preventDefault())}),I.down.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||C()}),I.up.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("up"!==V&&(x(),E()),t.preventDefault())}),I.up.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||C()}),I.down.on("mousedown.touchspin",function(t){I.down.off("touchstart.touchspin"),L.is(":disabled")||(w(),S(),t.preventDefault(),t.stopPropagation())}),I.down.on("touchstart.touchspin",function(t){I.down.off("mousedown.touchspin"),L.is(":disabled")||(w(),S(),t.preventDefault(),t.stopPropagation())}),I.up.on("mousedown.touchspin",function(t){I.up.off("touchstart.touchspin"),L.is(":disabled")||(x(),E(),t.preventDefault(),t.stopPropagation())}),I.up.on("touchstart.touchspin",function(t){I.up.off("mousedown.touchspin"),L.is(":disabled")||(x(),E(),t.preventDefault(),t.stopPropagation())}),I.up.on("mouseout touchleave touchend touchcancel",function(t){V&&(t.stopPropagation(),C())}),I.down.on("mouseout touchleave touchend touchcancel",function(t){V&&(t.stopPropagation(),C())}),I.down.on("mousemove touchmove",function(t){V&&(t.stopPropagation(),t.preventDefault())}),I.up.on("mousemove touchmove",function(t){V&&(t.stopPropagation(),t.preventDefault())}),t(document).on(n(["mouseup","touchend","touchcancel"],i).join(" "),function(t){V&&(t.preventDefault(),C())}),t(document).on(n(["mousemove","touchmove","scroll","scrollstart"],i).join(" "),function(t){V&&(t.preventDefault(),C())}),L.on("mousewheel DOMMouseScroll",function(t){if(T.mousewheel&&L.is(":focus")){var e=t.originalEvent.wheelDelta||-t.originalEvent.deltaY||-t.originalEvent.detail;t.stopPropagation(),t.preventDefault(),e<0?w():x()}})}function v(){L.on("touchspin.uponce",function(){C(),x()}),L.on("touchspin.downonce",function(){C(),w()}),L.on("touchspin.startupspin",function(){E()}),L.on("touchspin.startdownspin",function(){S()}),L.on("touchspin.stopspin",function(){C()}),L.on("touchspin.updatesettings",function(t,e){s(e)})}function y(t){switch(T.forcestepdivisibility){case"round":return(Math.round(t/T.step)*T.step).toFixed(T.decimals);case"floor":return(Math.floor(t/T.step)*T.step).toFixed(T.decimals);case"ceil":return(Math.ceil(t/T.step)*T.step).toFixed(T.decimals);default:return t}}function b(){var t,e,n;if(""===(t=L.val()))return void(""!==T.replacementval&&(L.val(T.replacementval),L.trigger("change")));T.decimals>0&&"."===t||(e=parseFloat(t),isNaN(e)&&(e=""!==T.replacementval?T.replacementval:0),n=e,e.toString()!==t&&(n=e),eT.max&&(n=T.max),n=y(n),Number(t).toString()!==n.toString()&&(L.val(n),L.trigger("change")))}function _(){if(T.booster){var t=Math.pow(2,Math.floor(B/T.boostat))*T.step;return T.maxboostedstep&&t>T.maxboostedstep&&(t=T.maxboostedstep,O=Math.round(O/t)*t),Math.max(T.step,t)}return T.step}function x(){b(),O=parseFloat(I.input.val()),isNaN(O)&&(O=0);var t=O,e=_();O+=e,O>T.max&&(O=T.max,L.trigger("touchspin.on.max"),C()),I.input.val(Number(O).toFixed(T.decimals)),t!==O&&L.trigger("change")}function w(){b(),O=parseFloat(I.input.val()),isNaN(O)&&(O=0);var t=O,e=_();O-=e,O=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;nthis._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(p.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var r=e>i?d.NEXT:d.PREVIOUS;this._slide(r,this._items[e])}},l.prototype.dispose=function(){t(this._element).off(s),t.removeData(this._element,a),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function(n){return n=t.extend({},c,n),o.typeCheckConfig(e,n,f),n},l.prototype._addEventListeners=function(){this._config.keyboard&&t(this._element).on(p.KEYDOWN,t.proxy(this._keydown,this)),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||t(this._element).on(p.MOUSEENTER,t.proxy(this.pause,this)).on(p.MOUSELEAVE,t.proxy(this.cycle,this))},l.prototype._keydown=function(t){if(t.preventDefault(),!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}},l.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(m.ITEM)),this._items.indexOf(e)},l.prototype._getItemByDirection=function(t,e){var n=t===d.NEXT,i=t===d.PREVIOUS,r=this._getItemIndex(e),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return e;var a=t===d.PREVIOUS?-1:1,s=(r+a)%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},l.prototype._triggerSlideEvent=function(e,n){var i=t.Event(p.SLIDE,{relatedTarget:e,direction:n});return t(this._element).trigger(i),i},l.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(m.ACTIVE).removeClass(h.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(h.ACTIVE)}},l.prototype._slide=function(e,n){var i=this,r=t(this._element).find(m.ACTIVE_ITEM)[0],a=n||r&&this._getItemByDirection(e,r),s=Boolean(this._interval),l=e===d.NEXT?h.LEFT:h.RIGHT;if(a&&t(a).hasClass(h.ACTIVE))return void(this._isSliding=!1);if(!this._triggerSlideEvent(a,l).isDefaultPrevented()&&r&&a){this._isSliding=!0,s&&this.pause(),this._setActiveIndicatorElement(a);var u=t.Event(p.SLID,{relatedTarget:a,direction:l});o.supportsTransitionEnd()&&t(this._element).hasClass(h.SLIDE)?(t(a).addClass(e),o.reflow(a),t(r).addClass(l),t(a).addClass(l),t(r).one(o.TRANSITION_END,function(){t(a).removeClass(l).removeClass(e),t(a).addClass(h.ACTIVE),t(r).removeClass(h.ACTIVE).removeClass(e).removeClass(l),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(u)},0)}).emulateTransitionEnd(600)):(t(r).removeClass(h.ACTIVE),t(a).addClass(h.ACTIVE),this._isSliding=!1,t(this._element).trigger(u)),s&&this.cycle()}},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r=t.extend({},c,t(this).data());"object"===(void 0===e?"undefined":i(e))&&t.extend(r,e);var o="string"==typeof e?e:r.slide;if(n||(n=new l(this,r),t(this).data(a,n)),"number"==typeof e)n.to(e);else if("string"==typeof o){if(void 0===n[o])throw new Error('No method named "'+o+'"');n[o]()}else r.interval&&(n.pause(),n.cycle())})},l._dataApiClickHandler=function(e){var n=o.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(h.CAROUSEL)){var r=t.extend({},t(i).data(),t(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),l._jQueryInterface.call(t(i),r),s&&t(i).data(a).to(s),e.preventDefault()}}},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return c}}]),l}();t(document).on(p.CLICK_DATA_API,m.DATA_SLIDE,g._dataApiClickHandler),t(window).on(p.LOAD_DATA_API,function(){t(m.DATA_RIDE).each(function(){var e=t(this);g._jQueryInterface.call(e,e.data())})}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=u,g._jQueryInterface}}(jQuery),function(t){var e="collapse",a="bs.collapse",s="."+a,l=t.fn[e],u={toggle:!0,parent:""},c={toggle:"boolean",parent:"string"},f={SHOW:"show"+s,SHOWN:"shown"+s,HIDE:"hide"+s,HIDDEN:"hidden"+s,CLICK_DATA_API:"click"+s+".data-api"},d={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},h={ACTIVES:".card > .in, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function s(e,i){n(this,s),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]')),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return s.prototype.toggle=function(){t(this._element).hasClass(d.IN)?this.hide():this.show()},s.prototype.show=function(){var e=this;if(!this._isTransitioning&&!t(this._element).hasClass(d.IN)){var n=void 0,i=void 0;if(this._parent&&(n=t.makeArray(t(h.ACTIVES)),n.length||(n=null)),!(n&&(i=t(n).data(a))&&i._isTransitioning)){var r=t.Event(f.SHOW);if(t(this._element).trigger(r),!r.isDefaultPrevented()){n&&(s._jQueryInterface.call(t(n),"hide"),i||t(n).data(a,null));var l=this._getDimension();t(this._element).removeClass(d.COLLAPSE).addClass(d.COLLAPSING),this._element.style[l]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&t(this._triggerArray).removeClass(d.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var u=function(){t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).addClass(d.IN),e._element.style[l]="",e.setTransitioning(!1),t(e._element).trigger(f.SHOWN)};if(!o.supportsTransitionEnd())return void u();var c=l[0].toUpperCase()+l.slice(1),p="scroll"+c;t(this._element).one(o.TRANSITION_END,u).emulateTransitionEnd(600),this._element.style[l]=this._element[p]+"px"}}}},s.prototype.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(d.IN)){var n=t.Event(f.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),r=i===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[r]+"px",o.reflow(this._element),t(this._element).addClass(d.COLLAPSING).removeClass(d.COLLAPSE).removeClass(d.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&t(this._triggerArray).addClass(d.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var a=function(){e.setTransitioning(!1),t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).trigger(f.HIDDEN)};return this._element.style[i]="",o.supportsTransitionEnd()?void t(this._element).one(o.TRANSITION_END,a).emulateTransitionEnd(600):void a()}}},s.prototype.setTransitioning=function(t){this._isTransitioning=t},s.prototype.dispose=function(){t.removeData(this._element,a),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},s.prototype._getConfig=function(n){return n=t.extend({},u,n),n.toggle=Boolean(n.toggle),o.typeCheckConfig(e,n,c),n},s.prototype._getDimension=function(){return t(this._element).hasClass(p.WIDTH)?p.WIDTH:p.HEIGHT},s.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(s._getTargetFromElement(n),[n])}),n},s.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(d.IN);e.setAttribute("aria-expanded",i),n.length&&t(n).toggleClass(d.COLLAPSED,!i).attr("aria-expanded",i)}},s._getTargetFromElement=function(e){var n=o.getSelectorFromElement(e);return n?t(n)[0]:null},s._jQueryInterface=function(e){return this.each(function(){var n=t(this),r=n.data(a),o=t.extend({},u,n.data(),"object"===(void 0===e?"undefined":i(e))&&e);if(!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||(r=new s(this,o),n.data(a,r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e]()}})},r(s,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}}]),s}();t(document).on(f.CLICK_DATA_API,h.DATA_TOGGLE,function(e){e.preventDefault();var n=m._getTargetFromElement(this),i=t(n).data(a),r=i?"toggle":t(this).data();m._jQueryInterface.call(t(n),r)}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=l,m._jQueryInterface}}(jQuery),function(t){var e="dropdown",i="bs.dropdown",a="."+i,s=".data-api",l=t.fn[e],u={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click"+a+s,KEYDOWN_DATA_API:"keydown"+a+s},c={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},f={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},d=function(){function e(t){n(this,e),this._element=t,this._addEventListeners()}return e.prototype.toggle=function(){if(this.disabled||t(this).hasClass(c.DISABLED))return!1;var n=e._getParentFromElement(this),i=t(n).hasClass(c.OPEN);if(e._clearMenus(),i)return!1;if("ontouchstart"in document.documentElement&&!t(n).closest(f.NAVBAR_NAV).length){var r=document.createElement("div");r.className=c.BACKDROP,t(r).insertBefore(this),t(r).on("click",e._clearMenus)}var o={relatedTarget:this},a=t.Event(u.SHOW,o);return t(n).trigger(a),!a.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded","true"),t(n).toggleClass(c.OPEN),t(n).trigger(t.Event(u.SHOWN,o)),!1)},e.prototype.dispose=function(){t.removeData(this._element,i),t(this._element).off(a),this._element=null},e.prototype._addEventListeners=function(){t(this._element).on(u.CLICK,this.toggle)},e._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(i);if(r||t(this).data(i,r=new e(this)),"string"==typeof n){if(void 0===r[n])throw new Error('No method named "'+n+'"');r[n].call(this)}})},e._clearMenus=function(n){if(!n||3!==n.which){var i=t(f.BACKDROP)[0];i&&i.parentNode.removeChild(i);for(var r=t.makeArray(t(f.DATA_TOGGLE)),o=0;o0&&s--,40===n.which&&sdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},l.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},l.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}if(this._activeTarget&&t=this._offsets[r]&&(void 0===this._offsets[r+1]||t .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},f=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!t(this._element).hasClass(u.ACTIVE)){var n=void 0,i=void 0,r=t(this._element).closest(c.UL)[0],a=o.getSelectorFromElement(this._element);r&&(i=t.makeArray(t(r).find(c.ACTIVE)),i=i[i.length-1]);var s=t.Event(l.HIDE,{relatedTarget:this._element}),f=t.Event(l.SHOW,{relatedTarget:i});if(i&&t(i).trigger(s),t(this._element).trigger(f),!f.isDefaultPrevented()&&!s.isDefaultPrevented()){a&&(n=t(a)[0]),this._activate(this._element,r);var d=function(){var n=t.Event(l.HIDDEN,{relatedTarget:e._element}),r=t.Event(l.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(r)};n?this._activate(n,n.parentNode,d):d()}}},e.prototype.dispose=function(){t.removeClass(this._element,i),this._element=null},e.prototype._activate=function(e,n,i){var r=t(n).find(c.ACTIVE_CHILD)[0],a=i&&o.supportsTransitionEnd()&&(r&&t(r).hasClass(u.FADE)||Boolean(t(n).find(c.FADE_CHILD)[0])),s=t.proxy(this._transitionComplete,this,e,r,a,i);r&&a?t(r).one(o.TRANSITION_END,s).emulateTransitionEnd(150):s(),r&&t(r).removeClass(u.IN)},e.prototype._transitionComplete=function(e,n,i,r){if(n){t(n).removeClass(u.ACTIVE);var a=t(n).find(c.DROPDOWN_ACTIVE_CHILD)[0];a&&t(a).removeClass(u.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0),i?(o.reflow(e),t(e).addClass(u.IN)):t(e).removeClass(u.FADE),e.parentNode&&t(e.parentNode).hasClass(u.DROPDOWN_MENU)){var s=t(e).closest(c.DROPDOWN)[0];s&&t(s).find(c.DROPDOWN_TOGGLE).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0)}r&&r()},e._jQueryInterface=function(n){return this.each(function(){var r=t(this),o=r.data(i);if(o||(o=o=new e(this),r.data(i,o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(l.CLICK_DATA_API,c.DATA_TOGGLE,function(e){e.preventDefault(),f._jQueryInterface.call(t(this),"show")}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){if(void 0===window.Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var e="tooltip",a="bs.tooltip",s="."+a,l=t.fn[e],u={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[]},c={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array"},f={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},d={IN:"in",OUT:"out"},p={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},h={FADE:"fade",IN:"in"},m={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},g={element:!1,enabled:!1},v={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},y=function(){function l(t,e){n(this,l),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return l.prototype.enable=function(){this._isEnabled=!0},l.prototype.disable=function(){this._isEnabled=!1},l.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},l.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(h.IN))return void this._leave(null,this);this._enter(null,this)}},l.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},l.prototype.show=function(){var e=this,n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var r=this.getTipElement(),a=o.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&t(r).addClass(h.FADE);var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,u=this._getAttachment(s);t(r).data(this.constructor.DATA_KEY,this).appendTo(document.body),t(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:u,element:r,target:this.element,classes:g,classPrefix:"bs-tether",offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),o.reflow(r),this._tether.position(),t(r).addClass(h.IN);var c=function(){var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d.OUT&&e._leave(null,e)};if(o.supportsTransitionEnd()&&t(this.tip).hasClass(h.FADE))return void t(this.tip).one(o.TRANSITION_END,c).emulateTransitionEnd(l._TRANSITION_DURATION);c()}},l.prototype.hide=function(e){var n=this,i=this.getTipElement(),r=t.Event(this.constructor.Event.HIDE),a=function(){n._hoverState!==d.IN&&i.parentNode&&i.parentNode.removeChild(i),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),n.cleanupTether(),e&&e()};t(this.element).trigger(r),r.isDefaultPrevented()||(t(i).removeClass(h.IN),o.supportsTransitionEnd()&&t(this.tip).hasClass(h.FADE)?t(i).one(o.TRANSITION_END,a).emulateTransitionEnd(150):a(),this._hoverState="")},l.prototype.isWithContent=function(){return Boolean(this.getTitle())},l.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},l.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m.TOOLTIP_INNER),this.getTitle()),e.removeClass(h.FADE).removeClass(h.IN),this.cleanupTether()},l.prototype.setElementContent=function(e,n){var r=this.config.html;"object"===(void 0===n?"undefined":i(n))&&(n.nodeType||n.jquery)?r?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[r?"html":"text"](n)},l.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},l.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},l.prototype._getAttachment=function(t){return f[t.toUpperCase()]},l.prototype._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,t.proxy(e.toggle,e));else if(n!==v.MANUAL){var i=n===v.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=n===v.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,t.proxy(e._enter,e)).on(r,e.config.selector,t.proxy(e._leave,e))}}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},l.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},l.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;return n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?v.FOCUS:v.HOVER]=!0),t(n.getTipElement()).hasClass(h.IN)||n._hoverState===d.IN?void(n._hoverState=d.IN):(clearTimeout(n._timeout),n._hoverState=d.IN,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===d.IN&&n.show()},n.config.delay.show)):void n.show())},l.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;if(n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?v.FOCUS:v.HOVER]=!1),!n._isWithActiveTrigger())return clearTimeout(n._timeout),n._hoverState=d.OUT,n.config.delay&&n.config.delay.hide?void(n._timeout=setTimeout(function(){n._hoverState===d.OUT&&n.hide()},n.config.delay.hide)):void n.hide()},l.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},l.prototype._getConfig=function(n){return n=t.extend({},this.constructor.Default,t(this.element).data(),n),n.delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),o.typeCheckConfig(e,n,this.constructor.DefaultType),n},l.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r="object"===(void 0===e?"undefined":i(e))?e:null;if((n||!/dispose|hide/.test(e))&&(n||(n=new l(this,r),t(this).data(a,n)),"string"==typeof e)){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return a}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return c}}]),l}();return t.fn[e]=y._jQueryInterface,t.fn[e].Constructor=y,t.fn[e].noConflict=function(){return t.fn[e]=l,y._jQueryInterface},y}(jQuery));!function(o){var s="popover",l="bs.popover",u="."+l,c=o.fn[s],f=o.extend({},a.Default,{placement:"right",trigger:"click",content:"",template:''}),d=o.extend({},a.DefaultType,{content:"(string|element|function)"}),p={FADE:"fade",IN:"in"},h={TITLE:".popover-title",CONTENT:".popover-content"},m={HIDE:"hide"+u,HIDDEN:"hidden"+u,SHOW:"show"+u,SHOWN:"shown"+u,INSERTED:"inserted"+u,CLICK:"click"+u,FOCUSIN:"focusin"+u,FOCUSOUT:"focusout"+u,MOUSEENTER:"mouseenter"+u,MOUSELEAVE:"mouseleave"+u},g=function(a){function c(){return n(this,c),t(this,a.apply(this,arguments))}return e(c,a),c.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},c.prototype.getTipElement=function(){return this.tip=this.tip||o(this.config.template)[0]},c.prototype.setContent=function(){var t=o(this.getTipElement());this.setElementContent(t.find(h.TITLE),this.getTitle()),this.setElementContent(t.find(h.CONTENT),this._getContent()),t.removeClass(p.FADE).removeClass(p.IN),this.cleanupTether()},c.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},c._jQueryInterface=function(t){return this.each(function(){var e=o(this).data(l),n="object"===(void 0===t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new c(this,n),o(this).data(l,e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},r(c,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return f}},{key:"NAME",get:function(){return s}},{key:"DATA_KEY",get:function(){return l}},{key:"Event",get:function(){return m}},{key:"EVENT_KEY",get:function(){return u}},{key:"DefaultType",get:function(){return d}}]),c}(a);o.fn[s]=g._jQueryInterface,o.fn[s].Constructor=g,o.fn[s].noConflict=function(){return o.fn[s]=c,g._jQueryInterface}}(jQuery)}()},function(t,e,n){"use strict";function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function o(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,n,i,o,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l0&&this._events[t].length>n&&(this._events[t].warned=!0,console.trace),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},i.prototype.removeListener=function(t,e){var n,i,o,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";var i,i;!function(e){t.exports=e()}(function(){return function t(e,n,r){function o(s,l){if(!n[s]){if(!e[s]){var u="function"==typeof i&&i;if(!l&&u)return i(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[s]={exports:{}};e[s][0].call(f.exports,function(t){var n=e[s][1][t];return o(n||t)},f,f.exports,t,e,n,r)}return n[s].exports}for(var a="function"==typeof i&&i,s=0;s1&&"flex-start"===t.style.alignContent)for(e=0;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"flex-end"===t.style.alignContent)for(e=t.flexStyle.crossSpace;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"center"===t.style.alignContent)for(e=t.flexStyle.crossSpace/2;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"space-between"===t.style.alignContent)for(n=t.flexStyle.crossSpace/(t.lines.length-1),e=0;i=t.lines[++r];)i.crossStart=e,e+=i.cross+n;else if(t.lines.length>1&&"space-around"===t.style.alignContent)for(n=2*t.flexStyle.crossSpace/(2*t.lines.length),e=n/2;i=t.lines[++r];)i.crossStart=e,e+=i.cross+n;else for(n=t.flexStyle.crossSpace/t.lines.length,e=t.flexStyle.crossInnerBefore;i=t.lines[++r];)i.crossStart=e,i.cross+=n,e+=i.cross}},{}],2:[function(t,e,n){e.exports=function(t){for(var e,n=-1;line=t.lines[++n];)for(e=-1;child=line.children[++e];){var i=child.style.alignSelf;"auto"===i&&(i=t.style.alignItems),"flex-start"===i?child.flexStyle.crossStart=line.crossStart:"flex-end"===i?child.flexStyle.crossStart=line.crossStart+line.cross-child.flexStyle.crossOuter:"center"===i?child.flexStyle.crossStart=line.crossStart+(line.cross-child.flexStyle.crossOuter)/2:(child.flexStyle.crossStart=line.crossStart,child.flexStyle.crossOuter=line.cross,child.flexStyle.cross=child.flexStyle.crossOuter-child.flexStyle.crossBefore-child.flexStyle.crossAfter)}}},{}],3:[function(t,e,n){e.exports=function(t,e){var n="row"===e||"row-reverse"===e,i=t.mainAxis;if(i){n&&"inline"===i||!n&&"block"===i||(t.flexStyle={main:t.flexStyle.cross,cross:t.flexStyle.main,mainOffset:t.flexStyle.crossOffset,crossOffset:t.flexStyle.mainOffset,mainBefore:t.flexStyle.crossBefore,mainAfter:t.flexStyle.crossAfter,crossBefore:t.flexStyle.mainBefore,crossAfter:t.flexStyle.mainAfter,mainInnerBefore:t.flexStyle.crossInnerBefore,mainInnerAfter:t.flexStyle.crossInnerAfter,crossInnerBefore:t.flexStyle.mainInnerBefore,crossInnerAfter:t.flexStyle.mainInnerAfter,mainBorderBefore:t.flexStyle.crossBorderBefore,mainBorderAfter:t.flexStyle.crossBorderAfter,crossBorderBefore:t.flexStyle.mainBorderBefore,crossBorderAfter:t.flexStyle.mainBorderAfter})}else t.flexStyle=n?{main:t.style.width,cross:t.style.height,mainOffset:t.style.offsetWidth,crossOffset:t.style.offsetHeight,mainBefore:t.style.marginLeft,mainAfter:t.style.marginRight,crossBefore:t.style.marginTop,crossAfter:t.style.marginBottom,mainInnerBefore:t.style.paddingLeft,mainInnerAfter:t.style.paddingRight,crossInnerBefore:t.style.paddingTop,crossInnerAfter:t.style.paddingBottom,mainBorderBefore:t.style.borderLeftWidth,mainBorderAfter:t.style.borderRightWidth,crossBorderBefore:t.style.borderTopWidth,crossBorderAfter:t.style.borderBottomWidth}:{main:t.style.height,cross:t.style.width,mainOffset:t.style.offsetHeight,crossOffset:t.style.offsetWidth,mainBefore:t.style.marginTop,mainAfter:t.style.marginBottom,crossBefore:t.style.marginLeft,crossAfter:t.style.marginRight,mainInnerBefore:t.style.paddingTop,mainInnerAfter:t.style.paddingBottom,crossInnerBefore:t.style.paddingLeft,crossInnerAfter:t.style.paddingRight,mainBorderBefore:t.style.borderTopWidth,mainBorderAfter:t.style.borderBottomWidth,crossBorderBefore:t.style.borderLeftWidth,crossBorderAfter:t.style.borderRightWidth},"content-box"===t.style.boxSizing&&("number"==typeof t.flexStyle.main&&(t.flexStyle.main+=t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter),"number"==typeof t.flexStyle.cross&&(t.flexStyle.cross+=t.flexStyle.crossInnerBefore+t.flexStyle.crossInnerAfter+t.flexStyle.crossBorderBefore+t.flexStyle.crossBorderAfter));t.mainAxis=n?"inline":"block",t.crossAxis=n?"block":"inline","number"==typeof t.style.flexBasis&&(t.flexStyle.main=t.style.flexBasis+t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter),t.flexStyle.mainOuter=t.flexStyle.main,t.flexStyle.crossOuter=t.flexStyle.cross,"auto"===t.flexStyle.mainOuter&&(t.flexStyle.mainOuter=t.flexStyle.mainOffset),"auto"===t.flexStyle.crossOuter&&(t.flexStyle.crossOuter=t.flexStyle.crossOffset),"number"==typeof t.flexStyle.mainBefore&&(t.flexStyle.mainOuter+=t.flexStyle.mainBefore),"number"==typeof t.flexStyle.mainAfter&&(t.flexStyle.mainOuter+=t.flexStyle.mainAfter),"number"==typeof t.flexStyle.crossBefore&&(t.flexStyle.crossOuter+=t.flexStyle.crossBefore),"number"==typeof t.flexStyle.crossAfter&&(t.flexStyle.crossOuter+=t.flexStyle.crossAfter)}},{}],4:[function(t,e,n){var i=t("../reduce");e.exports=function(t){if(t.mainSpace>0){var e=i(t.children,function(t,e){return t+parseFloat(e.style.flexGrow)},0);e>0&&(t.main=i(t.children,function(n,i){return"auto"===i.flexStyle.main?i.flexStyle.main=i.flexStyle.mainOffset+parseFloat(i.style.flexGrow)/e*t.mainSpace:i.flexStyle.main+=parseFloat(i.style.flexGrow)/e*t.mainSpace,i.flexStyle.mainOuter=i.flexStyle.main+i.flexStyle.mainBefore+i.flexStyle.mainAfter,n+i.flexStyle.mainOuter},0),t.mainSpace=0)}}},{"../reduce":12}],5:[function(t,e,n){var i=t("../reduce");e.exports=function(t){if(t.mainSpace<0){var e=i(t.children,function(t,e){return t+parseFloat(e.style.flexShrink)},0);e>0&&(t.main=i(t.children,function(n,i){return i.flexStyle.main+=parseFloat(i.style.flexShrink)/e*t.mainSpace,i.flexStyle.mainOuter=i.flexStyle.main+i.flexStyle.mainBefore+i.flexStyle.mainAfter,n+i.flexStyle.mainOuter},0),t.mainSpace=0)}}},{"../reduce":12}],6:[function(t,e,n){var i=t("../reduce");e.exports=function(t){var e;t.lines=[e={main:0,cross:0,children:[]}];for(var n,r=-1;n=t.children[++r];)"nowrap"===t.style.flexWrap||0===e.children.length||"auto"===t.flexStyle.main||t.flexStyle.main-t.flexStyle.mainInnerBefore-t.flexStyle.mainInnerAfter-t.flexStyle.mainBorderBefore-t.flexStyle.mainBorderAfter>=e.main+n.flexStyle.mainOuter?(e.main+=n.flexStyle.mainOuter,e.cross=Math.max(e.cross,n.flexStyle.crossOuter)):t.lines.push(e={main:n.flexStyle.mainOuter,cross:n.flexStyle.crossOuter,children:[]}),e.children.push(n);t.flexStyle.mainLines=i(t.lines,function(t,e){return Math.max(t,e.main)},0),t.flexStyle.crossLines=i(t.lines,function(t,e){return t+e.cross},0),"auto"===t.flexStyle.main&&(t.flexStyle.main=Math.max(t.flexStyle.mainOffset,t.flexStyle.mainLines+t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter)),"auto"===t.flexStyle.cross&&(t.flexStyle.cross=Math.max(t.flexStyle.crossOffset,t.flexStyle.crossLines+t.flexStyle.crossInnerBefore+t.flexStyle.crossInnerAfter+t.flexStyle.crossBorderBefore+t.flexStyle.crossBorderAfter)),t.flexStyle.crossSpace=t.flexStyle.cross-t.flexStyle.crossInnerBefore-t.flexStyle.crossInnerAfter-t.flexStyle.crossBorderBefore-t.flexStyle.crossBorderAfter-t.flexStyle.crossLines,t.flexStyle.mainOuter=t.flexStyle.main+t.flexStyle.mainBefore+t.flexStyle.mainAfter,t.flexStyle.crossOuter=t.flexStyle.cross+t.flexStyle.crossBefore+t.flexStyle.crossAfter}},{"../reduce":12}],7:[function(t,e,n){function i(e){for(var n,i=-1;n=e.children[++i];)t("./flex-direction")(n,e.style.flexDirection);t("./flex-direction")(e,e.style.flexDirection),t("./order")(e),t("./flexbox-lines")(e),t("./align-content")(e),i=-1;for(var r;r=e.lines[++i];)r.mainSpace=e.flexStyle.main-e.flexStyle.mainInnerBefore-e.flexStyle.mainInnerAfter-e.flexStyle.mainBorderBefore-e.flexStyle.mainBorderAfter-r.main,t("./flex-grow")(r),t("./flex-shrink")(r),t("./margin-main")(r),t("./margin-cross")(r),t("./justify-content")(r,e.style.justifyContent,e);t("./align-items")(e)}e.exports=i},{"./align-content":1,"./align-items":2,"./flex-direction":3,"./flex-grow":4,"./flex-shrink":5,"./flexbox-lines":6,"./justify-content":8,"./margin-cross":9,"./margin-main":10,"./order":11}],8:[function(t,e,n){e.exports=function(t,e,n){var i,r,o,a=n.flexStyle.mainInnerBefore,s=-1;if("flex-end"===e)for(i=t.mainSpace,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter;else if("center"===e)for(i=t.mainSpace/2,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter;else if("space-between"===e)for(r=t.mainSpace/(t.children.length-1),i=0,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter+r;else if("space-around"===e)for(r=2*t.mainSpace/(2*t.children.length),i=r/2,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter+r;else for(i=0,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter}},{}],9:[function(t,e,n){e.exports=function(t){for(var e,n=-1;e=t.children[++n];){var i=0;"auto"===e.flexStyle.crossBefore&&++i,"auto"===e.flexStyle.crossAfter&&++i;var r=t.cross-e.flexStyle.crossOuter;"auto"===e.flexStyle.crossBefore&&(e.flexStyle.crossBefore=r/i),"auto"===e.flexStyle.crossAfter&&(e.flexStyle.crossAfter=r/i),"auto"===e.flexStyle.cross?e.flexStyle.crossOuter=e.flexStyle.crossOffset+e.flexStyle.crossBefore+e.flexStyle.crossAfter:e.flexStyle.crossOuter=e.flexStyle.cross+e.flexStyle.crossBefore+e.flexStyle.crossAfter}}},{}],10:[function(t,e,n){e.exports=function(t){for(var e,n=0,i=-1;e=t.children[++i];)"auto"===e.flexStyle.mainBefore&&++n,"auto"===e.flexStyle.mainAfter&&++n;if(n>0){for(i=-1;e=t.children[++i];)"auto"===e.flexStyle.mainBefore&&(e.flexStyle.mainBefore=t.mainSpace/n),"auto"===e.flexStyle.mainAfter&&(e.flexStyle.mainAfter=t.mainSpace/n),"auto"===e.flexStyle.main?e.flexStyle.mainOuter=e.flexStyle.mainOffset+e.flexStyle.mainBefore+e.flexStyle.mainAfter:e.flexStyle.mainOuter=e.flexStyle.main+e.flexStyle.mainBefore+e.flexStyle.mainAfter;t.mainSpace=0}}},{}],11:[function(t,e,n){var i=/^(column|row)-reverse$/;e.exports=function(t){t.children.sort(function(t,e){return t.style.order-e.style.order||t.index-e.index}),i.test(t.style.flexDirection)&&t.children.reverse()}},{}],12:[function(t,e,n){function i(t,e,n){for(var i=t.length,r=-1;++r=0)&&i.push(r)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}function a(){C&&document.body.removeChild(C),C=null}function s(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var n=e.documentElement,i=r(t),o=I();return i.top-=o.top,i.left-=o.left,void 0===i.width&&(i.width=document.body.scrollWidth-i.left-i.right),void 0===i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-n.clientTop,i.left=i.left-n.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}function l(t){return t.offsetParent||document.documentElement}function u(){if(O)return O;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");c(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;n===i&&(i=e.clientWidth),document.body.removeChild(e);var r=n-i;return O={width:r,height:r}}function c(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}),t}function f(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var n=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=h(t).replace(n," ");m(t,i)}}function d(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{f(t,e);var n=h(t)+" "+e;m(t,n)}}function p(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=h(t);return new RegExp("(^| )"+e+"( |$)","gi").test(n)}function h(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function m(t,e){t.setAttribute("class",e)}function g(t,e,n){n.forEach(function(n){-1===e.indexOf(n)&&p(t,n)&&f(t,n)}),e.forEach(function(e){p(t,e)||d(t,e)})}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+n>=e&&e>=t-n}function b(){return"undefined"!=typeof performance&&void 0!==performance.now?performance.now():+new Date}function _(){for(var t={top:0,left:0},e=arguments.length,n=Array(e),i=0;i1?n-1:0),r=1;r16)return e=Math.min(e-16,250),void(n=setTimeout(i,250));void 0!==t&&b()-t<10||(null!=n&&(clearTimeout(n),n=null),t=b(),R(),e=b()-t)};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var M={center:"center",left:"right",right:"left"},H={middle:"middle",top:"bottom",bottom:"top"},W={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},U=function(t,e){var n=t.left,i=t.top;return"auto"===n&&(n=M[e.left]),"auto"===i&&(i=H[e.top]),{left:n,top:i}},q=function(t){var e=t.left,n=t.top;return void 0!==W[t.left]&&(e=W[t.left]),void 0!==W[t.top]&&(n=W[t.top]),{left:e,top:n}},z=function(t){var e=t.split(" "),n=L(e,2);return{top:n[0],left:n[1]}},$=z,Q=function(t){function e(t){var n=this;i(this,e),j(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),F.push(this),this.history=[],this.setOptions(t,!1),E.modules.forEach(function(t){void 0!==t.initialize&&t.initialize.call(n)}),this.position()}return v(e,t),S(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(i,t);var r=this.options,a=r.element,s=r.target,l=r.targetModifier;if(this.element=a,this.target=s,this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(void 0===e[t])throw new Error("Tether Error: Both element and target must be defined");void 0!==e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=$(this.options.targetAttachment),this.attachment=$(this.options.attachment),this.offset=z(this.options.offset),this.targetOffset=z(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=o(this.target),!1!==this.options.enabled&&this.enable(n)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=s(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topn.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,o=0;r&&(o=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-o,e={width:15,height:.975*a*(a/n.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},l=0;a<408&&this.target===document.body&&(l=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var u=this.target.scrollTop/(n.scrollHeight-a);return e.top=u*(a-e.height-l)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return void 0===this._cache&&(this._cache={}),void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;f(this.target,this.getClass("enabled")),f(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),F.forEach(function(e,n){e===t&&F.splice(n,1)}),0===F.length&&a()}},{key:"updateAttachClasses",value:function(t,e){var n=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var r=this._addAttachClasses;t.top&&r.push(this.getClass("element-attached")+"-"+t.top),t.left&&r.push(this.getClass("element-attached")+"-"+t.left),e.top&&r.push(this.getClass("target-attached")+"-"+e.top),e.left&&r.push(this.getClass("target-attached")+"-"+e.left);var o=[];i.forEach(function(t){o.push(n.getClass("element-attached")+"-"+t),o.push(n.getClass("target-attached")+"-"+t)}),D(function(){void 0!==n._addAttachClasses&&(g(n.element,n._addAttachClasses,o),!1!==n.options.addTargetClasses&&g(n.target,n._addAttachClasses,o),delete n._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var n=U(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var i=this.cache("element-bounds",function(){return s(t.element)}),r=i.width,o=i.height;if(0===r&&0===o&&void 0!==this.lastSize){var a=this.lastSize;r=a.width,o=a.height}else this.lastSize={width:r,height:o};var c=this.cache("target-bounds",function(){return t.getTargetBounds()}),f=c,d=x(q(this.attachment),{width:r,height:o}),p=x(q(n),f),h=x(this.offset,{width:r,height:o}),m=x(this.targetOffset,f);d=_(d,h),p=_(p,m);for(var g=c.left+p.left-d.left,v=c.top+p.top-d.top,y=0;yC.documentElement.clientHeight&&(A=this.cache("scrollbar-size",u),S.viewport.bottom-=A.height),T.innerWidth>C.documentElement.clientWidth&&(A=this.cache("scrollbar-size",u),S.viewport.right-=A.width),-1!==["","static"].indexOf(C.body.style.position)&&-1!==["","static"].indexOf(C.body.parentElement.style.position)||(S.page.bottom=C.body.scrollHeight-v-o,S.page.right=C.body.scrollWidth-g-r),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return l(t.target)}),n=t.cache("target-offsetparent-bounds",function(){return s(e)}),i=getComputedStyle(e),r=n,o={};if(["Top","Left","Bottom","Right"].forEach(function(t){o[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),n.right=C.body.scrollWidth-n.left-r.width+o.right,n.bottom=C.body.scrollHeight-n.top-r.height+o.bottom,S.page.top>=n.top+o.top&&S.page.bottom>=n.bottom&&S.page.left>=n.left+o.left&&S.page.right>=n.right){var a=e.scrollTop,u=e.scrollLeft;S.offset={top:S.page.top-n.top+a-o.top,left:S.page.left-n.left+u-o.left}}}(),this.move(S),this.history.unshift(S),this.history.length>3&&this.history.pop(),e&&N(),!0}}},{key:"move",value:function(t){var e=this;if(void 0!==this.element.parentNode){var n={};for(var i in t){n[i]={};for(var r in t[i]){for(var o=!1,a=0;a=0){var h=s.split(" "),g=L(h,2);f=g[0],c=g[1]}else c=f=s;var b=w(e,o);"target"!==f&&"both"!==f||(nb[3]&&"bottom"===v.top&&(n-=d,v.top="top")),"together"===f&&("top"===v.top&&("bottom"===y.top&&nb[3]&&n-(a-d)>=b[1]&&(n-=a-d,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&n+a>b[3]?(n-=d,v.top="top",n-=a,y.top="bottom"):"bottom"===y.top&&nb[3]&&"top"===y.top?(n-=a,y.top="bottom"):nb[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===c&&(ib[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=l,y.left="left"):"center"===v.left&&(i+l>b[2]&&"left"===y.left?(i-=l,y.left="right"):ib[3]&&"top"===y.top&&(n-=a,y.top="bottom")),"element"!==c&&"both"!==c||(ib[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof u?u=u.split(",").map(function(t){return t.trim()}):!0===u&&(u=["top","left","right","bottom"]),u=u||[];var _=[],x=[];n=0?(n=b[1],_.push("top")):x.push("top")),n+a>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-a,_.push("bottom")):x.push("bottom")),i=0?(i=b[0],_.push("left")):x.push("left")),i+l>b[2]&&(u.indexOf("right")>=0?(i=b[2]-l,_.push("right")):x.push("right")),_.length&&function(){var t=void 0;t=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),_.forEach(function(e){m.push(t+"-"+e)})}(),x.length&&function(){var t=void 0;t=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),x.forEach(function(e){m.push(t+"-"+e)})}(),(_.indexOf("left")>=0||_.indexOf("right")>=0)&&(y.left=v.left=!1),(_.indexOf("top")>=0||_.indexOf("bottom")>=0)&&(y.top=v.top=!1),v.top===r.top&&v.left===r.left&&y.top===e.attachment.top&&y.left===e.attachment.left||(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),D(function(){!1!==e.options.addTargetClasses&&g(e.target,m,h),g(e.element,m,h)}),{top:n,left:i}}});var B=E.Utils,s=B.getBounds,g=B.updateClasses,D=B.defer;E.modules.push({position:function(t){var e=this,n=t.top,i=t.left,r=this.cache("element-bounds",function(){return s(e.element)}),o=r.height,a=r.width,l=this.getTargetBounds(),u=n+o,c=i+a,f=[];n<=l.bottom&&u>=l.top&&["left","right"].forEach(function(t){var e=l[t];e!==i&&e!==c||f.push(t)}),i<=l.right&&c>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];e!==n&&e!==u||f.push(t)});var d=[],p=[],h=["left","top","right","bottom"];return d.push(this.getClass("abutted")),h.forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),f.length&&p.push(this.getClass("abutted")),f.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),D(function(){!1!==e.options.addTargetClasses&&g(e.target,p,d),g(e.element,p,d)}),!0}});var L=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return E.modules.push({position:function(t){var e=t.top,n=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:n}));var r=void 0,o=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var a=i,s=L(a,2);r=s[0],o=s[1],r=parseFloat(r,10),o=parseFloat(o,10)}else r=i.top,o=i.left;return e+=r,n+=o,{top:e,left:n}}}}),G})},function(t,e,n){"use strict";var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,n){(function(e){t.exports=e.Tether=n(23)}).call(e,n(24))},function(t,e,n){n(5),t.exports=n(6)}]);
\ No newline at end of file
From e98896172cde968894f6ad5a89b9ec911b07fc9c Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Tue, 7 Aug 2018 08:53:18 +0200
Subject: [PATCH 04/14] Fix tests
---
classes/Cart.php | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/classes/Cart.php b/classes/Cart.php
index 1c465aef9cc0c..0d18d0cbcf039 100644
--- a/classes/Cart.php
+++ b/classes/Cart.php
@@ -1340,9 +1340,12 @@ public function updateQty(
// Hook::exec('actionBeforeCartUpdateQty', $data);
Hook::exec('actionCartUpdateQuantityBefore', $data);
+ if ((int) $quantity <= 0) {
+ return $this->deleteProduct($id_product, $id_product_attribute, (int) $id_customization);
+ }
+
if (!$product->available_for_order ||
- Configuration::isCatalogMode() && !defined('_PS_ADMIN_DIR_') ||
- (int) $quantity <= 0
+ Configuration::isCatalogMode() && !defined('_PS_ADMIN_DIR_')
) {
return false;
}
From 4feaa35522c56605516b1284d7e5baf2ef421353 Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Tue, 7 Aug 2018 10:50:10 +0200
Subject: [PATCH 05/14] Add unit tests
---
.../Adding/Product/AddStandardProductTest.php | 57 +++++++++++++++++++
tests/phpunit.xml | 11 +++-
2 files changed, 67 insertions(+), 1 deletion(-)
diff --git a/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php b/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
index cd0ac9d8c7066..49219b18d9311 100644
--- a/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
+++ b/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
@@ -80,4 +80,61 @@ public function testProductCanBeAddedInCartIfMoreThanStockButAvailableWhenOutOfS
Configuration::set('PS_ORDER_OUT_OF_STOCK', $oldOrderOutOfStock);
}
+ /**
+ * @dataProvider updateQuantities
+ */
+ public function testUpdateQuantity($quantity, $operator, $expected, $quantityExpected)
+ {
+ $product = $this->getProductFromFixtureId(1);
+ $result = $this->cart->updateQty(
+ $quantity,
+ $product->id,
+ $id_product_attribute = null,
+ $id_customization = false,
+ $operator
+ );
+ $cartProductQuantity = $this->cart->getProductQuantity(
+ $product->id,
+ $id_product_attribute,
+ (int) $id_customization,
+ $id_address_delivery = 0
+ );
+
+ $this->assertEquals($expected, $result);
+ $this->assertEquals($quantityExpected, $cartProductQuantity['quantity']);
+ }
+
+ public function updateQuantities()
+ {
+ return [
+ [1, 'up', true, 1],
+ [2, 'up', true, 2],
+ [2, 'down', true, 0],
+ [0, 'down', true, 0],
+ ];
+ }
+
+ /**
+ * @dataProvider multipleUpdateQuantities
+ */
+ public function testMultipleUpdateQuantity($first, $second)
+ {
+ list($quantity, $operator, $expected, $quantityExpected) = $first;
+ $this->testUpdateQuantity($quantity, $operator, $expected, $quantityExpected);
+
+ list($quantity, $operator, $expected, $quantityExpected) = $second;
+ $this->testUpdateQuantity($quantity, $operator, $expected, $quantityExpected);
+ }
+
+ public function multipleUpdateQuantities()
+ {
+ return [
+ [[1, 'up', true, 1], [1, 'up', true, 2]],
+ [[2, 'up', true, 2], [2, 'down', true, 0]],
+ [[2, 'down', true, 0], [2, 'up', true, 2]],
+ [[0, 'down', true, 0], [1, 'nothing', true, 0]],
+ [[1, 'down', true, 0], [1, 'nothing', true, 0]],
+ [[1, 'up', true, 1], [10, 'nothing', false, 1]],
+ ];
+ }
}
diff --git a/tests/phpunit.xml b/tests/phpunit.xml
index 31c5f89fcfa8e..36c1f1834306d 100644
--- a/tests/phpunit.xml
+++ b/tests/phpunit.xml
@@ -1,4 +1,5 @@
-
+
@@ -23,4 +24,12 @@
Integration
+
+
+
+ ../src
+ ../classes
+ ../controllers
+
+
From 8a84ffcace7cb0fc47b3c05b8729c965da5113a8 Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Thu, 9 Aug 2018 14:26:22 +0200
Subject: [PATCH 06/14] Move HotModuleReplacementPlugin into development mode
---
admin-dev/themes/new-theme/webpack.config.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/admin-dev/themes/new-theme/webpack.config.js b/admin-dev/themes/new-theme/webpack.config.js
index 36eeebce0e2ac..06b46c49faaa0 100644
--- a/admin-dev/themes/new-theme/webpack.config.js
+++ b/admin-dev/themes/new-theme/webpack.config.js
@@ -190,7 +190,6 @@ let config = {
]
},
plugins: [
- new webpack.HotModuleReplacementPlugin(),
new ExtractTextPlugin('theme.css'),
new webpack.ProvidePlugin({
moment: 'moment', // needed for bootstrap datetime picker
@@ -216,6 +215,7 @@ if (process.env.NODE_ENV === 'production') {
})
);
} else {
+ config.plugins.push(new webpack.HotModuleReplacementPlugin());
config.entry.stock.push('webpack/hot/only-dev-server');
config.entry.stock.push('webpack-dev-server/client?http://localhost:8080');
}
From bf8380921204ec8e3960255fc225580e676ab5e0 Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Thu, 9 Aug 2018 14:38:28 +0200
Subject: [PATCH 07/14] Add Provider suffix
---
.../Core/Cart/Adding/Product/AddStandardProductTest.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php b/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
index 49219b18d9311..7e7a8d120e92e 100644
--- a/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
+++ b/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
@@ -81,7 +81,7 @@ public function testProductCanBeAddedInCartIfMoreThanStockButAvailableWhenOutOfS
}
/**
- * @dataProvider updateQuantities
+ * @dataProvider updateQuantitiesProvider
*/
public function testUpdateQuantity($quantity, $operator, $expected, $quantityExpected)
{
@@ -104,7 +104,7 @@ public function testUpdateQuantity($quantity, $operator, $expected, $quantityExp
$this->assertEquals($quantityExpected, $cartProductQuantity['quantity']);
}
- public function updateQuantities()
+ public function updateQuantitiesProvider()
{
return [
[1, 'up', true, 1],
@@ -115,7 +115,7 @@ public function updateQuantities()
}
/**
- * @dataProvider multipleUpdateQuantities
+ * @dataProvider multipleUpdateQuantitiesProvider
*/
public function testMultipleUpdateQuantity($first, $second)
{
@@ -126,7 +126,7 @@ public function testMultipleUpdateQuantity($first, $second)
$this->testUpdateQuantity($quantity, $operator, $expected, $quantityExpected);
}
- public function multipleUpdateQuantities()
+ public function multipleUpdateQuantitiesProvider()
{
return [
[[1, 'up', true, 1], [1, 'up', true, 2]],
From e37130507764b7f6fbdb2f90820b1d5839c08783 Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Thu, 9 Aug 2018 15:01:24 +0200
Subject: [PATCH 08/14] Method names
---
.../Unit/Core/Cart/Adding/Product/AddStandardProductTest.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php b/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
index 7e7a8d120e92e..2eb8fe170e63b 100644
--- a/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
+++ b/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
@@ -83,7 +83,7 @@ public function testProductCanBeAddedInCartIfMoreThanStockButAvailableWhenOutOfS
/**
* @dataProvider updateQuantitiesProvider
*/
- public function testUpdateQuantity($quantity, $operator, $expected, $quantityExpected)
+ public function testNumberOfProductsInCartIsReportedCorrectlyWhenUpdatingTheirQuantityOnce($quantity, $operator, $expected, $quantityExpected)
{
$product = $this->getProductFromFixtureId(1);
$result = $this->cart->updateQty(
@@ -117,7 +117,7 @@ public function updateQuantitiesProvider()
/**
* @dataProvider multipleUpdateQuantitiesProvider
*/
- public function testMultipleUpdateQuantity($first, $second)
+ public function testNumberOfProductsInCartIsReportedCorrectlyWhenUpdatingTheirQuantityTwice($first, $second)
{
list($quantity, $operator, $expected, $quantityExpected) = $first;
$this->testUpdateQuantity($quantity, $operator, $expected, $quantityExpected);
From ddb86fe8637f52d6765468d59ac67f9fa7e07380 Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Thu, 9 Aug 2018 15:52:54 +0200
Subject: [PATCH 09/14] Change logical operators
---
classes/Cart.php | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/classes/Cart.php b/classes/Cart.php
index 0d18d0cbcf039..bac46f4398dc1 100644
--- a/classes/Cart.php
+++ b/classes/Cart.php
@@ -1281,14 +1281,16 @@ public function updateQty(
}
if (Context::getContext()->customer->id) {
- // The $id_address_delivery is null, use the cart delivery address
if ($id_address_delivery == 0 && (int)$this->id_address_delivery) {
+ // The $id_address_delivery is null, use the cart delivery address
$id_address_delivery = $this->id_address_delivery;
- } elseif ($id_address_delivery == 0) { // The $id_address_delivery is null, get the default customer address
+ } elseif ($id_address_delivery == 0) {
+ // The $id_address_delivery is null, get the default customer address
$id_address_delivery = (int) Address::getFirstCustomerAddressId(
(int) Context::getContext()->customer->id
);
- } elseif (!Customer::customerHasAddress(Context::getContext()->customer->id, $id_address_delivery)) { // The $id_address_delivery must be linked with customer
+ } elseif (!Customer::customerHasAddress(Context::getContext()->customer->id, $id_address_delivery)) {
+ // The $id_address_delivery must be linked with customer
$id_address_delivery = 0;
}
}
@@ -1344,8 +1346,11 @@ public function updateQty(
return $this->deleteProduct($id_product, $id_product_attribute, (int) $id_customization);
}
- if (!$product->available_for_order ||
- Configuration::isCatalogMode() && !defined('_PS_ADMIN_DIR_')
+ if (!$product->available_for_order
+ || (
+ Configuration::isCatalogMode()
+ && !defined('_PS_ADMIN_DIR_')
+ )
) {
return false;
}
@@ -1379,8 +1384,8 @@ public function updateQty(
$updateQuantity = '- ' . $quantity;
$newProductQuantity = $productQuantity + $quantity;
- if ($cartFirstLevelProductQuantity['quantity'] <= 1 ||
- $cartProductQuantity['quantity'] - $quantity <= 0
+ if ($cartFirstLevelProductQuantity['quantity'] <= 1
+ || $cartProductQuantity['quantity'] - $quantity <= 0
) {
return $this->deleteProduct((int)$id_product, (int)$id_product_attribute, (int)$id_customization);
}
From 9269ca945b8618cdcd7622a9c7b430ebff29803f Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Thu, 9 Aug 2018 16:23:26 +0200
Subject: [PATCH 10/14] Fix tests
---
.../Adding/Product/AddStandardProductTest.php | 22 +++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php b/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
index 2eb8fe170e63b..f6dc2efa29a84 100644
--- a/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
+++ b/tests/Unit/Core/Cart/Adding/Product/AddStandardProductTest.php
@@ -83,8 +83,12 @@ public function testProductCanBeAddedInCartIfMoreThanStockButAvailableWhenOutOfS
/**
* @dataProvider updateQuantitiesProvider
*/
- public function testNumberOfProductsInCartIsReportedCorrectlyWhenUpdatingTheirQuantityOnce($quantity, $operator, $expected, $quantityExpected)
- {
+ public function testNumberOfProductsInCartIsReportedCorrectlyWhenUpdatingTheirQuantityOnce(
+ $quantity,
+ $operator,
+ $expected,
+ $quantityExpected
+ ) {
$product = $this->getProductFromFixtureId(1);
$result = $this->cart->updateQty(
$quantity,
@@ -120,10 +124,20 @@ public function updateQuantitiesProvider()
public function testNumberOfProductsInCartIsReportedCorrectlyWhenUpdatingTheirQuantityTwice($first, $second)
{
list($quantity, $operator, $expected, $quantityExpected) = $first;
- $this->testUpdateQuantity($quantity, $operator, $expected, $quantityExpected);
+ $this->testNumberOfProductsInCartIsReportedCorrectlyWhenUpdatingTheirQuantityOnce(
+ $quantity,
+ $operator,
+ $expected,
+ $quantityExpected
+ );
list($quantity, $operator, $expected, $quantityExpected) = $second;
- $this->testUpdateQuantity($quantity, $operator, $expected, $quantityExpected);
+ $this->testNumberOfProductsInCartIsReportedCorrectlyWhenUpdatingTheirQuantityOnce(
+ $quantity,
+ $operator,
+ $expected,
+ $quantityExpected
+ );
}
public function multipleUpdateQuantitiesProvider()
From 4125e19fad47058aa22c743f3c2d7cfce37da6fc Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Mon, 13 Aug 2018 14:19:54 +0200
Subject: [PATCH 11/14] Move HotModuleReplacementPlugin to development env only
---
admin-dev/themes/default/webpack.config.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/admin-dev/themes/default/webpack.config.js b/admin-dev/themes/default/webpack.config.js
index 5cf3e07a0e770..dc703b9f9dec4 100644
--- a/admin-dev/themes/default/webpack.config.js
+++ b/admin-dev/themes/default/webpack.config.js
@@ -74,7 +74,6 @@ const config = {
}]
},
plugins: [
- new webpack.HotModuleReplacementPlugin(),
new ExtractTextPlugin('theme.css'),
]
};
@@ -96,6 +95,8 @@ if (process.env.NODE_ENV === 'production') {
}
})
);
+} else {
+ config.plugins.push(new webpack.HotModuleReplacementPlugin());
}
module.exports = config;
From 2e78a0db2d266b73f2c7ed34520dded3dc34ce77 Mon Sep 17 00:00:00 2001
From: Pierre RAMBAUD
Date: Thu, 23 Aug 2018 11:41:57 +0200
Subject: [PATCH 12/14] Build assets
---
admin-dev/themes/default/public/bundle.js | 760 +-
.../themes/new-theme/public/catalog.bundle.js | 934 +-
.../themes/new-theme/public/email.bundle.js | 2181 +-
.../new-theme/public/geolocation.bundle.js | 841 +-
.../themes/new-theme/public/imports.bundle.js | 1285 +-
.../new-theme/public/invoices.bundle.js | 1247 +-
.../new-theme/public/localization.bundle.js | 740 +-
.../themes/new-theme/public/logs.bundle.js | 1424 +-
.../themes/new-theme/public/main.bundle.js | 61595 +---------------
.../new-theme/public/order_delivery.bundle.js | 863 +-
.../public/order_preferences.bundle.js | 842 +-
.../public/payment_preferences.bundle.js | 846 +-
.../public/product_preferences.bundle.js | 945 +-
.../new-theme/public/sql_manager.bundle.js | 1948 +-
.../themes/new-theme/public/stock.bundle.js | 52077 +------------
admin-dev/themes/new-theme/public/theme.css | 2 +-
.../new-theme/public/translations.bundle.js | 39593 +---------
17 files changed, 1125 insertions(+), 166998 deletions(-)
diff --git a/admin-dev/themes/default/public/bundle.js b/admin-dev/themes/default/public/bundle.js
index 2d3937a2f7394..58887d718e73e 100644
--- a/admin-dev/themes/default/public/bundle.js
+++ b/admin-dev/themes/default/public/bundle.js
@@ -1 +1,759 @@
-!function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=n,t.c=r,t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:e})},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,"a",r),r},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=0)}([function(n,t,r){n.exports=r(1)},function(n,t,r){"use strict";r(2),r(3)},function(n,t){},function(n,t){}]);
\ No newline at end of file
+/******/ (function(modules) { // webpackBootstrap
+/******/ function hotDisposeChunk(chunkId) {
+/******/ delete installedChunks[chunkId];
+/******/ }
+/******/ var parentHotUpdateCallback = window["webpackHotUpdate"];
+/******/ window["webpackHotUpdate"] =
+/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
+/******/ hotAddUpdateChunk(chunkId, moreModules);
+/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
+/******/ } ;
+/******/
+/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
+/******/ var head = document.getElementsByTagName("head")[0];
+/******/ var script = document.createElement("script");
+/******/ script.type = "text/javascript";
+/******/ script.charset = "utf-8";
+/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js";
+/******/ ;
+/******/ head.appendChild(script);
+/******/ }
+/******/
+/******/ function hotDownloadManifest(requestTimeout) { // eslint-disable-line no-unused-vars
+/******/ requestTimeout = requestTimeout || 10000;
+/******/ return new Promise(function(resolve, reject) {
+/******/ if(typeof XMLHttpRequest === "undefined")
+/******/ return reject(new Error("No browser support"));
+/******/ try {
+/******/ var request = new XMLHttpRequest();
+/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json";
+/******/ request.open("GET", requestPath, true);
+/******/ request.timeout = requestTimeout;
+/******/ request.send(null);
+/******/ } catch(err) {
+/******/ return reject(err);
+/******/ }
+/******/ request.onreadystatechange = function() {
+/******/ if(request.readyState !== 4) return;
+/******/ if(request.status === 0) {
+/******/ // timeout
+/******/ reject(new Error("Manifest request to " + requestPath + " timed out."));
+/******/ } else if(request.status === 404) {
+/******/ // no update available
+/******/ resolve();
+/******/ } else if(request.status !== 200 && request.status !== 304) {
+/******/ // other failure
+/******/ reject(new Error("Manifest request to " + requestPath + " failed."));
+/******/ } else {
+/******/ // success
+/******/ try {
+/******/ var update = JSON.parse(request.responseText);
+/******/ } catch(e) {
+/******/ reject(e);
+/******/ return;
+/******/ }
+/******/ resolve(update);
+/******/ }
+/******/ };
+/******/ });
+/******/ }
+/******/
+/******/
+/******/
+/******/ var hotApplyOnUpdate = true;
+/******/ var hotCurrentHash = "7b902bf9a430e66a6ec8"; // eslint-disable-line no-unused-vars
+/******/ var hotRequestTimeout = 10000;
+/******/ var hotCurrentModuleData = {};
+/******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars
+/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
+/******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
+/******/
+/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars
+/******/ var me = installedModules[moduleId];
+/******/ if(!me) return __webpack_require__;
+/******/ var fn = function(request) {
+/******/ if(me.hot.active) {
+/******/ if(installedModules[request]) {
+/******/ if(installedModules[request].parents.indexOf(moduleId) < 0)
+/******/ installedModules[request].parents.push(moduleId);
+/******/ } else {
+/******/ hotCurrentParents = [moduleId];
+/******/ hotCurrentChildModule = request;
+/******/ }
+/******/ if(me.children.indexOf(request) < 0)
+/******/ me.children.push(request);
+/******/ } else {
+/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
+/******/ hotCurrentParents = [];
+/******/ }
+/******/ return __webpack_require__(request);
+/******/ };
+/******/ var ObjectFactory = function ObjectFactory(name) {
+/******/ return {
+/******/ configurable: true,
+/******/ enumerable: true,
+/******/ get: function() {
+/******/ return __webpack_require__[name];
+/******/ },
+/******/ set: function(value) {
+/******/ __webpack_require__[name] = value;
+/******/ }
+/******/ };
+/******/ };
+/******/ for(var name in __webpack_require__) {
+/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== "e") {
+/******/ Object.defineProperty(fn, name, ObjectFactory(name));
+/******/ }
+/******/ }
+/******/ fn.e = function(chunkId) {
+/******/ if(hotStatus === "ready")
+/******/ hotSetStatus("prepare");
+/******/ hotChunksLoading++;
+/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
+/******/ finishChunkLoading();
+/******/ throw err;
+/******/ });
+/******/
+/******/ function finishChunkLoading() {
+/******/ hotChunksLoading--;
+/******/ if(hotStatus === "prepare") {
+/******/ if(!hotWaitingFilesMap[chunkId]) {
+/******/ hotEnsureUpdateChunk(chunkId);
+/******/ }
+/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
+/******/ hotUpdateDownloaded();
+/******/ }
+/******/ }
+/******/ }
+/******/ };
+/******/ return fn;
+/******/ }
+/******/
+/******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars
+/******/ var hot = {
+/******/ // private stuff
+/******/ _acceptedDependencies: {},
+/******/ _declinedDependencies: {},
+/******/ _selfAccepted: false,
+/******/ _selfDeclined: false,
+/******/ _disposeHandlers: [],
+/******/ _main: hotCurrentChildModule !== moduleId,
+/******/
+/******/ // Module API
+/******/ active: true,
+/******/ accept: function(dep, callback) {
+/******/ if(typeof dep === "undefined")
+/******/ hot._selfAccepted = true;
+/******/ else if(typeof dep === "function")
+/******/ hot._selfAccepted = dep;
+/******/ else if(typeof dep === "object")
+/******/ for(var i = 0; i < dep.length; i++)
+/******/ hot._acceptedDependencies[dep[i]] = callback || function() {};
+/******/ else
+/******/ hot._acceptedDependencies[dep] = callback || function() {};
+/******/ },
+/******/ decline: function(dep) {
+/******/ if(typeof dep === "undefined")
+/******/ hot._selfDeclined = true;
+/******/ else if(typeof dep === "object")
+/******/ for(var i = 0; i < dep.length; i++)
+/******/ hot._declinedDependencies[dep[i]] = true;
+/******/ else
+/******/ hot._declinedDependencies[dep] = true;
+/******/ },
+/******/ dispose: function(callback) {
+/******/ hot._disposeHandlers.push(callback);
+/******/ },
+/******/ addDisposeHandler: function(callback) {
+/******/ hot._disposeHandlers.push(callback);
+/******/ },
+/******/ removeDisposeHandler: function(callback) {
+/******/ var idx = hot._disposeHandlers.indexOf(callback);
+/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1);
+/******/ },
+/******/
+/******/ // Management API
+/******/ check: hotCheck,
+/******/ apply: hotApply,
+/******/ status: function(l) {
+/******/ if(!l) return hotStatus;
+/******/ hotStatusHandlers.push(l);
+/******/ },
+/******/ addStatusHandler: function(l) {
+/******/ hotStatusHandlers.push(l);
+/******/ },
+/******/ removeStatusHandler: function(l) {
+/******/ var idx = hotStatusHandlers.indexOf(l);
+/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
+/******/ },
+/******/
+/******/ //inherit from previous dispose call
+/******/ data: hotCurrentModuleData[moduleId]
+/******/ };
+/******/ hotCurrentChildModule = undefined;
+/******/ return hot;
+/******/ }
+/******/
+/******/ var hotStatusHandlers = [];
+/******/ var hotStatus = "idle";
+/******/
+/******/ function hotSetStatus(newStatus) {
+/******/ hotStatus = newStatus;
+/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
+/******/ hotStatusHandlers[i].call(null, newStatus);
+/******/ }
+/******/
+/******/ // while downloading
+/******/ var hotWaitingFiles = 0;
+/******/ var hotChunksLoading = 0;
+/******/ var hotWaitingFilesMap = {};
+/******/ var hotRequestedFilesMap = {};
+/******/ var hotAvailableFilesMap = {};
+/******/ var hotDeferred;
+/******/
+/******/ // The update info
+/******/ var hotUpdate, hotUpdateNewHash;
+/******/
+/******/ function toModuleId(id) {
+/******/ var isNumber = (+id) + "" === id;
+/******/ return isNumber ? +id : id;
+/******/ }
+/******/
+/******/ function hotCheck(apply) {
+/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
+/******/ hotApplyOnUpdate = apply;
+/******/ hotSetStatus("check");
+/******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) {
+/******/ if(!update) {
+/******/ hotSetStatus("idle");
+/******/ return null;
+/******/ }
+/******/ hotRequestedFilesMap = {};
+/******/ hotWaitingFilesMap = {};
+/******/ hotAvailableFilesMap = update.c;
+/******/ hotUpdateNewHash = update.h;
+/******/
+/******/ hotSetStatus("prepare");
+/******/ var promise = new Promise(function(resolve, reject) {
+/******/ hotDeferred = {
+/******/ resolve: resolve,
+/******/ reject: reject
+/******/ };
+/******/ });
+/******/ hotUpdate = {};
+/******/ var chunkId = 0;
+/******/ { // eslint-disable-line no-lone-blocks
+/******/ /*globals chunkId */
+/******/ hotEnsureUpdateChunk(chunkId);
+/******/ }
+/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
+/******/ hotUpdateDownloaded();
+/******/ }
+/******/ return promise;
+/******/ });
+/******/ }
+/******/
+/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
+/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
+/******/ return;
+/******/ hotRequestedFilesMap[chunkId] = false;
+/******/ for(var moduleId in moreModules) {
+/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
+/******/ hotUpdate[moduleId] = moreModules[moduleId];
+/******/ }
+/******/ }
+/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
+/******/ hotUpdateDownloaded();
+/******/ }
+/******/ }
+/******/
+/******/ function hotEnsureUpdateChunk(chunkId) {
+/******/ if(!hotAvailableFilesMap[chunkId]) {
+/******/ hotWaitingFilesMap[chunkId] = true;
+/******/ } else {
+/******/ hotRequestedFilesMap[chunkId] = true;
+/******/ hotWaitingFiles++;
+/******/ hotDownloadUpdateChunk(chunkId);
+/******/ }
+/******/ }
+/******/
+/******/ function hotUpdateDownloaded() {
+/******/ hotSetStatus("ready");
+/******/ var deferred = hotDeferred;
+/******/ hotDeferred = null;
+/******/ if(!deferred) return;
+/******/ if(hotApplyOnUpdate) {
+/******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to
+/******/ // avoid triggering uncaught exception warning in Chrome.
+/******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666
+/******/ Promise.resolve().then(function() {
+/******/ return hotApply(hotApplyOnUpdate);
+/******/ }).then(
+/******/ function(result) {
+/******/ deferred.resolve(result);
+/******/ },
+/******/ function(err) {
+/******/ deferred.reject(err);
+/******/ }
+/******/ );
+/******/ } else {
+/******/ var outdatedModules = [];
+/******/ for(var id in hotUpdate) {
+/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
+/******/ outdatedModules.push(toModuleId(id));
+/******/ }
+/******/ }
+/******/ deferred.resolve(outdatedModules);
+/******/ }
+/******/ }
+/******/
+/******/ function hotApply(options) {
+/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
+/******/ options = options || {};
+/******/
+/******/ var cb;
+/******/ var i;
+/******/ var j;
+/******/ var module;
+/******/ var moduleId;
+/******/
+/******/ function getAffectedStuff(updateModuleId) {
+/******/ var outdatedModules = [updateModuleId];
+/******/ var outdatedDependencies = {};
+/******/
+/******/ var queue = outdatedModules.slice().map(function(id) {
+/******/ return {
+/******/ chain: [id],
+/******/ id: id
+/******/ };
+/******/ });
+/******/ while(queue.length > 0) {
+/******/ var queueItem = queue.pop();
+/******/ var moduleId = queueItem.id;
+/******/ var chain = queueItem.chain;
+/******/ module = installedModules[moduleId];
+/******/ if(!module || module.hot._selfAccepted)
+/******/ continue;
+/******/ if(module.hot._selfDeclined) {
+/******/ return {
+/******/ type: "self-declined",
+/******/ chain: chain,
+/******/ moduleId: moduleId
+/******/ };
+/******/ }
+/******/ if(module.hot._main) {
+/******/ return {
+/******/ type: "unaccepted",
+/******/ chain: chain,
+/******/ moduleId: moduleId
+/******/ };
+/******/ }
+/******/ for(var i = 0; i < module.parents.length; i++) {
+/******/ var parentId = module.parents[i];
+/******/ var parent = installedModules[parentId];
+/******/ if(!parent) continue;
+/******/ if(parent.hot._declinedDependencies[moduleId]) {
+/******/ return {
+/******/ type: "declined",
+/******/ chain: chain.concat([parentId]),
+/******/ moduleId: moduleId,
+/******/ parentId: parentId
+/******/ };
+/******/ }
+/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
+/******/ if(parent.hot._acceptedDependencies[moduleId]) {
+/******/ if(!outdatedDependencies[parentId])
+/******/ outdatedDependencies[parentId] = [];
+/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
+/******/ continue;
+/******/ }
+/******/ delete outdatedDependencies[parentId];
+/******/ outdatedModules.push(parentId);
+/******/ queue.push({
+/******/ chain: chain.concat([parentId]),
+/******/ id: parentId
+/******/ });
+/******/ }
+/******/ }
+/******/
+/******/ return {
+/******/ type: "accepted",
+/******/ moduleId: updateModuleId,
+/******/ outdatedModules: outdatedModules,
+/******/ outdatedDependencies: outdatedDependencies
+/******/ };
+/******/ }
+/******/
+/******/ function addAllToSet(a, b) {
+/******/ for(var i = 0; i < b.length; i++) {
+/******/ var item = b[i];
+/******/ if(a.indexOf(item) < 0)
+/******/ a.push(item);
+/******/ }
+/******/ }
+/******/
+/******/ // at begin all updates modules are outdated
+/******/ // the "outdated" status can propagate to parents if they don't accept the children
+/******/ var outdatedDependencies = {};
+/******/ var outdatedModules = [];
+/******/ var appliedUpdate = {};
+/******/
+/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
+/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
+/******/ };
+/******/
+/******/ for(var id in hotUpdate) {
+/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
+/******/ moduleId = toModuleId(id);
+/******/ var result;
+/******/ if(hotUpdate[id]) {
+/******/ result = getAffectedStuff(moduleId);
+/******/ } else {
+/******/ result = {
+/******/ type: "disposed",
+/******/ moduleId: id
+/******/ };
+/******/ }
+/******/ var abortError = false;
+/******/ var doApply = false;
+/******/ var doDispose = false;
+/******/ var chainInfo = "";
+/******/ if(result.chain) {
+/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
+/******/ }
+/******/ switch(result.type) {
+/******/ case "self-declined":
+/******/ if(options.onDeclined)
+/******/ options.onDeclined(result);
+/******/ if(!options.ignoreDeclined)
+/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
+/******/ break;
+/******/ case "declined":
+/******/ if(options.onDeclined)
+/******/ options.onDeclined(result);
+/******/ if(!options.ignoreDeclined)
+/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
+/******/ break;
+/******/ case "unaccepted":
+/******/ if(options.onUnaccepted)
+/******/ options.onUnaccepted(result);
+/******/ if(!options.ignoreUnaccepted)
+/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
+/******/ break;
+/******/ case "accepted":
+/******/ if(options.onAccepted)
+/******/ options.onAccepted(result);
+/******/ doApply = true;
+/******/ break;
+/******/ case "disposed":
+/******/ if(options.onDisposed)
+/******/ options.onDisposed(result);
+/******/ doDispose = true;
+/******/ break;
+/******/ default:
+/******/ throw new Error("Unexception type " + result.type);
+/******/ }
+/******/ if(abortError) {
+/******/ hotSetStatus("abort");
+/******/ return Promise.reject(abortError);
+/******/ }
+/******/ if(doApply) {
+/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
+/******/ addAllToSet(outdatedModules, result.outdatedModules);
+/******/ for(moduleId in result.outdatedDependencies) {
+/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
+/******/ if(!outdatedDependencies[moduleId])
+/******/ outdatedDependencies[moduleId] = [];
+/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
+/******/ }
+/******/ }
+/******/ }
+/******/ if(doDispose) {
+/******/ addAllToSet(outdatedModules, [result.moduleId]);
+/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
+/******/ }
+/******/ }
+/******/ }
+/******/
+/******/ // Store self accepted outdated modules to require them later by the module system
+/******/ var outdatedSelfAcceptedModules = [];
+/******/ for(i = 0; i < outdatedModules.length; i++) {
+/******/ moduleId = outdatedModules[i];
+/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
+/******/ outdatedSelfAcceptedModules.push({
+/******/ module: moduleId,
+/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
+/******/ });
+/******/ }
+/******/
+/******/ // Now in "dispose" phase
+/******/ hotSetStatus("dispose");
+/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
+/******/ if(hotAvailableFilesMap[chunkId] === false) {
+/******/ hotDisposeChunk(chunkId);
+/******/ }
+/******/ });
+/******/
+/******/ var idx;
+/******/ var queue = outdatedModules.slice();
+/******/ while(queue.length > 0) {
+/******/ moduleId = queue.pop();
+/******/ module = installedModules[moduleId];
+/******/ if(!module) continue;
+/******/
+/******/ var data = {};
+/******/
+/******/ // Call dispose handlers
+/******/ var disposeHandlers = module.hot._disposeHandlers;
+/******/ for(j = 0; j < disposeHandlers.length; j++) {
+/******/ cb = disposeHandlers[j];
+/******/ cb(data);
+/******/ }
+/******/ hotCurrentModuleData[moduleId] = data;
+/******/
+/******/ // disable module (this disables requires from this module)
+/******/ module.hot.active = false;
+/******/
+/******/ // remove module from cache
+/******/ delete installedModules[moduleId];
+/******/
+/******/ // when disposing there is no need to call dispose handler
+/******/ delete outdatedDependencies[moduleId];
+/******/
+/******/ // remove "parents" references from all children
+/******/ for(j = 0; j < module.children.length; j++) {
+/******/ var child = installedModules[module.children[j]];
+/******/ if(!child) continue;
+/******/ idx = child.parents.indexOf(moduleId);
+/******/ if(idx >= 0) {
+/******/ child.parents.splice(idx, 1);
+/******/ }
+/******/ }
+/******/ }
+/******/
+/******/ // remove outdated dependency from module children
+/******/ var dependency;
+/******/ var moduleOutdatedDependencies;
+/******/ for(moduleId in outdatedDependencies) {
+/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
+/******/ module = installedModules[moduleId];
+/******/ if(module) {
+/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
+/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
+/******/ dependency = moduleOutdatedDependencies[j];
+/******/ idx = module.children.indexOf(dependency);
+/******/ if(idx >= 0) module.children.splice(idx, 1);
+/******/ }
+/******/ }
+/******/ }
+/******/ }
+/******/
+/******/ // Not in "apply" phase
+/******/ hotSetStatus("apply");
+/******/
+/******/ hotCurrentHash = hotUpdateNewHash;
+/******/
+/******/ // insert new code
+/******/ for(moduleId in appliedUpdate) {
+/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
+/******/ modules[moduleId] = appliedUpdate[moduleId];
+/******/ }
+/******/ }
+/******/
+/******/ // call accept handlers
+/******/ var error = null;
+/******/ for(moduleId in outdatedDependencies) {
+/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
+/******/ module = installedModules[moduleId];
+/******/ if(module) {
+/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
+/******/ var callbacks = [];
+/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
+/******/ dependency = moduleOutdatedDependencies[i];
+/******/ cb = module.hot._acceptedDependencies[dependency];
+/******/ if(cb) {
+/******/ if(callbacks.indexOf(cb) >= 0) continue;
+/******/ callbacks.push(cb);
+/******/ }
+/******/ }
+/******/ for(i = 0; i < callbacks.length; i++) {
+/******/ cb = callbacks[i];
+/******/ try {
+/******/ cb(moduleOutdatedDependencies);
+/******/ } catch(err) {
+/******/ if(options.onErrored) {
+/******/ options.onErrored({
+/******/ type: "accept-errored",
+/******/ moduleId: moduleId,
+/******/ dependencyId: moduleOutdatedDependencies[i],
+/******/ error: err
+/******/ });
+/******/ }
+/******/ if(!options.ignoreErrored) {
+/******/ if(!error)
+/******/ error = err;
+/******/ }
+/******/ }
+/******/ }
+/******/ }
+/******/ }
+/******/ }
+/******/
+/******/ // Load self accepted modules
+/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
+/******/ var item = outdatedSelfAcceptedModules[i];
+/******/ moduleId = item.module;
+/******/ hotCurrentParents = [moduleId];
+/******/ try {
+/******/ __webpack_require__(moduleId);
+/******/ } catch(err) {
+/******/ if(typeof item.errorHandler === "function") {
+/******/ try {
+/******/ item.errorHandler(err);
+/******/ } catch(err2) {
+/******/ if(options.onErrored) {
+/******/ options.onErrored({
+/******/ type: "self-accept-error-handler-errored",
+/******/ moduleId: moduleId,
+/******/ error: err2,
+/******/ orginalError: err, // TODO remove in webpack 4
+/******/ originalError: err
+/******/ });
+/******/ }
+/******/ if(!options.ignoreErrored) {
+/******/ if(!error)
+/******/ error = err2;
+/******/ }
+/******/ if(!error)
+/******/ error = err;
+/******/ }
+/******/ } else {
+/******/ if(options.onErrored) {
+/******/ options.onErrored({
+/******/ type: "self-accept-errored",
+/******/ moduleId: moduleId,
+/******/ error: err
+/******/ });
+/******/ }
+/******/ if(!options.ignoreErrored) {
+/******/ if(!error)
+/******/ error = err;
+/******/ }
+/******/ }
+/******/ }
+/******/ }
+/******/
+/******/ // handle errors in accept handlers and self accepted module load
+/******/ if(error) {
+/******/ hotSetStatus("fail");
+/******/ return Promise.reject(error);
+/******/ }
+/******/
+/******/ hotSetStatus("idle");
+/******/ return new Promise(function(resolve) {
+/******/ resolve(outdatedModules);
+/******/ });
+/******/ }
+/******/
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {},
+/******/ hot: hotCreateModule(moduleId),
+/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
+/******/ children: []
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, {
+/******/ configurable: false,
+/******/ enumerable: true,
+/******/ get: getter
+/******/ });
+/******/ }
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // __webpack_hash__
+/******/ __webpack_require__.h = function() { return hotCurrentHash; };
+/******/
+/******/ // Load entry module and return exports
+/******/ return hotCreateRequire(0)(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(1);
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+__webpack_require__(2);
+
+__webpack_require__(3);
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports) {
+
+// removed by extract-text-webpack-plugin
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports) {
+
+// removed by extract-text-webpack-plugin
+
+/***/ })
+/******/ ]);
\ No newline at end of file
diff --git a/admin-dev/themes/new-theme/public/catalog.bundle.js b/admin-dev/themes/new-theme/public/catalog.bundle.js
index c96f9ff54dd88..20c1b7974d1c8 100644
--- a/admin-dev/themes/new-theme/public/catalog.bundle.js
+++ b/admin-dev/themes/new-theme/public/catalog.bundle.js
@@ -1,933 +1,3 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ function hotDisposeChunk(chunkId) {
-/******/ delete installedChunks[chunkId];
-/******/ }
-/******/ var parentHotUpdateCallback = this["webpackHotUpdate"];
-/******/ this["webpackHotUpdate"] =
-/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ hotAddUpdateChunk(chunkId, moreModules);
-/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
-/******/ } ;
-/******/
-/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
-/******/ var head = document.getElementsByTagName("head")[0];
-/******/ var script = document.createElement("script");
-/******/ script.type = "text/javascript";
-/******/ script.charset = "utf-8";
-/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js";
-/******/ head.appendChild(script);
-/******/ }
-/******/
-/******/ function hotDownloadManifest() { // eslint-disable-line no-unused-vars
-/******/ return new Promise(function(resolve, reject) {
-/******/ if(typeof XMLHttpRequest === "undefined")
-/******/ return reject(new Error("No browser support"));
-/******/ try {
-/******/ var request = new XMLHttpRequest();
-/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json";
-/******/ request.open("GET", requestPath, true);
-/******/ request.timeout = 10000;
-/******/ request.send(null);
-/******/ } catch(err) {
-/******/ return reject(err);
-/******/ }
-/******/ request.onreadystatechange = function() {
-/******/ if(request.readyState !== 4) return;
-/******/ if(request.status === 0) {
-/******/ // timeout
-/******/ reject(new Error("Manifest request to " + requestPath + " timed out."));
-/******/ } else if(request.status === 404) {
-/******/ // no update available
-/******/ resolve();
-/******/ } else if(request.status !== 200 && request.status !== 304) {
-/******/ // other failure
-/******/ reject(new Error("Manifest request to " + requestPath + " failed."));
-/******/ } else {
-/******/ // success
-/******/ try {
-/******/ var update = JSON.parse(request.responseText);
-/******/ } catch(e) {
-/******/ reject(e);
-/******/ return;
-/******/ }
-/******/ resolve(update);
-/******/ }
-/******/ };
-/******/ });
-/******/ }
+/******/!function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}// webpackBootstrap
/******/
-/******/
-/******/
-/******/ var hotApplyOnUpdate = true;
-/******/ var hotCurrentHash = "ad45789801c39aad8ed7"; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentModuleData = {};
-/******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
-/******/
-/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars
-/******/ var me = installedModules[moduleId];
-/******/ if(!me) return __webpack_require__;
-/******/ var fn = function(request) {
-/******/ if(me.hot.active) {
-/******/ if(installedModules[request]) {
-/******/ if(installedModules[request].parents.indexOf(moduleId) < 0)
-/******/ installedModules[request].parents.push(moduleId);
-/******/ } else {
-/******/ hotCurrentParents = [moduleId];
-/******/ hotCurrentChildModule = request;
-/******/ }
-/******/ if(me.children.indexOf(request) < 0)
-/******/ me.children.push(request);
-/******/ } else {
-/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
-/******/ hotCurrentParents = [];
-/******/ }
-/******/ return __webpack_require__(request);
-/******/ };
-/******/ var ObjectFactory = function ObjectFactory(name) {
-/******/ return {
-/******/ configurable: true,
-/******/ enumerable: true,
-/******/ get: function() {
-/******/ return __webpack_require__[name];
-/******/ },
-/******/ set: function(value) {
-/******/ __webpack_require__[name] = value;
-/******/ }
-/******/ };
-/******/ };
-/******/ for(var name in __webpack_require__) {
-/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== "e") {
-/******/ Object.defineProperty(fn, name, ObjectFactory(name));
-/******/ }
-/******/ }
-/******/ fn.e = function(chunkId) {
-/******/ if(hotStatus === "ready")
-/******/ hotSetStatus("prepare");
-/******/ hotChunksLoading++;
-/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
-/******/ finishChunkLoading();
-/******/ throw err;
-/******/ });
-/******/
-/******/ function finishChunkLoading() {
-/******/ hotChunksLoading--;
-/******/ if(hotStatus === "prepare") {
-/******/ if(!hotWaitingFilesMap[chunkId]) {
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/ }
-/******/ };
-/******/ return fn;
-/******/ }
-/******/
-/******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars
-/******/ var hot = {
-/******/ // private stuff
-/******/ _acceptedDependencies: {},
-/******/ _declinedDependencies: {},
-/******/ _selfAccepted: false,
-/******/ _selfDeclined: false,
-/******/ _disposeHandlers: [],
-/******/ _main: hotCurrentChildModule !== moduleId,
-/******/
-/******/ // Module API
-/******/ active: true,
-/******/ accept: function(dep, callback) {
-/******/ if(typeof dep === "undefined")
-/******/ hot._selfAccepted = true;
-/******/ else if(typeof dep === "function")
-/******/ hot._selfAccepted = dep;
-/******/ else if(typeof dep === "object")
-/******/ for(var i = 0; i < dep.length; i++)
-/******/ hot._acceptedDependencies[dep[i]] = callback || function() {};
-/******/ else
-/******/ hot._acceptedDependencies[dep] = callback || function() {};
-/******/ },
-/******/ decline: function(dep) {
-/******/ if(typeof dep === "undefined")
-/******/ hot._selfDeclined = true;
-/******/ else if(typeof dep === "object")
-/******/ for(var i = 0; i < dep.length; i++)
-/******/ hot._declinedDependencies[dep[i]] = true;
-/******/ else
-/******/ hot._declinedDependencies[dep] = true;
-/******/ },
-/******/ dispose: function(callback) {
-/******/ hot._disposeHandlers.push(callback);
-/******/ },
-/******/ addDisposeHandler: function(callback) {
-/******/ hot._disposeHandlers.push(callback);
-/******/ },
-/******/ removeDisposeHandler: function(callback) {
-/******/ var idx = hot._disposeHandlers.indexOf(callback);
-/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ // Management API
-/******/ check: hotCheck,
-/******/ apply: hotApply,
-/******/ status: function(l) {
-/******/ if(!l) return hotStatus;
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ addStatusHandler: function(l) {
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ removeStatusHandler: function(l) {
-/******/ var idx = hotStatusHandlers.indexOf(l);
-/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ //inherit from previous dispose call
-/******/ data: hotCurrentModuleData[moduleId]
-/******/ };
-/******/ hotCurrentChildModule = undefined;
-/******/ return hot;
-/******/ }
-/******/
-/******/ var hotStatusHandlers = [];
-/******/ var hotStatus = "idle";
-/******/
-/******/ function hotSetStatus(newStatus) {
-/******/ hotStatus = newStatus;
-/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
-/******/ hotStatusHandlers[i].call(null, newStatus);
-/******/ }
-/******/
-/******/ // while downloading
-/******/ var hotWaitingFiles = 0;
-/******/ var hotChunksLoading = 0;
-/******/ var hotWaitingFilesMap = {};
-/******/ var hotRequestedFilesMap = {};
-/******/ var hotAvailableFilesMap = {};
-/******/ var hotDeferred;
-/******/
-/******/ // The update info
-/******/ var hotUpdate, hotUpdateNewHash;
-/******/
-/******/ function toModuleId(id) {
-/******/ var isNumber = (+id) + "" === id;
-/******/ return isNumber ? +id : id;
-/******/ }
-/******/
-/******/ function hotCheck(apply) {
-/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
-/******/ hotApplyOnUpdate = apply;
-/******/ hotSetStatus("check");
-/******/ return hotDownloadManifest().then(function(update) {
-/******/ if(!update) {
-/******/ hotSetStatus("idle");
-/******/ return null;
-/******/ }
-/******/ hotRequestedFilesMap = {};
-/******/ hotWaitingFilesMap = {};
-/******/ hotAvailableFilesMap = update.c;
-/******/ hotUpdateNewHash = update.h;
-/******/
-/******/ hotSetStatus("prepare");
-/******/ var promise = new Promise(function(resolve, reject) {
-/******/ hotDeferred = {
-/******/ resolve: resolve,
-/******/ reject: reject
-/******/ };
-/******/ });
-/******/ hotUpdate = {};
-/******/ var chunkId = 10;
-/******/ { // eslint-disable-line no-lone-blocks
-/******/ /*globals chunkId */
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ return promise;
-/******/ });
-/******/ }
-/******/
-/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
-/******/ return;
-/******/ hotRequestedFilesMap[chunkId] = false;
-/******/ for(var moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ hotUpdate[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/
-/******/ function hotEnsureUpdateChunk(chunkId) {
-/******/ if(!hotAvailableFilesMap[chunkId]) {
-/******/ hotWaitingFilesMap[chunkId] = true;
-/******/ } else {
-/******/ hotRequestedFilesMap[chunkId] = true;
-/******/ hotWaitingFiles++;
-/******/ hotDownloadUpdateChunk(chunkId);
-/******/ }
-/******/ }
-/******/
-/******/ function hotUpdateDownloaded() {
-/******/ hotSetStatus("ready");
-/******/ var deferred = hotDeferred;
-/******/ hotDeferred = null;
-/******/ if(!deferred) return;
-/******/ if(hotApplyOnUpdate) {
-/******/ hotApply(hotApplyOnUpdate).then(function(result) {
-/******/ deferred.resolve(result);
-/******/ }, function(err) {
-/******/ deferred.reject(err);
-/******/ });
-/******/ } else {
-/******/ var outdatedModules = [];
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ outdatedModules.push(toModuleId(id));
-/******/ }
-/******/ }
-/******/ deferred.resolve(outdatedModules);
-/******/ }
-/******/ }
-/******/
-/******/ function hotApply(options) {
-/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
-/******/ options = options || {};
-/******/
-/******/ var cb;
-/******/ var i;
-/******/ var j;
-/******/ var module;
-/******/ var moduleId;
-/******/
-/******/ function getAffectedStuff(updateModuleId) {
-/******/ var outdatedModules = [updateModuleId];
-/******/ var outdatedDependencies = {};
-/******/
-/******/ var queue = outdatedModules.slice().map(function(id) {
-/******/ return {
-/******/ chain: [id],
-/******/ id: id
-/******/ };
-/******/ });
-/******/ while(queue.length > 0) {
-/******/ var queueItem = queue.pop();
-/******/ var moduleId = queueItem.id;
-/******/ var chain = queueItem.chain;
-/******/ module = installedModules[moduleId];
-/******/ if(!module || module.hot._selfAccepted)
-/******/ continue;
-/******/ if(module.hot._selfDeclined) {
-/******/ return {
-/******/ type: "self-declined",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ if(module.hot._main) {
-/******/ return {
-/******/ type: "unaccepted",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ for(var i = 0; i < module.parents.length; i++) {
-/******/ var parentId = module.parents[i];
-/******/ var parent = installedModules[parentId];
-/******/ if(!parent) continue;
-/******/ if(parent.hot._declinedDependencies[moduleId]) {
-/******/ return {
-/******/ type: "declined",
-/******/ chain: chain.concat([parentId]),
-/******/ moduleId: moduleId,
-/******/ parentId: parentId
-/******/ };
-/******/ }
-/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
-/******/ if(parent.hot._acceptedDependencies[moduleId]) {
-/******/ if(!outdatedDependencies[parentId])
-/******/ outdatedDependencies[parentId] = [];
-/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
-/******/ continue;
-/******/ }
-/******/ delete outdatedDependencies[parentId];
-/******/ outdatedModules.push(parentId);
-/******/ queue.push({
-/******/ chain: chain.concat([parentId]),
-/******/ id: parentId
-/******/ });
-/******/ }
-/******/ }
-/******/
-/******/ return {
-/******/ type: "accepted",
-/******/ moduleId: updateModuleId,
-/******/ outdatedModules: outdatedModules,
-/******/ outdatedDependencies: outdatedDependencies
-/******/ };
-/******/ }
-/******/
-/******/ function addAllToSet(a, b) {
-/******/ for(var i = 0; i < b.length; i++) {
-/******/ var item = b[i];
-/******/ if(a.indexOf(item) < 0)
-/******/ a.push(item);
-/******/ }
-/******/ }
-/******/
-/******/ // at begin all updates modules are outdated
-/******/ // the "outdated" status can propagate to parents if they don't accept the children
-/******/ var outdatedDependencies = {};
-/******/ var outdatedModules = [];
-/******/ var appliedUpdate = {};
-/******/
-/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
-/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
-/******/ };
-/******/
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ moduleId = toModuleId(id);
-/******/ var result;
-/******/ if(hotUpdate[id]) {
-/******/ result = getAffectedStuff(moduleId);
-/******/ } else {
-/******/ result = {
-/******/ type: "disposed",
-/******/ moduleId: id
-/******/ };
-/******/ }
-/******/ var abortError = false;
-/******/ var doApply = false;
-/******/ var doDispose = false;
-/******/ var chainInfo = "";
-/******/ if(result.chain) {
-/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
-/******/ }
-/******/ switch(result.type) {
-/******/ case "self-declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
-/******/ break;
-/******/ case "declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
-/******/ break;
-/******/ case "unaccepted":
-/******/ if(options.onUnaccepted)
-/******/ options.onUnaccepted(result);
-/******/ if(!options.ignoreUnaccepted)
-/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
-/******/ break;
-/******/ case "accepted":
-/******/ if(options.onAccepted)
-/******/ options.onAccepted(result);
-/******/ doApply = true;
-/******/ break;
-/******/ case "disposed":
-/******/ if(options.onDisposed)
-/******/ options.onDisposed(result);
-/******/ doDispose = true;
-/******/ break;
-/******/ default:
-/******/ throw new Error("Unexception type " + result.type);
-/******/ }
-/******/ if(abortError) {
-/******/ hotSetStatus("abort");
-/******/ return Promise.reject(abortError);
-/******/ }
-/******/ if(doApply) {
-/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
-/******/ addAllToSet(outdatedModules, result.outdatedModules);
-/******/ for(moduleId in result.outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
-/******/ if(!outdatedDependencies[moduleId])
-/******/ outdatedDependencies[moduleId] = [];
-/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
-/******/ }
-/******/ }
-/******/ }
-/******/ if(doDispose) {
-/******/ addAllToSet(outdatedModules, [result.moduleId]);
-/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Store self accepted outdated modules to require them later by the module system
-/******/ var outdatedSelfAcceptedModules = [];
-/******/ for(i = 0; i < outdatedModules.length; i++) {
-/******/ moduleId = outdatedModules[i];
-/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
-/******/ outdatedSelfAcceptedModules.push({
-/******/ module: moduleId,
-/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
-/******/ });
-/******/ }
-/******/
-/******/ // Now in "dispose" phase
-/******/ hotSetStatus("dispose");
-/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
-/******/ if(hotAvailableFilesMap[chunkId] === false) {
-/******/ hotDisposeChunk(chunkId);
-/******/ }
-/******/ });
-/******/
-/******/ var idx;
-/******/ var queue = outdatedModules.slice();
-/******/ while(queue.length > 0) {
-/******/ moduleId = queue.pop();
-/******/ module = installedModules[moduleId];
-/******/ if(!module) continue;
-/******/
-/******/ var data = {};
-/******/
-/******/ // Call dispose handlers
-/******/ var disposeHandlers = module.hot._disposeHandlers;
-/******/ for(j = 0; j < disposeHandlers.length; j++) {
-/******/ cb = disposeHandlers[j];
-/******/ cb(data);
-/******/ }
-/******/ hotCurrentModuleData[moduleId] = data;
-/******/
-/******/ // disable module (this disables requires from this module)
-/******/ module.hot.active = false;
-/******/
-/******/ // remove module from cache
-/******/ delete installedModules[moduleId];
-/******/
-/******/ // remove "parents" references from all children
-/******/ for(j = 0; j < module.children.length; j++) {
-/******/ var child = installedModules[module.children[j]];
-/******/ if(!child) continue;
-/******/ idx = child.parents.indexOf(moduleId);
-/******/ if(idx >= 0) {
-/******/ child.parents.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // remove outdated dependency from module children
-/******/ var dependency;
-/******/ var moduleOutdatedDependencies;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
-/******/ dependency = moduleOutdatedDependencies[j];
-/******/ idx = module.children.indexOf(dependency);
-/******/ if(idx >= 0) module.children.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Not in "apply" phase
-/******/ hotSetStatus("apply");
-/******/
-/******/ hotCurrentHash = hotUpdateNewHash;
-/******/
-/******/ // insert new code
-/******/ for(moduleId in appliedUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
-/******/ modules[moduleId] = appliedUpdate[moduleId];
-/******/ }
-/******/ }
-/******/
-/******/ // call accept handlers
-/******/ var error = null;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ var callbacks = [];
-/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
-/******/ dependency = moduleOutdatedDependencies[i];
-/******/ cb = module.hot._acceptedDependencies[dependency];
-/******/ if(callbacks.indexOf(cb) >= 0) continue;
-/******/ callbacks.push(cb);
-/******/ }
-/******/ for(i = 0; i < callbacks.length; i++) {
-/******/ cb = callbacks[i];
-/******/ try {
-/******/ cb(moduleOutdatedDependencies);
-/******/ } catch(err) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "accept-errored",
-/******/ moduleId: moduleId,
-/******/ dependencyId: moduleOutdatedDependencies[i],
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Load self accepted modules
-/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
-/******/ var item = outdatedSelfAcceptedModules[i];
-/******/ moduleId = item.module;
-/******/ hotCurrentParents = [moduleId];
-/******/ try {
-/******/ __webpack_require__(moduleId);
-/******/ } catch(err) {
-/******/ if(typeof item.errorHandler === "function") {
-/******/ try {
-/******/ item.errorHandler(err);
-/******/ } catch(err2) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-error-handler-errored",
-/******/ moduleId: moduleId,
-/******/ error: err2,
-/******/ orginalError: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err2;
-/******/ }
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ } else {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-errored",
-/******/ moduleId: moduleId,
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // handle errors in accept handlers and self accepted module load
-/******/ if(error) {
-/******/ hotSetStatus("fail");
-/******/ return Promise.reject(error);
-/******/ }
-/******/
-/******/ hotSetStatus("idle");
-/******/ return new Promise(function(resolve) {
-/******/ resolve(outdatedModules);
-/******/ });
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {},
-/******/ hot: hotCreateModule(moduleId),
-/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
-/******/ children: []
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // identity function for calling harmony imports with the correct context
-/******/ __webpack_require__.i = function(value) { return value; };
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // __webpack_hash__
-/******/ __webpack_require__.h = function() { return hotCurrentHash; };
-/******/
-/******/ // Load entry module and return exports
-/******/ return hotCreateRequire(459)(__webpack_require__.s = 459);
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 16:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2017 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2017 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = global.$;
-
-/**
- * Makes a table sortable by columns.
- * This forces a page reload with more query parameters.
- */
-
-var TableSorting = function () {
-
- /**
- * @param {jQuery} table
- */
- function TableSorting(table) {
- _classCallCheck(this, TableSorting);
-
- this.selector = '.ps-sortable-column';
- this.columns = $(table).find(this.selector);
- }
-
- /**
- * Attaches the listeners
- */
-
-
- _createClass(TableSorting, [{
- key: 'attach',
- value: function attach() {
- var _this = this;
-
- this.columns.on('click', function (e) {
- var $column = $(e.delegateTarget);
- _this._sortByColumn($column, _this._getToggledSortDirection($column));
- });
- }
-
- /**
- * Sort using a column name
- * @param {string} columnName
- * @param {string} direction "asc" or "desc"
- */
-
- }, {
- key: 'sortBy',
- value: function sortBy(columnName, direction) {
- var $column = this.columns.is('[data-sort-col-name="' + columnName + '"]');
- if (!$column) {
- throw new Error('Cannot sort by "' + columnName + '": invalid column');
- }
-
- this._sortByColumn($column, direction);
- }
-
- /**
- * Sort using a column element
- * @param {jQuery} column
- * @param {string} direction "asc" or "desc"
- * @private
- */
-
- }, {
- key: '_sortByColumn',
- value: function _sortByColumn(column, direction) {
- window.location = this._getUrl(column.data('sortColName'), direction === 'desc' ? 'desc' : 'asc');
- }
-
- /**
- * Returns the inverted direction to sort according to the column's current one
- * @param {jQuery} column
- * @return {string}
- * @private
- */
-
- }, {
- key: '_getToggledSortDirection',
- value: function _getToggledSortDirection(column) {
- return column.data('sortDirection') === 'asc' ? 'desc' : 'asc';
- }
-
- /**
- * Returns the url for the sorted table
- * @param {string} colName
- * @param {string} direction
- * @return {string}
- * @private
- */
-
- }, {
- key: '_getUrl',
- value: function _getUrl(colName, direction) {
- var url = new URL(window.location.href);
- var params = url.searchParams;
-
- params.set('orderBy', colName);
- params.set('sortOrder', direction);
-
- return url.toString();
- }
- }]);
-
- return TableSorting;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (TableSorting);
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2)))
-
-/***/ }),
-
-/***/ 2:
-/***/ (function(module, exports) {
-
-var g;
-
-// This works in non-strict mode
-g = (function() {
- return this;
-})();
-
-try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
-} catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
-
-/***/ }),
-
-/***/ 230:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_table_sorting__ = __webpack_require__(16);
-/*
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- *
- */
-
-
-
-var $ = global.$;
-
-$(function () {
- new __WEBPACK_IMPORTED_MODULE_0__utils_table_sorting__["a" /* default */]($('table.table')).attach();
-});
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2)))
-
-/***/ }),
-
-/***/ 459:
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(230);
-
-
-/***/ })
-
-/******/ });
\ No newline at end of file
+var e={};n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=374)}({185:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(t){var n=e(8),r=t.$;r(function(){new n.a(r("table.table")).attach()})}.call(n,e(2))},2:function(t,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},374:function(t,n,e){t.exports=e(185)},8:function(t,n,e){"use strict";(function(t){function e(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,n){for(var e=0;e= 0) hot._disposeHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ // Management API
-/******/ check: hotCheck,
-/******/ apply: hotApply,
-/******/ status: function(l) {
-/******/ if(!l) return hotStatus;
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ addStatusHandler: function(l) {
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ removeStatusHandler: function(l) {
-/******/ var idx = hotStatusHandlers.indexOf(l);
-/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ //inherit from previous dispose call
-/******/ data: hotCurrentModuleData[moduleId]
-/******/ };
-/******/ hotCurrentChildModule = undefined;
-/******/ return hot;
-/******/ }
-/******/
-/******/ var hotStatusHandlers = [];
-/******/ var hotStatus = "idle";
-/******/
-/******/ function hotSetStatus(newStatus) {
-/******/ hotStatus = newStatus;
-/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
-/******/ hotStatusHandlers[i].call(null, newStatus);
-/******/ }
-/******/
-/******/ // while downloading
-/******/ var hotWaitingFiles = 0;
-/******/ var hotChunksLoading = 0;
-/******/ var hotWaitingFilesMap = {};
-/******/ var hotRequestedFilesMap = {};
-/******/ var hotAvailableFilesMap = {};
-/******/ var hotDeferred;
-/******/
-/******/ // The update info
-/******/ var hotUpdate, hotUpdateNewHash;
-/******/
-/******/ function toModuleId(id) {
-/******/ var isNumber = (+id) + "" === id;
-/******/ return isNumber ? +id : id;
-/******/ }
-/******/
-/******/ function hotCheck(apply) {
-/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
-/******/ hotApplyOnUpdate = apply;
-/******/ hotSetStatus("check");
-/******/ return hotDownloadManifest().then(function(update) {
-/******/ if(!update) {
-/******/ hotSetStatus("idle");
-/******/ return null;
-/******/ }
-/******/ hotRequestedFilesMap = {};
-/******/ hotWaitingFilesMap = {};
-/******/ hotAvailableFilesMap = update.c;
-/******/ hotUpdateNewHash = update.h;
-/******/
-/******/ hotSetStatus("prepare");
-/******/ var promise = new Promise(function(resolve, reject) {
-/******/ hotDeferred = {
-/******/ resolve: resolve,
-/******/ reject: reject
-/******/ };
-/******/ });
-/******/ hotUpdate = {};
-/******/ var chunkId = 3;
-/******/ { // eslint-disable-line no-lone-blocks
-/******/ /*globals chunkId */
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ return promise;
-/******/ });
-/******/ }
-/******/
-/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
-/******/ return;
-/******/ hotRequestedFilesMap[chunkId] = false;
-/******/ for(var moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ hotUpdate[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/
-/******/ function hotEnsureUpdateChunk(chunkId) {
-/******/ if(!hotAvailableFilesMap[chunkId]) {
-/******/ hotWaitingFilesMap[chunkId] = true;
-/******/ } else {
-/******/ hotRequestedFilesMap[chunkId] = true;
-/******/ hotWaitingFiles++;
-/******/ hotDownloadUpdateChunk(chunkId);
-/******/ }
-/******/ }
-/******/
-/******/ function hotUpdateDownloaded() {
-/******/ hotSetStatus("ready");
-/******/ var deferred = hotDeferred;
-/******/ hotDeferred = null;
-/******/ if(!deferred) return;
-/******/ if(hotApplyOnUpdate) {
-/******/ hotApply(hotApplyOnUpdate).then(function(result) {
-/******/ deferred.resolve(result);
-/******/ }, function(err) {
-/******/ deferred.reject(err);
-/******/ });
-/******/ } else {
-/******/ var outdatedModules = [];
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ outdatedModules.push(toModuleId(id));
-/******/ }
-/******/ }
-/******/ deferred.resolve(outdatedModules);
-/******/ }
-/******/ }
-/******/
-/******/ function hotApply(options) {
-/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
-/******/ options = options || {};
-/******/
-/******/ var cb;
-/******/ var i;
-/******/ var j;
-/******/ var module;
-/******/ var moduleId;
-/******/
-/******/ function getAffectedStuff(updateModuleId) {
-/******/ var outdatedModules = [updateModuleId];
-/******/ var outdatedDependencies = {};
-/******/
-/******/ var queue = outdatedModules.slice().map(function(id) {
-/******/ return {
-/******/ chain: [id],
-/******/ id: id
-/******/ };
-/******/ });
-/******/ while(queue.length > 0) {
-/******/ var queueItem = queue.pop();
-/******/ var moduleId = queueItem.id;
-/******/ var chain = queueItem.chain;
-/******/ module = installedModules[moduleId];
-/******/ if(!module || module.hot._selfAccepted)
-/******/ continue;
-/******/ if(module.hot._selfDeclined) {
-/******/ return {
-/******/ type: "self-declined",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ if(module.hot._main) {
-/******/ return {
-/******/ type: "unaccepted",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ for(var i = 0; i < module.parents.length; i++) {
-/******/ var parentId = module.parents[i];
-/******/ var parent = installedModules[parentId];
-/******/ if(!parent) continue;
-/******/ if(parent.hot._declinedDependencies[moduleId]) {
-/******/ return {
-/******/ type: "declined",
-/******/ chain: chain.concat([parentId]),
-/******/ moduleId: moduleId,
-/******/ parentId: parentId
-/******/ };
-/******/ }
-/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
-/******/ if(parent.hot._acceptedDependencies[moduleId]) {
-/******/ if(!outdatedDependencies[parentId])
-/******/ outdatedDependencies[parentId] = [];
-/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
-/******/ continue;
-/******/ }
-/******/ delete outdatedDependencies[parentId];
-/******/ outdatedModules.push(parentId);
-/******/ queue.push({
-/******/ chain: chain.concat([parentId]),
-/******/ id: parentId
-/******/ });
-/******/ }
-/******/ }
-/******/
-/******/ return {
-/******/ type: "accepted",
-/******/ moduleId: updateModuleId,
-/******/ outdatedModules: outdatedModules,
-/******/ outdatedDependencies: outdatedDependencies
-/******/ };
-/******/ }
-/******/
-/******/ function addAllToSet(a, b) {
-/******/ for(var i = 0; i < b.length; i++) {
-/******/ var item = b[i];
-/******/ if(a.indexOf(item) < 0)
-/******/ a.push(item);
-/******/ }
-/******/ }
-/******/
-/******/ // at begin all updates modules are outdated
-/******/ // the "outdated" status can propagate to parents if they don't accept the children
-/******/ var outdatedDependencies = {};
-/******/ var outdatedModules = [];
-/******/ var appliedUpdate = {};
-/******/
-/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
-/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
-/******/ };
-/******/
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ moduleId = toModuleId(id);
-/******/ var result;
-/******/ if(hotUpdate[id]) {
-/******/ result = getAffectedStuff(moduleId);
-/******/ } else {
-/******/ result = {
-/******/ type: "disposed",
-/******/ moduleId: id
-/******/ };
-/******/ }
-/******/ var abortError = false;
-/******/ var doApply = false;
-/******/ var doDispose = false;
-/******/ var chainInfo = "";
-/******/ if(result.chain) {
-/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
-/******/ }
-/******/ switch(result.type) {
-/******/ case "self-declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
-/******/ break;
-/******/ case "declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
-/******/ break;
-/******/ case "unaccepted":
-/******/ if(options.onUnaccepted)
-/******/ options.onUnaccepted(result);
-/******/ if(!options.ignoreUnaccepted)
-/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
-/******/ break;
-/******/ case "accepted":
-/******/ if(options.onAccepted)
-/******/ options.onAccepted(result);
-/******/ doApply = true;
-/******/ break;
-/******/ case "disposed":
-/******/ if(options.onDisposed)
-/******/ options.onDisposed(result);
-/******/ doDispose = true;
-/******/ break;
-/******/ default:
-/******/ throw new Error("Unexception type " + result.type);
-/******/ }
-/******/ if(abortError) {
-/******/ hotSetStatus("abort");
-/******/ return Promise.reject(abortError);
-/******/ }
-/******/ if(doApply) {
-/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
-/******/ addAllToSet(outdatedModules, result.outdatedModules);
-/******/ for(moduleId in result.outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
-/******/ if(!outdatedDependencies[moduleId])
-/******/ outdatedDependencies[moduleId] = [];
-/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
-/******/ }
-/******/ }
-/******/ }
-/******/ if(doDispose) {
-/******/ addAllToSet(outdatedModules, [result.moduleId]);
-/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Store self accepted outdated modules to require them later by the module system
-/******/ var outdatedSelfAcceptedModules = [];
-/******/ for(i = 0; i < outdatedModules.length; i++) {
-/******/ moduleId = outdatedModules[i];
-/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
-/******/ outdatedSelfAcceptedModules.push({
-/******/ module: moduleId,
-/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
-/******/ });
-/******/ }
-/******/
-/******/ // Now in "dispose" phase
-/******/ hotSetStatus("dispose");
-/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
-/******/ if(hotAvailableFilesMap[chunkId] === false) {
-/******/ hotDisposeChunk(chunkId);
-/******/ }
-/******/ });
-/******/
-/******/ var idx;
-/******/ var queue = outdatedModules.slice();
-/******/ while(queue.length > 0) {
-/******/ moduleId = queue.pop();
-/******/ module = installedModules[moduleId];
-/******/ if(!module) continue;
-/******/
-/******/ var data = {};
-/******/
-/******/ // Call dispose handlers
-/******/ var disposeHandlers = module.hot._disposeHandlers;
-/******/ for(j = 0; j < disposeHandlers.length; j++) {
-/******/ cb = disposeHandlers[j];
-/******/ cb(data);
-/******/ }
-/******/ hotCurrentModuleData[moduleId] = data;
-/******/
-/******/ // disable module (this disables requires from this module)
-/******/ module.hot.active = false;
-/******/
-/******/ // remove module from cache
-/******/ delete installedModules[moduleId];
-/******/
-/******/ // remove "parents" references from all children
-/******/ for(j = 0; j < module.children.length; j++) {
-/******/ var child = installedModules[module.children[j]];
-/******/ if(!child) continue;
-/******/ idx = child.parents.indexOf(moduleId);
-/******/ if(idx >= 0) {
-/******/ child.parents.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // remove outdated dependency from module children
-/******/ var dependency;
-/******/ var moduleOutdatedDependencies;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
-/******/ dependency = moduleOutdatedDependencies[j];
-/******/ idx = module.children.indexOf(dependency);
-/******/ if(idx >= 0) module.children.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Not in "apply" phase
-/******/ hotSetStatus("apply");
-/******/
-/******/ hotCurrentHash = hotUpdateNewHash;
-/******/
-/******/ // insert new code
-/******/ for(moduleId in appliedUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
-/******/ modules[moduleId] = appliedUpdate[moduleId];
-/******/ }
-/******/ }
-/******/
-/******/ // call accept handlers
-/******/ var error = null;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ var callbacks = [];
-/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
-/******/ dependency = moduleOutdatedDependencies[i];
-/******/ cb = module.hot._acceptedDependencies[dependency];
-/******/ if(callbacks.indexOf(cb) >= 0) continue;
-/******/ callbacks.push(cb);
-/******/ }
-/******/ for(i = 0; i < callbacks.length; i++) {
-/******/ cb = callbacks[i];
-/******/ try {
-/******/ cb(moduleOutdatedDependencies);
-/******/ } catch(err) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "accept-errored",
-/******/ moduleId: moduleId,
-/******/ dependencyId: moduleOutdatedDependencies[i],
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Load self accepted modules
-/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
-/******/ var item = outdatedSelfAcceptedModules[i];
-/******/ moduleId = item.module;
-/******/ hotCurrentParents = [moduleId];
-/******/ try {
-/******/ __webpack_require__(moduleId);
-/******/ } catch(err) {
-/******/ if(typeof item.errorHandler === "function") {
-/******/ try {
-/******/ item.errorHandler(err);
-/******/ } catch(err2) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-error-handler-errored",
-/******/ moduleId: moduleId,
-/******/ error: err2,
-/******/ orginalError: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err2;
-/******/ }
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ } else {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-errored",
-/******/ moduleId: moduleId,
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // handle errors in accept handlers and self accepted module load
-/******/ if(error) {
-/******/ hotSetStatus("fail");
-/******/ return Promise.reject(error);
-/******/ }
-/******/
-/******/ hotSetStatus("idle");
-/******/ return new Promise(function(resolve) {
-/******/ resolve(outdatedModules);
-/******/ });
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {},
-/******/ hot: hotCreateModule(moduleId),
-/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
-/******/ children: []
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // identity function for calling harmony imports with the correct context
-/******/ __webpack_require__.i = function(value) { return value; };
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // __webpack_hash__
-/******/ __webpack_require__.h = function() { return hotCurrentHash; };
-/******/
-/******/ // Load entry module and return exports
-/******/ return hotCreateRequire(463)(__webpack_require__.s = 463);
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 16:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2017 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2017 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = global.$;
-
-/**
- * Makes a table sortable by columns.
- * This forces a page reload with more query parameters.
- */
-
-var TableSorting = function () {
-
- /**
- * @param {jQuery} table
- */
- function TableSorting(table) {
- _classCallCheck(this, TableSorting);
-
- this.selector = '.ps-sortable-column';
- this.columns = $(table).find(this.selector);
- }
-
- /**
- * Attaches the listeners
- */
-
-
- _createClass(TableSorting, [{
- key: 'attach',
- value: function attach() {
- var _this = this;
-
- this.columns.on('click', function (e) {
- var $column = $(e.delegateTarget);
- _this._sortByColumn($column, _this._getToggledSortDirection($column));
- });
- }
-
- /**
- * Sort using a column name
- * @param {string} columnName
- * @param {string} direction "asc" or "desc"
- */
-
- }, {
- key: 'sortBy',
- value: function sortBy(columnName, direction) {
- var $column = this.columns.is('[data-sort-col-name="' + columnName + '"]');
- if (!$column) {
- throw new Error('Cannot sort by "' + columnName + '": invalid column');
- }
-
- this._sortByColumn($column, direction);
- }
-
- /**
- * Sort using a column element
- * @param {jQuery} column
- * @param {string} direction "asc" or "desc"
- * @private
- */
-
- }, {
- key: '_sortByColumn',
- value: function _sortByColumn(column, direction) {
- window.location = this._getUrl(column.data('sortColName'), direction === 'desc' ? 'desc' : 'asc');
- }
-
- /**
- * Returns the inverted direction to sort according to the column's current one
- * @param {jQuery} column
- * @return {string}
- * @private
- */
-
- }, {
- key: '_getToggledSortDirection',
- value: function _getToggledSortDirection(column) {
- return column.data('sortDirection') === 'asc' ? 'desc' : 'asc';
- }
-
- /**
- * Returns the url for the sorted table
- * @param {string} colName
- * @param {string} direction
- * @return {string}
- * @private
- */
-
- }, {
- key: '_getUrl',
- value: function _getUrl(colName, direction) {
- var url = new URL(window.location.href);
- var params = url.searchParams;
-
- params.set('orderBy', colName);
- params.set('sortOrder', direction);
-
- return url.toString();
- }
- }]);
-
- return TableSorting;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (TableSorting);
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2)))
-
-/***/ }),
-
-/***/ 2:
-/***/ (function(module, exports) {
-
-var g;
-
-// This works in non-strict mode
-g = (function() {
- return this;
-})();
-
-try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
-} catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
-
-/***/ }),
-
-/***/ 23:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-/**
- * Send a Post Request to reset search Action.
- */
-
-var $ = global.$;
-
-var init = function resetSearch(url, redirectUrl) {
- $.post(url);
- window.location.assign(redirectUrl);
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (init);
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2)))
-
-/***/ }),
-
-/***/ 234:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__email_sending_test__ = __webpack_require__(277);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__smtp_configuration_toggler__ = __webpack_require__(278);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_grid_grid__ = __webpack_require__(28);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_grid_extension_reload_list_extension__ = __webpack_require__(26);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_grid_extension_export_to_sql_manager_extension__ = __webpack_require__(24);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_grid_extension_filters_reset_extension__ = __webpack_require__(25);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_grid_extension_sorting_extension__ = __webpack_require__(27);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_grid_extension_bulk_action_checkbox_extension__ = __webpack_require__(40);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__components_grid_extension_submit_bulk_action_extension__ = __webpack_require__(42);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__components_grid_extension_submit_grid_action_extension__ = __webpack_require__(43);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__components_grid_extension_link_row_action_extension__ = __webpack_require__(41);
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-
-
-
-
-
-
-
-
-
-
-
-var $ = window.$;
-
-$(function () {
- var emailLogsGrid = new __WEBPACK_IMPORTED_MODULE_2__components_grid_grid__["a" /* default */]('email_logs');
-
- emailLogsGrid.addExtension(new __WEBPACK_IMPORTED_MODULE_3__components_grid_extension_reload_list_extension__["a" /* default */]());
- emailLogsGrid.addExtension(new __WEBPACK_IMPORTED_MODULE_4__components_grid_extension_export_to_sql_manager_extension__["a" /* default */]());
- emailLogsGrid.addExtension(new __WEBPACK_IMPORTED_MODULE_5__components_grid_extension_filters_reset_extension__["a" /* default */]());
- emailLogsGrid.addExtension(new __WEBPACK_IMPORTED_MODULE_6__components_grid_extension_sorting_extension__["a" /* default */]());
- emailLogsGrid.addExtension(new __WEBPACK_IMPORTED_MODULE_7__components_grid_extension_bulk_action_checkbox_extension__["a" /* default */]());
- emailLogsGrid.addExtension(new __WEBPACK_IMPORTED_MODULE_8__components_grid_extension_submit_bulk_action_extension__["a" /* default */]());
- emailLogsGrid.addExtension(new __WEBPACK_IMPORTED_MODULE_9__components_grid_extension_submit_grid_action_extension__["a" /* default */]());
- emailLogsGrid.addExtension(new __WEBPACK_IMPORTED_MODULE_10__components_grid_extension_link_row_action_extension__["a" /* default */]());
-
- new __WEBPACK_IMPORTED_MODULE_0__email_sending_test__["a" /* default */]();
- new __WEBPACK_IMPORTED_MODULE_1__smtp_configuration_toggler__["a" /* default */]();
-});
-
-/***/ }),
-
-/***/ 24:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Class ExportToSqlManagerExtension extends grid with exporting query to SQL Manager
- */
-
-var ExportToSqlManagerExtension = function () {
- function ExportToSqlManagerExtension() {
- _classCallCheck(this, ExportToSqlManagerExtension);
- }
-
- _createClass(ExportToSqlManagerExtension, [{
- key: 'extend',
-
- /**
- * Extend grid
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- var _this = this;
-
- grid.getContainer().on('click', '.js-common_show_query-grid-action', function () {
- return _this._onShowSqlQueryClick(grid);
- });
- grid.getContainer().on('click', '.js-common_export_sql_manager-grid-action', function () {
- return _this._onExportSqlManagerClick(grid);
- });
- }
-
- /**
- * Invoked when clicking on the "show sql query" toolbar button
- *
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_onShowSqlQueryClick',
- value: function _onShowSqlQueryClick(grid) {
- var $sqlManagerForm = $('#' + grid.getId() + '_common_show_query_modal_form');
- this._fillExportForm($sqlManagerForm, grid);
-
- var $modal = $('#' + grid.getId() + '_grid_common_show_query_modal');
- $modal.modal('show');
-
- $modal.on('click', '.btn-sql-submit', function () {
- return $sqlManagerForm.submit();
- });
- }
-
- /**
- * Invoked when clicking on the "export to the sql query" toolbar button
- *
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_onExportSqlManagerClick',
- value: function _onExportSqlManagerClick(grid) {
- var $sqlManagerForm = $('#' + grid.getId() + '_common_show_query_modal_form');
-
- this._fillExportForm($sqlManagerForm, grid);
-
- $sqlManagerForm.submit();
- }
-
- /**
- * Fill export form with SQL and it's name
- *
- * @param {jQuery} $sqlManagerForm
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_fillExportForm',
- value: function _fillExportForm($sqlManagerForm, grid) {
- var query = grid.getContainer().find('.js-grid-table').data('query');
-
- $sqlManagerForm.find('textarea[name="sql"]').val(query);
- $sqlManagerForm.find('input[name="name"]').val(this._getNameFromBreadcrumb());
- }
-
- /**
- * Get export name from page's breadcrumb
- *
- * @return {String}
- *
- * @private
- */
-
- }, {
- key: '_getNameFromBreadcrumb',
- value: function _getNameFromBreadcrumb() {
- var $breadcrumbs = $('.header-toolbar').find('.breadcrumb-item');
- var name = '';
-
- $breadcrumbs.each(function (i, item) {
- var $breadcrumb = $(item);
-
- var breadcrumbTitle = 0 < $breadcrumb.find('a').length ? $breadcrumb.find('a').text() : $breadcrumb.text();
-
- if (0 < name.length) {
- name = name.concat(' > ');
- }
-
- name = name.concat(breadcrumbTitle);
- });
-
- return name;
- }
- }]);
-
- return ExportToSqlManagerExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (ExportToSqlManagerExtension);
-
-/***/ }),
-
-/***/ 25:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app_utils_reset_search__ = __webpack_require__(23);
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-
-var $ = window.$;
-
-/**
- * Class FiltersResetExtension extends grid with filters resetting
- */
-
-var FiltersResetExtension = function () {
- function FiltersResetExtension() {
- _classCallCheck(this, FiltersResetExtension);
- }
-
- _createClass(FiltersResetExtension, [{
- key: 'extend',
-
-
- /**
- * Extend grid
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- grid.getContainer().on('click', '.js-reset-search', function (event) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__app_utils_reset_search__["a" /* default */])($(event.currentTarget).data('url'), $(event.currentTarget).data('redirect'));
- });
- }
- }]);
-
- return FiltersResetExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (FiltersResetExtension);
-
-/***/ }),
-
-/***/ 26:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
-* 2007-2018 PrestaShop
-*
-* NOTICE OF LICENSE
-*
-* This source file is subject to the Open Software License (OSL 3.0)
-* that is bundled with this package in the file LICENSE.txt.
-* It is also available through the world-wide-web at this URL:
-* https://opensource.org/licenses/OSL-3.0
-* If you did not receive a copy of the license and are unable to
-* obtain it through the world-wide-web, please send an email
-* to license@prestashop.com so we can send you a copy immediately.
-*
-* DISCLAIMER
-*
-* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
-* versions in the future. If you wish to customize PrestaShop for your
-* needs please refer to http://www.prestashop.com for more information.
-*
-* @author PrestaShop SA
-* @copyright 2007-2018 PrestaShop SA
-* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-/**
- * Class ReloadListExtension extends grid with "List reload" action
- */
-var ReloadListExtension = function () {
- function ReloadListExtension() {
- _classCallCheck(this, ReloadListExtension);
- }
-
- _createClass(ReloadListExtension, [{
- key: 'extend',
-
- /**
- * Extend grid
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- grid.getContainer().on('click', '.js-common_refresh_list-grid-action', function () {
- location.reload();
- });
- }
- }]);
-
- return ReloadListExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (ReloadListExtension);
-
-/***/ }),
-
-/***/ 27:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app_utils_table_sorting__ = __webpack_require__(16);
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
+var t={};e.m=n,e.c=t,e.i=function(n){return n},e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:r})},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},e.p="",e(e.s=378)}({13:function(n,e,t){"use strict";(function(n){/**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
@@ -1321,882 +24,4 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
-
-
-
-/**
- * Class ReloadListExtension extends grid with "List reload" action
- */
-
-var SortingExtension = function () {
- function SortingExtension() {
- _classCallCheck(this, SortingExtension);
- }
-
- _createClass(SortingExtension, [{
- key: 'extend',
-
- /**
- * Extend grid
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- var $sortableTable = grid.getContainer().find('table.table');
-
- new __WEBPACK_IMPORTED_MODULE_0__app_utils_table_sorting__["a" /* default */]($sortableTable).attach();
- }
- }]);
-
- return SortingExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (SortingExtension);
-
-/***/ }),
-
-/***/ 277:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Class is responsible for managing test email sending
- */
-
-var EmailSendingTest = function () {
- function EmailSendingTest() {
- var _this = this;
-
- _classCallCheck(this, EmailSendingTest);
-
- this.$successAlert = $('.js-test-email-success');
- this.$errorAlert = $('.js-test-email-errors');
- this.$loader = $('.js-test-email-loader');
- this.$sendEmailBtn = $('.js-send-test-email-btn');
-
- this.$sendEmailBtn.on('click', function (event) {
- _this._handle(event);
- });
- }
-
- /**
- * Handle test email sending
- *
- * @param {Event} event
- *
- * @private
- */
-
-
- _createClass(EmailSendingTest, [{
- key: '_handle',
- value: function _handle(event) {
- var _this2 = this;
-
- // fill test email sending form with configured values
- $('#test_email_sending_mail_method').val($('input[name="form[email_config][mail_method]"]:checked').val());
- $('#test_email_sending_smtp_server').val($('#form_smtp_config_server').val());
- $('#test_email_sending_smtp_username').val($('#form_smtp_config_username').val());
- $('#test_email_sending_smtp_password').val($('#form_smtp_config_password').val());
- $('#test_email_sending_smtp_port').val($('#form_smtp_config_port').val());
- $('#test_email_sending_smtp_encryption').val($('#form_smtp_config_encryption').val());
-
- var $testEmailSendingForm = $(event.currentTarget).closest('form');
-
- this._resetMessages();
-
- this._hideSendEmailButton();
- this._showLoader();
-
- $.post({
- url: $testEmailSendingForm.attr('action'),
- data: $testEmailSendingForm.serialize()
- }).then(function (response) {
- _this2._hideLoader();
- _this2._showSendEmailButton();
-
- if (0 !== response.errors.length) {
- _this2._showErrors(response.errors);
- return;
- }
-
- _this2._showSuccess();
- });
- }
-
- /**
- * Make sure that additional content (alerts, loader) is not visible
- *
- * @private
- */
-
- }, {
- key: '_resetMessages',
- value: function _resetMessages() {
- this._hideSuccess();
- this._hideErrors();
- }
-
- /**
- * Show success message
- *
- * @private
- */
-
- }, {
- key: '_showSuccess',
- value: function _showSuccess() {
- this.$successAlert.removeClass('d-none');
- }
-
- /**
- * Hide success message
- *
- * @private
- */
-
- }, {
- key: '_hideSuccess',
- value: function _hideSuccess() {
- this.$successAlert.addClass('d-none');
- }
-
- /**
- * Show loader during AJAX call
- *
- * @private
- */
-
- }, {
- key: '_showLoader',
- value: function _showLoader() {
- this.$loader.removeClass('d-none');
- }
-
- /**
- * Hide loader
- *
- * @private
- */
-
- }, {
- key: '_hideLoader',
- value: function _hideLoader() {
- this.$loader.addClass('d-none');
- }
-
- /**
- * Show errors
- *
- * @param {Array} errors
- *
- * @private
- */
-
- }, {
- key: '_showErrors',
- value: function _showErrors(errors) {
- var _this3 = this;
-
- errors.forEach(function (error) {
- _this3.$errorAlert.append('' + error + '
');
- });
-
- this.$errorAlert.removeClass('d-none');
- }
-
- /**
- * Hide errors
- *
- * @private
- */
-
- }, {
- key: '_hideErrors',
- value: function _hideErrors() {
- this.$errorAlert.addClass('d-none').empty();
- }
-
- /**
- * Show send email button
- *
- * @private
- */
-
- }, {
- key: '_showSendEmailButton',
- value: function _showSendEmailButton() {
- this.$sendEmailBtn.removeClass('d-none');
- }
-
- /**
- * Hide send email button
- *
- * @private
- */
-
- }, {
- key: '_hideSendEmailButton',
- value: function _hideSendEmailButton() {
- this.$sendEmailBtn.addClass('d-none');
- }
- }]);
-
- return EmailSendingTest;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (EmailSendingTest);
-
-/***/ }),
-
-/***/ 278:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Class SmtpConfigurationToggler is responsible for showing/hiding SMTP configuration form
- */
-
-var SmtpConfigurationToggler = function () {
- function SmtpConfigurationToggler() {
- var _this = this;
-
- _classCallCheck(this, SmtpConfigurationToggler);
-
- $('.js-email-method').on('change', 'input[type="radio"]', function (event) {
- var mailMethod = $(event.currentTarget).val();
-
- _this._getSmtpMailMethodOption() == mailMethod ? _this._showSmtpConfiguration() : _this._hideSmtpConfiguration();
- });
- }
-
- /**
- * Show SMTP configuration form
- *
- * @private
- */
-
-
- _createClass(SmtpConfigurationToggler, [{
- key: '_showSmtpConfiguration',
- value: function _showSmtpConfiguration() {
- $('.js-smtp-configuration').removeClass('d-none');
- }
-
- /**
- * Hide SMTP configuration
- *
- * @private
- */
-
- }, {
- key: '_hideSmtpConfiguration',
- value: function _hideSmtpConfiguration() {
- $('.js-smtp-configuration').addClass('d-none');
- }
-
- /**
- * Get SMTP mail option value
- *
- * @private
- *
- * @returns {String}
- */
-
- }, {
- key: '_getSmtpMailMethodOption',
- value: function _getSmtpMailMethodOption() {
- return $('.js-email-method').data('smtp-mail-method');
- }
- }]);
-
- return SmtpConfigurationToggler;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (SmtpConfigurationToggler);
-
-/***/ }),
-
-/***/ 28:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Class is responsible for handling Grid events
- */
-
-var Grid = function () {
- /**
- * Grid id
- *
- * @param {string} id
- */
- function Grid(id) {
- _classCallCheck(this, Grid);
-
- this.id = id;
- this.$container = $('#' + this.id + '_grid');
- }
-
- /**
- * Get grid id
- *
- * @returns {string}
- */
-
-
- _createClass(Grid, [{
- key: 'getId',
- value: function getId() {
- return this.id;
- }
-
- /**
- * Get grid container
- *
- * @returns {jQuery}
- */
-
- }, {
- key: 'getContainer',
- value: function getContainer() {
- return this.$container;
- }
-
- /**
- * Extend grid with external extensions
- *
- * @param {object} extension
- */
-
- }, {
- key: 'addExtension',
- value: function addExtension(extension) {
- extension.extend(this);
- }
- }]);
-
- return Grid;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (Grid);
-
-/***/ }),
-
-/***/ 40:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Class BulkActionSelectCheckboxExtension
- */
-
-var BulkActionCheckboxExtension = function () {
- function BulkActionCheckboxExtension() {
- _classCallCheck(this, BulkActionCheckboxExtension);
- }
-
- _createClass(BulkActionCheckboxExtension, [{
- key: 'extend',
-
- /**
- * Extend grid with bulk action checkboxes handling functionality
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- this._handleBulkActionCheckboxSelect(grid);
- this._handleBulkActionSelectAllCheckbox(grid);
- }
-
- /**
- * Handles "Select all" button in the grid
- *
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_handleBulkActionSelectAllCheckbox',
- value: function _handleBulkActionSelectAllCheckbox(grid) {
- var _this = this;
-
- grid.getContainer().on('change', '.js-bulk-action-select-all', function (e) {
- var $checkbox = $(e.currentTarget);
-
- var isChecked = $checkbox.is(':checked');
- if (isChecked) {
- _this._enableBulkActionsBtn(grid);
- } else {
- _this._disableBulkActionsBtn(grid);
- }
-
- grid.getContainer().find('.js-bulk-action-checkbox').prop('checked', isChecked);
- });
- }
-
- /**
- * Handles each bulk action checkbox select in the grid
- *
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_handleBulkActionCheckboxSelect',
- value: function _handleBulkActionCheckboxSelect(grid) {
- var _this2 = this;
-
- grid.getContainer().on('change', '.js-bulk-action-checkbox', function () {
- var checkedRowsCount = grid.getContainer().find('.js-bulk-action-checkbox:checked').length;
-
- if (checkedRowsCount > 0) {
- _this2._enableBulkActionsBtn(grid);
- } else {
- _this2._disableBulkActionsBtn(grid);
- }
- });
- }
-
- /**
- * Enable bulk actions button
- *
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_enableBulkActionsBtn',
- value: function _enableBulkActionsBtn(grid) {
- grid.getContainer().find('.js-bulk-actions-btn').prop('disabled', false);
- }
-
- /**
- * Disable bulk actions button
- *
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_disableBulkActionsBtn',
- value: function _disableBulkActionsBtn(grid) {
- grid.getContainer().find('.js-bulk-actions-btn').prop('disabled', true);
- }
- }]);
-
- return BulkActionCheckboxExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (BulkActionCheckboxExtension);
-
-/***/ }),
-
-/***/ 41:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Class LinkRowActionExtension handles link row actions
- */
-
-var LinkRowActionExtension = function () {
- function LinkRowActionExtension() {
- _classCallCheck(this, LinkRowActionExtension);
- }
-
- _createClass(LinkRowActionExtension, [{
- key: 'extend',
-
- /**
- * Extend grid
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- grid.getContainer().on('click', '.js-link-row-action', function (event) {
- var confirmMessage = $(event.currentTarget).data('confirm-message');
-
- if (confirmMessage.length && !confirm(confirmMessage)) {
- event.preventDefault();
- }
- });
- }
- }]);
-
- return LinkRowActionExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (LinkRowActionExtension);
-
-/***/ }),
-
-/***/ 42:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Handles submit of grid actions
- */
-
-var SubmitBulkActionExtension = function () {
- function SubmitBulkActionExtension() {
- var _this = this;
-
- _classCallCheck(this, SubmitBulkActionExtension);
-
- return {
- extend: function extend(grid) {
- return _this.extend(grid);
- }
- };
- }
-
- /**
- * Extend grid with bulk action submitting
- *
- * @param {Grid} grid
- */
-
-
- _createClass(SubmitBulkActionExtension, [{
- key: 'extend',
- value: function extend(grid) {
- var _this2 = this;
-
- grid.getContainer().on('click', '.js-bulk-action-submit-btn', function (event) {
- _this2.submit(event, grid);
- });
- }
-
- /**
- * Handle bulk action submitting
- *
- * @param {Event} event
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: 'submit',
- value: function submit(event, grid) {
- var $submitBtn = $(event.currentTarget);
- var confirmMessage = $submitBtn.data('confirm-message');
-
- if (typeof confirmMessage !== "undefined" && 0 < confirmMessage.length && !confirm(confirmMessage)) {
- return;
- }
-
- var $form = $('#' + grid.getId() + '_filter_form');
-
- $form.attr('action', $submitBtn.data('form-url'));
- $form.attr('method', $submitBtn.data('form-method'));
- $form.submit();
- }
- }]);
-
- return SubmitBulkActionExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (SubmitBulkActionExtension);
-
-/***/ }),
-
-/***/ 43:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Class SubmitGridActionExtension handles grid action submits
- */
-
-var SubmitGridActionExtension = function () {
- function SubmitGridActionExtension() {
- var _this = this;
-
- _classCallCheck(this, SubmitGridActionExtension);
-
- return {
- extend: function extend(grid) {
- return _this.extend(grid);
- }
- };
- }
-
- _createClass(SubmitGridActionExtension, [{
- key: 'extend',
- value: function extend(grid) {
- var _this2 = this;
-
- grid.getContainer().on('click', '.js-grid-action-submit-btn', function (event) {
- _this2.handleSubmit(event, grid);
- });
- }
-
- /**
- * Handle grid action submit.
- * It uses grid form to submit actions.
- *
- * @param {Event} event
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: 'handleSubmit',
- value: function handleSubmit(event, grid) {
- var $submitBtn = $(event.currentTarget);
- var confirmMessage = $submitBtn.data('confirm-message');
-
- if (typeof confirmMessage !== "undefined" && 0 < confirmMessage.length && !confirm(confirmMessage)) {
- return;
- }
-
- var $form = $('#' + grid.getId() + '_filter_form');
-
- $form.attr('action', $submitBtn.data('url'));
- $form.attr('method', $submitBtn.data('method'));
- $form.find('input[name="' + grid.getId() + '[_token]"]').val($submitBtn.data('csrf'));
- $form.submit();
- }
- }]);
-
- return SubmitGridActionExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (SubmitGridActionExtension);
-
-/***/ }),
-
-/***/ 463:
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(234);
-
-
-/***/ })
-
-/******/ });
\ No newline at end of file
+var t=n.$,r=function(n,e){t.post(n),window.location.assign(e)};e.a=r}).call(e,t(2))},14:function(n,e,t){"use strict";function r(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function n(n,e){for(var t=0;t ")),e=e.concat(o)}),e}}]),n}();e.a=a},15:function(n,e,t){"use strict";function r(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var o=t(13),i=function(){function n(n,e){for(var t=0;t"+n+"
")}),this.$errorAlert.removeClass("d-none")}},{key:"_hideErrors",value:function(){this.$errorAlert.addClass("d-none").empty()}},{key:"_showSendEmailButton",value:function(){this.$sendEmailBtn.removeClass("d-none")}},{key:"_hideSendEmailButton",value:function(){this.$sendEmailBtn.addClass("d-none")}}]),n}();e.a=a},229:function(n,e,t){"use strict";function r(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function n(n,e){for(var t=0;t0?e._enableBulkActionsBtn(n):e._disableBulkActionsBtn(n)})}},{key:"_enableBulkActionsBtn",value:function(n){n.getContainer().find(".js-bulk-actions-btn").prop("disabled",!1)}},{key:"_disableBulkActionsBtn",value:function(n){n.getContainer().find(".js-bulk-actions-btn").prop("disabled",!0)}}]),n}();e.a=a},27:function(n,e,t){"use strict";function r(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function n(n,e){for(var t=0;t= 0) hot._disposeHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ // Management API
-/******/ check: hotCheck,
-/******/ apply: hotApply,
-/******/ status: function(l) {
-/******/ if(!l) return hotStatus;
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ addStatusHandler: function(l) {
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ removeStatusHandler: function(l) {
-/******/ var idx = hotStatusHandlers.indexOf(l);
-/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ //inherit from previous dispose call
-/******/ data: hotCurrentModuleData[moduleId]
-/******/ };
-/******/ hotCurrentChildModule = undefined;
-/******/ return hot;
-/******/ }
-/******/
-/******/ var hotStatusHandlers = [];
-/******/ var hotStatus = "idle";
-/******/
-/******/ function hotSetStatus(newStatus) {
-/******/ hotStatus = newStatus;
-/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
-/******/ hotStatusHandlers[i].call(null, newStatus);
-/******/ }
-/******/
-/******/ // while downloading
-/******/ var hotWaitingFiles = 0;
-/******/ var hotChunksLoading = 0;
-/******/ var hotWaitingFilesMap = {};
-/******/ var hotRequestedFilesMap = {};
-/******/ var hotAvailableFilesMap = {};
-/******/ var hotDeferred;
-/******/
-/******/ // The update info
-/******/ var hotUpdate, hotUpdateNewHash;
-/******/
-/******/ function toModuleId(id) {
-/******/ var isNumber = (+id) + "" === id;
-/******/ return isNumber ? +id : id;
-/******/ }
-/******/
-/******/ function hotCheck(apply) {
-/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
-/******/ hotApplyOnUpdate = apply;
-/******/ hotSetStatus("check");
-/******/ return hotDownloadManifest().then(function(update) {
-/******/ if(!update) {
-/******/ hotSetStatus("idle");
-/******/ return null;
-/******/ }
-/******/ hotRequestedFilesMap = {};
-/******/ hotWaitingFilesMap = {};
-/******/ hotAvailableFilesMap = update.c;
-/******/ hotUpdateNewHash = update.h;
-/******/
-/******/ hotSetStatus("prepare");
-/******/ var promise = new Promise(function(resolve, reject) {
-/******/ hotDeferred = {
-/******/ resolve: resolve,
-/******/ reject: reject
-/******/ };
-/******/ });
-/******/ hotUpdate = {};
-/******/ var chunkId = 13;
-/******/ { // eslint-disable-line no-lone-blocks
-/******/ /*globals chunkId */
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ return promise;
-/******/ });
-/******/ }
-/******/
-/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
-/******/ return;
-/******/ hotRequestedFilesMap[chunkId] = false;
-/******/ for(var moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ hotUpdate[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/
-/******/ function hotEnsureUpdateChunk(chunkId) {
-/******/ if(!hotAvailableFilesMap[chunkId]) {
-/******/ hotWaitingFilesMap[chunkId] = true;
-/******/ } else {
-/******/ hotRequestedFilesMap[chunkId] = true;
-/******/ hotWaitingFiles++;
-/******/ hotDownloadUpdateChunk(chunkId);
-/******/ }
-/******/ }
-/******/
-/******/ function hotUpdateDownloaded() {
-/******/ hotSetStatus("ready");
-/******/ var deferred = hotDeferred;
-/******/ hotDeferred = null;
-/******/ if(!deferred) return;
-/******/ if(hotApplyOnUpdate) {
-/******/ hotApply(hotApplyOnUpdate).then(function(result) {
-/******/ deferred.resolve(result);
-/******/ }, function(err) {
-/******/ deferred.reject(err);
-/******/ });
-/******/ } else {
-/******/ var outdatedModules = [];
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ outdatedModules.push(toModuleId(id));
-/******/ }
-/******/ }
-/******/ deferred.resolve(outdatedModules);
-/******/ }
-/******/ }
-/******/
-/******/ function hotApply(options) {
-/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
-/******/ options = options || {};
-/******/
-/******/ var cb;
-/******/ var i;
-/******/ var j;
-/******/ var module;
-/******/ var moduleId;
-/******/
-/******/ function getAffectedStuff(updateModuleId) {
-/******/ var outdatedModules = [updateModuleId];
-/******/ var outdatedDependencies = {};
-/******/
-/******/ var queue = outdatedModules.slice().map(function(id) {
-/******/ return {
-/******/ chain: [id],
-/******/ id: id
-/******/ };
-/******/ });
-/******/ while(queue.length > 0) {
-/******/ var queueItem = queue.pop();
-/******/ var moduleId = queueItem.id;
-/******/ var chain = queueItem.chain;
-/******/ module = installedModules[moduleId];
-/******/ if(!module || module.hot._selfAccepted)
-/******/ continue;
-/******/ if(module.hot._selfDeclined) {
-/******/ return {
-/******/ type: "self-declined",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ if(module.hot._main) {
-/******/ return {
-/******/ type: "unaccepted",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ for(var i = 0; i < module.parents.length; i++) {
-/******/ var parentId = module.parents[i];
-/******/ var parent = installedModules[parentId];
-/******/ if(!parent) continue;
-/******/ if(parent.hot._declinedDependencies[moduleId]) {
-/******/ return {
-/******/ type: "declined",
-/******/ chain: chain.concat([parentId]),
-/******/ moduleId: moduleId,
-/******/ parentId: parentId
-/******/ };
-/******/ }
-/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
-/******/ if(parent.hot._acceptedDependencies[moduleId]) {
-/******/ if(!outdatedDependencies[parentId])
-/******/ outdatedDependencies[parentId] = [];
-/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
-/******/ continue;
-/******/ }
-/******/ delete outdatedDependencies[parentId];
-/******/ outdatedModules.push(parentId);
-/******/ queue.push({
-/******/ chain: chain.concat([parentId]),
-/******/ id: parentId
-/******/ });
-/******/ }
-/******/ }
-/******/
-/******/ return {
-/******/ type: "accepted",
-/******/ moduleId: updateModuleId,
-/******/ outdatedModules: outdatedModules,
-/******/ outdatedDependencies: outdatedDependencies
-/******/ };
-/******/ }
-/******/
-/******/ function addAllToSet(a, b) {
-/******/ for(var i = 0; i < b.length; i++) {
-/******/ var item = b[i];
-/******/ if(a.indexOf(item) < 0)
-/******/ a.push(item);
-/******/ }
-/******/ }
-/******/
-/******/ // at begin all updates modules are outdated
-/******/ // the "outdated" status can propagate to parents if they don't accept the children
-/******/ var outdatedDependencies = {};
-/******/ var outdatedModules = [];
-/******/ var appliedUpdate = {};
-/******/
-/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
-/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
-/******/ };
-/******/
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ moduleId = toModuleId(id);
-/******/ var result;
-/******/ if(hotUpdate[id]) {
-/******/ result = getAffectedStuff(moduleId);
-/******/ } else {
-/******/ result = {
-/******/ type: "disposed",
-/******/ moduleId: id
-/******/ };
-/******/ }
-/******/ var abortError = false;
-/******/ var doApply = false;
-/******/ var doDispose = false;
-/******/ var chainInfo = "";
-/******/ if(result.chain) {
-/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
-/******/ }
-/******/ switch(result.type) {
-/******/ case "self-declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
-/******/ break;
-/******/ case "declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
-/******/ break;
-/******/ case "unaccepted":
-/******/ if(options.onUnaccepted)
-/******/ options.onUnaccepted(result);
-/******/ if(!options.ignoreUnaccepted)
-/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
-/******/ break;
-/******/ case "accepted":
-/******/ if(options.onAccepted)
-/******/ options.onAccepted(result);
-/******/ doApply = true;
-/******/ break;
-/******/ case "disposed":
-/******/ if(options.onDisposed)
-/******/ options.onDisposed(result);
-/******/ doDispose = true;
-/******/ break;
-/******/ default:
-/******/ throw new Error("Unexception type " + result.type);
-/******/ }
-/******/ if(abortError) {
-/******/ hotSetStatus("abort");
-/******/ return Promise.reject(abortError);
-/******/ }
-/******/ if(doApply) {
-/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
-/******/ addAllToSet(outdatedModules, result.outdatedModules);
-/******/ for(moduleId in result.outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
-/******/ if(!outdatedDependencies[moduleId])
-/******/ outdatedDependencies[moduleId] = [];
-/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
-/******/ }
-/******/ }
-/******/ }
-/******/ if(doDispose) {
-/******/ addAllToSet(outdatedModules, [result.moduleId]);
-/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Store self accepted outdated modules to require them later by the module system
-/******/ var outdatedSelfAcceptedModules = [];
-/******/ for(i = 0; i < outdatedModules.length; i++) {
-/******/ moduleId = outdatedModules[i];
-/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
-/******/ outdatedSelfAcceptedModules.push({
-/******/ module: moduleId,
-/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
-/******/ });
-/******/ }
-/******/
-/******/ // Now in "dispose" phase
-/******/ hotSetStatus("dispose");
-/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
-/******/ if(hotAvailableFilesMap[chunkId] === false) {
-/******/ hotDisposeChunk(chunkId);
-/******/ }
-/******/ });
-/******/
-/******/ var idx;
-/******/ var queue = outdatedModules.slice();
-/******/ while(queue.length > 0) {
-/******/ moduleId = queue.pop();
-/******/ module = installedModules[moduleId];
-/******/ if(!module) continue;
-/******/
-/******/ var data = {};
-/******/
-/******/ // Call dispose handlers
-/******/ var disposeHandlers = module.hot._disposeHandlers;
-/******/ for(j = 0; j < disposeHandlers.length; j++) {
-/******/ cb = disposeHandlers[j];
-/******/ cb(data);
-/******/ }
-/******/ hotCurrentModuleData[moduleId] = data;
-/******/
-/******/ // disable module (this disables requires from this module)
-/******/ module.hot.active = false;
-/******/
-/******/ // remove module from cache
-/******/ delete installedModules[moduleId];
-/******/
-/******/ // remove "parents" references from all children
-/******/ for(j = 0; j < module.children.length; j++) {
-/******/ var child = installedModules[module.children[j]];
-/******/ if(!child) continue;
-/******/ idx = child.parents.indexOf(moduleId);
-/******/ if(idx >= 0) {
-/******/ child.parents.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // remove outdated dependency from module children
-/******/ var dependency;
-/******/ var moduleOutdatedDependencies;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
-/******/ dependency = moduleOutdatedDependencies[j];
-/******/ idx = module.children.indexOf(dependency);
-/******/ if(idx >= 0) module.children.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Not in "apply" phase
-/******/ hotSetStatus("apply");
-/******/
-/******/ hotCurrentHash = hotUpdateNewHash;
-/******/
-/******/ // insert new code
-/******/ for(moduleId in appliedUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
-/******/ modules[moduleId] = appliedUpdate[moduleId];
-/******/ }
-/******/ }
-/******/
-/******/ // call accept handlers
-/******/ var error = null;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ var callbacks = [];
-/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
-/******/ dependency = moduleOutdatedDependencies[i];
-/******/ cb = module.hot._acceptedDependencies[dependency];
-/******/ if(callbacks.indexOf(cb) >= 0) continue;
-/******/ callbacks.push(cb);
-/******/ }
-/******/ for(i = 0; i < callbacks.length; i++) {
-/******/ cb = callbacks[i];
-/******/ try {
-/******/ cb(moduleOutdatedDependencies);
-/******/ } catch(err) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "accept-errored",
-/******/ moduleId: moduleId,
-/******/ dependencyId: moduleOutdatedDependencies[i],
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Load self accepted modules
-/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
-/******/ var item = outdatedSelfAcceptedModules[i];
-/******/ moduleId = item.module;
-/******/ hotCurrentParents = [moduleId];
-/******/ try {
-/******/ __webpack_require__(moduleId);
-/******/ } catch(err) {
-/******/ if(typeof item.errorHandler === "function") {
-/******/ try {
-/******/ item.errorHandler(err);
-/******/ } catch(err2) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-error-handler-errored",
-/******/ moduleId: moduleId,
-/******/ error: err2,
-/******/ orginalError: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err2;
-/******/ }
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ } else {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-errored",
-/******/ moduleId: moduleId,
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // handle errors in accept handlers and self accepted module load
-/******/ if(error) {
-/******/ hotSetStatus("fail");
-/******/ return Promise.reject(error);
-/******/ }
-/******/
-/******/ hotSetStatus("idle");
-/******/ return new Promise(function(resolve) {
-/******/ resolve(outdatedModules);
-/******/ });
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {},
-/******/ hot: hotCreateModule(moduleId),
-/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
-/******/ children: []
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // identity function for calling harmony imports with the correct context
-/******/ __webpack_require__.i = function(value) { return value; };
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // __webpack_hash__
-/******/ __webpack_require__.h = function() { return hotCurrentHash; };
-/******/
-/******/ // Load entry module and return exports
-/******/ return hotCreateRequire(464)(__webpack_require__.s = 464);
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 235:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_choice_table__ = __webpack_require__(270);
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-
-var $ = window.$;
-
-$(function () {
- new __WEBPACK_IMPORTED_MODULE_0__components_choice_table__["a" /* default */]();
-});
-
-/***/ }),
-
-/***/ 270:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * ChoiceTable is responsible for managing common actions in choice table form type
- */
-
-var ChoiceTable = function () {
- /**
- * Init constructor
- */
- function ChoiceTable() {
- var _this = this;
-
- _classCallCheck(this, ChoiceTable);
-
- $(document).on('change', '.js-choice-table-select-all', function (e) {
- _this.handleSelectAll(e);
- });
- }
-
- /**
- * Check/uncheck all boxes in table
- *
- * @param {Event} event
- */
-
-
- _createClass(ChoiceTable, [{
- key: 'handleSelectAll',
- value: function handleSelectAll(event) {
- var $selectAllCheckboxes = $(event.target);
- var isSelectAllChecked = $selectAllCheckboxes.is(':checked');
-
- $selectAllCheckboxes.closest('table').find('tbody input:checkbox').prop('checked', isSelectAllChecked);
- }
- }]);
-
- return ChoiceTable;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (ChoiceTable);
-
-/***/ }),
-
-/***/ 464:
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(235);
-
-
-/***/ })
-
-/******/ });
\ No newline at end of file
+var t={};n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=379)}({190:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(221);(0,window.$)(function(){new r.a})},221:function(e,n,t){"use strict";function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,n){for(var t=0;t= 0) hot._disposeHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ // Management API
-/******/ check: hotCheck,
-/******/ apply: hotApply,
-/******/ status: function(l) {
-/******/ if(!l) return hotStatus;
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ addStatusHandler: function(l) {
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ removeStatusHandler: function(l) {
-/******/ var idx = hotStatusHandlers.indexOf(l);
-/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ //inherit from previous dispose call
-/******/ data: hotCurrentModuleData[moduleId]
-/******/ };
-/******/ hotCurrentChildModule = undefined;
-/******/ return hot;
-/******/ }
-/******/
-/******/ var hotStatusHandlers = [];
-/******/ var hotStatus = "idle";
-/******/
-/******/ function hotSetStatus(newStatus) {
-/******/ hotStatus = newStatus;
-/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
-/******/ hotStatusHandlers[i].call(null, newStatus);
-/******/ }
-/******/
-/******/ // while downloading
-/******/ var hotWaitingFiles = 0;
-/******/ var hotChunksLoading = 0;
-/******/ var hotWaitingFilesMap = {};
-/******/ var hotRequestedFilesMap = {};
-/******/ var hotAvailableFilesMap = {};
-/******/ var hotDeferred;
-/******/
-/******/ // The update info
-/******/ var hotUpdate, hotUpdateNewHash;
-/******/
-/******/ function toModuleId(id) {
-/******/ var isNumber = (+id) + "" === id;
-/******/ return isNumber ? +id : id;
-/******/ }
-/******/
-/******/ function hotCheck(apply) {
-/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
-/******/ hotApplyOnUpdate = apply;
-/******/ hotSetStatus("check");
-/******/ return hotDownloadManifest().then(function(update) {
-/******/ if(!update) {
-/******/ hotSetStatus("idle");
-/******/ return null;
-/******/ }
-/******/ hotRequestedFilesMap = {};
-/******/ hotWaitingFilesMap = {};
-/******/ hotAvailableFilesMap = update.c;
-/******/ hotUpdateNewHash = update.h;
-/******/
-/******/ hotSetStatus("prepare");
-/******/ var promise = new Promise(function(resolve, reject) {
-/******/ hotDeferred = {
-/******/ resolve: resolve,
-/******/ reject: reject
-/******/ };
-/******/ });
-/******/ hotUpdate = {};
-/******/ var chunkId = 7;
-/******/ { // eslint-disable-line no-lone-blocks
-/******/ /*globals chunkId */
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ return promise;
-/******/ });
-/******/ }
-/******/
-/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
-/******/ return;
-/******/ hotRequestedFilesMap[chunkId] = false;
-/******/ for(var moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ hotUpdate[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/
-/******/ function hotEnsureUpdateChunk(chunkId) {
-/******/ if(!hotAvailableFilesMap[chunkId]) {
-/******/ hotWaitingFilesMap[chunkId] = true;
-/******/ } else {
-/******/ hotRequestedFilesMap[chunkId] = true;
-/******/ hotWaitingFiles++;
-/******/ hotDownloadUpdateChunk(chunkId);
-/******/ }
-/******/ }
-/******/
-/******/ function hotUpdateDownloaded() {
-/******/ hotSetStatus("ready");
-/******/ var deferred = hotDeferred;
-/******/ hotDeferred = null;
-/******/ if(!deferred) return;
-/******/ if(hotApplyOnUpdate) {
-/******/ hotApply(hotApplyOnUpdate).then(function(result) {
-/******/ deferred.resolve(result);
-/******/ }, function(err) {
-/******/ deferred.reject(err);
-/******/ });
-/******/ } else {
-/******/ var outdatedModules = [];
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ outdatedModules.push(toModuleId(id));
-/******/ }
-/******/ }
-/******/ deferred.resolve(outdatedModules);
-/******/ }
-/******/ }
-/******/
-/******/ function hotApply(options) {
-/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
-/******/ options = options || {};
-/******/
-/******/ var cb;
-/******/ var i;
-/******/ var j;
-/******/ var module;
-/******/ var moduleId;
-/******/
-/******/ function getAffectedStuff(updateModuleId) {
-/******/ var outdatedModules = [updateModuleId];
-/******/ var outdatedDependencies = {};
-/******/
-/******/ var queue = outdatedModules.slice().map(function(id) {
-/******/ return {
-/******/ chain: [id],
-/******/ id: id
-/******/ };
-/******/ });
-/******/ while(queue.length > 0) {
-/******/ var queueItem = queue.pop();
-/******/ var moduleId = queueItem.id;
-/******/ var chain = queueItem.chain;
-/******/ module = installedModules[moduleId];
-/******/ if(!module || module.hot._selfAccepted)
-/******/ continue;
-/******/ if(module.hot._selfDeclined) {
-/******/ return {
-/******/ type: "self-declined",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ if(module.hot._main) {
-/******/ return {
-/******/ type: "unaccepted",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ for(var i = 0; i < module.parents.length; i++) {
-/******/ var parentId = module.parents[i];
-/******/ var parent = installedModules[parentId];
-/******/ if(!parent) continue;
-/******/ if(parent.hot._declinedDependencies[moduleId]) {
-/******/ return {
-/******/ type: "declined",
-/******/ chain: chain.concat([parentId]),
-/******/ moduleId: moduleId,
-/******/ parentId: parentId
-/******/ };
-/******/ }
-/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
-/******/ if(parent.hot._acceptedDependencies[moduleId]) {
-/******/ if(!outdatedDependencies[parentId])
-/******/ outdatedDependencies[parentId] = [];
-/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
-/******/ continue;
-/******/ }
-/******/ delete outdatedDependencies[parentId];
-/******/ outdatedModules.push(parentId);
-/******/ queue.push({
-/******/ chain: chain.concat([parentId]),
-/******/ id: parentId
-/******/ });
-/******/ }
-/******/ }
-/******/
-/******/ return {
-/******/ type: "accepted",
-/******/ moduleId: updateModuleId,
-/******/ outdatedModules: outdatedModules,
-/******/ outdatedDependencies: outdatedDependencies
-/******/ };
-/******/ }
-/******/
-/******/ function addAllToSet(a, b) {
-/******/ for(var i = 0; i < b.length; i++) {
-/******/ var item = b[i];
-/******/ if(a.indexOf(item) < 0)
-/******/ a.push(item);
-/******/ }
-/******/ }
-/******/
-/******/ // at begin all updates modules are outdated
-/******/ // the "outdated" status can propagate to parents if they don't accept the children
-/******/ var outdatedDependencies = {};
-/******/ var outdatedModules = [];
-/******/ var appliedUpdate = {};
-/******/
-/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
-/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
-/******/ };
-/******/
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ moduleId = toModuleId(id);
-/******/ var result;
-/******/ if(hotUpdate[id]) {
-/******/ result = getAffectedStuff(moduleId);
-/******/ } else {
-/******/ result = {
-/******/ type: "disposed",
-/******/ moduleId: id
-/******/ };
-/******/ }
-/******/ var abortError = false;
-/******/ var doApply = false;
-/******/ var doDispose = false;
-/******/ var chainInfo = "";
-/******/ if(result.chain) {
-/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
-/******/ }
-/******/ switch(result.type) {
-/******/ case "self-declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
-/******/ break;
-/******/ case "declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
-/******/ break;
-/******/ case "unaccepted":
-/******/ if(options.onUnaccepted)
-/******/ options.onUnaccepted(result);
-/******/ if(!options.ignoreUnaccepted)
-/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
-/******/ break;
-/******/ case "accepted":
-/******/ if(options.onAccepted)
-/******/ options.onAccepted(result);
-/******/ doApply = true;
-/******/ break;
-/******/ case "disposed":
-/******/ if(options.onDisposed)
-/******/ options.onDisposed(result);
-/******/ doDispose = true;
-/******/ break;
-/******/ default:
-/******/ throw new Error("Unexception type " + result.type);
-/******/ }
-/******/ if(abortError) {
-/******/ hotSetStatus("abort");
-/******/ return Promise.reject(abortError);
-/******/ }
-/******/ if(doApply) {
-/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
-/******/ addAllToSet(outdatedModules, result.outdatedModules);
-/******/ for(moduleId in result.outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
-/******/ if(!outdatedDependencies[moduleId])
-/******/ outdatedDependencies[moduleId] = [];
-/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
-/******/ }
-/******/ }
-/******/ }
-/******/ if(doDispose) {
-/******/ addAllToSet(outdatedModules, [result.moduleId]);
-/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Store self accepted outdated modules to require them later by the module system
-/******/ var outdatedSelfAcceptedModules = [];
-/******/ for(i = 0; i < outdatedModules.length; i++) {
-/******/ moduleId = outdatedModules[i];
-/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
-/******/ outdatedSelfAcceptedModules.push({
-/******/ module: moduleId,
-/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
-/******/ });
-/******/ }
-/******/
-/******/ // Now in "dispose" phase
-/******/ hotSetStatus("dispose");
-/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
-/******/ if(hotAvailableFilesMap[chunkId] === false) {
-/******/ hotDisposeChunk(chunkId);
-/******/ }
-/******/ });
-/******/
-/******/ var idx;
-/******/ var queue = outdatedModules.slice();
-/******/ while(queue.length > 0) {
-/******/ moduleId = queue.pop();
-/******/ module = installedModules[moduleId];
-/******/ if(!module) continue;
-/******/
-/******/ var data = {};
-/******/
-/******/ // Call dispose handlers
-/******/ var disposeHandlers = module.hot._disposeHandlers;
-/******/ for(j = 0; j < disposeHandlers.length; j++) {
-/******/ cb = disposeHandlers[j];
-/******/ cb(data);
-/******/ }
-/******/ hotCurrentModuleData[moduleId] = data;
-/******/
-/******/ // disable module (this disables requires from this module)
-/******/ module.hot.active = false;
-/******/
-/******/ // remove module from cache
-/******/ delete installedModules[moduleId];
-/******/
-/******/ // remove "parents" references from all children
-/******/ for(j = 0; j < module.children.length; j++) {
-/******/ var child = installedModules[module.children[j]];
-/******/ if(!child) continue;
-/******/ idx = child.parents.indexOf(moduleId);
-/******/ if(idx >= 0) {
-/******/ child.parents.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // remove outdated dependency from module children
-/******/ var dependency;
-/******/ var moduleOutdatedDependencies;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
-/******/ dependency = moduleOutdatedDependencies[j];
-/******/ idx = module.children.indexOf(dependency);
-/******/ if(idx >= 0) module.children.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Not in "apply" phase
-/******/ hotSetStatus("apply");
-/******/
-/******/ hotCurrentHash = hotUpdateNewHash;
-/******/
-/******/ // insert new code
-/******/ for(moduleId in appliedUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
-/******/ modules[moduleId] = appliedUpdate[moduleId];
-/******/ }
-/******/ }
-/******/
-/******/ // call accept handlers
-/******/ var error = null;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ var callbacks = [];
-/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
-/******/ dependency = moduleOutdatedDependencies[i];
-/******/ cb = module.hot._acceptedDependencies[dependency];
-/******/ if(callbacks.indexOf(cb) >= 0) continue;
-/******/ callbacks.push(cb);
-/******/ }
-/******/ for(i = 0; i < callbacks.length; i++) {
-/******/ cb = callbacks[i];
-/******/ try {
-/******/ cb(moduleOutdatedDependencies);
-/******/ } catch(err) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "accept-errored",
-/******/ moduleId: moduleId,
-/******/ dependencyId: moduleOutdatedDependencies[i],
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Load self accepted modules
-/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
-/******/ var item = outdatedSelfAcceptedModules[i];
-/******/ moduleId = item.module;
-/******/ hotCurrentParents = [moduleId];
-/******/ try {
-/******/ __webpack_require__(moduleId);
-/******/ } catch(err) {
-/******/ if(typeof item.errorHandler === "function") {
-/******/ try {
-/******/ item.errorHandler(err);
-/******/ } catch(err2) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-error-handler-errored",
-/******/ moduleId: moduleId,
-/******/ error: err2,
-/******/ orginalError: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err2;
-/******/ }
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ } else {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-errored",
-/******/ moduleId: moduleId,
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // handle errors in accept handlers and self accepted module load
-/******/ if(error) {
-/******/ hotSetStatus("fail");
-/******/ return Promise.reject(error);
-/******/ }
-/******/
-/******/ hotSetStatus("idle");
-/******/ return new Promise(function(resolve) {
-/******/ resolve(outdatedModules);
-/******/ });
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {},
-/******/ hot: hotCreateModule(moduleId),
-/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
-/******/ children: []
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // identity function for calling harmony imports with the correct context
-/******/ __webpack_require__.i = function(value) { return value; };
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // __webpack_hash__
-/******/ __webpack_require__.h = function() { return hotCurrentHash; };
-/******/
-/******/ // Load entry module and return exports
-/******/ return hotCreateRequire(465)(__webpack_require__.s = 465);
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 236:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ImportPage__ = __webpack_require__(280);
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-
-var $ = window.$;
-
-$(function () {
- new __WEBPACK_IMPORTED_MODULE_0__ImportPage__["a" /* default */]();
-});
-
-/***/ }),
-
-/***/ 279:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-var entityCategories = 0;
-var entityProducts = 1;
-var entityCombinations = 2;
-var entityCustomers = 3;
-var entityAddresses = 4;
-var entityBrands = 5;
-var entitySuppliers = 6;
-var entityAlias = 7;
-var entityStoreContacts = 8;
-
-var FormFieldToggle = function () {
- function FormFieldToggle() {
- _classCallCheck(this, FormFieldToggle);
-
- $('.js-entity-select').on('change', this.toggleForm.bind(this));
-
- this.toggleForm();
- }
-
- _createClass(FormFieldToggle, [{
- key: 'toggleForm',
- value: function toggleForm() {
- var selectedOption = $('#entity').find('option:selected');
- var selectedEntity = parseInt(selectedOption.val());
- var entityName = selectedOption.text().toLowerCase();
-
- this.toggleEntityAlert(selectedEntity);
- this.toggleFields(selectedEntity, entityName);
- this.loadAvailableFields(selectedEntity);
- }
-
- /**
- * Toggle alert warning for selected import entity
- *
- * @param {int} selectedEntity
- */
-
- }, {
- key: 'toggleEntityAlert',
- value: function toggleEntityAlert(selectedEntity) {
- var $alert = $('.js-entity-alert');
-
- if ([entityCategories, entityProducts].includes(selectedEntity)) {
- $alert.show();
- } else {
- $alert.hide();
- }
- }
-
- /**
- * Toggle available options for selected entity
- *
- * @param {int} selectedEntity
- * @param {string} entityName
- */
-
- }, {
- key: 'toggleFields',
- value: function toggleFields(selectedEntity, entityName) {
- var $truncateFormGroup = $('.js-truncate-form-group');
- var $matchRefFormGroup = $('.js-match-ref-form-group');
- var $regenerateFormGroup = $('.js-regenerate-form-group');
- var $forceIdsFormGroup = $('.js-force-ids-form-group');
- var $entityNamePlaceholder = $('.js-entity-name');
-
- if (entityStoreContacts === selectedEntity) {
- $truncateFormGroup.hide();
- } else {
- $truncateFormGroup.show();
- }
-
- if ([entityProducts, entityCombinations].includes(selectedEntity)) {
- $matchRefFormGroup.show();
- } else {
- $matchRefFormGroup.hide();
- }
-
- if ([entityCategories, entityProducts, entityBrands, entitySuppliers, entityStoreContacts].includes(selectedEntity)) {
- $regenerateFormGroup.show();
- } else {
- $regenerateFormGroup.hide();
- }
-
- if ([entityCategories, entityProducts, entityCustomers, entityAddresses, entityBrands, entitySuppliers, entityStoreContacts, entityAlias].includes(selectedEntity)) {
- $forceIdsFormGroup.show();
- } else {
- $forceIdsFormGroup.hide();
- }
-
- $entityNamePlaceholder.html(entityName);
- }
-
- /**
- * Load available fields for given entity
- *
- * @param {int} entity
- */
-
- }, {
- key: 'loadAvailableFields',
- value: function loadAvailableFields(entity) {
- var url = -1 === window.location.href.indexOf('index.php') ? '../../../ajax.php' : '../../../../ajax.php';
-
- $.ajax({
- url: url,
- data: {
- getAvailableFields: 1,
- entity: entity
- },
- dataType: 'json'
- }).then(function (response) {
- var fields = '';
- var $availableFields = $('.js-available-fields');
- $availableFields.empty();
-
- for (var i = 0; i < response.length; i++) {
- fields += response[i].field;
- }
-
- $availableFields.html(fields);
- $availableFields.find('[data-toggle="popover"]').popover();
- });
- }
- }]);
-
- return FormFieldToggle;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (FormFieldToggle);
-
-/***/ }),
-
-/***/ 280:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__FormFieldToggle__ = __webpack_require__(279);
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-
-var $ = window.$;
-
-var ImportPage = function () {
- function ImportPage() {
- var _this = this;
-
- _classCallCheck(this, ImportPage);
-
- new __WEBPACK_IMPORTED_MODULE_0__FormFieldToggle__["a" /* default */]();
-
- $('.js-from-files-history-btn').on('click', function () {
- return _this.showFilesHistoryHandler();
- });
- $('.js-close-files-history-block-btn').on('click', function () {
- return _this.closeFilesHistoryHandler();
- });
- $('#fileHistoryTable').on('click', '.js-use-file-btn', function (event) {
- return _this.useFileFromFilesHistory(event);
- });
- $('.js-change-import-file-btn').on('click', function () {
- return _this.changeImportFileHandler();
- });
- $('.js-import-file').on('change', function () {
- return _this.uploadFile();
- });
-
- this.toggleSelectedFile();
- this.handleSubmit();
- }
-
- /**
- * Handle submit and add confirm box in case the toggle button about
- * deleting all entities before import is checked
- */
-
-
- _createClass(ImportPage, [{
- key: 'handleSubmit',
- value: function handleSubmit() {
- $('.js-import-form').on('submit', function () {
- var $this = $(this);
- if ($this.find('input[name="truncate"]:checked').val() === '1') {
- return confirm($this.data('delete-confirm-message') + ' ' + $.trim($('#entity > option:selected').text().toLowerCase()) + '?');
- }
- });
- }
-
- /**
- * Check if selected file names exists and if so, then display it
- */
-
- }, {
- key: 'toggleSelectedFile',
- value: function toggleSelectedFile() {
- var selectFilename = $('#csv').val();
- if (selectFilename.length > 0) {
- this.showImportFileAlert(selectFilename);
- this.hideFileUploadBlock();
- }
- }
- }, {
- key: 'changeImportFileHandler',
- value: function changeImportFileHandler() {
- this.hideImportFileAlert();
- this.showFileUploadBlock();
- }
-
- /**
- * Show files history event handler
- */
-
- }, {
- key: 'showFilesHistoryHandler',
- value: function showFilesHistoryHandler() {
- this.showFilesHistory();
- this.hideFileUploadBlock();
- }
-
- /**
- * Close files history event handler
- */
-
- }, {
- key: 'closeFilesHistoryHandler',
- value: function closeFilesHistoryHandler() {
- this.closeFilesHistory();
- this.showFileUploadBlock();
- }
-
- /**
- * Show files history block
- */
-
- }, {
- key: 'showFilesHistory',
- value: function showFilesHistory() {
- $('.js-files-history-block').removeClass('d-none');
- }
-
- /**
- * Hide files history block
- */
-
- }, {
- key: 'closeFilesHistory',
- value: function closeFilesHistory() {
- $('.js-files-history-block').addClass('d-none');
- }
-
- /**
- * Prefill hidden file input with selected file name from history
- */
-
- }, {
- key: 'useFileFromFilesHistory',
- value: function useFileFromFilesHistory(event) {
- var filename = $(event.target).closest('.btn-group').data('file');
-
- $('.js-import-file-input').val(filename);
-
- this.showImportFileAlert(filename);
- this.closeFilesHistory();
- }
-
- /**
- * Show alert with imported file name
- */
-
- }, {
- key: 'showImportFileAlert',
- value: function showImportFileAlert(filename) {
- $('.js-import-file-alert').removeClass('d-none');
- $('.js-import-file').text(filename);
- }
-
- /**
- * Hides selected import file alert
- */
-
- }, {
- key: 'hideImportFileAlert',
- value: function hideImportFileAlert() {
- $('.js-import-file-alert').addClass('d-none');
- }
-
- /**
- * Hides import file upload block
- */
-
- }, {
- key: 'hideFileUploadBlock',
- value: function hideFileUploadBlock() {
- $('.js-file-upload-form-group').addClass('d-none');
- }
-
- /**
- * Hides import file upload block
- */
-
- }, {
- key: 'showFileUploadBlock',
- value: function showFileUploadBlock() {
- $('.js-file-upload-form-group').removeClass('d-none');
- }
-
- /**
- * Make file history button clickable
- */
-
- }, {
- key: 'enableFilesHistoryBtn',
- value: function enableFilesHistoryBtn() {
- $('.js-from-files-history-btn').removeAttr('disabled');
- }
-
- /**
- * Show error message if file uploading failed
- *
- * @param {string} fileName
- * @param {integer} fileSize
- * @param {string} message
- */
-
- }, {
- key: 'showImportFileError',
- value: function showImportFileError(fileName, fileSize, message) {
- var $alert = $('.js-import-file-error');
-
- var fileData = fileName + ' (' + this.humanizeSize(fileSize) + ')';
-
- $alert.find('.js-file-data').html(fileData);
- $alert.find('.js-error-message').html(message);
- $alert.removeClass('d-none');
- }
-
- /**
- * Hide file uploading error
- */
-
- }, {
- key: 'hideImportFileError',
- value: function hideImportFileError() {
- var $alert = $('.js-import-file-error');
- $alert.addClass('d-none');
- }
-
- /**
- * Show file size in human readable format
- *
- * @param {int} bytes
- *
- * @returns {string}
- */
-
- }, {
- key: 'humanizeSize',
- value: function humanizeSize(bytes) {
- if (typeof bytes !== 'number') {
- return '';
- }
-
- if (bytes >= 1000000000) {
- return (bytes / 1000000000).toFixed(2) + ' GB';
- }
-
- if (bytes >= 1000000) {
- return (bytes / 1000000).toFixed(2) + ' MB';
- }
-
- return (bytes / 1000).toFixed(2) + ' KB';
- }
-
- /**
- * Upload selected import file
- */
-
- }, {
- key: 'uploadFile',
- value: function uploadFile() {
- var _this2 = this;
-
- this.hideImportFileError();
-
- var $input = $('#file');
- var uploadedFile = $input.prop('files')[0];
-
- var maxUploadSize = $input.data('max-file-upload-size');
- if (maxUploadSize < uploadedFile.size) {
- this.showImportFileError(uploadedFile.name, uploadedFile.size, 'File is too large');
- return;
- }
-
- var data = new FormData();
- data.append('file', uploadedFile);
-
- $.ajax({
- type: 'POST',
- url: $('.js-import-form').data('file-upload-url'),
- data: data,
- cache: false,
- contentType: false,
- processData: false
- }).then(function (response) {
- if (response.error) {
- _this2.showImportFileError(uploadedFile.name, uploadedFile.size, response.error);
- return;
- }
-
- var filename = response.file.name;
-
- $('.js-import-file-input').val(filename);
-
- _this2.showImportFileAlert(filename);
- _this2.hideFileUploadBlock();
- _this2.addFileToHistoryTable(filename);
- _this2.enableFilesHistoryBtn();
- });
- }
-
- /**
- * Renders new row in files history table
- *
- * @param {string} filename
- */
-
- }, {
- key: 'addFileToHistoryTable',
- value: function addFileToHistoryTable(filename) {
- var $table = $('#fileHistoryTable');
-
- var baseDeleteUrl = $table.data('delete-file-url');
- var deleteUrl = baseDeleteUrl + '&filename=' + encodeURIComponent(filename);
-
- var baseDownloadUrl = $table.data('download-file-url');
- var downloadUrl = baseDownloadUrl + '&filename=' + encodeURIComponent(filename);
-
- var $template = $table.find('tr:first').clone();
-
- $template.removeClass('d-none');
- $template.find('td:first').text(filename);
- $template.find('.btn-group').attr('data-file', filename);
- $template.find('.js-delete-file-btn').attr('href', deleteUrl);
- $template.find('.js-download-file-btn').attr('href', downloadUrl);
-
- $table.find('tbody').append($template);
-
- var filesNumber = $table.find('tr').length - 1;
- $('.js-files-history-number').text(filesNumber);
- }
- }]);
-
- return ImportPage;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (ImportPage);
-
-/***/ }),
-
-/***/ 465:
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(236);
-
-
-/***/ })
-
-/******/ });
\ No newline at end of file
+var i={};t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,o){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=380)}({191:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(231);(0,window.$)(function(){new o.a})},230:function(e,t,i){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=function(){function e(e,t){for(var i=0;i option:selected").text().toLowerCase())+"?")})}},{key:"toggleSelectedFile",value:function(){var e=l("#csv").val();e.length>0&&(this.showImportFileAlert(e),this.hideFileUploadBlock())}},{key:"changeImportFileHandler",value:function(){this.hideImportFileAlert(),this.showFileUploadBlock()}},{key:"showFilesHistoryHandler",value:function(){this.showFilesHistory(),this.hideFileUploadBlock()}},{key:"closeFilesHistoryHandler",value:function(){this.closeFilesHistory(),this.showFileUploadBlock()}},{key:"showFilesHistory",value:function(){l(".js-files-history-block").removeClass("d-none")}},{key:"closeFilesHistory",value:function(){l(".js-files-history-block").addClass("d-none")}},{key:"useFileFromFilesHistory",value:function(e){var t=l(e.target).closest(".btn-group").data("file");l(".js-import-file-input").val(t),this.showImportFileAlert(t),this.closeFilesHistory()}},{key:"showImportFileAlert",value:function(e){l(".js-import-file-alert").removeClass("d-none"),l(".js-import-file").text(e)}},{key:"hideImportFileAlert",value:function(){l(".js-import-file-alert").addClass("d-none")}},{key:"hideFileUploadBlock",value:function(){l(".js-file-upload-form-group").addClass("d-none")}},{key:"showFileUploadBlock",value:function(){l(".js-file-upload-form-group").removeClass("d-none")}},{key:"enableFilesHistoryBtn",value:function(){l(".js-from-files-history-btn").removeAttr("disabled")}},{key:"showImportFileError",value:function(e,t,i){var o=l(".js-import-file-error"),n=e+" ("+this.humanizeSize(t)+")";o.find(".js-file-data").html(n),o.find(".js-error-message").html(i),o.removeClass("d-none")}},{key:"hideImportFileError",value:function(){l(".js-import-file-error").addClass("d-none")}},{key:"humanizeSize",value:function(e){return"number"!=typeof e?"":e>=1e9?(e/1e9).toFixed(2)+" GB":e>=1e6?(e/1e6).toFixed(2)+" MB":(e/1e3).toFixed(2)+" KB"}},{key:"uploadFile",value:function(){var e=this;this.hideImportFileError();var t=l("#file"),i=t.prop("files")[0];if(t.data("max-file-upload-size")= 0) hot._disposeHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ // Management API
-/******/ check: hotCheck,
-/******/ apply: hotApply,
-/******/ status: function(l) {
-/******/ if(!l) return hotStatus;
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ addStatusHandler: function(l) {
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ removeStatusHandler: function(l) {
-/******/ var idx = hotStatusHandlers.indexOf(l);
-/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ //inherit from previous dispose call
-/******/ data: hotCurrentModuleData[moduleId]
-/******/ };
-/******/ hotCurrentChildModule = undefined;
-/******/ return hot;
-/******/ }
-/******/
-/******/ var hotStatusHandlers = [];
-/******/ var hotStatus = "idle";
-/******/
-/******/ function hotSetStatus(newStatus) {
-/******/ hotStatus = newStatus;
-/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
-/******/ hotStatusHandlers[i].call(null, newStatus);
-/******/ }
-/******/
-/******/ // while downloading
-/******/ var hotWaitingFiles = 0;
-/******/ var hotChunksLoading = 0;
-/******/ var hotWaitingFilesMap = {};
-/******/ var hotRequestedFilesMap = {};
-/******/ var hotAvailableFilesMap = {};
-/******/ var hotDeferred;
-/******/
-/******/ // The update info
-/******/ var hotUpdate, hotUpdateNewHash;
-/******/
-/******/ function toModuleId(id) {
-/******/ var isNumber = (+id) + "" === id;
-/******/ return isNumber ? +id : id;
-/******/ }
-/******/
-/******/ function hotCheck(apply) {
-/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
-/******/ hotApplyOnUpdate = apply;
-/******/ hotSetStatus("check");
-/******/ return hotDownloadManifest().then(function(update) {
-/******/ if(!update) {
-/******/ hotSetStatus("idle");
-/******/ return null;
-/******/ }
-/******/ hotRequestedFilesMap = {};
-/******/ hotWaitingFilesMap = {};
-/******/ hotAvailableFilesMap = update.c;
-/******/ hotUpdateNewHash = update.h;
-/******/
-/******/ hotSetStatus("prepare");
-/******/ var promise = new Promise(function(resolve, reject) {
-/******/ hotDeferred = {
-/******/ resolve: resolve,
-/******/ reject: reject
-/******/ };
-/******/ });
-/******/ hotUpdate = {};
-/******/ var chunkId = 6;
-/******/ { // eslint-disable-line no-lone-blocks
-/******/ /*globals chunkId */
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ return promise;
-/******/ });
-/******/ }
-/******/
-/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
-/******/ return;
-/******/ hotRequestedFilesMap[chunkId] = false;
-/******/ for(var moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ hotUpdate[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/
-/******/ function hotEnsureUpdateChunk(chunkId) {
-/******/ if(!hotAvailableFilesMap[chunkId]) {
-/******/ hotWaitingFilesMap[chunkId] = true;
-/******/ } else {
-/******/ hotRequestedFilesMap[chunkId] = true;
-/******/ hotWaitingFiles++;
-/******/ hotDownloadUpdateChunk(chunkId);
-/******/ }
-/******/ }
-/******/
-/******/ function hotUpdateDownloaded() {
-/******/ hotSetStatus("ready");
-/******/ var deferred = hotDeferred;
-/******/ hotDeferred = null;
-/******/ if(!deferred) return;
-/******/ if(hotApplyOnUpdate) {
-/******/ hotApply(hotApplyOnUpdate).then(function(result) {
-/******/ deferred.resolve(result);
-/******/ }, function(err) {
-/******/ deferred.reject(err);
-/******/ });
-/******/ } else {
-/******/ var outdatedModules = [];
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ outdatedModules.push(toModuleId(id));
-/******/ }
-/******/ }
-/******/ deferred.resolve(outdatedModules);
-/******/ }
-/******/ }
-/******/
-/******/ function hotApply(options) {
-/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
-/******/ options = options || {};
-/******/
-/******/ var cb;
-/******/ var i;
-/******/ var j;
-/******/ var module;
-/******/ var moduleId;
-/******/
-/******/ function getAffectedStuff(updateModuleId) {
-/******/ var outdatedModules = [updateModuleId];
-/******/ var outdatedDependencies = {};
-/******/
-/******/ var queue = outdatedModules.slice().map(function(id) {
-/******/ return {
-/******/ chain: [id],
-/******/ id: id
-/******/ };
-/******/ });
-/******/ while(queue.length > 0) {
-/******/ var queueItem = queue.pop();
-/******/ var moduleId = queueItem.id;
-/******/ var chain = queueItem.chain;
-/******/ module = installedModules[moduleId];
-/******/ if(!module || module.hot._selfAccepted)
-/******/ continue;
-/******/ if(module.hot._selfDeclined) {
-/******/ return {
-/******/ type: "self-declined",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ if(module.hot._main) {
-/******/ return {
-/******/ type: "unaccepted",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ for(var i = 0; i < module.parents.length; i++) {
-/******/ var parentId = module.parents[i];
-/******/ var parent = installedModules[parentId];
-/******/ if(!parent) continue;
-/******/ if(parent.hot._declinedDependencies[moduleId]) {
-/******/ return {
-/******/ type: "declined",
-/******/ chain: chain.concat([parentId]),
-/******/ moduleId: moduleId,
-/******/ parentId: parentId
-/******/ };
-/******/ }
-/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
-/******/ if(parent.hot._acceptedDependencies[moduleId]) {
-/******/ if(!outdatedDependencies[parentId])
-/******/ outdatedDependencies[parentId] = [];
-/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
-/******/ continue;
-/******/ }
-/******/ delete outdatedDependencies[parentId];
-/******/ outdatedModules.push(parentId);
-/******/ queue.push({
-/******/ chain: chain.concat([parentId]),
-/******/ id: parentId
-/******/ });
-/******/ }
-/******/ }
-/******/
-/******/ return {
-/******/ type: "accepted",
-/******/ moduleId: updateModuleId,
-/******/ outdatedModules: outdatedModules,
-/******/ outdatedDependencies: outdatedDependencies
-/******/ };
-/******/ }
-/******/
-/******/ function addAllToSet(a, b) {
-/******/ for(var i = 0; i < b.length; i++) {
-/******/ var item = b[i];
-/******/ if(a.indexOf(item) < 0)
-/******/ a.push(item);
-/******/ }
-/******/ }
-/******/
-/******/ // at begin all updates modules are outdated
-/******/ // the "outdated" status can propagate to parents if they don't accept the children
-/******/ var outdatedDependencies = {};
-/******/ var outdatedModules = [];
-/******/ var appliedUpdate = {};
-/******/
-/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
-/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
-/******/ };
-/******/
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ moduleId = toModuleId(id);
-/******/ var result;
-/******/ if(hotUpdate[id]) {
-/******/ result = getAffectedStuff(moduleId);
-/******/ } else {
-/******/ result = {
-/******/ type: "disposed",
-/******/ moduleId: id
-/******/ };
-/******/ }
-/******/ var abortError = false;
-/******/ var doApply = false;
-/******/ var doDispose = false;
-/******/ var chainInfo = "";
-/******/ if(result.chain) {
-/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
-/******/ }
-/******/ switch(result.type) {
-/******/ case "self-declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
-/******/ break;
-/******/ case "declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
-/******/ break;
-/******/ case "unaccepted":
-/******/ if(options.onUnaccepted)
-/******/ options.onUnaccepted(result);
-/******/ if(!options.ignoreUnaccepted)
-/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
-/******/ break;
-/******/ case "accepted":
-/******/ if(options.onAccepted)
-/******/ options.onAccepted(result);
-/******/ doApply = true;
-/******/ break;
-/******/ case "disposed":
-/******/ if(options.onDisposed)
-/******/ options.onDisposed(result);
-/******/ doDispose = true;
-/******/ break;
-/******/ default:
-/******/ throw new Error("Unexception type " + result.type);
-/******/ }
-/******/ if(abortError) {
-/******/ hotSetStatus("abort");
-/******/ return Promise.reject(abortError);
-/******/ }
-/******/ if(doApply) {
-/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
-/******/ addAllToSet(outdatedModules, result.outdatedModules);
-/******/ for(moduleId in result.outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
-/******/ if(!outdatedDependencies[moduleId])
-/******/ outdatedDependencies[moduleId] = [];
-/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
-/******/ }
-/******/ }
-/******/ }
-/******/ if(doDispose) {
-/******/ addAllToSet(outdatedModules, [result.moduleId]);
-/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Store self accepted outdated modules to require them later by the module system
-/******/ var outdatedSelfAcceptedModules = [];
-/******/ for(i = 0; i < outdatedModules.length; i++) {
-/******/ moduleId = outdatedModules[i];
-/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
-/******/ outdatedSelfAcceptedModules.push({
-/******/ module: moduleId,
-/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
-/******/ });
-/******/ }
-/******/
-/******/ // Now in "dispose" phase
-/******/ hotSetStatus("dispose");
-/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
-/******/ if(hotAvailableFilesMap[chunkId] === false) {
-/******/ hotDisposeChunk(chunkId);
-/******/ }
-/******/ });
-/******/
-/******/ var idx;
-/******/ var queue = outdatedModules.slice();
-/******/ while(queue.length > 0) {
-/******/ moduleId = queue.pop();
-/******/ module = installedModules[moduleId];
-/******/ if(!module) continue;
-/******/
-/******/ var data = {};
-/******/
-/******/ // Call dispose handlers
-/******/ var disposeHandlers = module.hot._disposeHandlers;
-/******/ for(j = 0; j < disposeHandlers.length; j++) {
-/******/ cb = disposeHandlers[j];
-/******/ cb(data);
-/******/ }
-/******/ hotCurrentModuleData[moduleId] = data;
-/******/
-/******/ // disable module (this disables requires from this module)
-/******/ module.hot.active = false;
-/******/
-/******/ // remove module from cache
-/******/ delete installedModules[moduleId];
-/******/
-/******/ // remove "parents" references from all children
-/******/ for(j = 0; j < module.children.length; j++) {
-/******/ var child = installedModules[module.children[j]];
-/******/ if(!child) continue;
-/******/ idx = child.parents.indexOf(moduleId);
-/******/ if(idx >= 0) {
-/******/ child.parents.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // remove outdated dependency from module children
-/******/ var dependency;
-/******/ var moduleOutdatedDependencies;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
-/******/ dependency = moduleOutdatedDependencies[j];
-/******/ idx = module.children.indexOf(dependency);
-/******/ if(idx >= 0) module.children.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Not in "apply" phase
-/******/ hotSetStatus("apply");
-/******/
-/******/ hotCurrentHash = hotUpdateNewHash;
-/******/
-/******/ // insert new code
-/******/ for(moduleId in appliedUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
-/******/ modules[moduleId] = appliedUpdate[moduleId];
-/******/ }
-/******/ }
-/******/
-/******/ // call accept handlers
-/******/ var error = null;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ var callbacks = [];
-/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
-/******/ dependency = moduleOutdatedDependencies[i];
-/******/ cb = module.hot._acceptedDependencies[dependency];
-/******/ if(callbacks.indexOf(cb) >= 0) continue;
-/******/ callbacks.push(cb);
-/******/ }
-/******/ for(i = 0; i < callbacks.length; i++) {
-/******/ cb = callbacks[i];
-/******/ try {
-/******/ cb(moduleOutdatedDependencies);
-/******/ } catch(err) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "accept-errored",
-/******/ moduleId: moduleId,
-/******/ dependencyId: moduleOutdatedDependencies[i],
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Load self accepted modules
-/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
-/******/ var item = outdatedSelfAcceptedModules[i];
-/******/ moduleId = item.module;
-/******/ hotCurrentParents = [moduleId];
-/******/ try {
-/******/ __webpack_require__(moduleId);
-/******/ } catch(err) {
-/******/ if(typeof item.errorHandler === "function") {
-/******/ try {
-/******/ item.errorHandler(err);
-/******/ } catch(err2) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-error-handler-errored",
-/******/ moduleId: moduleId,
-/******/ error: err2,
-/******/ orginalError: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err2;
-/******/ }
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ } else {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-errored",
-/******/ moduleId: moduleId,
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // handle errors in accept handlers and self accepted module load
-/******/ if(error) {
-/******/ hotSetStatus("fail");
-/******/ return Promise.reject(error);
-/******/ }
-/******/
-/******/ hotSetStatus("idle");
-/******/ return new Promise(function(resolve) {
-/******/ resolve(outdatedModules);
-/******/ });
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {},
-/******/ hot: hotCreateModule(moduleId),
-/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
-/******/ children: []
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // identity function for calling harmony imports with the correct context
-/******/ __webpack_require__.i = function(value) { return value; };
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // __webpack_hash__
-/******/ __webpack_require__.h = function() { return hotCurrentHash; };
-/******/
-/******/ // Load entry module and return exports
-/******/ return hotCreateRequire(466)(__webpack_require__.s = 466);
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 2:
-/***/ (function(module, exports) {
-
-var g;
-
-// This works in non-strict mode
-g = (function() {
- return this;
-})();
-
-try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
-} catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
-
-/***/ }),
-
-/***/ 237:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app_utils_datepicker__ = __webpack_require__(38);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_translatable_input__ = __webpack_require__(29);
-/**
- * 2007-2017 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2017 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-
-
-var $ = window.$;
-
-$(function () {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__app_utils_datepicker__["a" /* default */])();
- new __WEBPACK_IMPORTED_MODULE_1__components_translatable_input__["a" /* default */]();
-});
-
-/***/ }),
-
-/***/ 29:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-var TranslatableInput = function () {
- function TranslatableInput() {
- _classCallCheck(this, TranslatableInput);
-
- $('body').on('click', '.js-locale-item', this.toggleInputs);
- }
-
- /**
- * Toggle all translatable inputs in form in which locale was changed
- *
- * @param {Event} event
- */
-
-
- _createClass(TranslatableInput, [{
- key: 'toggleInputs',
- value: function toggleInputs(event) {
- var localeItem = $(event.target);
- var form = localeItem.closest('form');
- var selectedLocale = localeItem.data('locale');
-
- form.find('.js-locale-btn').text(selectedLocale);
-
- form.find('input.js-locale-input').addClass('d-none');
- form.find('input.js-locale-input.js-locale-' + selectedLocale).removeClass('d-none');
- }
- }]);
-
- return TranslatableInput;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (TranslatableInput);
-
-/***/ }),
-
-/***/ 38:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_url_polyfill__ = __webpack_require__(70);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_url_polyfill___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_url_polyfill__);
-/**
- * 2007-2017 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2017 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-var $ = global.$;
-
-/**
- * Enable all datepickers.
- */
-var init = function initDatePickers() {
- $('.datepicker input[type="text"]').datetimepicker({
- locale: global.full_language_code,
- format: 'YYYY-MM-DD'
- });
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (init);
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2)))
-
-/***/ }),
-
-/***/ 466:
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(237);
-
-
-/***/ }),
-
-/***/ 70:
-/***/ (function(module, exports, __webpack_require__) {
-
-/* WEBPACK VAR INJECTION */(function(global) {(function(global) {
- /**
- * Polyfill URLSearchParams
- *
- * Inspired from : https://github.com/WebReflection/url-search-params/blob/master/src/url-search-params.js
- */
-
- var checkIfIteratorIsSupported = function() {
- try {
- return !!Symbol.iterator;
- } catch(error) {
- return false;
- }
- };
-
-
- var iteratorSupported = checkIfIteratorIsSupported();
-
- var createIterator = function(items) {
- var iterator = {
- next: function() {
- var value = items.shift();
- return { done: value === void 0, value: value };
- }
- };
-
- if(iteratorSupported) {
- iterator[Symbol.iterator] = function() {
- return iterator;
- };
- }
-
- return iterator;
- };
-
- var polyfillURLSearchParams= function() {
-
- var URLSearchParams = function(searchString) {
- Object.defineProperty(this, '_entries', { value: {} });
-
- if(typeof searchString === 'string') {
- if(searchString !== '') {
- searchString = searchString.replace(/^\?/, '');
- var attributes = searchString.split('&');
- var attribute;
- for(var i = 0; i < attributes.length; i++) {
- attribute = attributes[i].split('=');
- this.append(
- decodeURIComponent(attribute[0]),
- (attribute.length > 1) ? decodeURIComponent(attribute[1]) : ''
- );
- }
- }
- } else if(searchString instanceof URLSearchParams) {
- var _this = this;
- searchString.forEach(function(value, name) {
- _this.append(value, name);
- });
- }
- };
-
- var proto = URLSearchParams.prototype;
-
- proto.append = function(name, value) {
- if(name in this._entries) {
- this._entries[name].push(value.toString());
- } else {
- this._entries[name] = [value.toString()];
- }
- };
-
- proto.delete = function(name) {
- delete this._entries[name];
- };
-
- proto.get = function(name) {
- return (name in this._entries) ? this._entries[name][0] : null;
- };
-
- proto.getAll = function(name) {
- return (name in this._entries) ? this._entries[name].slice(0) : [];
- };
-
- proto.has = function(name) {
- return (name in this._entries);
- };
-
- proto.set = function(name, value) {
- this._entries[name] = [value.toString()];
- };
-
- proto.forEach = function(callback, thisArg) {
- var entries;
- for(var name in this._entries) {
- if(this._entries.hasOwnProperty(name)) {
- entries = this._entries[name];
- for(var i = 0; i < entries.length; i++) {
- callback.call(thisArg, entries[i], name, this);
- }
- }
- }
- };
-
- proto.keys = function() {
- var items = [];
- this.forEach(function(value, name) { items.push(name); });
- return createIterator(items);
- };
-
- proto.values = function() {
- var items = [];
- this.forEach(function(value) { items.push(value); });
- return createIterator(items);
- };
-
- proto.entries = function() {
- var items = [];
- this.forEach(function(value, name) { items.push([name, value]); });
- return createIterator(items);
- };
-
- if(iteratorSupported) {
- proto[Symbol.iterator] = proto.entries;
- }
-
- proto.toString = function() {
- var searchString = '';
- this.forEach(function(value, name) {
- if(searchString.length > 0) searchString+= '&';
- searchString += encodeURIComponent(name) + '=' + encodeURIComponent(value);
- });
- return searchString;
- };
-
- global.URLSearchParams = URLSearchParams;
- };
-
- if(!('URLSearchParams' in global) || (new URLSearchParams('?a=1').toString() !== 'a=1')) {
- polyfillURLSearchParams();
- }
-
- // HTMLAnchorElement
-
-})(
- (typeof global !== 'undefined') ? global
- : ((typeof window !== 'undefined') ? window
- : ((typeof self !== 'undefined') ? self : this))
-);
-
-(function(global) {
- /**
- * Polyfill URL
- *
- * Inspired from : https://github.com/arv/DOM-URL-Polyfill/blob/master/src/url.js
- */
-
- var checkIfURLIsSupported = function() {
- try {
- var u = new URL('b', 'http://a');
- u.pathname = 'c%20d';
- return (u.href === 'http://a/c%20d') && u.searchParams;
- } catch(e) {
- return false;
- }
- };
-
-
- var polyfillURL = function() {
- var _URL = global.URL;
-
- var URL = function(url, base) {
- if(typeof url !== 'string') url = String(url);
-
- var doc = document.implementation.createHTMLDocument('');
- window.doc = doc;
- if(base) {
- var baseElement = doc.createElement('base');
- baseElement.href = base;
- doc.head.appendChild(baseElement);
- }
-
- var anchorElement = doc.createElement('a');
- anchorElement.href = url;
- doc.body.appendChild(anchorElement);
- anchorElement.href = anchorElement.href; // force href to refresh
-
- if(anchorElement.protocol === ':' || !/:/.test(anchorElement.href)) {
- throw new TypeError('Invalid URL');
- }
-
- Object.defineProperty(this, '_anchorElement', {
- value: anchorElement
- });
- };
-
- var proto = URL.prototype;
-
- var linkURLWithAnchorAttribute = function(attributeName) {
- Object.defineProperty(proto, attributeName, {
- get: function() {
- return this._anchorElement[attributeName];
- },
- set: function(value) {
- this._anchorElement[attributeName] = value;
- },
- enumerable: true
- });
- };
-
- ['hash', 'host', 'hostname', 'port', 'protocol', 'search']
- .forEach(function(attributeName) {
- linkURLWithAnchorAttribute(attributeName);
- });
-
- Object.defineProperties(proto, {
-
- 'toString': {
- get: function() {
- var _this = this;
- return function() {
- return _this.href;
- };
- }
- },
-
- 'href' : {
- get: function() {
- return this._anchorElement.href.replace(/\?$/,'');
- },
- set: function(value) {
- this._anchorElement.href = value;
- },
- enumerable: true
- },
-
- 'pathname' : {
- get: function() {
- return this._anchorElement.pathname.replace(/(^\/?)/,'/');
- },
- set: function(value) {
- this._anchorElement.pathname = value;
- },
- enumerable: true
- },
-
- 'origin': {
- get: function() {
- return this._anchorElement.protocol + '//' + this._anchorElement.hostname + (this._anchorElement.port ? (':' + this._anchorElement.port) : '');
- },
- enumerable: true
- },
-
- 'password': { // TODO
- get: function() {
- return '';
- },
- set: function(value) {
- },
- enumerable: true
- },
-
- 'username': { // TODO
- get: function() {
- return '';
- },
- set: function(value) {
- },
- enumerable: true
- },
-
- 'searchParams': {
- get: function() {
- var searchParams = new URLSearchParams(this.search);
- var _this = this;
- ['append', 'delete', 'set'].forEach(function(methodName) {
- var method = searchParams[methodName];
- searchParams[methodName] = function() {
- method.apply(searchParams, arguments);
- _this.search = searchParams.toString();
- };
- });
- return searchParams;
- },
- enumerable: true
- }
- });
-
- URL.createObjectURL = function(blob) {
- return _URL.createObjectURL.apply(_URL, arguments);
- };
-
- URL.revokeObjectURL = function(url) {
- return _URL.revokeObjectURL.apply(_URL, arguments);
- };
-
- global.URL = URL;
-
- };
-
- if(!checkIfURLIsSupported()) {
- polyfillURL();
- }
-
- if((global.location !== void 0) && !('origin' in global.location)) {
- var getOrigin = function() {
- return global.location.protocol + '//' + global.location.hostname + (global.location.port ? (':' + global.location.port) : '');
- };
-
- try {
- Object.defineProperty(global.location, 'origin', {
- get: getOrigin,
- enumerable: true
- });
- } catch(e) {
- setInterval(function() {
- global.location.origin = getOrigin();
- }, 100);
- }
- }
-
-})(
- (typeof global !== 'undefined') ? global
- : ((typeof window !== 'undefined') ? window
- : ((typeof self !== 'undefined') ? self : this))
-);
-
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
-
-/***/ })
-
-/******/ });
\ No newline at end of file
+var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=381)}({19:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n1?decodeURIComponent(e[1]):"")}}else if(t instanceof r){var i=this;t.forEach(function(t,e){i.append(t,e)})}},o=r.prototype;o.append=function(t,e){t in this._entries?this._entries[t].push(e.toString()):this._entries[t]=[e.toString()]},o.delete=function(t){delete this._entries[t]},o.get=function(t){return t in this._entries?this._entries[t][0]:null},o.getAll=function(t){return t in this._entries?this._entries[t].slice(0):[]},o.has=function(t){return t in this._entries},o.set=function(t,e){this._entries[t]=[e.toString()]},o.forEach=function(t,e){var n;for(var r in this._entries)if(this._entries.hasOwnProperty(r)){n=this._entries[r];for(var o=0;o0&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e)}),t},t.URLSearchParams=r}()}(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t){if(function(){try{var t=new URL("b","http://a");return t.pathname="c%20d","http://a/c%20d"===t.href&&t.searchParams}catch(t){return!1}}()||function(){var e=t.URL,n=function(t,e){"string"!=typeof t&&(t=String(t));var n=document.implementation.createHTMLDocument("");if(window.doc=n,e){var r=n.createElement("base");r.href=e,n.head.appendChild(r)}var o=n.createElement("a");if(o.href=t,n.body.appendChild(o),o.href=o.href,":"===o.protocol||!/:/.test(o.href))throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:o})},r=n.prototype,o=function(t){Object.defineProperty(r,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:!0})};["hash","host","hostname","port","protocol","search"].forEach(function(t){o(t)}),Object.defineProperties(r,{toString:{get:function(){var t=this;return function(){return t.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(t){this._anchorElement.href=t},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(t){this._anchorElement.pathname=t},enumerable:!0},origin:{get:function(){return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(this._anchorElement.port?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(t){},enumerable:!0},username:{get:function(){return""},set:function(t){},enumerable:!0},searchParams:{get:function(){var t=new URLSearchParams(this.search),e=this;return["append","delete","set"].forEach(function(n){var r=t[n];t[n]=function(){r.apply(t,arguments),e.search=t.toString()}}),t},enumerable:!0}}),n.createObjectURL=function(t){return e.createObjectURL.apply(e,arguments)},n.revokeObjectURL=function(t){return e.revokeObjectURL.apply(e,arguments)},t.URL=n}(),void 0!==t.location&&!("origin"in t.location)){var e=function(){return t.location.protocol+"//"+t.location.hostname+(t.location.port?":"+t.location.port:"")};try{Object.defineProperty(t.location,"origin",{get:e,enumerable:!0})}catch(n){setInterval(function(){t.location.origin=e()},100)}}}(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)}).call(e,n(2))}});
\ No newline at end of file
diff --git a/admin-dev/themes/new-theme/public/localization.bundle.js b/admin-dev/themes/new-theme/public/localization.bundle.js
index 46baea3165748..a49f1c7abef59 100644
--- a/admin-dev/themes/new-theme/public/localization.bundle.js
+++ b/admin-dev/themes/new-theme/public/localization.bundle.js
@@ -1,720 +1,6 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ function hotDisposeChunk(chunkId) {
-/******/ delete installedChunks[chunkId];
-/******/ }
-/******/ var parentHotUpdateCallback = this["webpackHotUpdate"];
-/******/ this["webpackHotUpdate"] =
-/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ hotAddUpdateChunk(chunkId, moreModules);
-/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
-/******/ } ;
-/******/
-/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
-/******/ var head = document.getElementsByTagName("head")[0];
-/******/ var script = document.createElement("script");
-/******/ script.type = "text/javascript";
-/******/ script.charset = "utf-8";
-/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js";
-/******/ head.appendChild(script);
-/******/ }
-/******/
-/******/ function hotDownloadManifest() { // eslint-disable-line no-unused-vars
-/******/ return new Promise(function(resolve, reject) {
-/******/ if(typeof XMLHttpRequest === "undefined")
-/******/ return reject(new Error("No browser support"));
-/******/ try {
-/******/ var request = new XMLHttpRequest();
-/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json";
-/******/ request.open("GET", requestPath, true);
-/******/ request.timeout = 10000;
-/******/ request.send(null);
-/******/ } catch(err) {
-/******/ return reject(err);
-/******/ }
-/******/ request.onreadystatechange = function() {
-/******/ if(request.readyState !== 4) return;
-/******/ if(request.status === 0) {
-/******/ // timeout
-/******/ reject(new Error("Manifest request to " + requestPath + " timed out."));
-/******/ } else if(request.status === 404) {
-/******/ // no update available
-/******/ resolve();
-/******/ } else if(request.status !== 200 && request.status !== 304) {
-/******/ // other failure
-/******/ reject(new Error("Manifest request to " + requestPath + " failed."));
-/******/ } else {
-/******/ // success
-/******/ try {
-/******/ var update = JSON.parse(request.responseText);
-/******/ } catch(e) {
-/******/ reject(e);
-/******/ return;
-/******/ }
-/******/ resolve(update);
-/******/ }
-/******/ };
-/******/ });
-/******/ }
+/******/!function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}// webpackBootstrap
/******/
-/******/
-/******/
-/******/ var hotApplyOnUpdate = true;
-/******/ var hotCurrentHash = "ad45789801c39aad8ed7"; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentModuleData = {};
-/******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
-/******/
-/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars
-/******/ var me = installedModules[moduleId];
-/******/ if(!me) return __webpack_require__;
-/******/ var fn = function(request) {
-/******/ if(me.hot.active) {
-/******/ if(installedModules[request]) {
-/******/ if(installedModules[request].parents.indexOf(moduleId) < 0)
-/******/ installedModules[request].parents.push(moduleId);
-/******/ } else {
-/******/ hotCurrentParents = [moduleId];
-/******/ hotCurrentChildModule = request;
-/******/ }
-/******/ if(me.children.indexOf(request) < 0)
-/******/ me.children.push(request);
-/******/ } else {
-/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
-/******/ hotCurrentParents = [];
-/******/ }
-/******/ return __webpack_require__(request);
-/******/ };
-/******/ var ObjectFactory = function ObjectFactory(name) {
-/******/ return {
-/******/ configurable: true,
-/******/ enumerable: true,
-/******/ get: function() {
-/******/ return __webpack_require__[name];
-/******/ },
-/******/ set: function(value) {
-/******/ __webpack_require__[name] = value;
-/******/ }
-/******/ };
-/******/ };
-/******/ for(var name in __webpack_require__) {
-/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== "e") {
-/******/ Object.defineProperty(fn, name, ObjectFactory(name));
-/******/ }
-/******/ }
-/******/ fn.e = function(chunkId) {
-/******/ if(hotStatus === "ready")
-/******/ hotSetStatus("prepare");
-/******/ hotChunksLoading++;
-/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
-/******/ finishChunkLoading();
-/******/ throw err;
-/******/ });
-/******/
-/******/ function finishChunkLoading() {
-/******/ hotChunksLoading--;
-/******/ if(hotStatus === "prepare") {
-/******/ if(!hotWaitingFilesMap[chunkId]) {
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/ }
-/******/ };
-/******/ return fn;
-/******/ }
-/******/
-/******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars
-/******/ var hot = {
-/******/ // private stuff
-/******/ _acceptedDependencies: {},
-/******/ _declinedDependencies: {},
-/******/ _selfAccepted: false,
-/******/ _selfDeclined: false,
-/******/ _disposeHandlers: [],
-/******/ _main: hotCurrentChildModule !== moduleId,
-/******/
-/******/ // Module API
-/******/ active: true,
-/******/ accept: function(dep, callback) {
-/******/ if(typeof dep === "undefined")
-/******/ hot._selfAccepted = true;
-/******/ else if(typeof dep === "function")
-/******/ hot._selfAccepted = dep;
-/******/ else if(typeof dep === "object")
-/******/ for(var i = 0; i < dep.length; i++)
-/******/ hot._acceptedDependencies[dep[i]] = callback || function() {};
-/******/ else
-/******/ hot._acceptedDependencies[dep] = callback || function() {};
-/******/ },
-/******/ decline: function(dep) {
-/******/ if(typeof dep === "undefined")
-/******/ hot._selfDeclined = true;
-/******/ else if(typeof dep === "object")
-/******/ for(var i = 0; i < dep.length; i++)
-/******/ hot._declinedDependencies[dep[i]] = true;
-/******/ else
-/******/ hot._declinedDependencies[dep] = true;
-/******/ },
-/******/ dispose: function(callback) {
-/******/ hot._disposeHandlers.push(callback);
-/******/ },
-/******/ addDisposeHandler: function(callback) {
-/******/ hot._disposeHandlers.push(callback);
-/******/ },
-/******/ removeDisposeHandler: function(callback) {
-/******/ var idx = hot._disposeHandlers.indexOf(callback);
-/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ // Management API
-/******/ check: hotCheck,
-/******/ apply: hotApply,
-/******/ status: function(l) {
-/******/ if(!l) return hotStatus;
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ addStatusHandler: function(l) {
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ removeStatusHandler: function(l) {
-/******/ var idx = hotStatusHandlers.indexOf(l);
-/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ //inherit from previous dispose call
-/******/ data: hotCurrentModuleData[moduleId]
-/******/ };
-/******/ hotCurrentChildModule = undefined;
-/******/ return hot;
-/******/ }
-/******/
-/******/ var hotStatusHandlers = [];
-/******/ var hotStatus = "idle";
-/******/
-/******/ function hotSetStatus(newStatus) {
-/******/ hotStatus = newStatus;
-/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
-/******/ hotStatusHandlers[i].call(null, newStatus);
-/******/ }
-/******/
-/******/ // while downloading
-/******/ var hotWaitingFiles = 0;
-/******/ var hotChunksLoading = 0;
-/******/ var hotWaitingFilesMap = {};
-/******/ var hotRequestedFilesMap = {};
-/******/ var hotAvailableFilesMap = {};
-/******/ var hotDeferred;
-/******/
-/******/ // The update info
-/******/ var hotUpdate, hotUpdateNewHash;
-/******/
-/******/ function toModuleId(id) {
-/******/ var isNumber = (+id) + "" === id;
-/******/ return isNumber ? +id : id;
-/******/ }
-/******/
-/******/ function hotCheck(apply) {
-/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
-/******/ hotApplyOnUpdate = apply;
-/******/ hotSetStatus("check");
-/******/ return hotDownloadManifest().then(function(update) {
-/******/ if(!update) {
-/******/ hotSetStatus("idle");
-/******/ return null;
-/******/ }
-/******/ hotRequestedFilesMap = {};
-/******/ hotWaitingFilesMap = {};
-/******/ hotAvailableFilesMap = update.c;
-/******/ hotUpdateNewHash = update.h;
-/******/
-/******/ hotSetStatus("prepare");
-/******/ var promise = new Promise(function(resolve, reject) {
-/******/ hotDeferred = {
-/******/ resolve: resolve,
-/******/ reject: reject
-/******/ };
-/******/ });
-/******/ hotUpdate = {};
-/******/ var chunkId = 14;
-/******/ { // eslint-disable-line no-lone-blocks
-/******/ /*globals chunkId */
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ return promise;
-/******/ });
-/******/ }
-/******/
-/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
-/******/ return;
-/******/ hotRequestedFilesMap[chunkId] = false;
-/******/ for(var moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ hotUpdate[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/
-/******/ function hotEnsureUpdateChunk(chunkId) {
-/******/ if(!hotAvailableFilesMap[chunkId]) {
-/******/ hotWaitingFilesMap[chunkId] = true;
-/******/ } else {
-/******/ hotRequestedFilesMap[chunkId] = true;
-/******/ hotWaitingFiles++;
-/******/ hotDownloadUpdateChunk(chunkId);
-/******/ }
-/******/ }
-/******/
-/******/ function hotUpdateDownloaded() {
-/******/ hotSetStatus("ready");
-/******/ var deferred = hotDeferred;
-/******/ hotDeferred = null;
-/******/ if(!deferred) return;
-/******/ if(hotApplyOnUpdate) {
-/******/ hotApply(hotApplyOnUpdate).then(function(result) {
-/******/ deferred.resolve(result);
-/******/ }, function(err) {
-/******/ deferred.reject(err);
-/******/ });
-/******/ } else {
-/******/ var outdatedModules = [];
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ outdatedModules.push(toModuleId(id));
-/******/ }
-/******/ }
-/******/ deferred.resolve(outdatedModules);
-/******/ }
-/******/ }
-/******/
-/******/ function hotApply(options) {
-/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
-/******/ options = options || {};
-/******/
-/******/ var cb;
-/******/ var i;
-/******/ var j;
-/******/ var module;
-/******/ var moduleId;
-/******/
-/******/ function getAffectedStuff(updateModuleId) {
-/******/ var outdatedModules = [updateModuleId];
-/******/ var outdatedDependencies = {};
-/******/
-/******/ var queue = outdatedModules.slice().map(function(id) {
-/******/ return {
-/******/ chain: [id],
-/******/ id: id
-/******/ };
-/******/ });
-/******/ while(queue.length > 0) {
-/******/ var queueItem = queue.pop();
-/******/ var moduleId = queueItem.id;
-/******/ var chain = queueItem.chain;
-/******/ module = installedModules[moduleId];
-/******/ if(!module || module.hot._selfAccepted)
-/******/ continue;
-/******/ if(module.hot._selfDeclined) {
-/******/ return {
-/******/ type: "self-declined",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ if(module.hot._main) {
-/******/ return {
-/******/ type: "unaccepted",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ for(var i = 0; i < module.parents.length; i++) {
-/******/ var parentId = module.parents[i];
-/******/ var parent = installedModules[parentId];
-/******/ if(!parent) continue;
-/******/ if(parent.hot._declinedDependencies[moduleId]) {
-/******/ return {
-/******/ type: "declined",
-/******/ chain: chain.concat([parentId]),
-/******/ moduleId: moduleId,
-/******/ parentId: parentId
-/******/ };
-/******/ }
-/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
-/******/ if(parent.hot._acceptedDependencies[moduleId]) {
-/******/ if(!outdatedDependencies[parentId])
-/******/ outdatedDependencies[parentId] = [];
-/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
-/******/ continue;
-/******/ }
-/******/ delete outdatedDependencies[parentId];
-/******/ outdatedModules.push(parentId);
-/******/ queue.push({
-/******/ chain: chain.concat([parentId]),
-/******/ id: parentId
-/******/ });
-/******/ }
-/******/ }
-/******/
-/******/ return {
-/******/ type: "accepted",
-/******/ moduleId: updateModuleId,
-/******/ outdatedModules: outdatedModules,
-/******/ outdatedDependencies: outdatedDependencies
-/******/ };
-/******/ }
-/******/
-/******/ function addAllToSet(a, b) {
-/******/ for(var i = 0; i < b.length; i++) {
-/******/ var item = b[i];
-/******/ if(a.indexOf(item) < 0)
-/******/ a.push(item);
-/******/ }
-/******/ }
-/******/
-/******/ // at begin all updates modules are outdated
-/******/ // the "outdated" status can propagate to parents if they don't accept the children
-/******/ var outdatedDependencies = {};
-/******/ var outdatedModules = [];
-/******/ var appliedUpdate = {};
-/******/
-/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
-/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
-/******/ };
-/******/
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ moduleId = toModuleId(id);
-/******/ var result;
-/******/ if(hotUpdate[id]) {
-/******/ result = getAffectedStuff(moduleId);
-/******/ } else {
-/******/ result = {
-/******/ type: "disposed",
-/******/ moduleId: id
-/******/ };
-/******/ }
-/******/ var abortError = false;
-/******/ var doApply = false;
-/******/ var doDispose = false;
-/******/ var chainInfo = "";
-/******/ if(result.chain) {
-/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
-/******/ }
-/******/ switch(result.type) {
-/******/ case "self-declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
-/******/ break;
-/******/ case "declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
-/******/ break;
-/******/ case "unaccepted":
-/******/ if(options.onUnaccepted)
-/******/ options.onUnaccepted(result);
-/******/ if(!options.ignoreUnaccepted)
-/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
-/******/ break;
-/******/ case "accepted":
-/******/ if(options.onAccepted)
-/******/ options.onAccepted(result);
-/******/ doApply = true;
-/******/ break;
-/******/ case "disposed":
-/******/ if(options.onDisposed)
-/******/ options.onDisposed(result);
-/******/ doDispose = true;
-/******/ break;
-/******/ default:
-/******/ throw new Error("Unexception type " + result.type);
-/******/ }
-/******/ if(abortError) {
-/******/ hotSetStatus("abort");
-/******/ return Promise.reject(abortError);
-/******/ }
-/******/ if(doApply) {
-/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
-/******/ addAllToSet(outdatedModules, result.outdatedModules);
-/******/ for(moduleId in result.outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
-/******/ if(!outdatedDependencies[moduleId])
-/******/ outdatedDependencies[moduleId] = [];
-/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
-/******/ }
-/******/ }
-/******/ }
-/******/ if(doDispose) {
-/******/ addAllToSet(outdatedModules, [result.moduleId]);
-/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Store self accepted outdated modules to require them later by the module system
-/******/ var outdatedSelfAcceptedModules = [];
-/******/ for(i = 0; i < outdatedModules.length; i++) {
-/******/ moduleId = outdatedModules[i];
-/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
-/******/ outdatedSelfAcceptedModules.push({
-/******/ module: moduleId,
-/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
-/******/ });
-/******/ }
-/******/
-/******/ // Now in "dispose" phase
-/******/ hotSetStatus("dispose");
-/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
-/******/ if(hotAvailableFilesMap[chunkId] === false) {
-/******/ hotDisposeChunk(chunkId);
-/******/ }
-/******/ });
-/******/
-/******/ var idx;
-/******/ var queue = outdatedModules.slice();
-/******/ while(queue.length > 0) {
-/******/ moduleId = queue.pop();
-/******/ module = installedModules[moduleId];
-/******/ if(!module) continue;
-/******/
-/******/ var data = {};
-/******/
-/******/ // Call dispose handlers
-/******/ var disposeHandlers = module.hot._disposeHandlers;
-/******/ for(j = 0; j < disposeHandlers.length; j++) {
-/******/ cb = disposeHandlers[j];
-/******/ cb(data);
-/******/ }
-/******/ hotCurrentModuleData[moduleId] = data;
-/******/
-/******/ // disable module (this disables requires from this module)
-/******/ module.hot.active = false;
-/******/
-/******/ // remove module from cache
-/******/ delete installedModules[moduleId];
-/******/
-/******/ // remove "parents" references from all children
-/******/ for(j = 0; j < module.children.length; j++) {
-/******/ var child = installedModules[module.children[j]];
-/******/ if(!child) continue;
-/******/ idx = child.parents.indexOf(moduleId);
-/******/ if(idx >= 0) {
-/******/ child.parents.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // remove outdated dependency from module children
-/******/ var dependency;
-/******/ var moduleOutdatedDependencies;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
-/******/ dependency = moduleOutdatedDependencies[j];
-/******/ idx = module.children.indexOf(dependency);
-/******/ if(idx >= 0) module.children.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Not in "apply" phase
-/******/ hotSetStatus("apply");
-/******/
-/******/ hotCurrentHash = hotUpdateNewHash;
-/******/
-/******/ // insert new code
-/******/ for(moduleId in appliedUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
-/******/ modules[moduleId] = appliedUpdate[moduleId];
-/******/ }
-/******/ }
-/******/
-/******/ // call accept handlers
-/******/ var error = null;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ var callbacks = [];
-/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
-/******/ dependency = moduleOutdatedDependencies[i];
-/******/ cb = module.hot._acceptedDependencies[dependency];
-/******/ if(callbacks.indexOf(cb) >= 0) continue;
-/******/ callbacks.push(cb);
-/******/ }
-/******/ for(i = 0; i < callbacks.length; i++) {
-/******/ cb = callbacks[i];
-/******/ try {
-/******/ cb(moduleOutdatedDependencies);
-/******/ } catch(err) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "accept-errored",
-/******/ moduleId: moduleId,
-/******/ dependencyId: moduleOutdatedDependencies[i],
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Load self accepted modules
-/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
-/******/ var item = outdatedSelfAcceptedModules[i];
-/******/ moduleId = item.module;
-/******/ hotCurrentParents = [moduleId];
-/******/ try {
-/******/ __webpack_require__(moduleId);
-/******/ } catch(err) {
-/******/ if(typeof item.errorHandler === "function") {
-/******/ try {
-/******/ item.errorHandler(err);
-/******/ } catch(err2) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-error-handler-errored",
-/******/ moduleId: moduleId,
-/******/ error: err2,
-/******/ orginalError: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err2;
-/******/ }
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ } else {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-errored",
-/******/ moduleId: moduleId,
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // handle errors in accept handlers and self accepted module load
-/******/ if(error) {
-/******/ hotSetStatus("fail");
-/******/ return Promise.reject(error);
-/******/ }
-/******/
-/******/ hotSetStatus("idle");
-/******/ return new Promise(function(resolve) {
-/******/ resolve(outdatedModules);
-/******/ });
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {},
-/******/ hot: hotCreateModule(moduleId),
-/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
-/******/ children: []
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // identity function for calling harmony imports with the correct context
-/******/ __webpack_require__.i = function(value) { return value; };
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // __webpack_hash__
-/******/ __webpack_require__.h = function() { return hotCurrentHash; };
-/******/
-/******/ // Load entry module and return exports
-/******/ return hotCreateRequire(467)(__webpack_require__.s = 467);
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 238:
-/***/ (function(module, exports) {
-
-/**
+var r={};t.m=n,t.c=r,t.i=function(n){return n},t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:e})},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,"a",r),r},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=382)}({193:function(n,t){/**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
@@ -738,24 +24,4 @@
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
-
-var $ = window.$;
-
-$(function () {
- // show warning message when currency is changed
- $('#form_configuration_default_currency').on('change', function () {
- alert($(this).data('warning-message'));
- });
-});
-
-/***/ }),
-
-/***/ 467:
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(238);
-
-
-/***/ })
-
-/******/ });
\ No newline at end of file
+var r=window.$;r(function(){r("#form_configuration_default_currency").on("change",function(){alert(r(this).data("warning-message"))})})},382:function(n,t,r){n.exports=r(193)}});
\ No newline at end of file
diff --git a/admin-dev/themes/new-theme/public/logs.bundle.js b/admin-dev/themes/new-theme/public/logs.bundle.js
index 94579e30a7622..529fd5966f880 100644
--- a/admin-dev/themes/new-theme/public/logs.bundle.js
+++ b/admin-dev/themes/new-theme/public/logs.bundle.js
@@ -1,889 +1,6 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ function hotDisposeChunk(chunkId) {
-/******/ delete installedChunks[chunkId];
-/******/ }
-/******/ var parentHotUpdateCallback = this["webpackHotUpdate"];
-/******/ this["webpackHotUpdate"] =
-/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ hotAddUpdateChunk(chunkId, moreModules);
-/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
-/******/ } ;
-/******/
-/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
-/******/ var head = document.getElementsByTagName("head")[0];
-/******/ var script = document.createElement("script");
-/******/ script.type = "text/javascript";
-/******/ script.charset = "utf-8";
-/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js";
-/******/ head.appendChild(script);
-/******/ }
-/******/
-/******/ function hotDownloadManifest() { // eslint-disable-line no-unused-vars
-/******/ return new Promise(function(resolve, reject) {
-/******/ if(typeof XMLHttpRequest === "undefined")
-/******/ return reject(new Error("No browser support"));
-/******/ try {
-/******/ var request = new XMLHttpRequest();
-/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json";
-/******/ request.open("GET", requestPath, true);
-/******/ request.timeout = 10000;
-/******/ request.send(null);
-/******/ } catch(err) {
-/******/ return reject(err);
-/******/ }
-/******/ request.onreadystatechange = function() {
-/******/ if(request.readyState !== 4) return;
-/******/ if(request.status === 0) {
-/******/ // timeout
-/******/ reject(new Error("Manifest request to " + requestPath + " timed out."));
-/******/ } else if(request.status === 404) {
-/******/ // no update available
-/******/ resolve();
-/******/ } else if(request.status !== 200 && request.status !== 304) {
-/******/ // other failure
-/******/ reject(new Error("Manifest request to " + requestPath + " failed."));
-/******/ } else {
-/******/ // success
-/******/ try {
-/******/ var update = JSON.parse(request.responseText);
-/******/ } catch(e) {
-/******/ reject(e);
-/******/ return;
-/******/ }
-/******/ resolve(update);
-/******/ }
-/******/ };
-/******/ });
-/******/ }
+/******/!function(n){function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}// webpackBootstrap
/******/
-/******/
-/******/
-/******/ var hotApplyOnUpdate = true;
-/******/ var hotCurrentHash = "ad45789801c39aad8ed7"; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentModuleData = {};
-/******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
-/******/
-/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars
-/******/ var me = installedModules[moduleId];
-/******/ if(!me) return __webpack_require__;
-/******/ var fn = function(request) {
-/******/ if(me.hot.active) {
-/******/ if(installedModules[request]) {
-/******/ if(installedModules[request].parents.indexOf(moduleId) < 0)
-/******/ installedModules[request].parents.push(moduleId);
-/******/ } else {
-/******/ hotCurrentParents = [moduleId];
-/******/ hotCurrentChildModule = request;
-/******/ }
-/******/ if(me.children.indexOf(request) < 0)
-/******/ me.children.push(request);
-/******/ } else {
-/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
-/******/ hotCurrentParents = [];
-/******/ }
-/******/ return __webpack_require__(request);
-/******/ };
-/******/ var ObjectFactory = function ObjectFactory(name) {
-/******/ return {
-/******/ configurable: true,
-/******/ enumerable: true,
-/******/ get: function() {
-/******/ return __webpack_require__[name];
-/******/ },
-/******/ set: function(value) {
-/******/ __webpack_require__[name] = value;
-/******/ }
-/******/ };
-/******/ };
-/******/ for(var name in __webpack_require__) {
-/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== "e") {
-/******/ Object.defineProperty(fn, name, ObjectFactory(name));
-/******/ }
-/******/ }
-/******/ fn.e = function(chunkId) {
-/******/ if(hotStatus === "ready")
-/******/ hotSetStatus("prepare");
-/******/ hotChunksLoading++;
-/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
-/******/ finishChunkLoading();
-/******/ throw err;
-/******/ });
-/******/
-/******/ function finishChunkLoading() {
-/******/ hotChunksLoading--;
-/******/ if(hotStatus === "prepare") {
-/******/ if(!hotWaitingFilesMap[chunkId]) {
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/ }
-/******/ };
-/******/ return fn;
-/******/ }
-/******/
-/******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars
-/******/ var hot = {
-/******/ // private stuff
-/******/ _acceptedDependencies: {},
-/******/ _declinedDependencies: {},
-/******/ _selfAccepted: false,
-/******/ _selfDeclined: false,
-/******/ _disposeHandlers: [],
-/******/ _main: hotCurrentChildModule !== moduleId,
-/******/
-/******/ // Module API
-/******/ active: true,
-/******/ accept: function(dep, callback) {
-/******/ if(typeof dep === "undefined")
-/******/ hot._selfAccepted = true;
-/******/ else if(typeof dep === "function")
-/******/ hot._selfAccepted = dep;
-/******/ else if(typeof dep === "object")
-/******/ for(var i = 0; i < dep.length; i++)
-/******/ hot._acceptedDependencies[dep[i]] = callback || function() {};
-/******/ else
-/******/ hot._acceptedDependencies[dep] = callback || function() {};
-/******/ },
-/******/ decline: function(dep) {
-/******/ if(typeof dep === "undefined")
-/******/ hot._selfDeclined = true;
-/******/ else if(typeof dep === "object")
-/******/ for(var i = 0; i < dep.length; i++)
-/******/ hot._declinedDependencies[dep[i]] = true;
-/******/ else
-/******/ hot._declinedDependencies[dep] = true;
-/******/ },
-/******/ dispose: function(callback) {
-/******/ hot._disposeHandlers.push(callback);
-/******/ },
-/******/ addDisposeHandler: function(callback) {
-/******/ hot._disposeHandlers.push(callback);
-/******/ },
-/******/ removeDisposeHandler: function(callback) {
-/******/ var idx = hot._disposeHandlers.indexOf(callback);
-/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ // Management API
-/******/ check: hotCheck,
-/******/ apply: hotApply,
-/******/ status: function(l) {
-/******/ if(!l) return hotStatus;
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ addStatusHandler: function(l) {
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ removeStatusHandler: function(l) {
-/******/ var idx = hotStatusHandlers.indexOf(l);
-/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ //inherit from previous dispose call
-/******/ data: hotCurrentModuleData[moduleId]
-/******/ };
-/******/ hotCurrentChildModule = undefined;
-/******/ return hot;
-/******/ }
-/******/
-/******/ var hotStatusHandlers = [];
-/******/ var hotStatus = "idle";
-/******/
-/******/ function hotSetStatus(newStatus) {
-/******/ hotStatus = newStatus;
-/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
-/******/ hotStatusHandlers[i].call(null, newStatus);
-/******/ }
-/******/
-/******/ // while downloading
-/******/ var hotWaitingFiles = 0;
-/******/ var hotChunksLoading = 0;
-/******/ var hotWaitingFilesMap = {};
-/******/ var hotRequestedFilesMap = {};
-/******/ var hotAvailableFilesMap = {};
-/******/ var hotDeferred;
-/******/
-/******/ // The update info
-/******/ var hotUpdate, hotUpdateNewHash;
-/******/
-/******/ function toModuleId(id) {
-/******/ var isNumber = (+id) + "" === id;
-/******/ return isNumber ? +id : id;
-/******/ }
-/******/
-/******/ function hotCheck(apply) {
-/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
-/******/ hotApplyOnUpdate = apply;
-/******/ hotSetStatus("check");
-/******/ return hotDownloadManifest().then(function(update) {
-/******/ if(!update) {
-/******/ hotSetStatus("idle");
-/******/ return null;
-/******/ }
-/******/ hotRequestedFilesMap = {};
-/******/ hotWaitingFilesMap = {};
-/******/ hotAvailableFilesMap = update.c;
-/******/ hotUpdateNewHash = update.h;
-/******/
-/******/ hotSetStatus("prepare");
-/******/ var promise = new Promise(function(resolve, reject) {
-/******/ hotDeferred = {
-/******/ resolve: resolve,
-/******/ reject: reject
-/******/ };
-/******/ });
-/******/ hotUpdate = {};
-/******/ var chunkId = 5;
-/******/ { // eslint-disable-line no-lone-blocks
-/******/ /*globals chunkId */
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ return promise;
-/******/ });
-/******/ }
-/******/
-/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
-/******/ return;
-/******/ hotRequestedFilesMap[chunkId] = false;
-/******/ for(var moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ hotUpdate[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/
-/******/ function hotEnsureUpdateChunk(chunkId) {
-/******/ if(!hotAvailableFilesMap[chunkId]) {
-/******/ hotWaitingFilesMap[chunkId] = true;
-/******/ } else {
-/******/ hotRequestedFilesMap[chunkId] = true;
-/******/ hotWaitingFiles++;
-/******/ hotDownloadUpdateChunk(chunkId);
-/******/ }
-/******/ }
-/******/
-/******/ function hotUpdateDownloaded() {
-/******/ hotSetStatus("ready");
-/******/ var deferred = hotDeferred;
-/******/ hotDeferred = null;
-/******/ if(!deferred) return;
-/******/ if(hotApplyOnUpdate) {
-/******/ hotApply(hotApplyOnUpdate).then(function(result) {
-/******/ deferred.resolve(result);
-/******/ }, function(err) {
-/******/ deferred.reject(err);
-/******/ });
-/******/ } else {
-/******/ var outdatedModules = [];
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ outdatedModules.push(toModuleId(id));
-/******/ }
-/******/ }
-/******/ deferred.resolve(outdatedModules);
-/******/ }
-/******/ }
-/******/
-/******/ function hotApply(options) {
-/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
-/******/ options = options || {};
-/******/
-/******/ var cb;
-/******/ var i;
-/******/ var j;
-/******/ var module;
-/******/ var moduleId;
-/******/
-/******/ function getAffectedStuff(updateModuleId) {
-/******/ var outdatedModules = [updateModuleId];
-/******/ var outdatedDependencies = {};
-/******/
-/******/ var queue = outdatedModules.slice().map(function(id) {
-/******/ return {
-/******/ chain: [id],
-/******/ id: id
-/******/ };
-/******/ });
-/******/ while(queue.length > 0) {
-/******/ var queueItem = queue.pop();
-/******/ var moduleId = queueItem.id;
-/******/ var chain = queueItem.chain;
-/******/ module = installedModules[moduleId];
-/******/ if(!module || module.hot._selfAccepted)
-/******/ continue;
-/******/ if(module.hot._selfDeclined) {
-/******/ return {
-/******/ type: "self-declined",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ if(module.hot._main) {
-/******/ return {
-/******/ type: "unaccepted",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ for(var i = 0; i < module.parents.length; i++) {
-/******/ var parentId = module.parents[i];
-/******/ var parent = installedModules[parentId];
-/******/ if(!parent) continue;
-/******/ if(parent.hot._declinedDependencies[moduleId]) {
-/******/ return {
-/******/ type: "declined",
-/******/ chain: chain.concat([parentId]),
-/******/ moduleId: moduleId,
-/******/ parentId: parentId
-/******/ };
-/******/ }
-/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
-/******/ if(parent.hot._acceptedDependencies[moduleId]) {
-/******/ if(!outdatedDependencies[parentId])
-/******/ outdatedDependencies[parentId] = [];
-/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
-/******/ continue;
-/******/ }
-/******/ delete outdatedDependencies[parentId];
-/******/ outdatedModules.push(parentId);
-/******/ queue.push({
-/******/ chain: chain.concat([parentId]),
-/******/ id: parentId
-/******/ });
-/******/ }
-/******/ }
-/******/
-/******/ return {
-/******/ type: "accepted",
-/******/ moduleId: updateModuleId,
-/******/ outdatedModules: outdatedModules,
-/******/ outdatedDependencies: outdatedDependencies
-/******/ };
-/******/ }
-/******/
-/******/ function addAllToSet(a, b) {
-/******/ for(var i = 0; i < b.length; i++) {
-/******/ var item = b[i];
-/******/ if(a.indexOf(item) < 0)
-/******/ a.push(item);
-/******/ }
-/******/ }
-/******/
-/******/ // at begin all updates modules are outdated
-/******/ // the "outdated" status can propagate to parents if they don't accept the children
-/******/ var outdatedDependencies = {};
-/******/ var outdatedModules = [];
-/******/ var appliedUpdate = {};
-/******/
-/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
-/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
-/******/ };
-/******/
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ moduleId = toModuleId(id);
-/******/ var result;
-/******/ if(hotUpdate[id]) {
-/******/ result = getAffectedStuff(moduleId);
-/******/ } else {
-/******/ result = {
-/******/ type: "disposed",
-/******/ moduleId: id
-/******/ };
-/******/ }
-/******/ var abortError = false;
-/******/ var doApply = false;
-/******/ var doDispose = false;
-/******/ var chainInfo = "";
-/******/ if(result.chain) {
-/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
-/******/ }
-/******/ switch(result.type) {
-/******/ case "self-declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
-/******/ break;
-/******/ case "declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
-/******/ break;
-/******/ case "unaccepted":
-/******/ if(options.onUnaccepted)
-/******/ options.onUnaccepted(result);
-/******/ if(!options.ignoreUnaccepted)
-/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
-/******/ break;
-/******/ case "accepted":
-/******/ if(options.onAccepted)
-/******/ options.onAccepted(result);
-/******/ doApply = true;
-/******/ break;
-/******/ case "disposed":
-/******/ if(options.onDisposed)
-/******/ options.onDisposed(result);
-/******/ doDispose = true;
-/******/ break;
-/******/ default:
-/******/ throw new Error("Unexception type " + result.type);
-/******/ }
-/******/ if(abortError) {
-/******/ hotSetStatus("abort");
-/******/ return Promise.reject(abortError);
-/******/ }
-/******/ if(doApply) {
-/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
-/******/ addAllToSet(outdatedModules, result.outdatedModules);
-/******/ for(moduleId in result.outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
-/******/ if(!outdatedDependencies[moduleId])
-/******/ outdatedDependencies[moduleId] = [];
-/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
-/******/ }
-/******/ }
-/******/ }
-/******/ if(doDispose) {
-/******/ addAllToSet(outdatedModules, [result.moduleId]);
-/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Store self accepted outdated modules to require them later by the module system
-/******/ var outdatedSelfAcceptedModules = [];
-/******/ for(i = 0; i < outdatedModules.length; i++) {
-/******/ moduleId = outdatedModules[i];
-/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
-/******/ outdatedSelfAcceptedModules.push({
-/******/ module: moduleId,
-/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
-/******/ });
-/******/ }
-/******/
-/******/ // Now in "dispose" phase
-/******/ hotSetStatus("dispose");
-/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
-/******/ if(hotAvailableFilesMap[chunkId] === false) {
-/******/ hotDisposeChunk(chunkId);
-/******/ }
-/******/ });
-/******/
-/******/ var idx;
-/******/ var queue = outdatedModules.slice();
-/******/ while(queue.length > 0) {
-/******/ moduleId = queue.pop();
-/******/ module = installedModules[moduleId];
-/******/ if(!module) continue;
-/******/
-/******/ var data = {};
-/******/
-/******/ // Call dispose handlers
-/******/ var disposeHandlers = module.hot._disposeHandlers;
-/******/ for(j = 0; j < disposeHandlers.length; j++) {
-/******/ cb = disposeHandlers[j];
-/******/ cb(data);
-/******/ }
-/******/ hotCurrentModuleData[moduleId] = data;
-/******/
-/******/ // disable module (this disables requires from this module)
-/******/ module.hot.active = false;
-/******/
-/******/ // remove module from cache
-/******/ delete installedModules[moduleId];
-/******/
-/******/ // remove "parents" references from all children
-/******/ for(j = 0; j < module.children.length; j++) {
-/******/ var child = installedModules[module.children[j]];
-/******/ if(!child) continue;
-/******/ idx = child.parents.indexOf(moduleId);
-/******/ if(idx >= 0) {
-/******/ child.parents.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // remove outdated dependency from module children
-/******/ var dependency;
-/******/ var moduleOutdatedDependencies;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
-/******/ dependency = moduleOutdatedDependencies[j];
-/******/ idx = module.children.indexOf(dependency);
-/******/ if(idx >= 0) module.children.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Not in "apply" phase
-/******/ hotSetStatus("apply");
-/******/
-/******/ hotCurrentHash = hotUpdateNewHash;
-/******/
-/******/ // insert new code
-/******/ for(moduleId in appliedUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
-/******/ modules[moduleId] = appliedUpdate[moduleId];
-/******/ }
-/******/ }
-/******/
-/******/ // call accept handlers
-/******/ var error = null;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ var callbacks = [];
-/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
-/******/ dependency = moduleOutdatedDependencies[i];
-/******/ cb = module.hot._acceptedDependencies[dependency];
-/******/ if(callbacks.indexOf(cb) >= 0) continue;
-/******/ callbacks.push(cb);
-/******/ }
-/******/ for(i = 0; i < callbacks.length; i++) {
-/******/ cb = callbacks[i];
-/******/ try {
-/******/ cb(moduleOutdatedDependencies);
-/******/ } catch(err) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "accept-errored",
-/******/ moduleId: moduleId,
-/******/ dependencyId: moduleOutdatedDependencies[i],
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Load self accepted modules
-/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
-/******/ var item = outdatedSelfAcceptedModules[i];
-/******/ moduleId = item.module;
-/******/ hotCurrentParents = [moduleId];
-/******/ try {
-/******/ __webpack_require__(moduleId);
-/******/ } catch(err) {
-/******/ if(typeof item.errorHandler === "function") {
-/******/ try {
-/******/ item.errorHandler(err);
-/******/ } catch(err2) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-error-handler-errored",
-/******/ moduleId: moduleId,
-/******/ error: err2,
-/******/ orginalError: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err2;
-/******/ }
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ } else {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-errored",
-/******/ moduleId: moduleId,
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // handle errors in accept handlers and self accepted module load
-/******/ if(error) {
-/******/ hotSetStatus("fail");
-/******/ return Promise.reject(error);
-/******/ }
-/******/
-/******/ hotSetStatus("idle");
-/******/ return new Promise(function(resolve) {
-/******/ resolve(outdatedModules);
-/******/ });
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {},
-/******/ hot: hotCreateModule(moduleId),
-/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
-/******/ children: []
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // identity function for calling harmony imports with the correct context
-/******/ __webpack_require__.i = function(value) { return value; };
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // __webpack_hash__
-/******/ __webpack_require__.h = function() { return hotCurrentHash; };
-/******/
-/******/ // Load entry module and return exports
-/******/ return hotCreateRequire(460)(__webpack_require__.s = 460);
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 16:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2017 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2017 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = global.$;
-
-/**
- * Makes a table sortable by columns.
- * This forces a page reload with more query parameters.
- */
-
-var TableSorting = function () {
-
- /**
- * @param {jQuery} table
- */
- function TableSorting(table) {
- _classCallCheck(this, TableSorting);
-
- this.selector = '.ps-sortable-column';
- this.columns = $(table).find(this.selector);
- }
-
- /**
- * Attaches the listeners
- */
-
-
- _createClass(TableSorting, [{
- key: 'attach',
- value: function attach() {
- var _this = this;
-
- this.columns.on('click', function (e) {
- var $column = $(e.delegateTarget);
- _this._sortByColumn($column, _this._getToggledSortDirection($column));
- });
- }
-
- /**
- * Sort using a column name
- * @param {string} columnName
- * @param {string} direction "asc" or "desc"
- */
-
- }, {
- key: 'sortBy',
- value: function sortBy(columnName, direction) {
- var $column = this.columns.is('[data-sort-col-name="' + columnName + '"]');
- if (!$column) {
- throw new Error('Cannot sort by "' + columnName + '": invalid column');
- }
-
- this._sortByColumn($column, direction);
- }
-
- /**
- * Sort using a column element
- * @param {jQuery} column
- * @param {string} direction "asc" or "desc"
- * @private
- */
-
- }, {
- key: '_sortByColumn',
- value: function _sortByColumn(column, direction) {
- window.location = this._getUrl(column.data('sortColName'), direction === 'desc' ? 'desc' : 'asc');
- }
-
- /**
- * Returns the inverted direction to sort according to the column's current one
- * @param {jQuery} column
- * @return {string}
- * @private
- */
-
- }, {
- key: '_getToggledSortDirection',
- value: function _getToggledSortDirection(column) {
- return column.data('sortDirection') === 'asc' ? 'desc' : 'asc';
- }
-
- /**
- * Returns the url for the sorted table
- * @param {string} colName
- * @param {string} direction
- * @return {string}
- * @private
- */
-
- }, {
- key: '_getUrl',
- value: function _getUrl(colName, direction) {
- var url = new URL(window.location.href);
- var params = url.searchParams;
-
- params.set('orderBy', colName);
- params.set('sortOrder', direction);
-
- return url.toString();
- }
- }]);
-
- return TableSorting;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (TableSorting);
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2)))
-
-/***/ }),
-
-/***/ 2:
-/***/ (function(module, exports) {
-
-var g;
-
-// This works in non-strict mode
-g = (function() {
- return this;
-})();
-
-try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
-} catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
-
-/***/ }),
-
-/***/ 23:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {/**
+var e={};t.m=n,t.c=e,t.i=function(n){return n},t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=375)}({13:function(n,t,e){"use strict";(function(n){/**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
@@ -907,539 +24,4 @@ module.exports = g;
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
-
-/**
- * Send a Post Request to reset search Action.
- */
-
-var $ = global.$;
-
-var init = function resetSearch(url, redirectUrl) {
- $.post(url);
- window.location.assign(redirectUrl);
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (init);
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2)))
-
-/***/ }),
-
-/***/ 231:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_grid_grid__ = __webpack_require__(28);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_grid_extension_reload_list_extension__ = __webpack_require__(26);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_grid_extension_export_to_sql_manager_extension__ = __webpack_require__(24);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_grid_extension_filters_reset_extension__ = __webpack_require__(25);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_grid_extension_sorting_extension__ = __webpack_require__(27);
-/**
- * 2007-2017 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2017 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-
-
-
-
-
-var $ = global.$;
-
-$(function () {
- var grid = new __WEBPACK_IMPORTED_MODULE_0__components_grid_grid__["a" /* default */]('logs');
-
- grid.addExtension(new __WEBPACK_IMPORTED_MODULE_1__components_grid_extension_reload_list_extension__["a" /* default */]());
- grid.addExtension(new __WEBPACK_IMPORTED_MODULE_2__components_grid_extension_export_to_sql_manager_extension__["a" /* default */]());
- grid.addExtension(new __WEBPACK_IMPORTED_MODULE_3__components_grid_extension_filters_reset_extension__["a" /* default */]());
- grid.addExtension(new __WEBPACK_IMPORTED_MODULE_4__components_grid_extension_sorting_extension__["a" /* default */]());
-});
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2)))
-
-/***/ }),
-
-/***/ 24:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Class ExportToSqlManagerExtension extends grid with exporting query to SQL Manager
- */
-
-var ExportToSqlManagerExtension = function () {
- function ExportToSqlManagerExtension() {
- _classCallCheck(this, ExportToSqlManagerExtension);
- }
-
- _createClass(ExportToSqlManagerExtension, [{
- key: 'extend',
-
- /**
- * Extend grid
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- var _this = this;
-
- grid.getContainer().on('click', '.js-common_show_query-grid-action', function () {
- return _this._onShowSqlQueryClick(grid);
- });
- grid.getContainer().on('click', '.js-common_export_sql_manager-grid-action', function () {
- return _this._onExportSqlManagerClick(grid);
- });
- }
-
- /**
- * Invoked when clicking on the "show sql query" toolbar button
- *
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_onShowSqlQueryClick',
- value: function _onShowSqlQueryClick(grid) {
- var $sqlManagerForm = $('#' + grid.getId() + '_common_show_query_modal_form');
- this._fillExportForm($sqlManagerForm, grid);
-
- var $modal = $('#' + grid.getId() + '_grid_common_show_query_modal');
- $modal.modal('show');
-
- $modal.on('click', '.btn-sql-submit', function () {
- return $sqlManagerForm.submit();
- });
- }
-
- /**
- * Invoked when clicking on the "export to the sql query" toolbar button
- *
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_onExportSqlManagerClick',
- value: function _onExportSqlManagerClick(grid) {
- var $sqlManagerForm = $('#' + grid.getId() + '_common_show_query_modal_form');
-
- this._fillExportForm($sqlManagerForm, grid);
-
- $sqlManagerForm.submit();
- }
-
- /**
- * Fill export form with SQL and it's name
- *
- * @param {jQuery} $sqlManagerForm
- * @param {Grid} grid
- *
- * @private
- */
-
- }, {
- key: '_fillExportForm',
- value: function _fillExportForm($sqlManagerForm, grid) {
- var query = grid.getContainer().find('.js-grid-table').data('query');
-
- $sqlManagerForm.find('textarea[name="sql"]').val(query);
- $sqlManagerForm.find('input[name="name"]').val(this._getNameFromBreadcrumb());
- }
-
- /**
- * Get export name from page's breadcrumb
- *
- * @return {String}
- *
- * @private
- */
-
- }, {
- key: '_getNameFromBreadcrumb',
- value: function _getNameFromBreadcrumb() {
- var $breadcrumbs = $('.header-toolbar').find('.breadcrumb-item');
- var name = '';
-
- $breadcrumbs.each(function (i, item) {
- var $breadcrumb = $(item);
-
- var breadcrumbTitle = 0 < $breadcrumb.find('a').length ? $breadcrumb.find('a').text() : $breadcrumb.text();
-
- if (0 < name.length) {
- name = name.concat(' > ');
- }
-
- name = name.concat(breadcrumbTitle);
- });
-
- return name;
- }
- }]);
-
- return ExportToSqlManagerExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (ExportToSqlManagerExtension);
-
-/***/ }),
-
-/***/ 25:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app_utils_reset_search__ = __webpack_require__(23);
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-
-var $ = window.$;
-
-/**
- * Class FiltersResetExtension extends grid with filters resetting
- */
-
-var FiltersResetExtension = function () {
- function FiltersResetExtension() {
- _classCallCheck(this, FiltersResetExtension);
- }
-
- _createClass(FiltersResetExtension, [{
- key: 'extend',
-
-
- /**
- * Extend grid
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- grid.getContainer().on('click', '.js-reset-search', function (event) {
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__app_utils_reset_search__["a" /* default */])($(event.currentTarget).data('url'), $(event.currentTarget).data('redirect'));
- });
- }
- }]);
-
- return FiltersResetExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (FiltersResetExtension);
-
-/***/ }),
-
-/***/ 26:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
-* 2007-2018 PrestaShop
-*
-* NOTICE OF LICENSE
-*
-* This source file is subject to the Open Software License (OSL 3.0)
-* that is bundled with this package in the file LICENSE.txt.
-* It is also available through the world-wide-web at this URL:
-* https://opensource.org/licenses/OSL-3.0
-* If you did not receive a copy of the license and are unable to
-* obtain it through the world-wide-web, please send an email
-* to license@prestashop.com so we can send you a copy immediately.
-*
-* DISCLAIMER
-*
-* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
-* versions in the future. If you wish to customize PrestaShop for your
-* needs please refer to http://www.prestashop.com for more information.
-*
-* @author PrestaShop SA
-* @copyright 2007-2018 PrestaShop SA
-* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-/**
- * Class ReloadListExtension extends grid with "List reload" action
- */
-var ReloadListExtension = function () {
- function ReloadListExtension() {
- _classCallCheck(this, ReloadListExtension);
- }
-
- _createClass(ReloadListExtension, [{
- key: 'extend',
-
- /**
- * Extend grid
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- grid.getContainer().on('click', '.js-common_refresh_list-grid-action', function () {
- location.reload();
- });
- }
- }]);
-
- return ReloadListExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (ReloadListExtension);
-
-/***/ }),
-
-/***/ 27:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app_utils_table_sorting__ = __webpack_require__(16);
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-
-
-/**
- * Class ReloadListExtension extends grid with "List reload" action
- */
-
-var SortingExtension = function () {
- function SortingExtension() {
- _classCallCheck(this, SortingExtension);
- }
-
- _createClass(SortingExtension, [{
- key: 'extend',
-
- /**
- * Extend grid
- *
- * @param {Grid} grid
- */
- value: function extend(grid) {
- var $sortableTable = grid.getContainer().find('table.table');
-
- new __WEBPACK_IMPORTED_MODULE_0__app_utils_table_sorting__["a" /* default */]($sortableTable).attach();
- }
- }]);
-
- return SortingExtension;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (SortingExtension);
-
-/***/ }),
-
-/***/ 28:
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * 2007-2018 PrestaShop
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * https://opensource.org/licenses/OSL-3.0
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@prestashop.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
- * versions in the future. If you wish to customize PrestaShop for your
- * needs please refer to http://www.prestashop.com for more information.
- *
- * @author PrestaShop SA
- * @copyright 2007-2018 PrestaShop SA
- * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * International Registered Trademark & Property of PrestaShop SA
- */
-
-var $ = window.$;
-
-/**
- * Class is responsible for handling Grid events
- */
-
-var Grid = function () {
- /**
- * Grid id
- *
- * @param {string} id
- */
- function Grid(id) {
- _classCallCheck(this, Grid);
-
- this.id = id;
- this.$container = $('#' + this.id + '_grid');
- }
-
- /**
- * Get grid id
- *
- * @returns {string}
- */
-
-
- _createClass(Grid, [{
- key: 'getId',
- value: function getId() {
- return this.id;
- }
-
- /**
- * Get grid container
- *
- * @returns {jQuery}
- */
-
- }, {
- key: 'getContainer',
- value: function getContainer() {
- return this.$container;
- }
-
- /**
- * Extend grid with external extensions
- *
- * @param {object} extension
- */
-
- }, {
- key: 'addExtension',
- value: function addExtension(extension) {
- extension.extend(this);
- }
- }]);
-
- return Grid;
-}();
-
-/* harmony default export */ __webpack_exports__["a"] = (Grid);
-
-/***/ }),
-
-/***/ 460:
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(231);
-
-
-/***/ })
-
-/******/ });
\ No newline at end of file
+var e=n.$,r=function(n,t){e.post(n),window.location.assign(t)};t.a=r}).call(t,e(2))},14:function(n,t,e){"use strict";function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function n(n,t){for(var e=0;e ")),t=t.concat(o)}),t}}]),n}();t.a=a},15:function(n,t,e){"use strict";function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}var o=e(13),i=function(){function n(n,t){for(var e=0;e= 0) hot._disposeHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ // Management API
-/******/ check: hotCheck,
-/******/ apply: hotApply,
-/******/ status: function(l) {
-/******/ if(!l) return hotStatus;
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ addStatusHandler: function(l) {
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ removeStatusHandler: function(l) {
-/******/ var idx = hotStatusHandlers.indexOf(l);
-/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ //inherit from previous dispose call
-/******/ data: hotCurrentModuleData[moduleId]
-/******/ };
-/******/ hotCurrentChildModule = undefined;
-/******/ return hot;
-/******/ }
-/******/
-/******/ var hotStatusHandlers = [];
-/******/ var hotStatus = "idle";
-/******/
-/******/ function hotSetStatus(newStatus) {
-/******/ hotStatus = newStatus;
-/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
-/******/ hotStatusHandlers[i].call(null, newStatus);
-/******/ }
-/******/
-/******/ // while downloading
-/******/ var hotWaitingFiles = 0;
-/******/ var hotChunksLoading = 0;
-/******/ var hotWaitingFilesMap = {};
-/******/ var hotRequestedFilesMap = {};
-/******/ var hotAvailableFilesMap = {};
-/******/ var hotDeferred;
-/******/
-/******/ // The update info
-/******/ var hotUpdate, hotUpdateNewHash;
-/******/
-/******/ function toModuleId(id) {
-/******/ var isNumber = (+id) + "" === id;
-/******/ return isNumber ? +id : id;
-/******/ }
-/******/
-/******/ function hotCheck(apply) {
-/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
-/******/ hotApplyOnUpdate = apply;
-/******/ hotSetStatus("check");
-/******/ return hotDownloadManifest().then(function(update) {
-/******/ if(!update) {
-/******/ hotSetStatus("idle");
-/******/ return null;
-/******/ }
-/******/ hotRequestedFilesMap = {};
-/******/ hotWaitingFilesMap = {};
-/******/ hotAvailableFilesMap = update.c;
-/******/ hotUpdateNewHash = update.h;
-/******/
-/******/ hotSetStatus("prepare");
-/******/ var promise = new Promise(function(resolve, reject) {
-/******/ hotDeferred = {
-/******/ resolve: resolve,
-/******/ reject: reject
-/******/ };
-/******/ });
-/******/ hotUpdate = {};
-/******/ var chunkId = 1;
-/******/ { // eslint-disable-line no-lone-blocks
-/******/ /*globals chunkId */
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ return promise;
-/******/ });
-/******/ }
-/******/
-/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
-/******/ return;
-/******/ hotRequestedFilesMap[chunkId] = false;
-/******/ for(var moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ hotUpdate[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/
-/******/ function hotEnsureUpdateChunk(chunkId) {
-/******/ if(!hotAvailableFilesMap[chunkId]) {
-/******/ hotWaitingFilesMap[chunkId] = true;
-/******/ } else {
-/******/ hotRequestedFilesMap[chunkId] = true;
-/******/ hotWaitingFiles++;
-/******/ hotDownloadUpdateChunk(chunkId);
-/******/ }
-/******/ }
-/******/
-/******/ function hotUpdateDownloaded() {
-/******/ hotSetStatus("ready");
-/******/ var deferred = hotDeferred;
-/******/ hotDeferred = null;
-/******/ if(!deferred) return;
-/******/ if(hotApplyOnUpdate) {
-/******/ hotApply(hotApplyOnUpdate).then(function(result) {
-/******/ deferred.resolve(result);
-/******/ }, function(err) {
-/******/ deferred.reject(err);
-/******/ });
-/******/ } else {
-/******/ var outdatedModules = [];
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ outdatedModules.push(toModuleId(id));
-/******/ }
-/******/ }
-/******/ deferred.resolve(outdatedModules);
-/******/ }
-/******/ }
-/******/
-/******/ function hotApply(options) {
-/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
-/******/ options = options || {};
-/******/
-/******/ var cb;
-/******/ var i;
-/******/ var j;
-/******/ var module;
-/******/ var moduleId;
-/******/
-/******/ function getAffectedStuff(updateModuleId) {
-/******/ var outdatedModules = [updateModuleId];
-/******/ var outdatedDependencies = {};
-/******/
-/******/ var queue = outdatedModules.slice().map(function(id) {
-/******/ return {
-/******/ chain: [id],
-/******/ id: id
-/******/ };
-/******/ });
-/******/ while(queue.length > 0) {
-/******/ var queueItem = queue.pop();
-/******/ var moduleId = queueItem.id;
-/******/ var chain = queueItem.chain;
-/******/ module = installedModules[moduleId];
-/******/ if(!module || module.hot._selfAccepted)
-/******/ continue;
-/******/ if(module.hot._selfDeclined) {
-/******/ return {
-/******/ type: "self-declined",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ if(module.hot._main) {
-/******/ return {
-/******/ type: "unaccepted",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ for(var i = 0; i < module.parents.length; i++) {
-/******/ var parentId = module.parents[i];
-/******/ var parent = installedModules[parentId];
-/******/ if(!parent) continue;
-/******/ if(parent.hot._declinedDependencies[moduleId]) {
-/******/ return {
-/******/ type: "declined",
-/******/ chain: chain.concat([parentId]),
-/******/ moduleId: moduleId,
-/******/ parentId: parentId
-/******/ };
-/******/ }
-/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
-/******/ if(parent.hot._acceptedDependencies[moduleId]) {
-/******/ if(!outdatedDependencies[parentId])
-/******/ outdatedDependencies[parentId] = [];
-/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
-/******/ continue;
-/******/ }
-/******/ delete outdatedDependencies[parentId];
-/******/ outdatedModules.push(parentId);
-/******/ queue.push({
-/******/ chain: chain.concat([parentId]),
-/******/ id: parentId
-/******/ });
-/******/ }
-/******/ }
-/******/
-/******/ return {
-/******/ type: "accepted",
-/******/ moduleId: updateModuleId,
-/******/ outdatedModules: outdatedModules,
-/******/ outdatedDependencies: outdatedDependencies
-/******/ };
-/******/ }
-/******/
-/******/ function addAllToSet(a, b) {
-/******/ for(var i = 0; i < b.length; i++) {
-/******/ var item = b[i];
-/******/ if(a.indexOf(item) < 0)
-/******/ a.push(item);
-/******/ }
-/******/ }
-/******/
-/******/ // at begin all updates modules are outdated
-/******/ // the "outdated" status can propagate to parents if they don't accept the children
-/******/ var outdatedDependencies = {};
-/******/ var outdatedModules = [];
-/******/ var appliedUpdate = {};
-/******/
-/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
-/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
-/******/ };
-/******/
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ moduleId = toModuleId(id);
-/******/ var result;
-/******/ if(hotUpdate[id]) {
-/******/ result = getAffectedStuff(moduleId);
-/******/ } else {
-/******/ result = {
-/******/ type: "disposed",
-/******/ moduleId: id
-/******/ };
-/******/ }
-/******/ var abortError = false;
-/******/ var doApply = false;
-/******/ var doDispose = false;
-/******/ var chainInfo = "";
-/******/ if(result.chain) {
-/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
-/******/ }
-/******/ switch(result.type) {
-/******/ case "self-declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
-/******/ break;
-/******/ case "declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
-/******/ break;
-/******/ case "unaccepted":
-/******/ if(options.onUnaccepted)
-/******/ options.onUnaccepted(result);
-/******/ if(!options.ignoreUnaccepted)
-/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
-/******/ break;
-/******/ case "accepted":
-/******/ if(options.onAccepted)
-/******/ options.onAccepted(result);
-/******/ doApply = true;
-/******/ break;
-/******/ case "disposed":
-/******/ if(options.onDisposed)
-/******/ options.onDisposed(result);
-/******/ doDispose = true;
-/******/ break;
-/******/ default:
-/******/ throw new Error("Unexception type " + result.type);
-/******/ }
-/******/ if(abortError) {
-/******/ hotSetStatus("abort");
-/******/ return Promise.reject(abortError);
-/******/ }
-/******/ if(doApply) {
-/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
-/******/ addAllToSet(outdatedModules, result.outdatedModules);
-/******/ for(moduleId in result.outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
-/******/ if(!outdatedDependencies[moduleId])
-/******/ outdatedDependencies[moduleId] = [];
-/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
-/******/ }
-/******/ }
-/******/ }
-/******/ if(doDispose) {
-/******/ addAllToSet(outdatedModules, [result.moduleId]);
-/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Store self accepted outdated modules to require them later by the module system
-/******/ var outdatedSelfAcceptedModules = [];
-/******/ for(i = 0; i < outdatedModules.length; i++) {
-/******/ moduleId = outdatedModules[i];
-/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
-/******/ outdatedSelfAcceptedModules.push({
-/******/ module: moduleId,
-/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
-/******/ });
-/******/ }
-/******/
-/******/ // Now in "dispose" phase
-/******/ hotSetStatus("dispose");
-/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
-/******/ if(hotAvailableFilesMap[chunkId] === false) {
-/******/ hotDisposeChunk(chunkId);
-/******/ }
-/******/ });
-/******/
-/******/ var idx;
-/******/ var queue = outdatedModules.slice();
-/******/ while(queue.length > 0) {
-/******/ moduleId = queue.pop();
-/******/ module = installedModules[moduleId];
-/******/ if(!module) continue;
-/******/
-/******/ var data = {};
-/******/
-/******/ // Call dispose handlers
-/******/ var disposeHandlers = module.hot._disposeHandlers;
-/******/ for(j = 0; j < disposeHandlers.length; j++) {
-/******/ cb = disposeHandlers[j];
-/******/ cb(data);
-/******/ }
-/******/ hotCurrentModuleData[moduleId] = data;
-/******/
-/******/ // disable module (this disables requires from this module)
-/******/ module.hot.active = false;
-/******/
-/******/ // remove module from cache
-/******/ delete installedModules[moduleId];
-/******/
-/******/ // remove "parents" references from all children
-/******/ for(j = 0; j < module.children.length; j++) {
-/******/ var child = installedModules[module.children[j]];
-/******/ if(!child) continue;
-/******/ idx = child.parents.indexOf(moduleId);
-/******/ if(idx >= 0) {
-/******/ child.parents.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // remove outdated dependency from module children
-/******/ var dependency;
-/******/ var moduleOutdatedDependencies;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
-/******/ dependency = moduleOutdatedDependencies[j];
-/******/ idx = module.children.indexOf(dependency);
-/******/ if(idx >= 0) module.children.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Not in "apply" phase
-/******/ hotSetStatus("apply");
-/******/
-/******/ hotCurrentHash = hotUpdateNewHash;
-/******/
-/******/ // insert new code
-/******/ for(moduleId in appliedUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
-/******/ modules[moduleId] = appliedUpdate[moduleId];
-/******/ }
-/******/ }
-/******/
-/******/ // call accept handlers
-/******/ var error = null;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ var callbacks = [];
-/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
-/******/ dependency = moduleOutdatedDependencies[i];
-/******/ cb = module.hot._acceptedDependencies[dependency];
-/******/ if(callbacks.indexOf(cb) >= 0) continue;
-/******/ callbacks.push(cb);
-/******/ }
-/******/ for(i = 0; i < callbacks.length; i++) {
-/******/ cb = callbacks[i];
-/******/ try {
-/******/ cb(moduleOutdatedDependencies);
-/******/ } catch(err) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "accept-errored",
-/******/ moduleId: moduleId,
-/******/ dependencyId: moduleOutdatedDependencies[i],
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Load self accepted modules
-/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
-/******/ var item = outdatedSelfAcceptedModules[i];
-/******/ moduleId = item.module;
-/******/ hotCurrentParents = [moduleId];
-/******/ try {
-/******/ __webpack_require__(moduleId);
-/******/ } catch(err) {
-/******/ if(typeof item.errorHandler === "function") {
-/******/ try {
-/******/ item.errorHandler(err);
-/******/ } catch(err2) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-error-handler-errored",
-/******/ moduleId: moduleId,
-/******/ error: err2,
-/******/ orginalError: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err2;
-/******/ }
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ } else {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-errored",
-/******/ moduleId: moduleId,
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // handle errors in accept handlers and self accepted module load
-/******/ if(error) {
-/******/ hotSetStatus("fail");
-/******/ return Promise.reject(error);
-/******/ }
-/******/
-/******/ hotSetStatus("idle");
-/******/ return new Promise(function(resolve) {
-/******/ resolve(outdatedModules);
-/******/ });
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {},
-/******/ hot: hotCreateModule(moduleId),
-/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
-/******/ children: []
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // identity function for calling harmony imports with the correct context
-/******/ __webpack_require__.i = function(value) { return value; };
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // __webpack_hash__
-/******/ __webpack_require__.h = function() { return hotCurrentHash; };
-/******/
-/******/ // Load entry module and return exports
-/******/ return hotCreateRequire(473)(__webpack_require__.s = 473);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/* WEBPACK VAR INJECTION */(function(module) {var require;/*** IMPORTS FROM imports-loader ***/
-var define = false;
-(function() {
-
-//! moment.js
-//! version : 2.19.1
-//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
-//! license : MIT
-//! momentjs.com
-
-;(function (global, factory) {
- true ? module.exports = factory() :
- typeof define === 'function' && define.amd ? define(factory) :
- global.moment = factory()
-}(this, (function () { 'use strict';
-
-var hookCallback;
-
-function hooks () {
- return hookCallback.apply(null, arguments);
-}
-
-// This is done to register the method called with moment()
-// without creating circular dependencies.
-function setHookCallback (callback) {
- hookCallback = callback;
-}
-
-function isArray(input) {
- return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
-}
-
-function isObject(input) {
- // IE8 will treat undefined and null as object if it wasn't for
- // input != null
- return input != null && Object.prototype.toString.call(input) === '[object Object]';
-}
-
-function isObjectEmpty(obj) {
- if (Object.getOwnPropertyNames) {
- return (Object.getOwnPropertyNames(obj).length === 0);
- } else {
- var k;
- for (k in obj) {
- if (obj.hasOwnProperty(k)) {
- return false;
- }
- }
- return true;
- }
-}
-
-function isUndefined(input) {
- return input === void 0;
-}
-
-function isNumber(input) {
- return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
-}
-
-function isDate(input) {
- return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
-}
-
-function map(arr, fn) {
- var res = [], i;
- for (i = 0; i < arr.length; ++i) {
- res.push(fn(arr[i], i));
- }
- return res;
-}
-
-function hasOwnProp(a, b) {
- return Object.prototype.hasOwnProperty.call(a, b);
-}
-
-function extend(a, b) {
- for (var i in b) {
- if (hasOwnProp(b, i)) {
- a[i] = b[i];
- }
- }
-
- if (hasOwnProp(b, 'toString')) {
- a.toString = b.toString;
- }
-
- if (hasOwnProp(b, 'valueOf')) {
- a.valueOf = b.valueOf;
- }
-
- return a;
-}
-
-function createUTC (input, format, locale, strict) {
- return createLocalOrUTC(input, format, locale, strict, true).utc();
-}
-
-function defaultParsingFlags() {
- // We need to deep clone this object.
- return {
- empty : false,
- unusedTokens : [],
- unusedInput : [],
- overflow : -2,
- charsLeftOver : 0,
- nullInput : false,
- invalidMonth : null,
- invalidFormat : false,
- userInvalidated : false,
- iso : false,
- parsedDateParts : [],
- meridiem : null,
- rfc2822 : false,
- weekdayMismatch : false
- };
-}
-
-function getParsingFlags(m) {
- if (m._pf == null) {
- m._pf = defaultParsingFlags();
- }
- return m._pf;
-}
-
-var some;
-if (Array.prototype.some) {
- some = Array.prototype.some;
-} else {
- some = function (fun) {
- var t = Object(this);
- var len = t.length >>> 0;
-
- for (var i = 0; i < len; i++) {
- if (i in t && fun.call(this, t[i], i, t)) {
- return true;
- }
- }
-
- return false;
- };
-}
-
-function isValid(m) {
- if (m._isValid == null) {
- var flags = getParsingFlags(m);
- var parsedParts = some.call(flags.parsedDateParts, function (i) {
- return i != null;
- });
- var isNowValid = !isNaN(m._d.getTime()) &&
- flags.overflow < 0 &&
- !flags.empty &&
- !flags.invalidMonth &&
- !flags.invalidWeekday &&
- !flags.weekdayMismatch &&
- !flags.nullInput &&
- !flags.invalidFormat &&
- !flags.userInvalidated &&
- (!flags.meridiem || (flags.meridiem && parsedParts));
-
- if (m._strict) {
- isNowValid = isNowValid &&
- flags.charsLeftOver === 0 &&
- flags.unusedTokens.length === 0 &&
- flags.bigHour === undefined;
- }
-
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
- m._isValid = isNowValid;
- }
- else {
- return isNowValid;
- }
- }
- return m._isValid;
-}
-
-function createInvalid (flags) {
- var m = createUTC(NaN);
- if (flags != null) {
- extend(getParsingFlags(m), flags);
- }
- else {
- getParsingFlags(m).userInvalidated = true;
- }
-
- return m;
-}
-
-// Plugins that add properties should also add the key here (null value),
-// so we can properly clone ourselves.
-var momentProperties = hooks.momentProperties = [];
-
-function copyConfig(to, from) {
- var i, prop, val;
-
- if (!isUndefined(from._isAMomentObject)) {
- to._isAMomentObject = from._isAMomentObject;
- }
- if (!isUndefined(from._i)) {
- to._i = from._i;
- }
- if (!isUndefined(from._f)) {
- to._f = from._f;
- }
- if (!isUndefined(from._l)) {
- to._l = from._l;
- }
- if (!isUndefined(from._strict)) {
- to._strict = from._strict;
- }
- if (!isUndefined(from._tzm)) {
- to._tzm = from._tzm;
- }
- if (!isUndefined(from._isUTC)) {
- to._isUTC = from._isUTC;
- }
- if (!isUndefined(from._offset)) {
- to._offset = from._offset;
- }
- if (!isUndefined(from._pf)) {
- to._pf = getParsingFlags(from);
- }
- if (!isUndefined(from._locale)) {
- to._locale = from._locale;
- }
-
- if (momentProperties.length > 0) {
- for (i = 0; i < momentProperties.length; i++) {
- prop = momentProperties[i];
- val = from[prop];
- if (!isUndefined(val)) {
- to[prop] = val;
- }
- }
- }
-
- return to;
-}
-
-var updateInProgress = false;
-
-// Moment prototype object
-function Moment(config) {
- copyConfig(this, config);
- this._d = new Date(config._d != null ? config._d.getTime() : NaN);
- if (!this.isValid()) {
- this._d = new Date(NaN);
- }
- // Prevent infinite loop in case updateOffset creates new moment
- // objects.
- if (updateInProgress === false) {
- updateInProgress = true;
- hooks.updateOffset(this);
- updateInProgress = false;
- }
-}
-
-function isMoment (obj) {
- return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
-}
-
-function absFloor (number) {
- if (number < 0) {
- // -0 -> 0
- return Math.ceil(number) || 0;
- } else {
- return Math.floor(number);
- }
-}
-
-function toInt(argumentForCoercion) {
- var coercedNumber = +argumentForCoercion,
- value = 0;
-
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
- value = absFloor(coercedNumber);
- }
-
- return value;
-}
-
-// compare two arrays, return the number of differences
-function compareArrays(array1, array2, dontConvert) {
- var len = Math.min(array1.length, array2.length),
- lengthDiff = Math.abs(array1.length - array2.length),
- diffs = 0,
- i;
- for (i = 0; i < len; i++) {
- if ((dontConvert && array1[i] !== array2[i]) ||
- (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
- diffs++;
- }
- }
- return diffs + lengthDiff;
-}
-
-function warn(msg) {
- if (hooks.suppressDeprecationWarnings === false &&
- (typeof console !== 'undefined') && console.warn) {
- console.warn('Deprecation warning: ' + msg);
- }
-}
-
-function deprecate(msg, fn) {
- var firstTime = true;
-
- return extend(function () {
- if (hooks.deprecationHandler != null) {
- hooks.deprecationHandler(null, msg);
- }
- if (firstTime) {
- var args = [];
- var arg;
- for (var i = 0; i < arguments.length; i++) {
- arg = '';
- if (typeof arguments[i] === 'object') {
- arg += '\n[' + i + '] ';
- for (var key in arguments[0]) {
- arg += key + ': ' + arguments[0][key] + ', ';
- }
- arg = arg.slice(0, -2); // Remove trailing comma and space
- } else {
- arg = arguments[i];
- }
- args.push(arg);
- }
- warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
- firstTime = false;
- }
- return fn.apply(this, arguments);
- }, fn);
-}
-
-var deprecations = {};
-
-function deprecateSimple(name, msg) {
- if (hooks.deprecationHandler != null) {
- hooks.deprecationHandler(name, msg);
- }
- if (!deprecations[name]) {
- warn(msg);
- deprecations[name] = true;
- }
-}
-
-hooks.suppressDeprecationWarnings = false;
-hooks.deprecationHandler = null;
-
-function isFunction(input) {
- return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
-}
-
-function set (config) {
- var prop, i;
- for (i in config) {
- prop = config[i];
- if (isFunction(prop)) {
- this[i] = prop;
- } else {
- this['_' + i] = prop;
- }
- }
- this._config = config;
- // Lenient ordinal parsing accepts just a number in addition to
- // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
- // TODO: Remove "ordinalParse" fallback in next major release.
- this._dayOfMonthOrdinalParseLenient = new RegExp(
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
- '|' + (/\d{1,2}/).source);
-}
-
-function mergeConfigs(parentConfig, childConfig) {
- var res = extend({}, parentConfig), prop;
- for (prop in childConfig) {
- if (hasOwnProp(childConfig, prop)) {
- if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
- res[prop] = {};
- extend(res[prop], parentConfig[prop]);
- extend(res[prop], childConfig[prop]);
- } else if (childConfig[prop] != null) {
- res[prop] = childConfig[prop];
- } else {
- delete res[prop];
- }
- }
- }
- for (prop in parentConfig) {
- if (hasOwnProp(parentConfig, prop) &&
- !hasOwnProp(childConfig, prop) &&
- isObject(parentConfig[prop])) {
- // make sure changes to properties don't modify parent config
- res[prop] = extend({}, res[prop]);
- }
- }
- return res;
-}
-
-function Locale(config) {
- if (config != null) {
- this.set(config);
- }
-}
-
-var keys;
-
-if (Object.keys) {
- keys = Object.keys;
-} else {
- keys = function (obj) {
- var i, res = [];
- for (i in obj) {
- if (hasOwnProp(obj, i)) {
- res.push(i);
- }
- }
- return res;
- };
-}
-
-var defaultCalendar = {
- sameDay : '[Today at] LT',
- nextDay : '[Tomorrow at] LT',
- nextWeek : 'dddd [at] LT',
- lastDay : '[Yesterday at] LT',
- lastWeek : '[Last] dddd [at] LT',
- sameElse : 'L'
-};
-
-function calendar (key, mom, now) {
- var output = this._calendar[key] || this._calendar['sameElse'];
- return isFunction(output) ? output.call(mom, now) : output;
-}
-
-var defaultLongDateFormat = {
- LTS : 'h:mm:ss A',
- LT : 'h:mm A',
- L : 'MM/DD/YYYY',
- LL : 'MMMM D, YYYY',
- LLL : 'MMMM D, YYYY h:mm A',
- LLLL : 'dddd, MMMM D, YYYY h:mm A'
-};
-
-function longDateFormat (key) {
- var format = this._longDateFormat[key],
- formatUpper = this._longDateFormat[key.toUpperCase()];
-
- if (format || !formatUpper) {
- return format;
- }
-
- this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
- return val.slice(1);
- });
-
- return this._longDateFormat[key];
-}
-
-var defaultInvalidDate = 'Invalid date';
-
-function invalidDate () {
- return this._invalidDate;
-}
-
-var defaultOrdinal = '%d';
-var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
-
-function ordinal (number) {
- return this._ordinal.replace('%d', number);
-}
-
-var defaultRelativeTime = {
- future : 'in %s',
- past : '%s ago',
- s : 'a few seconds',
- ss : '%d seconds',
- m : 'a minute',
- mm : '%d minutes',
- h : 'an hour',
- hh : '%d hours',
- d : 'a day',
- dd : '%d days',
- M : 'a month',
- MM : '%d months',
- y : 'a year',
- yy : '%d years'
-};
-
-function relativeTime (number, withoutSuffix, string, isFuture) {
- var output = this._relativeTime[string];
- return (isFunction(output)) ?
- output(number, withoutSuffix, string, isFuture) :
- output.replace(/%d/i, number);
-}
-
-function pastFuture (diff, output) {
- var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
- return isFunction(format) ? format(output) : format.replace(/%s/i, output);
-}
-
-var aliases = {};
-
-function addUnitAlias (unit, shorthand) {
- var lowerCase = unit.toLowerCase();
- aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
-}
-
-function normalizeUnits(units) {
- return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
-}
-
-function normalizeObjectUnits(inputObject) {
- var normalizedInput = {},
- normalizedProp,
- prop;
-
- for (prop in inputObject) {
- if (hasOwnProp(inputObject, prop)) {
- normalizedProp = normalizeUnits(prop);
- if (normalizedProp) {
- normalizedInput[normalizedProp] = inputObject[prop];
- }
- }
- }
-
- return normalizedInput;
-}
-
-var priorities = {};
-
-function addUnitPriority(unit, priority) {
- priorities[unit] = priority;
-}
-
-function getPrioritizedUnits(unitsObj) {
- var units = [];
- for (var u in unitsObj) {
- units.push({unit: u, priority: priorities[u]});
- }
- units.sort(function (a, b) {
- return a.priority - b.priority;
- });
- return units;
-}
-
-function zeroFill(number, targetLength, forceSign) {
- var absNumber = '' + Math.abs(number),
- zerosToFill = targetLength - absNumber.length,
- sign = number >= 0;
- return (sign ? (forceSign ? '+' : '') : '-') +
- Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
-}
-
-var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
-
-var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
-
-var formatFunctions = {};
-
-var formatTokenFunctions = {};
-
-// token: 'M'
-// padded: ['MM', 2]
-// ordinal: 'Mo'
-// callback: function () { this.month() + 1 }
-function addFormatToken (token, padded, ordinal, callback) {
- var func = callback;
- if (typeof callback === 'string') {
- func = function () {
- return this[callback]();
- };
- }
- if (token) {
- formatTokenFunctions[token] = func;
- }
- if (padded) {
- formatTokenFunctions[padded[0]] = function () {
- return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
- };
- }
- if (ordinal) {
- formatTokenFunctions[ordinal] = function () {
- return this.localeData().ordinal(func.apply(this, arguments), token);
- };
- }
-}
-
-function removeFormattingTokens(input) {
- if (input.match(/\[[\s\S]/)) {
- return input.replace(/^\[|\]$/g, '');
- }
- return input.replace(/\\/g, '');
-}
-
-function makeFormatFunction(format) {
- var array = format.match(formattingTokens), i, length;
-
- for (i = 0, length = array.length; i < length; i++) {
- if (formatTokenFunctions[array[i]]) {
- array[i] = formatTokenFunctions[array[i]];
- } else {
- array[i] = removeFormattingTokens(array[i]);
- }
- }
-
- return function (mom) {
- var output = '', i;
- for (i = 0; i < length; i++) {
- output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
- }
- return output;
- };
-}
-
-// format date using native date object
-function formatMoment(m, format) {
- if (!m.isValid()) {
- return m.localeData().invalidDate();
- }
-
- format = expandFormat(format, m.localeData());
- formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
-
- return formatFunctions[format](m);
-}
-
-function expandFormat(format, locale) {
- var i = 5;
-
- function replaceLongDateFormatTokens(input) {
- return locale.longDateFormat(input) || input;
- }
-
- localFormattingTokens.lastIndex = 0;
- while (i >= 0 && localFormattingTokens.test(format)) {
- format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
- localFormattingTokens.lastIndex = 0;
- i -= 1;
- }
-
- return format;
-}
-
-var match1 = /\d/; // 0 - 9
-var match2 = /\d\d/; // 00 - 99
-var match3 = /\d{3}/; // 000 - 999
-var match4 = /\d{4}/; // 0000 - 9999
-var match6 = /[+-]?\d{6}/; // -999999 - 999999
-var match1to2 = /\d\d?/; // 0 - 99
-var match3to4 = /\d\d\d\d?/; // 999 - 9999
-var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
-var match1to3 = /\d{1,3}/; // 0 - 999
-var match1to4 = /\d{1,4}/; // 0 - 9999
-var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
-
-var matchUnsigned = /\d+/; // 0 - inf
-var matchSigned = /[+-]?\d+/; // -inf - inf
-
-var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
-var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
-
-var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
-
-// any word (or two) characters or numbers including two/three word month in arabic.
-// includes scottish gaelic two word and hyphenated months
-var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
-
-
-var regexes = {};
-
-function addRegexToken (token, regex, strictRegex) {
- regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
- return (isStrict && strictRegex) ? strictRegex : regex;
- };
-}
-
-function getParseRegexForToken (token, config) {
- if (!hasOwnProp(regexes, token)) {
- return new RegExp(unescapeFormat(token));
- }
-
- return regexes[token](config._strict, config._locale);
-}
-
-// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
-function unescapeFormat(s) {
- return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
- return p1 || p2 || p3 || p4;
- }));
-}
-
-function regexEscape(s) {
- return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
-}
-
-var tokens = {};
-
-function addParseToken (token, callback) {
- var i, func = callback;
- if (typeof token === 'string') {
- token = [token];
- }
- if (isNumber(callback)) {
- func = function (input, array) {
- array[callback] = toInt(input);
- };
- }
- for (i = 0; i < token.length; i++) {
- tokens[token[i]] = func;
- }
-}
-
-function addWeekParseToken (token, callback) {
- addParseToken(token, function (input, array, config, token) {
- config._w = config._w || {};
- callback(input, config._w, config, token);
- });
-}
-
-function addTimeToArrayFromToken(token, input, config) {
- if (input != null && hasOwnProp(tokens, token)) {
- tokens[token](input, config._a, config, token);
- }
-}
-
-var YEAR = 0;
-var MONTH = 1;
-var DATE = 2;
-var HOUR = 3;
-var MINUTE = 4;
-var SECOND = 5;
-var MILLISECOND = 6;
-var WEEK = 7;
-var WEEKDAY = 8;
-
-// FORMATTING
-
-addFormatToken('Y', 0, 0, function () {
- var y = this.year();
- return y <= 9999 ? '' + y : '+' + y;
-});
-
-addFormatToken(0, ['YY', 2], 0, function () {
- return this.year() % 100;
-});
-
-addFormatToken(0, ['YYYY', 4], 0, 'year');
-addFormatToken(0, ['YYYYY', 5], 0, 'year');
-addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
-
-// ALIASES
-
-addUnitAlias('year', 'y');
-
-// PRIORITIES
-
-addUnitPriority('year', 1);
-
-// PARSING
-
-addRegexToken('Y', matchSigned);
-addRegexToken('YY', match1to2, match2);
-addRegexToken('YYYY', match1to4, match4);
-addRegexToken('YYYYY', match1to6, match6);
-addRegexToken('YYYYYY', match1to6, match6);
-
-addParseToken(['YYYYY', 'YYYYYY'], YEAR);
-addParseToken('YYYY', function (input, array) {
- array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
-});
-addParseToken('YY', function (input, array) {
- array[YEAR] = hooks.parseTwoDigitYear(input);
-});
-addParseToken('Y', function (input, array) {
- array[YEAR] = parseInt(input, 10);
-});
-
-// HELPERS
-
-function daysInYear(year) {
- return isLeapYear(year) ? 366 : 365;
-}
-
-function isLeapYear(year) {
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
-}
-
-// HOOKS
-
-hooks.parseTwoDigitYear = function (input) {
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
-};
-
-// MOMENTS
-
-var getSetYear = makeGetSet('FullYear', true);
-
-function getIsLeapYear () {
- return isLeapYear(this.year());
-}
-
-function makeGetSet (unit, keepTime) {
- return function (value) {
- if (value != null) {
- set$1(this, unit, value);
- hooks.updateOffset(this, keepTime);
- return this;
- } else {
- return get(this, unit);
- }
- };
-}
-
-function get (mom, unit) {
- return mom.isValid() ?
- mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
-}
-
-function set$1 (mom, unit, value) {
- if (mom.isValid() && !isNaN(value)) {
- if (unit === 'FullYear' && isLeapYear(mom.year())) {
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
- }
- else {
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
- }
- }
-}
-
-// MOMENTS
-
-function stringGet (units) {
- units = normalizeUnits(units);
- if (isFunction(this[units])) {
- return this[units]();
- }
- return this;
-}
-
-
-function stringSet (units, value) {
- if (typeof units === 'object') {
- units = normalizeObjectUnits(units);
- var prioritized = getPrioritizedUnits(units);
- for (var i = 0; i < prioritized.length; i++) {
- this[prioritized[i].unit](units[prioritized[i].unit]);
- }
- } else {
- units = normalizeUnits(units);
- if (isFunction(this[units])) {
- return this[units](value);
- }
- }
- return this;
-}
-
-function mod(n, x) {
- return ((n % x) + x) % x;
-}
-
-var indexOf;
-
-if (Array.prototype.indexOf) {
- indexOf = Array.prototype.indexOf;
-} else {
- indexOf = function (o) {
- // I know
- var i;
- for (i = 0; i < this.length; ++i) {
- if (this[i] === o) {
- return i;
- }
- }
- return -1;
- };
-}
-
-function daysInMonth(year, month) {
- if (isNaN(year) || isNaN(month)) {
- return NaN;
- }
- var modMonth = mod(month, 12);
- year += (month - modMonth) / 12;
- return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
-}
-
-// FORMATTING
-
-addFormatToken('M', ['MM', 2], 'Mo', function () {
- return this.month() + 1;
-});
-
-addFormatToken('MMM', 0, 0, function (format) {
- return this.localeData().monthsShort(this, format);
-});
-
-addFormatToken('MMMM', 0, 0, function (format) {
- return this.localeData().months(this, format);
-});
-
-// ALIASES
-
-addUnitAlias('month', 'M');
-
-// PRIORITY
-
-addUnitPriority('month', 8);
-
-// PARSING
-
-addRegexToken('M', match1to2);
-addRegexToken('MM', match1to2, match2);
-addRegexToken('MMM', function (isStrict, locale) {
- return locale.monthsShortRegex(isStrict);
-});
-addRegexToken('MMMM', function (isStrict, locale) {
- return locale.monthsRegex(isStrict);
-});
-
-addParseToken(['M', 'MM'], function (input, array) {
- array[MONTH] = toInt(input) - 1;
-});
-
-addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
- var month = config._locale.monthsParse(input, token, config._strict);
- // if we didn't find a month name, mark the date as invalid.
- if (month != null) {
- array[MONTH] = month;
- } else {
- getParsingFlags(config).invalidMonth = input;
- }
-});
-
-// LOCALES
-
-var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
-var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
-function localeMonths (m, format) {
- if (!m) {
- return isArray(this._months) ? this._months :
- this._months['standalone'];
- }
- return isArray(this._months) ? this._months[m.month()] :
- this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
-}
-
-var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
-function localeMonthsShort (m, format) {
- if (!m) {
- return isArray(this._monthsShort) ? this._monthsShort :
- this._monthsShort['standalone'];
- }
- return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
- this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
-}
-
-function handleStrictParse(monthName, format, strict) {
- var i, ii, mom, llc = monthName.toLocaleLowerCase();
- if (!this._monthsParse) {
- // this is not used
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- for (i = 0; i < 12; ++i) {
- mom = createUTC([2000, i]);
- this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
- this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
- }
- }
-
- if (strict) {
- if (format === 'MMM') {
- ii = indexOf.call(this._shortMonthsParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._longMonthsParse, llc);
- return ii !== -1 ? ii : null;
- }
- } else {
- if (format === 'MMM') {
- ii = indexOf.call(this._shortMonthsParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._longMonthsParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._longMonthsParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._shortMonthsParse, llc);
- return ii !== -1 ? ii : null;
- }
- }
-}
-
-function localeMonthsParse (monthName, format, strict) {
- var i, mom, regex;
-
- if (this._monthsParseExact) {
- return handleStrictParse.call(this, monthName, format, strict);
- }
-
- if (!this._monthsParse) {
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- }
-
- // TODO: add sorting
- // Sorting makes sure if one month (or abbr) is a prefix of another
- // see sorting in computeMonthsParse
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, i]);
- if (strict && !this._longMonthsParse[i]) {
- this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
- this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
- }
- if (!strict && !this._monthsParse[i]) {
- regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
- this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
- return i;
- } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
- return i;
- } else if (!strict && this._monthsParse[i].test(monthName)) {
- return i;
- }
- }
-}
-
-// MOMENTS
-
-function setMonth (mom, value) {
- var dayOfMonth;
-
- if (!mom.isValid()) {
- // No op
- return mom;
- }
-
- if (typeof value === 'string') {
- if (/^\d+$/.test(value)) {
- value = toInt(value);
- } else {
- value = mom.localeData().monthsParse(value);
- // TODO: Another silent failure?
- if (!isNumber(value)) {
- return mom;
- }
- }
- }
-
- dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
- return mom;
-}
-
-function getSetMonth (value) {
- if (value != null) {
- setMonth(this, value);
- hooks.updateOffset(this, true);
- return this;
- } else {
- return get(this, 'Month');
- }
-}
-
-function getDaysInMonth () {
- return daysInMonth(this.year(), this.month());
-}
-
-var defaultMonthsShortRegex = matchWord;
-function monthsShortRegex (isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- computeMonthsParse.call(this);
- }
- if (isStrict) {
- return this._monthsShortStrictRegex;
- } else {
- return this._monthsShortRegex;
- }
- } else {
- if (!hasOwnProp(this, '_monthsShortRegex')) {
- this._monthsShortRegex = defaultMonthsShortRegex;
- }
- return this._monthsShortStrictRegex && isStrict ?
- this._monthsShortStrictRegex : this._monthsShortRegex;
- }
-}
-
-var defaultMonthsRegex = matchWord;
-function monthsRegex (isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- computeMonthsParse.call(this);
- }
- if (isStrict) {
- return this._monthsStrictRegex;
- } else {
- return this._monthsRegex;
- }
- } else {
- if (!hasOwnProp(this, '_monthsRegex')) {
- this._monthsRegex = defaultMonthsRegex;
- }
- return this._monthsStrictRegex && isStrict ?
- this._monthsStrictRegex : this._monthsRegex;
- }
-}
-
-function computeMonthsParse () {
- function cmpLenRev(a, b) {
- return b.length - a.length;
- }
-
- var shortPieces = [], longPieces = [], mixedPieces = [],
- i, mom;
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, i]);
- shortPieces.push(this.monthsShort(mom, ''));
- longPieces.push(this.months(mom, ''));
- mixedPieces.push(this.months(mom, ''));
- mixedPieces.push(this.monthsShort(mom, ''));
- }
- // Sorting makes sure if one month (or abbr) is a prefix of another it
- // will match the longer piece.
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 12; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- }
- for (i = 0; i < 24; i++) {
- mixedPieces[i] = regexEscape(mixedPieces[i]);
- }
-
- this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
- this._monthsShortRegex = this._monthsRegex;
- this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
- this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
-}
-
-function createDate (y, m, d, h, M, s, ms) {
- // can't just apply() to create a date:
- // https://stackoverflow.com/q/181348
- var date = new Date(y, m, d, h, M, s, ms);
-
- // the date constructor remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
- date.setFullYear(y);
- }
- return date;
-}
-
-function createUTCDate (y) {
- var date = new Date(Date.UTC.apply(null, arguments));
-
- // the Date.UTC function remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
- date.setUTCFullYear(y);
- }
- return date;
-}
-
-// start-of-first-week - start-of-year
-function firstWeekOffset(year, dow, doy) {
- var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
- fwd = 7 + dow - doy,
- // first-week day local weekday -- which local weekday is fwd
- fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
-
- return -fwdlw + fwd - 1;
-}
-
-// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
-function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
- var localWeekday = (7 + weekday - dow) % 7,
- weekOffset = firstWeekOffset(year, dow, doy),
- dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
- resYear, resDayOfYear;
-
- if (dayOfYear <= 0) {
- resYear = year - 1;
- resDayOfYear = daysInYear(resYear) + dayOfYear;
- } else if (dayOfYear > daysInYear(year)) {
- resYear = year + 1;
- resDayOfYear = dayOfYear - daysInYear(year);
- } else {
- resYear = year;
- resDayOfYear = dayOfYear;
- }
-
- return {
- year: resYear,
- dayOfYear: resDayOfYear
- };
-}
-
-function weekOfYear(mom, dow, doy) {
- var weekOffset = firstWeekOffset(mom.year(), dow, doy),
- week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
- resWeek, resYear;
-
- if (week < 1) {
- resYear = mom.year() - 1;
- resWeek = week + weeksInYear(resYear, dow, doy);
- } else if (week > weeksInYear(mom.year(), dow, doy)) {
- resWeek = week - weeksInYear(mom.year(), dow, doy);
- resYear = mom.year() + 1;
- } else {
- resYear = mom.year();
- resWeek = week;
- }
-
- return {
- week: resWeek,
- year: resYear
- };
-}
-
-function weeksInYear(year, dow, doy) {
- var weekOffset = firstWeekOffset(year, dow, doy),
- weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
- return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
-}
-
-// FORMATTING
-
-addFormatToken('w', ['ww', 2], 'wo', 'week');
-addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
-
-// ALIASES
-
-addUnitAlias('week', 'w');
-addUnitAlias('isoWeek', 'W');
-
-// PRIORITIES
-
-addUnitPriority('week', 5);
-addUnitPriority('isoWeek', 5);
-
-// PARSING
-
-addRegexToken('w', match1to2);
-addRegexToken('ww', match1to2, match2);
-addRegexToken('W', match1to2);
-addRegexToken('WW', match1to2, match2);
-
-addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
- week[token.substr(0, 1)] = toInt(input);
-});
-
-// HELPERS
-
-// LOCALES
-
-function localeWeek (mom) {
- return weekOfYear(mom, this._week.dow, this._week.doy).week;
-}
-
-var defaultLocaleWeek = {
- dow : 0, // Sunday is the first day of the week.
- doy : 6 // The week that contains Jan 1st is the first week of the year.
-};
-
-function localeFirstDayOfWeek () {
- return this._week.dow;
-}
-
-function localeFirstDayOfYear () {
- return this._week.doy;
-}
-
-// MOMENTS
-
-function getSetWeek (input) {
- var week = this.localeData().week(this);
- return input == null ? week : this.add((input - week) * 7, 'd');
-}
-
-function getSetISOWeek (input) {
- var week = weekOfYear(this, 1, 4).week;
- return input == null ? week : this.add((input - week) * 7, 'd');
-}
-
-// FORMATTING
-
-addFormatToken('d', 0, 'do', 'day');
-
-addFormatToken('dd', 0, 0, function (format) {
- return this.localeData().weekdaysMin(this, format);
-});
-
-addFormatToken('ddd', 0, 0, function (format) {
- return this.localeData().weekdaysShort(this, format);
-});
-
-addFormatToken('dddd', 0, 0, function (format) {
- return this.localeData().weekdays(this, format);
-});
-
-addFormatToken('e', 0, 0, 'weekday');
-addFormatToken('E', 0, 0, 'isoWeekday');
-
-// ALIASES
-
-addUnitAlias('day', 'd');
-addUnitAlias('weekday', 'e');
-addUnitAlias('isoWeekday', 'E');
-
-// PRIORITY
-addUnitPriority('day', 11);
-addUnitPriority('weekday', 11);
-addUnitPriority('isoWeekday', 11);
-
-// PARSING
-
-addRegexToken('d', match1to2);
-addRegexToken('e', match1to2);
-addRegexToken('E', match1to2);
-addRegexToken('dd', function (isStrict, locale) {
- return locale.weekdaysMinRegex(isStrict);
-});
-addRegexToken('ddd', function (isStrict, locale) {
- return locale.weekdaysShortRegex(isStrict);
-});
-addRegexToken('dddd', function (isStrict, locale) {
- return locale.weekdaysRegex(isStrict);
-});
-
-addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
- var weekday = config._locale.weekdaysParse(input, token, config._strict);
- // if we didn't get a weekday name, mark the date as invalid
- if (weekday != null) {
- week.d = weekday;
- } else {
- getParsingFlags(config).invalidWeekday = input;
- }
-});
-
-addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
- week[token] = toInt(input);
-});
-
-// HELPERS
-
-function parseWeekday(input, locale) {
- if (typeof input !== 'string') {
- return input;
- }
-
- if (!isNaN(input)) {
- return parseInt(input, 10);
- }
-
- input = locale.weekdaysParse(input);
- if (typeof input === 'number') {
- return input;
- }
-
- return null;
-}
-
-function parseIsoWeekday(input, locale) {
- if (typeof input === 'string') {
- return locale.weekdaysParse(input) % 7 || 7;
- }
- return isNaN(input) ? null : input;
-}
-
-// LOCALES
-
-var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
-function localeWeekdays (m, format) {
- if (!m) {
- return isArray(this._weekdays) ? this._weekdays :
- this._weekdays['standalone'];
- }
- return isArray(this._weekdays) ? this._weekdays[m.day()] :
- this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
-}
-
-var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
-function localeWeekdaysShort (m) {
- return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
-}
-
-var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
-function localeWeekdaysMin (m) {
- return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
-}
-
-function handleStrictParse$1(weekdayName, format, strict) {
- var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._minWeekdaysParse = [];
-
- for (i = 0; i < 7; ++i) {
- mom = createUTC([2000, 1]).day(i);
- this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
- this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
- this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
- }
- }
-
- if (strict) {
- if (format === 'dddd') {
- ii = indexOf.call(this._weekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else if (format === 'ddd') {
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._minWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- }
- } else {
- if (format === 'dddd') {
- ii = indexOf.call(this._weekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._minWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else if (format === 'ddd') {
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._weekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._minWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._minWeekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._weekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- }
- }
-}
-
-function localeWeekdaysParse (weekdayName, format, strict) {
- var i, mom, regex;
-
- if (this._weekdaysParseExact) {
- return handleStrictParse$1.call(this, weekdayName, format, strict);
- }
-
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._minWeekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._fullWeekdaysParse = [];
- }
-
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
-
- mom = createUTC([2000, 1]).day(i);
- if (strict && !this._fullWeekdaysParse[i]) {
- this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
- this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
- this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
- }
- if (!this._weekdaysParse[i]) {
- regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
- this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
- return i;
- } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
- return i;
- } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
- return i;
- } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
- return i;
- }
- }
-}
-
-// MOMENTS
-
-function getSetDayOfWeek (input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
- if (input != null) {
- input = parseWeekday(input, this.localeData());
- return this.add(input - day, 'd');
- } else {
- return day;
- }
-}
-
-function getSetLocaleDayOfWeek (input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
- return input == null ? weekday : this.add(input - weekday, 'd');
-}
-
-function getSetISODayOfWeek (input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
-
- // behaves the same as moment#day except
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
- // as a setter, sunday should belong to the previous week.
-
- if (input != null) {
- var weekday = parseIsoWeekday(input, this.localeData());
- return this.day(this.day() % 7 ? weekday : weekday - 7);
- } else {
- return this.day() || 7;
- }
-}
-
-var defaultWeekdaysRegex = matchWord;
-function weekdaysRegex (isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- computeWeekdaysParse.call(this);
- }
- if (isStrict) {
- return this._weekdaysStrictRegex;
- } else {
- return this._weekdaysRegex;
- }
- } else {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this._weekdaysRegex = defaultWeekdaysRegex;
- }
- return this._weekdaysStrictRegex && isStrict ?
- this._weekdaysStrictRegex : this._weekdaysRegex;
- }
-}
-
-var defaultWeekdaysShortRegex = matchWord;
-function weekdaysShortRegex (isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- computeWeekdaysParse.call(this);
- }
- if (isStrict) {
- return this._weekdaysShortStrictRegex;
- } else {
- return this._weekdaysShortRegex;
- }
- } else {
- if (!hasOwnProp(this, '_weekdaysShortRegex')) {
- this._weekdaysShortRegex = defaultWeekdaysShortRegex;
- }
- return this._weekdaysShortStrictRegex && isStrict ?
- this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
- }
-}
-
-var defaultWeekdaysMinRegex = matchWord;
-function weekdaysMinRegex (isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- computeWeekdaysParse.call(this);
- }
- if (isStrict) {
- return this._weekdaysMinStrictRegex;
- } else {
- return this._weekdaysMinRegex;
- }
- } else {
- if (!hasOwnProp(this, '_weekdaysMinRegex')) {
- this._weekdaysMinRegex = defaultWeekdaysMinRegex;
- }
- return this._weekdaysMinStrictRegex && isStrict ?
- this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
- }
-}
-
-
-function computeWeekdaysParse () {
- function cmpLenRev(a, b) {
- return b.length - a.length;
- }
-
- var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
- i, mom, minp, shortp, longp;
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, 1]).day(i);
- minp = this.weekdaysMin(mom, '');
- shortp = this.weekdaysShort(mom, '');
- longp = this.weekdays(mom, '');
- minPieces.push(minp);
- shortPieces.push(shortp);
- longPieces.push(longp);
- mixedPieces.push(minp);
- mixedPieces.push(shortp);
- mixedPieces.push(longp);
- }
- // Sorting makes sure if one weekday (or abbr) is a prefix of another it
- // will match the longer piece.
- minPieces.sort(cmpLenRev);
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 7; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- mixedPieces[i] = regexEscape(mixedPieces[i]);
- }
-
- this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
- this._weekdaysShortRegex = this._weekdaysRegex;
- this._weekdaysMinRegex = this._weekdaysRegex;
-
- this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
- this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
- this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
-}
-
-// FORMATTING
-
-function hFormat() {
- return this.hours() % 12 || 12;
-}
-
-function kFormat() {
- return this.hours() || 24;
-}
-
-addFormatToken('H', ['HH', 2], 0, 'hour');
-addFormatToken('h', ['hh', 2], 0, hFormat);
-addFormatToken('k', ['kk', 2], 0, kFormat);
-
-addFormatToken('hmm', 0, 0, function () {
- return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
-});
-
-addFormatToken('hmmss', 0, 0, function () {
- return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
- zeroFill(this.seconds(), 2);
-});
-
-addFormatToken('Hmm', 0, 0, function () {
- return '' + this.hours() + zeroFill(this.minutes(), 2);
-});
-
-addFormatToken('Hmmss', 0, 0, function () {
- return '' + this.hours() + zeroFill(this.minutes(), 2) +
- zeroFill(this.seconds(), 2);
-});
-
-function meridiem (token, lowercase) {
- addFormatToken(token, 0, 0, function () {
- return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
- });
-}
-
-meridiem('a', true);
-meridiem('A', false);
-
-// ALIASES
-
-addUnitAlias('hour', 'h');
-
-// PRIORITY
-addUnitPriority('hour', 13);
-
-// PARSING
-
-function matchMeridiem (isStrict, locale) {
- return locale._meridiemParse;
-}
-
-addRegexToken('a', matchMeridiem);
-addRegexToken('A', matchMeridiem);
-addRegexToken('H', match1to2);
-addRegexToken('h', match1to2);
-addRegexToken('k', match1to2);
-addRegexToken('HH', match1to2, match2);
-addRegexToken('hh', match1to2, match2);
-addRegexToken('kk', match1to2, match2);
-
-addRegexToken('hmm', match3to4);
-addRegexToken('hmmss', match5to6);
-addRegexToken('Hmm', match3to4);
-addRegexToken('Hmmss', match5to6);
-
-addParseToken(['H', 'HH'], HOUR);
-addParseToken(['k', 'kk'], function (input, array, config) {
- var kInput = toInt(input);
- array[HOUR] = kInput === 24 ? 0 : kInput;
-});
-addParseToken(['a', 'A'], function (input, array, config) {
- config._isPm = config._locale.isPM(input);
- config._meridiem = input;
-});
-addParseToken(['h', 'hh'], function (input, array, config) {
- array[HOUR] = toInt(input);
- getParsingFlags(config).bigHour = true;
-});
-addParseToken('hmm', function (input, array, config) {
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- getParsingFlags(config).bigHour = true;
-});
-addParseToken('hmmss', function (input, array, config) {
- var pos1 = input.length - 4;
- var pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- getParsingFlags(config).bigHour = true;
-});
-addParseToken('Hmm', function (input, array, config) {
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
-});
-addParseToken('Hmmss', function (input, array, config) {
- var pos1 = input.length - 4;
- var pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
-});
-
-// LOCALES
-
-function localeIsPM (input) {
- // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
- // Using charAt should be more compatible.
- return ((input + '').toLowerCase().charAt(0) === 'p');
-}
-
-var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
-function localeMeridiem (hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'pm' : 'PM';
- } else {
- return isLower ? 'am' : 'AM';
- }
-}
-
-
-// MOMENTS
-
-// Setting the hour should keep the time, because the user explicitly
-// specified which hour he wants. So trying to maintain the same hour (in
-// a new timezone) makes sense. Adding/subtracting hours does not follow
-// this rule.
-var getSetHour = makeGetSet('Hours', true);
-
-// months
-// week
-// weekdays
-// meridiem
-var baseConfig = {
- calendar: defaultCalendar,
- longDateFormat: defaultLongDateFormat,
- invalidDate: defaultInvalidDate,
- ordinal: defaultOrdinal,
- dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
- relativeTime: defaultRelativeTime,
-
- months: defaultLocaleMonths,
- monthsShort: defaultLocaleMonthsShort,
-
- week: defaultLocaleWeek,
-
- weekdays: defaultLocaleWeekdays,
- weekdaysMin: defaultLocaleWeekdaysMin,
- weekdaysShort: defaultLocaleWeekdaysShort,
-
- meridiemParse: defaultLocaleMeridiemParse
-};
-
-// internal storage for locale config files
-var locales = {};
-var localeFamilies = {};
-var globalLocale;
-
-function normalizeLocale(key) {
- return key ? key.toLowerCase().replace('_', '-') : key;
-}
-
-// pick the locale from the array
-// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
-// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
-function chooseLocale(names) {
- var i = 0, j, next, locale, split;
-
- while (i < names.length) {
- split = normalizeLocale(names[i]).split('-');
- j = split.length;
- next = normalizeLocale(names[i + 1]);
- next = next ? next.split('-') : null;
- while (j > 0) {
- locale = loadLocale(split.slice(0, j).join('-'));
- if (locale) {
- return locale;
- }
- if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
- //the next array item is better than a shallower substring of this one
- break;
- }
- j--;
- }
- i++;
- }
- return null;
-}
-
-function loadLocale(name) {
- var oldLocale = null;
- // TODO: Find a better way to register and load all the locales in Node
- if (!locales[name] && (typeof module !== 'undefined') &&
- module && module.exports) {
- try {
- oldLocale = globalLocale._abbr;
- var aliasedRequire = require;
- __webpack_require__(345)("./" + name);
- getSetGlobalLocale(oldLocale);
- } catch (e) {}
- }
- return locales[name];
-}
-
-// This function will load locale and then set the global locale. If
-// no arguments are passed in, it will simply return the current global
-// locale key.
-function getSetGlobalLocale (key, values) {
- var data;
- if (key) {
- if (isUndefined(values)) {
- data = getLocale(key);
- }
- else {
- data = defineLocale(key, values);
- }
-
- if (data) {
- // moment.duration._locale = moment._locale = data;
- globalLocale = data;
- }
- }
-
- return globalLocale._abbr;
-}
-
-function defineLocale (name, config) {
- if (config !== null) {
- var parentConfig = baseConfig;
- config.abbr = name;
- if (locales[name] != null) {
- deprecateSimple('defineLocaleOverride',
- 'use moment.updateLocale(localeName, config) to change ' +
- 'an existing locale. moment.defineLocale(localeName, ' +
- 'config) should only be used for creating a new locale ' +
- 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
- parentConfig = locales[name]._config;
- } else if (config.parentLocale != null) {
- if (locales[config.parentLocale] != null) {
- parentConfig = locales[config.parentLocale]._config;
- } else {
- if (!localeFamilies[config.parentLocale]) {
- localeFamilies[config.parentLocale] = [];
- }
- localeFamilies[config.parentLocale].push({
- name: name,
- config: config
- });
- return null;
- }
- }
- locales[name] = new Locale(mergeConfigs(parentConfig, config));
-
- if (localeFamilies[name]) {
- localeFamilies[name].forEach(function (x) {
- defineLocale(x.name, x.config);
- });
- }
-
- // backwards compat for now: also set the locale
- // make sure we set the locale AFTER all child locales have been
- // created, so we won't end up with the child locale set.
- getSetGlobalLocale(name);
-
-
- return locales[name];
- } else {
- // useful for testing
- delete locales[name];
- return null;
- }
-}
-
-function updateLocale(name, config) {
- if (config != null) {
- var locale, parentConfig = baseConfig;
- // MERGE
- if (locales[name] != null) {
- parentConfig = locales[name]._config;
- }
- config = mergeConfigs(parentConfig, config);
- locale = new Locale(config);
- locale.parentLocale = locales[name];
- locales[name] = locale;
-
- // backwards compat for now: also set the locale
- getSetGlobalLocale(name);
- } else {
- // pass null for config to unupdate, useful for tests
- if (locales[name] != null) {
- if (locales[name].parentLocale != null) {
- locales[name] = locales[name].parentLocale;
- } else if (locales[name] != null) {
- delete locales[name];
- }
- }
- }
- return locales[name];
-}
-
-// returns locale data
-function getLocale (key) {
- var locale;
-
- if (key && key._locale && key._locale._abbr) {
- key = key._locale._abbr;
- }
-
- if (!key) {
- return globalLocale;
- }
-
- if (!isArray(key)) {
- //short-circuit everything else
- locale = loadLocale(key);
- if (locale) {
- return locale;
- }
- key = [key];
- }
-
- return chooseLocale(key);
-}
-
-function listLocales() {
- return keys(locales);
-}
-
-function checkOverflow (m) {
- var overflow;
- var a = m._a;
-
- if (a && getParsingFlags(m).overflow === -2) {
- overflow =
- a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
- a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
- a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
- a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
- a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
- a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
- -1;
-
- if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
- overflow = DATE;
- }
- if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
- overflow = WEEK;
- }
- if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
- overflow = WEEKDAY;
- }
-
- getParsingFlags(m).overflow = overflow;
- }
-
- return m;
-}
-
-// Pick the first defined of two or three arguments.
-function defaults(a, b, c) {
- if (a != null) {
- return a;
- }
- if (b != null) {
- return b;
- }
- return c;
-}
-
-function currentDateArray(config) {
- // hooks is actually the exported moment object
- var nowValue = new Date(hooks.now());
- if (config._useUTC) {
- return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
- }
- return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
-}
-
-// convert an array to a date.
-// the array should mirror the parameters below
-// note: all values past the year are optional and will default to the lowest possible value.
-// [year, month, day , hour, minute, second, millisecond]
-function configFromArray (config) {
- var i, date, input = [], currentDate, yearToUse;
-
- if (config._d) {
- return;
- }
-
- currentDate = currentDateArray(config);
-
- //compute day of the year from weeks and weekdays
- if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
- dayOfYearFromWeekInfo(config);
- }
-
- //if the day of the year is set, figure out what it is
- if (config._dayOfYear != null) {
- yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
-
- if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
- getParsingFlags(config)._overflowDayOfYear = true;
- }
-
- date = createUTCDate(yearToUse, 0, config._dayOfYear);
- config._a[MONTH] = date.getUTCMonth();
- config._a[DATE] = date.getUTCDate();
- }
-
- // Default to current date.
- // * if no year, month, day of month are given, default to today
- // * if day of month is given, default month and year
- // * if month is given, default only year
- // * if year is given, don't default anything
- for (i = 0; i < 3 && config._a[i] == null; ++i) {
- config._a[i] = input[i] = currentDate[i];
- }
-
- // Zero out whatever was not defaulted, including time
- for (; i < 7; i++) {
- config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
- }
-
- // Check for 24:00:00.000
- if (config._a[HOUR] === 24 &&
- config._a[MINUTE] === 0 &&
- config._a[SECOND] === 0 &&
- config._a[MILLISECOND] === 0) {
- config._nextDay = true;
- config._a[HOUR] = 0;
- }
-
- config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
- // Apply timezone offset from input. The actual utcOffset can be changed
- // with parseZone.
- if (config._tzm != null) {
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
- }
-
- if (config._nextDay) {
- config._a[HOUR] = 24;
- }
-
- // check for mismatching day of week
- if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {
- getParsingFlags(config).weekdayMismatch = true;
- }
-}
-
-function dayOfYearFromWeekInfo(config) {
- var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
-
- w = config._w;
- if (w.GG != null || w.W != null || w.E != null) {
- dow = 1;
- doy = 4;
-
- // TODO: We need to take the current isoWeekYear, but that depends on
- // how we interpret now (local, utc, fixed offset). So create
- // a now version of current config (take local/utc/offset flags, and
- // create now).
- weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
- week = defaults(w.W, 1);
- weekday = defaults(w.E, 1);
- if (weekday < 1 || weekday > 7) {
- weekdayOverflow = true;
- }
- } else {
- dow = config._locale._week.dow;
- doy = config._locale._week.doy;
-
- var curWeek = weekOfYear(createLocal(), dow, doy);
-
- weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
-
- // Default to current week.
- week = defaults(w.w, curWeek.week);
-
- if (w.d != null) {
- // weekday -- low day numbers are considered next week
- weekday = w.d;
- if (weekday < 0 || weekday > 6) {
- weekdayOverflow = true;
- }
- } else if (w.e != null) {
- // local weekday -- counting starts from begining of week
- weekday = w.e + dow;
- if (w.e < 0 || w.e > 6) {
- weekdayOverflow = true;
- }
- } else {
- // default to begining of week
- weekday = dow;
- }
- }
- if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
- getParsingFlags(config)._overflowWeeks = true;
- } else if (weekdayOverflow != null) {
- getParsingFlags(config)._overflowWeekday = true;
- } else {
- temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
- config._a[YEAR] = temp.year;
- config._dayOfYear = temp.dayOfYear;
- }
-}
-
-// iso 8601 regex
-// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
-var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
-var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
-
-var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
-
-var isoDates = [
- ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
- ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
- ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
- ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
- ['YYYY-DDD', /\d{4}-\d{3}/],
- ['YYYY-MM', /\d{4}-\d\d/, false],
- ['YYYYYYMMDD', /[+-]\d{10}/],
- ['YYYYMMDD', /\d{8}/],
- // YYYYMM is NOT allowed by the standard
- ['GGGG[W]WWE', /\d{4}W\d{3}/],
- ['GGGG[W]WW', /\d{4}W\d{2}/, false],
- ['YYYYDDD', /\d{7}/]
-];
-
-// iso time formats and regexes
-var isoTimes = [
- ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
- ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
- ['HH:mm:ss', /\d\d:\d\d:\d\d/],
- ['HH:mm', /\d\d:\d\d/],
- ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
- ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
- ['HHmmss', /\d\d\d\d\d\d/],
- ['HHmm', /\d\d\d\d/],
- ['HH', /\d\d/]
-];
-
-var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
-
-// date from iso format
-function configFromISO(config) {
- var i, l,
- string = config._i,
- match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
- allowTime, dateFormat, timeFormat, tzFormat;
-
- if (match) {
- getParsingFlags(config).iso = true;
-
- for (i = 0, l = isoDates.length; i < l; i++) {
- if (isoDates[i][1].exec(match[1])) {
- dateFormat = isoDates[i][0];
- allowTime = isoDates[i][2] !== false;
- break;
- }
- }
- if (dateFormat == null) {
- config._isValid = false;
- return;
- }
- if (match[3]) {
- for (i = 0, l = isoTimes.length; i < l; i++) {
- if (isoTimes[i][1].exec(match[3])) {
- // match[2] should be 'T' or space
- timeFormat = (match[2] || ' ') + isoTimes[i][0];
- break;
- }
- }
- if (timeFormat == null) {
- config._isValid = false;
- return;
- }
- }
- if (!allowTime && timeFormat != null) {
- config._isValid = false;
- return;
- }
- if (match[4]) {
- if (tzRegex.exec(match[4])) {
- tzFormat = 'Z';
- } else {
- config._isValid = false;
- return;
- }
- }
- config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
- configFromStringAndFormat(config);
- } else {
- config._isValid = false;
- }
-}
-
-// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
-var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;
-
-function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
- var result = [
- untruncateYear(yearStr),
- defaultLocaleMonthsShort.indexOf(monthStr),
- parseInt(dayStr, 10),
- parseInt(hourStr, 10),
- parseInt(minuteStr, 10)
- ];
-
- if (secondStr) {
- result.push(parseInt(secondStr, 10));
- }
-
- return result;
-}
-
-function untruncateYear(yearStr) {
- var year = parseInt(yearStr, 10);
- if (year <= 49) {
- return 2000 + year;
- } else if (year <= 999) {
- return 1900 + year;
- }
- return year;
-}
-
-function preprocessRFC2822(s) {
- // Remove comments and folding whitespace and replace multiple-spaces with a single space
- return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim();
-}
-
-function checkWeekday(weekdayStr, parsedInput, config) {
- if (weekdayStr) {
- // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
- var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
- weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
- if (weekdayProvided !== weekdayActual) {
- getParsingFlags(config).weekdayMismatch = true;
- config._isValid = false;
- return false;
- }
- }
- return true;
-}
-
-var obsOffsets = {
- UT: 0,
- GMT: 0,
- EDT: -4 * 60,
- EST: -5 * 60,
- CDT: -5 * 60,
- CST: -6 * 60,
- MDT: -6 * 60,
- MST: -7 * 60,
- PDT: -7 * 60,
- PST: -8 * 60
-};
-
-function calculateOffset(obsOffset, militaryOffset, numOffset) {
- if (obsOffset) {
- return obsOffsets[obsOffset];
- } else if (militaryOffset) {
- // the only allowed military tz is Z
- return 0;
- } else {
- var hm = parseInt(numOffset, 10);
- var m = hm % 100, h = (hm - m) / 100;
- return h * 60 + m;
- }
-}
-
-// date and time from ref 2822 format
-function configFromRFC2822(config) {
- var match = rfc2822.exec(preprocessRFC2822(config._i));
- if (match) {
- var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
- if (!checkWeekday(match[1], parsedArray, config)) {
- return;
- }
-
- config._a = parsedArray;
- config._tzm = calculateOffset(match[8], match[9], match[10]);
-
- config._d = createUTCDate.apply(null, config._a);
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
-
- getParsingFlags(config).rfc2822 = true;
- } else {
- config._isValid = false;
- }
-}
-
-// date from iso format or fallback
-function configFromString(config) {
- var matched = aspNetJsonRegex.exec(config._i);
-
- if (matched !== null) {
- config._d = new Date(+matched[1]);
- return;
- }
-
- configFromISO(config);
- if (config._isValid === false) {
- delete config._isValid;
- } else {
- return;
- }
-
- configFromRFC2822(config);
- if (config._isValid === false) {
- delete config._isValid;
- } else {
- return;
- }
-
- // Final attempt, use Input Fallback
- hooks.createFromInputFallback(config);
-}
-
-hooks.createFromInputFallback = deprecate(
- 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
- 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
- 'discouraged and will be removed in an upcoming major release. Please refer to ' +
- 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
- function (config) {
- config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
- }
-);
-
-// constant that refers to the ISO standard
-hooks.ISO_8601 = function () {};
-
-// constant that refers to the RFC 2822 form
-hooks.RFC_2822 = function () {};
-
-// date from string and format string
-function configFromStringAndFormat(config) {
- // TODO: Move this to another part of the creation flow to prevent circular deps
- if (config._f === hooks.ISO_8601) {
- configFromISO(config);
- return;
- }
- if (config._f === hooks.RFC_2822) {
- configFromRFC2822(config);
- return;
- }
- config._a = [];
- getParsingFlags(config).empty = true;
-
- // This array is used to make a Date, either with `new Date` or `Date.UTC`
- var string = '' + config._i,
- i, parsedInput, tokens, token, skipped,
- stringLength = string.length,
- totalParsedInputLength = 0;
-
- tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
-
- for (i = 0; i < tokens.length; i++) {
- token = tokens[i];
- parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
- // console.log('token', token, 'parsedInput', parsedInput,
- // 'regex', getParseRegexForToken(token, config));
- if (parsedInput) {
- skipped = string.substr(0, string.indexOf(parsedInput));
- if (skipped.length > 0) {
- getParsingFlags(config).unusedInput.push(skipped);
- }
- string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
- totalParsedInputLength += parsedInput.length;
- }
- // don't parse if it's not a known token
- if (formatTokenFunctions[token]) {
- if (parsedInput) {
- getParsingFlags(config).empty = false;
- }
- else {
- getParsingFlags(config).unusedTokens.push(token);
- }
- addTimeToArrayFromToken(token, parsedInput, config);
- }
- else if (config._strict && !parsedInput) {
- getParsingFlags(config).unusedTokens.push(token);
- }
- }
-
- // add remaining unparsed input length to the string
- getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
- if (string.length > 0) {
- getParsingFlags(config).unusedInput.push(string);
- }
-
- // clear _12h flag if hour is <= 12
- if (config._a[HOUR] <= 12 &&
- getParsingFlags(config).bigHour === true &&
- config._a[HOUR] > 0) {
- getParsingFlags(config).bigHour = undefined;
- }
-
- getParsingFlags(config).parsedDateParts = config._a.slice(0);
- getParsingFlags(config).meridiem = config._meridiem;
- // handle meridiem
- config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
-
- configFromArray(config);
- checkOverflow(config);
-}
-
-
-function meridiemFixWrap (locale, hour, meridiem) {
- var isPm;
-
- if (meridiem == null) {
- // nothing to do
- return hour;
- }
- if (locale.meridiemHour != null) {
- return locale.meridiemHour(hour, meridiem);
- } else if (locale.isPM != null) {
- // Fallback
- isPm = locale.isPM(meridiem);
- if (isPm && hour < 12) {
- hour += 12;
- }
- if (!isPm && hour === 12) {
- hour = 0;
- }
- return hour;
- } else {
- // this is not supposed to happen
- return hour;
- }
-}
-
-// date from string and array of format strings
-function configFromStringAndArray(config) {
- var tempConfig,
- bestMoment,
-
- scoreToBeat,
- i,
- currentScore;
-
- if (config._f.length === 0) {
- getParsingFlags(config).invalidFormat = true;
- config._d = new Date(NaN);
- return;
- }
-
- for (i = 0; i < config._f.length; i++) {
- currentScore = 0;
- tempConfig = copyConfig({}, config);
- if (config._useUTC != null) {
- tempConfig._useUTC = config._useUTC;
- }
- tempConfig._f = config._f[i];
- configFromStringAndFormat(tempConfig);
-
- if (!isValid(tempConfig)) {
- continue;
- }
-
- // if there is any input that was not parsed add a penalty for that format
- currentScore += getParsingFlags(tempConfig).charsLeftOver;
-
- //or tokens
- currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
-
- getParsingFlags(tempConfig).score = currentScore;
-
- if (scoreToBeat == null || currentScore < scoreToBeat) {
- scoreToBeat = currentScore;
- bestMoment = tempConfig;
- }
- }
-
- extend(config, bestMoment || tempConfig);
-}
-
-function configFromObject(config) {
- if (config._d) {
- return;
- }
-
- var i = normalizeObjectUnits(config._i);
- config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
- return obj && parseInt(obj, 10);
- });
-
- configFromArray(config);
-}
-
-function createFromConfig (config) {
- var res = new Moment(checkOverflow(prepareConfig(config)));
- if (res._nextDay) {
- // Adding is smart enough around DST
- res.add(1, 'd');
- res._nextDay = undefined;
- }
-
- return res;
-}
-
-function prepareConfig (config) {
- var input = config._i,
- format = config._f;
-
- config._locale = config._locale || getLocale(config._l);
-
- if (input === null || (format === undefined && input === '')) {
- return createInvalid({nullInput: true});
- }
-
- if (typeof input === 'string') {
- config._i = input = config._locale.preparse(input);
- }
-
- if (isMoment(input)) {
- return new Moment(checkOverflow(input));
- } else if (isDate(input)) {
- config._d = input;
- } else if (isArray(format)) {
- configFromStringAndArray(config);
- } else if (format) {
- configFromStringAndFormat(config);
- } else {
- configFromInput(config);
- }
-
- if (!isValid(config)) {
- config._d = null;
- }
-
- return config;
-}
-
-function configFromInput(config) {
- var input = config._i;
- if (isUndefined(input)) {
- config._d = new Date(hooks.now());
- } else if (isDate(input)) {
- config._d = new Date(input.valueOf());
- } else if (typeof input === 'string') {
- configFromString(config);
- } else if (isArray(input)) {
- config._a = map(input.slice(0), function (obj) {
- return parseInt(obj, 10);
- });
- configFromArray(config);
- } else if (isObject(input)) {
- configFromObject(config);
- } else if (isNumber(input)) {
- // from milliseconds
- config._d = new Date(input);
- } else {
- hooks.createFromInputFallback(config);
- }
-}
-
-function createLocalOrUTC (input, format, locale, strict, isUTC) {
- var c = {};
-
- if (locale === true || locale === false) {
- strict = locale;
- locale = undefined;
- }
-
- if ((isObject(input) && isObjectEmpty(input)) ||
- (isArray(input) && input.length === 0)) {
- input = undefined;
- }
- // object construction must be done this way.
- // https://github.com/moment/moment/issues/1423
- c._isAMomentObject = true;
- c._useUTC = c._isUTC = isUTC;
- c._l = locale;
- c._i = input;
- c._f = format;
- c._strict = strict;
-
- return createFromConfig(c);
-}
-
-function createLocal (input, format, locale, strict) {
- return createLocalOrUTC(input, format, locale, strict, false);
-}
-
-var prototypeMin = deprecate(
- 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
- function () {
- var other = createLocal.apply(null, arguments);
- if (this.isValid() && other.isValid()) {
- return other < this ? this : other;
- } else {
- return createInvalid();
- }
- }
-);
-
-var prototypeMax = deprecate(
- 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
- function () {
- var other = createLocal.apply(null, arguments);
- if (this.isValid() && other.isValid()) {
- return other > this ? this : other;
- } else {
- return createInvalid();
- }
- }
-);
-
-// Pick a moment m from moments so that m[fn](other) is true for all
-// other. This relies on the function fn to be transitive.
-//
-// moments should either be an array of moment objects or an array, whose
-// first element is an array of moment objects.
-function pickBy(fn, moments) {
- var res, i;
- if (moments.length === 1 && isArray(moments[0])) {
- moments = moments[0];
- }
- if (!moments.length) {
- return createLocal();
- }
- res = moments[0];
- for (i = 1; i < moments.length; ++i) {
- if (!moments[i].isValid() || moments[i][fn](res)) {
- res = moments[i];
- }
- }
- return res;
-}
-
-// TODO: Use [].sort instead?
-function min () {
- var args = [].slice.call(arguments, 0);
-
- return pickBy('isBefore', args);
-}
-
-function max () {
- var args = [].slice.call(arguments, 0);
-
- return pickBy('isAfter', args);
-}
-
-var now = function () {
- return Date.now ? Date.now() : +(new Date());
-};
-
-var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
-
-function isDurationValid(m) {
- for (var key in m) {
- if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
- return false;
- }
- }
-
- var unitHasDecimal = false;
- for (var i = 0; i < ordering.length; ++i) {
- if (m[ordering[i]]) {
- if (unitHasDecimal) {
- return false; // only allow non-integers for smallest unit
- }
- if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
- unitHasDecimal = true;
- }
- }
- }
-
- return true;
-}
-
-function isValid$1() {
- return this._isValid;
-}
-
-function createInvalid$1() {
- return createDuration(NaN);
-}
-
-function Duration (duration) {
- var normalizedInput = normalizeObjectUnits(duration),
- years = normalizedInput.year || 0,
- quarters = normalizedInput.quarter || 0,
- months = normalizedInput.month || 0,
- weeks = normalizedInput.week || 0,
- days = normalizedInput.day || 0,
- hours = normalizedInput.hour || 0,
- minutes = normalizedInput.minute || 0,
- seconds = normalizedInput.second || 0,
- milliseconds = normalizedInput.millisecond || 0;
-
- this._isValid = isDurationValid(normalizedInput);
-
- // representation for dateAddRemove
- this._milliseconds = +milliseconds +
- seconds * 1e3 + // 1000
- minutes * 6e4 + // 1000 * 60
- hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
- // Because of dateAddRemove treats 24 hours as different from a
- // day when working around DST, we need to store them separately
- this._days = +days +
- weeks * 7;
- // It is impossible to translate months into days without knowing
- // which months you are are talking about, so we have to store
- // it separately.
- this._months = +months +
- quarters * 3 +
- years * 12;
-
- this._data = {};
-
- this._locale = getLocale();
-
- this._bubble();
-}
-
-function isDuration (obj) {
- return obj instanceof Duration;
-}
-
-function absRound (number) {
- if (number < 0) {
- return Math.round(-1 * number) * -1;
- } else {
- return Math.round(number);
- }
-}
-
-// FORMATTING
-
-function offset (token, separator) {
- addFormatToken(token, 0, 0, function () {
- var offset = this.utcOffset();
- var sign = '+';
- if (offset < 0) {
- offset = -offset;
- sign = '-';
- }
- return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
- });
-}
-
-offset('Z', ':');
-offset('ZZ', '');
-
-// PARSING
-
-addRegexToken('Z', matchShortOffset);
-addRegexToken('ZZ', matchShortOffset);
-addParseToken(['Z', 'ZZ'], function (input, array, config) {
- config._useUTC = true;
- config._tzm = offsetFromString(matchShortOffset, input);
-});
-
-// HELPERS
-
-// timezone chunker
-// '+10:00' > ['10', '00']
-// '-1530' > ['-15', '30']
-var chunkOffset = /([\+\-]|\d\d)/gi;
-
-function offsetFromString(matcher, string) {
- var matches = (string || '').match(matcher);
-
- if (matches === null) {
- return null;
- }
-
- var chunk = matches[matches.length - 1] || [];
- var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
- var minutes = +(parts[1] * 60) + toInt(parts[2]);
-
- return minutes === 0 ?
- 0 :
- parts[0] === '+' ? minutes : -minutes;
-}
-
-// Return a moment from input, that is local/utc/zone equivalent to model.
-function cloneWithOffset(input, model) {
- var res, diff;
- if (model._isUTC) {
- res = model.clone();
- diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
- // Use low-level api, because this fn is low-level api.
- res._d.setTime(res._d.valueOf() + diff);
- hooks.updateOffset(res, false);
- return res;
- } else {
- return createLocal(input).local();
- }
-}
-
-function getDateOffset (m) {
- // On Firefox.24 Date#getTimezoneOffset returns a floating point.
- // https://github.com/moment/moment/pull/1871
- return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
-}
-
-// HOOKS
-
-// This function will be called whenever a moment is mutated.
-// It is intended to keep the offset in sync with the timezone.
-hooks.updateOffset = function () {};
-
-// MOMENTS
-
-// keepLocalTime = true means only change the timezone, without
-// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
-// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
-// +0200, so we adjust the time as needed, to be valid.
-//
-// Keeping the time actually adds/subtracts (one hour)
-// from the actual represented time. That is why we call updateOffset
-// a second time. In case it wants us to change the offset again
-// _changeInProgress == true case, then we have to adjust, because
-// there is no such time in the given timezone.
-function getSetOffset (input, keepLocalTime, keepMinutes) {
- var offset = this._offset || 0,
- localAdjust;
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- if (input != null) {
- if (typeof input === 'string') {
- input = offsetFromString(matchShortOffset, input);
- if (input === null) {
- return this;
- }
- } else if (Math.abs(input) < 16 && !keepMinutes) {
- input = input * 60;
- }
- if (!this._isUTC && keepLocalTime) {
- localAdjust = getDateOffset(this);
- }
- this._offset = input;
- this._isUTC = true;
- if (localAdjust != null) {
- this.add(localAdjust, 'm');
- }
- if (offset !== input) {
- if (!keepLocalTime || this._changeInProgress) {
- addSubtract(this, createDuration(input - offset, 'm'), 1, false);
- } else if (!this._changeInProgress) {
- this._changeInProgress = true;
- hooks.updateOffset(this, true);
- this._changeInProgress = null;
- }
- }
- return this;
- } else {
- return this._isUTC ? offset : getDateOffset(this);
- }
-}
-
-function getSetZone (input, keepLocalTime) {
- if (input != null) {
- if (typeof input !== 'string') {
- input = -input;
- }
-
- this.utcOffset(input, keepLocalTime);
-
- return this;
- } else {
- return -this.utcOffset();
- }
-}
-
-function setOffsetToUTC (keepLocalTime) {
- return this.utcOffset(0, keepLocalTime);
-}
-
-function setOffsetToLocal (keepLocalTime) {
- if (this._isUTC) {
- this.utcOffset(0, keepLocalTime);
- this._isUTC = false;
-
- if (keepLocalTime) {
- this.subtract(getDateOffset(this), 'm');
- }
- }
- return this;
-}
-
-function setOffsetToParsedOffset () {
- if (this._tzm != null) {
- this.utcOffset(this._tzm, false, true);
- } else if (typeof this._i === 'string') {
- var tZone = offsetFromString(matchOffset, this._i);
- if (tZone != null) {
- this.utcOffset(tZone);
- }
- else {
- this.utcOffset(0, true);
- }
- }
- return this;
-}
-
-function hasAlignedHourOffset (input) {
- if (!this.isValid()) {
- return false;
- }
- input = input ? createLocal(input).utcOffset() : 0;
-
- return (this.utcOffset() - input) % 60 === 0;
-}
-
-function isDaylightSavingTime () {
- return (
- this.utcOffset() > this.clone().month(0).utcOffset() ||
- this.utcOffset() > this.clone().month(5).utcOffset()
- );
-}
-
-function isDaylightSavingTimeShifted () {
- if (!isUndefined(this._isDSTShifted)) {
- return this._isDSTShifted;
- }
-
- var c = {};
-
- copyConfig(c, this);
- c = prepareConfig(c);
-
- if (c._a) {
- var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
- this._isDSTShifted = this.isValid() &&
- compareArrays(c._a, other.toArray()) > 0;
- } else {
- this._isDSTShifted = false;
- }
-
- return this._isDSTShifted;
-}
-
-function isLocal () {
- return this.isValid() ? !this._isUTC : false;
-}
-
-function isUtcOffset () {
- return this.isValid() ? this._isUTC : false;
-}
-
-function isUtc () {
- return this.isValid() ? this._isUTC && this._offset === 0 : false;
-}
-
-// ASP.NET json date format regex
-var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
-
-// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
-// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
-// and further modified to allow for strings containing both week and day
-var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
-
-function createDuration (input, key) {
- var duration = input,
- // matching against regexp is expensive, do it on demand
- match = null,
- sign,
- ret,
- diffRes;
-
- if (isDuration(input)) {
- duration = {
- ms : input._milliseconds,
- d : input._days,
- M : input._months
- };
- } else if (isNumber(input)) {
- duration = {};
- if (key) {
- duration[key] = input;
- } else {
- duration.milliseconds = input;
- }
- } else if (!!(match = aspNetRegex.exec(input))) {
- sign = (match[1] === '-') ? -1 : 1;
- duration = {
- y : 0,
- d : toInt(match[DATE]) * sign,
- h : toInt(match[HOUR]) * sign,
- m : toInt(match[MINUTE]) * sign,
- s : toInt(match[SECOND]) * sign,
- ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
- };
- } else if (!!(match = isoRegex.exec(input))) {
- sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
- duration = {
- y : parseIso(match[2], sign),
- M : parseIso(match[3], sign),
- w : parseIso(match[4], sign),
- d : parseIso(match[5], sign),
- h : parseIso(match[6], sign),
- m : parseIso(match[7], sign),
- s : parseIso(match[8], sign)
- };
- } else if (duration == null) {// checks for null or undefined
- duration = {};
- } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
- diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
-
- duration = {};
- duration.ms = diffRes.milliseconds;
- duration.M = diffRes.months;
- }
-
- ret = new Duration(duration);
-
- if (isDuration(input) && hasOwnProp(input, '_locale')) {
- ret._locale = input._locale;
- }
-
- return ret;
-}
-
-createDuration.fn = Duration.prototype;
-createDuration.invalid = createInvalid$1;
-
-function parseIso (inp, sign) {
- // We'd normally use ~~inp for this, but unfortunately it also
- // converts floats to ints.
- // inp may be undefined, so careful calling replace on it.
- var res = inp && parseFloat(inp.replace(',', '.'));
- // apply sign while we're at it
- return (isNaN(res) ? 0 : res) * sign;
-}
-
-function positiveMomentsDifference(base, other) {
- var res = {milliseconds: 0, months: 0};
-
- res.months = other.month() - base.month() +
- (other.year() - base.year()) * 12;
- if (base.clone().add(res.months, 'M').isAfter(other)) {
- --res.months;
- }
-
- res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
-
- return res;
-}
-
-function momentsDifference(base, other) {
- var res;
- if (!(base.isValid() && other.isValid())) {
- return {milliseconds: 0, months: 0};
- }
-
- other = cloneWithOffset(other, base);
- if (base.isBefore(other)) {
- res = positiveMomentsDifference(base, other);
- } else {
- res = positiveMomentsDifference(other, base);
- res.milliseconds = -res.milliseconds;
- res.months = -res.months;
- }
-
- return res;
-}
-
-// TODO: remove 'name' arg after deprecation is removed
-function createAdder(direction, name) {
- return function (val, period) {
- var dur, tmp;
- //invert the arguments, but complain about it
- if (period !== null && !isNaN(+period)) {
- deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
- 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
- tmp = val; val = period; period = tmp;
- }
-
- val = typeof val === 'string' ? +val : val;
- dur = createDuration(val, period);
- addSubtract(this, dur, direction);
- return this;
- };
-}
-
-function addSubtract (mom, duration, isAdding, updateOffset) {
- var milliseconds = duration._milliseconds,
- days = absRound(duration._days),
- months = absRound(duration._months);
-
- if (!mom.isValid()) {
- // No op
- return;
- }
-
- updateOffset = updateOffset == null ? true : updateOffset;
-
- if (months) {
- setMonth(mom, get(mom, 'Month') + months * isAdding);
- }
- if (days) {
- set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
- }
- if (milliseconds) {
- mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
- }
- if (updateOffset) {
- hooks.updateOffset(mom, days || months);
- }
-}
-
-var add = createAdder(1, 'add');
-var subtract = createAdder(-1, 'subtract');
-
-function getCalendarFormat(myMoment, now) {
- var diff = myMoment.diff(now, 'days', true);
- return diff < -6 ? 'sameElse' :
- diff < -1 ? 'lastWeek' :
- diff < 0 ? 'lastDay' :
- diff < 1 ? 'sameDay' :
- diff < 2 ? 'nextDay' :
- diff < 7 ? 'nextWeek' : 'sameElse';
-}
-
-function calendar$1 (time, formats) {
- // We want to compare the start of today, vs this.
- // Getting start-of-today depends on whether we're local/utc/offset or not.
- var now = time || createLocal(),
- sod = cloneWithOffset(now, this).startOf('day'),
- format = hooks.calendarFormat(this, sod) || 'sameElse';
-
- var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
-
- return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
-}
-
-function clone () {
- return new Moment(this);
-}
-
-function isAfter (input, units) {
- var localInput = isMoment(input) ? input : createLocal(input);
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
- if (units === 'millisecond') {
- return this.valueOf() > localInput.valueOf();
- } else {
- return localInput.valueOf() < this.clone().startOf(units).valueOf();
- }
-}
-
-function isBefore (input, units) {
- var localInput = isMoment(input) ? input : createLocal(input);
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
- if (units === 'millisecond') {
- return this.valueOf() < localInput.valueOf();
- } else {
- return this.clone().endOf(units).valueOf() < localInput.valueOf();
- }
-}
-
-function isBetween (from, to, units, inclusivity) {
- inclusivity = inclusivity || '()';
- return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
- (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
-}
-
-function isSame (input, units) {
- var localInput = isMoment(input) ? input : createLocal(input),
- inputMs;
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(units || 'millisecond');
- if (units === 'millisecond') {
- return this.valueOf() === localInput.valueOf();
- } else {
- inputMs = localInput.valueOf();
- return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
- }
-}
-
-function isSameOrAfter (input, units) {
- return this.isSame(input, units) || this.isAfter(input,units);
-}
-
-function isSameOrBefore (input, units) {
- return this.isSame(input, units) || this.isBefore(input,units);
-}
-
-function diff (input, units, asFloat) {
- var that,
- zoneDelta,
- delta, output;
-
- if (!this.isValid()) {
- return NaN;
- }
-
- that = cloneWithOffset(input, this);
-
- if (!that.isValid()) {
- return NaN;
- }
-
- zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
-
- units = normalizeUnits(units);
-
- switch (units) {
- case 'year': output = monthDiff(this, that) / 12; break;
- case 'month': output = monthDiff(this, that); break;
- case 'quarter': output = monthDiff(this, that) / 3; break;
- case 'second': output = (this - that) / 1e3; break; // 1000
- case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
- case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
- case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
- case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
- default: output = this - that;
- }
-
- return asFloat ? output : absFloor(output);
-}
-
-function monthDiff (a, b) {
- // difference in months
- var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
- // b is in (anchor - 1 month, anchor + 1 month)
- anchor = a.clone().add(wholeMonthDiff, 'months'),
- anchor2, adjust;
-
- if (b - anchor < 0) {
- anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
- // linear across the month
- adjust = (b - anchor) / (anchor - anchor2);
- } else {
- anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
- // linear across the month
- adjust = (b - anchor) / (anchor2 - anchor);
- }
-
- //check for negative zero, return zero if negative zero
- return -(wholeMonthDiff + adjust) || 0;
-}
-
-hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
-hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
-
-function toString () {
- return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
-}
-
-function toISOString() {
- if (!this.isValid()) {
- return null;
- }
- var m = this.clone().utc();
- if (m.year() < 0 || m.year() > 9999) {
- return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
- }
- if (isFunction(Date.prototype.toISOString)) {
- // native implementation is ~50x faster, use it when we can
- return this.toDate().toISOString();
- }
- return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
-}
-
-/**
- * Return a human readable representation of a moment that can
- * also be evaluated to get a new moment which is the same
- *
- * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
- */
-function inspect () {
- if (!this.isValid()) {
- return 'moment.invalid(/* ' + this._i + ' */)';
- }
- var func = 'moment';
- var zone = '';
- if (!this.isLocal()) {
- func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
- zone = 'Z';
- }
- var prefix = '[' + func + '("]';
- var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
- var datetime = '-MM-DD[T]HH:mm:ss.SSS';
- var suffix = zone + '[")]';
-
- return this.format(prefix + year + datetime + suffix);
-}
-
-function format (inputString) {
- if (!inputString) {
- inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
- }
- var output = formatMoment(this, inputString);
- return this.localeData().postformat(output);
-}
-
-function from (time, withoutSuffix) {
- if (this.isValid() &&
- ((isMoment(time) && time.isValid()) ||
- createLocal(time).isValid())) {
- return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
- } else {
- return this.localeData().invalidDate();
- }
-}
-
-function fromNow (withoutSuffix) {
- return this.from(createLocal(), withoutSuffix);
-}
-
-function to (time, withoutSuffix) {
- if (this.isValid() &&
- ((isMoment(time) && time.isValid()) ||
- createLocal(time).isValid())) {
- return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
- } else {
- return this.localeData().invalidDate();
- }
-}
-
-function toNow (withoutSuffix) {
- return this.to(createLocal(), withoutSuffix);
-}
-
-// If passed a locale key, it will set the locale for this
-// instance. Otherwise, it will return the locale configuration
-// variables for this instance.
-function locale (key) {
- var newLocaleData;
-
- if (key === undefined) {
- return this._locale._abbr;
- } else {
- newLocaleData = getLocale(key);
- if (newLocaleData != null) {
- this._locale = newLocaleData;
- }
- return this;
- }
-}
-
-var lang = deprecate(
- 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
- function (key) {
- if (key === undefined) {
- return this.localeData();
- } else {
- return this.locale(key);
- }
- }
-);
-
-function localeData () {
- return this._locale;
-}
-
-function startOf (units) {
- units = normalizeUnits(units);
- // the following switch intentionally omits break keywords
- // to utilize falling through the cases.
- switch (units) {
- case 'year':
- this.month(0);
- /* falls through */
- case 'quarter':
- case 'month':
- this.date(1);
- /* falls through */
- case 'week':
- case 'isoWeek':
- case 'day':
- case 'date':
- this.hours(0);
- /* falls through */
- case 'hour':
- this.minutes(0);
- /* falls through */
- case 'minute':
- this.seconds(0);
- /* falls through */
- case 'second':
- this.milliseconds(0);
- }
-
- // weeks are a special case
- if (units === 'week') {
- this.weekday(0);
- }
- if (units === 'isoWeek') {
- this.isoWeekday(1);
- }
-
- // quarters are also special
- if (units === 'quarter') {
- this.month(Math.floor(this.month() / 3) * 3);
- }
-
- return this;
-}
-
-function endOf (units) {
- units = normalizeUnits(units);
- if (units === undefined || units === 'millisecond') {
- return this;
- }
-
- // 'date' is an alias for 'day', so it should be considered as such.
- if (units === 'date') {
- units = 'day';
- }
-
- return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
-}
-
-function valueOf () {
- return this._d.valueOf() - ((this._offset || 0) * 60000);
-}
-
-function unix () {
- return Math.floor(this.valueOf() / 1000);
-}
-
-function toDate () {
- return new Date(this.valueOf());
-}
-
-function toArray () {
- var m = this;
- return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
-}
-
-function toObject () {
- var m = this;
- return {
- years: m.year(),
- months: m.month(),
- date: m.date(),
- hours: m.hours(),
- minutes: m.minutes(),
- seconds: m.seconds(),
- milliseconds: m.milliseconds()
- };
-}
-
-function toJSON () {
- // new Date(NaN).toJSON() === null
- return this.isValid() ? this.toISOString() : null;
-}
-
-function isValid$2 () {
- return isValid(this);
-}
-
-function parsingFlags () {
- return extend({}, getParsingFlags(this));
-}
-
-function invalidAt () {
- return getParsingFlags(this).overflow;
-}
-
-function creationData() {
- return {
- input: this._i,
- format: this._f,
- locale: this._locale,
- isUTC: this._isUTC,
- strict: this._strict
- };
-}
-
-// FORMATTING
-
-addFormatToken(0, ['gg', 2], 0, function () {
- return this.weekYear() % 100;
-});
-
-addFormatToken(0, ['GG', 2], 0, function () {
- return this.isoWeekYear() % 100;
-});
-
-function addWeekYearFormatToken (token, getter) {
- addFormatToken(0, [token, token.length], 0, getter);
-}
-
-addWeekYearFormatToken('gggg', 'weekYear');
-addWeekYearFormatToken('ggggg', 'weekYear');
-addWeekYearFormatToken('GGGG', 'isoWeekYear');
-addWeekYearFormatToken('GGGGG', 'isoWeekYear');
-
-// ALIASES
-
-addUnitAlias('weekYear', 'gg');
-addUnitAlias('isoWeekYear', 'GG');
-
-// PRIORITY
-
-addUnitPriority('weekYear', 1);
-addUnitPriority('isoWeekYear', 1);
-
-
-// PARSING
-
-addRegexToken('G', matchSigned);
-addRegexToken('g', matchSigned);
-addRegexToken('GG', match1to2, match2);
-addRegexToken('gg', match1to2, match2);
-addRegexToken('GGGG', match1to4, match4);
-addRegexToken('gggg', match1to4, match4);
-addRegexToken('GGGGG', match1to6, match6);
-addRegexToken('ggggg', match1to6, match6);
-
-addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
- week[token.substr(0, 2)] = toInt(input);
-});
-
-addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
- week[token] = hooks.parseTwoDigitYear(input);
-});
-
-// MOMENTS
-
-function getSetWeekYear (input) {
- return getSetWeekYearHelper.call(this,
- input,
- this.week(),
- this.weekday(),
- this.localeData()._week.dow,
- this.localeData()._week.doy);
-}
-
-function getSetISOWeekYear (input) {
- return getSetWeekYearHelper.call(this,
- input, this.isoWeek(), this.isoWeekday(), 1, 4);
-}
-
-function getISOWeeksInYear () {
- return weeksInYear(this.year(), 1, 4);
-}
-
-function getWeeksInYear () {
- var weekInfo = this.localeData()._week;
- return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
-}
-
-function getSetWeekYearHelper(input, week, weekday, dow, doy) {
- var weeksTarget;
- if (input == null) {
- return weekOfYear(this, dow, doy).year;
- } else {
- weeksTarget = weeksInYear(input, dow, doy);
- if (week > weeksTarget) {
- week = weeksTarget;
- }
- return setWeekAll.call(this, input, week, weekday, dow, doy);
- }
-}
-
-function setWeekAll(weekYear, week, weekday, dow, doy) {
- var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
- date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
-
- this.year(date.getUTCFullYear());
- this.month(date.getUTCMonth());
- this.date(date.getUTCDate());
- return this;
-}
-
-// FORMATTING
-
-addFormatToken('Q', 0, 'Qo', 'quarter');
-
-// ALIASES
-
-addUnitAlias('quarter', 'Q');
-
-// PRIORITY
-
-addUnitPriority('quarter', 7);
-
-// PARSING
-
-addRegexToken('Q', match1);
-addParseToken('Q', function (input, array) {
- array[MONTH] = (toInt(input) - 1) * 3;
-});
-
-// MOMENTS
-
-function getSetQuarter (input) {
- return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
-}
-
-// FORMATTING
-
-addFormatToken('D', ['DD', 2], 'Do', 'date');
-
-// ALIASES
-
-addUnitAlias('date', 'D');
-
-// PRIOROITY
-addUnitPriority('date', 9);
-
-// PARSING
-
-addRegexToken('D', match1to2);
-addRegexToken('DD', match1to2, match2);
-addRegexToken('Do', function (isStrict, locale) {
- // TODO: Remove "ordinalParse" fallback in next major release.
- return isStrict ?
- (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
- locale._dayOfMonthOrdinalParseLenient;
-});
-
-addParseToken(['D', 'DD'], DATE);
-addParseToken('Do', function (input, array) {
- array[DATE] = toInt(input.match(match1to2)[0], 10);
-});
-
-// MOMENTS
-
-var getSetDayOfMonth = makeGetSet('Date', true);
-
-// FORMATTING
-
-addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
-
-// ALIASES
-
-addUnitAlias('dayOfYear', 'DDD');
-
-// PRIORITY
-addUnitPriority('dayOfYear', 4);
-
-// PARSING
-
-addRegexToken('DDD', match1to3);
-addRegexToken('DDDD', match3);
-addParseToken(['DDD', 'DDDD'], function (input, array, config) {
- config._dayOfYear = toInt(input);
-});
-
-// HELPERS
-
-// MOMENTS
-
-function getSetDayOfYear (input) {
- var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
- return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
-}
-
-// FORMATTING
-
-addFormatToken('m', ['mm', 2], 0, 'minute');
-
-// ALIASES
-
-addUnitAlias('minute', 'm');
-
-// PRIORITY
-
-addUnitPriority('minute', 14);
-
-// PARSING
-
-addRegexToken('m', match1to2);
-addRegexToken('mm', match1to2, match2);
-addParseToken(['m', 'mm'], MINUTE);
-
-// MOMENTS
-
-var getSetMinute = makeGetSet('Minutes', false);
-
-// FORMATTING
-
-addFormatToken('s', ['ss', 2], 0, 'second');
-
-// ALIASES
-
-addUnitAlias('second', 's');
-
-// PRIORITY
-
-addUnitPriority('second', 15);
-
-// PARSING
-
-addRegexToken('s', match1to2);
-addRegexToken('ss', match1to2, match2);
-addParseToken(['s', 'ss'], SECOND);
-
-// MOMENTS
-
-var getSetSecond = makeGetSet('Seconds', false);
-
-// FORMATTING
-
-addFormatToken('S', 0, 0, function () {
- return ~~(this.millisecond() / 100);
-});
-
-addFormatToken(0, ['SS', 2], 0, function () {
- return ~~(this.millisecond() / 10);
-});
-
-addFormatToken(0, ['SSS', 3], 0, 'millisecond');
-addFormatToken(0, ['SSSS', 4], 0, function () {
- return this.millisecond() * 10;
-});
-addFormatToken(0, ['SSSSS', 5], 0, function () {
- return this.millisecond() * 100;
-});
-addFormatToken(0, ['SSSSSS', 6], 0, function () {
- return this.millisecond() * 1000;
-});
-addFormatToken(0, ['SSSSSSS', 7], 0, function () {
- return this.millisecond() * 10000;
-});
-addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
- return this.millisecond() * 100000;
-});
-addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
- return this.millisecond() * 1000000;
-});
-
-
-// ALIASES
-
-addUnitAlias('millisecond', 'ms');
-
-// PRIORITY
-
-addUnitPriority('millisecond', 16);
-
-// PARSING
-
-addRegexToken('S', match1to3, match1);
-addRegexToken('SS', match1to3, match2);
-addRegexToken('SSS', match1to3, match3);
-
-var token;
-for (token = 'SSSS'; token.length <= 9; token += 'S') {
- addRegexToken(token, matchUnsigned);
-}
-
-function parseMs(input, array) {
- array[MILLISECOND] = toInt(('0.' + input) * 1000);
-}
-
-for (token = 'S'; token.length <= 9; token += 'S') {
- addParseToken(token, parseMs);
-}
-// MOMENTS
-
-var getSetMillisecond = makeGetSet('Milliseconds', false);
-
-// FORMATTING
-
-addFormatToken('z', 0, 0, 'zoneAbbr');
-addFormatToken('zz', 0, 0, 'zoneName');
-
-// MOMENTS
-
-function getZoneAbbr () {
- return this._isUTC ? 'UTC' : '';
-}
-
-function getZoneName () {
- return this._isUTC ? 'Coordinated Universal Time' : '';
-}
-
-var proto = Moment.prototype;
-
-proto.add = add;
-proto.calendar = calendar$1;
-proto.clone = clone;
-proto.diff = diff;
-proto.endOf = endOf;
-proto.format = format;
-proto.from = from;
-proto.fromNow = fromNow;
-proto.to = to;
-proto.toNow = toNow;
-proto.get = stringGet;
-proto.invalidAt = invalidAt;
-proto.isAfter = isAfter;
-proto.isBefore = isBefore;
-proto.isBetween = isBetween;
-proto.isSame = isSame;
-proto.isSameOrAfter = isSameOrAfter;
-proto.isSameOrBefore = isSameOrBefore;
-proto.isValid = isValid$2;
-proto.lang = lang;
-proto.locale = locale;
-proto.localeData = localeData;
-proto.max = prototypeMax;
-proto.min = prototypeMin;
-proto.parsingFlags = parsingFlags;
-proto.set = stringSet;
-proto.startOf = startOf;
-proto.subtract = subtract;
-proto.toArray = toArray;
-proto.toObject = toObject;
-proto.toDate = toDate;
-proto.toISOString = toISOString;
-proto.inspect = inspect;
-proto.toJSON = toJSON;
-proto.toString = toString;
-proto.unix = unix;
-proto.valueOf = valueOf;
-proto.creationData = creationData;
-
-// Year
-proto.year = getSetYear;
-proto.isLeapYear = getIsLeapYear;
-
-// Week Year
-proto.weekYear = getSetWeekYear;
-proto.isoWeekYear = getSetISOWeekYear;
-
-// Quarter
-proto.quarter = proto.quarters = getSetQuarter;
-
-// Month
-proto.month = getSetMonth;
-proto.daysInMonth = getDaysInMonth;
-
-// Week
-proto.week = proto.weeks = getSetWeek;
-proto.isoWeek = proto.isoWeeks = getSetISOWeek;
-proto.weeksInYear = getWeeksInYear;
-proto.isoWeeksInYear = getISOWeeksInYear;
-
-// Day
-proto.date = getSetDayOfMonth;
-proto.day = proto.days = getSetDayOfWeek;
-proto.weekday = getSetLocaleDayOfWeek;
-proto.isoWeekday = getSetISODayOfWeek;
-proto.dayOfYear = getSetDayOfYear;
-
-// Hour
-proto.hour = proto.hours = getSetHour;
-
-// Minute
-proto.minute = proto.minutes = getSetMinute;
-
-// Second
-proto.second = proto.seconds = getSetSecond;
-
-// Millisecond
-proto.millisecond = proto.milliseconds = getSetMillisecond;
-
-// Offset
-proto.utcOffset = getSetOffset;
-proto.utc = setOffsetToUTC;
-proto.local = setOffsetToLocal;
-proto.parseZone = setOffsetToParsedOffset;
-proto.hasAlignedHourOffset = hasAlignedHourOffset;
-proto.isDST = isDaylightSavingTime;
-proto.isLocal = isLocal;
-proto.isUtcOffset = isUtcOffset;
-proto.isUtc = isUtc;
-proto.isUTC = isUtc;
-
-// Timezone
-proto.zoneAbbr = getZoneAbbr;
-proto.zoneName = getZoneName;
-
-// Deprecations
-proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
-proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
-proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
-proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
-proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
-
-function createUnix (input) {
- return createLocal(input * 1000);
-}
-
-function createInZone () {
- return createLocal.apply(null, arguments).parseZone();
-}
-
-function preParsePostFormat (string) {
- return string;
-}
-
-var proto$1 = Locale.prototype;
-
-proto$1.calendar = calendar;
-proto$1.longDateFormat = longDateFormat;
-proto$1.invalidDate = invalidDate;
-proto$1.ordinal = ordinal;
-proto$1.preparse = preParsePostFormat;
-proto$1.postformat = preParsePostFormat;
-proto$1.relativeTime = relativeTime;
-proto$1.pastFuture = pastFuture;
-proto$1.set = set;
-
-// Month
-proto$1.months = localeMonths;
-proto$1.monthsShort = localeMonthsShort;
-proto$1.monthsParse = localeMonthsParse;
-proto$1.monthsRegex = monthsRegex;
-proto$1.monthsShortRegex = monthsShortRegex;
-
-// Week
-proto$1.week = localeWeek;
-proto$1.firstDayOfYear = localeFirstDayOfYear;
-proto$1.firstDayOfWeek = localeFirstDayOfWeek;
-
-// Day of Week
-proto$1.weekdays = localeWeekdays;
-proto$1.weekdaysMin = localeWeekdaysMin;
-proto$1.weekdaysShort = localeWeekdaysShort;
-proto$1.weekdaysParse = localeWeekdaysParse;
-
-proto$1.weekdaysRegex = weekdaysRegex;
-proto$1.weekdaysShortRegex = weekdaysShortRegex;
-proto$1.weekdaysMinRegex = weekdaysMinRegex;
-
-// Hours
-proto$1.isPM = localeIsPM;
-proto$1.meridiem = localeMeridiem;
-
-function get$1 (format, index, field, setter) {
- var locale = getLocale();
- var utc = createUTC().set(setter, index);
- return locale[field](utc, format);
-}
-
-function listMonthsImpl (format, index, field) {
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
-
- format = format || '';
-
- if (index != null) {
- return get$1(format, index, field, 'month');
- }
-
- var i;
- var out = [];
- for (i = 0; i < 12; i++) {
- out[i] = get$1(format, i, field, 'month');
- }
- return out;
-}
-
-// ()
-// (5)
-// (fmt, 5)
-// (fmt)
-// (true)
-// (true, 5)
-// (true, fmt, 5)
-// (true, fmt)
-function listWeekdaysImpl (localeSorted, format, index, field) {
- if (typeof localeSorted === 'boolean') {
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
-
- format = format || '';
- } else {
- format = localeSorted;
- index = format;
- localeSorted = false;
-
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
-
- format = format || '';
- }
-
- var locale = getLocale(),
- shift = localeSorted ? locale._week.dow : 0;
-
- if (index != null) {
- return get$1(format, (index + shift) % 7, field, 'day');
- }
-
- var i;
- var out = [];
- for (i = 0; i < 7; i++) {
- out[i] = get$1(format, (i + shift) % 7, field, 'day');
- }
- return out;
-}
-
-function listMonths (format, index) {
- return listMonthsImpl(format, index, 'months');
-}
-
-function listMonthsShort (format, index) {
- return listMonthsImpl(format, index, 'monthsShort');
-}
-
-function listWeekdays (localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
-}
-
-function listWeekdaysShort (localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
-}
-
-function listWeekdaysMin (localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
-}
-
-getSetGlobalLocale('en', {
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal : function (number) {
- var b = number % 10,
- output = (toInt(number % 100 / 10) === 1) ? 'th' :
- (b === 1) ? 'st' :
- (b === 2) ? 'nd' :
- (b === 3) ? 'rd' : 'th';
- return number + output;
- }
-});
-
-// Side effect imports
-hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
-hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
-
-var mathAbs = Math.abs;
-
-function abs () {
- var data = this._data;
-
- this._milliseconds = mathAbs(this._milliseconds);
- this._days = mathAbs(this._days);
- this._months = mathAbs(this._months);
-
- data.milliseconds = mathAbs(data.milliseconds);
- data.seconds = mathAbs(data.seconds);
- data.minutes = mathAbs(data.minutes);
- data.hours = mathAbs(data.hours);
- data.months = mathAbs(data.months);
- data.years = mathAbs(data.years);
-
- return this;
-}
-
-function addSubtract$1 (duration, input, value, direction) {
- var other = createDuration(input, value);
-
- duration._milliseconds += direction * other._milliseconds;
- duration._days += direction * other._days;
- duration._months += direction * other._months;
-
- return duration._bubble();
-}
-
-// supports only 2.0-style add(1, 's') or add(duration)
-function add$1 (input, value) {
- return addSubtract$1(this, input, value, 1);
-}
-
-// supports only 2.0-style subtract(1, 's') or subtract(duration)
-function subtract$1 (input, value) {
- return addSubtract$1(this, input, value, -1);
-}
-
-function absCeil (number) {
- if (number < 0) {
- return Math.floor(number);
- } else {
- return Math.ceil(number);
- }
-}
-
-function bubble () {
- var milliseconds = this._milliseconds;
- var days = this._days;
- var months = this._months;
- var data = this._data;
- var seconds, minutes, hours, years, monthsFromDays;
-
- // if we have a mix of positive and negative values, bubble down first
- // check: https://github.com/moment/moment/issues/2166
- if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
- (milliseconds <= 0 && days <= 0 && months <= 0))) {
- milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
- days = 0;
- months = 0;
- }
-
- // The following code bubbles up values, see the tests for
- // examples of what that means.
- data.milliseconds = milliseconds % 1000;
-
- seconds = absFloor(milliseconds / 1000);
- data.seconds = seconds % 60;
-
- minutes = absFloor(seconds / 60);
- data.minutes = minutes % 60;
-
- hours = absFloor(minutes / 60);
- data.hours = hours % 24;
-
- days += absFloor(hours / 24);
-
- // convert days to months
- monthsFromDays = absFloor(daysToMonths(days));
- months += monthsFromDays;
- days -= absCeil(monthsToDays(monthsFromDays));
-
- // 12 months -> 1 year
- years = absFloor(months / 12);
- months %= 12;
-
- data.days = days;
- data.months = months;
- data.years = years;
-
- return this;
-}
-
-function daysToMonths (days) {
- // 400 years have 146097 days (taking into account leap year rules)
- // 400 years have 12 months === 4800
- return days * 4800 / 146097;
-}
-
-function monthsToDays (months) {
- // the reverse of daysToMonths
- return months * 146097 / 4800;
-}
-
-function as (units) {
- if (!this.isValid()) {
- return NaN;
- }
- var days;
- var months;
- var milliseconds = this._milliseconds;
-
- units = normalizeUnits(units);
-
- if (units === 'month' || units === 'year') {
- days = this._days + milliseconds / 864e5;
- months = this._months + daysToMonths(days);
- return units === 'month' ? months : months / 12;
- } else {
- // handle milliseconds separately because of floating point math errors (issue #1867)
- days = this._days + Math.round(monthsToDays(this._months));
- switch (units) {
- case 'week' : return days / 7 + milliseconds / 6048e5;
- case 'day' : return days + milliseconds / 864e5;
- case 'hour' : return days * 24 + milliseconds / 36e5;
- case 'minute' : return days * 1440 + milliseconds / 6e4;
- case 'second' : return days * 86400 + milliseconds / 1000;
- // Math.floor prevents floating point math errors here
- case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
- default: throw new Error('Unknown unit ' + units);
- }
- }
-}
-
-// TODO: Use this.as('ms')?
-function valueOf$1 () {
- if (!this.isValid()) {
- return NaN;
- }
- return (
- this._milliseconds +
- this._days * 864e5 +
- (this._months % 12) * 2592e6 +
- toInt(this._months / 12) * 31536e6
- );
-}
-
-function makeAs (alias) {
- return function () {
- return this.as(alias);
- };
-}
-
-var asMilliseconds = makeAs('ms');
-var asSeconds = makeAs('s');
-var asMinutes = makeAs('m');
-var asHours = makeAs('h');
-var asDays = makeAs('d');
-var asWeeks = makeAs('w');
-var asMonths = makeAs('M');
-var asYears = makeAs('y');
-
-function clone$1 () {
- return createDuration(this);
-}
-
-function get$2 (units) {
- units = normalizeUnits(units);
- return this.isValid() ? this[units + 's']() : NaN;
-}
-
-function makeGetter(name) {
- return function () {
- return this.isValid() ? this._data[name] : NaN;
- };
-}
-
-var milliseconds = makeGetter('milliseconds');
-var seconds = makeGetter('seconds');
-var minutes = makeGetter('minutes');
-var hours = makeGetter('hours');
-var days = makeGetter('days');
-var months = makeGetter('months');
-var years = makeGetter('years');
-
-function weeks () {
- return absFloor(this.days() / 7);
-}
-
-var round = Math.round;
-var thresholds = {
- ss: 44, // a few seconds to seconds
- s : 45, // seconds to minute
- m : 45, // minutes to hour
- h : 22, // hours to day
- d : 26, // days to month
- M : 11 // months to year
-};
-
-// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
-function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
- return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
-}
-
-function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
- var duration = createDuration(posNegDuration).abs();
- var seconds = round(duration.as('s'));
- var minutes = round(duration.as('m'));
- var hours = round(duration.as('h'));
- var days = round(duration.as('d'));
- var months = round(duration.as('M'));
- var years = round(duration.as('y'));
-
- var a = seconds <= thresholds.ss && ['s', seconds] ||
- seconds < thresholds.s && ['ss', seconds] ||
- minutes <= 1 && ['m'] ||
- minutes < thresholds.m && ['mm', minutes] ||
- hours <= 1 && ['h'] ||
- hours < thresholds.h && ['hh', hours] ||
- days <= 1 && ['d'] ||
- days < thresholds.d && ['dd', days] ||
- months <= 1 && ['M'] ||
- months < thresholds.M && ['MM', months] ||
- years <= 1 && ['y'] || ['yy', years];
-
- a[2] = withoutSuffix;
- a[3] = +posNegDuration > 0;
- a[4] = locale;
- return substituteTimeAgo.apply(null, a);
-}
-
-// This function allows you to set the rounding function for relative time strings
-function getSetRelativeTimeRounding (roundingFunction) {
- if (roundingFunction === undefined) {
- return round;
- }
- if (typeof(roundingFunction) === 'function') {
- round = roundingFunction;
- return true;
- }
- return false;
-}
-
-// This function allows you to set a threshold for relative time strings
-function getSetRelativeTimeThreshold (threshold, limit) {
- if (thresholds[threshold] === undefined) {
- return false;
- }
- if (limit === undefined) {
- return thresholds[threshold];
- }
- thresholds[threshold] = limit;
- if (threshold === 's') {
- thresholds.ss = limit - 1;
- }
- return true;
-}
-
-function humanize (withSuffix) {
- if (!this.isValid()) {
- return this.localeData().invalidDate();
- }
-
- var locale = this.localeData();
- var output = relativeTime$1(this, !withSuffix, locale);
-
- if (withSuffix) {
- output = locale.pastFuture(+this, output);
- }
-
- return locale.postformat(output);
-}
-
-var abs$1 = Math.abs;
-
-function sign(x) {
- return ((x > 0) - (x < 0)) || +x;
-}
-
-function toISOString$1() {
- // for ISO strings we do not use the normal bubbling rules:
- // * milliseconds bubble up until they become hours
- // * days do not bubble at all
- // * months bubble up until they become years
- // This is because there is no context-free conversion between hours and days
- // (think of clock changes)
- // and also not between days and months (28-31 days per month)
- if (!this.isValid()) {
- return this.localeData().invalidDate();
- }
-
- var seconds = abs$1(this._milliseconds) / 1000;
- var days = abs$1(this._days);
- var months = abs$1(this._months);
- var minutes, hours, years;
-
- // 3600 seconds -> 60 minutes -> 1 hour
- minutes = absFloor(seconds / 60);
- hours = absFloor(minutes / 60);
- seconds %= 60;
- minutes %= 60;
-
- // 12 months -> 1 year
- years = absFloor(months / 12);
- months %= 12;
-
-
- // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
- var Y = years;
- var M = months;
- var D = days;
- var h = hours;
- var m = minutes;
- var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
- var total = this.asSeconds();
-
- if (!total) {
- // this is the same as C#'s (Noda) and python (isodate)...
- // but not other JS (goog.date)
- return 'P0D';
- }
-
- var totalSign = total < 0 ? '-' : '';
- var ymSign = sign(this._months) !== sign(total) ? '-' : '';
- var daysSign = sign(this._days) !== sign(total) ? '-' : '';
- var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
-
- return totalSign + 'P' +
- (Y ? ymSign + Y + 'Y' : '') +
- (M ? ymSign + M + 'M' : '') +
- (D ? daysSign + D + 'D' : '') +
- ((h || m || s) ? 'T' : '') +
- (h ? hmsSign + h + 'H' : '') +
- (m ? hmsSign + m + 'M' : '') +
- (s ? hmsSign + s + 'S' : '');
-}
-
-var proto$2 = Duration.prototype;
-
-proto$2.isValid = isValid$1;
-proto$2.abs = abs;
-proto$2.add = add$1;
-proto$2.subtract = subtract$1;
-proto$2.as = as;
-proto$2.asMilliseconds = asMilliseconds;
-proto$2.asSeconds = asSeconds;
-proto$2.asMinutes = asMinutes;
-proto$2.asHours = asHours;
-proto$2.asDays = asDays;
-proto$2.asWeeks = asWeeks;
-proto$2.asMonths = asMonths;
-proto$2.asYears = asYears;
-proto$2.valueOf = valueOf$1;
-proto$2._bubble = bubble;
-proto$2.clone = clone$1;
-proto$2.get = get$2;
-proto$2.milliseconds = milliseconds;
-proto$2.seconds = seconds;
-proto$2.minutes = minutes;
-proto$2.hours = hours;
-proto$2.days = days;
-proto$2.weeks = weeks;
-proto$2.months = months;
-proto$2.years = years;
-proto$2.humanize = humanize;
-proto$2.toISOString = toISOString$1;
-proto$2.toString = toISOString$1;
-proto$2.toJSON = toISOString$1;
-proto$2.locale = locale;
-proto$2.localeData = localeData;
-
-// Deprecations
-proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
-proto$2.lang = lang;
-
-// Side effect imports
-
-// FORMATTING
-
-addFormatToken('X', 0, 0, 'unix');
-addFormatToken('x', 0, 0, 'valueOf');
-
-// PARSING
-
-addRegexToken('x', matchSigned);
-addRegexToken('X', matchTimestamp);
-addParseToken('X', function (input, array, config) {
- config._d = new Date(parseFloat(input, 10) * 1000);
-});
-addParseToken('x', function (input, array, config) {
- config._d = new Date(toInt(input));
-});
-
-// Side effect imports
-
-
-hooks.version = '2.19.1';
-
-setHookCallback(createLocal);
-
-hooks.fn = proto;
-hooks.min = min;
-hooks.max = max;
-hooks.now = now;
-hooks.utc = createUTC;
-hooks.unix = createUnix;
-hooks.months = listMonths;
-hooks.isDate = isDate;
-hooks.locale = getSetGlobalLocale;
-hooks.invalid = createInvalid;
-hooks.duration = createDuration;
-hooks.isMoment = isMoment;
-hooks.weekdays = listWeekdays;
-hooks.parseZone = createInZone;
-hooks.localeData = getLocale;
-hooks.isDuration = isDuration;
-hooks.monthsShort = listMonthsShort;
-hooks.weekdaysMin = listWeekdaysMin;
-hooks.defineLocale = defineLocale;
-hooks.updateLocale = updateLocale;
-hooks.locales = listLocales;
-hooks.weekdaysShort = listWeekdaysShort;
-hooks.normalizeUnits = normalizeUnits;
-hooks.relativeTimeRounding = getSetRelativeTimeRounding;
-hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
-hooks.calendarFormat = getCalendarFormat;
-hooks.prototype = proto;
-
-return hooks;
-
-})));
-
-}.call(window));
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(18)(module)))
-
-/***/ }),
-/* 1 */,
-/* 2 */
-/***/ (function(module, exports) {
-
-var g;
-
-// This works in non-strict mode
-g = (function() {
- return this;
-})();
-
-try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
-} catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
-
-/***/ }),
-/* 3 */,
-/* 4 */,
-/* 5 */,
-/* 6 */
-/***/ (function(module, exports) {
-
-// shim for using process in browser
-var process = module.exports = {};
-
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
-
-var cachedSetTimeout;
-var cachedClearTimeout;
-
-function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
-}
-function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
-}
-(function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
-} ())
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
-
-
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
-
-
-
-}
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
-
-function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
-}
-
-function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
-
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
-}
-
-process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
-};
-
-// v8 likes predictible objects
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-process.prependListener = noop;
-process.prependOnceListener = noop;
-
-process.listeners = function (name) { return [] }
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
-
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
-
-
-/***/ }),
-/* 7 */,
-/* 8 */,
-/* 9 */,
-/* 10 */,
-/* 11 */,
-/* 12 */,
-/* 13 */,
-/* 14 */,
-/* 15 */,
-/* 16 */,
-/* 17 */,
-/* 18 */
-/***/ (function(module, exports) {
-
-module.exports = function(module) {
- if(!module.webpackPolyfill) {
- module.deprecate = function() {};
- module.paths = [];
- // module.parent = undefined by default
- if(!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function() {
- return module.i;
- }
- });
- module.webpackPolyfill = 1;
- }
- return module;
-};
-
-
-/***/ }),
-/* 19 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
- * jQuery JavaScript Library v2.2.4
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2016-05-20T17:23Z
- */
-
-(function( global, factory ) {
-
- if ( typeof module === "object" && typeof module.exports === "object" ) {
- // For CommonJS and CommonJS-like environments where a proper `window`
- // is present, execute the factory and get jQuery.
- // For environments that do not have a `window` with a `document`
- // (such as Node.js), expose a factory as module.exports.
- // This accentuates the need for the creation of a real `window`.
- // e.g. var jQuery = require("jquery")(window);
- // See ticket #14549 for more info.
- module.exports = global.document ?
- factory( global, true ) :
- function( w ) {
- if ( !w.document ) {
- throw new Error( "jQuery requires a window with a document" );
- }
- return factory( w );
- };
- } else {
- factory( global );
- }
-
-// Pass this if window is not defined yet
-}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
-
-// Support: Firefox 18+
-// Can't be in strict mode, several libs including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-//"use strict";
-var arr = [];
-
-var document = window.document;
-
-var slice = arr.slice;
-
-var concat = arr.concat;
-
-var push = arr.push;
-
-var indexOf = arr.indexOf;
-
-var class2type = {};
-
-var toString = class2type.toString;
-
-var hasOwn = class2type.hasOwnProperty;
-
-var support = {};
-
-
-
-var
- version = "2.2.4",
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
-
- // The jQuery object is actually just the init constructor 'enhanced'
- // Need init if jQuery is called (just allow error to be thrown if not included)
- return new jQuery.fn.init( selector, context );
- },
-
- // Support: Android<4.1
- // Make sure we trim BOM and NBSP
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- };
-
-jQuery.fn = jQuery.prototype = {
-
- // The current version of jQuery being used
- jquery: version,
-
- constructor: jQuery,
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- toArray: function() {
- return slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num != null ?
-
- // Return just the one element from the set
- ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
-
- // Return all the elements in a clean array
- slice.call( this );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- each: function( callback ) {
- return jQuery.each( this, callback );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map( this, function( elem, i ) {
- return callback.call( elem, i, elem );
- } ) );
- },
-
- slice: function() {
- return this.pushStack( slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
- },
-
- end: function() {
- return this.prevObject || this.constructor();
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: arr.sort,
- splice: arr.splice
-};
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[ 0 ] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
-
- // Skip the boolean and the target
- target = arguments[ i ] || {};
- i++;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
- target = {};
- }
-
- // Extend jQuery itself if only one argument is passed
- if ( i === length ) {
- target = this;
- i--;
- }
-
- for ( ; i < length; i++ ) {
-
- // Only deal with non-null/undefined values
- if ( ( options = arguments[ i ] ) != null ) {
-
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
- ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
-
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray( src ) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject( src ) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend( {
-
- // Unique for each copy of jQuery on the page
- expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
-
- // Assume jQuery is ready without the ready module
- isReady: true,
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- noop: function() {},
-
- isFunction: function( obj ) {
- return jQuery.type( obj ) === "function";
- },
-
- isArray: Array.isArray,
-
- isWindow: function( obj ) {
- return obj != null && obj === obj.window;
- },
-
- isNumeric: function( obj ) {
-
- // parseFloat NaNs numeric-cast false positives (null|true|false|"")
- // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
- // subtraction forces infinities to NaN
- // adding 1 corrects loss of precision from parseFloat (#15100)
- var realStringObj = obj && obj.toString();
- return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
- },
-
- isPlainObject: function( obj ) {
- var key;
-
- // Not plain objects:
- // - Any object or value whose internal [[Class]] property is not "[object Object]"
- // - DOM nodes
- // - window
- if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !hasOwn.call( obj, "constructor" ) &&
- !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own
- for ( key in obj ) {}
-
- return key === undefined || hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return obj + "";
- }
-
- // Support: Android<4.0, iOS<6 (functionish RegExp)
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ toString.call( obj ) ] || "object" :
- typeof obj;
- },
-
- // Evaluates a script in a global context
- globalEval: function( code ) {
- var script,
- indirect = eval;
-
- code = jQuery.trim( code );
-
- if ( code ) {
-
- // If the code includes a valid, prologue position
- // strict mode pragma, execute code by injecting a
- // script tag into the document.
- if ( code.indexOf( "use strict" ) === 1 ) {
- script = document.createElement( "script" );
- script.text = code;
- document.head.appendChild( script ).parentNode.removeChild( script );
- } else {
-
- // Otherwise, avoid the DOM node creation, insertion
- // and removal by using an indirect global eval
-
- indirect( code );
- }
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Support: IE9-11+
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- each: function( obj, callback ) {
- var length, i = 0;
-
- if ( isArrayLike( obj ) ) {
- length = obj.length;
- for ( ; i < length; i++ ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- }
-
- return obj;
- },
-
- // Support: Android<4.1
- trim: function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArrayLike( Object( arr ) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- return arr == null ? -1 : indexOf.call( arr, elem, i );
- },
-
- merge: function( first, second ) {
- var len = +second.length,
- j = 0,
- i = first.length;
-
- for ( ; j < len; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, invert ) {
- var callbackInverse,
- matches = [],
- i = 0,
- length = elems.length,
- callbackExpect = !invert;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- callbackInverse = !callback( elems[ i ], i );
- if ( callbackInverse !== callbackExpect ) {
- matches.push( elems[ i ] );
- }
- }
-
- return matches;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var length, value,
- i = 0,
- ret = [];
-
- // Go through the array, translating each of the items to their new values
- if ( isArrayLike( elems ) ) {
- length = elems.length;
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
- }
-
- // Flatten any nested arrays
- return concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- now: Date.now,
-
- // jQuery.support is not used in Core but other projects attach their
- // properties to it so it needs to exist.
- support: support
-} );
-
-// JSHint would error on this code due to the Symbol not being defined in ES5.
-// Defining this global in .jshintrc would create a danger of using the global
-// unguarded in another place, it seems safer to just disable JSHint for these
-// three lines.
-/* jshint ignore: start */
-if ( typeof Symbol === "function" ) {
- jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
-}
-/* jshint ignore: end */
-
-// Populate the class2type map
-jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
-function( i, name ) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-} );
-
-function isArrayLike( obj ) {
-
- // Support: iOS 8.2 (not reproducible in simulator)
- // `in` check used to prevent JIT error (gh-2145)
- // hasOwn isn't used here due to false negatives
- // regarding Nodelist length in IE
- var length = !!obj && "length" in obj && obj.length,
- type = jQuery.type( obj );
-
- if ( type === "function" || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- return type === "array" || length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj;
-}
-var Sizzle =
-/*!
- * Sizzle CSS Selector Engine v2.2.1
- * http://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2015-10-17
- */
-(function( window ) {
-
-var i,
- support,
- Expr,
- getText,
- isXML,
- tokenize,
- compile,
- select,
- outermostContext,
- sortInput,
- hasDuplicate,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + 1 * new Date(),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- }
- return 0;
- },
-
- // General-purpose constants
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf as it's faster than native
- // http://jsperf.com/thor-indexof-vs-for/5
- indexOf = function( list, elem ) {
- var i = 0,
- len = list.length;
- for ( ; i < len; i++ ) {
- if ( list[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
-
- // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
- // Operator (capture 2)
- "*([*^$|!~]?=)" + whitespace +
- // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
- "*\\]",
-
- pseudos = ":(" + identifier + ")(?:\\((" +
- // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
- // 1. quoted (capture 3; capture 4 or capture 5)
- "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
- // 2. simple (capture 6)
- "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
- // 3. anything else (capture 2)
- ".*" +
- ")\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rwhitespace = new RegExp( whitespace + "+", "g" ),
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + identifier + ")" ),
- "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
- "TAG": new RegExp( "^(" + identifier + "|[*])" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rsibling = /[+~]/,
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox<24
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- high < 0 ?
- // BMP codepoint
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- },
-
- // Used for iframes
- // See setDocument()
- // Removing the function wrapper causes a "Permission Denied"
- // error in IE
- unloadHandler = function() {
- setDocument();
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var m, i, elem, nid, nidselect, match, groups, newSelector,
- newContext = context && context.ownerDocument,
-
- // nodeType defaults to 9, since context defaults to document
- nodeType = context ? context.nodeType : 9;
-
- results = results || [];
-
- // Return early from calls with invalid selector or context
- if ( typeof selector !== "string" || !selector ||
- nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
-
- return results;
- }
-
- // Try to shortcut find operations (as opposed to filters) in HTML documents
- if ( !seed ) {
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
- context = context || document;
-
- if ( documentIsHTML ) {
-
- // If the selector is sufficiently simple, try using a "get*By*" DOM method
- // (excepting DocumentFragment context, where the methods don't exist)
- if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
-
- // ID selector
- if ( (m = match[1]) ) {
-
- // Document context
- if ( nodeType === 9 ) {
- if ( (elem = context.getElementById( m )) ) {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
-
- // Element context
- } else {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( newContext && (elem = newContext.getElementById( m )) &&
- contains( context, elem ) &&
- elem.id === m ) {
-
- results.push( elem );
- return results;
- }
- }
-
- // Type selector
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Class selector
- } else if ( (m = match[3]) && support.getElementsByClassName &&
- context.getElementsByClassName ) {
-
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // Take advantage of querySelectorAll
- if ( support.qsa &&
- !compilerCache[ selector + " " ] &&
- (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
-
- if ( nodeType !== 1 ) {
- newContext = context;
- newSelector = selector;
-
- // qSA looks outside Element context, which is not what we want
- // Thanks to Andrew Dupont for this workaround technique
- // Support: IE <=8
- // Exclude object elements
- } else if ( context.nodeName.toLowerCase() !== "object" ) {
-
- // Capture the context ID, setting it first if necessary
- if ( (nid = context.getAttribute( "id" )) ) {
- nid = nid.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", (nid = expando) );
- }
-
- // Prefix every selector in the list
- groups = tokenize( selector );
- i = groups.length;
- nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
- while ( i-- ) {
- groups[i] = nidselect + " " + toSelector( groups[i] );
- }
- newSelector = groups.join( "," );
-
- // Expand context for sibling selectors
- newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
- context;
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch ( qsaError ) {
- } finally {
- if ( nid === expando ) {
- context.removeAttribute( "id" );
- }
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {function(string, object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key + " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key + " " ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
- i = arr.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Checks a node for validity as a Sizzle context
- * @param {Element|Object=} context
- * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
- */
-function testContext( context ) {
- return context && typeof context.getElementsByTagName !== "undefined" && context;
-}
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Detects XML nodes
- * @param {Element|Object} elem An element or a document
- * @returns {Boolean} True iff elem is a non-HTML XML node
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var hasCompare, parent,
- doc = node ? node.ownerDocument || node : preferredDoc;
-
- // Return early if doc is invalid or already selected
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Update global variables
- document = doc;
- docElem = document.documentElement;
- documentIsHTML = !isXML( document );
-
- // Support: IE 9-11, Edge
- // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
- if ( (parent = document.defaultView) && parent.top !== parent ) {
- // Support: IE 11
- if ( parent.addEventListener ) {
- parent.addEventListener( "unload", unloadHandler, false );
-
- // Support: IE 9 - 10 only
- } else if ( parent.attachEvent ) {
- parent.attachEvent( "onunload", unloadHandler );
- }
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties
- // (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( document.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Support: IE<9
- support.getElementsByClassName = rnative.test( document.getElementsByClassName );
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !document.getElementsByName || !document.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
- var m = context.getElementById( id );
- return m ? [ m ] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== "undefined" &&
- elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== "undefined" ) {
- return context.getElementsByTagName( tag );
-
- // DocumentFragment nodes don't have gEBTN
- } else if ( support.qsa ) {
- return context.querySelectorAll( tag );
- }
- } :
-
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- docElem.appendChild( div ).innerHTML = "" +
- "";
-
- // Support: IE8, Opera 11-12.16
- // Nothing should be selected when empty strings follow ^= or $= or *=
- // The test attribute must be unknown in Opera but "safe" for WinRT
- // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
- if ( div.querySelectorAll("[msallowcapture^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
- if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
- rbuggyQSA.push("~=");
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
-
- // Support: Safari 8+, iOS 8+
- // https://bugs.webkit.org/show_bug.cgi?id=136851
- // In-page `selector#id sibing-combinator selector` fails
- if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
- rbuggyQSA.push(".#.+[+~]");
- }
- });
-
- assert(function( div ) {
- // Support: Windows 8 Native Apps
- // The type and name attributes are restricted during .innerHTML assignment
- var input = document.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "name", "D" );
-
- // Support: IE8
- // Enforce case-sensitivity of name attribute
- if ( div.querySelectorAll("[name=d]").length ) {
- rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
- docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
- hasCompare = rnative.test( docElem.compareDocumentPosition );
-
- // Element contains another
- // Purposefully self-exclusive
- // As in, an element does not contain itself
- contains = hasCompare || rnative.test( docElem.contains ) ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Document order sorting
- sortOrder = hasCompare ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- // Sort on method existence if only one input has compareDocumentPosition
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
- if ( compare ) {
- return compare;
- }
-
- // Calculate position if both inputs belong to the same document
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
- a.compareDocumentPosition( b ) :
-
- // Otherwise we know they are disconnected
- 1;
-
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- } :
- function( a, b ) {
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Parentless nodes are either documents or disconnected
- if ( !aup || !bup ) {
- return a === document ? -1 :
- b === document ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return document;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- !compilerCache[ expr + " " ] &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch (e) {}
- }
-
- return Sizzle( expr, document, null, [ elem ] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined;
-
- return val !== undefined ?
- val :
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- // Clear input after sorting to release objects
- // See https://github.com/jquery/sizzle/pull/225
- sortInput = null;
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- while ( (node = elem[i++]) ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (jQuery #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[6] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] ) {
- match[2] = match[4] || match[5] || "";
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, uniqueCache, outerCache, node, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType,
- diff = false;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) {
-
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
-
- // Seek `elem` from a previously-cached index
-
- // ...in a gzip-friendly way
- node = parent;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex && cache[ 2 ];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- } else {
- // Use previously-cached element index if available
- if ( useCache ) {
- // ...in a gzip-friendly way
- node = elem;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex;
- }
-
- // xml :nth-child(...)
- // or :nth-last-child(...) or :nth(-last)?-of-type(...)
- if ( diff === false ) {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) &&
- ++diff ) {
-
- // Cache the index of each encountered element
- if ( useCache ) {
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- uniqueCache[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- // Don't keep the element (issue #299)
- input[0] = null;
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- text = text.replace( runescape, funescape );
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
- // but not by others (comment: 8; processing instruction: 7; etc.)
- // nodeType < 6 works because attributes (2) do not appear as children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeType < 6 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
-
- // Support: IE<8
- // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( (tokens = []) );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-};
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var oldCache, uniqueCache, outerCache,
- newCache = [ dirruns, doneName ];
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
-
- if ( (oldCache = uniqueCache[ dir ]) &&
- oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
-
- // Assign to newCache so results back-propagate to previous elements
- return (newCache[ 2 ] = oldCache[ 2 ]);
- } else {
- // Reuse newcache so results back-propagate to previous elements
- uniqueCache[ dir ] = newCache;
-
- // A match means we're done; a fail means we have to keep checking
- if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- // Avoid hanging onto element (issue #299)
- checkContext = null;
- return ret;
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- var bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, outermost ) {
- var elem, j, matcher,
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- setMatched = [],
- contextBackup = outermostContext,
- // We must always have either seed elements or outermost context
- elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
- len = elems.length;
-
- if ( outermost ) {
- outermostContext = context === document || context || outermost;
- }
-
- // Add elements passing elementMatchers directly to results
- // Support: IE<9, Safari
- // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id
- for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- if ( !context && elem.ownerDocument !== document ) {
- setDocument( elem );
- xml = !documentIsHTML;
- }
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context || document, xml) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // `i` is now the count of elements visited above, and adding it to `matchedCount`
- // makes the latter nonnegative.
- matchedCount += i;
-
- // Apply set filters to unmatched elements
- // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
- // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
- // no element matchers and no seed.
- // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
- // case, which will result in a "00" `matchedCount` that differs from `i` but is also
- // numerically zero.
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !match ) {
- match = tokenize( selector );
- }
- i = match.length;
- while ( i-- ) {
- cached = matcherFromTokens( match[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
-
- // Save selector and tokenization
- cached.selector = selector;
- }
- return cached;
-};
-
-/**
- * A low-level selection function that works with Sizzle's compiled
- * selector functions
- * @param {String|Function} selector A selector or a pre-compiled
- * selector function built with Sizzle.compile
- * @param {Element} context
- * @param {Array} [results]
- * @param {Array} [seed] A set of elements to match against
- */
-select = Sizzle.select = function( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- compiled = typeof selector === "function" && selector,
- match = !seed && tokenize( (selector = compiled.selector || selector) );
-
- results = results || [];
-
- // Try to minimize operations if there is only one selector in the list and no seed
- // (the latter of which guarantees us context)
- if ( match.length === 1 ) {
-
- // Reduce context if the leading compound selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
-
- // Precompiled matchers will still verify ancestry, so step up a level
- } else if ( compiled ) {
- context = context.parentNode;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
-
- // Compile and execute a filtering function if one is not provided
- // Provide `match` to avoid retokenization if we modified the selector above
- ( compiled || compile( selector, match ) )(
- seed,
- context,
- !documentIsHTML,
- results,
- !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
- );
- return results;
-};
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome 14-35+
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = !!hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
- div.innerHTML = "";
- return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
- div.innerHTML = "";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
- return div.getAttribute("disabled") == null;
-}) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return elem[ name ] === true ? name.toLowerCase() :
- (val = elem.getAttributeNode( name )) && val.specified ?
- val.value :
- null;
- }
- });
-}
-
-return Sizzle;
-
-})( window );
-
-
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[ ":" ] = jQuery.expr.pseudos;
-jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-
-var dir = function( elem, dir, until ) {
- var matched = [],
- truncate = until !== undefined;
-
- while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
- if ( elem.nodeType === 1 ) {
- if ( truncate && jQuery( elem ).is( until ) ) {
- break;
- }
- matched.push( elem );
- }
- }
- return matched;
-};
-
-
-var siblings = function( n, elem ) {
- var matched = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- matched.push( n );
- }
- }
-
- return matched;
-};
-
-
-var rneedsContext = jQuery.expr.match.needsContext;
-
-var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
-
-
-
-var risSimple = /^.[^:#\[\.,]*$/;
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- /* jshint -W018 */
- return !!qualifier.call( elem, i, elem ) !== not;
- } );
-
- }
-
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- } );
-
- }
-
- if ( typeof qualifier === "string" ) {
- if ( risSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- qualifier = jQuery.filter( qualifier, elements );
- }
-
- return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
- } );
-}
-
-jQuery.filter = function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 && elem.nodeType === 1 ?
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- } ) );
-};
-
-jQuery.fn.extend( {
- find: function( selector ) {
- var i,
- len = this.length,
- ret = [],
- self = this;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter( function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- } ) );
- }
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = this.selector ? this.selector + " " + selector : selector;
- return ret;
- },
- filter: function( selector ) {
- return this.pushStack( winnow( this, selector || [], false ) );
- },
- not: function( selector ) {
- return this.pushStack( winnow( this, selector || [], true ) );
- },
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- }
-} );
-
-
-// Initialize a jQuery object
-
-
-// A central reference to the root jQuery(document)
-var rootjQuery,
-
- // A simple way to check for HTML strings
- // Prioritize #id over to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- init = jQuery.fn.init = function( selector, context, root ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Method init() accepts an alternate rootjQuery
- // so migrate can support jQuery.sub (gh-2101)
- root = root || rootjQuery;
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector[ 0 ] === "<" &&
- selector[ selector.length - 1 ] === ">" &&
- selector.length >= 3 ) {
-
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && ( match[ 1 ] || !context ) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[ 1 ] ) {
- context = context instanceof jQuery ? context[ 0 ] : context;
-
- // Option to run scripts is true for back-compat
- // Intentionally let the error be thrown if parseHTML is not present
- jQuery.merge( this, jQuery.parseHTML(
- match[ 1 ],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
-
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[ 2 ] );
-
- // Support: Blackberry 4.6
- // gEBID returns nodes no longer in the document (#6963)
- if ( elem && elem.parentNode ) {
-
- // Inject the element directly into the jQuery object
- this.length = 1;
- this[ 0 ] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || root ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[ 0 ] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return root.ready !== undefined ?
- root.ready( selector ) :
-
- // Execute immediately if ready is not present
- selector( jQuery );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- };
-
-// Give the init function the jQuery prototype for later instantiation
-init.prototype = jQuery.fn;
-
-// Initialize central reference
-rootjQuery = jQuery( document );
-
-
-var rparentsprev = /^(?:parents|prev(?:Until|All))/,
-
- // Methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend( {
- has: function( target ) {
- var targets = jQuery( target, this ),
- l = targets.length;
-
- return this.filter( function() {
- var i = 0;
- for ( ; i < l; i++ ) {
- if ( jQuery.contains( this, targets[ i ] ) ) {
- return true;
- }
- }
- } );
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- matched = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
-
- // Always skip document fragments
- if ( cur.nodeType < 11 && ( pos ?
- pos.index( cur ) > -1 :
-
- // Don't pass non-elements to Sizzle
- cur.nodeType === 1 &&
- jQuery.find.matchesSelector( cur, selectors ) ) ) {
-
- matched.push( cur );
- break;
- }
- }
- }
-
- return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
- },
-
- // Determine the position of an element within the set
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // Index in selector
- if ( typeof elem === "string" ) {
- return indexOf.call( jQuery( elem ), this[ 0 ] );
- }
-
- // Locate the position of the desired element
- return indexOf.call( this,
-
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[ 0 ] : elem
- );
- },
-
- add: function( selector, context ) {
- return this.pushStack(
- jQuery.uniqueSort(
- jQuery.merge( this.get(), jQuery( selector, context ) )
- )
- );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- }
-} );
-
-function sibling( cur, dir ) {
- while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
- return cur;
-}
-
-jQuery.each( {
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return siblings( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return siblings( elem.firstChild );
- },
- contents: function( elem ) {
- return elem.contentDocument || jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var matched = jQuery.map( this, fn, until );
-
- if ( name.slice( -5 ) !== "Until" ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- matched = jQuery.filter( selector, matched );
- }
-
- if ( this.length > 1 ) {
-
- // Remove duplicates
- if ( !guaranteedUnique[ name ] ) {
- jQuery.uniqueSort( matched );
- }
-
- // Reverse order for parents* and prev-derivatives
- if ( rparentsprev.test( name ) ) {
- matched.reverse();
- }
- }
-
- return this.pushStack( matched );
- };
-} );
-var rnotwhite = ( /\S+/g );
-
-
-
-// Convert String-formatted options into Object-formatted ones
-function createOptions( options ) {
- var object = {};
- jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- } );
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- createOptions( options ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
-
- // Last fire value for non-forgettable lists
- memory,
-
- // Flag to know if list was already fired
- fired,
-
- // Flag to prevent firing
- locked,
-
- // Actual callback list
- list = [],
-
- // Queue of execution data for repeatable lists
- queue = [],
-
- // Index of currently firing callback (modified by add/remove as needed)
- firingIndex = -1,
-
- // Fire callbacks
- fire = function() {
-
- // Enforce single-firing
- locked = options.once;
-
- // Execute callbacks for all pending executions,
- // respecting firingIndex overrides and runtime changes
- fired = firing = true;
- for ( ; queue.length; firingIndex = -1 ) {
- memory = queue.shift();
- while ( ++firingIndex < list.length ) {
-
- // Run callback and check for early termination
- if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
- options.stopOnFalse ) {
-
- // Jump to end and forget the data so .add doesn't re-fire
- firingIndex = list.length;
- memory = false;
- }
- }
- }
-
- // Forget the data if we're done with it
- if ( !options.memory ) {
- memory = false;
- }
-
- firing = false;
-
- // Clean up if we're done firing for good
- if ( locked ) {
-
- // Keep an empty list if we have data for future add calls
- if ( memory ) {
- list = [];
-
- // Otherwise, this object is spent
- } else {
- list = "";
- }
- }
- },
-
- // Actual Callbacks object
- self = {
-
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
-
- // If we have memory from a past run, we should fire after adding
- if ( memory && !firing ) {
- firingIndex = list.length - 1;
- queue.push( memory );
- }
-
- ( function add( args ) {
- jQuery.each( args, function( _, arg ) {
- if ( jQuery.isFunction( arg ) ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
-
- // Inspect recursively
- add( arg );
- }
- } );
- } )( arguments );
-
- if ( memory && !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Remove a callback from the list
- remove: function() {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
-
- // Handle firing indexes
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- } );
- return this;
- },
-
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ?
- jQuery.inArray( fn, list ) > -1 :
- list.length > 0;
- },
-
- // Remove all callbacks from the list
- empty: function() {
- if ( list ) {
- list = [];
- }
- return this;
- },
-
- // Disable .fire and .add
- // Abort any current/pending executions
- // Clear all callbacks and values
- disable: function() {
- locked = queue = [];
- list = memory = "";
- return this;
- },
- disabled: function() {
- return !list;
- },
-
- // Disable .fire
- // Also disable .add unless we have memory (since it would have no effect)
- // Abort any pending executions
- lock: function() {
- locked = queue = [];
- if ( !memory ) {
- list = memory = "";
- }
- return this;
- },
- locked: function() {
- return !!locked;
- },
-
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( !locked ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- queue.push( args );
- if ( !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
-
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-
-
-jQuery.extend( {
-
- Deferred: function( func ) {
- var tuples = [
-
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks( "memory" ) ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred( function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
-
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[ 1 ] ]( function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .progress( newDefer.notify )
- .done( newDefer.resolve )
- .fail( newDefer.reject );
- } else {
- newDefer[ tuple[ 0 ] + "With" ](
- this === promise ? newDefer.promise() : this,
- fn ? [ returned ] : arguments
- );
- }
- } );
- } );
- fns = null;
- } ).promise();
- },
-
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[ 1 ] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add( function() {
-
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[ 0 ] ] = function() {
- deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
- } );
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 ||
- ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred.
- // If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
- if ( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // Add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .progress( updateFunc( i, progressContexts, progressValues ) )
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject );
- } else {
- --remaining;
- }
- }
- }
-
- // If we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-} );
-
-
-// The deferred used on DOM ready
-var readyList;
-
-jQuery.fn.ready = function( fn ) {
-
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
-};
-
-jQuery.extend( {
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.triggerHandler ) {
- jQuery( document ).triggerHandler( "ready" );
- jQuery( document ).off( "ready" );
- }
- }
-} );
-
-/**
- * The ready event handler and self cleanup method
- */
-function completed() {
- document.removeEventListener( "DOMContentLoaded", completed );
- window.removeEventListener( "load", completed );
- jQuery.ready();
-}
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called
- // after the browser event has already occurred.
- // Support: IE9-10 only
- // Older IE sometimes signals "interactive" too soon
- if ( document.readyState === "complete" ||
- ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
-
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- window.setTimeout( jQuery.ready );
-
- } else {
-
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed );
- }
- }
- return readyList.promise( obj );
-};
-
-// Kick off the DOM ready check even if the user does not
-jQuery.ready.promise();
-
-
-
-
-// Multifunctional method to get and set values of a collection
-// The value/s can optionally be executed if it's a function
-var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- len = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- access( elems, fn, i, key[ i ], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
-
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < len; i++ ) {
- fn(
- elems[ i ], key, raw ?
- value :
- value.call( elems[ i ], i, fn( elems[ i ], key ) )
- );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- len ? fn( elems[ 0 ], key ) : emptyGet;
-};
-var acceptData = function( owner ) {
-
- // Accepts only:
- // - Node
- // - Node.ELEMENT_NODE
- // - Node.DOCUMENT_NODE
- // - Object
- // - Any
- /* jshint -W018 */
- return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
-};
-
-
-
-
-function Data() {
- this.expando = jQuery.expando + Data.uid++;
-}
-
-Data.uid = 1;
-
-Data.prototype = {
-
- register: function( owner, initial ) {
- var value = initial || {};
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable, non-writable property
- // configurability must be true to allow the property to be
- // deleted with the delete operator
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- writable: true,
- configurable: true
- } );
- }
- return owner[ this.expando ];
- },
- cache: function( owner ) {
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( !acceptData( owner ) ) {
- return {};
- }
-
- // Check if the owner object already has a cache
- var value = owner[ this.expando ];
-
- // If not, create one
- if ( !value ) {
- value = {};
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( acceptData( owner ) ) {
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable property
- // configurable must be true to allow the property to be
- // deleted when data is removed
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- configurable: true
- } );
- }
- }
- }
-
- return value;
- },
- set: function( owner, data, value ) {
- var prop,
- cache = this.cache( owner );
-
- // Handle: [ owner, key, value ] args
- if ( typeof data === "string" ) {
- cache[ data ] = value;
-
- // Handle: [ owner, { properties } ] args
- } else {
-
- // Copy the properties one-by-one to the cache object
- for ( prop in data ) {
- cache[ prop ] = data[ prop ];
- }
- }
- return cache;
- },
- get: function( owner, key ) {
- return key === undefined ?
- this.cache( owner ) :
- owner[ this.expando ] && owner[ this.expando ][ key ];
- },
- access: function( owner, key, value ) {
- var stored;
-
- // In cases where either:
- //
- // 1. No key was specified
- // 2. A string key was specified, but no value provided
- //
- // Take the "read" path and allow the get method to determine
- // which value to return, respectively either:
- //
- // 1. The entire cache object
- // 2. The data stored at the key
- //
- if ( key === undefined ||
- ( ( key && typeof key === "string" ) && value === undefined ) ) {
-
- stored = this.get( owner, key );
-
- return stored !== undefined ?
- stored : this.get( owner, jQuery.camelCase( key ) );
- }
-
- // When the key is not a string, or both a key and value
- // are specified, set or extend (existing objects) with either:
- //
- // 1. An object of properties
- // 2. A key and value
- //
- this.set( owner, key, value );
-
- // Since the "set" path can have two possible entry points
- // return the expected data based on which path was taken[*]
- return value !== undefined ? value : key;
- },
- remove: function( owner, key ) {
- var i, name, camel,
- cache = owner[ this.expando ];
-
- if ( cache === undefined ) {
- return;
- }
-
- if ( key === undefined ) {
- this.register( owner );
-
- } else {
-
- // Support array or space separated string of keys
- if ( jQuery.isArray( key ) ) {
-
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = key.concat( key.map( jQuery.camelCase ) );
- } else {
- camel = jQuery.camelCase( key );
-
- // Try the string as a key before any manipulation
- if ( key in cache ) {
- name = [ key, camel ];
- } else {
-
- // If a key with the spaces exists, use it.
- // Otherwise, create an array by matching non-whitespace
- name = camel;
- name = name in cache ?
- [ name ] : ( name.match( rnotwhite ) || [] );
- }
- }
-
- i = name.length;
-
- while ( i-- ) {
- delete cache[ name[ i ] ];
- }
- }
-
- // Remove the expando if there's no more data
- if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
-
- // Support: Chrome <= 35-45+
- // Webkit & Blink performance suffers when deleting properties
- // from DOM nodes, so set to undefined instead
- // https://code.google.com/p/chromium/issues/detail?id=378607
- if ( owner.nodeType ) {
- owner[ this.expando ] = undefined;
- } else {
- delete owner[ this.expando ];
- }
- }
- },
- hasData: function( owner ) {
- var cache = owner[ this.expando ];
- return cache !== undefined && !jQuery.isEmptyObject( cache );
- }
-};
-var dataPriv = new Data();
-
-var dataUser = new Data();
-
-
-
-// Implementation Summary
-//
-// 1. Enforce API surface and semantic compatibility with 1.9.x branch
-// 2. Improve the module's maintainability by reducing the storage
-// paths to a single mechanism.
-// 3. Use the same single mechanism to support "private" and "user" data.
-// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
-// 5. Avoid exposing implementation details on user objects (eg. expando properties)
-// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
-
-var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- rmultiDash = /[A-Z]/g;
-
-function dataAttr( elem, key, data ) {
- var name;
-
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
- name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
-
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch ( e ) {}
-
- // Make sure we set the data so it isn't changed later
- dataUser.set( elem, key, data );
- } else {
- data = undefined;
- }
- }
- return data;
-}
-
-jQuery.extend( {
- hasData: function( elem ) {
- return dataUser.hasData( elem ) || dataPriv.hasData( elem );
- },
-
- data: function( elem, name, data ) {
- return dataUser.access( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- dataUser.remove( elem, name );
- },
-
- // TODO: Now that all calls to _data and _removeData have been replaced
- // with direct calls to dataPriv methods, these can be deprecated.
- _data: function( elem, name, data ) {
- return dataPriv.access( elem, name, data );
- },
-
- _removeData: function( elem, name ) {
- dataPriv.remove( elem, name );
- }
-} );
-
-jQuery.fn.extend( {
- data: function( key, value ) {
- var i, name, data,
- elem = this[ 0 ],
- attrs = elem && elem.attributes;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = dataUser.get( elem );
-
- if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
- i = attrs.length;
- while ( i-- ) {
-
- // Support: IE11+
- // The attrs elements can be null (#14894)
- if ( attrs[ i ] ) {
- name = attrs[ i ].name;
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.slice( 5 ) );
- dataAttr( elem, name, data[ name ] );
- }
- }
- }
- dataPriv.set( elem, "hasDataAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each( function() {
- dataUser.set( this, key );
- } );
- }
-
- return access( this, function( value ) {
- var data, camelKey;
-
- // The calling jQuery object (element matches) is not empty
- // (and therefore has an element appears at this[ 0 ]) and the
- // `value` parameter was not undefined. An empty jQuery object
- // will result in `undefined` for elem = this[ 0 ] which will
- // throw an exception if an attempt to read a data cache is made.
- if ( elem && value === undefined ) {
-
- // Attempt to get data from the cache
- // with the key as-is
- data = dataUser.get( elem, key ) ||
-
- // Try to find dashed key if it exists (gh-2779)
- // This is for 2.2.x only
- dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
-
- if ( data !== undefined ) {
- return data;
- }
-
- camelKey = jQuery.camelCase( key );
-
- // Attempt to get data from the cache
- // with the key camelized
- data = dataUser.get( elem, camelKey );
- if ( data !== undefined ) {
- return data;
- }
-
- // Attempt to "discover" the data in
- // HTML5 custom data-* attrs
- data = dataAttr( elem, camelKey, undefined );
- if ( data !== undefined ) {
- return data;
- }
-
- // We tried really hard, but the data doesn't exist.
- return;
- }
-
- // Set the data...
- camelKey = jQuery.camelCase( key );
- this.each( function() {
-
- // First, attempt to store a copy or reference of any
- // data that might've been store with a camelCased key.
- var data = dataUser.get( this, camelKey );
-
- // For HTML5 data-* attribute interop, we have to
- // store property names with dashes in a camelCase form.
- // This might not apply to all properties...*
- dataUser.set( this, camelKey, value );
-
- // *... In the case of properties that might _actually_
- // have dashes, we need to also store a copy of that
- // unchanged property.
- if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
- dataUser.set( this, key, value );
- }
- } );
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each( function() {
- dataUser.remove( this, key );
- } );
- }
-} );
-
-
-jQuery.extend( {
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = dataPriv.get( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray( data ) ) {
- queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // Clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // Not public - generate a queueHooks object, or return the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
- empty: jQuery.Callbacks( "once memory" ).add( function() {
- dataPriv.remove( elem, [ type + "queue", key ] );
- } )
- } );
- }
-} );
-
-jQuery.fn.extend( {
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[ 0 ], type );
- }
-
- return data === undefined ?
- this :
- this.each( function() {
- var queue = jQuery.queue( this, type, data );
-
- // Ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- } );
- },
- dequeue: function( type ) {
- return this.each( function() {
- jQuery.dequeue( this, type );
- } );
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
-
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while ( i-- ) {
- tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-} );
-var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
-
-var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
-
-
-var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
-
-var isHidden = function( elem, el ) {
-
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" ||
- !jQuery.contains( elem.ownerDocument, elem );
- };
-
-
-
-function adjustCSS( elem, prop, valueParts, tween ) {
- var adjusted,
- scale = 1,
- maxIterations = 20,
- currentValue = tween ?
- function() { return tween.cur(); } :
- function() { return jQuery.css( elem, prop, "" ); },
- initial = currentValue(),
- unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
- // Starting value computation is required for potential unit mismatches
- initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
- rcssNum.exec( jQuery.css( elem, prop ) );
-
- if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
-
- // Trust units reported by jQuery.css
- unit = unit || initialInUnit[ 3 ];
-
- // Make sure we update the tween properties later on
- valueParts = valueParts || [];
-
- // Iteratively approximate from a nonzero starting point
- initialInUnit = +initial || 1;
-
- do {
-
- // If previous iteration zeroed out, double until we get *something*.
- // Use string for doubling so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- initialInUnit = initialInUnit / scale;
- jQuery.style( elem, prop, initialInUnit + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // Break the loop if scale is unchanged or perfect, or if we've just had enough.
- } while (
- scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
- );
- }
-
- if ( valueParts ) {
- initialInUnit = +initialInUnit || +initial || 0;
-
- // Apply relative offset (+=/-=) if specified
- adjusted = valueParts[ 1 ] ?
- initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
- +valueParts[ 2 ];
- if ( tween ) {
- tween.unit = unit;
- tween.start = initialInUnit;
- tween.end = adjusted;
- }
- }
- return adjusted;
-}
-var rcheckableType = ( /^(?:checkbox|radio)$/i );
-
-var rtagName = ( /<([\w:-]+)/ );
-
-var rscriptType = ( /^$|\/(?:java|ecma)script/i );
-
-
-
-// We have to close these tags to support XHTML (#13200)
-var wrapMap = {
-
- // Support: IE9
- option: [ 1, "" ],
-
- // XHTML parsers do not magically insert elements in the
- // same way that tag soup parsers do. So we cannot shorten
- // this by omitting or other required elements.
- thead: [ 1, "" ],
- col: [ 2, "" ],
- tr: [ 2, "" ],
- td: [ 3, "" ],
-
- _default: [ 0, "", "" ]
-};
-
-// Support: IE9
-wrapMap.optgroup = wrapMap.option;
-
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-
-function getAll( context, tag ) {
-
- // Support: IE9-11+
- // Use typeof to avoid zero-argument method invocation on host objects (#15151)
- var ret = typeof context.getElementsByTagName !== "undefined" ?
- context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== "undefined" ?
- context.querySelectorAll( tag || "*" ) :
- [];
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], ret ) :
- ret;
-}
-
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- dataPriv.set(
- elems[ i ],
- "globalEval",
- !refElements || dataPriv.get( refElements[ i ], "globalEval" )
- );
- }
-}
-
-
-var rhtml = /<|?\w+;/;
-
-function buildFragment( elems, context, scripts, selection, ignored ) {
- var elem, tmp, tag, wrap, contains, j,
- fragment = context.createDocumentFragment(),
- nodes = [],
- i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
- tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
-
- // Descend through wrappers to the right content
- j = wrap[ 0 ];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, tmp.childNodes );
-
- // Remember the top-level container
- tmp = fragment.firstChild;
-
- // Ensure the created nodes are orphaned (#12392)
- tmp.textContent = "";
- }
- }
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
-
- i = 0;
- while ( ( elem = nodes[ i++ ] ) ) {
-
- // Skip elements already in the context collection (trac-4087)
- if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
- if ( ignored ) {
- ignored.push( elem );
- }
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( fragment.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( ( elem = tmp[ j++ ] ) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- return fragment;
-}
-
-
-( function() {
- var fragment = document.createDocumentFragment(),
- div = fragment.appendChild( document.createElement( "div" ) ),
- input = document.createElement( "input" );
-
- // Support: Android 4.0-4.3, Safari<=5.1
- // Check state lost if the name is set (#11217)
- // Support: Windows Web Apps (WWA)
- // `name` and `type` must use .setAttribute for WWA (#14901)
- input.setAttribute( "type", "radio" );
- input.setAttribute( "checked", "checked" );
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
-
- // Support: Safari<=5.1, Android<4.2
- // Older WebKit doesn't clone checked state correctly in fragments
- support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<=11+
- // Make sure textarea (and checkbox) defaultValue is properly cloned
- div.innerHTML = "";
- support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
-} )();
-
-
-var
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-// Support: IE9
-// See #13393 for more info
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
-function on( elem, types, selector, data, fn, one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
-
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
-
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- on( elem, type, selector, data, types[ type ], one );
- }
- return elem;
- }
-
- if ( data == null && fn == null ) {
-
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
-
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
-
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return elem;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
-
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
-
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return elem.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- } );
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
-
- var handleObjIn, eventHandle, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.get( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !( events = elemData.events ) ) {
- events = elemData.events = {};
- }
- if ( !( eventHandle = elemData.handle ) ) {
- eventHandle = elemData.handle = function( e ) {
-
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
- jQuery.event.dispatch.apply( elem, arguments ) : undefined;
- };
- }
-
- // Handle multiple events separated by a space
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // There *must* be a type, no attaching namespace-only handlers
- if ( !type ) {
- continue;
- }
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend( {
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join( "." )
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !( handlers = events[ type ] ) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener if the special events handler returns false
- if ( !special.setup ||
- special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
-
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var j, origCount, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
-
- if ( !elemData || !( events = elemData.events ) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[ 2 ] &&
- new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector ||
- selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown ||
- special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
-
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove data and the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- dataPriv.remove( elem, "handle events" );
- }
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, j, ret, matched, handleObj,
- handlerQueue = [],
- args = slice.call( arguments ),
- handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[ 0 ] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( ( handleObj = matched.handlers[ j++ ] ) &&
- !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or 2) have namespace(s)
- // a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
- handleObj.handler ).apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( ( event.result = ret ) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var i, matches, sel, handleObj,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Support (at least): Chrome, IE9
- // Find delegate handlers
- // Black-hole SVG