diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2d67d9dfcdc..c4a08668e37 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,13 @@ == Changelog == += 3.9.1 - 2020-01-28 = + +* Tweak - Trim whitespaces and strip slashes from MaxMind License Key. +* Dev - Prevent empty notices to get displayed on frontend. +* Fix - Show "-" instead of "0" when tax isn't applicable to a product. +* Fix - Fixed fatal error on the thank you page if order is not specified. +* REST API - Fixed - Product and variations schema to allow remove sale prices, dimensions and weight. + = 3.9.0 - 2020-01-21 = * Enhancement - Added a "Show" button next to the password field on the login fields. #24915 @@ -79,7 +87,7 @@ * Dev - Introduced wc_get_product_object() helper. #25031 * Dev - Pass the correct `$this->updated_props` variable to the `woocommerce_coupon_object_updated_props` action's second paramater. #25077 * Dev - Remove a few calls to `func_get_args()` and `call_user_func_array()` with the spread operator for better code legibility and performance gains. #25101 -- Dev - New `woocommerce_valid_order_statuses_for_payment` hook that triggers when an order is paid. Use this new hook instead of `woocommerce_order_status_changed` or *woocommerce_order_status_{old_status}}_to_{new_status}` to trigger code for payment completion. #25158 +* Dev - New `woocommerce_valid_order_statuses_for_payment` hook that triggers when an order is paid. Use this new hook instead of `woocommerce_order_status_changed` or woocommerce_order_status_{old_status}}_to_{new_status}` to trigger code for payment completion. #25158 * Dev - Ability to exclude certain product types from product search calls. #25162 * Dev - Raise exception when `WC_Product_Variation` is instantiated with an ID that belongs to an object that is not a variation. #25178 * Localization - Add subdivisions of Laos. #24765 @@ -144,7 +152,7 @@ * Dev - Introduced woocommerce_payment_token_class filter. #24542 * Dev - Add support for post type count to system status report. #24536 * Dev - Check for max discount to be -ve to prevent overwriting refunded fee amount. #24341 -* Dev: Add filter woocommerce_european_union_countries to the method WC_Countries::get_european_union_countries(). #24741 +* Dev - Add filter woocommerce_european_union_countries to the method WC_Countries::get_european_union_countries(). #24741 * Dev - Allow WC_Product_Query sort products by include order. #24294 * Dev - Removed duplicated include of WC_Admin_Importers. #24751 * Dev - Refactor minimum requirement notice to use constant for easier changes in the future. #24830 diff --git a/assets/js/admin/wc-setup.js b/assets/js/admin/wc-setup.js index 41a55875aa6..168a425de7a 100644 --- a/assets/js/admin/wc-setup.js +++ b/assets/js/admin/wc-setup.js @@ -168,7 +168,10 @@ jQuery( function( $ ) { $( '.wc-wizard-services' ).on( 'change', '.wc-wizard-shipping-method-enable', function() { var checked = $( this ).is( ':checked' ); - var selectedMethod = $( '.wc-wizard-shipping-method-select .method' ).val(); + var selectedMethod = $( this ) + .closest( '.wc-wizard-service-item' ) + .find( '.wc-wizard-shipping-method-select .method' ) + .val(); $( this ) .closest( '.wc-wizard-service-item' ) diff --git a/assets/js/frontend/checkout.js b/assets/js/frontend/checkout.js index 6ddc34b99c8..73a7693bc76 100644 --- a/assets/js/frontend/checkout.js +++ b/assets/js/frontend/checkout.js @@ -50,7 +50,7 @@ jQuery( function( $ ) { this.$checkout_form.on( 'change', '#ship-to-different-address input', this.ship_to_different_address ); // Trigger events - this.init_ship_to_different_address(); + this.$checkout_form.find( '#ship-to-different-address input' ).change(); this.init_payment_methods(); // Update on page load @@ -135,10 +135,7 @@ jQuery( function( $ ) { } }, init_checkout: function() { - // Fire updated_checkout event after existing ready event handlers. - $( function() { - $( document.body ).trigger( 'updated_checkout' ); - } ); + $( document.body ).trigger( 'update_checkout' ); }, maybe_input_changed: function( e ) { if ( wc_checkout_form.dirtyInput ) { @@ -183,31 +180,10 @@ jQuery( function( $ ) { wc_checkout_form.trigger_update_checkout(); } }, - init_ship_to_different_address: function() { - var $checkbox = $( '#ship-to-different-address input' ); - - if ( ! $checkbox.prop( 'checked' ) ) { - var $billing = $( 'div.woocommerce-billing-fields' ); - - // Find shipping field values that diverge from billing. - var $differentFields = $( 'div.shipping_address' ).find( 'input, select' ).filter( function() { - $( this ).attr( 'id' ).replace( 'shipping', 'billing' ); - var id = $( this ).attr( 'id' ).replace( 'shipping', 'billing' ); - return $( this ).val() !== $billing.find( '#' + id ).val(); - } ); - - if ( $differentFields.length > 0 ) { - $checkbox.prop( 'checked', true ); - } - } - - $( 'div.shipping_address' ).toggle( $checkbox.prop( 'checked' ) ); - }, ship_to_different_address: function() { + $( 'div.shipping_address' ).hide(); if ( $( this ).is( ':checked' ) ) { $( 'div.shipping_address' ).slideDown(); - } else { - $( 'div.shipping_address' ).slideUp(); } }, reset_update_checkout_timer: function() { diff --git a/bin/post-merge.sh b/bin/post-merge.sh new file mode 100755 index 00000000000..67196fe5f18 --- /dev/null +++ b/bin/post-merge.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" + +runOnChange() { + echo "$changedFiles" | grep -q "$1" && eval "$2" +} + +runOnChange "package-lock.json" "npm install" +runOnChange "composer.lock" "composer install" diff --git a/composer.json b/composer.json index 06b4761723b..a6e48286c1c 100644 --- a/composer.json +++ b/composer.json @@ -9,10 +9,12 @@ "require": { "php": ">=5.6|>=7.0", "automattic/jetpack-autoloader": "^1.2.0", + "automattic/jetpack-constants": "^1.1", "composer/installers": "1.7.0", "maxmind-db/reader": "1.6.0", + "woocommerce/action-scheduler": "2.2.5", "woocommerce/woocommerce-blocks": "2.5.11", - "woocommerce/woocommerce-rest-api": "1.0.6" + "woocommerce/woocommerce-rest-api": "1.0.7" }, "require-dev": { "phpunit/phpunit": "7.5.20", @@ -23,6 +25,7 @@ "php": "7.1" }, "preferred-install": { + "woocommerce/action-scheduler": "dist", "woocommerce/woocommerce-rest-api": "dist", "woocommerce/woocommerce-blocks": "dist" }, @@ -59,6 +62,7 @@ }, "extra": { "installer-paths": { + "packages/action-scheduler": ["woocommerce/action-scheduler"], "packages/woocommerce-rest-api": ["woocommerce/woocommerce-rest-api"], "packages/woocommerce-blocks": ["woocommerce/woocommerce-blocks"] }, diff --git a/composer.lock b/composer.lock index e7cdd373318..abc155988a5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e6dfd8d640c9fc3f21795ddb41a23477", + "content-hash": "d2f5085db8a002bfb5349dca8dc82878", "packages": [ { "name": "automattic/jetpack-autoloader", @@ -42,6 +42,36 @@ "description": "Creates a custom autoloader for a plugin or theme.", "time": "2019-09-24T06:39:29+00:00" }, + { + "name": "automattic/jetpack-constants", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-constants.git", + "reference": "5fdd94dec1151e7defd684a97e0b64fe6ff1bd3a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-constants/zipball/5fdd94dec1151e7defd684a97e0b64fe6ff1bd3a", + "reference": "5fdd94dec1151e7defd684a97e0b64fe6ff1bd3a", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "A wrapper for defining constants in a more testable way.", + "time": "2019-11-08T21:16:05+00:00" + }, { "name": "composer/installers", "version": "v1.7.0", @@ -224,6 +254,31 @@ ], "time": "2019-12-19T22:59:03+00:00" }, + { + "name": "woocommerce/action-scheduler", + "version": "2.2.5", + "source": { + "type": "git", + "url": "https://github.com/woocommerce/action-scheduler.git", + "reference": "fd7c6b76a7af27d6403ffe39b0963dbd8ce50488" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/fd7c6b76a7af27d6403ffe39b0963dbd8ce50488", + "reference": "fd7c6b76a7af27d6403ffe39b0963dbd8ce50488", + "shasum": "" + }, + "require-dev": { + "wp-cli/wp-cli": "1.5.1" + }, + "type": "wordpress-plugin", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0" + ], + "description": "Action Scheduler for WordPress and WooCommerce", + "time": "2019-04-24T12:45:40+00:00" + }, { "name": "woocommerce/woocommerce-blocks", "version": "v2.5.11", @@ -273,16 +328,16 @@ }, { "name": "woocommerce/woocommerce-rest-api", - "version": "1.0.6", + "version": "1.0.7", "source": { "type": "git", "url": "https://github.com/woocommerce/woocommerce-rest-api.git", - "reference": "78ccf4d4c6bafbc841182b68aa863e7b0caa37c8" + "reference": "49162ec26a25bd0c6efc0f3452b113cdfff0a823" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/woocommerce/woocommerce-rest-api/zipball/78ccf4d4c6bafbc841182b68aa863e7b0caa37c8", - "reference": "78ccf4d4c6bafbc841182b68aa863e7b0caa37c8", + "url": "https://api.github.com/repos/woocommerce/woocommerce-rest-api/zipball/49162ec26a25bd0c6efc0f3452b113cdfff0a823", + "reference": "49162ec26a25bd0c6efc0f3452b113cdfff0a823", "shasum": "" }, "require": { @@ -309,7 +364,7 @@ ], "description": "The WooCommerce core REST API.", "homepage": "https://github.com/woocommerce/woocommerce-rest-api", - "time": "2020-01-15T23:29:39+00:00" + "time": "2020-01-28T21:04:51+00:00" } ], "packages-dev": [ @@ -437,16 +492,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.4", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -481,7 +536,7 @@ "object", "object graph" ], - "time": "2019-12-15T19:12:40+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { "name": "phar-io/manifest", @@ -898,24 +953,24 @@ }, { "name": "phpspec/prophecy", - "version": "1.10.1", + "version": "v1.10.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { "phpspec/phpspec": "^2.5 || ^3.2", @@ -957,7 +1012,7 @@ "spy", "stub" ], - "time": "2019-12-22T21:05:45+00:00" + "time": "2020-01-20T15:57:02+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1863,16 +1918,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.5.3", + "version": "3.5.4", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb" + "reference": "dceec07328401de6211037abbb18bda423677e26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", - "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dceec07328401de6211037abbb18bda423677e26", + "reference": "dceec07328401de6211037abbb18bda423677e26", "shasum": "" }, "require": { @@ -1910,7 +1965,7 @@ "phpcs", "standards" ], - "time": "2019-12-04T04:46:47+00:00" + "time": "2020-01-30T22:20:29+00:00" }, { "name": "symfony/polyfill-ctype", diff --git a/includes/abstracts/abstract-wc-deprecated-hooks.php b/includes/abstracts/abstract-wc-deprecated-hooks.php index 77acca23686..c7cb4c56975 100644 --- a/includes/abstracts/abstract-wc-deprecated-hooks.php +++ b/includes/abstracts/abstract-wc-deprecated-hooks.php @@ -7,6 +7,8 @@ * @version 3.3.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -94,7 +96,7 @@ abstract class WC_Deprecated_Hooks { * @return string */ protected function get_deprecated_version( $old_hook ) { - return ! empty( $this->deprecated_version[ $old_hook ] ) ? $this->deprecated_version[ $old_hook ] : WC_VERSION; + return ! empty( $this->deprecated_version[ $old_hook ] ) ? $this->deprecated_version[ $old_hook ] : Constants::get_constant( 'WC_VERSION' ); } /** diff --git a/includes/abstracts/abstract-wc-payment-gateway.php b/includes/abstracts/abstract-wc-payment-gateway.php index 6930fccec99..180c3f05adf 100644 --- a/includes/abstracts/abstract-wc-payment-gateway.php +++ b/includes/abstracts/abstract-wc-payment-gateway.php @@ -9,6 +9,8 @@ * @package WooCommerce/Abstracts */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -450,7 +452,7 @@ abstract class WC_Payment_Gateway extends WC_Settings_API { public function tokenization_script() { wp_enqueue_script( 'woocommerce-tokenization-form', - plugins_url( '/assets/js/frontend/tokenization-form' . ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min' ) . '.js', WC_PLUGIN_FILE ), + plugins_url( '/assets/js/frontend/tokenization-form' . ( Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min' ) . '.js', WC_PLUGIN_FILE ), array( 'jquery' ), WC()->version ); diff --git a/includes/abstracts/abstract-wc-widget.php b/includes/abstracts/abstract-wc-widget.php index a65a3914c61..c2f6f1bf298 100644 --- a/includes/abstracts/abstract-wc-widget.php +++ b/includes/abstracts/abstract-wc-widget.php @@ -6,6 +6,8 @@ * @package WooCommerce/Abstracts */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -319,7 +321,7 @@ abstract class WC_Widget extends WP_Widget { * @since 3.3.0 */ protected function get_current_page_url() { - if ( defined( 'SHOP_IS_ON_FRONT' ) ) { + if ( Constants::is_defined( 'SHOP_IS_ON_FRONT' ) ) { $link = home_url(); } elseif ( is_shop() ) { $link = get_permalink( wc_get_page_id( 'shop' ) ); diff --git a/includes/admin/class-wc-admin-addons.php b/includes/admin/class-wc-admin-addons.php index c4ba6b50c9a..31e9adac3a3 100644 --- a/includes/admin/class-wc-admin-addons.php +++ b/includes/admin/class-wc-admin-addons.php @@ -6,6 +6,8 @@ * @version 2.5.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -489,7 +491,7 @@ class WC_Admin_Addons { return array( 'wccom-site' => site_url(), 'wccom-back' => rawurlencode( $back_admin_path ), - 'wccom-woo-version' => WC_VERSION, + 'wccom-woo-version' => Constants::get_constant( 'WC_VERSION' ), 'wccom-connect-nonce' => wp_create_nonce( 'connect' ), ); } diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index baabe2594c2..5bdd3e12685 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -6,6 +6,8 @@ * @version 3.7.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -31,16 +33,17 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : public function admin_styles() { global $wp_scripts; + $version = Constants::get_constant( 'WC_VERSION' ); $screen = get_current_screen(); $screen_id = $screen ? $screen->id : ''; // Register admin styles. - wp_register_style( 'woocommerce_admin_menu_styles', WC()->plugin_url() . '/assets/css/menu.css', array(), WC_VERSION ); - wp_register_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION ); - wp_register_style( 'jquery-ui-style', WC()->plugin_url() . '/assets/css/jquery-ui/jquery-ui.min.css', array(), WC_VERSION ); - wp_register_style( 'woocommerce_admin_dashboard_styles', WC()->plugin_url() . '/assets/css/dashboard.css', array(), WC_VERSION ); - wp_register_style( 'woocommerce_admin_print_reports_styles', WC()->plugin_url() . '/assets/css/reports-print.css', array(), WC_VERSION, 'print' ); - wp_register_style( 'woocommerce_admin_marketplace_styles', WC()->plugin_url() . '/assets/css/marketplace-suggestions.css', array(), WC_VERSION ); + wp_register_style( 'woocommerce_admin_menu_styles', WC()->plugin_url() . '/assets/css/menu.css', array(), $version ); + wp_register_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), $version ); + wp_register_style( 'jquery-ui-style', WC()->plugin_url() . '/assets/css/jquery-ui/jquery-ui.min.css', array(), $version ); + wp_register_style( 'woocommerce_admin_dashboard_styles', WC()->plugin_url() . '/assets/css/dashboard.css', array(), $version ); + wp_register_style( 'woocommerce_admin_print_reports_styles', WC()->plugin_url() . '/assets/css/reports-print.css', array(), $version, 'print' ); + wp_register_style( 'woocommerce_admin_marketplace_styles', WC()->plugin_url() . '/assets/css/marketplace-suggestions.css', array(), $version ); // Add RTL support for admin styles. wp_style_add_data( 'woocommerce_admin_menu_styles', 'rtl', 'replace' ); @@ -88,32 +91,33 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : $screen = get_current_screen(); $screen_id = $screen ? $screen->id : ''; $wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) ); - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; + $version = Constants::get_constant( 'WC_VERSION' ); // Register scripts. - wp_register_script( 'woocommerce_admin', WC()->plugin_url() . '/assets/js/admin/woocommerce_admin' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-tiptip' ), WC_VERSION ); + wp_register_script( 'woocommerce_admin', WC()->plugin_url() . '/assets/js/admin/woocommerce_admin' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-tiptip' ), $version ); wp_register_script( 'jquery-blockui', WC()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true ); - wp_register_script( 'jquery-tiptip', WC()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true ); - wp_register_script( 'round', WC()->plugin_url() . '/assets/js/round/round' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - wp_register_script( 'wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'wc-enhanced-select', 'plupload-all', 'stupidtable', 'jquery-tiptip' ), WC_VERSION ); - wp_register_script( 'zeroclipboard', WC()->plugin_url() . '/assets/js/zeroclipboard/jquery.zeroclipboard' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - wp_register_script( 'qrcode', WC()->plugin_url() . '/assets/js/jquery-qrcode/jquery.qrcode' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - wp_register_script( 'stupidtable', WC()->plugin_url() . '/assets/js/stupidtable/stupidtable' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); + wp_register_script( 'jquery-tiptip', WC()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), $version, true ); + wp_register_script( 'round', WC()->plugin_url() . '/assets/js/round/round' . $suffix . '.js', array( 'jquery' ), $version ); + wp_register_script( 'wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'wc-enhanced-select', 'plupload-all', 'stupidtable', 'jquery-tiptip' ), $version ); + wp_register_script( 'zeroclipboard', WC()->plugin_url() . '/assets/js/zeroclipboard/jquery.zeroclipboard' . $suffix . '.js', array( 'jquery' ), $version ); + wp_register_script( 'qrcode', WC()->plugin_url() . '/assets/js/jquery-qrcode/jquery.qrcode' . $suffix . '.js', array( 'jquery' ), $version ); + wp_register_script( 'stupidtable', WC()->plugin_url() . '/assets/js/stupidtable/stupidtable' . $suffix . '.js', array( 'jquery' ), $version ); wp_register_script( 'serializejson', WC()->plugin_url() . '/assets/js/jquery-serializejson/jquery.serializejson' . $suffix . '.js', array( 'jquery' ), '2.8.1' ); - wp_register_script( 'flot', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - wp_register_script( 'flot-resize', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.resize' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); - wp_register_script( 'flot-time', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.time' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); - wp_register_script( 'flot-pie', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.pie' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); - wp_register_script( 'flot-stack', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); - wp_register_script( 'wc-settings-tax', WC()->plugin_url() . '/assets/js/admin/settings-views-html-settings-tax' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone', 'jquery-blockui' ), WC_VERSION ); - wp_register_script( 'wc-backbone-modal', WC()->plugin_url() . '/assets/js/admin/backbone-modal' . $suffix . '.js', array( 'underscore', 'backbone', 'wp-util' ), WC_VERSION ); - wp_register_script( 'wc-shipping-zones', WC()->plugin_url() . '/assets/js/admin/wc-shipping-zones' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone', 'jquery-ui-sortable', 'wc-enhanced-select', 'wc-backbone-modal' ), WC_VERSION ); - wp_register_script( 'wc-shipping-zone-methods', WC()->plugin_url() . '/assets/js/admin/wc-shipping-zone-methods' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone', 'jquery-ui-sortable', 'wc-backbone-modal' ), WC_VERSION ); - wp_register_script( 'wc-shipping-classes', WC()->plugin_url() . '/assets/js/admin/wc-shipping-classes' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone' ), WC_VERSION ); - wp_register_script( 'wc-clipboard', WC()->plugin_url() . '/assets/js/admin/wc-clipboard' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); + wp_register_script( 'flot', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot' . $suffix . '.js', array( 'jquery' ), $version ); + wp_register_script( 'flot-resize', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.resize' . $suffix . '.js', array( 'jquery', 'flot' ), $version ); + wp_register_script( 'flot-time', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.time' . $suffix . '.js', array( 'jquery', 'flot' ), $version ); + wp_register_script( 'flot-pie', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.pie' . $suffix . '.js', array( 'jquery', 'flot' ), $version ); + wp_register_script( 'flot-stack', WC()->plugin_url() . '/assets/js/jquery-flot/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), $version ); + wp_register_script( 'wc-settings-tax', WC()->plugin_url() . '/assets/js/admin/settings-views-html-settings-tax' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone', 'jquery-blockui' ), $version ); + wp_register_script( 'wc-backbone-modal', WC()->plugin_url() . '/assets/js/admin/backbone-modal' . $suffix . '.js', array( 'underscore', 'backbone', 'wp-util' ), $version ); + wp_register_script( 'wc-shipping-zones', WC()->plugin_url() . '/assets/js/admin/wc-shipping-zones' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone', 'jquery-ui-sortable', 'wc-enhanced-select', 'wc-backbone-modal' ), $version ); + wp_register_script( 'wc-shipping-zone-methods', WC()->plugin_url() . '/assets/js/admin/wc-shipping-zone-methods' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone', 'jquery-ui-sortable', 'wc-backbone-modal' ), $version ); + wp_register_script( 'wc-shipping-classes', WC()->plugin_url() . '/assets/js/admin/wc-shipping-classes' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone' ), $version ); + wp_register_script( 'wc-clipboard', WC()->plugin_url() . '/assets/js/admin/wc-clipboard' . $suffix . '.js', array( 'jquery' ), $version ); wp_register_script( 'select2', WC()->plugin_url() . '/assets/js/select2/select2.full' . $suffix . '.js', array( 'jquery' ), '4.0.3' ); wp_register_script( 'selectWoo', WC()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '1.0.6' ); - wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo' ), WC_VERSION ); + wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo' ), $version ); wp_register_script( 'js-cookie', WC()->plugin_url() . '/assets/js/js-cookie/js.cookie' . $suffix . '.js', array(), '2.1.4', true ); wp_localize_script( @@ -146,7 +150,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : ) ); - wp_register_script( 'wc-orders', WC()->plugin_url() . '/assets/js/admin/wc-orders' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone', 'jquery-blockui' ), WC_VERSION ); + wp_register_script( 'wc-orders', WC()->plugin_url() . '/assets/js/admin/wc-orders' . $suffix . '.js', array( 'jquery', 'wp-util', 'underscore', 'backbone', 'jquery-blockui' ), $version ); wp_localize_script( 'wc-orders', 'wc_orders_params', @@ -202,7 +206,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : // Products. if ( in_array( $screen_id, array( 'edit-product' ) ) ) { - wp_enqueue_script( 'woocommerce_quick-edit', WC()->plugin_url() . '/assets/js/admin/quick-edit' . $suffix . '.js', array( 'jquery', 'woocommerce_admin' ), WC_VERSION ); + wp_enqueue_script( 'woocommerce_quick-edit', WC()->plugin_url() . '/assets/js/admin/quick-edit' . $suffix . '.js', array( 'jquery', 'woocommerce_admin' ), $version ); $params = array( 'strings' => array( @@ -216,8 +220,8 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : // Meta boxes. if ( in_array( $screen_id, array( 'product', 'edit-product' ) ) ) { wp_enqueue_media(); - wp_register_script( 'wc-admin-product-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'media-models' ), WC_VERSION ); - wp_register_script( 'wc-admin-variation-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product-variation' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'serializejson', 'media-models' ), WC_VERSION ); + wp_register_script( 'wc-admin-product-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'media-models' ), $version ); + wp_register_script( 'wc-admin-variation-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product-variation' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'serializejson', 'media-models' ), $version ); wp_enqueue_script( 'wc-admin-product-meta-boxes' ); wp_enqueue_script( 'wc-admin-variation-meta-boxes' ); @@ -234,7 +238,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : 'save_variations_nonce' => wp_create_nonce( 'save-variations' ), 'bulk_edit_variations_nonce' => wp_create_nonce( 'bulk-edit-variations' ), /* translators: %d: Number of variations */ - 'i18n_link_all_variations' => esc_js( sprintf( __( 'Are you sure you want to link all variations? This will create a new variation for each and every possible combination of variation attributes (max %d per run).', 'woocommerce' ), defined( 'WC_MAX_LINKED_VARIATIONS' ) ? WC_MAX_LINKED_VARIATIONS : 50 ) ), + 'i18n_link_all_variations' => esc_js( sprintf( __( 'Are you sure you want to link all variations? This will create a new variation for each and every possible combination of variation attributes (max %d per run).', 'woocommerce' ), Constants::is_defined( 'WC_MAX_LINKED_VARIATIONS' ) ? Constants::get_constant( 'WC_MAX_LINKED_VARIATIONS' ) : 50 ) ), 'i18n_enter_a_value' => esc_js( __( 'Enter a value', 'woocommerce' ) ), 'i18n_enter_menu_order' => esc_js( __( 'Variation menu order (determines position in the list of variations)', 'woocommerce' ) ), 'i18n_enter_a_value_fixed_or_percent' => esc_js( __( 'Enter a value (fixed or %)', 'woocommerce' ) ), @@ -259,7 +263,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : if ( in_array( str_replace( 'edit-', '', $screen_id ), wc_get_order_types( 'order-meta-boxes' ) ) ) { $default_location = wc_get_customer_default_location(); - wp_enqueue_script( 'wc-admin-order-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-order' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'wc-backbone-modal', 'selectWoo', 'wc-clipboard' ), WC_VERSION ); + wp_enqueue_script( 'wc-admin-order-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-order' . $suffix . '.js', array( 'wc-admin-meta-boxes', 'wc-backbone-modal', 'selectWoo', 'wc-clipboard' ), $version ); wp_localize_script( 'wc-admin-order-meta-boxes', 'woocommerce_admin_meta_boxes_order', @@ -274,7 +278,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : ); } if ( in_array( $screen_id, array( 'shop_coupon', 'edit-shop_coupon' ) ) ) { - wp_enqueue_script( 'wc-admin-coupon-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-coupon' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); + wp_enqueue_script( 'wc-admin-coupon-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-coupon' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), $version ); wp_localize_script( 'wc-admin-coupon-meta-boxes', 'woocommerce_admin_meta_boxes_coupon', @@ -365,7 +369,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : // Term ordering - only when sorting by term_order. if ( ( strstr( $screen_id, 'edit-pa_' ) || ( ! empty( $_GET['taxonomy'] ) && in_array( wp_unslash( $_GET['taxonomy'] ), apply_filters( 'woocommerce_sortable_taxonomies', array( 'product_cat' ) ) ) ) ) && ! isset( $_GET['orderby'] ) ) { - wp_register_script( 'woocommerce_term_ordering', WC()->plugin_url() . '/assets/js/admin/term-ordering' . $suffix . '.js', array( 'jquery-ui-sortable' ), WC_VERSION ); + wp_register_script( 'woocommerce_term_ordering', WC()->plugin_url() . '/assets/js/admin/term-ordering' . $suffix . '.js', array( 'jquery-ui-sortable' ), $version ); wp_enqueue_script( 'woocommerce_term_ordering' ); $taxonomy = isset( $_GET['taxonomy'] ) ? wc_clean( wp_unslash( $_GET['taxonomy'] ) ) : ''; @@ -379,13 +383,13 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : // Product sorting - only when sorting by menu order on the products page. if ( current_user_can( 'edit_others_pages' ) && 'edit-product' === $screen_id && isset( $wp_query->query['orderby'] ) && 'menu_order title' === $wp_query->query['orderby'] ) { - wp_register_script( 'woocommerce_product_ordering', WC()->plugin_url() . '/assets/js/admin/product-ordering' . $suffix . '.js', array( 'jquery-ui-sortable' ), WC_VERSION, true ); + wp_register_script( 'woocommerce_product_ordering', WC()->plugin_url() . '/assets/js/admin/product-ordering' . $suffix . '.js', array( 'jquery-ui-sortable' ), $version, true ); wp_enqueue_script( 'woocommerce_product_ordering' ); } // Reports Pages. if ( in_array( $screen_id, apply_filters( 'woocommerce_reports_screen_ids', array( $wc_screen_id . '_page_wc-reports', 'toplevel_page_wc-reports', 'dashboard' ) ) ) ) { - wp_register_script( 'wc-reports', WC()->plugin_url() . '/assets/js/admin/reports' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker' ), WC_VERSION ); + wp_register_script( 'wc-reports', WC()->plugin_url() . '/assets/js/admin/reports' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker' ), $version ); wp_enqueue_script( 'wc-reports' ); wp_enqueue_script( 'flot' ); @@ -397,7 +401,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : // API settings. if ( $wc_screen_id . '_page_wc-settings' === $screen_id && isset( $_GET['section'] ) && 'keys' == $_GET['section'] ) { - wp_register_script( 'wc-api-keys', WC()->plugin_url() . '/assets/js/admin/api-keys' . $suffix . '.js', array( 'jquery', 'woocommerce_admin', 'underscore', 'backbone', 'wp-util', 'qrcode', 'wc-clipboard' ), WC_VERSION, true ); + wp_register_script( 'wc-api-keys', WC()->plugin_url() . '/assets/js/admin/api-keys' . $suffix . '.js', array( 'jquery', 'woocommerce_admin', 'underscore', 'backbone', 'wp-util', 'qrcode', 'wc-clipboard' ), $version, true ); wp_enqueue_script( 'wc-api-keys' ); wp_localize_script( 'wc-api-keys', @@ -412,7 +416,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : // System status. if ( $wc_screen_id . '_page_wc-status' === $screen_id ) { - wp_register_script( 'wc-admin-system-status', WC()->plugin_url() . '/assets/js/admin/system-status' . $suffix . '.js', array( 'wc-clipboard' ), WC_VERSION ); + wp_register_script( 'wc-admin-system-status', WC()->plugin_url() . '/assets/js/admin/system-status' . $suffix . '.js', array( 'wc-clipboard' ), $version ); wp_enqueue_script( 'wc-admin-system-status' ); wp_localize_script( 'wc-admin-system-status', @@ -424,7 +428,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : } if ( in_array( $screen_id, array( 'user-edit', 'profile' ) ) ) { - wp_register_script( 'wc-users', WC()->plugin_url() . '/assets/js/admin/users' . $suffix . '.js', array( 'jquery', 'wc-enhanced-select', 'selectWoo' ), WC_VERSION, true ); + wp_register_script( 'wc-users', WC()->plugin_url() . '/assets/js/admin/users' . $suffix . '.js', array( 'jquery', 'wc-enhanced-select', 'selectWoo' ), $version, true ); wp_enqueue_script( 'wc-users' ); wp_localize_script( 'wc-users', @@ -442,7 +446,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) : 'marketplace-suggestions', WC()->plugin_url() . '/assets/js/admin/marketplace-suggestions' . $suffix . '.js', array( 'jquery', 'underscore', 'js-cookie' ), - WC_VERSION, + $version, true ); wp_localize_script( diff --git a/includes/admin/class-wc-admin-dashboard.php b/includes/admin/class-wc-admin-dashboard.php index 33621090e1d..9b5ef4941b3 100644 --- a/includes/admin/class-wc-admin-dashboard.php +++ b/includes/admin/class-wc-admin-dashboard.php @@ -6,6 +6,8 @@ * @version 2.1.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } @@ -322,11 +324,12 @@ if ( ! class_exists( 'WC_Admin_Dashboard', false ) ) : * Network orders widget. */ public function network_orders() { - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; + $version = Constants::get_constant( 'WC_VERSION' ); - wp_enqueue_style( 'wc-network-orders', WC()->plugin_url() . '/assets/css/network-order-widget.css', array(), WC_VERSION ); + wp_enqueue_style( 'wc-network-orders', WC()->plugin_url() . '/assets/css/network-order-widget.css', array(), $version ); - wp_enqueue_script( 'wc-network-orders', WC()->plugin_url() . '/assets/js/admin/network-orders' . $suffix . '.js', array( 'jquery', 'underscore' ), WC_VERSION, true ); + wp_enqueue_script( 'wc-network-orders', WC()->plugin_url() . '/assets/js/admin/network-orders' . $suffix . '.js', array( 'jquery', 'underscore' ), $version, true ); $user = wp_get_current_user(); $blogs = get_blogs_of_user( $user->ID ); diff --git a/includes/admin/class-wc-admin-exporters.php b/includes/admin/class-wc-admin-exporters.php index be599f7db2d..011d2e1429e 100644 --- a/includes/admin/class-wc-admin-exporters.php +++ b/includes/admin/class-wc-admin-exporters.php @@ -6,6 +6,8 @@ * @version 3.1.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -84,8 +86,9 @@ class WC_Admin_Exporters { * Enqueue scripts. */ public function admin_scripts() { - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - wp_register_script( 'wc-product-export', WC()->plugin_url() . '/assets/js/admin/wc-product-export' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); + $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; + $version = Constants::get_constant( 'WC_VERSION' ); + wp_register_script( 'wc-product-export', WC()->plugin_url() . '/assets/js/admin/wc-product-export' . $suffix . '.js', array( 'jquery' ), $version ); wp_localize_script( 'wc-product-export', 'wc_product_export_params', diff --git a/includes/admin/class-wc-admin-importers.php b/includes/admin/class-wc-admin-importers.php index 65c477e546d..8f85ad27b60 100644 --- a/includes/admin/class-wc-admin-importers.php +++ b/includes/admin/class-wc-admin-importers.php @@ -5,6 +5,8 @@ * @package WooCommerce/Admin */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -81,8 +83,9 @@ class WC_Admin_Importers { * Register importer scripts. */ public function admin_scripts() { - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - wp_register_script( 'wc-product-import', WC()->plugin_url() . '/assets/js/admin/wc-product-import' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true ); + $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; + $version = Constants::get_constant( 'WC_VERSION' ); + wp_register_script( 'wc-product-import', WC()->plugin_url() . '/assets/js/admin/wc-product-import' . $suffix . '.js', array( 'jquery' ), $version, true ); } /** @@ -92,7 +95,7 @@ class WC_Admin_Importers { * If we're on that screen, redirect to the custom one. */ public function product_importer() { - if ( defined( 'WP_LOAD_IMPORTERS' ) ) { + if ( Constants::is_defined( 'WP_LOAD_IMPORTERS' ) ) { wp_safe_redirect( admin_url( 'edit.php?post_type=product&page=product_importer' ) ); exit; } @@ -108,7 +111,7 @@ class WC_Admin_Importers { * Register WordPress based importers. */ public function register_importers() { - if ( defined( 'WP_LOAD_IMPORTERS' ) ) { + if ( Constants::is_defined( 'WP_LOAD_IMPORTERS' ) ) { add_action( 'import_start', array( $this, 'post_importer_compatibility' ) ); register_importer( 'woocommerce_product_csv', __( 'WooCommerce products (CSV)', 'woocommerce' ), __( 'Import products to your store via a csv file.', 'woocommerce' ), array( $this, 'product_importer' ) ); register_importer( 'woocommerce_tax_rate_csv', __( 'WooCommerce tax rates (CSV)', 'woocommerce' ), __( 'Import tax rates to your store via a csv file.', 'woocommerce' ), array( $this, 'tax_rates_importer' ) ); diff --git a/includes/admin/class-wc-admin-meta-boxes.php b/includes/admin/class-wc-admin-meta-boxes.php index 89ec46dd3ae..dd50c90d3a5 100644 --- a/includes/admin/class-wc-admin-meta-boxes.php +++ b/includes/admin/class-wc-admin-meta-boxes.php @@ -7,6 +7,8 @@ * @package WooCommerce/Admin/Meta Boxes */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -188,7 +190,7 @@ class WC_Admin_Meta_Boxes { } // Dont' save meta boxes for revisions or autosaves. - if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) { + if ( Constants::is_true( 'DOING_AUTOSAVE' ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) { return; } diff --git a/includes/admin/class-wc-admin-notices.php b/includes/admin/class-wc-admin-notices.php index 76ba356bd6c..9f4a1869a44 100644 --- a/includes/admin/class-wc-admin-notices.php +++ b/includes/admin/class-wc-admin-notices.php @@ -6,6 +6,8 @@ * @version 3.4.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -34,7 +36,6 @@ class WC_Admin_Notices { 'regenerating_thumbnails' => 'regenerating_thumbnails_notice', 'regenerating_lookup_table' => 'regenerating_lookup_table_notice', 'no_secure_connection' => 'secure_connection_notice', - 'wc_admin' => 'wc_admin_feature_plugin_notice', WC_PHP_MIN_REQUIREMENTS_NOTICE => 'wp_php_min_requirements_notice', 'maxmind_license_key' => 'maxmind_missing_license_key_notice', ); @@ -85,7 +86,6 @@ class WC_Admin_Notices { if ( ! self::is_ssl() ) { self::add_notice( 'no_secure_connection' ); } - self::add_wc_admin_feature_plugin_notice(); self::add_notice( 'template_files' ); self::add_min_version_notice(); self::add_maxmind_missing_license_key_notice(); @@ -166,7 +166,7 @@ class WC_Admin_Notices { return; } - wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/activation.css', WC_PLUGIN_FILE ), array(), WC_VERSION ); + wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/activation.css', WC_PLUGIN_FILE ), array(), Constants::get_constant( 'WC_VERSION' ) ); // Add RTL support. wp_style_add_data( 'woocommerce-activation', 'rtl', 'replace' ); @@ -347,34 +347,6 @@ class WC_Admin_Notices { include dirname( __FILE__ ) . '/views/html-notice-regenerating-lookup-table.php'; } - - /** - * If on WordPress 5.0 or greater, inform users of WooCommerce Admin feature plugin. - * - * @since 3.6.4 - * @todo Remove this notice and associated code once the feature plugin has been merged into core. - */ - public static function add_wc_admin_feature_plugin_notice() { - if ( version_compare( get_bloginfo( 'version' ), '5.0', '>=' ) ) { - self::add_notice( 'wc_admin' ); - } - } - - /** - * Notice to try WooCommerce Admin - * - * @since 3.6.4 - * @todo Remove this notice and associated code once the feature plugin has been merged into core. - */ - public static function wc_admin_feature_plugin_notice() { - if ( get_user_meta( get_current_user_id(), 'dismissed_wc_admin_notice', true ) || class_exists( 'Automattic\WooCommerce\Admin\FeaturePlugin' ) ) { - self::remove_notice( 'wc_admin' ); - return; - } - - include dirname( __FILE__ ) . '/views/html-notice-wc-admin.php'; - } - /** * Add notice about minimum PHP and WordPress requirement. * diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 99d3c6b6ccd..21430ad4fcd 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -6,6 +6,8 @@ * @version 3.3.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -294,7 +296,7 @@ class WC_Admin_Post_Types { */ public function bulk_and_quick_edit_save_post( $post_id, $post ) { // If this is an autosave, our form has not been submitted, so we don't want to do anything. - if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { + if ( Constants::is_true( 'DOING_AUTOSAVE' ) ) { return $post_id; } diff --git a/includes/admin/class-wc-admin-profile.php b/includes/admin/class-wc-admin-profile.php index 5686e3837ee..9aafac10e2d 100644 --- a/includes/admin/class-wc-admin-profile.php +++ b/includes/admin/class-wc-admin-profile.php @@ -71,11 +71,11 @@ if ( ! class_exists( 'WC_Admin_Profile', false ) ) : 'description' => '', ), 'billing_country' => array( - 'label' => __( 'Country', 'woocommerce' ), + 'label' => __( 'Country / Region', 'woocommerce' ), 'description' => '', 'class' => 'js_field-country', 'type' => 'select', - 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(), + 'options' => array( '' => __( 'Select a country / region…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(), ), 'billing_state' => array( 'label' => __( 'State / County', 'woocommerce' ), @@ -131,11 +131,11 @@ if ( ! class_exists( 'WC_Admin_Profile', false ) ) : 'description' => '', ), 'shipping_country' => array( - 'label' => __( 'Country', 'woocommerce' ), + 'label' => __( 'Country / Region', 'woocommerce' ), 'description' => '', 'class' => 'js_field-country', 'type' => 'select', - 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(), + 'options' => array( '' => __( 'Select a country / region…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(), ), 'shipping_state' => array( 'label' => __( 'State / County', 'woocommerce' ), diff --git a/includes/admin/class-wc-admin-settings.php b/includes/admin/class-wc-admin-settings.php index 63587f17fb2..837ffbc8230 100644 --- a/includes/admin/class-wc-admin-settings.php +++ b/includes/admin/class-wc-admin-settings.php @@ -6,6 +6,8 @@ * @version 3.4.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -128,7 +130,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) : public static function output() { global $current_section, $current_tab; - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; do_action( 'woocommerce_settings_start' ); @@ -141,7 +143,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) : 'i18n_nav_warning' => __( 'The changes you made will be lost if you navigate away from this page.', 'woocommerce' ), 'i18n_moved_up' => __( 'Item moved up', 'woocommerce' ), 'i18n_moved_down' => __( 'Item moved down', 'woocommerce' ), - 'i18n_no_specific_countries_selected' => __( 'Selecting no country to sell to prevents from completing the checkout. Continue anyway?', 'woocommerce' ), + 'i18n_no_specific_countries_selected' => __( 'Selecting no country / region to sell to prevents from completing the checkout. Continue anyway?', 'woocommerce' ), ) ); @@ -594,7 +596,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) : - countries->country_dropdown_options( $country, $state ); ?> @@ -619,7 +621,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) : - $val ) { diff --git a/includes/admin/class-wc-admin-setup-wizard.php b/includes/admin/class-wc-admin-setup-wizard.php index d8e00367b09..4d268601f0f 100644 --- a/includes/admin/class-wc-admin-setup-wizard.php +++ b/includes/admin/class-wc-admin-setup-wizard.php @@ -8,6 +8,8 @@ * @version 2.6.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -130,6 +132,16 @@ class WC_Admin_Setup_Wizard { return current_user_can( 'install_plugins' ); } + /** + * Is the WooCommerce Admin actively included in the WooCommerce core? + * Based on presence of a basic WC Admin function. + * + * @return boolean + */ + protected function is_wc_admin_active() { + return function_exists( 'wc_admin_url' ); + } + /** * Should we show the WooCommerce Admin install option? * True only if the user can install plugins, @@ -141,7 +153,7 @@ class WC_Admin_Setup_Wizard { */ protected function should_show_wc_admin() { $wordpress_minimum_met = version_compare( get_bloginfo( 'version' ), $this->wc_admin_plugin_minimum_wordpress_version, '>=' ); - return current_user_can( 'install_plugins' ) && $wordpress_minimum_met; + return current_user_can( 'install_plugins' ) && $wordpress_minimum_met && ! $this->is_wc_admin_active(); } /** @@ -150,7 +162,7 @@ class WC_Admin_Setup_Wizard { * @return boolean */ protected function should_show_wc_admin_onboarding() { - if ( ! $this->should_show_wc_admin() ) { + if ( ! $this->should_show_wc_admin() && ! $this->is_wc_admin_active() ) { return false; } @@ -158,7 +170,7 @@ class WC_Admin_Setup_Wizard { // If it doesn't exist yet, generate it for later use and save it, so we always show the same to this user. if ( ! $ab_test ) { - $ab_test = 1 !== rand( 1, 10 ) ? 'a' : 'b'; // 10% of users. b gets the new experience. + $ab_test = 1 !== rand( 1, 2 ) ? 'a' : 'b'; // 50% of users. b gets the new experience. update_option( 'woocommerce_setup_ab_wc_admin_onboarding', $ab_test ); } @@ -187,11 +199,12 @@ class WC_Admin_Setup_Wizard { public function enqueue_scripts() { // Whether or not there is a pending background install of Jetpack. $pending_jetpack = ! class_exists( 'Jetpack' ) && get_option( 'woocommerce_setup_background_installing_jetpack' ); - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; + $version = Constants::get_constant( 'WC_VERSION' ); wp_register_script( 'jquery-blockui', WC()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true ); wp_register_script( 'selectWoo', WC()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '1.0.6' ); - wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo' ), WC_VERSION ); + wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo' ), $version ); wp_localize_script( 'wc-enhanced-select', 'wc_enhanced_select_params', @@ -211,10 +224,10 @@ class WC_Admin_Setup_Wizard { 'search_customers_nonce' => wp_create_nonce( 'search-customers' ), ) ); - wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION ); - wp_enqueue_style( 'wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array( 'dashicons', 'install' ), WC_VERSION ); + wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), $version ); + wp_enqueue_style( 'wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array( 'dashicons', 'install' ), $version ); - wp_register_script( 'wc-setup', WC()->plugin_url() . '/assets/js/admin/wc-setup' . $suffix . '.js', array( 'jquery', 'wc-enhanced-select', 'jquery-blockui', 'wp-util', 'jquery-tiptip', 'backbone', 'wc-backbone-modal' ), WC_VERSION ); + wp_register_script( 'wc-setup', WC()->plugin_url() . '/assets/js/admin/wc-setup' . $suffix . '.js', array( 'jquery', 'wc-enhanced-select', 'jquery-blockui', 'wp-util', 'jquery-tiptip', 'backbone', 'wc-backbone-modal' ), $version ); wp_localize_script( 'wc-setup', 'wc_setup_params', @@ -475,8 +488,9 @@ class WC_Admin_Setup_Wizard {

- -

+ is_wc_admin_active() ) : ?> +

+ is_wc_admin_active() ) { $this->wc_setup_redirect_to_wc_admin_onboarding(); - exit; } WC_Install::background_installer( @@ -503,25 +514,29 @@ class WC_Admin_Setup_Wizard { ); // The plugin was not successfully installed, so continue with normal setup. - if ( ! function_exists( 'wc_admin_url' ) ) { + if ( ! $this->is_wc_admin_active() ) { wp_safe_redirect( esc_url_raw( $this->get_next_step_link() ) ); exit; } $this->wc_setup_redirect_to_wc_admin_onboarding(); - exit; } /** * Redirects to the onboarding wizard in WooCommerce Admin. */ private function wc_setup_redirect_to_wc_admin_onboarding() { + if ( ! $this->is_wc_admin_active() ) { + return; + } + // Renables the wizard. $profile_updates = array( 'completed' => false ); - $onboarding_data = get_option( 'wc_onboarding_profile', array() ); - update_option( 'wc_onboarding_profile', array_merge( $onboarding_data, $profile_updates ) ); + $onboarding_data = get_option( 'woocommerce_onboarding_profile', array() ); + update_option( 'woocommerce_onboarding_profile', array_merge( $onboarding_data, $profile_updates ) ); - wp_safe_redirect( esc_url_raw( admin_url( 'admin.php?page=wc-admin' ) ) ); + wp_safe_redirect( wc_admin_url( '&enable_onboarding=1' ) ); + exit; } /** @@ -556,7 +571,7 @@ class WC_Admin_Setup_Wizard {
- countries->get_countries() as $code => $label ) : ?> @@ -1279,13 +1294,19 @@ class WC_Admin_Setup_Wizard { // Save chosen shipping method settings (using REST controller for convenience). if ( ! empty( $_POST['shipping_zones']['domestic'][ $domestic_method ] ) ) { // WPCS: input var ok. + + // Sanitize the cost field. + $domestic_cost = wc_clean( wp_unslash( $_POST['shipping_zones']['domestic'][ $domestic_method ] ) ); + $domestic_cost = str_replace( array( get_woocommerce_currency_symbol(), html_entity_decode( get_woocommerce_currency_symbol() ) ), '', $domestic_cost ); + + // Build and make a REST request to save the shipping zone and method set. $request = new WP_REST_Request( 'POST', "/wc/v3/shipping/zones/{$zone_id}/methods" ); $request->add_header( 'Content-Type', 'application/json' ); $request->set_body( wp_json_encode( array( 'method_id' => $domestic_method, - 'settings' => wc_clean( wp_unslash( $_POST['shipping_zones']['domestic'][ $domestic_method ] ) ), + 'settings' => $domestic_cost, ) ) ); @@ -1297,13 +1318,19 @@ class WC_Admin_Setup_Wizard { if ( $setup_intl ) { // Save chosen shipping method settings (using REST controller for convenience). if ( ! empty( $_POST['shipping_zones']['intl'][ $intl_method ] ) ) { // WPCS: input var ok. + + // Sanitize the cost field. + $intl_cost = wc_clean( wp_unslash( $_POST['shipping_zones']['intl'][ $intl_method ] ) ); + $intl_cost = str_replace( array( get_woocommerce_currency_symbol(), html_entity_decode( get_woocommerce_currency_symbol() ) ), '', $intl_cost ); + + // Build and make a REST request to save the shipping zone and method set. $request = new WP_REST_Request( 'POST', '/wc/v3/shipping/zones/0/methods' ); $request->add_header( 'Content-Type', 'application/json' ); $request->set_body( wp_json_encode( array( 'method_id' => $intl_method, - 'settings' => wc_clean( wp_unslash( $_POST['shipping_zones']['intl'][ $intl_method ] ) ), + 'settings' => $intl_cost, ) ) ); diff --git a/includes/admin/class-wc-admin-status.php b/includes/admin/class-wc-admin-status.php index 33b4c3bd676..73d7777e4dc 100644 --- a/includes/admin/class-wc-admin-status.php +++ b/includes/admin/class-wc-admin-status.php @@ -6,6 +6,8 @@ * @version 2.2.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -95,7 +97,9 @@ class WC_Admin_Status { * Show the logs page. */ public static function status_logs() { - if ( defined( 'WC_LOG_HANDLER' ) && 'WC_Log_Handler_DB' === WC_LOG_HANDLER ) { + $log_handler = Constants::get_constant( 'WC_LOG_HANDLER' ); + + if ( 'WC_Log_Handler_DB' === $log_handler ) { self::status_logs_db(); } else { self::status_logs_file(); diff --git a/includes/admin/helper/class-wc-helper-api.php b/includes/admin/helper/class-wc-helper-api.php index a5f159f95b9..d47b64395c9 100644 --- a/includes/admin/helper/class-wc-helper-api.php +++ b/includes/admin/helper/class-wc-helper-api.php @@ -1,4 +1,11 @@ $signature, ); + $url = add_query_arg( + array( + 'token' => $auth['access_token'], + 'signature' => $signature, + ), + $url + ); + return true; } diff --git a/includes/admin/helper/class-wc-helper.php b/includes/admin/helper/class-wc-helper.php index aafd65148ea..42500a0b983 100644 --- a/includes/admin/helper/class-wc-helper.php +++ b/includes/admin/helper/class-wc-helper.php @@ -6,6 +6,8 @@ * @package WooCommerce/Admin */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -468,7 +470,7 @@ class WC_Helper { $wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) ); if ( $wc_screen_id . '_page_wc-addons' === $screen_id && isset( $_GET['section'] ) && 'helper' === $_GET['section'] ) { - wp_enqueue_style( 'woocommerce-helper', WC()->plugin_url() . '/assets/css/helper.css', array(), WC_VERSION ); + wp_enqueue_style( 'woocommerce-helper', WC()->plugin_url() . '/assets/css/helper.css', array(), Constants::get_constant( 'WC_VERSION' ) ); } } @@ -1582,7 +1584,7 @@ class WC_Helper { } $data = $updates->response['woocommerce/woocommerce.php']; - if ( version_compare( WC_VERSION, $data->new_version, '>=' ) ) { + if ( version_compare( Constants::get_constant( 'WC_VERSION' ), $data->new_version, '>=' ) ) { return false; } @@ -1665,7 +1667,7 @@ class WC_Helper { * @param string $level Optional, defaults to info, valid levels: emergency|alert|critical|error|warning|notice|info|debug. */ public static function log( $message, $level = 'info' ) { - if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { + if ( ! Constants::is_true( 'WP_DEBUG' ) ) { return; } diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php index 785a6538b44..62d929b2670 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php @@ -70,11 +70,11 @@ class WC_Meta_Box_Order_Data { 'show' => false, ), 'country' => array( - 'label' => __( 'Country', 'woocommerce' ), + 'label' => __( 'Country / Region', 'woocommerce' ), 'show' => false, 'class' => 'js_field-country select short', 'type' => 'select', - 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(), + 'options' => array( '' => __( 'Select a country / region…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(), ), 'state' => array( 'label' => __( 'State / County', 'woocommerce' ), @@ -122,11 +122,11 @@ class WC_Meta_Box_Order_Data { 'show' => false, ), 'country' => array( - 'label' => __( 'Country', 'woocommerce' ), + 'label' => __( 'Country / Region', 'woocommerce' ), 'show' => false, 'type' => 'select', 'class' => 'js_field-country select short', - 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_shipping_countries(), + 'options' => array( '' => __( 'Select a country / region…', 'woocommerce' ) ) + WC()->countries->get_shipping_countries(), ), 'state' => array( 'label' => __( 'State / County', 'woocommerce' ), diff --git a/includes/admin/meta-boxes/views/html-order-item.php b/includes/admin/meta-boxes/views/html-order-item.php index f0bc8d547d1..73d26d5efcd 100644 --- a/includes/admin/meta-boxes/views/html-order-item.php +++ b/includes/admin/meta-boxes/views/html-order-item.php @@ -116,9 +116,11 @@ $row_class = apply_filters( 'woocommerce_admin_html_order_item_class', ! empt $tax_item_total = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : ''; $tax_item_subtotal = isset( $tax_data['subtotal'][ $tax_item_id ] ) ? $tax_data['subtotal'][ $tax_item_id ] : ''; - $round_at_subtotal = 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' ); - $tax_item_total = wc_round_tax_total( $tax_item_total, $round_at_subtotal ? wc_get_rounding_precision() : null ); - $tax_item_subtotal = wc_round_tax_total( $tax_item_subtotal, $round_at_subtotal ? wc_get_rounding_precision() : null ); + if ( '' !== $tax_item_subtotal ) { + $round_at_subtotal = 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' ); + $tax_item_total = wc_round_tax_total( $tax_item_total, $round_at_subtotal ? wc_get_rounding_precision() : null ); + $tax_item_subtotal = wc_round_tax_total( $tax_item_subtotal, $round_at_subtotal ? wc_get_rounding_precision() : null ); + } ?>
diff --git a/includes/admin/plugin-updates/class-wc-plugin-updates.php b/includes/admin/plugin-updates/class-wc-plugin-updates.php index fc0d70f78a1..3b3d7253096 100644 --- a/includes/admin/plugin-updates/class-wc-plugin-updates.php +++ b/includes/admin/plugin-updates/class-wc-plugin-updates.php @@ -6,6 +6,8 @@ * @version 3.2.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -173,6 +175,10 @@ class WC_Plugin_Updates { /** * Get active plugins that have a tested version lower than the input version. * + * In case of testing major version compatibility and if current WC version is >= major version part + * of the $new_version, no plugins are returned, even if they don't explicitly declare compatibility + * with the $new_version. + * * @param string $new_version WooCommerce version to test against. * @param string $release 'major' or 'minor'. * @return array of plugin info arrays @@ -188,7 +194,7 @@ class WC_Plugin_Updates { } if ( 'major' === $release ) { - $current_version_parts = explode( '.', WC_VERSION ); + $current_version_parts = explode( '.', Constants::get_constant( 'WC_VERSION' ) ); // If user has already moved to the major version, we don't need to flag up anything. if ( version_compare( $current_version_parts[0] . '.' . $current_version_parts[1], $new_version_parts[0] . '.0', '>=' ) ) { diff --git a/includes/admin/plugin-updates/class-wc-plugins-screen-updates.php b/includes/admin/plugin-updates/class-wc-plugins-screen-updates.php index 2b34a24fd4f..f544f408582 100644 --- a/includes/admin/plugin-updates/class-wc-plugins-screen-updates.php +++ b/includes/admin/plugin-updates/class-wc-plugins-screen-updates.php @@ -6,6 +6,8 @@ * @version 3.2.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -45,7 +47,7 @@ class WC_Plugins_Screen_Updates extends WC_Plugin_Updates { $this->major_untested_plugins = $this->get_untested_plugins( $response->new_version, 'major' ); $this->minor_untested_plugins = $this->get_untested_plugins( $response->new_version, 'minor' ); - $current_version_parts = explode( '.', WC_VERSION ); + $current_version_parts = explode( '.', Constants::get_constant( 'WC_VERSION' ) ); $new_version_parts = explode( '.', $this->new_version ); // If user has already moved to the minor version, we don't need to flag up anything. @@ -109,7 +111,7 @@ class WC_Plugins_Screen_Updates extends WC_Plugin_Updates { $upgrade_notice = ''; foreach ( $check_for_notices as $check_version ) { - if ( version_compare( WC_VERSION, $check_version, '>' ) ) { + if ( version_compare( Constants::get_constant( 'WC_VERSION' ), $check_version, '>' ) ) { continue; } diff --git a/includes/admin/settings/class-wc-settings-integrations.php b/includes/admin/settings/class-wc-settings-integrations.php index 5c6ab9e2602..248287f059f 100644 --- a/includes/admin/settings/class-wc-settings-integrations.php +++ b/includes/admin/settings/class-wc-settings-integrations.php @@ -8,6 +8,8 @@ * @version 2.1.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } @@ -41,7 +43,7 @@ if ( ! class_exists( 'WC_Settings_Integrations', false ) ) : $sections = array(); - if ( ! defined( 'WC_INSTALLING' ) ) { + if ( ! Constants::is_defined( 'WC_INSTALLING' ) ) { $integrations = WC()->integrations->get_integrations(); if ( ! $current_section && ! empty( $integrations ) ) { diff --git a/includes/admin/settings/class-wc-settings-shipping.php b/includes/admin/settings/class-wc-settings-shipping.php index b71310034e3..f34eb287011 100644 --- a/includes/admin/settings/class-wc-settings-shipping.php +++ b/includes/admin/settings/class-wc-settings-shipping.php @@ -6,6 +6,8 @@ * @version 2.6.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; if ( class_exists( 'WC_Settings_Shipping', false ) ) { @@ -49,7 +51,7 @@ class WC_Settings_Shipping extends WC_Settings_Page { 'classes' => __( 'Shipping classes', 'woocommerce' ), ); - if ( ! defined( 'WC_INSTALLING' ) ) { + if ( ! Constants::is_defined( 'WC_INSTALLING' ) ) { // Load shipping methods so we can show any global options they may have. $shipping_methods = WC()->shipping()->load_shipping_methods(); diff --git a/includes/admin/views/html-notice-regenerating-lookup-table.php b/includes/admin/views/html-notice-regenerating-lookup-table.php index f4ca01f67fc..8cf8bceb887 100644 --- a/includes/admin/views/html-notice-regenerating-lookup-table.php +++ b/includes/admin/views/html-notice-regenerating-lookup-table.php @@ -5,10 +5,12 @@ * @package WooCommerce/admin */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; $pending_actions_url = admin_url( 'admin.php?page=wc-status&tab=action-scheduler&s=wc_update_product_lookup_tables&status=pending' ); -$cron_disabled = defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON; +$cron_disabled = Constants::is_true( 'DISABLE_WP_CRON' ); $cron_cta = $cron_disabled ? __( 'You can manually run queued updates here.', 'woocommerce' ) : __( 'View progress →', 'woocommerce' ); ?>
diff --git a/includes/admin/views/html-notice-updating.php b/includes/admin/views/html-notice-updating.php index 67980996eb9..82a2ee7904a 100644 --- a/includes/admin/views/html-notice-updating.php +++ b/includes/admin/views/html-notice-updating.php @@ -5,12 +5,14 @@ * @package WooCommerce\Admin */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } $pending_actions_url = admin_url( 'admin.php?page=wc-status&tab=action-scheduler&s=woocommerce_run_update&status=pending' ); -$cron_disabled = defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON; +$cron_disabled = Constants::is_true( 'DISABLE_WP_CRON' ); $cron_cta = $cron_disabled ? __( 'You can manually run queued updates here.', 'woocommerce' ) : __( 'View progress →', 'woocommerce' ); ?>
diff --git a/includes/admin/views/html-notice-wc-admin.php b/includes/admin/views/html-notice-wc-admin.php deleted file mode 100644 index 3924838fdb8..00000000000 --- a/includes/admin/views/html-notice-wc-admin.php +++ /dev/null @@ -1,35 +0,0 @@ - -
- - -

- -

- -

- -

- - -

- -

- -
diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 89483356a05..1dade2307b2 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -6,6 +6,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -62,7 +64,7 @@ class WC_AJAX { header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); header( 'X-Robots-Tag: noindex' ); status_header( 200 ); - } elseif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { + } elseif ( Constants::is_true( 'WP_DEBUG' ) ) { headers_sent( $file, $line ); trigger_error( "wc_ajax_headers cannot set headers - headers already sent by {$file} on line {$line}", E_USER_NOTICE ); // @codingStandardsIgnoreLine } @@ -744,7 +746,7 @@ class WC_AJAX { wp_die(); } - echo esc_html( $data_store->create_all_product_variations( $product, WC_MAX_LINKED_VARIATIONS ) ); + echo esc_html( $data_store->create_all_product_variations( $product, Constants::get_constant( 'WC_MAX_LINKED_VARIATIONS' ) ) ); $data_store->sort_all_product_variations( $product->get_id() ); wp_die(); diff --git a/includes/class-wc-background-emailer.php b/includes/class-wc-background-emailer.php index ecd143647b9..331fa87a27f 100644 --- a/includes/class-wc-background-emailer.php +++ b/includes/class-wc-background-emailer.php @@ -6,6 +6,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; if ( ! class_exists( 'WC_Background_Process', false ) ) { @@ -56,7 +58,7 @@ class WC_Background_Emailer extends WC_Background_Process { try { WC_Emails::send_queued_transactional_email( $callback['filter'], $callback['args'] ); } catch ( Exception $e ) { - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { + if ( Constants::is_true( 'WP_DEBUG' ) ) { trigger_error( 'Transactional email triggered fatal error for callback ' . esc_html( $callback['filter'] ), E_USER_WARNING ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error } } diff --git a/includes/class-wc-countries.php b/includes/class-wc-countries.php index 6e0b0af446c..0b6a107efe0 100644 --- a/includes/class-wc-countries.php +++ b/includes/class-wc-countries.php @@ -661,7 +661,7 @@ class WC_Countries { ), 'country' => array( 'type' => 'country', - 'label' => __( 'Country', 'woocommerce' ), + 'label' => __( 'Country / Region', 'woocommerce' ), 'required' => true, 'class' => array( 'form-row-wide', 'address-field', 'update_totals_on_change' ), 'autocomplete' => 'country', diff --git a/includes/class-wc-discounts.php b/includes/class-wc-discounts.php index aa4f4c2f014..169994cb154 100644 --- a/includes/class-wc-discounts.php +++ b/includes/class-wc-discounts.php @@ -159,7 +159,7 @@ class WC_Discounts { * @since 3.2.0 * @param string $key name of discount row to return. * @param bool $in_cents Should the totals be returned in cents, or without precision. - * @return array + * @return float */ public function get_discount( $key, $in_cents = false ) { $item_discount_totals = $this->get_discounts_by_item( $in_cents ); diff --git a/includes/class-wc-download-handler.php b/includes/class-wc-download-handler.php index 183fcfc9600..d701601d47d 100644 --- a/includes/class-wc-download-handler.php +++ b/includes/class-wc-download-handler.php @@ -31,7 +31,7 @@ class WC_Download_Handler { * Check if we need to download a file and check validity. */ public static function download_product() { - $product_id = absint( $_GET['download_file'] ); // phpcs:ignore WordPress.VIP.SuperGlobalInputUsage.AccessDetected, WordPress.VIP.ValidatedSanitizedInput.InputNotValidated + $product_id = absint( $_GET['download_file'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated $product = wc_get_product( $product_id ); $data_store = WC_Data_Store::load( 'customer-download' ); @@ -44,12 +44,13 @@ class WC_Download_Handler { self::download_error( __( 'Invalid download link.', 'woocommerce' ) ); } + $order_id = wc_get_order_id_by_order_key( wc_clean( wp_unslash( $_GET['order'] ) ) ); // WPCS: input var ok, CSRF ok. + $order = wc_get_order( $order_id ); + if ( isset( $_GET['email'] ) ) { // WPCS: input var ok, CSRF ok. $email_address = wp_unslash( $_GET['email'] ); // WPCS: input var ok, CSRF ok, sanitization ok. } else { // Get email address from order to verify hash. - $order_id = wc_get_order_id_by_order_key( wc_clean( wp_unslash( $_GET['order'] ) ) ); // WPCS: input var ok, CSRF ok. - $order = wc_get_order( $order_id ); $email_address = is_a( $order, 'WC_Order' ) ? $order->get_billing_email() : null; // Prepare email address hash. @@ -79,7 +80,25 @@ class WC_Download_Handler { $download = new WC_Customer_Download( current( $download_ids ) ); - $file_path = $product->get_file_download_path( $download->get_download_id() ); + /** + * Filter download filepath. + * + * @since 4.0.0 + * @param string $file_path File path. + * @param string $email_address Email address. + * @param WC_Order|bool $order Order object or false. + * @param WC_Product $product Product object. + * @param WC_Customer_Download $download Download data. + */ + $file_path = apply_filters( + 'woocommerce_download_product_filepath', + $product->get_file_download_path( $download->get_download_id() ), + $email_address, + $order, + $product, + $download + ); + $parsed_file_path = self::parse_file_path( $file_path ); $download_range = self::get_download_range( @filesize( $parsed_file_path['file_path'] ) ); // @codingStandardsIgnoreLine. @@ -144,7 +163,7 @@ class WC_Download_Handler { * @param WC_Customer_Download $download Download instance. */ private static function check_download_expiry( $download ) { - if ( ! is_null( $download->get_access_expires() ) && $download->get_access_expires()->getTimestamp() < strtotime( 'midnight', current_time( 'timestamp', true ) ) ) { + if ( ! is_null( $download->get_access_expires() ) && $download->get_access_expires()->getTimestamp() < strtotime( 'midnight', time() ) ) { self::download_error( __( 'Sorry, this download has expired', 'woocommerce' ), '', 403 ); } } diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index 8d788128119..3edef5e03f3 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -8,6 +8,8 @@ * @version 2.3.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -175,7 +177,7 @@ class WC_Emails { 'source' => 'transactional-emails', ) ); - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { + if ( Constants::is_true( 'WP_DEBUG' ) ) { trigger_error( $error, E_USER_WARNING ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped, WordPress.PHP.DevelopmentFunctions.error_log_trigger_error } } diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index b403e864c73..3565b642a6b 100644 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -1010,9 +1010,7 @@ class WC_Form_Handler { $user = wp_signon( apply_filters( 'woocommerce_login_credentials', $creds ), is_ssl() ); if ( is_wp_error( $user ) ) { - $message = $user->get_error_message(); - $message = str_replace( '' . esc_html( $creds['user_login'] ) . '', '' . esc_html( $creds['user_login'] ) . '', $message ); - throw new Exception( $message ); + throw new Exception( $user->get_error_message() ); } else { if ( ! empty( $_POST['redirect'] ) ) { diff --git a/includes/class-wc-frontend-scripts.php b/includes/class-wc-frontend-scripts.php index 67ad3dab90d..935f0696803 100644 --- a/includes/class-wc-frontend-scripts.php +++ b/includes/class-wc-frontend-scripts.php @@ -6,6 +6,8 @@ * @version 2.3.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -51,27 +53,29 @@ class WC_Frontend_Scripts { * @return array */ public static function get_styles() { + $version = Constants::get_constant( 'WC_VERSION' ); + return apply_filters( 'woocommerce_enqueue_styles', array( 'woocommerce-layout' => array( 'src' => self::get_asset_url( 'assets/css/woocommerce-layout.css' ), 'deps' => '', - 'version' => WC_VERSION, + 'version' => $version, 'media' => 'all', 'has_rtl' => true, ), 'woocommerce-smallscreen' => array( 'src' => self::get_asset_url( 'assets/css/woocommerce-smallscreen.css' ), 'deps' => 'woocommerce-layout', - 'version' => WC_VERSION, + 'version' => $version, 'media' => 'only screen and (max-width: ' . apply_filters( 'woocommerce_style_smallscreen_breakpoint', '768px' ) . ')', 'has_rtl' => true, ), 'woocommerce-general' => array( 'src' => self::get_asset_url( 'assets/css/woocommerce.css' ), 'deps' => '', - 'version' => WC_VERSION, + 'version' => $version, 'media' => 'all', 'has_rtl' => true, ), @@ -163,7 +167,9 @@ class WC_Frontend_Scripts { * Register all WC scripts. */ private static function register_scripts() { - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; + $version = Constants::get_constant( 'WC_VERSION' ); + $register_scripts = array( 'flexslider' => array( 'src' => self::get_asset_url( 'assets/js/flexslider/jquery.flexslider' . $suffix . '.js' ), @@ -208,7 +214,7 @@ class WC_Frontend_Scripts { 'prettyPhoto-init' => array( // deprecated. 'src' => self::get_asset_url( 'assets/js/prettyPhoto/jquery.prettyPhoto.init' . $suffix . '.js' ), 'deps' => array( 'jquery', 'prettyPhoto' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'select2' => array( 'src' => self::get_asset_url( 'assets/js/select2/select2.full' . $suffix . '.js' ), @@ -223,72 +229,72 @@ class WC_Frontend_Scripts { 'wc-address-i18n' => array( 'src' => self::get_asset_url( 'assets/js/frontend/address-i18n' . $suffix . '.js' ), 'deps' => array( 'jquery', 'wc-country-select' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-add-payment-method' => array( 'src' => self::get_asset_url( 'assets/js/frontend/add-payment-method' . $suffix . '.js' ), 'deps' => array( 'jquery', 'woocommerce' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-cart' => array( 'src' => self::get_asset_url( 'assets/js/frontend/cart' . $suffix . '.js' ), 'deps' => array( 'jquery', 'woocommerce', 'wc-country-select', 'wc-address-i18n' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-cart-fragments' => array( 'src' => self::get_asset_url( 'assets/js/frontend/cart-fragments' . $suffix . '.js' ), 'deps' => array( 'jquery', 'js-cookie' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-checkout' => array( 'src' => self::get_asset_url( 'assets/js/frontend/checkout' . $suffix . '.js' ), 'deps' => array( 'jquery', 'woocommerce', 'wc-country-select', 'wc-address-i18n' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-country-select' => array( 'src' => self::get_asset_url( 'assets/js/frontend/country-select' . $suffix . '.js' ), 'deps' => array( 'jquery' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-credit-card-form' => array( 'src' => self::get_asset_url( 'assets/js/frontend/credit-card-form' . $suffix . '.js' ), 'deps' => array( 'jquery', 'jquery-payment' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-add-to-cart' => array( 'src' => self::get_asset_url( 'assets/js/frontend/add-to-cart' . $suffix . '.js' ), 'deps' => array( 'jquery', 'jquery-blockui' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-add-to-cart-variation' => array( 'src' => self::get_asset_url( 'assets/js/frontend/add-to-cart-variation' . $suffix . '.js' ), 'deps' => array( 'jquery', 'wp-util', 'jquery-blockui' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-geolocation' => array( 'src' => self::get_asset_url( 'assets/js/frontend/geolocation' . $suffix . '.js' ), 'deps' => array( 'jquery' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-lost-password' => array( 'src' => self::get_asset_url( 'assets/js/frontend/lost-password' . $suffix . '.js' ), 'deps' => array( 'jquery', 'woocommerce' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-password-strength-meter' => array( 'src' => self::get_asset_url( 'assets/js/frontend/password-strength-meter' . $suffix . '.js' ), 'deps' => array( 'jquery', 'password-strength-meter' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'wc-single-product' => array( 'src' => self::get_asset_url( 'assets/js/frontend/single-product' . $suffix . '.js' ), 'deps' => array( 'jquery' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'woocommerce' => array( 'src' => self::get_asset_url( 'assets/js/frontend/woocommerce' . $suffix . '.js' ), 'deps' => array( 'jquery', 'jquery-blockui', 'js-cookie' ), - 'version' => WC_VERSION, + 'version' => $version, ), 'zoom' => array( 'src' => self::get_asset_url( 'assets/js/zoom/jquery.zoom' . $suffix . '.js' ), @@ -305,29 +311,31 @@ class WC_Frontend_Scripts { * Register all WC sty;es. */ private static function register_styles() { + $version = Constants::get_constant( 'WC_VERSION' ); + $register_styles = array( 'photoswipe' => array( 'src' => self::get_asset_url( 'assets/css/photoswipe/photoswipe.min.css' ), 'deps' => array(), - 'version' => WC_VERSION, + 'version' => $version, 'has_rtl' => false, ), 'photoswipe-default-skin' => array( 'src' => self::get_asset_url( 'assets/css/photoswipe/default-skin/default-skin.min.css' ), 'deps' => array( 'photoswipe' ), - 'version' => WC_VERSION, + 'version' => $version, 'has_rtl' => false, ), 'select2' => array( 'src' => self::get_asset_url( 'assets/css/select2.css' ), 'deps' => array(), - 'version' => WC_VERSION, + 'version' => $version, 'has_rtl' => false, ), 'woocommerce_prettyPhoto_css' => array( // deprecated. 'src' => self::get_asset_url( 'assets/css/prettyPhoto.css' ), 'deps' => array(), - 'version' => WC_VERSION, + 'version' => $version, 'has_rtl' => true, ), ); @@ -513,7 +521,7 @@ class WC_Frontend_Scripts { 'option_guest_checkout' => get_option( 'woocommerce_enable_guest_checkout' ), 'checkout_url' => WC_AJAX::get_endpoint( 'checkout' ), 'is_checkout' => is_checkout() && empty( $wp->query_vars['order-pay'] ) && ! isset( $wp->query_vars['order-received'] ) ? 1 : 0, - 'debug_mode' => defined( 'WP_DEBUG' ) && WP_DEBUG, + 'debug_mode' => Constants::is_true( 'WP_DEBUG' ), 'i18n_checkout_error' => esc_attr__( 'Error processing checkout. Please try again.', 'woocommerce' ), ); break; diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index fba3c6263e4..266bbf2e566 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -6,6 +6,8 @@ * @version 3.0.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -140,6 +142,11 @@ class WC_Install { 'wc_update_390_change_geolocation_database_update_cron', 'wc_update_390_db_version', ), + '4.0.0' => array( + 'wc_update_product_lookup_tables', + 'wc_update_400_increase_size_of_column', + 'wc_update_400_db_version', + ), ); /** @@ -162,7 +169,7 @@ class WC_Install { * This check is done on all requests and runs if the versions do not match. */ public static function check_version() { - if ( ! defined( 'IFRAME_REQUEST' ) && version_compare( get_option( 'woocommerce_version' ), WC()->version, '<' ) ) { + if ( ! Constants::is_defined( 'IFRAME_REQUEST' ) && version_compare( get_option( 'woocommerce_version' ), WC()->version, '<' ) ) { self::install(); do_action( 'woocommerce_updated' ); } @@ -422,7 +429,7 @@ class WC_Install { * @return array */ public static function cron_schedules( $schedules ) { - $schedules['monthly'] = array( + $schedules['monthly'] = array( 'interval' => 2635200, 'display' => __( 'Monthly', 'woocommerce' ), ); @@ -895,14 +902,16 @@ CREATE TABLE {$wpdb->prefix}wc_product_meta_lookup ( `sku` varchar(100) NULL default '', `virtual` tinyint(1) NULL default 0, `downloadable` tinyint(1) NULL default 0, - `min_price` decimal(10,2) NULL default NULL, - `max_price` decimal(10,2) NULL default NULL, + `min_price` decimal(19,4) NULL default NULL, + `max_price` decimal(19,4) NULL default NULL, `onsale` tinyint(1) NULL default 0, `stock_quantity` double NULL default NULL, `stock_status` varchar(100) NULL default 'instock', `rating_count` bigint(20) NULL default 0, `average_rating` decimal(3,2) NULL default 0.00, `total_sales` bigint(20) NULL default 0, + `tax_status` varchar(100) NULL default 'taxable', + `tax_class` varchar(100) NULL default '', PRIMARY KEY (`product_id`), KEY `virtual` (`virtual`), KEY `downloadable` (`downloadable`), diff --git a/includes/class-wc-logger.php b/includes/class-wc-logger.php index 9f0a68e22c6..41bb7f6db2e 100644 --- a/includes/class-wc-logger.php +++ b/includes/class-wc-logger.php @@ -7,6 +7,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -61,12 +63,16 @@ class WC_Logger implements WC_Logger_Interface { } } + // Support the constant as long as a valid log level has been set for it. + if ( null === $threshold ) { + $threshold = Constants::get_constant( 'WC_LOG_THRESHOLD' ); + if ( null !== $threshold && ! WC_Log_Levels::is_valid_level( $threshold ) ) { + $threshold = null; + } + } + if ( null !== $threshold ) { $threshold = WC_Log_Levels::get_level_severity( $threshold ); - } elseif ( defined( 'WC_LOG_THRESHOLD' ) && WC_Log_Levels::is_valid_level( WC_LOG_THRESHOLD ) ) { - $threshold = WC_Log_Levels::get_level_severity( WC_LOG_THRESHOLD ); - } else { - $threshold = null; } $this->handlers = $register_handlers; diff --git a/includes/class-wc-order.php b/includes/class-wc-order.php index 76ed86f5d79..b2ab190c506 100644 --- a/includes/class-wc-order.php +++ b/includes/class-wc-order.php @@ -2059,4 +2059,15 @@ class WC_Order extends WC_Abstract_Order { return apply_filters( 'woocommerce_get_order_item_totals', $total_rows, $this, $tax_display ); } + + /** + * Check if order has been created via admin, checkout, or in another way. + * + * @since 4.0.0 + * @param string $modus Way of creating the order to test for. + * @return bool + */ + public function is_created_via( $modus ) { + return apply_filters( 'woocommerce_order_is_created_via', $modus === $this->get_created_via(), $this, $modus ); + } } diff --git a/includes/class-wc-privacy-erasers.php b/includes/class-wc-privacy-erasers.php index 79cdf700108..463e236b524 100644 --- a/includes/class-wc-privacy-erasers.php +++ b/includes/class-wc-privacy-erasers.php @@ -51,7 +51,7 @@ class WC_Privacy_Erasers { 'billing_city' => __( 'Billing City', 'woocommerce' ), 'billing_postcode' => __( 'Billing Postal/Zip Code', 'woocommerce' ), 'billing_state' => __( 'Billing State', 'woocommerce' ), - 'billing_country' => __( 'Billing Country', 'woocommerce' ), + 'billing_country' => __( 'Billing Country / Region', 'woocommerce' ), 'billing_phone' => __( 'Phone Number', 'woocommerce' ), 'billing_email' => __( 'Email Address', 'woocommerce' ), 'shipping_first_name' => __( 'Shipping First Name', 'woocommerce' ), @@ -62,7 +62,7 @@ class WC_Privacy_Erasers { 'shipping_city' => __( 'Shipping City', 'woocommerce' ), 'shipping_postcode' => __( 'Shipping Postal/Zip Code', 'woocommerce' ), 'shipping_state' => __( 'Shipping State', 'woocommerce' ), - 'shipping_country' => __( 'Shipping Country', 'woocommerce' ), + 'shipping_country' => __( 'Shipping Country / Region', 'woocommerce' ), ), $customer ); diff --git a/includes/class-wc-privacy-exporters.php b/includes/class-wc-privacy-exporters.php index 528eeba8bdc..7d519c2f0a1 100644 --- a/includes/class-wc-privacy-exporters.php +++ b/includes/class-wc-privacy-exporters.php @@ -186,7 +186,7 @@ class WC_Privacy_Exporters { 'billing_city' => __( 'Billing City', 'woocommerce' ), 'billing_postcode' => __( 'Billing Postal/Zip Code', 'woocommerce' ), 'billing_state' => __( 'Billing State', 'woocommerce' ), - 'billing_country' => __( 'Billing Country', 'woocommerce' ), + 'billing_country' => __( 'Billing Country / Region', 'woocommerce' ), 'billing_phone' => __( 'Phone Number', 'woocommerce' ), 'billing_email' => __( 'Email Address', 'woocommerce' ), 'shipping_first_name' => __( 'Shipping First Name', 'woocommerce' ), @@ -197,7 +197,7 @@ class WC_Privacy_Exporters { 'shipping_city' => __( 'Shipping City', 'woocommerce' ), 'shipping_postcode' => __( 'Shipping Postal/Zip Code', 'woocommerce' ), 'shipping_state' => __( 'Shipping State', 'woocommerce' ), - 'shipping_country' => __( 'Shipping Country', 'woocommerce' ), + 'shipping_country' => __( 'Shipping Country / Region', 'woocommerce' ), ), $customer ); diff --git a/includes/class-wc-privacy.php b/includes/class-wc-privacy.php index 7da793de07e..516b24ff638 100644 --- a/includes/class-wc-privacy.php +++ b/includes/class-wc-privacy.php @@ -344,7 +344,7 @@ class WC_Privacy extends WC_Abstract_Privacy { 'Subscriber', ) ), - 'meta_query' => array( + 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query 'relation' => 'AND', array( 'key' => 'wc_last_active', @@ -365,6 +365,10 @@ class WC_Privacy extends WC_Abstract_Privacy { $user_ids = $user_query->get_results(); if ( $user_ids ) { + if ( ! function_exists( 'wp_delete_user' ) ) { + require_once ABSPATH . 'wp-admin/includes/user.php'; + } + foreach ( $user_ids as $user_id ) { wp_delete_user( $user_id ); $count ++; diff --git a/includes/class-wc-session-handler.php b/includes/class-wc-session-handler.php index 0818329a7c2..689e61e083e 100644 --- a/includes/class-wc-session-handler.php +++ b/includes/class-wc-session-handler.php @@ -10,6 +10,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -316,7 +318,7 @@ class WC_Session_Handler extends WC_Session { public function get_session( $customer_id, $default = false ) { global $wpdb; - if ( defined( 'WP_SETUP_CONFIG' ) ) { + if ( Constants::is_defined( 'WP_SETUP_CONFIG' ) ) { return false; } diff --git a/includes/class-wc-shipping.php b/includes/class-wc-shipping.php index ef2bfe08ed3..81355da7583 100644 --- a/includes/class-wc-shipping.php +++ b/includes/class-wc-shipping.php @@ -8,6 +8,8 @@ * @package WooCommerce/Classes/Shipping */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -163,7 +165,7 @@ class WC_Shipping { $matched_zone_notice = sprintf( __( 'Customer matched zone "%s"', 'woocommerce' ), $shipping_zone->get_zone_name() ); // Debug output. - if ( $debug_mode && ! defined( 'WOOCOMMERCE_CHECKOUT' ) && ! defined( 'WC_DOING_AJAX' ) && ! wc_has_notice( $matched_zone_notice ) ) { + if ( $debug_mode && ! Constants::is_defined( 'WOOCOMMERCE_CHECKOUT' ) && ! Constants::is_defined( 'WC_DOING_AJAX' ) && ! wc_has_notice( $matched_zone_notice ) ) { wc_add_notice( $matched_zone_notice ); } } else { diff --git a/includes/class-wc-tracker.php b/includes/class-wc-tracker.php index 372bf1aeb25..102ce0c376b 100644 --- a/includes/class-wc-tracker.php +++ b/includes/class-wc-tracker.php @@ -10,6 +10,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -38,7 +40,7 @@ class WC_Tracker { */ public static function send_tracking_data( $override = false ) { // Don't trigger this on AJAX Requests. - if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + if ( Constants::is_true( 'DOING_AJAX' ) ) { return; } @@ -109,7 +111,7 @@ class WC_Tracker { $data['inactive_plugins'] = $all_plugins['inactive_plugins']; // Jetpack & WooCommerce Connect. - $data['jetpack_version'] = defined( 'JETPACK__VERSION' ) ? JETPACK__VERSION : 'none'; + $data['jetpack_version'] = Constants::is_defined( 'JETPACK__VERSION' ) ? Constants::get_constant( 'JETPACK__VERSION' ) : 'none'; $data['jetpack_connected'] = ( class_exists( 'Jetpack' ) && is_callable( 'Jetpack::is_active' ) && Jetpack::is_active() ) ? 'yes' : 'no'; $data['jetpack_is_staging'] = ( class_exists( 'Jetpack' ) && is_callable( 'Jetpack::is_staging_site' ) && Jetpack::is_staging_site() ) ? 'yes' : 'no'; $data['connect_installed'] = class_exists( 'WC_Connect_Loader' ) ? 'yes' : 'no'; diff --git a/includes/class-wc-webhook.php b/includes/class-wc-webhook.php index f5b7f1294f2..36e4cbbd66c 100644 --- a/includes/class-wc-webhook.php +++ b/includes/class-wc-webhook.php @@ -11,6 +11,8 @@ * @since 2.2.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; require_once 'legacy/class-wc-legacy-webhook.php'; @@ -297,7 +299,7 @@ class WC_Webhook extends WC_Legacy_Webhook { 'redirection' => 0, 'httpversion' => '1.0', 'blocking' => true, - 'user-agent' => sprintf( 'WooCommerce/%s Hookshot (WordPress/%s)', WC_VERSION, $GLOBALS['wp_version'] ), + 'user-agent' => sprintf( 'WooCommerce/%s Hookshot (WordPress/%s)', Constants::get_constant( 'WC_VERSION' ), $GLOBALS['wp_version'] ), 'body' => trim( wp_json_encode( $payload ) ), 'headers' => array( 'Content-Type' => 'application/json', @@ -531,7 +533,7 @@ class WC_Webhook extends WC_Legacy_Webhook { 'Body' => $response_body, ); - if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { + if ( ! Constants::is_true( 'WP_DEBUG' ) ) { $message['Webhook Delivery']['Body'] = 'Webhook body is not logged unless WP_DEBUG mode is turned on. This is to avoid the storing of personal data in the logs.'; $message['Webhook Delivery']['Response']['Body'] = 'Webhook body is not logged unless WP_DEBUG mode is turned on. This is to avoid the storing of personal data in the logs.'; } @@ -610,7 +612,7 @@ class WC_Webhook extends WC_Legacy_Webhook { */ public function deliver_ping() { $args = array( - 'user-agent' => sprintf( 'WooCommerce/%s Hookshot (WordPress/%s)', WC_VERSION, $GLOBALS['wp_version'] ), + 'user-agent' => sprintf( 'WooCommerce/%s Hookshot (WordPress/%s)', Constants::get_constant( 'WC_VERSION' ), $GLOBALS['wp_version'] ), 'body' => 'webhook_id=' . $this->get_id(), ); diff --git a/includes/class-woocommerce.php b/includes/class-woocommerce.php index ffda8fe009c..5b82d904f66 100644 --- a/includes/class-woocommerce.php +++ b/includes/class-woocommerce.php @@ -6,6 +6,8 @@ * @since 3.2.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -20,7 +22,7 @@ final class WooCommerce { * * @var string */ - public $version = '3.9.0'; + public $version = '4.0.0-dev'; /** * The single instance of the class. @@ -297,11 +299,11 @@ final class WooCommerce { case 'admin': return is_admin(); case 'ajax': - return defined( 'DOING_AJAX' ); + return Constants::is_defined( 'DOING_AJAX' ); case 'cron': - return defined( 'DOING_CRON' ); + return Constants::is_defined( 'DOING_CRON' ); case 'frontend': - return ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) && ! $this->is_rest_api_request(); + return ( ! is_admin() || Constants::is_defined( 'DOING_AJAX' ) ) && ! Constants::is_defined( 'DOING_CRON' ) && ! $this->is_rest_api_request(); } } @@ -446,11 +448,11 @@ final class WooCommerce { include_once WC_ABSPATH . 'includes/wccom-site/class-wc-wccom-site.php'; /** - * Libraries + * Libraries and packages. */ - include_once WC_ABSPATH . 'includes/libraries/action-scheduler/action-scheduler.php'; + include_once WC_ABSPATH . 'packages/action-scheduler/action-scheduler.php'; - if ( defined( 'WP_CLI' ) && WP_CLI ) { + if ( Constants::is_true( 'WP_CLI' ) ) { include_once WC_ABSPATH . 'includes/class-wc-cli.php'; } diff --git a/includes/cli/class-wc-cli-rest-command.php b/includes/cli/class-wc-cli-rest-command.php index ad15172198b..0e8eb2a81c9 100644 --- a/includes/cli/class-wc-cli-rest-command.php +++ b/includes/cli/class-wc-cli-rest-command.php @@ -5,6 +5,8 @@ * @package WooCommerce\Cli */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -286,11 +288,11 @@ class WC_CLI_REST_Command { $request->set_param( $key, $value ); } } - if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) { + if ( Constants::is_true( 'SAVEQUERIES' ) ) { $original_queries = is_array( $GLOBALS['wpdb']->queries ) ? array_keys( $GLOBALS['wpdb']->queries ) : array(); } $response = rest_do_request( $request ); - if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) { + if ( Constants::is_true( 'SAVEQUERIES' ) ) { $performed_queries = array(); foreach ( (array) $GLOBALS['wpdb']->queries as $key => $query ) { if ( in_array( $key, $original_queries, true ) ) { diff --git a/includes/data-stores/abstract-wc-order-data-store-cpt.php b/includes/data-stores/abstract-wc-order-data-store-cpt.php index 18f60caa5b7..687562d8417 100644 --- a/includes/data-stores/abstract-wc-order-data-store-cpt.php +++ b/includes/data-stores/abstract-wc-order-data-store-cpt.php @@ -5,6 +5,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -54,7 +56,7 @@ abstract class Abstract_WC_Order_Data_Store_CPT extends WC_Data_Store_WP impleme * @param WC_Order $order Order object. */ public function create( &$order ) { - $order->set_version( WC_VERSION ); + $order->set_version( Constants::get_constant( 'WC_VERSION' ) ); $order->set_date_created( time() ); $order->set_currency( $order->get_currency() ? $order->get_currency() : get_woocommerce_currency() ); @@ -131,7 +133,7 @@ abstract class Abstract_WC_Order_Data_Store_CPT extends WC_Data_Store_WP impleme */ public function update( &$order ) { $order->save_meta_data(); - $order->set_version( WC_VERSION ); + $order->set_version( Constants::get_constant( 'WC_VERSION' ) ); if ( null === $order->get_date_created( 'edit' ) ) { $order->set_date_created( time() ); diff --git a/includes/data-stores/class-wc-product-data-store-cpt.php b/includes/data-stores/class-wc-product-data-store-cpt.php index 9d951bd4a90..28eb05aae9d 100644 --- a/includes/data-stores/class-wc-product-data-store-cpt.php +++ b/includes/data-stores/class-wc-product-data-store-cpt.php @@ -5,6 +5,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -644,7 +646,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da } } - if ( array_intersect( $this->updated_props, array( 'sku', 'regular_price', 'sale_price', 'date_on_sale_from', 'date_on_sale_to', 'total_sales', 'average_rating', 'stock_quantity', 'stock_status', 'manage_stock', 'downloadable', 'virtual' ) ) ) { + if ( array_intersect( $this->updated_props, array( 'sku', 'regular_price', 'sale_price', 'date_on_sale_from', 'date_on_sale_to', 'total_sales', 'average_rating', 'stock_quantity', 'stock_status', 'manage_stock', 'downloadable', 'virtual', 'tax_status', 'tax_class' ) ) ) { $this->update_lookup_table( $product->get_id(), 'wc_product_meta_lookup' ); } @@ -823,7 +825,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da $new_type = $product->get_type(); wp_set_object_terms( $product->get_id(), $new_type, 'product_type' ); - update_post_meta( $product->get_id(), '_product_version', WC_VERSION ); + update_post_meta( $product->get_id(), '_product_version', Constants::get_constant( 'WC_VERSION' ) ); // Action for the transition. if ( $old_type !== $new_type ) { @@ -2033,6 +2035,8 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da 'rating_count' => array_sum( (array) get_post_meta( $id, '_wc_rating_count', true ) ), 'average_rating' => get_post_meta( $id, '_wc_average_rating', true ), 'total_sales' => get_post_meta( $id, 'total_sales', true ), + 'tax_status' => get_post_meta( $id, '_tax_status', true ), + 'tax_class' => get_post_meta( $id, '_tax_class', true ), ); } return array(); diff --git a/includes/data-stores/class-wc-product-variation-data-store-cpt.php b/includes/data-stores/class-wc-product-variation-data-store-cpt.php index a4d4071273a..2dd1d116678 100644 --- a/includes/data-stores/class-wc-product-variation-data-store-cpt.php +++ b/includes/data-stores/class-wc-product-variation-data-store-cpt.php @@ -5,6 +5,8 @@ * @package WooCommerce\DataStores */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -333,7 +335,7 @@ class WC_Product_Variation_Data_Store_CPT extends WC_Product_Data_Store_CPT impl */ protected function update_version_and_type( &$product ) { wp_set_object_terms( $product->get_id(), '', 'product_type' ); - update_post_meta( $product->get_id(), '_product_version', WC_VERSION ); + update_post_meta( $product->get_id(), '_product_version', Constants::get_constant( 'WC_VERSION' ) ); } /** diff --git a/includes/gateways/paypal/class-wc-gateway-paypal.php b/includes/gateways/paypal/class-wc-gateway-paypal.php index 82e4d3ef6a6..03d7972e7bd 100644 --- a/includes/gateways/paypal/class-wc-gateway-paypal.php +++ b/includes/gateways/paypal/class-wc-gateway-paypal.php @@ -10,6 +10,8 @@ * @package WooCommerce/Classes/Payment */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -68,11 +70,10 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { $this->description = trim( $this->description ); } - add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); add_action( 'woocommerce_order_status_processing', array( $this, 'capture_payment' ) ); add_action( 'woocommerce_order_status_completed', array( $this, 'capture_payment' ) ); - add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'order_received_text' ), 10, 2 ); + add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); if ( ! $this->is_valid_for_use() ) { $this->enabled = 'no'; @@ -85,6 +86,10 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { new WC_Gateway_Paypal_PDT_Handler( $this->testmode, $this->identity_token ); } } + + if ( 'yes' === $this->enabled ) { + add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'order_received_text' ), 10, 2 ); + } } /** @@ -250,7 +255,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { } /** - * Check if this gateway is enabled and available in the user's country. + * Check if this gateway is available in the user's country based on currency. * * @return bool */ @@ -447,9 +452,10 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { return; } - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; + $version = Constants::get_constant( 'WC_VERSION' ); - wp_enqueue_script( 'woocommerce_paypal_admin', WC()->plugin_url() . '/includes/gateways/paypal/assets/js/paypal-admin' . $suffix . '.js', array(), WC_VERSION, true ); + wp_enqueue_script( 'woocommerce_paypal_admin', WC()->plugin_url() . '/includes/gateways/paypal/assets/js/paypal-admin' . $suffix . '.js', array(), $version, true ); } /** @@ -461,7 +467,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { * @return string */ public function order_received_text( $text, $order ) { - if ( $this->id === $order->get_payment_method() ) { + if ( $order && $this->id === $order->get_payment_method() ) { return esc_html__( 'Thank you for your payment. Your transaction has been completed, and a receipt for your purchase has been emailed to you. Log into your PayPal account to view transaction details.', 'woocommerce' ); } diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php index d8ead0f5faf..c37d4d1462e 100644 --- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php +++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php @@ -5,6 +5,8 @@ * @package WooCommerce\Gateways */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -51,7 +53,7 @@ class WC_Gateway_Paypal_PDT_Handler extends WC_Gateway_Paypal_Response { ), 'timeout' => 60, 'httpversion' => '1.1', - 'user-agent' => 'WooCommerce/' . WC_VERSION, + 'user-agent' => 'WooCommerce/' . Constants::get_constant( 'WC_VERSION' ), ); // Post back to get a response. diff --git a/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-geolocation.php b/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-geolocation.php index 6dda09fc7ca..80a338ea2b8 100644 --- a/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-geolocation.php +++ b/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-geolocation.php @@ -29,7 +29,7 @@ class WC_Integration_MaxMind_Geolocation extends WC_Integration { */ public function __construct() { $this->id = 'maxmind_geolocation'; - $this->method_title = __( 'WooCommerce MaxMind Geolocation', 'woocommerce' ); + $this->method_title = __( 'MaxMind Geolocation', 'woocommerce' ); $this->method_description = __( 'An integration for utilizing MaxMind to do Geolocation lookups. Please note that this integration will only do country lookups.', 'woocommerce' ); /** diff --git a/includes/libraries/action-scheduler/README.md b/includes/libraries/action-scheduler/README.md deleted file mode 100644 index e2ea559ebdb..00000000000 --- a/includes/libraries/action-scheduler/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Action Scheduler - Job Queue for WordPress [![Build Status](https://travis-ci.org/Prospress/action-scheduler.png?branch=master)](https://travis-ci.org/Prospress/action-scheduler) [![codecov](https://codecov.io/gh/Prospress/action-scheduler/branch/master/graph/badge.svg)](https://codecov.io/gh/Prospress/action-scheduler) - -Action Scheduler is a scalable, traceable job queue for background processing large sets of actions in WordPress. It's specially designed to be distributed in WordPress plugins. - -Action Scheduler works by triggering an action hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occassions. - -Think of it like an extension to `do_action()` which adds the ability to delay and repeat a hook. - -## Battle-Tested Background Processing - -Every month, Action Scheduler processes millions of payments for [Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/), webhooks for [WooCommerce](https://wordpress.org/plugins/woocommerce/), as well as emails and other events for a range of other plugins. - -It's been seen on live sites processing queues in excess of 50,000 jobs and doing resource intensive operations, like processing payments and creating orders, at a sustained rate of over 10,000 / hour without negatively impacting normal site operations. - -This is all on infrastructure and WordPress sites outside the control of the plugin author. - -If your plugin needs background processing, especially of large sets of tasks, Action Scheduler can help. - -## Learn More - -To learn more about how to Action Scheduler works, and how to use it in your plugin, check out the docs on [ActionScheduler.org](https://actionscheduler.org). - -There you will find: - -* [Usage guide](https://actionscheduler.org/usage/): instructions on installing and using Action Scheduler -* [WP CLI guide](https://actionscheduler.org/wp-cli/): instructions on running Action Scheduler at scale via WP CLI -* [API Reference](https://actionscheduler.org/api/): complete reference guide for all API functions -* [Administration Guide](https://actionscheduler.org/admin/): guide to managing scheduled actions via the administration screen -* [Guide to Background Processing at Scale](https://actionscheduler.org/perf/): instructions for running Action Scheduler at scale via the default WP Cron queue runner - -## Credits - -Action Scheduler is developed and maintained by [Prospress](http://prospress.com/) in collaboration with [Flightless](https://flightless.us/). - -Collaboration is cool. We'd love to work with you to improve Action Scheduler. [Pull Requests](https://github.com/prospress/action-scheduler/pulls) welcome. - ---- - -

- -

diff --git a/includes/libraries/action-scheduler/action-scheduler.php b/includes/libraries/action-scheduler/action-scheduler.php deleted file mode 100644 index 4f69fbba869..00000000000 --- a/includes/libraries/action-scheduler/action-scheduler.php +++ /dev/null @@ -1,47 +0,0 @@ -. - * - */ - -if ( ! function_exists( 'action_scheduler_register_2_dot_2_dot_5' ) ) { - - if ( ! class_exists( 'ActionScheduler_Versions' ) ) { - require_once( 'classes/ActionScheduler_Versions.php' ); - add_action( 'plugins_loaded', array( 'ActionScheduler_Versions', 'initialize_latest_version' ), 1, 0 ); - } - - add_action( 'plugins_loaded', 'action_scheduler_register_2_dot_2_dot_5', 0, 0 ); - - function action_scheduler_register_2_dot_2_dot_5() { - $versions = ActionScheduler_Versions::instance(); - $versions->register( '2.2.5', 'action_scheduler_initialize_2_dot_2_dot_5' ); - } - - function action_scheduler_initialize_2_dot_2_dot_5() { - require_once( 'classes/ActionScheduler.php' ); - ActionScheduler::init( __FILE__ ); - } - -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler.php b/includes/libraries/action-scheduler/classes/ActionScheduler.php deleted file mode 100644 index 2c5d0315ebb..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler.php +++ /dev/null @@ -1,133 +0,0 @@ - value pair. The - * key must much the table column name and the value is the label, which is - * automatically translated. - */ - protected $columns = array(); - - /** - * Defines the row-actions. It expects an array where the key - * is the column name and the value is an array of actions. - * - * The array of actions are key => value, where key is the method name - * (with the prefix row_action_) and the value is the label - * and title. - */ - protected $row_actions = array(); - - /** - * The Primary key of our table - */ - protected $ID = 'ID'; - - /** - * Enables sorting, it expects an array - * of columns (the column names are the values) - */ - protected $sort_by = array(); - - protected $filter_by = array(); - - /** - * @var array The status name => count combinations for this table's items. Used to display status filters. - */ - protected $status_counts = array(); - - /** - * @var array Notices to display when loading the table. Array of arrays of form array( 'class' => {updated|error}, 'message' => 'This is the notice text display.' ). - */ - protected $admin_notices = array(); - - /** - * @var string Localised string displayed in the

element above the able. - */ - protected $table_header; - - /** - * Enables bulk actions. It must be an array where the key is the action name - * and the value is the label (which is translated automatically). It is important - * to notice that it will check that the method exists (`bulk_$name`) and will throw - * an exception if it does not exists. - * - * This class will automatically check if the current request has a bulk action, will do the - * validations and afterwards will execute the bulk method, with two arguments. The first argument - * is the array with primary keys, the second argument is a string with a list of the primary keys, - * escaped and ready to use (with `IN`). - */ - protected $bulk_actions = array(); - - /** - * Makes translation easier, it basically just wraps - * `_x` with some default (the package name) - */ - protected function translate( $text, $context = '' ) { - return $text; - } - - /** - * Reads `$this->bulk_actions` and returns an array that WP_List_Table understands. It - * also validates that the bulk method handler exists. It throws an exception because - * this is a library meant for developers and missing a bulk method is a development-time error. - */ - protected function get_bulk_actions() { - $actions = array(); - - foreach ( $this->bulk_actions as $action => $label ) { - if ( ! is_callable( array( $this, 'bulk_' . $action ) ) ) { - throw new RuntimeException( "The bulk action $action does not have a callback method" ); - } - - $actions[ $action ] = $this->translate( $label ); - } - - return $actions; - } - - /** - * Checks if the current request has a bulk action. If that is the case it will validate and will - * execute the bulk method handler. Regardless if the action is valid or not it will redirect to - * the previous page removing the current arguments that makes this request a bulk action. - */ - protected function process_bulk_action() { - global $wpdb; - // Detect when a bulk action is being triggered. - $action = $this->current_action(); - - if ( ! $action ) { - return; - } - - check_admin_referer( 'bulk-' . $this->_args['plural'] ); - - $method = 'bulk_' . $action; - if ( array_key_exists( $action, $this->bulk_actions ) && is_callable( array( $this, $method ) ) && ! empty( $_GET['ID'] ) && is_array( $_GET['ID'] ) ) { - $ids_sql = '(' . implode( ',', array_fill( 0, count( $_GET['ID'] ), '%s' ) ) . ')'; - $this->$method( $_GET['ID'], $wpdb->prepare( $ids_sql, $_GET['ID'] ) ); - } - - wp_redirect( remove_query_arg( - array( '_wp_http_referer', '_wpnonce', 'ID', 'action', 'action2' ), - wp_unslash( $_SERVER['REQUEST_URI'] ) - ) ); - exit; - } - - /** - * Default code for deleting entries. We trust ids_sql because it is - * validated already by process_bulk_action() - */ - protected function bulk_delete( array $ids, $ids_sql ) { - global $wpdb; - - $wpdb->query( "DELETE FROM {$this->table_name} WHERE {$this->ID} IN $ids_sql" ); - } - - /** - * Prepares the _column_headers property which is used by WP_Table_List at rendering. - * It merges the columns and the sortable columns. - */ - protected function prepare_column_headers() { - $this->_column_headers = array( - $this->get_columns(), - array(), - $this->get_sortable_columns(), - ); - } - - /** - * Reads $this->sort_by and returns the columns name in a format that WP_Table_List - * expects - */ - public function get_sortable_columns() { - $sort_by = array(); - foreach ( $this->sort_by as $column ) { - $sort_by[ $column ] = array( $column, true ); - } - return $sort_by; - } - - /** - * Returns the columns names for rendering. It adds a checkbox for selecting everything - * as the first column - */ - public function get_columns() { - $columns = array_merge( - array( 'cb' => '' ), - array_map( array( $this, 'translate' ), $this->columns ) - ); - - return $columns; - } - - /** - * Get prepared LIMIT clause for items query - * - * @global wpdb $wpdb - * - * @return string Prepared LIMIT clause for items query. - */ - protected function get_items_query_limit() { - global $wpdb; - - $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page ); - return $wpdb->prepare( 'LIMIT %d', $per_page ); - } - - /** - * Returns the number of items to offset/skip for this current view. - * - * @return int - */ - protected function get_items_offset() { - $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page ); - $current_page = $this->get_pagenum(); - if ( 1 < $current_page ) { - $offset = $per_page * ( $current_page - 1 ); - } else { - $offset = 0; - } - - return $offset; - } - - /** - * Get prepared OFFSET clause for items query - * - * @global wpdb $wpdb - * - * @return string Prepared OFFSET clause for items query. - */ - protected function get_items_query_offset() { - global $wpdb; - - return $wpdb->prepare( 'OFFSET %d', $this->get_items_offset() ); - } - - /** - * Prepares the ORDER BY sql statement. It uses `$this->sort_by` to know which - * columns are sortable. This requests validates the orderby $_GET parameter is a valid - * column and sortable. It will also use order (ASC|DESC) using DESC by default. - */ - protected function get_items_query_order() { - if ( empty( $this->sort_by ) ) { - return ''; - } - - $orderby = esc_sql( $this->get_request_orderby() ); - $order = esc_sql( $this->get_request_order() ); - - return "ORDER BY {$orderby} {$order}"; - } - - /** - * Return the sortable column specified for this request to order the results by, if any. - * - * @return string - */ - protected function get_request_orderby() { - - $valid_sortable_columns = array_values( $this->sort_by ); - - if ( ! empty( $_GET['orderby'] ) && in_array( $_GET['orderby'], $valid_sortable_columns ) ) { - $orderby = sanitize_text_field( $_GET['orderby'] ); - } else { - $orderby = $valid_sortable_columns[0]; - } - - return $orderby; - } - - /** - * Return the sortable column order specified for this request. - * - * @return string - */ - protected function get_request_order() { - - if ( ! empty( $_GET['order'] ) && 'desc' === strtolower( $_GET['order'] ) ) { - $order = 'DESC'; - } else { - $order = 'ASC'; - } - - return $order; - } - - /** - * Return the status filter for this request, if any. - * - * @return string - */ - protected function get_request_status() { - $status = ( ! empty( $_GET['status'] ) ) ? $_GET['status'] : ''; - return $status; - } - - /** - * Return the search filter for this request, if any. - * - * @return string - */ - protected function get_request_search_query() { - $search_query = ( ! empty( $_GET['s'] ) ) ? $_GET['s'] : ''; - return $search_query; - } - - /** - * Process and return the columns name. This is meant for using with SQL, this means it - * always includes the primary key. - * - * @return array - */ - protected function get_table_columns() { - $columns = array_keys( $this->columns ); - if ( ! in_array( $this->ID, $columns ) ) { - $columns[] = $this->ID; - } - - return $columns; - } - - /** - * Check if the current request is doing a "full text" search. If that is the case - * prepares the SQL to search texts using LIKE. - * - * If the current request does not have any search or if this list table does not support - * that feature it will return an empty string. - * - * TODO: - * - Improve search doing LIKE by word rather than by phrases. - * - * @return string - */ - protected function get_items_query_search() { - global $wpdb; - - if ( empty( $_GET['s'] ) || empty( $this->search_by ) ) { - return ''; - } - - $filter = array(); - foreach ( $this->search_by as $column ) { - $filter[] = '`' . $column . '` like "%' . $wpdb->esc_like( $_GET['s'] ) . '%"'; - } - return implode( ' OR ', $filter ); - } - - /** - * Prepares the SQL to filter rows by the options defined at `$this->filter_by`. Before trusting - * any data sent by the user it validates that it is a valid option. - */ - protected function get_items_query_filters() { - global $wpdb; - - if ( ! $this->filter_by || empty( $_GET['filter_by'] ) || ! is_array( $_GET['filter_by'] ) ) { - return ''; - } - - $filter = array(); - - foreach ( $this->filter_by as $column => $options ) { - if ( empty( $_GET['filter_by'][ $column ] ) || empty( $options[ $_GET['filter_by'][ $column ] ] ) ) { - continue; - } - - $filter[] = $wpdb->prepare( "`$column` = %s", $_GET['filter_by'][ $column ] ); - } - - return implode( ' AND ', $filter ); - - } - - /** - * Prepares the data to feed WP_Table_List. - * - * This has the core for selecting, sorting and filting data. To keep the code simple - * its logic is split among many methods (get_items_query_*). - * - * Beside populating the items this function will also count all the records that matches - * the filtering criteria and will do fill the pagination variables. - */ - public function prepare_items() { - global $wpdb; - - $this->process_bulk_action(); - - $this->process_row_actions(); - - if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { - // _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter - wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); - exit; - } - - $this->prepare_column_headers(); - - $limit = $this->get_items_query_limit(); - $offset = $this->get_items_query_offset(); - $order = $this->get_items_query_order(); - $where = array_filter(array( - $this->get_items_query_search(), - $this->get_items_query_filters(), - )); - $columns = '`' . implode( '`, `', $this->get_table_columns() ) . '`'; - - if ( ! empty( $where ) ) { - $where = 'WHERE ('. implode( ') AND (', $where ) . ')'; - } else { - $where = ''; - } - - $sql = "SELECT $columns FROM {$this->table_name} {$where} {$order} {$limit} {$offset}"; - - $this->set_items( $wpdb->get_results( $sql, ARRAY_A ) ); - - $query_count = "SELECT COUNT({$this->ID}) FROM {$this->table_name} {$where}"; - $total_items = $wpdb->get_var( $query_count ); - $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page ); - $this->set_pagination_args( array( - 'total_items' => $total_items, - 'per_page' => $per_page, - 'total_pages' => ceil( $total_items / $per_page ), - ) ); - } - - public function extra_tablenav( $which ) { - if ( ! $this->filter_by || 'top' !== $which ) { - return; - } - - echo '
'; - - foreach ( $this->filter_by as $id => $options ) { - $default = ! empty( $_GET['filter_by'][ $id ] ) ? $_GET['filter_by'][ $id ] : ''; - if ( empty( $options[ $default ] ) ) { - $default = ''; - } - - echo ''; - } - - submit_button( __( 'Filter', 'woocommerce' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); - echo '
'; - } - - /** - * Set the data for displaying. It will attempt to unserialize (There is a chance that some columns - * are serialized). This can be override in child classes for further data transformation. - */ - protected function set_items( array $items ) { - $this->items = array(); - foreach ( $items as $item ) { - $this->items[ $item[ $this->ID ] ] = array_map( 'maybe_unserialize', $item ); - } - } - - /** - * Renders the checkbox for each row, this is the first column and it is named ID regardless - * of how the primary key is named (to keep the code simpler). The bulk actions will do the proper - * name transformation though using `$this->ID`. - */ - public function column_cb( $row ) { - return ''; - } - - /** - * Renders the row-actions. - * - * This method renders the action menu, it reads the definition from the $row_actions property, - * and it checks that the row action method exists before rendering it. - * - * @param array $row Row to render - * @param $column_name Current row - * @return - */ - protected function maybe_render_actions( $row, $column_name ) { - if ( empty( $this->row_actions[ $column_name ] ) ) { - return; - } - - $row_id = $row[ $this->ID ]; - - $actions = '
'; - $action_count = 0; - foreach ( $this->row_actions[ $column_name ] as $action_key => $action ) { - - $action_count++; - - if ( ! method_exists( $this, 'row_action_' . $action_key ) ) { - continue; - } - - $action_link = ! empty( $action['link'] ) ? $action['link'] : add_query_arg( array( 'row_action' => $action_key, 'row_id' => $row_id, 'nonce' => wp_create_nonce( $action_key . '::' . $row_id ) ) ); - $span_class = ! empty( $action['class'] ) ? $action['class'] : $action_key; - $separator = ( $action_count < count( $this->row_actions[ $column_name ] ) ) ? ' | ' : ''; - - $actions .= sprintf( '', esc_attr( $span_class ) ); - $actions .= sprintf( '%3$s', esc_url( $action_link ), esc_attr( $action['desc'] ), esc_html( $action['name'] ) ); - $actions .= sprintf( '%s', $separator ); - } - $actions .= '
'; - return $actions; - } - - protected function process_row_actions() { - $parameters = array( 'row_action', 'row_id', 'nonce' ); - foreach ( $parameters as $parameter ) { - if ( empty( $_REQUEST[ $parameter ] ) ) { - return; - } - } - - $method = 'row_action_' . $_REQUEST['row_action']; - - if ( $_REQUEST['nonce'] === wp_create_nonce( $_REQUEST[ 'row_action' ] . '::' . $_REQUEST[ 'row_id' ] ) && method_exists( $this, $method ) ) { - $this->$method( $_REQUEST['row_id'] ); - } - - wp_redirect( remove_query_arg( - array( 'row_id', 'row_action', 'nonce' ), - wp_unslash( $_SERVER['REQUEST_URI'] ) - ) ); - exit; - } - - /** - * Default column formatting, it will escape everything for security. - */ - public function column_default( $item, $column_name ) { - $column_html = esc_html( $item[ $column_name ] ); - $column_html .= $this->maybe_render_actions( $item, $column_name ); - return $column_html; - } - - /** - * Display the table heading and search query, if any - */ - protected function display_header() { - echo '

' . esc_attr( $this->table_header ) . '

'; - if ( $this->get_request_search_query() ) { - /* translators: %s: search query */ - echo '' . esc_attr( sprintf( __( 'Search results for "%s"', 'woocommerce' ), $this->get_request_search_query() ) ) . ''; - } - echo '
'; - } - - /** - * Display the table heading and search query, if any - */ - protected function display_admin_notices() { - foreach ( $this->admin_notices as $notice ) { - echo '
'; - echo '

' . wp_kses_post( $notice['message'] ) . '

'; - echo '
'; - } - } - - /** - * Prints the available statuses so the user can click to filter. - */ - protected function display_filter_by_status() { - - $status_list_items = array(); - $request_status = $this->get_request_status(); - - // Helper to set 'all' filter when not set on status counts passed in - if ( ! isset( $this->status_counts['all'] ) ) { - $this->status_counts = array( 'all' => array_sum( $this->status_counts ) ) + $this->status_counts; - } - - foreach ( $this->status_counts as $status_name => $count ) { - - if ( 0 === $count ) { - continue; - } - - if ( $status_name === $request_status || ( empty( $request_status ) && 'all' === $status_name ) ) { - $status_list_item = '
  • %3$s (%4$d)
  • '; - } else { - $status_list_item = '
  • %3$s (%4$d)
  • '; - } - - $status_filter_url = ( 'all' === $status_name ) ? remove_query_arg( 'status' ) : add_query_arg( 'status', $status_name ); - $status_list_items[] = sprintf( $status_list_item, esc_attr( $status_name ), esc_url( $status_filter_url ), esc_html( ucfirst( $status_name ) ), absint( $count ) ); - } - - if ( $status_list_items ) { - echo '
      '; - echo implode( " | \n", $status_list_items ); - echo '
    '; - } - } - - /** - * Renders the table list, we override the original class to render the table inside a form - * and to render any needed HTML (like the search box). By doing so the callee of a function can simple - * forget about any extra HTML. - */ - protected function display_table() { - echo '
    '; - foreach ( $_GET as $key => $value ) { - if ( '_' === $key[0] || 'paged' === $key ) { - continue; - } - echo ''; - } - if ( ! empty( $this->search_by ) ) { - echo $this->search_box( $this->get_search_box_button_text(), 'plugin' ); // WPCS: XSS OK - } - parent::display(); - echo '
    '; - } - - /** - * Render the list table page, including header, notices, status filters and table. - */ - public function display_page() { - $this->prepare_items(); - - echo '
    '; - $this->display_header(); - $this->display_admin_notices(); - $this->display_filter_by_status(); - $this->display_table(); - echo '
    '; - } - - /** - * Get the text to display in the search box on the list table. - */ - protected function get_search_box_placeholder() { - return __( 'Search', 'woocommerce' ); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_Abstract_QueueRunner.php b/includes/libraries/action-scheduler/classes/ActionScheduler_Abstract_QueueRunner.php deleted file mode 100644 index e34fb8752f9..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_Abstract_QueueRunner.php +++ /dev/null @@ -1,219 +0,0 @@ -created_time = microtime( true ); - - $this->store = $store ? $store : ActionScheduler_Store::instance(); - $this->monitor = $monitor ? $monitor : new ActionScheduler_FatalErrorMonitor( $this->store ); - $this->cleaner = $cleaner ? $cleaner : new ActionScheduler_QueueCleaner( $this->store ); - } - - /** - * Process an individual action. - * - * @param int $action_id The action ID to process. - */ - public function process_action( $action_id ) { - try { - do_action( 'action_scheduler_before_execute', $action_id ); - - if ( ActionScheduler_Store::STATUS_PENDING !== $this->store->get_status( $action_id ) ) { - do_action( 'action_scheduler_execution_ignored', $action_id ); - return; - } - - $action = $this->store->fetch_action( $action_id ); - $this->store->log_execution( $action_id ); - $action->execute(); - do_action( 'action_scheduler_after_execute', $action_id, $action ); - $this->store->mark_complete( $action_id ); - } catch ( Exception $e ) { - $this->store->mark_failure( $action_id ); - do_action( 'action_scheduler_failed_execution', $action_id, $e ); - } - - if ( isset( $action ) && is_a( $action, 'ActionScheduler_Action' ) ) { - $this->schedule_next_instance( $action ); - } - } - - /** - * Schedule the next instance of the action if necessary. - * - * @param ActionScheduler_Action $action - */ - protected function schedule_next_instance( ActionScheduler_Action $action ) { - $schedule = $action->get_schedule(); - $next = $schedule->next( as_get_datetime_object() ); - - if ( ! is_null( $next ) && $schedule->is_recurring() ) { - $this->store->save_action( $action, $next ); - } - } - - /** - * Run the queue cleaner. - * - * @author Jeremy Pry - */ - protected function run_cleanup() { - $this->cleaner->clean( 10 * $this->get_time_limit() ); - } - - /** - * Get the number of concurrent batches a runner allows. - * - * @return int - */ - public function get_allowed_concurrent_batches() { - return apply_filters( 'action_scheduler_queue_runner_concurrent_batches', 5 ); - } - - /** - * Get the maximum number of seconds a batch can run for. - * - * @return int The number of seconds. - */ - protected function get_time_limit() { - - $time_limit = 30; - - // Apply deprecated filter from deprecated get_maximum_execution_time() method - if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) { - _deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' ); - $time_limit = apply_filters( 'action_scheduler_maximum_execution_time', $time_limit ); - } - - return absint( apply_filters( 'action_scheduler_queue_runner_time_limit', $time_limit ) ); - } - - /** - * Get the number of seconds the process has been running. - * - * @return int The number of seconds. - */ - protected function get_execution_time() { - $execution_time = microtime( true ) - $this->created_time; - - // Get the CPU time if the hosting environment uses it rather than wall-clock time to calculate a process's execution time. - if ( function_exists( 'getrusage' ) && apply_filters( 'action_scheduler_use_cpu_execution_time', defined( 'PANTHEON_ENVIRONMENT' ) ) ) { - $resource_usages = getrusage(); - - if ( isset( $resource_usages['ru_stime.tv_usec'], $resource_usages['ru_stime.tv_usec'] ) ) { - $execution_time = $resource_usages['ru_stime.tv_sec'] + ( $resource_usages['ru_stime.tv_usec'] / 1000000 ); - } - } - - return $execution_time; - } - - /** - * Check if the host's max execution time is (likely) to be exceeded if processing more actions. - * - * @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action - * @return bool - */ - protected function time_likely_to_be_exceeded( $processed_actions ) { - - $execution_time = $this->get_execution_time(); - $max_execution_time = $this->get_time_limit(); - $time_per_action = $execution_time / $processed_actions; - $estimated_time = $execution_time + ( $time_per_action * 3 ); - $likely_to_be_exceeded = $estimated_time > $max_execution_time; - - return apply_filters( 'action_scheduler_maximum_execution_time_likely_to_be_exceeded', $likely_to_be_exceeded, $this, $processed_actions, $execution_time, $max_execution_time ); - } - - /** - * Get memory limit - * - * Based on WP_Background_Process::get_memory_limit() - * - * @return int - */ - protected function get_memory_limit() { - if ( function_exists( 'ini_get' ) ) { - $memory_limit = ini_get( 'memory_limit' ); - } else { - $memory_limit = '128M'; // Sensible default, and minimum required by WooCommerce - } - - if ( ! $memory_limit || -1 === $memory_limit || '-1' === $memory_limit ) { - // Unlimited, set to 32GB. - $memory_limit = '32G'; - } - - return ActionScheduler_Compatibility::convert_hr_to_bytes( $memory_limit ); - } - - /** - * Memory exceeded - * - * Ensures the batch process never exceeds 90% of the maximum WordPress memory. - * - * Based on WP_Background_Process::memory_exceeded() - * - * @return bool - */ - protected function memory_exceeded() { - - $memory_limit = $this->get_memory_limit() * 0.90; - $current_memory = memory_get_usage( true ); - $memory_exceeded = $current_memory >= $memory_limit; - - return apply_filters( 'action_scheduler_memory_exceeded', $memory_exceeded, $this ); - } - - /** - * See if the batch limits have been exceeded, which is when memory usage is almost at - * the maximum limit, or the time to process more actions will exceed the max time limit. - * - * Based on WC_Background_Process::batch_limits_exceeded() - * - * @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action - * @return bool - */ - protected function batch_limits_exceeded( $processed_actions ) { - return $this->memory_exceeded() || $this->time_likely_to_be_exceeded( $processed_actions ); - } - - /** - * Process actions in the queue. - * - * @author Jeremy Pry - * @return int The number of actions processed. - */ - abstract public function run(); -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_Action.php b/includes/libraries/action-scheduler/classes/ActionScheduler_Action.php deleted file mode 100644 index 6258ba1637a..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_Action.php +++ /dev/null @@ -1,75 +0,0 @@ -set_hook($hook); - $this->set_schedule($schedule); - $this->set_args($args); - $this->set_group($group); - } - - public function execute() { - return do_action_ref_array($this->get_hook(), $this->get_args()); - } - - /** - * @param string $hook - */ - protected function set_hook( $hook ) { - $this->hook = $hook; - } - - public function get_hook() { - return $this->hook; - } - - protected function set_schedule( ActionScheduler_Schedule $schedule ) { - $this->schedule = $schedule; - } - - /** - * @return ActionScheduler_Schedule - */ - public function get_schedule() { - return $this->schedule; - } - - protected function set_args( array $args ) { - $this->args = $args; - } - - public function get_args() { - return $this->args; - } - - /** - * @param string $group - */ - protected function set_group( $group ) { - $this->group = $group; - } - - /** - * @return string - */ - public function get_group() { - return $this->group; - } - - /** - * @return bool If the action has been finished - */ - public function is_finished() { - return FALSE; - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_ActionClaim.php b/includes/libraries/action-scheduler/classes/ActionScheduler_ActionClaim.php deleted file mode 100644 index 8b5681620e3..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_ActionClaim.php +++ /dev/null @@ -1,23 +0,0 @@ -id = $id; - $this->action_ids = $action_ids; - } - - public function get_id() { - return $this->id; - } - - public function get_actions() { - return $this->action_ids; - } -} - \ No newline at end of file diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php b/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php deleted file mode 100644 index 8d97417c5f2..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php +++ /dev/null @@ -1,111 +0,0 @@ -store( $action ); - } - - /** - * @param string $hook The hook to trigger when this action runs - * @param array $args Args to pass when the hook is triggered - * @param int $first Unix timestamp for the first run - * @param int $interval Seconds between runs - * @param string $group A group to put the action in - * - * @return string The ID of the stored action - */ - public function recurring( $hook, $args = array(), $first = null, $interval = null, $group = '' ) { - if ( empty($interval) ) { - return $this->single( $hook, $args, $first, $group ); - } - $date = as_get_datetime_object( $first ); - $schedule = new ActionScheduler_IntervalSchedule( $date, $interval ); - $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); - return $this->store( $action ); - } - - - /** - * @param string $hook The hook to trigger when this action runs - * @param array $args Args to pass when the hook is triggered - * @param int $first Unix timestamp for the first run - * @param int $schedule A cron definition string - * @param string $group A group to put the action in - * - * @return string The ID of the stored action - */ - public function cron( $hook, $args = array(), $first = null, $schedule = null, $group = '' ) { - if ( empty($schedule) ) { - return $this->single( $hook, $args, $first, $group ); - } - $date = as_get_datetime_object( $first ); - $cron = CronExpression::factory( $schedule ); - $schedule = new ActionScheduler_CronSchedule( $date, $cron ); - $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); - return $this->store( $action ); - } - - /** - * @param ActionScheduler_Action $action - * - * @return string The ID of the stored action - */ - protected function store( ActionScheduler_Action $action ) { - $store = ActionScheduler_Store::instance(); - return $store->save_action( $action ); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_AdminView.php b/includes/libraries/action-scheduler/classes/ActionScheduler_AdminView.php deleted file mode 100644 index e0a59b8f17c..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_AdminView.php +++ /dev/null @@ -1,83 +0,0 @@ -render(); - } - - /** - * Registers action-scheduler into WooCommerce > System status. - * - * @param array $tabs An associative array of tab key => label. - * @return array $tabs An associative array of tab key => label, including Action Scheduler's tabs - */ - public function register_system_status_tab( array $tabs ) { - $tabs['action-scheduler'] = __( 'Scheduled Actions', 'woocommerce' ); - - return $tabs; - } - - /** - * Include Action Scheduler's administration under the Tools menu. - * - * A menu under the Tools menu is important for backward compatibility (as that's - * where it started), and also provides more convenient access than the WooCommerce - * System Status page, and for sites where WooCommerce isn't active. - */ - public function register_menu() { - add_submenu_page( - 'tools.php', - __( 'Scheduled Actions', 'woocommerce' ), - __( 'Scheduled Actions', 'woocommerce' ), - 'manage_options', - 'action-scheduler', - array( $this, 'render_admin_ui' ) - ); - } - - /** - * Renders the Admin UI - */ - public function render_admin_ui() { - $table = new ActionScheduler_ListTable( ActionScheduler::store(), ActionScheduler::logger(), ActionScheduler::runner() ); - $table->display_page(); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_CanceledAction.php b/includes/libraries/action-scheduler/classes/ActionScheduler_CanceledAction.php deleted file mode 100644 index b1db531143f..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_CanceledAction.php +++ /dev/null @@ -1,21 +0,0 @@ -set_schedule( new ActionScheduler_NullSchedule() ); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_Compatibility.php b/includes/libraries/action-scheduler/classes/ActionScheduler_Compatibility.php deleted file mode 100644 index c06e5a44d00..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_Compatibility.php +++ /dev/null @@ -1,99 +0,0 @@ - $wp_max_limit_int && $filtered_limit_int > $current_limit_int ) ) { - if ( false !== @ini_set( 'memory_limit', $filtered_limit ) ) { - return $filtered_limit; - } else { - return false; - } - } elseif ( -1 === $wp_max_limit_int || $wp_max_limit_int > $current_limit_int ) { - if ( false !== @ini_set( 'memory_limit', $wp_max_limit ) ) { - return $wp_max_limit; - } else { - return false; - } - } - return false; - } - - /** - * Attempts to raise the PHP timeout for time intensive processes. - * - * Only allows raising the existing limit and prevents lowering it. Wrapper for wc_set_time_limit(), when available. - * - * @param int The time limit in seconds. - */ - public static function raise_time_limit( $limit = 0 ) { - if ( $limit < ini_get( 'max_execution_time' ) ) { - return; - } - - if ( function_exists( 'wc_set_time_limit' ) ) { - wc_set_time_limit( $limit ); - } elseif ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) { - @set_time_limit( $limit ); - } - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_CronSchedule.php b/includes/libraries/action-scheduler/classes/ActionScheduler_CronSchedule.php deleted file mode 100644 index 0441e40a5db..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_CronSchedule.php +++ /dev/null @@ -1,57 +0,0 @@ -start = $start; - $this->cron = $cron; - } - - /** - * @param DateTime $after - * @return DateTime|null - */ - public function next( DateTime $after = NULL ) { - $after = empty($after) ? clone $this->start : clone $after; - return $this->cron->getNextRunDate($after, 0, false); - } - - /** - * @return bool - */ - public function is_recurring() { - return true; - } - - /** - * @return string - */ - public function get_recurrence() { - return strval($this->cron); - } - - /** - * For PHP 5.2 compat, since DateTime objects can't be serialized - * @return array - */ - public function __sleep() { - $this->start_timestamp = $this->start->getTimestamp(); - return array( - 'start_timestamp', - 'cron' - ); - } - - public function __wakeup() { - $this->start = as_get_datetime_object($this->start_timestamp); - } -} - diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_DateTime.php b/includes/libraries/action-scheduler/classes/ActionScheduler_DateTime.php deleted file mode 100644 index 5e8743cae74..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_DateTime.php +++ /dev/null @@ -1,76 +0,0 @@ -format( 'U' ); - } - - /** - * Set the UTC offset. - * - * This represents a fixed offset instead of a timezone setting. - * - * @param $offset - */ - public function setUtcOffset( $offset ) { - $this->utcOffset = intval( $offset ); - } - - /** - * Returns the timezone offset. - * - * @return int - * @link http://php.net/manual/en/datetime.getoffset.php - */ - public function getOffset() { - return $this->utcOffset ? $this->utcOffset : parent::getOffset(); - } - - /** - * Set the TimeZone associated with the DateTime - * - * @param DateTimeZone $timezone - * - * @return static - * @link http://php.net/manual/en/datetime.settimezone.php - */ - public function setTimezone( $timezone ) { - $this->utcOffset = 0; - parent::setTimezone( $timezone ); - - return $this; - } - - /** - * Get the timestamp with the WordPress timezone offset added or subtracted. - * - * @since 3.0.0 - * @return int - */ - public function getOffsetTimestamp() { - return $this->getTimestamp() + $this->getOffset(); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_Exception.php b/includes/libraries/action-scheduler/classes/ActionScheduler_Exception.php deleted file mode 100644 index 9ec713f67ad..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_Exception.php +++ /dev/null @@ -1,11 +0,0 @@ -store = $store; - } - - public function attach( ActionScheduler_ActionClaim $claim ) { - $this->claim = $claim; - add_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) ); - add_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0, 1 ); - add_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0, 0 ); - add_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0, 0 ); - add_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0, 0 ); - } - - public function detach() { - $this->claim = NULL; - $this->untrack_action(); - remove_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) ); - remove_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0 ); - remove_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0 ); - remove_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0 ); - remove_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0 ); - } - - public function track_current_action( $action_id ) { - $this->action_id = $action_id; - } - - public function untrack_action() { - $this->action_id = 0; - } - - public function handle_unexpected_shutdown() { - if ( $error = error_get_last() ) { - if ( in_array( $error['type'], array( E_ERROR, E_PARSE, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR ) ) ) { - if ( !empty($this->action_id) ) { - $this->store->mark_failure( $this->action_id ); - do_action( 'action_scheduler_unexpected_shutdown', $this->action_id, $error ); - } - } - $this->store->release_claim( $this->claim ); - } - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_FinishedAction.php b/includes/libraries/action-scheduler/classes/ActionScheduler_FinishedAction.php deleted file mode 100644 index b23a56c66b7..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_FinishedAction.php +++ /dev/null @@ -1,16 +0,0 @@ -start = $start; - $this->interval_in_seconds = (int)$interval; - } - - /** - * @param DateTime $after - * - * @return DateTime|null - */ - public function next( DateTime $after = NULL ) { - $after = empty($after) ? as_get_datetime_object('@0') : clone $after; - if ( $after > $this->start ) { - $after->modify('+'.$this->interval_in_seconds.' seconds'); - return $after; - } - return clone $this->start; - } - - /** - * @return bool - */ - public function is_recurring() { - return true; - } - - /** - * @return int - */ - public function interval_in_seconds() { - return $this->interval_in_seconds; - } - - /** - * For PHP 5.2 compat, since DateTime objects can't be serialized - * @return array - */ - public function __sleep() { - $this->start_timestamp = $this->start->getTimestamp(); - return array( - 'start_timestamp', - 'interval_in_seconds' - ); - } - - public function __wakeup() { - $this->start = as_get_datetime_object($this->start_timestamp); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_InvalidActionException.php b/includes/libraries/action-scheduler/classes/ActionScheduler_InvalidActionException.php deleted file mode 100644 index 4f02639e6a3..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_InvalidActionException.php +++ /dev/null @@ -1,28 +0,0 @@ - label). - * - * @var array - */ - protected $columns = array(); - - /** - * Actions (name => label). - * - * @var array - */ - protected $row_actions = array(); - - /** - * The active data stores - * - * @var ActionScheduler_Store - */ - protected $store; - - /** - * A logger to use for getting action logs to display - * - * @var ActionScheduler_Logger - */ - protected $logger; - - /** - * A ActionScheduler_QueueRunner runner instance (or child class) - * - * @var ActionScheduler_QueueRunner - */ - protected $runner; - - /** - * Bulk actions. The key of the array is the method name of the implementation: - * - * bulk_(array $ids, string $sql_in). - * - * See the comments in the parent class for further details - * - * @var array - */ - protected $bulk_actions = array(); - - /** - * Flag variable to render our notifications, if any, once. - * - * @var bool - */ - protected static $did_notification = false; - - /** - * Array of seconds for common time periods, like week or month, alongside an internationalised string representation, i.e. "Day" or "Days" - * - * @var array - */ - private static $time_periods; - - /** - * Sets the current data store object into `store->action` and initialises the object. - * - * @param ActionScheduler_Store $store - * @param ActionScheduler_Logger $logger - * @param ActionScheduler_QueueRunner $runner - */ - public function __construct( ActionScheduler_Store $store, ActionScheduler_Logger $logger, ActionScheduler_QueueRunner $runner ) { - - $this->store = $store; - $this->logger = $logger; - $this->runner = $runner; - - $this->table_header = __( 'Scheduled Actions', 'woocommerce' ); - - $this->bulk_actions = array( - 'delete' => __( 'Delete', 'woocommerce' ), - ); - - $this->columns = array( - 'hook' => __( 'Hook', 'woocommerce' ), - 'status' => __( 'Status', 'woocommerce' ), - 'args' => __( 'Arguments', 'woocommerce' ), - 'group' => __( 'Group', 'woocommerce' ), - 'recurrence' => __( 'Recurrence', 'woocommerce' ), - 'schedule' => __( 'Scheduled Date', 'woocommerce' ), - 'log_entries' => __( 'Log', 'woocommerce' ), - ); - - $this->sort_by = array( - 'schedule', - 'hook', - 'group', - ); - - $this->search_by = array( - 'hook', - 'args', - 'claim_id', - ); - - $request_status = $this->get_request_status(); - - if ( empty( $request_status ) ) { - $this->sort_by[] = 'status'; - } elseif ( in_array( $request_status, array( 'in-progress', 'failed' ) ) ) { - $this->columns += array( 'claim_id' => __( 'Claim ID', 'woocommerce' ) ); - $this->sort_by[] = 'claim_id'; - } - - $this->row_actions = array( - 'hook' => array( - 'run' => array( - 'name' => __( 'Run', 'woocommerce' ), - 'desc' => __( 'Process the action now as if it were run as part of a queue', 'woocommerce' ), - ), - 'cancel' => array( - 'name' => __( 'Cancel', 'woocommerce' ), - 'desc' => __( 'Cancel the action now to avoid it being run in future', 'woocommerce' ), - 'class' => 'cancel trash', - ), - ), - ); - - self::$time_periods = array( - array( - 'seconds' => YEAR_IN_SECONDS, - 'names' => _n_noop( '%s year', '%s years', 'woocommerce' ), - ), - array( - 'seconds' => MONTH_IN_SECONDS, - 'names' => _n_noop( '%s month', '%s months', 'woocommerce' ), - ), - array( - 'seconds' => WEEK_IN_SECONDS, - 'names' => _n_noop( '%s week', '%s weeks', 'woocommerce' ), - ), - array( - 'seconds' => DAY_IN_SECONDS, - 'names' => _n_noop( '%s day', '%s days', 'woocommerce' ), - ), - array( - 'seconds' => HOUR_IN_SECONDS, - 'names' => _n_noop( '%s hour', '%s hours', 'woocommerce' ), - ), - array( - 'seconds' => MINUTE_IN_SECONDS, - 'names' => _n_noop( '%s minute', '%s minutes', 'woocommerce' ), - ), - array( - 'seconds' => 1, - 'names' => _n_noop( '%s second', '%s seconds', 'woocommerce' ), - ), - ); - - parent::__construct( array( - 'singular' => 'action-scheduler', - 'plural' => 'action-scheduler', - 'ajax' => false, - ) ); - } - - /** - * Convert an interval of seconds into a two part human friendly string. - * - * The WordPress human_time_diff() function only calculates the time difference to one degree, meaning - * even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step - * further to display two degrees of accuracy. - * - * Inspired by the Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/ - * - * @param int $interval A interval in seconds. - * @param int $periods_to_include Depth of time periods to include, e.g. for an interval of 70, and $periods_to_include of 2, both minutes and seconds would be included. With a value of 1, only minutes would be included. - * @return string A human friendly string representation of the interval. - */ - private static function human_interval( $interval, $periods_to_include = 2 ) { - - if ( $interval <= 0 ) { - return __( 'Now!', 'woocommerce' ); - } - - $output = ''; - - for ( $time_period_index = 0, $periods_included = 0, $seconds_remaining = $interval; $time_period_index < count( self::$time_periods ) && $seconds_remaining > 0 && $periods_included < $periods_to_include; $time_period_index++ ) { - - $periods_in_interval = floor( $seconds_remaining / self::$time_periods[ $time_period_index ]['seconds'] ); - - if ( $periods_in_interval > 0 ) { - if ( ! empty( $output ) ) { - $output .= ' '; - } - $output .= sprintf( _n( self::$time_periods[ $time_period_index ]['names'][0], self::$time_periods[ $time_period_index ]['names'][1], $periods_in_interval, 'woocommerce' ), $periods_in_interval ); - $seconds_remaining -= $periods_in_interval * self::$time_periods[ $time_period_index ]['seconds']; - $periods_included++; - } - } - - return $output; - } - - /** - * Returns the recurrence of an action or 'Non-repeating'. The output is human readable. - * - * @param ActionScheduler_Action $action - * - * @return string - */ - protected function get_recurrence( $action ) { - $recurrence = $action->get_schedule(); - if ( $recurrence->is_recurring() ) { - if ( method_exists( $recurrence, 'interval_in_seconds' ) ) { - return sprintf( __( 'Every %s', 'woocommerce' ), self::human_interval( $recurrence->interval_in_seconds() ) ); - } - - if ( method_exists( $recurrence, 'get_recurrence' ) ) { - return sprintf( __( 'Cron %s', 'woocommerce' ), $recurrence->get_recurrence() ); - } - } - - return __( 'Non-repeating', 'woocommerce' ); - } - - /** - * Serializes the argument of an action to render it in a human friendly format. - * - * @param array $row The array representation of the current row of the table - * - * @return string - */ - public function column_args( array $row ) { - if ( empty( $row['args'] ) ) { - return ''; - } - - $row_html = '
      '; - foreach ( $row['args'] as $key => $value ) { - $row_html .= sprintf( '
    • %s => %s
    • ', esc_html( var_export( $key, true ) ), esc_html( var_export( $value, true ) ) ); - } - $row_html .= '
    '; - - return apply_filters( 'action_scheduler_list_table_column_args', $row_html, $row ); - } - - /** - * Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal. - * - * @param array $row Action array. - * @return string - */ - public function column_log_entries( array $row ) { - - $log_entries_html = '
      '; - - $timezone = new DateTimezone( 'UTC' ); - - foreach ( $row['log_entries'] as $log_entry ) { - $log_entries_html .= $this->get_log_entry_html( $log_entry, $timezone ); - } - - $log_entries_html .= '
    '; - - return $log_entries_html; - } - - /** - * Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal. - * - * @param ActionScheduler_LogEntry $log_entry - * @param DateTimezone $timezone - * @return string - */ - protected function get_log_entry_html( ActionScheduler_LogEntry $log_entry, DateTimezone $timezone ) { - $date = $log_entry->get_date(); - $date->setTimezone( $timezone ); - return sprintf( '
  • %s
    %s
  • ', esc_html( $date->format( 'Y-m-d H:i:s O' ) ), esc_html( $log_entry->get_message() ) ); - } - - /** - * Only display row actions for pending actions. - * - * @param array $row Row to render - * @param string $column_name Current row - * - * @return string - */ - protected function maybe_render_actions( $row, $column_name ) { - if ( 'pending' === strtolower( $row['status'] ) ) { - return parent::maybe_render_actions( $row, $column_name ); - } - - return ''; - } - - /** - * Renders admin notifications - * - * Notifications: - * 1. When the maximum number of tasks are being executed simultaneously - * 2. Notifications when a task us manually executed - */ - public function display_admin_notices() { - - if ( $this->store->get_claim_count() >= $this->runner->get_allowed_concurrent_batches() ) { - $this->admin_notices[] = array( - 'class' => 'updated', - 'message' => sprintf( __( 'Maximum simultaneous batches already in progress (%s queues). No actions will be processed until the current batches are complete.', 'woocommerce' ), $this->store->get_claim_count() ), - ); - } - - $notification = get_transient( 'action_scheduler_admin_notice' ); - - if ( is_array( $notification ) ) { - delete_transient( 'action_scheduler_admin_notice' ); - - $action = $this->store->fetch_action( $notification['action_id'] ); - $action_hook_html = '' . $action->get_hook() . ''; - if ( 1 == $notification['success'] ) { - $class = 'updated'; - switch ( $notification['row_action_type'] ) { - case 'run' : - $action_message_html = sprintf( __( 'Successfully executed action: %s', 'woocommerce' ), $action_hook_html ); - break; - case 'cancel' : - $action_message_html = sprintf( __( 'Successfully canceled action: %s', 'woocommerce' ), $action_hook_html ); - break; - default : - $action_message_html = sprintf( __( 'Successfully processed change for action: %s', 'woocommerce' ), $action_hook_html ); - break; - } - } else { - $class = 'error'; - $action_message_html = sprintf( __( 'Could not process change for action: "%s" (ID: %d). Error: %s', 'woocommerce' ), $action_hook_html, esc_html( $notification['action_id'] ), esc_html( $notification['error_message'] ) ); - } - - $action_message_html = apply_filters( 'action_scheduler_admin_notice_html', $action_message_html, $action, $notification ); - - $this->admin_notices[] = array( - 'class' => $class, - 'message' => $action_message_html, - ); - } - - parent::display_admin_notices(); - } - - /** - * Prints the scheduled date in a human friendly format. - * - * @param array $row The array representation of the current row of the table - * - * @return string - */ - public function column_schedule( $row ) { - return $this->get_schedule_display_string( $row['schedule'] ); - } - - /** - * Get the scheduled date in a human friendly format. - * - * @param ActionScheduler_Schedule $schedule - * @return string - */ - protected function get_schedule_display_string( ActionScheduler_Schedule $schedule ) { - - $schedule_display_string = ''; - - if ( ! $schedule->next() ) { - return $schedule_display_string; - } - - $next_timestamp = $schedule->next()->getTimestamp(); - - $schedule_display_string .= $schedule->next()->format( 'Y-m-d H:i:s O' ); - $schedule_display_string .= '
    '; - - if ( gmdate( 'U' ) > $next_timestamp ) { - $schedule_display_string .= sprintf( __( ' (%s ago)', 'woocommerce' ), self::human_interval( gmdate( 'U' ) - $next_timestamp ) ); - } else { - $schedule_display_string .= sprintf( __( ' (%s)', 'woocommerce' ), self::human_interval( $next_timestamp - gmdate( 'U' ) ) ); - } - - return $schedule_display_string; - } - - /** - * Bulk delete - * - * Deletes actions based on their ID. This is the handler for the bulk delete. It assumes the data - * properly validated by the callee and it will delete the actions without any extra validation. - * - * @param array $ids - * @param string $ids_sql Inherited and unused - */ - protected function bulk_delete( array $ids, $ids_sql ) { - foreach ( $ids as $id ) { - $this->store->delete_action( $id ); - } - } - - /** - * Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their - * parameters are valid. - * - * @param int $action_id - */ - protected function row_action_cancel( $action_id ) { - $this->process_row_action( $action_id, 'cancel' ); - } - - /** - * Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their - * parameters are valid. - * - * @param int $action_id - */ - protected function row_action_run( $action_id ) { - $this->process_row_action( $action_id, 'run' ); - } - - /** - * Implements the logic behind processing an action once an action link is clicked on the list table. - * - * @param int $action_id - * @param string $row_action_type The type of action to perform on the action. - */ - protected function process_row_action( $action_id, $row_action_type ) { - try { - switch ( $row_action_type ) { - case 'run' : - $this->runner->process_action( $action_id ); - break; - case 'cancel' : - $this->store->cancel_action( $action_id ); - break; - } - $success = 1; - $error_message = ''; - } catch ( Exception $e ) { - $success = 0; - $error_message = $e->getMessage(); - } - - set_transient( 'action_scheduler_admin_notice', compact( 'action_id', 'success', 'error_message', 'row_action_type' ), 30 ); - } - - /** - * {@inheritDoc} - */ - public function prepare_items() { - $this->process_bulk_action(); - - $this->process_row_actions(); - - if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { - // _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter - wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); - exit; - } - - $this->prepare_column_headers(); - - $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page ); - $query = array( - 'per_page' => $per_page, - 'offset' => $this->get_items_offset(), - 'status' => $this->get_request_status(), - 'orderby' => $this->get_request_orderby(), - 'order' => $this->get_request_order(), - 'search' => $this->get_request_search_query(), - ); - - $this->items = array(); - - $total_items = $this->store->query_actions( $query, 'count' ); - - $status_labels = $this->store->get_status_labels(); - - foreach ( $this->store->query_actions( $query ) as $action_id ) { - try { - $action = $this->store->fetch_action( $action_id ); - } catch ( Exception $e ) { - continue; - } - $this->items[ $action_id ] = array( - 'ID' => $action_id, - 'hook' => $action->get_hook(), - 'status' => $status_labels[ $this->store->get_status( $action_id ) ], - 'args' => $action->get_args(), - 'group' => $action->get_group(), - 'log_entries' => $this->logger->get_logs( $action_id ), - 'claim_id' => $this->store->get_claim_id( $action_id ), - 'recurrence' => $this->get_recurrence( $action ), - 'schedule' => $action->get_schedule(), - ); - } - - $this->set_pagination_args( array( - 'total_items' => $total_items, - 'per_page' => $per_page, - 'total_pages' => ceil( $total_items / $per_page ), - ) ); - } - - /** - * Prints the available statuses so the user can click to filter. - */ - protected function display_filter_by_status() { - $this->status_counts = $this->store->action_counts(); - parent::display_filter_by_status(); - } - - /** - * Get the text to display in the search box on the list table. - */ - protected function get_search_box_button_text() { - return __( 'Search hook, args and claim ID', 'woocommerce' ); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_LogEntry.php b/includes/libraries/action-scheduler/classes/ActionScheduler_LogEntry.php deleted file mode 100644 index 649636debf7..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_LogEntry.php +++ /dev/null @@ -1,67 +0,0 @@ -comment_type - * to ActionScheduler_LogEntry::__construct(), goodness knows why, and the Follow-up Emails plugin - * hard-codes loading its own version of ActionScheduler_wpCommentLogger with that out-dated method, - * goodness knows why, so we need to guard against that here instead of using a DateTime type declaration - * for the constructor's 3rd param of $date and causing a fatal error with older versions of FUE. - */ - if ( null !== $date && ! is_a( $date, 'DateTime' ) ) { - _doing_it_wrong( __METHOD__, 'The third parameter must be a valid DateTime instance, or null.', '2.0.0' ); - $date = null; - } - - $this->action_id = $action_id; - $this->message = $message; - $this->date = $date ? $date : new Datetime; - } - - /** - * Returns the date when this log entry was created - * - * @return Datetime - */ - public function get_date() { - return $this->date; - } - - public function get_action_id() { - return $this->action_id; - } - - public function get_message() { - return $this->message; - } -} - diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_Logger.php b/includes/libraries/action-scheduler/classes/ActionScheduler_Logger.php deleted file mode 100644 index 7cda936a1a7..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_Logger.php +++ /dev/null @@ -1,102 +0,0 @@ -log( $action_id, __( 'action created', 'woocommerce' ) ); - } - - public function log_canceled_action( $action_id ) { - $this->log( $action_id, __( 'action canceled', 'woocommerce' ) ); - } - - public function log_started_action( $action_id ) { - $this->log( $action_id, __( 'action started', 'woocommerce' ) ); - } - - public function log_completed_action( $action_id ) { - $this->log( $action_id, __( 'action complete', 'woocommerce' ) ); - } - - public function log_failed_action( $action_id, Exception $exception ) { - $this->log( $action_id, sprintf( __( 'action failed: %s', 'woocommerce' ), $exception->getMessage() ) ); - } - - public function log_timed_out_action( $action_id, $timeout ) { - $this->log( $action_id, sprintf( __( 'action timed out after %s seconds', 'woocommerce' ), $timeout ) ); - } - - public function log_unexpected_shutdown( $action_id, $error ) { - if ( ! empty( $error ) ) { - $this->log( $action_id, sprintf( __( 'unexpected shutdown: PHP Fatal error %s in %s on line %s', 'woocommerce' ), $error['message'], $error['file'], $error['line'] ) ); - } - } - - public function log_reset_action( $action_id ) { - $this->log( $action_id, __( 'action reset', 'woocommerce' ) ); - } - - public function log_ignored_action( $action_id ) { - $this->log( $action_id, __( 'action ignored', 'woocommerce' ) ); - } - - public function log_failed_fetch_action( $action_id ) { - $this->log( $action_id, __( 'There was a failure fetching this action', 'woocommerce' ) ); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_NullAction.php b/includes/libraries/action-scheduler/classes/ActionScheduler_NullAction.php deleted file mode 100644 index cd5dc3b0f98..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_NullAction.php +++ /dev/null @@ -1,16 +0,0 @@ -set_schedule( new ActionScheduler_NullSchedule() ); - } - - public function execute() { - // don't execute - } -} - \ No newline at end of file diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_NullLogEntry.php b/includes/libraries/action-scheduler/classes/ActionScheduler_NullLogEntry.php deleted file mode 100644 index 6f8f218aab4..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_NullLogEntry.php +++ /dev/null @@ -1,11 +0,0 @@ -store = $store ? $store : ActionScheduler_Store::instance(); - $this->batch_size = $batch_size; - } - - public function delete_old_actions() { - $lifespan = apply_filters( 'action_scheduler_retention_period', $this->month_in_seconds ); - $cutoff = as_get_datetime_object($lifespan.' seconds ago'); - - $statuses_to_purge = array( - ActionScheduler_Store::STATUS_COMPLETE, - ActionScheduler_Store::STATUS_CANCELED, - ); - - foreach ( $statuses_to_purge as $status ) { - $actions_to_delete = $this->store->query_actions( array( - 'status' => $status, - 'modified' => $cutoff, - 'modified_compare' => '<=', - 'per_page' => $this->get_batch_size(), - ) ); - - foreach ( $actions_to_delete as $action_id ) { - try { - $this->store->delete_action( $action_id ); - } catch ( Exception $e ) { - - /** - * Notify 3rd party code of exceptions when deleting a completed action older than the retention period - * - * This hook provides a way for 3rd party code to log or otherwise handle exceptions relating to their - * actions. - * - * @since 2.0.0 - * - * @param int $action_id The scheduled actions ID in the data store - * @param Exception $e The exception thrown when attempting to delete the action from the data store - * @param int $lifespan The retention period, in seconds, for old actions - * @param int $count_of_actions_to_delete The number of old actions being deleted in this batch - */ - do_action( 'action_scheduler_failed_old_action_deletion', $action_id, $e, $lifespan, count( $actions_to_delete ) ); - } - } - } - } - - /** - * Unclaim pending actions that have not been run within a given time limit. - * - * When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed - * as a parameter is 10x the time limit used for queue processing. - * - * @param int $time_limit The number of seconds to allow a queue to run before unclaiming its pending actions. Default 300 (5 minutes). - */ - public function reset_timeouts( $time_limit = 300 ) { - $timeout = apply_filters( 'action_scheduler_timeout_period', $time_limit ); - if ( $timeout < 0 ) { - return; - } - $cutoff = as_get_datetime_object($timeout.' seconds ago'); - $actions_to_reset = $this->store->query_actions( array( - 'status' => ActionScheduler_Store::STATUS_PENDING, - 'modified' => $cutoff, - 'modified_compare' => '<=', - 'claimed' => true, - 'per_page' => $this->get_batch_size(), - ) ); - - foreach ( $actions_to_reset as $action_id ) { - $this->store->unclaim_action( $action_id ); - do_action( 'action_scheduler_reset_action', $action_id ); - } - } - - /** - * Mark actions that have been running for more than a given time limit as failed, based on - * the assumption some uncatachable and unloggable fatal error occurred during processing. - * - * When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed - * as a parameter is 10x the time limit used for queue processing. - * - * @param int $time_limit The number of seconds to allow an action to run before it is considered to have failed. Default 300 (5 minutes). - */ - public function mark_failures( $time_limit = 300 ) { - $timeout = apply_filters( 'action_scheduler_failure_period', $time_limit ); - if ( $timeout < 0 ) { - return; - } - $cutoff = as_get_datetime_object($timeout.' seconds ago'); - $actions_to_reset = $this->store->query_actions( array( - 'status' => ActionScheduler_Store::STATUS_RUNNING, - 'modified' => $cutoff, - 'modified_compare' => '<=', - 'per_page' => $this->get_batch_size(), - ) ); - - foreach ( $actions_to_reset as $action_id ) { - $this->store->mark_failure( $action_id ); - do_action( 'action_scheduler_failed_action', $action_id, $timeout ); - } - } - - /** - * Do all of the cleaning actions. - * - * @param int $time_limit The number of seconds to use as the timeout and failure period. Default 300 (5 minutes). - * @author Jeremy Pry - */ - public function clean( $time_limit = 300 ) { - $this->delete_old_actions(); - $this->reset_timeouts( $time_limit ); - $this->mark_failures( $time_limit ); - } - - /** - * Get the batch size for cleaning the queue. - * - * @author Jeremy Pry - * @return int - */ - protected function get_batch_size() { - /** - * Filter the batch size when cleaning the queue. - * - * @param int $batch_size The number of actions to clean in one batch. - */ - return absint( apply_filters( 'action_scheduler_cleanup_batch_size', $this->batch_size ) ); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_QueueRunner.php b/includes/libraries/action-scheduler/classes/ActionScheduler_QueueRunner.php deleted file mode 100644 index 2bca8f81ab7..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_QueueRunner.php +++ /dev/null @@ -1,115 +0,0 @@ -get_time_limit() ); - do_action( 'action_scheduler_before_process_queue' ); - $this->run_cleanup(); - $processed_actions = 0; - if ( $this->store->get_claim_count() < $this->get_allowed_concurrent_batches() ) { - $batch_size = apply_filters( 'action_scheduler_queue_runner_batch_size', 25 ); - do { - $processed_actions_in_batch = $this->do_batch( $batch_size ); - $processed_actions += $processed_actions_in_batch; - } while ( $processed_actions_in_batch > 0 && ! $this->batch_limits_exceeded( $processed_actions ) ); // keep going until we run out of actions, time, or memory - } - - do_action( 'action_scheduler_after_process_queue' ); - return $processed_actions; - } - - protected function do_batch( $size = 100 ) { - $claim = $this->store->stake_claim($size); - $this->monitor->attach($claim); - $processed_actions = 0; - - foreach ( $claim->get_actions() as $action_id ) { - // bail if we lost the claim - if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $claim->get_id() ) ) ) { - break; - } - $this->process_action( $action_id ); - $processed_actions++; - - if ( $this->batch_limits_exceeded( $processed_actions ) ) { - break; - } - } - $this->store->release_claim($claim); - $this->monitor->detach(); - $this->clear_caches(); - return $processed_actions; - } - - /** - * Running large batches can eat up memory, as WP adds data to its object cache. - * - * If using a persistent object store, this has the side effect of flushing that - * as well, so this is disabled by default. To enable: - * - * add_filter( 'action_scheduler_queue_runner_flush_cache', '__return_true' ); - */ - protected function clear_caches() { - if ( ! wp_using_ext_object_cache() || apply_filters( 'action_scheduler_queue_runner_flush_cache', false ) ) { - wp_cache_flush(); - } - } - - public function add_wp_cron_schedule( $schedules ) { - $schedules['every_minute'] = array( - 'interval' => 60, // in seconds - 'display' => __( 'Every minute', 'woocommerce' ), - ); - - return $schedules; - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_Schedule.php b/includes/libraries/action-scheduler/classes/ActionScheduler_Schedule.php deleted file mode 100644 index d61a9f7c920..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_Schedule.php +++ /dev/null @@ -1,18 +0,0 @@ -date = clone $date; - } - - /** - * @param DateTime $after - * - * @return DateTime|null - */ - public function next( DateTime $after = NULL ) { - $after = empty($after) ? as_get_datetime_object('@0') : $after; - return ( $after > $this->date ) ? NULL : clone $this->date; - } - - /** - * @return bool - */ - public function is_recurring() { - return false; - } - - /** - * For PHP 5.2 compat, since DateTime objects can't be serialized - * @return array - */ - public function __sleep() { - $this->timestamp = $this->date->getTimestamp(); - return array( - 'timestamp', - ); - } - - public function __wakeup() { - $this->date = as_get_datetime_object($this->timestamp); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_Store.php b/includes/libraries/action-scheduler/classes/ActionScheduler_Store.php deleted file mode 100644 index dee6821133a..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_Store.php +++ /dev/null @@ -1,212 +0,0 @@ -', '>=', '<', '<=', '=') ) ) { - return $comparison_operator; - } - return '='; - } - - /** - * Get the time MySQL formated date/time string for an action's (next) scheduled date. - * - * @param ActionScheduler_Action $action - * @param DateTime $scheduled_date (optional) - * @return string - */ - protected function get_scheduled_date_string( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) { - $next = null === $scheduled_date ? $action->get_schedule()->next() : $scheduled_date; - if ( ! $next ) { - throw new InvalidArgumentException( __( 'Invalid schedule. Cannot save action.', 'woocommerce' ) ); - } - $next->setTimezone( new DateTimeZone( 'UTC' ) ); - - return $next->format( 'Y-m-d H:i:s' ); - } - - /** - * Get the time MySQL formated date/time string for an action's (next) scheduled date. - * - * @param ActionScheduler_Action $action - * @param DateTime $scheduled_date (optional) - * @return string - */ - protected function get_scheduled_date_string_local( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) { - $next = null === $scheduled_date ? $action->get_schedule()->next() : $scheduled_date; - if ( ! $next ) { - throw new InvalidArgumentException( __( 'Invalid schedule. Cannot save action.', 'woocommerce' ) ); - } - - ActionScheduler_TimezoneHelper::set_local_timezone( $next ); - return $next->format( 'Y-m-d H:i:s' ); - } - - /** - * @return array - */ - public function get_status_labels() { - return array( - self::STATUS_COMPLETE => __( 'Complete', 'woocommerce' ), - self::STATUS_PENDING => __( 'Pending', 'woocommerce' ), - self::STATUS_RUNNING => __( 'In-progress', 'woocommerce' ), - self::STATUS_FAILED => __( 'Failed', 'woocommerce' ), - self::STATUS_CANCELED => __( 'Canceled', 'woocommerce' ), - ); - } - - public function init() {} - - /** - * @return ActionScheduler_Store - */ - public static function instance() { - if ( empty(self::$store) ) { - $class = apply_filters('action_scheduler_store_class', 'ActionScheduler_wpPostStore'); - self::$store = new $class(); - } - return self::$store; - } - - /** - * Get the site's local time. - * - * @deprecated 2.1.0 - * @return DateTimeZone - */ - protected function get_local_timezone() { - _deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' ); - return ActionScheduler_TimezoneHelper::get_local_timezone(); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_TimezoneHelper.php b/includes/libraries/action-scheduler/classes/ActionScheduler_TimezoneHelper.php deleted file mode 100644 index fd01449412e..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_TimezoneHelper.php +++ /dev/null @@ -1,152 +0,0 @@ -format( 'U' ) ); - } - - if ( get_option( 'timezone_string' ) ) { - $date->setTimezone( new DateTimeZone( self::get_local_timezone_string() ) ); - } else { - $date->setUtcOffset( self::get_local_timezone_offset() ); - } - - return $date; - } - - /** - * Helper to retrieve the timezone string for a site until a WP core method exists - * (see https://core.trac.wordpress.org/ticket/24730). - * - * Adapted from wc_timezone_string() and https://secure.php.net/manual/en/function.timezone-name-from-abbr.php#89155. - * - * If no timezone string is set, and its not possible to match the UTC offset set for the site to a timezone - * string, then an empty string will be returned, and the UTC offset should be used to set a DateTime's - * timezone. - * - * @since 2.1.0 - * @return string PHP timezone string for the site or empty if no timezone string is available. - */ - protected static function get_local_timezone_string( $reset = false ) { - // If site timezone string exists, return it. - $timezone = get_option( 'timezone_string' ); - if ( $timezone ) { - return $timezone; - } - - // Get UTC offset, if it isn't set then return UTC. - $utc_offset = intval( get_option( 'gmt_offset', 0 ) ); - if ( 0 === $utc_offset ) { - return 'UTC'; - } - - // Adjust UTC offset from hours to seconds. - $utc_offset *= 3600; - - // Attempt to guess the timezone string from the UTC offset. - $timezone = timezone_name_from_abbr( '', $utc_offset ); - if ( $timezone ) { - return $timezone; - } - - // Last try, guess timezone string manually. - foreach ( timezone_abbreviations_list() as $abbr ) { - foreach ( $abbr as $city ) { - if ( (bool) date( 'I' ) === (bool) $city['dst'] && $city['timezone_id'] && intval( $city['offset'] ) === $utc_offset ) { - return $city['timezone_id']; - } - } - } - - // No timezone string - return ''; - } - - /** - * Get timezone offset in seconds. - * - * @since 2.1.0 - * @return float - */ - protected static function get_local_timezone_offset() { - $timezone = get_option( 'timezone_string' ); - - if ( $timezone ) { - $timezone_object = new DateTimeZone( $timezone ); - return $timezone_object->getOffset( new DateTime( 'now' ) ); - } else { - return floatval( get_option( 'gmt_offset', 0 ) ) * HOUR_IN_SECONDS; - } - } - - /** - * @deprecated 2.1.0 - */ - public static function get_local_timezone( $reset = FALSE ) { - _deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' ); - if ( $reset ) { - self::$local_timezone = NULL; - } - if ( !isset(self::$local_timezone) ) { - $tzstring = get_option('timezone_string'); - - if ( empty($tzstring) ) { - $gmt_offset = get_option('gmt_offset'); - if ( $gmt_offset == 0 ) { - $tzstring = 'UTC'; - } else { - $gmt_offset *= HOUR_IN_SECONDS; - $tzstring = timezone_name_from_abbr( '', $gmt_offset, 1 ); - - // If there's no timezone string, try again with no DST. - if ( false === $tzstring ) { - $tzstring = timezone_name_from_abbr( '', $gmt_offset, 0 ); - } - - // Try mapping to the first abbreviation we can find. - if ( false === $tzstring ) { - $is_dst = date( 'I' ); - foreach ( timezone_abbreviations_list() as $abbr ) { - foreach ( $abbr as $city ) { - if ( $city['dst'] == $is_dst && $city['offset'] == $gmt_offset ) { - // If there's no valid timezone ID, keep looking. - if ( null === $city['timezone_id'] ) { - continue; - } - - $tzstring = $city['timezone_id']; - break 2; - } - } - } - } - - // If we still have no valid string, then fall back to UTC. - if ( false === $tzstring ) { - $tzstring = 'UTC'; - } - } - } - - self::$local_timezone = new DateTimeZone($tzstring); - } - return self::$local_timezone; - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_Versions.php b/includes/libraries/action-scheduler/classes/ActionScheduler_Versions.php deleted file mode 100644 index 915c2e63297..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_Versions.php +++ /dev/null @@ -1,62 +0,0 @@ -versions[$version_string]) ) { - return FALSE; - } - $this->versions[$version_string] = $initialization_callback; - return TRUE; - } - - public function get_versions() { - return $this->versions; - } - - public function latest_version() { - $keys = array_keys($this->versions); - if ( empty($keys) ) { - return false; - } - uasort( $keys, 'version_compare' ); - return end($keys); - } - - public function latest_version_callback() { - $latest = $this->latest_version(); - if ( empty($latest) || !isset($this->versions[$latest]) ) { - return '__return_null'; - } - return $this->versions[$latest]; - } - - /** - * @return ActionScheduler_Versions - * @codeCoverageIgnore - */ - public static function instance() { - if ( empty(self::$instance) ) { - self::$instance = new self(); - } - return self::$instance; - } - - /** - * @codeCoverageIgnore - */ - public static function initialize_latest_version() { - $self = self::instance(); - call_user_func($self->latest_version_callback()); - } -} - \ No newline at end of file diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_QueueRunner.php b/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_QueueRunner.php deleted file mode 100644 index d4655e25dd7..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_QueueRunner.php +++ /dev/null @@ -1,218 +0,0 @@ -run_cleanup(); - $this->add_hooks(); - - // Check to make sure there aren't too many concurrent processes running. - $claim_count = $this->store->get_claim_count(); - $too_many = $claim_count >= $this->get_allowed_concurrent_batches(); - if ( $too_many ) { - if ( $force ) { - WP_CLI::warning( __( 'There are too many concurrent batches, but the run is forced to continue.', 'woocommerce' ) ); - } else { - WP_CLI::error( __( 'There are too many concurrent batches.', 'woocommerce' ) ); - } - } - - // Stake a claim and store it. - $this->claim = $this->store->stake_claim( $batch_size, null, $hooks, $group ); - $this->monitor->attach( $this->claim ); - $this->actions = $this->claim->get_actions(); - - return count( $this->actions ); - } - - /** - * Add our hooks to the appropriate actions. - * - * @author Jeremy Pry - */ - protected function add_hooks() { - add_action( 'action_scheduler_before_execute', array( $this, 'before_execute' ) ); - add_action( 'action_scheduler_after_execute', array( $this, 'after_execute' ), 10, 2 ); - add_action( 'action_scheduler_failed_execution', array( $this, 'action_failed' ), 10, 2 ); - } - - /** - * Set up the WP CLI progress bar. - * - * @author Jeremy Pry - */ - protected function setup_progress_bar() { - $count = count( $this->actions ); - $this->progress_bar = \WP_CLI\Utils\make_progress_bar( - sprintf( _n( 'Running %d action', 'Running %d actions', $count, 'woocommerce' ), number_format_i18n( $count ) ), - $count - ); - } - - /** - * Process actions in the queue. - * - * @author Jeremy Pry - * @return int The number of actions processed. - */ - public function run() { - do_action( 'action_scheduler_before_process_queue' ); - $this->setup_progress_bar(); - foreach ( $this->actions as $action_id ) { - // Error if we lost the claim. - if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $this->claim->get_id() ) ) ) { - WP_CLI::warning( __( 'The claim has been lost. Aborting current batch.', 'woocommerce' ) ); - break; - } - - $this->process_action( $action_id ); - $this->progress_bar->tick(); - $this->maybe_stop_the_insanity(); - } - - $completed = $this->progress_bar->current(); - $this->progress_bar->finish(); - $this->store->release_claim( $this->claim ); - do_action( 'action_scheduler_after_process_queue' ); - - return $completed; - } - - /** - * Handle WP CLI message when the action is starting. - * - * @author Jeremy Pry - * - * @param $action_id - */ - public function before_execute( $action_id ) { - /* translators: %s refers to the action ID */ - WP_CLI::log( sprintf( __( 'Started processing action %s', 'woocommerce' ), $action_id ) ); - } - - /** - * Handle WP CLI message when the action has completed. - * - * @author Jeremy Pry - * - * @param int $action_id - * @param null|ActionScheduler_Action $action The instance of the action. Default to null for backward compatibility. - */ - public function after_execute( $action_id, $action = null ) { - // backward compatibility - if ( null === $action ) { - $action = $this->store->fetch_action( $action_id ); - } - /* translators: %s refers to the action ID */ - WP_CLI::log( sprintf( __( 'Completed processing action %s with hook: %s', 'woocommerce' ), $action_id, $action->get_hook() ) ); - } - - /** - * Handle WP CLI message when the action has failed. - * - * @author Jeremy Pry - * - * @param int $action_id - * @param Exception $exception - * @throws \WP_CLI\ExitException With failure message. - */ - public function action_failed( $action_id, $exception ) { - WP_CLI::error( - /* translators: %1$s refers to the action ID, %2$s refers to the Exception message */ - sprintf( __( 'Error processing action %1$s: %2$s', 'woocommerce' ), $action_id, $exception->getMessage() ), - false - ); - } - - /** - * Sleep and help avoid hitting memory limit - * - * @param int $sleep_time Amount of seconds to sleep - */ - protected function stop_the_insanity( $sleep_time = 0 ) { - if ( 0 < $sleep_time ) { - /* translators: 1: sleep time 2: time unit */ - WP_CLI::warning( sprintf( __( 'Stopped the insanity for %$1d %$2s', 'woocommerce' ), $sleep_time, _n( 'second', 'seconds', $sleep_time, 'woocommerce' ) ) ); - sleep( $sleep_time ); - } - - WP_CLI::warning( __( 'Attempting to reduce used memory...', 'woocommerce' ) ); - - /** - * @var $wpdb \wpdb - * @var $wp_object_cache \WP_Object_Cache - */ - global $wpdb, $wp_object_cache; - - $wpdb->queries = array(); - - if ( ! is_object( $wp_object_cache ) ) { - return; - } - - $wp_object_cache->group_ops = array(); - $wp_object_cache->stats = array(); - $wp_object_cache->memcache_debug = array(); - $wp_object_cache->cache = array(); - - if ( is_callable( array( $wp_object_cache, '__remoteset' ) ) ) { - call_user_func( array( $wp_object_cache, '__remoteset' ) ); // important - } - } - - /** - * Maybe trigger the stop_the_insanity() method to free up memory. - */ - protected function maybe_stop_the_insanity() { - // The value returned by progress_bar->current() might be padded. Remove padding, and convert to int. - $current_iteration = intval( trim( $this->progress_bar->current() ) ); - if ( 0 === $current_iteration % 50 ) { - $this->stop_the_insanity(); - } - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_Scheduler_command.php b/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_Scheduler_command.php deleted file mode 100644 index 316dcb2384a..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_WPCLI_Scheduler_command.php +++ /dev/null @@ -1,145 +0,0 @@ -] - * : The maximum number of actions to run. Defaults to 100. - * - * [--batches=] - * : Limit execution to a number of batches. Defaults to 0, meaning batches will continue being executed until all actions are complete. - * - * [--cleanup-batch-size=] - * : The maximum number of actions to clean up. Defaults to the value of --batch-size. - * - * [--hooks=] - * : Only run actions with the specified hook. Omitting this option runs actions with any hook. Define multiple hooks as a comma separated string (without spaces), e.g. `--hooks=hook_one,hook_two,hook_three` - * - * [--group=] - * : Only run actions from the specified group. Omitting this option runs actions from all groups. - * - * [--force] - * : Whether to force execution despite the maximum number of concurrent processes being exceeded. - * - * @param array $args Positional arguments. - * @param array $assoc_args Keyed arguments. - * @throws \WP_CLI\ExitException When an error occurs. - */ - public function run( $args, $assoc_args ) { - // Handle passed arguments. - $batch = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batch-size', 100 ) ); - $batches = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batches', 0 ) ); - $clean = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'cleanup-batch-size', $batch ) ); - $hooks = explode( ',', WP_CLI\Utils\get_flag_value( $assoc_args, 'hooks', '' ) ); - $hooks = array_filter( array_map( 'trim', $hooks ) ); - $group = \WP_CLI\Utils\get_flag_value( $assoc_args, 'group', '' ); - $force = \WP_CLI\Utils\get_flag_value( $assoc_args, 'force', false ); - - $batches_completed = 0; - $actions_completed = 0; - $unlimited = $batches === 0; - - try { - // Custom queue cleaner instance. - $cleaner = new ActionScheduler_QueueCleaner( null, $clean ); - - // Get the queue runner instance - $runner = new ActionScheduler_WPCLI_QueueRunner( null, null, $cleaner ); - - // Determine how many tasks will be run in the first batch. - $total = $runner->setup( $batch, $hooks, $group, $force ); - - // Run actions for as long as possible. - while ( $total > 0 ) { - $this->print_total_actions( $total ); - $actions_completed += $runner->run(); - $batches_completed++; - - // Maybe set up tasks for the next batch. - $total = ( $unlimited || $batches_completed < $batches ) ? $runner->setup( $batch, $hooks, $group, $force ) : 0; - } - } catch ( Exception $e ) { - $this->print_error( $e ); - } - - $this->print_total_batches( $batches_completed ); - $this->print_success( $actions_completed ); - } - - /** - * Print WP CLI message about how many actions are about to be processed. - * - * @author Jeremy Pry - * - * @param int $total - */ - protected function print_total_actions( $total ) { - WP_CLI::log( - sprintf( - /* translators: %d refers to how many scheduled taks were found to run */ - _n( 'Found %d scheduled task', 'Found %d scheduled tasks', $total, 'woocommerce' ), - number_format_i18n( $total ) - ) - ); - } - - /** - * Print WP CLI message about how many batches of actions were processed. - * - * @author Jeremy Pry - * - * @param int $batches_completed - */ - protected function print_total_batches( $batches_completed ) { - WP_CLI::log( - sprintf( - /* translators: %d refers to the total number of batches executed */ - _n( '%d batch executed.', '%d batches executed.', $batches_completed, 'woocommerce' ), - number_format_i18n( $batches_completed ) - ) - ); - } - - /** - * Convert an exception into a WP CLI error. - * - * @author Jeremy Pry - * - * @param Exception $e The error object. - * - * @throws \WP_CLI\ExitException - */ - protected function print_error( Exception $e ) { - WP_CLI::error( - sprintf( - /* translators: %s refers to the exception error message. */ - __( 'There was an error running the action scheduler: %s', 'woocommerce' ), - $e->getMessage() - ) - ); - } - - /** - * Print a success message with the number of completed actions. - * - * @author Jeremy Pry - * - * @param int $actions_completed - */ - protected function print_success( $actions_completed ) { - WP_CLI::success( - sprintf( - /* translators: %d refers to the total number of taskes completed */ - _n( '%d scheduled task completed.', '%d scheduled tasks completed.', $actions_completed, 'woocommerce' ), - number_format_i18n( $actions_completed ) - ) - ); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_wcSystemStatus.php b/includes/libraries/action-scheduler/classes/ActionScheduler_wcSystemStatus.php deleted file mode 100644 index 37c18f5031d..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_wcSystemStatus.php +++ /dev/null @@ -1,147 +0,0 @@ -store = $store; - } - - /** - * Display action data, including number of actions grouped by status and the oldest & newest action in each status. - * - * Helpful to identify issues, like a clogged queue. - */ - public function render() { - $action_counts = $this->store->action_counts(); - $status_labels = $this->store->get_status_labels(); - $oldest_and_newest = $this->get_oldest_and_newest( array_keys( $status_labels ) ); - - $this->get_template( $status_labels, $action_counts, $oldest_and_newest ); - } - - /** - * Get oldest and newest scheduled dates for a given set of statuses. - * - * @param array $status_keys Set of statuses to find oldest & newest action for. - * @return array - */ - protected function get_oldest_and_newest( $status_keys ) { - - $oldest_and_newest = array(); - - foreach ( $status_keys as $status ) { - $oldest_and_newest[ $status ] = array( - 'oldest' => '–', - 'newest' => '–', - ); - - if ( 'in-progress' === $status ) { - continue; - } - - $oldest_and_newest[ $status ]['oldest'] = $this->get_action_status_date( $status, 'oldest' ); - $oldest_and_newest[ $status ]['newest'] = $this->get_action_status_date( $status, 'newest' ); - } - - return $oldest_and_newest; - } - - /** - * Get oldest or newest scheduled date for a given status. - * - * @param string $status Action status label/name string. - * @param string $date_type Oldest or Newest. - * @return DateTime - */ - protected function get_action_status_date( $status, $date_type = 'oldest' ) { - - $order = 'oldest' === $date_type ? 'ASC' : 'DESC'; - - $action = $this->store->query_actions( array( - 'claimed' => false, - 'status' => $status, - 'per_page' => 1, - 'order' => $order, - ) ); - - if ( ! empty( $action ) ) { - $date_object = $this->store->get_date( $action[0] ); - $action_date = $date_object->format( 'Y-m-d H:i:s O' ); - } else { - $action_date = '–'; - } - - return $action_date; - } - - /** - * Get oldest or newest scheduled date for a given status. - * - * @param array $status_labels Set of statuses to find oldest & newest action for. - * @param array $action_counts Number of actions grouped by status. - * @param array $oldest_and_newest Date of the oldest and newest action with each status. - */ - protected function get_template( $status_labels, $action_counts, $oldest_and_newest ) { - ?> - - - - - - - - - - - - - - - - $count ) { - // WC uses the 3rd column for export, so we need to display more data in that (hidden when viewed as part of the table) and add an empty 2nd column. - printf( - '', - esc_html( $status_labels[ $status ] ), - number_format_i18n( $count ), - $oldest_and_newest[ $status ]['oldest'], - $oldest_and_newest[ $status ]['newest'] - ); - } - ?> - -

     
    %1$s %2$s, Oldest: %3$s, Newest: %4$s%3$s%4$s
    - - create_wp_comment( $action_id, $message, $date ); - return $comment_id; - } - - protected function create_wp_comment( $action_id, $message, DateTime $date ) { - - $comment_date_gmt = $date->format('Y-m-d H:i:s'); - ActionScheduler_TimezoneHelper::set_local_timezone( $date ); - $comment_data = array( - 'comment_post_ID' => $action_id, - 'comment_date' => $date->format('Y-m-d H:i:s'), - 'comment_date_gmt' => $comment_date_gmt, - 'comment_author' => self::AGENT, - 'comment_content' => $message, - 'comment_agent' => self::AGENT, - 'comment_type' => self::TYPE, - ); - return wp_insert_comment($comment_data); - } - - /** - * @param string $entry_id - * - * @return ActionScheduler_LogEntry - */ - public function get_entry( $entry_id ) { - $comment = $this->get_comment( $entry_id ); - if ( empty($comment) || $comment->comment_type != self::TYPE ) { - return new ActionScheduler_NullLogEntry(); - } - - $date = as_get_datetime_object( $comment->comment_date_gmt ); - ActionScheduler_TimezoneHelper::set_local_timezone( $date ); - return new ActionScheduler_LogEntry( $comment->comment_post_ID, $comment->comment_content, $date ); - } - - /** - * @param string $action_id - * - * @return ActionScheduler_LogEntry[] - */ - public function get_logs( $action_id ) { - $status = 'all'; - if ( get_post_status($action_id) == 'trash' ) { - $status = 'post-trashed'; - } - $comments = get_comments(array( - 'post_id' => $action_id, - 'orderby' => 'comment_date_gmt', - 'order' => 'ASC', - 'type' => self::TYPE, - 'status' => $status, - )); - $logs = array(); - foreach ( $comments as $c ) { - $entry = $this->get_entry( $c ); - if ( !empty($entry) ) { - $logs[] = $entry; - } - } - return $logs; - } - - protected function get_comment( $comment_id ) { - return get_comment( $comment_id ); - } - - - - /** - * @param WP_Comment_Query $query - */ - public function filter_comment_queries( $query ) { - foreach ( array('ID', 'parent', 'post_author', 'post_name', 'post_parent', 'type', 'post_type', 'post_id', 'post_ID') as $key ) { - if ( !empty($query->query_vars[$key]) ) { - return; // don't slow down queries that wouldn't include action_log comments anyway - } - } - $query->query_vars['action_log_filter'] = TRUE; - add_filter( 'comments_clauses', array( $this, 'filter_comment_query_clauses' ), 10, 2 ); - } - - /** - * @param array $clauses - * @param WP_Comment_Query $query - * - * @return array - */ - public function filter_comment_query_clauses( $clauses, $query ) { - if ( !empty($query->query_vars['action_log_filter']) ) { - $clauses['where'] .= $this->get_where_clause(); - } - return $clauses; - } - - /** - * Make sure Action Scheduler logs are excluded from comment feeds, which use WP_Query, not - * the WP_Comment_Query class handled by @see self::filter_comment_queries(). - * - * @param string $where - * @param WP_Query $query - * - * @return string - */ - public function filter_comment_feed( $where, $query ) { - if ( is_comment_feed() ) { - $where .= $this->get_where_clause(); - } - return $where; - } - - /** - * Return a SQL clause to exclude Action Scheduler comments. - * - * @return string - */ - protected function get_where_clause() { - global $wpdb; - return sprintf( " AND {$wpdb->comments}.comment_type != '%s'", self::TYPE ); - } - - /** - * Remove action log entries from wp_count_comments() - * - * @param array $stats - * @param int $post_id - * - * @return object - */ - public function filter_comment_count( $stats, $post_id ) { - global $wpdb; - - if ( 0 === $post_id ) { - $stats = $this->get_comment_count(); - } - - return $stats; - } - - /** - * Retrieve the comment counts from our cache, or the database if the cached version isn't set. - * - * @return object - */ - protected function get_comment_count() { - global $wpdb; - - $stats = get_transient( 'as_comment_count' ); - - if ( ! $stats ) { - $stats = array(); - - $count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} WHERE comment_type NOT IN('order_note','action_log') GROUP BY comment_approved", ARRAY_A ); - - $total = 0; - $stats = array(); - $approved = array( '0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed' ); - - foreach ( (array) $count as $row ) { - // Don't count post-trashed toward totals - if ( 'post-trashed' != $row['comment_approved'] && 'trash' != $row['comment_approved'] ) { - $total += $row['num_comments']; - } - if ( isset( $approved[ $row['comment_approved'] ] ) ) { - $stats[ $approved[ $row['comment_approved'] ] ] = $row['num_comments']; - } - } - - $stats['total_comments'] = $total; - $stats['all'] = $total; - - foreach ( $approved as $key ) { - if ( empty( $stats[ $key ] ) ) { - $stats[ $key ] = 0; - } - } - - $stats = (object) $stats; - set_transient( 'as_comment_count', $stats ); - } - - return $stats; - } - - /** - * Delete comment count cache whenever there is new comment or the status of a comment changes. Cache - * will be regenerated next time ActionScheduler_wpCommentLogger::filter_comment_count() is called. - */ - public function delete_comment_count_cache() { - delete_transient( 'as_comment_count' ); - } - - /** - * @codeCoverageIgnore - */ - public function init() { - add_action( 'action_scheduler_before_process_queue', array( $this, 'disable_comment_counting' ), 10, 0 ); - add_action( 'action_scheduler_after_process_queue', array( $this, 'enable_comment_counting' ), 10, 0 ); - - parent::init(); - - add_action( 'pre_get_comments', array( $this, 'filter_comment_queries' ), 10, 1 ); - add_action( 'wp_count_comments', array( $this, 'filter_comment_count' ), 20, 2 ); // run after WC_Comments::wp_count_comments() to make sure we exclude order notes and action logs - add_action( 'comment_feed_where', array( $this, 'filter_comment_feed' ), 10, 2 ); - - // Delete comments count cache whenever there is a new comment or a comment status changes - add_action( 'wp_insert_comment', array( $this, 'delete_comment_count_cache' ) ); - add_action( 'wp_set_comment_status', array( $this, 'delete_comment_count_cache' ) ); - } - - public function disable_comment_counting() { - wp_defer_comment_counting(true); - } - public function enable_comment_counting() { - wp_defer_comment_counting(false); - } - -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php b/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php deleted file mode 100644 index cc170ec7309..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php +++ /dev/null @@ -1,821 +0,0 @@ -validate_action( $action ); - $post_array = $this->create_post_array( $action, $scheduled_date ); - $post_id = $this->save_post_array( $post_array ); - $schedule = $action->get_schedule(); - - if ( ! is_null( $scheduled_date ) && $schedule->is_recurring() ) { - $schedule = new ActionScheduler_IntervalSchedule( $scheduled_date, $schedule->interval_in_seconds() ); - } - - $this->save_post_schedule( $post_id, $schedule ); - $this->save_action_group( $post_id, $action->get_group() ); - do_action( 'action_scheduler_stored_action', $post_id ); - return $post_id; - } catch ( Exception $e ) { - throw new RuntimeException( sprintf( __('Error saving action: %s', 'woocommerce'), $e->getMessage() ), 0 ); - } - } - - protected function create_post_array( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) { - $post = array( - 'post_type' => self::POST_TYPE, - 'post_title' => $action->get_hook(), - 'post_content' => json_encode($action->get_args()), - 'post_status' => ( $action->is_finished() ? 'publish' : 'pending' ), - 'post_date_gmt' => $this->get_scheduled_date_string( $action, $scheduled_date ), - 'post_date' => $this->get_scheduled_date_string_local( $action, $scheduled_date ), - ); - return $post; - } - - protected function save_post_array( $post_array ) { - add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 ); - add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 ); - $post_id = wp_insert_post($post_array); - remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 ); - remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 ); - - if ( is_wp_error($post_id) || empty($post_id) ) { - throw new RuntimeException(__('Unable to save action.', 'woocommerce')); - } - return $post_id; - } - - public function filter_insert_post_data( $postdata ) { - if ( $postdata['post_type'] == self::POST_TYPE ) { - $postdata['post_author'] = 0; - if ( $postdata['post_status'] == 'future' ) { - $postdata['post_status'] = 'publish'; - } - } - return $postdata; - } - - /** - * Create a (probably unique) post name for scheduled actions in a more performant manner than wp_unique_post_slug(). - * - * When an action's post status is transitioned to something other than 'draft', 'pending' or 'auto-draft, like 'publish' - * or 'failed' or 'trash', WordPress will find a unique slug (stored in post_name column) using the wp_unique_post_slug() - * function. This is done to ensure URL uniqueness. The approach taken by wp_unique_post_slug() is to iterate over existing - * post_name values that match, and append a number 1 greater than the largest. This makes sense when manually creating a - * post from the Edit Post screen. It becomes a bottleneck when automatically processing thousands of actions, with a - * database containing thousands of related post_name values. - * - * WordPress 5.1 introduces the 'pre_wp_unique_post_slug' filter for plugins to address this issue. - * - * We can short-circuit WordPress's wp_unique_post_slug() approach using the 'pre_wp_unique_post_slug' filter. This - * method is available to be used as a callback on that filter. It provides a more scalable approach to generating a - * post_name/slug that is probably unique. Because Action Scheduler never actually uses the post_name field, or an - * action's slug, being probably unique is good enough. - * - * For more backstory on this issue, see: - * - https://github.com/Prospress/action-scheduler/issues/44 and - * - https://core.trac.wordpress.org/ticket/21112 - * - * @param string $override_slug Short-circuit return value. - * @param string $slug The desired slug (post_name). - * @param int $post_ID Post ID. - * @param string $post_status The post status. - * @param string $post_type Post type. - * @return string - */ - public function set_unique_post_slug( $override_slug, $slug, $post_ID, $post_status, $post_type ) { - if ( self::POST_TYPE == $post_type ) { - $override_slug = uniqid( self::POST_TYPE . '-', true ) . '-' . wp_generate_password( 32, false ); - } - return $override_slug; - } - - protected function save_post_schedule( $post_id, $schedule ) { - update_post_meta( $post_id, self::SCHEDULE_META_KEY, $schedule ); - } - - protected function save_action_group( $post_id, $group ) { - if ( empty($group) ) { - wp_set_object_terms( $post_id, array(), self::GROUP_TAXONOMY, FALSE ); - } else { - wp_set_object_terms( $post_id, array($group), self::GROUP_TAXONOMY, FALSE ); - } - } - - public function fetch_action( $action_id ) { - $post = $this->get_post( $action_id ); - if ( empty($post) || $post->post_type != self::POST_TYPE ) { - return $this->get_null_action(); - } - return $this->make_action_from_post($post); - } - - protected function get_post( $action_id ) { - if ( empty($action_id) ) { - return NULL; - } - return get_post($action_id); - } - - protected function get_null_action() { - return new ActionScheduler_NullAction(); - } - - protected function make_action_from_post( $post ) { - $hook = $post->post_title; - - try { - $args = json_decode( $post->post_content, true ); - $this->validate_args( $args, $post->ID ); - - $schedule = get_post_meta( $post->ID, self::SCHEDULE_META_KEY, true ); - if ( empty( $schedule ) || ! is_a( $schedule, 'ActionScheduler_Schedule' ) ) { - throw ActionScheduler_InvalidActionException::from_decoding_args( $post->ID ); - } - } catch ( ActionScheduler_InvalidActionException $exception ) { - $schedule = new ActionScheduler_NullSchedule(); - $args = array(); - do_action( 'action_scheduler_failed_fetch_action', $post->ID ); - } - - $group = wp_get_object_terms( $post->ID, self::GROUP_TAXONOMY, array('fields' => 'names') ); - $group = empty( $group ) ? '' : reset($group); - - return ActionScheduler::factory()->get_stored_action( $this->get_action_status_by_post_status( $post->post_status ), $hook, $args, $schedule, $group ); - } - - /** - * @param string $post_status - * - * @throws InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels() - * @return string - */ - protected function get_action_status_by_post_status( $post_status ) { - - switch ( $post_status ) { - case 'publish' : - $action_status = self::STATUS_COMPLETE; - break; - case 'trash' : - $action_status = self::STATUS_CANCELED; - break; - default : - if ( ! array_key_exists( $post_status, $this->get_status_labels() ) ) { - throw new InvalidArgumentException( sprintf( 'Invalid post status: "%s". No matching action status available.', $post_status ) ); - } - $action_status = $post_status; - break; - } - - return $action_status; - } - - /** - * @param string $action_status - * @throws InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels() - * @return string - */ - protected function get_post_status_by_action_status( $action_status ) { - - switch ( $action_status ) { - case self::STATUS_COMPLETE : - $post_status = 'publish'; - break; - case self::STATUS_CANCELED : - $post_status = 'trash'; - break; - default : - if ( ! array_key_exists( $action_status, $this->get_status_labels() ) ) { - throw new InvalidArgumentException( sprintf( 'Invalid action status: "%s".', $action_status ) ); - } - $post_status = $action_status; - break; - } - - return $post_status; - } - - /** - * @param string $hook - * @param array $params - * - * @return string ID of the next action matching the criteria or NULL if not found - */ - public function find_action( $hook, $params = array() ) { - $params = wp_parse_args( $params, array( - 'args' => NULL, - 'status' => ActionScheduler_Store::STATUS_PENDING, - 'group' => '', - )); - /** @var wpdb $wpdb */ - global $wpdb; - $query = "SELECT p.ID FROM {$wpdb->posts} p"; - $args = array(); - if ( !empty($params['group']) ) { - $query .= " INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID"; - $query .= " INNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id"; - $query .= " INNER JOIN {$wpdb->terms} t ON tt.term_id=t.term_id AND t.slug=%s"; - $args[] = $params['group']; - } - $query .= " WHERE p.post_title=%s"; - $args[] = $hook; - $query .= " AND p.post_type=%s"; - $args[] = self::POST_TYPE; - if ( !is_null($params['args']) ) { - $query .= " AND p.post_content=%s"; - $args[] = json_encode($params['args']); - } - - if ( ! empty( $params['status'] ) ) { - $query .= " AND p.post_status=%s"; - $args[] = $this->get_post_status_by_action_status( $params['status'] ); - } - - switch ( $params['status'] ) { - case self::STATUS_COMPLETE: - case self::STATUS_RUNNING: - case self::STATUS_FAILED: - $order = 'DESC'; // Find the most recent action that matches - break; - case self::STATUS_PENDING: - default: - $order = 'ASC'; // Find the next action that matches - break; - } - $query .= " ORDER BY post_date_gmt $order LIMIT 1"; - - $query = $wpdb->prepare( $query, $args ); - - $id = $wpdb->get_var($query); - return $id; - } - - /** - * Returns the SQL statement to query (or count) actions. - * - * @param array $query Filtering options - * @param string $select_or_count Whether the SQL should select and return the IDs or just the row count - * @throws InvalidArgumentException if $select_or_count not count or select - * @return string SQL statement. The returned SQL is already properly escaped. - */ - protected function get_query_actions_sql( array $query, $select_or_count = 'select' ) { - - if ( ! in_array( $select_or_count, array( 'select', 'count' ) ) ) { - throw new InvalidArgumentException(__('Invalid schedule. Cannot save action.', 'woocommerce')); - } - - $query = wp_parse_args( $query, array( - 'hook' => '', - 'args' => NULL, - 'date' => NULL, - 'date_compare' => '<=', - 'modified' => NULL, - 'modified_compare' => '<=', - 'group' => '', - 'status' => '', - 'claimed' => NULL, - 'per_page' => 5, - 'offset' => 0, - 'orderby' => 'date', - 'order' => 'ASC', - 'search' => '', - ) ); - - /** @var wpdb $wpdb */ - global $wpdb; - $sql = ( 'count' === $select_or_count ) ? 'SELECT count(p.ID)' : 'SELECT p.ID '; - $sql .= "FROM {$wpdb->posts} p"; - $sql_params = array(); - if ( ! empty( $query['group'] ) || 'group' === $query['orderby'] ) { - $sql .= " INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID"; - $sql .= " INNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id"; - $sql .= " INNER JOIN {$wpdb->terms} t ON tt.term_id=t.term_id"; - - if ( ! empty( $query['group'] ) ) { - $sql .= " AND t.slug=%s"; - $sql_params[] = $query['group']; - } - } - $sql .= " WHERE post_type=%s"; - $sql_params[] = self::POST_TYPE; - if ( $query['hook'] ) { - $sql .= " AND p.post_title=%s"; - $sql_params[] = $query['hook']; - } - if ( !is_null($query['args']) ) { - $sql .= " AND p.post_content=%s"; - $sql_params[] = json_encode($query['args']); - } - - if ( ! empty( $query['status'] ) ) { - $sql .= " AND p.post_status=%s"; - $sql_params[] = $this->get_post_status_by_action_status( $query['status'] ); - } - - if ( $query['date'] instanceof DateTime ) { - $date = clone $query['date']; - $date->setTimezone( new DateTimeZone('UTC') ); - $date_string = $date->format('Y-m-d H:i:s'); - $comparator = $this->validate_sql_comparator($query['date_compare']); - $sql .= " AND p.post_date_gmt $comparator %s"; - $sql_params[] = $date_string; - } - - if ( $query['modified'] instanceof DateTime ) { - $modified = clone $query['modified']; - $modified->setTimezone( new DateTimeZone('UTC') ); - $date_string = $modified->format('Y-m-d H:i:s'); - $comparator = $this->validate_sql_comparator($query['modified_compare']); - $sql .= " AND p.post_modified_gmt $comparator %s"; - $sql_params[] = $date_string; - } - - if ( $query['claimed'] === TRUE ) { - $sql .= " AND p.post_password != ''"; - } elseif ( $query['claimed'] === FALSE ) { - $sql .= " AND p.post_password = ''"; - } elseif ( !is_null($query['claimed']) ) { - $sql .= " AND p.post_password = %s"; - $sql_params[] = $query['claimed']; - } - - if ( ! empty( $query['search'] ) ) { - $sql .= " AND (p.post_title LIKE %s OR p.post_content LIKE %s OR p.post_password LIKE %s)"; - for( $i = 0; $i < 3; $i++ ) { - $sql_params[] = sprintf( '%%%s%%', $query['search'] ); - } - } - - if ( 'select' === $select_or_count ) { - switch ( $query['orderby'] ) { - case 'hook': - $orderby = 'p.post_title'; - break; - case 'group': - $orderby = 't.name'; - break; - case 'status': - $orderby = 'p.post_status'; - break; - case 'modified': - $orderby = 'p.post_modified'; - break; - case 'claim_id': - $orderby = 'p.post_password'; - break; - case 'schedule': - case 'date': - default: - $orderby = 'p.post_date_gmt'; - break; - } - if ( 'ASC' === strtoupper( $query['order'] ) ) { - $order = 'ASC'; - } else { - $order = 'DESC'; - } - $sql .= " ORDER BY $orderby $order"; - if ( $query['per_page'] > 0 ) { - $sql .= " LIMIT %d, %d"; - $sql_params[] = $query['offset']; - $sql_params[] = $query['per_page']; - } - } - - return $wpdb->prepare( $sql, $sql_params ); - } - - /** - * @param array $query - * @param string $query_type Whether to select or count the results. Default, select. - * @return string|array The IDs of actions matching the query - */ - public function query_actions( $query = array(), $query_type = 'select' ) { - /** @var wpdb $wpdb */ - global $wpdb; - - $sql = $this->get_query_actions_sql( $query, $query_type ); - - return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql ); - } - - /** - * Get a count of all actions in the store, grouped by status - * - * @return array - */ - public function action_counts() { - - $action_counts_by_status = array(); - $action_stati_and_labels = $this->get_status_labels(); - $posts_count_by_status = (array) wp_count_posts( self::POST_TYPE, 'readable' ); - - foreach ( $posts_count_by_status as $post_status_name => $count ) { - - try { - $action_status_name = $this->get_action_status_by_post_status( $post_status_name ); - } catch ( Exception $e ) { - // Ignore any post statuses that aren't for actions - continue; - } - if ( array_key_exists( $action_status_name, $action_stati_and_labels ) ) { - $action_counts_by_status[ $action_status_name ] = $count; - } - } - - return $action_counts_by_status; - } - - /** - * @param string $action_id - * - * @throws InvalidArgumentException - */ - public function cancel_action( $action_id ) { - $post = get_post($action_id); - if ( empty($post) || ($post->post_type != self::POST_TYPE) ) { - throw new InvalidArgumentException(sprintf(__('Unidentified action %s', 'woocommerce'), $action_id)); - } - do_action( 'action_scheduler_canceled_action', $action_id ); - add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 ); - wp_trash_post($action_id); - remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 ); - } - - public function delete_action( $action_id ) { - $post = get_post($action_id); - if ( empty($post) || ($post->post_type != self::POST_TYPE) ) { - throw new InvalidArgumentException(sprintf(__('Unidentified action %s', 'woocommerce'), $action_id)); - } - do_action( 'action_scheduler_deleted_action', $action_id ); - wp_delete_post($action_id, TRUE); - } - - /** - * @param string $action_id - * - * @throws InvalidArgumentException - * @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran. - */ - public function get_date( $action_id ) { - $next = $this->get_date_gmt( $action_id ); - return ActionScheduler_TimezoneHelper::set_local_timezone( $next ); - } - - /** - * @param string $action_id - * - * @throws InvalidArgumentException - * @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran. - */ - public function get_date_gmt( $action_id ) { - $post = get_post($action_id); - if ( empty($post) || ($post->post_type != self::POST_TYPE) ) { - throw new InvalidArgumentException(sprintf(__('Unidentified action %s', 'woocommerce'), $action_id)); - } - if ( $post->post_status == 'publish' ) { - return as_get_datetime_object($post->post_modified_gmt); - } else { - return as_get_datetime_object($post->post_date_gmt); - } - } - - /** - * @param int $max_actions - * @param DateTime $before_date Jobs must be schedule before this date. Defaults to now. - * @param array $hooks Claim only actions with a hook or hooks. - * @param string $group Claim only actions in the given group. - * - * @return ActionScheduler_ActionClaim - * @throws RuntimeException When there is an error staking a claim. - * @throws InvalidArgumentException When the given group is not valid. - */ - public function stake_claim( $max_actions = 10, DateTime $before_date = null, $hooks = array(), $group = '' ) { - $claim_id = $this->generate_claim_id(); - $this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group ); - $action_ids = $this->find_actions_by_claim_id( $claim_id ); - - return new ActionScheduler_ActionClaim( $claim_id, $action_ids ); - } - - /** - * @return int - */ - public function get_claim_count(){ - global $wpdb; - - $sql = "SELECT COUNT(DISTINCT post_password) FROM {$wpdb->posts} WHERE post_password != '' AND post_type = %s AND post_status IN ('in-progress','pending')"; - $sql = $wpdb->prepare( $sql, array( self::POST_TYPE ) ); - - return $wpdb->get_var( $sql ); - } - - protected function generate_claim_id() { - $claim_id = md5(microtime(true) . rand(0,1000)); - return substr($claim_id, 0, 20); // to fit in db field with 20 char limit - } - - /** - * @param string $claim_id - * @param int $limit - * @param DateTime $before_date Should use UTC timezone. - * @param array $hooks Claim only actions with a hook or hooks. - * @param string $group Claim only actions in the given group. - * - * @return int The number of actions that were claimed - * @throws RuntimeException When there is a database error. - * @throws InvalidArgumentException When the group is invalid. - */ - protected function claim_actions( $claim_id, $limit, DateTime $before_date = null, $hooks = array(), $group = '' ) { - // Set up initial variables. - $date = null === $before_date ? as_get_datetime_object() : clone $before_date; - $limit_ids = ! empty( $group ); - $ids = $limit_ids ? $this->get_actions_by_group( $group, $limit, $date ) : array(); - - // If limiting by IDs and no posts found, then return early since we have nothing to update. - if ( $limit_ids && 0 === count( $ids ) ) { - return 0; - } - - /** @var wpdb $wpdb */ - global $wpdb; - - /* - * Build up custom query to update the affected posts. Parameters are built as a separate array - * to make it easier to identify where they are in the query. - * - * We can't use $wpdb->update() here because of the "ID IN ..." clause. - */ - $update = "UPDATE {$wpdb->posts} SET post_password = %s, post_modified_gmt = %s, post_modified = %s"; - $params = array( - $claim_id, - current_time( 'mysql', true ), - current_time( 'mysql' ), - ); - - // Build initial WHERE clause. - $where = "WHERE post_type = %s AND post_status = %s AND post_password = ''"; - $params[] = self::POST_TYPE; - $params[] = ActionScheduler_Store::STATUS_PENDING; - - if ( ! empty( $hooks ) ) { - $placeholders = array_fill( 0, count( $hooks ), '%s' ); - $where .= ' AND post_title IN (' . join( ', ', $placeholders ) . ')'; - $params = array_merge( $params, array_values( $hooks ) ); - } - - /* - * Add the IDs to the WHERE clause. IDs not escaped because they came directly from a prior DB query. - * - * If we're not limiting by IDs, then include the post_date_gmt clause. - */ - if ( $limit_ids ) { - $where .= ' AND ID IN (' . join( ',', $ids ) . ')'; - } else { - $where .= ' AND post_date_gmt <= %s'; - $params[] = $date->format( 'Y-m-d H:i:s' ); - } - - // Add the ORDER BY clause and,ms limit. - $order = 'ORDER BY menu_order ASC, post_date_gmt ASC, ID ASC LIMIT %d'; - $params[] = $limit; - - // Run the query and gather results. - $rows_affected = $wpdb->query( $wpdb->prepare( "{$update} {$where} {$order}", $params ) ); - if ( $rows_affected === false ) { - throw new RuntimeException( __( 'Unable to claim actions. Database error.', 'woocommerce' ) ); - } - - return (int) $rows_affected; - } - - /** - * Get IDs of actions within a certain group and up to a certain date/time. - * - * @param string $group The group to use in finding actions. - * @param int $limit The number of actions to retrieve. - * @param DateTime $date DateTime object representing cutoff time for actions. Actions retrieved will be - * up to and including this DateTime. - * - * @return array IDs of actions in the appropriate group and before the appropriate time. - * @throws InvalidArgumentException When the group does not exist. - */ - protected function get_actions_by_group( $group, $limit, DateTime $date ) { - // Ensure the group exists before continuing. - if ( ! term_exists( $group, self::GROUP_TAXONOMY )) { - throw new InvalidArgumentException( sprintf( __( 'The group "%s" does not exist.', 'woocommerce' ), $group ) ); - } - - // Set up a query for post IDs to use later. - $query = new WP_Query(); - $query_args = array( - 'fields' => 'ids', - 'post_type' => self::POST_TYPE, - 'post_status' => ActionScheduler_Store::STATUS_PENDING, - 'has_password' => false, - 'posts_per_page' => $limit * 3, - 'suppress_filters' => true, - 'no_found_rows' => true, - 'orderby' => array( - 'menu_order' => 'ASC', - 'date' => 'ASC', - 'ID' => 'ASC', - ), - 'date_query' => array( - 'column' => 'post_date_gmt', - 'before' => $date->format( 'Y-m-d H:i' ), - 'inclusive' => true, - ), - 'tax_query' => array( - array( - 'taxonomy' => self::GROUP_TAXONOMY, - 'field' => 'slug', - 'terms' => $group, - 'include_children' => false, - ), - ), - ); - - return $query->query( $query_args ); - } - - /** - * @param string $claim_id - * @return array - */ - public function find_actions_by_claim_id( $claim_id ) { - /** @var wpdb $wpdb */ - global $wpdb; - $sql = "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND post_password = %s"; - $sql = $wpdb->prepare( $sql, array( self::POST_TYPE, $claim_id ) ); - $action_ids = $wpdb->get_col( $sql ); - return $action_ids; - } - - public function release_claim( ActionScheduler_ActionClaim $claim ) { - $action_ids = $this->find_actions_by_claim_id( $claim->get_id() ); - if ( empty($action_ids) ) { - return; // nothing to do - } - $action_id_string = implode(',', array_map('intval', $action_ids)); - /** @var wpdb $wpdb */ - global $wpdb; - $sql = "UPDATE {$wpdb->posts} SET post_password = '' WHERE ID IN ($action_id_string) AND post_password = %s"; - $sql = $wpdb->prepare( $sql, array( $claim->get_id() ) ); - $result = $wpdb->query($sql); - if ( $result === false ) { - throw new RuntimeException( sprintf( __('Unable to unlock claim %s. Database error.', 'woocommerce'), $claim->get_id() ) ); - } - } - - /** - * @param string $action_id - */ - public function unclaim_action( $action_id ) { - /** @var wpdb $wpdb */ - global $wpdb; - $sql = "UPDATE {$wpdb->posts} SET post_password = '' WHERE ID = %d AND post_type = %s"; - $sql = $wpdb->prepare( $sql, $action_id, self::POST_TYPE ); - $result = $wpdb->query($sql); - if ( $result === false ) { - throw new RuntimeException( sprintf( __('Unable to unlock claim on action %s. Database error.', 'woocommerce'), $action_id ) ); - } - } - - public function mark_failure( $action_id ) { - /** @var wpdb $wpdb */ - global $wpdb; - $sql = "UPDATE {$wpdb->posts} SET post_status = %s WHERE ID = %d AND post_type = %s"; - $sql = $wpdb->prepare( $sql, self::STATUS_FAILED, $action_id, self::POST_TYPE ); - $result = $wpdb->query($sql); - if ( $result === false ) { - throw new RuntimeException( sprintf( __('Unable to mark failure on action %s. Database error.', 'woocommerce'), $action_id ) ); - } - } - - /** - * Return an action's claim ID, as stored in the post password column - * - * @param string $action_id - * @return mixed - */ - public function get_claim_id( $action_id ) { - return $this->get_post_column( $action_id, 'post_password' ); - } - - /** - * Return an action's status, as stored in the post status column - * - * @param string $action_id - * @return mixed - */ - public function get_status( $action_id ) { - $status = $this->get_post_column( $action_id, 'post_status' ); - - if ( $status === null ) { - throw new InvalidArgumentException( __( 'Invalid action ID. No status found.', 'woocommerce' ) ); - } - - return $this->get_action_status_by_post_status( $status ); - } - - private function get_post_column( $action_id, $column_name ) { - /** @var \wpdb $wpdb */ - global $wpdb; - return $wpdb->get_var( $wpdb->prepare( "SELECT {$column_name} FROM {$wpdb->posts} WHERE ID=%d AND post_type=%s", $action_id, self::POST_TYPE ) ); - } - - /** - * @param string $action_id - */ - public function log_execution( $action_id ) { - /** @var wpdb $wpdb */ - global $wpdb; - - $sql = "UPDATE {$wpdb->posts} SET menu_order = menu_order+1, post_status=%s, post_modified_gmt = %s, post_modified = %s WHERE ID = %d AND post_type = %s"; - $sql = $wpdb->prepare( $sql, self::STATUS_RUNNING, current_time('mysql', true), current_time('mysql'), $action_id, self::POST_TYPE ); - $wpdb->query($sql); - } - - - public function mark_complete( $action_id ) { - $post = get_post($action_id); - if ( empty($post) || ($post->post_type != self::POST_TYPE) ) { - throw new InvalidArgumentException(sprintf(__('Unidentified action %s', 'woocommerce'), $action_id)); - } - add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 ); - add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 ); - $result = wp_update_post(array( - 'ID' => $action_id, - 'post_status' => 'publish', - ), TRUE); - remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 ); - remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 ); - if ( is_wp_error($result) ) { - throw new RuntimeException($result->get_error_message()); - } - } - - /** - * InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4. - * - * Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However, - * as we prepare to move to custom tables, and can use an indexed VARCHAR column instead, we want to warn - * developers of this impending requirement. - * - * @param ActionScheduler_Action $action - */ - protected function validate_action( ActionScheduler_Action $action ) { - if ( strlen( json_encode( $action->get_args() ) ) > self::$max_index_length ) { - _doing_it_wrong( 'ActionScheduler_Action::$args', sprintf( 'To ensure the action args column can be indexed, action args should not be more than %d characters when encoded as JSON. Support for strings longer than this will be removed in a future version.', self::$max_index_length ), '2.1.0' ); - } - } - - /** - * @codeCoverageIgnore - */ - public function init() { - $post_type_registrar = new ActionScheduler_wpPostStore_PostTypeRegistrar(); - $post_type_registrar->register(); - - $post_status_registrar = new ActionScheduler_wpPostStore_PostStatusRegistrar(); - $post_status_registrar->register(); - - $taxonomy_registrar = new ActionScheduler_wpPostStore_TaxonomyRegistrar(); - $taxonomy_registrar->register(); - } - - /** - * Validate that we could decode action arguments. - * - * @param mixed $args The decoded arguments. - * @param int $action_id The action ID. - * - * @throws ActionScheduler_InvalidActionException When the decoded arguments are invalid. - */ - private function validate_args( $args, $action_id ) { - // Ensure we have an array of args. - if ( ! is_array( $args ) ) { - throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id ); - } - - // Validate JSON decoding if possible. - if ( function_exists( 'json_last_error' ) && JSON_ERROR_NONE !== json_last_error() ) { - throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id ); - } - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore_PostStatusRegistrar.php b/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore_PostStatusRegistrar.php deleted file mode 100644 index 4e4a1dbc7ca..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore_PostStatusRegistrar.php +++ /dev/null @@ -1,56 +0,0 @@ -post_status_args(), $this->post_status_running_labels() ) ); - register_post_status( ActionScheduler_Store::STATUS_FAILED, array_merge( $this->post_status_args(), $this->post_status_failed_labels() ) ); - } - - /** - * Build the args array for the post type definition - * - * @return array - */ - protected function post_status_args() { - $args = array( - 'public' => false, - 'exclude_from_search' => false, - 'show_in_admin_all_list' => true, - 'show_in_admin_status_list' => true, - ); - - return apply_filters( 'action_scheduler_post_status_args', $args ); - } - - /** - * Build the args array for the post type definition - * - * @return array - */ - protected function post_status_failed_labels() { - $labels = array( - 'label' => _x( 'Failed', 'post', 'woocommerce' ), - 'label_count' => _n_noop( 'Failed (%s)', 'Failed (%s)', 'woocommerce' ), - ); - - return apply_filters( 'action_scheduler_post_status_failed_labels', $labels ); - } - - /** - * Build the args array for the post type definition - * - * @return array - */ - protected function post_status_running_labels() { - $labels = array( - 'label' => _x( 'In-Progress', 'post', 'woocommerce' ), - 'label_count' => _n_noop( 'In-Progress (%s)', 'In-Progress (%s)', 'woocommerce' ), - ); - - return apply_filters( 'action_scheduler_post_status_running_labels', $labels ); - } -} diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore_PostTypeRegistrar.php b/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore_PostTypeRegistrar.php deleted file mode 100644 index 056a6da96d0..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore_PostTypeRegistrar.php +++ /dev/null @@ -1,50 +0,0 @@ -post_type_args() ); - } - - /** - * Build the args array for the post type definition - * - * @return array - */ - protected function post_type_args() { - $args = array( - 'label' => __( 'Scheduled Actions', 'woocommerce' ), - 'description' => __( 'Scheduled actions are hooks triggered on a cetain date and time.', 'woocommerce' ), - 'public' => false, - 'map_meta_cap' => true, - 'hierarchical' => false, - 'supports' => array('title', 'editor','comments'), - 'rewrite' => false, - 'query_var' => false, - 'can_export' => true, - 'ep_mask' => EP_NONE, - 'labels' => array( - 'name' => __( 'Scheduled Actions', 'woocommerce' ), - 'singular_name' => __( 'Scheduled Action', 'woocommerce' ), - 'menu_name' => _x( 'Scheduled Actions', 'Admin menu name', 'woocommerce' ), - 'add_new' => __( 'Add', 'woocommerce' ), - 'add_new_item' => __( 'Add New Scheduled Action', 'woocommerce' ), - 'edit' => __( 'Edit', 'woocommerce' ), - 'edit_item' => __( 'Edit Scheduled Action', 'woocommerce' ), - 'new_item' => __( 'New Scheduled Action', 'woocommerce' ), - 'view' => __( 'View Action', 'woocommerce' ), - 'view_item' => __( 'View Action', 'woocommerce' ), - 'search_items' => __( 'Search Scheduled Actions', 'woocommerce' ), - 'not_found' => __( 'No actions found', 'woocommerce' ), - 'not_found_in_trash' => __( 'No actions found in trash', 'woocommerce' ), - ), - ); - - $args = apply_filters('action_scheduler_post_type_args', $args); - return $args; - } -} - diff --git a/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore_TaxonomyRegistrar.php b/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore_TaxonomyRegistrar.php deleted file mode 100644 index 503ca5701b9..00000000000 --- a/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore_TaxonomyRegistrar.php +++ /dev/null @@ -1,25 +0,0 @@ -taxonomy_args() ); - } - - protected function taxonomy_args() { - $args = array( - 'label' => __('Action Group', 'woocommerce'), - 'public' => false, - 'hierarchical' => false, - 'show_admin_column' => true, - 'query_var' => false, - 'rewrite' => false, - ); - - $args = apply_filters('action_scheduler_taxonomy_args', $args); - return $args; - } -} diff --git a/includes/libraries/action-scheduler/composer.json b/includes/libraries/action-scheduler/composer.json deleted file mode 100644 index a3b2c4af462..00000000000 --- a/includes/libraries/action-scheduler/composer.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "prospress/action-scheduler", - "description": "Action Scheduler for WordPress and WooCommerce", - "type": "wordpress-plugin", - "license": "GPL-3.0", - "minimum-stability": "dev", - "require": {}, - "require-dev": { - "wp-cli/wp-cli": "1.5.1" - } -} diff --git a/includes/libraries/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php b/includes/libraries/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php deleted file mode 100644 index dac17aa42eb..00000000000 --- a/includes/libraries/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php +++ /dev/null @@ -1,27 +0,0 @@ - '' - the name of the action that will be triggered - * 'args' => NULL - the args array that will be passed with the action - * 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. - * 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '=' - * 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. - * 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '=' - * 'group' => '' - the group the action belongs to - * 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING - * 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID - * 'per_page' => 5 - Number of results to return - * 'offset' => 0 - * 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date' - * 'order' => 'ASC' - * @param string $return_format OBJECT, ARRAY_A, or ids - * - * @deprecated 2.1.0 - * - * @return array - */ -function wc_get_scheduled_actions( $args = array(), $return_format = OBJECT ) { - _deprecated_function( __FUNCTION__, '2.1.0', 'as_get_scheduled_actions()' ); - return as_get_scheduled_actions( $args, $return_format ); -} diff --git a/includes/libraries/action-scheduler/functions.php b/includes/libraries/action-scheduler/functions.php deleted file mode 100644 index 2f27d7e7e34..00000000000 --- a/includes/libraries/action-scheduler/functions.php +++ /dev/null @@ -1,209 +0,0 @@ -single( $hook, $args, $timestamp, $group ); -} - -/** - * Schedule a recurring action - * - * @param int $timestamp When the first instance of the job will run - * @param int $interval_in_seconds How long to wait between runs - * @param string $hook The hook to trigger - * @param array $args Arguments to pass when the hook triggers - * @param string $group The group to assign this job to - * - * @return string The job ID - */ -function as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = array(), $group = '' ) { - return ActionScheduler::factory()->recurring( $hook, $args, $timestamp, $interval_in_seconds, $group ); -} - -/** - * Schedule an action that recurs on a cron-like schedule. - * - * @param int $timestamp The schedule will start on or after this time - * @param string $schedule A cron-link schedule string - * @see http://en.wikipedia.org/wiki/Cron - * * * * * * * - * ┬ ┬ ┬ ┬ ┬ ┬ - * | | | | | | - * | | | | | + year [optional] - * | | | | +----- day of week (0 - 7) (Sunday=0 or 7) - * | | | +---------- month (1 - 12) - * | | +--------------- day of month (1 - 31) - * | +-------------------- hour (0 - 23) - * +------------------------- min (0 - 59) - * @param string $hook The hook to trigger - * @param array $args Arguments to pass when the hook triggers - * @param string $group The group to assign this job to - * - * @return string The job ID - */ -function as_schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '' ) { - return ActionScheduler::factory()->cron( $hook, $args, $timestamp, $schedule, $group ); -} - -/** - * Cancel the next occurrence of a scheduled action. - * - * While only the next instance of a recurring or cron action is unscheduled by this method, that will also prevent - * all future instances of that recurring or cron action from being run. Recurring and cron actions are scheduled in - * a sequence instead of all being scheduled at once. Each successive occurrence of a recurring action is scheduled - * only after the former action is run. If the next instance is never run, because it's unscheduled by this function, - * then the following instance will never be scheduled (or exist), which is effectively the same as being unscheduled - * by this method also. - * - * @param string $hook The hook that the job will trigger - * @param array $args Args that would have been passed to the job - * @param string $group - * - * @return string The scheduled action ID if a scheduled action was found, or empty string if no matching action found. - */ -function as_unschedule_action( $hook, $args = array(), $group = '' ) { - $params = array(); - if ( is_array($args) ) { - $params['args'] = $args; - } - if ( !empty($group) ) { - $params['group'] = $group; - } - $job_id = ActionScheduler::store()->find_action( $hook, $params ); - - if ( ! empty( $job_id ) ) { - ActionScheduler::store()->cancel_action( $job_id ); - } - - return $job_id; -} - -/** - * Cancel all occurrences of a scheduled action. - * - * @param string $hook The hook that the job will trigger - * @param array $args Args that would have been passed to the job - * @param string $group - */ -function as_unschedule_all_actions( $hook, $args = array(), $group = '' ) { - do { - $unscheduled_action = as_unschedule_action( $hook, $args, $group ); - } while ( ! empty( $unscheduled_action ) ); -} - -/** - * @param string $hook - * @param array $args - * @param string $group - * - * @return int|bool The timestamp for the next occurrence, or false if nothing was found - */ -function as_next_scheduled_action( $hook, $args = NULL, $group = '' ) { - $params = array(); - if ( is_array($args) ) { - $params['args'] = $args; - } - if ( !empty($group) ) { - $params['group'] = $group; - } - $job_id = ActionScheduler::store()->find_action( $hook, $params ); - if ( empty($job_id) ) { - return false; - } - $job = ActionScheduler::store()->fetch_action( $job_id ); - $next = $job->get_schedule()->next(); - if ( $next ) { - return (int)($next->format('U')); - } - return false; -} - -/** - * Find scheduled actions - * - * @param array $args Possible arguments, with their default values: - * 'hook' => '' - the name of the action that will be triggered - * 'args' => NULL - the args array that will be passed with the action - * 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. - * 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '=' - * 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. - * 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '=' - * 'group' => '' - the group the action belongs to - * 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING - * 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID - * 'per_page' => 5 - Number of results to return - * 'offset' => 0 - * 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date' - * 'order' => 'ASC' - * - * @param string $return_format OBJECT, ARRAY_A, or ids - * - * @return array - */ -function as_get_scheduled_actions( $args = array(), $return_format = OBJECT ) { - $store = ActionScheduler::store(); - foreach ( array('date', 'modified') as $key ) { - if ( isset($args[$key]) ) { - $args[$key] = as_get_datetime_object($args[$key]); - } - } - $ids = $store->query_actions( $args ); - - if ( $return_format == 'ids' || $return_format == 'int' ) { - return $ids; - } - - $actions = array(); - foreach ( $ids as $action_id ) { - $actions[$action_id] = $store->fetch_action( $action_id ); - } - - if ( $return_format == ARRAY_A ) { - foreach ( $actions as $action_id => $action_object ) { - $actions[$action_id] = get_object_vars($action_object); - } - } - - return $actions; -} - -/** - * Helper function to create an instance of DateTime based on a given - * string and timezone. By default, will return the current date/time - * in the UTC timezone. - * - * Needed because new DateTime() called without an explicit timezone - * will create a date/time in PHP's timezone, but we need to have - * assurance that a date/time uses the right timezone (which we almost - * always want to be UTC), which means we need to always include the - * timezone when instantiating datetimes rather than leaving it up to - * the PHP default. - * - * @param mixed $date_string A date/time string. Valid formats are explained in http://php.net/manual/en/datetime.formats.php - * @param string $timezone A timezone identifier, like UTC or Europe/Lisbon. The list of valid identifiers is available http://php.net/manual/en/timezones.php - * - * @return ActionScheduler_DateTime - */ -function as_get_datetime_object( $date_string = null, $timezone = 'UTC' ) { - if ( is_object( $date_string ) && $date_string instanceof DateTime ) { - $date = new ActionScheduler_DateTime( $date_string->format( 'Y-m-d H:i:s' ), new DateTimeZone( $timezone ) ); - } elseif ( is_numeric( $date_string ) ) { - $date = new ActionScheduler_DateTime( '@' . $date_string, new DateTimeZone( $timezone ) ); - } else { - $date = new ActionScheduler_DateTime( $date_string, new DateTimeZone( $timezone ) ); - } - return $date; -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression.php deleted file mode 100755 index 7f33c378f9e..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression.php +++ /dev/null @@ -1,318 +0,0 @@ - - * @link http://en.wikipedia.org/wiki/Cron - */ -class CronExpression -{ - const MINUTE = 0; - const HOUR = 1; - const DAY = 2; - const MONTH = 3; - const WEEKDAY = 4; - const YEAR = 5; - - /** - * @var array CRON expression parts - */ - private $cronParts; - - /** - * @var CronExpression_FieldFactory CRON field factory - */ - private $fieldFactory; - - /** - * @var array Order in which to test of cron parts - */ - private static $order = array(self::YEAR, self::MONTH, self::DAY, self::WEEKDAY, self::HOUR, self::MINUTE); - - /** - * Factory method to create a new CronExpression. - * - * @param string $expression The CRON expression to create. There are - * several special predefined values which can be used to substitute the - * CRON expression: - * - * @yearly, @annually) - Run once a year, midnight, Jan. 1 - 0 0 1 1 * - * @monthly - Run once a month, midnight, first of month - 0 0 1 * * - * @weekly - Run once a week, midnight on Sun - 0 0 * * 0 - * @daily - Run once a day, midnight - 0 0 * * * - * @hourly - Run once an hour, first minute - 0 * * * * - * -*@param CronExpression_FieldFactory $fieldFactory (optional) Field factory to use - * - * @return CronExpression - */ - public static function factory($expression, CronExpression_FieldFactory $fieldFactory = null) - { - $mappings = array( - '@yearly' => '0 0 1 1 *', - '@annually' => '0 0 1 1 *', - '@monthly' => '0 0 1 * *', - '@weekly' => '0 0 * * 0', - '@daily' => '0 0 * * *', - '@hourly' => '0 * * * *' - ); - - if (isset($mappings[$expression])) { - $expression = $mappings[$expression]; - } - - return new self($expression, $fieldFactory ? $fieldFactory : new CronExpression_FieldFactory()); - } - - /** - * Parse a CRON expression - * - * @param string $expression CRON expression (e.g. '8 * * * *') - * @param CronExpression_FieldFactory $fieldFactory Factory to create cron fields - */ - public function __construct($expression, CronExpression_FieldFactory $fieldFactory) - { - $this->fieldFactory = $fieldFactory; - $this->setExpression($expression); - } - - /** - * Set or change the CRON expression - * - * @param string $value CRON expression (e.g. 8 * * * *) - * - * @return CronExpression - * @throws InvalidArgumentException if not a valid CRON expression - */ - public function setExpression($value) - { - $this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY); - if (count($this->cronParts) < 5) { - throw new InvalidArgumentException( - $value . ' is not a valid CRON expression' - ); - } - - foreach ($this->cronParts as $position => $part) { - $this->setPart($position, $part); - } - - return $this; - } - - /** - * Set part of the CRON expression - * - * @param int $position The position of the CRON expression to set - * @param string $value The value to set - * - * @return CronExpression - * @throws InvalidArgumentException if the value is not valid for the part - */ - public function setPart($position, $value) - { - if (!$this->fieldFactory->getField($position)->validate($value)) { - throw new InvalidArgumentException( - 'Invalid CRON field value ' . $value . ' as position ' . $position - ); - } - - $this->cronParts[$position] = $value; - - return $this; - } - - /** - * Get a next run date relative to the current date or a specific date - * - * @param string|DateTime $currentTime (optional) Relative calculation date - * @param int $nth (optional) Number of matches to skip before returning a - * matching next run date. 0, the default, will return the current - * date and time if the next run date falls on the current date and - * time. Setting this value to 1 will skip the first match and go to - * the second match. Setting this value to 2 will skip the first 2 - * matches and so on. - * @param bool $allowCurrentDate (optional) Set to TRUE to return the - * current date if it matches the cron expression - * - * @return DateTime - * @throws RuntimeException on too many iterations - */ - public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) - { - return $this->getRunDate($currentTime, $nth, false, $allowCurrentDate); - } - - /** - * Get a previous run date relative to the current date or a specific date - * - * @param string|DateTime $currentTime (optional) Relative calculation date - * @param int $nth (optional) Number of matches to skip before returning - * @param bool $allowCurrentDate (optional) Set to TRUE to return the - * current date if it matches the cron expression - * - * @return DateTime - * @throws RuntimeException on too many iterations - * @see CronExpression::getNextRunDate - */ - public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) - { - return $this->getRunDate($currentTime, $nth, true, $allowCurrentDate); - } - - /** - * Get multiple run dates starting at the current date or a specific date - * - * @param int $total Set the total number of dates to calculate - * @param string|DateTime $currentTime (optional) Relative calculation date - * @param bool $invert (optional) Set to TRUE to retrieve previous dates - * @param bool $allowCurrentDate (optional) Set to TRUE to return the - * current date if it matches the cron expression - * - * @return array Returns an array of run dates - */ - public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false) - { - $matches = array(); - for ($i = 0; $i < max(0, $total); $i++) { - $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate); - } - - return $matches; - } - - /** - * Get all or part of the CRON expression - * - * @param string $part (optional) Specify the part to retrieve or NULL to - * get the full cron schedule string. - * - * @return string|null Returns the CRON expression, a part of the - * CRON expression, or NULL if the part was specified but not found - */ - public function getExpression($part = null) - { - if (null === $part) { - return implode(' ', $this->cronParts); - } elseif (array_key_exists($part, $this->cronParts)) { - return $this->cronParts[$part]; - } - - return null; - } - - /** - * Helper method to output the full expression. - * - * @return string Full CRON expression - */ - public function __toString() - { - return $this->getExpression(); - } - - /** - * Determine if the cron is due to run based on the current date or a - * specific date. This method assumes that the current number of - * seconds are irrelevant, and should be called once per minute. - * - * @param string|DateTime $currentTime (optional) Relative calculation date - * - * @return bool Returns TRUE if the cron is due to run or FALSE if not - */ - public function isDue($currentTime = 'now') - { - if ('now' === $currentTime) { - $currentDate = date('Y-m-d H:i'); - $currentTime = strtotime($currentDate); - } elseif ($currentTime instanceof DateTime) { - $currentDate = $currentTime->format('Y-m-d H:i'); - $currentTime = strtotime($currentDate); - } else { - $currentTime = new DateTime($currentTime); - $currentTime->setTime($currentTime->format('H'), $currentTime->format('i'), 0); - $currentDate = $currentTime->format('Y-m-d H:i'); - $currentTime = (int)($currentTime->getTimestamp()); - } - - return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime; - } - - /** - * Get the next or previous run date of the expression relative to a date - * - * @param string|DateTime $currentTime (optional) Relative calculation date - * @param int $nth (optional) Number of matches to skip before returning - * @param bool $invert (optional) Set to TRUE to go backwards in time - * @param bool $allowCurrentDate (optional) Set to TRUE to return the - * current date if it matches the cron expression - * - * @return DateTime - * @throws RuntimeException on too many iterations - */ - protected function getRunDate($currentTime = null, $nth = 0, $invert = false, $allowCurrentDate = false) - { - if ($currentTime instanceof DateTime) { - $currentDate = $currentTime; - } else { - $currentDate = new DateTime($currentTime ? $currentTime : 'now'); - $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get())); - } - - $currentDate->setTime($currentDate->format('H'), $currentDate->format('i'), 0); - $nextRun = clone $currentDate; - $nth = (int) $nth; - - // Set a hard limit to bail on an impossible date - for ($i = 0; $i < 1000; $i++) { - - foreach (self::$order as $position) { - $part = $this->getExpression($position); - if (null === $part) { - continue; - } - - $satisfied = false; - // Get the field object used to validate this part - $field = $this->fieldFactory->getField($position); - // Check if this is singular or a list - if (strpos($part, ',') === false) { - $satisfied = $field->isSatisfiedBy($nextRun, $part); - } else { - foreach (array_map('trim', explode(',', $part)) as $listPart) { - if ($field->isSatisfiedBy($nextRun, $listPart)) { - $satisfied = true; - break; - } - } - } - - // If the field is not satisfied, then start over - if (!$satisfied) { - $field->increment($nextRun, $invert); - continue 2; - } - } - - // Skip this match if needed - if ((!$allowCurrentDate && $nextRun == $currentDate) || --$nth > -1) { - $this->fieldFactory->getField(0)->increment($nextRun, $invert); - continue; - } - - return $nextRun; - } - - // @codeCoverageIgnoreStart - throw new RuntimeException('Impossible CRON expression'); - // @codeCoverageIgnoreEnd - } -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php deleted file mode 100755 index f8d5c00ae79..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php +++ /dev/null @@ -1,100 +0,0 @@ - - */ -abstract class CronExpression_AbstractField implements CronExpression_FieldInterface -{ - /** - * Check to see if a field is satisfied by a value - * - * @param string $dateValue Date value to check - * @param string $value Value to test - * - * @return bool - */ - public function isSatisfied($dateValue, $value) - { - if ($this->isIncrementsOfRanges($value)) { - return $this->isInIncrementsOfRanges($dateValue, $value); - } elseif ($this->isRange($value)) { - return $this->isInRange($dateValue, $value); - } - - return $value == '*' || $dateValue == $value; - } - - /** - * Check if a value is a range - * - * @param string $value Value to test - * - * @return bool - */ - public function isRange($value) - { - return strpos($value, '-') !== false; - } - - /** - * Check if a value is an increments of ranges - * - * @param string $value Value to test - * - * @return bool - */ - public function isIncrementsOfRanges($value) - { - return strpos($value, '/') !== false; - } - - /** - * Test if a value is within a range - * - * @param string $dateValue Set date value - * @param string $value Value to test - * - * @return bool - */ - public function isInRange($dateValue, $value) - { - $parts = array_map('trim', explode('-', $value, 2)); - - return $dateValue >= $parts[0] && $dateValue <= $parts[1]; - } - - /** - * Test if a value is within an increments of ranges (offset[-to]/step size) - * - * @param string $dateValue Set date value - * @param string $value Value to test - * - * @return bool - */ - public function isInIncrementsOfRanges($dateValue, $value) - { - $parts = array_map('trim', explode('/', $value, 2)); - $stepSize = isset($parts[1]) ? $parts[1] : 0; - if ($parts[0] == '*' || $parts[0] === '0') { - return (int) $dateValue % $stepSize == 0; - } - - $range = explode('-', $parts[0], 2); - $offset = $range[0]; - $to = isset($range[1]) ? $range[1] : $dateValue; - // Ensure that the date value is within the range - if ($dateValue < $offset || $dateValue > $to) { - return false; - } - - for ($i = $offset; $i <= $to; $i+= $stepSize) { - if ($i == $dateValue) { - return true; - } - } - - return false; - } -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php deleted file mode 100755 index 40c1d6c6e78..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php +++ /dev/null @@ -1,110 +0,0 @@ - - */ -class CronExpression_DayOfMonthField extends CronExpression_AbstractField -{ - /** - * Get the nearest day of the week for a given day in a month - * - * @param int $currentYear Current year - * @param int $currentMonth Current month - * @param int $targetDay Target day of the month - * - * @return DateTime Returns the nearest date - */ - private static function getNearestWeekday($currentYear, $currentMonth, $targetDay) - { - $tday = str_pad($targetDay, 2, '0', STR_PAD_LEFT); - $target = new DateTime("$currentYear-$currentMonth-$tday"); - $currentWeekday = (int) $target->format('N'); - - if ($currentWeekday < 6) { - return $target; - } - - $lastDayOfMonth = $target->format('t'); - - foreach (array(-1, 1, -2, 2) as $i) { - $adjusted = $targetDay + $i; - if ($adjusted > 0 && $adjusted <= $lastDayOfMonth) { - $target->setDate($currentYear, $currentMonth, $adjusted); - if ($target->format('N') < 6 && $target->format('m') == $currentMonth) { - return $target; - } - } - } - } - - /** - * {@inheritdoc} - */ - public function isSatisfiedBy(DateTime $date, $value) - { - // ? states that the field value is to be skipped - if ($value == '?') { - return true; - } - - $fieldValue = $date->format('d'); - - // Check to see if this is the last day of the month - if ($value == 'L') { - return $fieldValue == $date->format('t'); - } - - // Check to see if this is the nearest weekday to a particular value - if (strpos($value, 'W')) { - // Parse the target day - $targetDay = substr($value, 0, strpos($value, 'W')); - // Find out if the current day is the nearest day of the week - return $date->format('j') == self::getNearestWeekday( - $date->format('Y'), - $date->format('m'), - $targetDay - )->format('j'); - } - - return $this->isSatisfied($date->format('d'), $value); - } - - /** - * {@inheritdoc} - */ - public function increment(DateTime $date, $invert = false) - { - if ($invert) { - $date->modify('previous day'); - $date->setTime(23, 59); - } else { - $date->modify('next day'); - $date->setTime(0, 0); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function validate($value) - { - return (bool) preg_match('/[\*,\/\-\?LW0-9A-Za-z]+/', $value); - } -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php deleted file mode 100755 index e9f68a7cd6f..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php +++ /dev/null @@ -1,124 +0,0 @@ - - */ -class CronExpression_DayOfWeekField extends CronExpression_AbstractField -{ - /** - * {@inheritdoc} - */ - public function isSatisfiedBy(DateTime $date, $value) - { - if ($value == '?') { - return true; - } - - // Convert text day of the week values to integers - $value = str_ireplace( - array('SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'), - range(0, 6), - $value - ); - - $currentYear = $date->format('Y'); - $currentMonth = $date->format('m'); - $lastDayOfMonth = $date->format('t'); - - // Find out if this is the last specific weekday of the month - if (strpos($value, 'L')) { - $weekday = str_replace('7', '0', substr($value, 0, strpos($value, 'L'))); - $tdate = clone $date; - $tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth); - while ($tdate->format('w') != $weekday) { - $tdate->setDate($currentYear, $currentMonth, --$lastDayOfMonth); - } - - return $date->format('j') == $lastDayOfMonth; - } - - // Handle # hash tokens - if (strpos($value, '#')) { - list($weekday, $nth) = explode('#', $value); - // Validate the hash fields - if ($weekday < 1 || $weekday > 5) { - throw new InvalidArgumentException("Weekday must be a value between 1 and 5. {$weekday} given"); - } - if ($nth > 5) { - throw new InvalidArgumentException('There are never more than 5 of a given weekday in a month'); - } - // The current weekday must match the targeted weekday to proceed - if ($date->format('N') != $weekday) { - return false; - } - - $tdate = clone $date; - $tdate->setDate($currentYear, $currentMonth, 1); - $dayCount = 0; - $currentDay = 1; - while ($currentDay < $lastDayOfMonth + 1) { - if ($tdate->format('N') == $weekday) { - if (++$dayCount >= $nth) { - break; - } - } - $tdate->setDate($currentYear, $currentMonth, ++$currentDay); - } - - return $date->format('j') == $currentDay; - } - - // Handle day of the week values - if (strpos($value, '-')) { - $parts = explode('-', $value); - if ($parts[0] == '7') { - $parts[0] = '0'; - } elseif ($parts[1] == '0') { - $parts[1] = '7'; - } - $value = implode('-', $parts); - } - - // Test to see which Sunday to use -- 0 == 7 == Sunday - $format = in_array(7, str_split($value)) ? 'N' : 'w'; - $fieldValue = $date->format($format); - - return $this->isSatisfied($fieldValue, $value); - } - - /** - * {@inheritdoc} - */ - public function increment(DateTime $date, $invert = false) - { - if ($invert) { - $date->modify('-1 day'); - $date->setTime(23, 59, 0); - } else { - $date->modify('+1 day'); - $date->setTime(0, 0, 0); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function validate($value) - { - return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value); - } -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php deleted file mode 100755 index 556ba1a3e31..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @link http://en.wikipedia.org/wiki/Cron - */ -class CronExpression_FieldFactory -{ - /** - * @var array Cache of instantiated fields - */ - private $fields = array(); - - /** - * Get an instance of a field object for a cron expression position - * - * @param int $position CRON expression position value to retrieve - * - * @return CronExpression_FieldInterface - * @throws InvalidArgumentException if a position is not valid - */ - public function getField($position) - { - if (!isset($this->fields[$position])) { - switch ($position) { - case 0: - $this->fields[$position] = new CronExpression_MinutesField(); - break; - case 1: - $this->fields[$position] = new CronExpression_HoursField(); - break; - case 2: - $this->fields[$position] = new CronExpression_DayOfMonthField(); - break; - case 3: - $this->fields[$position] = new CronExpression_MonthField(); - break; - case 4: - $this->fields[$position] = new CronExpression_DayOfWeekField(); - break; - case 5: - $this->fields[$position] = new CronExpression_YearField(); - break; - default: - throw new InvalidArgumentException( - $position . ' is not a valid position' - ); - } - } - - return $this->fields[$position]; - } -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php deleted file mode 100755 index 5d5109b70d4..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -interface CronExpression_FieldInterface -{ - /** - * Check if the respective value of a DateTime field satisfies a CRON exp - * - * @param DateTime $date DateTime object to check - * @param string $value CRON expression to test against - * - * @return bool Returns TRUE if satisfied, FALSE otherwise - */ - public function isSatisfiedBy(DateTime $date, $value); - - /** - * When a CRON expression is not satisfied, this method is used to increment - * or decrement a DateTime object by the unit of the cron field - * - * @param DateTime $date DateTime object to change - * @param bool $invert (optional) Set to TRUE to decrement - * - * @return CronExpression_FieldInterface - */ - public function increment(DateTime $date, $invert = false); - - /** - * Validates a CRON expression for a given field - * - * @param string $value CRON expression value to validate - * - * @return bool Returns TRUE if valid, FALSE otherwise - */ - public function validate($value); -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_HoursField.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_HoursField.php deleted file mode 100755 index 088ca73c719..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_HoursField.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -class CronExpression_HoursField extends CronExpression_AbstractField -{ - /** - * {@inheritdoc} - */ - public function isSatisfiedBy(DateTime $date, $value) - { - return $this->isSatisfied($date->format('H'), $value); - } - - /** - * {@inheritdoc} - */ - public function increment(DateTime $date, $invert = false) - { - // Change timezone to UTC temporarily. This will - // allow us to go back or forwards and hour even - // if DST will be changed between the hours. - $timezone = $date->getTimezone(); - $date->setTimezone(new DateTimeZone('UTC')); - if ($invert) { - $date->modify('-1 hour'); - $date->setTime($date->format('H'), 59); - } else { - $date->modify('+1 hour'); - $date->setTime($date->format('H'), 0); - } - $date->setTimezone($timezone); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function validate($value) - { - return (bool) preg_match('/[\*,\/\-0-9]+/', $value); - } -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php deleted file mode 100755 index 436acf2f560..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -class CronExpression_MinutesField extends CronExpression_AbstractField -{ - /** - * {@inheritdoc} - */ - public function isSatisfiedBy(DateTime $date, $value) - { - return $this->isSatisfied($date->format('i'), $value); - } - - /** - * {@inheritdoc} - */ - public function increment(DateTime $date, $invert = false) - { - if ($invert) { - $date->modify('-1 minute'); - } else { - $date->modify('+1 minute'); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function validate($value) - { - return (bool) preg_match('/[\*,\/\-0-9]+/', $value); - } -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_MonthField.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_MonthField.php deleted file mode 100755 index d3deb129f46..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_MonthField.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -class CronExpression_MonthField extends CronExpression_AbstractField -{ - /** - * {@inheritdoc} - */ - public function isSatisfiedBy(DateTime $date, $value) - { - // Convert text month values to integers - $value = str_ireplace( - array( - 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', - 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC' - ), - range(1, 12), - $value - ); - - return $this->isSatisfied($date->format('m'), $value); - } - - /** - * {@inheritdoc} - */ - public function increment(DateTime $date, $invert = false) - { - if ($invert) { - // $date->modify('last day of previous month'); // remove for php 5.2 compat - $date->modify('previous month'); - $date->modify($date->format('Y-m-t')); - $date->setTime(23, 59); - } else { - //$date->modify('first day of next month'); // remove for php 5.2 compat - $date->modify('next month'); - $date->modify($date->format('Y-m-01')); - $date->setTime(0, 0); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function validate($value) - { - return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value); - } -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_YearField.php b/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_YearField.php deleted file mode 100755 index f11562e4513..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_YearField.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -class CronExpression_YearField extends CronExpression_AbstractField -{ - /** - * {@inheritdoc} - */ - public function isSatisfiedBy(DateTime $date, $value) - { - return $this->isSatisfied($date->format('Y'), $value); - } - - /** - * {@inheritdoc} - */ - public function increment(DateTime $date, $invert = false) - { - if ($invert) { - $date->modify('-1 year'); - $date->setDate($date->format('Y'), 12, 31); - $date->setTime(23, 59, 0); - } else { - $date->modify('+1 year'); - $date->setDate($date->format('Y'), 1, 1); - $date->setTime(0, 0, 0); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function validate($value) - { - return (bool) preg_match('/[\*,\/\-0-9]+/', $value); - } -} diff --git a/includes/libraries/action-scheduler/lib/cron-expression/LICENSE b/includes/libraries/action-scheduler/lib/cron-expression/LICENSE deleted file mode 100755 index c6d88ac6c2f..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Michael Dowling and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/includes/libraries/action-scheduler/lib/cron-expression/README.md b/includes/libraries/action-scheduler/lib/cron-expression/README.md deleted file mode 100755 index d4d9d5add19..00000000000 --- a/includes/libraries/action-scheduler/lib/cron-expression/README.md +++ /dev/null @@ -1,92 +0,0 @@ -PHP Cron Expression Parser -========================== - -[![Latest Stable Version](https://poser.pugx.org/mtdowling/cron-expression/v/stable.png)](https://packagist.org/packages/mtdowling/cron-expression) [![Total Downloads](https://poser.pugx.org/mtdowling/cron-expression/downloads.png)](https://packagist.org/packages/mtdowling/cron-expression) [![Build Status](https://secure.travis-ci.org/mtdowling/cron-expression.png)](http://travis-ci.org/mtdowling/cron-expression) - -The PHP cron expression parser can parse a CRON expression, determine if it is -due to run, calculate the next run date of the expression, and calculate the previous -run date of the expression. You can calculate dates far into the future or past by -skipping n number of matching dates. - -The parser can handle increments of ranges (e.g. */12, 2-59/3), intervals (e.g. 0-9), -lists (e.g. 1,2,3), W to find the nearest weekday for a given day of the month, L to -find the last day of the month, L to find the last given weekday of a month, and hash -(#) to find the nth weekday of a given month. - -Credits -========== - -Created by Micheal Dowling. Ported to PHP 5.2 by Flightless, Inc. -Based on version 1.0.3: https://github.com/mtdowling/cron-expression/tree/v1.0.3 - -Installing -========== - -Add the following to your project's composer.json: - -```javascript -{ - "require": { - "mtdowling/cron-expression": "1.0.*" - } -} -``` - -Usage -===== -```php -isDue(); -echo $cron->getNextRunDate()->format('Y-m-d H:i:s'); -echo $cron->getPreviousRunDate()->format('Y-m-d H:i:s'); - -// Works with complex expressions -$cron = Cron\CronExpression::factory('3-59/15 2,6-12 */15 1 2-5'); -echo $cron->getNextRunDate()->format('Y-m-d H:i:s'); - -// Calculate a run date two iterations into the future -$cron = Cron\CronExpression::factory('@daily'); -echo $cron->getNextRunDate(null, 2)->format('Y-m-d H:i:s'); - -// Calculate a run date relative to a specific time -$cron = Cron\CronExpression::factory('@monthly'); -echo $cron->getNextRunDate('2010-01-12 00:00:00')->format('Y-m-d H:i:s'); -``` - -CRON Expressions -================ - -A CRON expression is a string representing the schedule for a particular command to execute. The parts of a CRON schedule are as follows: - - * * * * * * - - - - - - - - | | | | | | - | | | | | + year [optional] - | | | | +----- day of week (0 - 7) (Sunday=0 or 7) - | | | +---------- month (1 - 12) - | | +--------------- day of month (1 - 31) - | +-------------------- hour (0 - 23) - +------------------------- min (0 - 59) - -Requirements -============ - -- PHP 5.3+ -- PHPUnit is required to run the unit tests -- Composer is required to run the unit tests - -CHANGELOG -========= - -1.0.3 (2013-11-23) ------------------- - -* Only set default timezone if the given $currentTime is not a DateTime instance (#34) -* Fixes issue #28 where PHP increments of ranges were failing due to PHP casting hyphens to 0 -* Now supports expressions with any number of extra spaces, tabs, or newlines -* Using static instead of self in `CronExpression::factory` diff --git a/includes/libraries/action-scheduler/license.txt b/includes/libraries/action-scheduler/license.txt deleted file mode 100644 index f288702d2fa..00000000000 --- a/includes/libraries/action-scheduler/license.txt +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/includes/libraries/class-wc-eval-math.php b/includes/libraries/class-wc-eval-math.php index eaf174c5dc8..f4d5e5dc3d8 100644 --- a/includes/libraries/class-wc-eval-math.php +++ b/includes/libraries/class-wc-eval-math.php @@ -1,4 +1,7 @@ get_last4() ); diff --git a/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php b/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php index 4605828ab31..c09513e8664 100644 --- a/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php +++ b/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php @@ -256,12 +256,17 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method { * * @since 3.4.0 * @param string $value Unsanitized value. + * @throws Exception Last error triggered. * @return string */ public function sanitize_cost( $value ) { $value = is_null( $value ) ? '' : $value; $value = wp_kses_post( trim( wp_unslash( $value ) ) ); $value = str_replace( array( get_woocommerce_currency_symbol(), html_entity_decode( get_woocommerce_currency_symbol() ) ), '', $value ); + // Thrown an error on the front end if the evaluate_cost will fail. + if ( false === $this->evaluate_cost( $value ) ) { + throw new Exception( WC_Eval_Math::$last_error ); + } return $value; } } diff --git a/includes/shortcodes/class-wc-shortcode-checkout.php b/includes/shortcodes/class-wc-shortcode-checkout.php index 366a775eac9..74d76922540 100644 --- a/includes/shortcodes/class-wc-shortcode-checkout.php +++ b/includes/shortcodes/class-wc-shortcode-checkout.php @@ -236,8 +236,9 @@ class WC_Shortcode_Checkout { // Empty awaiting payment session. unset( WC()->session->order_awaiting_payment ); - // In case order is created from admin, but paid by the actual customer, store the ip address of the payer. - if ( $order ) { + // In case order is created from admin, but paid by the actual customer, store the ip address of the payer + // when they visit the payment confirmation page. + if ( $order && $order->is_created_via( 'admin' ) ) { $order->set_customer_ip_address( WC_Geolocation::get_ip_address() ); $order->save(); } diff --git a/includes/theme-support/class-wc-twenty-nineteen.php b/includes/theme-support/class-wc-twenty-nineteen.php index 84a0c73d2d7..a0bcf9f443e 100644 --- a/includes/theme-support/class-wc-twenty-nineteen.php +++ b/includes/theme-support/class-wc-twenty-nineteen.php @@ -6,6 +6,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -78,7 +80,7 @@ class WC_Twenty_Nineteen { $styles['woocommerce-general'] = array( 'src' => str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/css/twenty-nineteen.css', 'deps' => '', - 'version' => WC_VERSION, + 'version' => Constants::get_constant( 'WC_VERSION' ), 'media' => 'all', 'has_rtl' => true, ); diff --git a/includes/theme-support/class-wc-twenty-seventeen.php b/includes/theme-support/class-wc-twenty-seventeen.php index 2c69bf90135..cca349a2175 100644 --- a/includes/theme-support/class-wc-twenty-seventeen.php +++ b/includes/theme-support/class-wc-twenty-seventeen.php @@ -6,6 +6,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -49,7 +51,7 @@ class WC_Twenty_Seventeen { $styles['woocommerce-general'] = array( 'src' => str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/css/twenty-seventeen.css', 'deps' => '', - 'version' => WC_VERSION, + 'version' => Constants::get_constant( 'WC_VERSION' ), 'media' => 'all', 'has_rtl' => true, ); diff --git a/includes/theme-support/class-wc-twenty-twenty.php b/includes/theme-support/class-wc-twenty-twenty.php index 4045ef6a30e..35bf512b205 100644 --- a/includes/theme-support/class-wc-twenty-twenty.php +++ b/includes/theme-support/class-wc-twenty-twenty.php @@ -6,6 +6,8 @@ * @package WooCommerce/Classes */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -92,7 +94,7 @@ class WC_Twenty_Twenty { $styles['woocommerce-general'] = array( 'src' => str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/css/twenty-twenty.css', 'deps' => '', - 'version' => WC_VERSION, + 'version' => Constants::get_constant( 'WC_VERSION' ), 'media' => 'all', 'has_rtl' => true, ); diff --git a/includes/tracks/class-wc-tracks-client.php b/includes/tracks/class-wc-tracks-client.php index b712f262868..438e1be9e10 100644 --- a/includes/tracks/class-wc-tracks-client.php +++ b/includes/tracks/class-wc-tracks-client.php @@ -5,6 +5,8 @@ * @package WooCommerce\Tracks */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -44,7 +46,7 @@ class WC_Tracks_Client { */ public static function maybe_set_identity_cookie() { // Do not set on AJAX requests. - if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + if ( Constants::is_true( 'DOING_AJAX' ) ) { return; } @@ -69,10 +71,7 @@ class WC_Tracks_Client { } // Don't set cookie on API requests. - if ( - ! ( defined( 'REST_REQUEST' ) && REST_REQUEST ) && - ! ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) - ) { + if ( ! Constants::is_true( 'REST_REQUEST' ) && ! Constants::is_true( 'XMLRPC_REQUEST' ) ) { wc_setcookie( 'tk_ai', $anon_id ); } } @@ -144,8 +143,8 @@ class WC_Tracks_Client { public static function get_identity( $user_id ) { $jetpack_lib = '/tracks/client.php'; - if ( class_exists( 'Jetpack' ) && defined( 'JETPACK__VERSION' ) ) { - if ( version_compare( JETPACK__VERSION, '7.5', '<' ) ) { + if ( class_exists( 'Jetpack' ) && Constants::is_defined( 'JETPACK__VERSION' ) ) { + if ( version_compare( Constants::get_constant( 'JETPACK__VERSION' ), '7.5', '<' ) ) { if ( file_exists( jetpack_require_lib_dir() . $jetpack_lib ) ) { include_once jetpack_require_lib_dir() . $jetpack_lib; if ( function_exists( 'jetpack_tracks_get_identity' ) ) { diff --git a/includes/tracks/class-wc-tracks-event.php b/includes/tracks/class-wc-tracks-event.php index 96bf537cc2b..1c28f1ef1b9 100644 --- a/includes/tracks/class-wc-tracks-event.php +++ b/includes/tracks/class-wc-tracks-event.php @@ -5,6 +5,8 @@ * @package WooCommerce\Tracks */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -52,10 +54,7 @@ class WC_Tracks_Event { * @return bool Always returns true. */ public function record() { - if ( - wp_doing_ajax() || - ( defined( 'REST_REQUEST' ) && REST_REQUEST ) - ) { + if ( wp_doing_ajax() || Constants::is_true( 'REST_REQUEST' ) ) { return WC_Tracks_Client::record_event( $this ); } diff --git a/includes/tracks/events/class-wc-products-tracking.php b/includes/tracks/events/class-wc-products-tracking.php index 7817903e457..07545e4d433 100644 --- a/includes/tracks/events/class-wc-products-tracking.php +++ b/includes/tracks/events/class-wc-products-tracking.php @@ -5,6 +5,8 @@ * @package WooCommerce\Tracks */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -71,7 +73,7 @@ class WC_Products_Tracking { // Only track category creation from the edit product screen or the // category management screen (which both occur via AJAX). if ( - ! defined( 'DOING_AJAX' ) || + ! Constants::is_defined( 'DOING_AJAX' ) || empty( $_POST['action'] ) || ( // Product Categories screen. diff --git a/includes/wc-cart-functions.php b/includes/wc-cart-functions.php index f872d1dd239..a6f2755d675 100644 --- a/includes/wc-cart-functions.php +++ b/includes/wc-cart-functions.php @@ -8,6 +8,8 @@ * @version 2.5.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -288,7 +290,7 @@ function wc_cart_totals_coupon_html( $coupon ) { } $discount_amount_html = apply_filters( 'woocommerce_coupon_discount_amount_html', $discount_amount_html, $coupon ); - $coupon_html = $discount_amount_html . ' ' . __( '[Remove]', 'woocommerce' ) . ''; + $coupon_html = $discount_amount_html . ' ' . __( '[Remove]', 'woocommerce' ) . ''; echo wp_kses( apply_filters( 'woocommerce_cart_totals_coupon_html', $coupon_html, $coupon, $discount_amount_html ), array_replace_recursive( wp_kses_allowed_html( 'post' ), array( 'a' => array( 'data-coupon' => true ) ) ) ); // phpcs:ignore PHPCompatibility.PHP.NewFunctions.array_replace_recursiveFound } diff --git a/includes/wc-conditional-functions.php b/includes/wc-conditional-functions.php index eb414263c34..53bc24b4f30 100644 --- a/includes/wc-conditional-functions.php +++ b/includes/wc-conditional-functions.php @@ -8,6 +8,8 @@ * @version 2.3.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -93,7 +95,7 @@ if ( ! function_exists( 'is_cart' ) ) { function is_cart() { $page_id = wc_get_page_id( 'cart' ); - return ( $page_id && is_page( $page_id ) ) || defined( 'WOOCOMMERCE_CART' ) || wc_post_content_has_shortcode( 'woocommerce_cart' ); + return ( $page_id && is_page( $page_id ) ) || Constants::is_defined( 'WOOCOMMERCE_CART' ) || wc_post_content_has_shortcode( 'woocommerce_cart' ); } } @@ -107,7 +109,7 @@ if ( ! function_exists( 'is_checkout' ) ) { function is_checkout() { $page_id = wc_get_page_id( 'checkout' ); - return ( $page_id && is_page( $page_id ) ) || wc_post_content_has_shortcode( 'woocommerce_checkout' ) || apply_filters( 'woocommerce_is_checkout', false ) || defined( 'WOOCOMMERCE_CHECKOUT' ); + return ( $page_id && is_page( $page_id ) ) || wc_post_content_has_shortcode( 'woocommerce_checkout' ) || apply_filters( 'woocommerce_is_checkout', false ) || Constants::is_defined( 'WOOCOMMERCE_CHECKOUT' ); } } @@ -262,7 +264,7 @@ if ( ! function_exists( 'is_ajax' ) ) { * @return bool */ function is_ajax() { - return function_exists( 'wp_doing_ajax' ) ? wp_doing_ajax() : defined( 'DOING_AJAX' ); + return function_exists( 'wp_doing_ajax' ) ? wp_doing_ajax() : Constants::is_defined( 'DOING_AJAX' ); } } diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php index ce2f10b6c60..f742e09042b 100644 --- a/includes/wc-core-functions.php +++ b/includes/wc-core-functions.php @@ -8,6 +8,8 @@ * @version 3.3.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -157,7 +159,7 @@ function wc_update_order( $args ) { * @param string $name Template name (default: ''). */ function wc_get_template_part( $slug, $name = '' ) { - $cache_key = sanitize_key( implode( '-', array( 'template-part', $slug, $name, WC_VERSION ) ) ); + $cache_key = sanitize_key( implode( '-', array( 'template-part', $slug, $name, Constants::get_constant( 'WC_VERSION' ) ) ) ); $template = (string) wp_cache_get( $cache_key, 'woocommerce' ); if ( ! $template ) { @@ -205,7 +207,7 @@ function wc_get_template_part( $slug, $name = '' ) { * @param string $default_path Default path. (default: ''). */ function wc_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { - $cache_key = sanitize_key( implode( '-', array( 'template', $template_name, $template_path, $default_path, WC_VERSION ) ) ); + $cache_key = sanitize_key( implode( '-', array( 'template', $template_name, $template_path, $default_path, Constants::get_constant( 'WC_VERSION' ) ) ) ); $template = (string) wp_cache_get( $cache_key, 'woocommerce' ); if ( ! $template ) { @@ -887,7 +889,7 @@ function wc_print_js() { function wc_setcookie( $name, $value, $expire = 0, $secure = false, $httponly = false ) { if ( ! headers_sent() ) { setcookie( $name, $value, $expire, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, $secure, apply_filters( 'woocommerce_cookie_httponly', $httponly, $name, $value, $expire, $secure ) ); - } elseif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { + } elseif ( Constants::is_true( 'WP_DEBUG' ) ) { headers_sent( $file, $line ); trigger_error( "{$name} cookie cannot be set - headers already sent by {$file} on line {$line}", E_USER_NOTICE ); // @codingStandardsIgnoreLine } @@ -901,7 +903,11 @@ function wc_setcookie( $name, $value, $expire = 0, $secure = false, $httponly = * @return string the URL. */ function get_woocommerce_api_url( $path ) { - $version = defined( 'WC_API_REQUEST_VERSION' ) ? WC_API_REQUEST_VERSION : substr( WC_API::VERSION, 0, 1 ); + if ( Constants::is_defined( 'WC_API_REQUEST_VERSION' ) ) { + $version = Constants::get_constant( 'WC_API_REQUEST_VERSION' ); + } else { + $version = substr( WC_API::VERSION, 0, 1 ); + } $url = get_home_url( null, "wc-api/v{$version}/", is_ssl() ? 'https' : 'http' ); @@ -1157,36 +1163,6 @@ function wc_get_user_agent() { return isset( $_SERVER['HTTP_USER_AGENT'] ) ? wc_clean( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : ''; // @codingStandardsIgnoreLine } -// This function can be removed when WP 3.9.2 or greater is required. -if ( ! function_exists( 'hash_equals' ) ) : - /** - * Compare two strings in constant time. - * - * This function was added in PHP 5.6. - * It can leak the length of a string. - * - * @since 3.9.2 - * - * @param string $a Expected string. - * @param string $b Actual string. - * @return bool Whether strings are equal. - */ - function hash_equals( $a, $b ) { - $a_length = strlen( $a ); - if ( strlen( $b ) !== $a_length ) { - return false; - } - $result = 0; - - // Do not attempt to "optimize" this. - for ( $i = 0; $i < $a_length; $i++ ) { - $result |= ord( $a[ $i ] ) ^ ord( $b[ $i ] ); - } - - return 0 === $result; - } -endif; - /** * Generate a rand hash. * @@ -1292,7 +1268,7 @@ function wc_transaction_query( $type = 'start', $force = false ) { wc_maybe_define_constant( 'WC_USE_TRANSACTIONS', true ); - if ( WC_USE_TRANSACTIONS || $force ) { + if ( Constants::is_true( 'WC_USE_TRANSACTIONS' ) || $force ) { switch ( $type ) { case 'commit': $wpdb->query( 'COMMIT' ); @@ -1847,14 +1823,12 @@ function wc_print_r( $expression, $return = false ) { * @return array */ function wc_register_default_log_handler( $handlers ) { - if ( defined( 'WC_LOG_HANDLER' ) && class_exists( WC_LOG_HANDLER ) ) { - $handler_class = WC_LOG_HANDLER; - $default_handler = new $handler_class(); - } else { - $default_handler = new WC_Log_Handler_File(); + $handler_class = Constants::get_constant( 'WC_LOG_HANDLER' ); + if ( ! class_exists( $handler_class ) ) { + $handler_class = WC_Log_Handler_File::class; } - array_push( $handlers, $default_handler ); + array_push( $handlers, new $handler_class() ); return $handlers; } diff --git a/includes/wc-deprecated-functions.php b/includes/wc-deprecated-functions.php index ca53046c7bb..80a31ae4620 100644 --- a/includes/wc-deprecated-functions.php +++ b/includes/wc-deprecated-functions.php @@ -10,6 +10,8 @@ * @version 3.3.0 */ +use Automattic\Jetpack\Constants; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -897,7 +899,7 @@ function woocommerce_compile_less_styles() { * @return string */ function woocommerce_calc_shipping_backwards_compatibility( $value ) { - if ( defined( 'WC_UPDATING' ) ) { + if ( Constants::is_defined( 'WC_UPDATING' ) ) { return $value; } return 'disabled' === get_option( 'woocommerce_ship_to_countries' ) ? 'no' : 'yes'; diff --git a/includes/wc-product-functions.php b/includes/wc-product-functions.php index 87732f7c3fa..e7ee0359e46 100644 --- a/includes/wc-product-functions.php +++ b/includes/wc-product-functions.php @@ -8,6 +8,8 @@ * @version 3.0.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -1334,7 +1336,7 @@ function wc_update_product_lookup_tables_is_running() { function wc_update_product_lookup_tables() { global $wpdb; - $is_cli = defined( 'WP_CLI' ) && WP_CLI; + $is_cli = Constants::is_true( 'WP_CLI' ); if ( ! $is_cli ) { WC_Admin_Notices::add_notice( 'regenerating_lookup_table' ); @@ -1365,7 +1367,9 @@ function wc_update_product_lookup_tables() { 'total_sales', 'downloadable', 'virtual', - 'onsale', // When last column is updated, woocommerce_product_lookup_table_is_generating is updated. + 'onsale', + 'tax_class', + 'tax_status', // When last column is updated, woocommerce_product_lookup_table_is_generating is updated. ); foreach ( $columns as $index => $column ) { @@ -1457,6 +1461,8 @@ function wc_update_product_lookup_tables_column( $column ) { case 'stock_status': case 'average_rating': case 'total_sales': + case 'tax_class': + case 'tax_status': if ( 'total_sales' === $column ) { $meta_key = 'total_sales'; } elseif ( 'average_rating' === $column ) { @@ -1523,10 +1529,13 @@ function wc_update_product_lookup_tables_column( $column ) { ) ); // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - delete_option( 'woocommerce_product_lookup_table_is_generating' ); // Complete. break; } + + // Final column - mark complete. + if ( 'tax_status' === $column ) { + delete_option( 'woocommerce_product_lookup_table_is_generating' ); + } } add_action( 'wc_update_product_lookup_tables_column', 'wc_update_product_lookup_tables_column' ); diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index 40ba942adb8..595b55cd349 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -8,6 +8,8 @@ * @version 2.5.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -250,12 +252,14 @@ function woocommerce_product_loop() { * @return string */ function wc_generator_tag( $gen, $type ) { + $version = Constants::get_constant( 'WC_VERSION' ); + switch ( $type ) { case 'html': - $gen .= "\n" . ''; + $gen .= "\n" . ''; break; case 'xhtml': - $gen .= "\n" . ''; + $gen .= "\n" . ''; break; } return $gen; @@ -1677,6 +1681,7 @@ if ( ! function_exists( 'woocommerce_quantity_input' ) ) { 'pattern' => apply_filters( 'woocommerce_quantity_input_pattern', has_filter( 'woocommerce_stock_amount', 'intval' ) ? '[0-9]*' : '' ), 'inputmode' => apply_filters( 'woocommerce_quantity_input_inputmode', has_filter( 'woocommerce_stock_amount', 'intval' ) ? 'numeric' : '' ), 'product_name' => $product ? $product->get_title() : '', + 'placeholder' => apply_filters( 'woocommerce_quantity_input_placeholder', '', $product ), ); $args = apply_filters( 'woocommerce_quantity_input_args', wp_parse_args( $args, $defaults ), $product ); @@ -2698,7 +2703,7 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) { } else { - $field = ''; foreach ( $countries as $ckey => $cvalue ) { $field .= ''; @@ -2706,7 +2711,7 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) { $field .= ''; - $field .= ''; + $field .= ''; } diff --git a/includes/wc-update-functions.php b/includes/wc-update-functions.php index cbb9218017e..503c293c190 100644 --- a/includes/wc-update-functions.php +++ b/includes/wc-update-functions.php @@ -2081,3 +2081,19 @@ function wc_update_390_change_geolocation_database_update_cron() { function wc_update_390_db_version() { WC_Install::update_db_version( '3.9.0' ); } + +/** + * Increase column size + */ +function wc_update_400_increase_size_of_column() { + global $wpdb; + $wpdb->query( "ALTER TABLE {$wpdb->prefix}wc_product_meta_lookup MODIFY COLUMN `min_price` decimal(19,4) NULL default NULL" ); + $wpdb->query( "ALTER TABLE {$wpdb->prefix}wc_product_meta_lookup MODIFY COLUMN `max_price` decimal(19,4) NULL default NULL" ); +} + +/** + * Update DB version. + */ +function wc_update_400_db_version() { + WC_Install::update_db_version( '4.0.0' ); +} diff --git a/includes/wccom-site/class-wc-wccom-site-installer-requirements-check.php b/includes/wccom-site/class-wc-wccom-site-installer-requirements-check.php index a0a3cf277a0..8e54f3665ba 100644 --- a/includes/wccom-site/class-wc-wccom-site-installer-requirements-check.php +++ b/includes/wccom-site/class-wc-wccom-site-installer-requirements-check.php @@ -6,6 +6,8 @@ * @since 3.8.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -45,7 +47,7 @@ class WC_WCCOM_Site_Installer_Requirements_Check { * @return bool */ private static function met_wp_cron_requirement() { - return ! ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ); + return ! Constants::is_true( 'DISABLE_WP_CRON' ); } /** diff --git a/includes/widgets/class-wc-widget-price-filter.php b/includes/widgets/class-wc-widget-price-filter.php index 699a73971a8..a27bbf1b048 100644 --- a/includes/widgets/class-wc-widget-price-filter.php +++ b/includes/widgets/class-wc-widget-price-filter.php @@ -8,6 +8,8 @@ * @version 2.3.0 */ +use Automattic\Jetpack\Constants; + defined( 'ABSPATH' ) || exit; /** @@ -30,10 +32,11 @@ class WC_Widget_Price_Filter extends WC_Widget { 'label' => __( 'Title', 'woocommerce' ), ), ); - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + $suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min'; + $version = Constants::get_constant( 'WC_VERSION' ); wp_register_script( 'accounting', WC()->plugin_url() . '/assets/js/accounting/accounting' . $suffix . '.js', array( 'jquery' ), '0.4.2', true ); - wp_register_script( 'wc-jquery-ui-touchpunch', WC()->plugin_url() . '/assets/js/jquery-ui-touch-punch/jquery-ui-touch-punch' . $suffix . '.js', array( 'jquery-ui-slider' ), WC_VERSION, true ); - wp_register_script( 'wc-price-slider', WC()->plugin_url() . '/assets/js/frontend/price-slider' . $suffix . '.js', array( 'jquery-ui-slider', 'wc-jquery-ui-touchpunch', 'accounting' ), WC_VERSION, true ); + wp_register_script( 'wc-jquery-ui-touchpunch', WC()->plugin_url() . '/assets/js/jquery-ui-touch-punch/jquery-ui-touch-punch' . $suffix . '.js', array( 'jquery-ui-slider' ), $version, true ); + wp_register_script( 'wc-price-slider', WC()->plugin_url() . '/assets/js/frontend/price-slider' . $suffix . '.js', array( 'jquery-ui-slider', 'wc-jquery-ui-touchpunch', 'accounting' ), $version, true ); wp_localize_script( 'wc-price-slider', 'woocommerce_price_slider_params', diff --git a/package-lock.json b/package-lock.json index c1b6b2958d3..306082a4425 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@babel/cli": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.7.7.tgz", - "integrity": "sha512-XQw5KyCZyu/M8/0rYiZyuwbgIQNzOrJzs9dDLX+MieSgBwTLvTj4QVbLmxJACAIvQIDT7PtyHN2sC48EOWTgaA==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.8.4.tgz", + "integrity": "sha512-XXLgAm6LBbaNxaGhMAznXXaxtCWfuv6PIDJ9Alsy9JYTOh+j2jJz+L/162kkfU1j/pTSxK1xGmlwI4pdIMkoag==", "dev": true, "requires": { "chokidar": "^2.1.8", @@ -21,12 +21,6 @@ "source-map": "^0.5.0" }, "dependencies": { - "commander": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.0.1.tgz", - "integrity": "sha512-IPF4ouhCP+qdlcmCedhxX4xiGBPyigb8v5NeUp+0LyhwLgxMqyp3S0vl7TAPfS/hiP7FC3caI/PB9lTmP8r1NA==", - "dev": true - }, "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", @@ -49,20 +43,32 @@ "@babel/highlight": "^7.0.0" } }, - "@babel/core": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.7.tgz", - "integrity": "sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ==", + "@babel/compat-data": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.5.tgz", + "integrity": "sha512-jWYUqQX/ObOhG1UiEkbH5SANsE/8oKXiQWjj7p7xgj9Zmnt//aUvyz4dBkK0HNsS8/cbyC5NmmH87VekW+mXFg==", + "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.7", - "@babel/helpers": "^7.7.4", - "@babel/parser": "^7.7.7", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4", + "browserslist": "^4.8.5", + "invariant": "^2.2.4", + "semver": "^5.5.0" + } + }, + "@babel/core": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.4.tgz", + "integrity": "sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helpers": "^7.8.4", + "@babel/parser": "^7.8.4", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", "json5": "^2.1.0", "lodash": "^4.17.13", "resolve": "^1.3.2", @@ -71,85 +77,95 @@ }, "dependencies": { "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.8.3" } }, "@babel/generator": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", - "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", "requires": { - "@babel/types": "^7.7.4", + "@babel/types": "^7.8.3", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==" + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==" }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/traverse": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", - "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -237,18 +253,18 @@ } }, "@babel/helper-annotate-as-pure": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.4.tgz", - "integrity": "sha512-2BQmQgECKzYKFPpiycoF9tlb5HA4lrVyAmLLVK177EcQAqjVLciUb2/R+n1boQ9y5ENV3uz2ZqiNw7QMBBw1Og==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", + "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" }, "dependencies": { "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -265,19 +281,19 @@ } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.7.4.tgz", - "integrity": "sha512-Biq/d/WtvfftWZ9Uf39hbPBYDUo986m5Bb4zhkeYDGUllF43D+nUe5M6Vuo6/8JDK/0YX/uBdeoQpyaNhNugZQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", + "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-explode-assignable-expression": "^7.8.3", + "@babel/types": "^7.8.3" }, "dependencies": { "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -294,104 +310,115 @@ } }, "@babel/helper-call-delegate": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.7.4.tgz", - "integrity": "sha512-8JH9/B7J7tCYJ2PpWVpw9JhPuEVHztagNVuQAFBVFYluRMlpG7F1CgKEgGeL6KFqcsIa92ZYVj6DSc0XwmN1ZA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz", + "integrity": "sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-hoist-variables": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" }, "dependencies": { "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.8.3" } }, "@babel/generator": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", - "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", "dev": true, "requires": { - "@babel/types": "^7.7.4", + "@babel/types": "^7.8.3", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/traverse": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", - "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -440,68 +467,101 @@ } } }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.7.4.tgz", - "integrity": "sha512-Mt+jBKaxL0zfOIWrfQpnfYCN7/rS6GKx6CCCfuoqVVd+17R8zNDlzVYmIi9qyb2wOk002NsmSTDymkIygDUH7A==", + "@babel/helper-compilation-targets": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.4.tgz", + "integrity": "sha512-3k3BsKMvPp5bjxgMdrFyq0UaEO48HciVrOVF0+lon8pp95cyJ2ujAh0TrBHNMnJGT2rr0iKOJPFFbSqjDyf/Pg==", "dev": true, "requires": { - "@babel/helper-regex": "^7.4.4", + "@babel/compat-data": "^7.8.4", + "browserslist": "^4.8.5", + "invariant": "^2.2.4", + "levenary": "^1.1.1", + "semver": "^5.5.0" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz", + "integrity": "sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q==", + "dev": true, + "requires": { + "@babel/helper-regex": "^7.8.3", "regexpu-core": "^4.6.0" } }, "@babel/helper-define-map": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.7.4.tgz", - "integrity": "sha512-v5LorqOa0nVQUvAUTUF3KPastvUt/HzByXNamKQ6RdJRTV7j8rLL+WB5C/MzzWAwOomxDhYFb1wLLxHqox86lg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", + "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/types": "^7.8.3", "lodash": "^4.17.13" }, "dependencies": { - "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/highlight": "^7.8.3" + } + }, + "@babel/helper-function-name": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -518,103 +578,114 @@ } }, "@babel/helper-explode-assignable-expression": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.7.4.tgz", - "integrity": "sha512-2/SicuFrNSXsZNBxe5UGdLr+HZg+raWBLE9vC98bdYOKX/U6PY0mdGlYUJdtTDPSU0Lw0PNbKKDpwYHJLn2jLg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", + "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", "dev": true, "requires": { - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" }, "dependencies": { "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.8.3" } }, "@babel/generator": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", - "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", "dev": true, "requires": { - "@babel/types": "^7.7.4", + "@babel/types": "^7.8.3", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/traverse": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", - "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -682,18 +753,18 @@ } }, "@babel/helper-hoist-variables": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.4.tgz", - "integrity": "sha512-wQC4xyvc1Jo/FnLirL6CEgPgPCa8M74tOdjWpRhQYapz5JC7u3NYU1zCVoVAGCE3EaIP9T1A3iW0WLJ+reZlpQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", + "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" }, "dependencies": { "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -710,18 +781,18 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.4.tgz", - "integrity": "sha512-9KcA1X2E3OjXl/ykfMMInBK+uVdfIVakVe7W7Lg3wfXUNyS3Q1HWLFRwZIjhqiCGbslummPDnmb7vIekS0C1vw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", + "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" }, "dependencies": { "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -738,18 +809,18 @@ } }, "@babel/helper-module-imports": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz", - "integrity": "sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", + "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" }, "dependencies": { "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -766,49 +837,69 @@ } }, "@babel/helper-module-transforms": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.7.5.tgz", - "integrity": "sha512-A7pSxyJf1gN5qXVcidwLWydjftUN878VkalhXX5iQDuGyiGK3sOrrKKHF4/A4fwHtnsotv/NipwAeLzY4KQPvw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz", + "integrity": "sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.7.4", - "@babel/helper-simple-access": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-simple-access": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3", "lodash": "^4.17.13" }, "dependencies": { - "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/highlight": "^7.8.3" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -825,18 +916,18 @@ } }, "@babel/helper-optimise-call-expression": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.4.tgz", - "integrity": "sha512-VB7gWZ2fDkSuqW6b1AKXkJWO5NyNI3bFL/kK79/30moK57blr6NbH8xcl2XcKCwOmJosftWunZqfO84IGq3ZZg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", + "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" }, "dependencies": { "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -858,117 +949,126 @@ "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" }, "@babel/helper-regex": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz", - "integrity": "sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", + "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", "dev": true, "requires": { "lodash": "^4.17.13" } }, "@babel/helper-remap-async-to-generator": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.4.tgz", - "integrity": "sha512-Sk4xmtVdM9sA/jCI80f+KS+Md+ZHIpjuqmYPk1M7F/upHou5e4ReYmExAiu6PVe65BhJPZA2CY9x9k4BqE5klw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", + "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.7.4", - "@babel/helper-wrap-function": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-wrap-function": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" }, "dependencies": { - "@babel/generator": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", - "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/types": "^7.7.4", + "@babel/highlight": "^7.8.3" + } + }, + "@babel/generator": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/traverse": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", - "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - } } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1018,105 +1118,116 @@ } }, "@babel/helper-replace-supers": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.7.4.tgz", - "integrity": "sha512-pP0tfgg9hsZWo5ZboYGuBn/bbYT/hdLPVSS4NMmiRJdwWhP0IznPwN9AE1JwyGsjSPLC364I0Qh5p+EPkGPNpg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz", + "integrity": "sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.7.4", - "@babel/helper-optimise-call-expression": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" }, "dependencies": { "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.8.3" } }, "@babel/generator": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", - "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", "dev": true, "requires": { - "@babel/types": "^7.7.4", + "@babel/types": "^7.8.3", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/traverse": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", - "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1166,36 +1277,56 @@ } }, "@babel/helper-simple-access": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.7.4.tgz", - "integrity": "sha512-zK7THeEXfan7UlWsG2A6CI/L9jVnI5+xxKZOdej39Y0YtDYKx9raHk5F2EtK9K8DHRTihYwg20ADt9S36GR78A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", + "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", "dev": true, "requires": { - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" }, "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1220,107 +1351,116 @@ } }, "@babel/helper-wrap-function": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.7.4.tgz", - "integrity": "sha512-VsfzZt6wmsocOaVU0OokwrIytHND55yvyT4BPB9AIIgwr8+x7617hetdJTsuGwygN5RC6mxA9EJztTjuwm2ofg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", + "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-function-name": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" }, "dependencies": { - "@babel/generator": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", - "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/types": "^7.7.4", + "@babel/highlight": "^7.8.3" + } + }, + "@babel/generator": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/traverse": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", - "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - } } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1370,97 +1510,105 @@ } }, "@babel/helpers": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.4.tgz", - "integrity": "sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz", + "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==", "requires": { - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3" }, "dependencies": { - "@babel/generator": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", - "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "requires": { - "@babel/types": "^7.7.4", + "@babel/highlight": "^7.8.3" + } + }, + "@babel/generator": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", + "requires": { + "@babel/types": "^7.8.3", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==" + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==" }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/traverse": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", - "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "requires": { - "@babel/highlight": "^7.0.0" - } - } } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -1518,84 +1666,165 @@ "integrity": "sha512-5pCS4mOsL+ANsFZGdvNLybx4wtqAZJ0MJjMHxvzI3bvIsz6sQvzW8XX92EYIkiPtIvcfG3Aj+Ir5VNyjnZhP7w==" }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.4.tgz", - "integrity": "sha512-1ypyZvGRXriY/QP668+s8sFr2mqinhkRDMPSQLNghCQE+GAkFtp+wkHVvg2+Hdki8gwP+NFzJBJ/N1BfzCCDEw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", + "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.7.4", - "@babel/plugin-syntax-async-generators": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.4.tgz", - "integrity": "sha512-StH+nGAdO6qDB1l8sZ5UBV8AC3F2VW2I8Vfld73TMKyptMU9DY5YsJAS8U81+vEtxcH3Y/La0wG0btDrhpnhjQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", + "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-proposal-json-strings": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.7.4.tgz", - "integrity": "sha512-wQvt3akcBTfLU/wYoqm/ws7YOAQKu8EVJEvHip/mzkNtjaclQoCCIqKXFP5/eyfnfbQCDV3OLRIK3mIVyXuZlw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", + "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-json-strings": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.7.7.tgz", - "integrity": "sha512-3qp9I8lelgzNedI3hrhkvhaEYree6+WHnyA/q4Dza9z7iEIs1eyhWyJnetk3jJ69RT0AT4G0UhEGwyGFJ7GUuQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-object-rest-spread": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0" }, "dependencies": { - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.7.4.tgz", - "integrity": "sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true } } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.7.4.tgz", - "integrity": "sha512-DyM7U2bnsQerCQ+sejcTNZh8KQEUuC3ufzdnVnSiUv/qoGJp2Z3hanKL18KDhsBT5Wj6a7CMT5mdyCNJsEaA9w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz", + "integrity": "sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.7.tgz", - "integrity": "sha512-80PbkKyORBUVm1fbTLrHpYdJxMThzM1UqFGh0ALEhO9TYbG86Ah9zQYAB/84axz2vcxefDLdZwWwZNlYARlu9w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz", + "integrity": "sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-syntax-async-generators": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.7.4.tgz", - "integrity": "sha512-Li4+EjSpBgxcsmeEF8IFcfV/+yJGxHXDirDkEoyFjumuwbmfCVHUt0HuowD/iGM7OhIRyXJH9YXxqiH6N815+g==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-syntax-bigint": { @@ -1614,21 +1843,54 @@ } }, "@babel/plugin-syntax-dynamic-import": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.7.4.tgz", - "integrity": "sha512-jHQW0vbRGvwQNgyVxwDh4yuXu4bH1f5/EICJLAhl1SblLs2CDhrsmCk+v5XLdE9wxtAFRyxx+P//Iw+a5L/tTg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-syntax-json-strings": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.7.4.tgz", - "integrity": "sha512-QpGupahTQW1mHRXddMG5srgpHWqRLwJnJZKXTigB9RPFCCGbDGCgBeM/iC82ICXp414WeYx/tD54w7M2qRqTMg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-syntax-object-rest-spread": { @@ -1647,128 +1909,219 @@ } }, "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.7.4.tgz", - "integrity": "sha512-4ZSuzWgFxqHRE31Glu+fEr/MirNZOMYmD/0BhBWyLyOOQz/gTAl7QmWm2hX1QxEIXsr2vkdlwxIzTyiYRC4xcQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-syntax-top-level-await": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.7.4.tgz", - "integrity": "sha512-wdsOw0MvkL1UIgiQ/IFr3ETcfv1xb8RMM0H9wbiDyLaJFyiDg5oZvDLCXosIXmFeIlweML5iOBXAkqddkYNizg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", + "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.7.4.tgz", - "integrity": "sha512-zUXy3e8jBNPiffmqkHRNDdZM2r8DWhCB7HhcoyZjiK1TxYEluLHAvQuYnTT+ARqRpabWqy/NHkO6e3MsYB5YfA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", + "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.4.tgz", - "integrity": "sha512-zpUTZphp5nHokuy8yLlyafxCJ0rSlFoSHypTUWgpdwoDXWQcseaect7cJ8Ppk6nunOM6+5rPMkod4OYKPR5MUg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", + "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.7.4" + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.7.4.tgz", - "integrity": "sha512-kqtQzwtKcpPclHYjLK//3lH8OFsCDuDJBaFhVwf8kqdnF6MN4l618UDlcA7TfRs3FayrHj+svYnSX8MC9zmUyQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", + "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-block-scoping": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.7.4.tgz", - "integrity": "sha512-2VBe9u0G+fDt9B5OV5DQH4KBf5DoiNkwFKOz0TCvBWvdAN2rOykCTkrL+jTLxfCAm76l9Qo5OqL7HBOx2dWggg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", + "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-plugin-utils": "^7.8.3", "lodash": "^4.17.13" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-classes": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.4.tgz", - "integrity": "sha512-sK1mjWat7K+buWRuImEzjNf68qrKcrddtpQo3swi9j7dUcG6y6R6+Di039QN2bD1dykeswlagupEmpOatFHHUg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz", + "integrity": "sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.7.4", - "@babel/helper-define-map": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-optimise-call-expression": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-define-map": "^7.8.3", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", "globals": "^11.1.0" }, "dependencies": { - "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/highlight": "^7.8.3" + } + }, + "@babel/helper-function-name": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1791,112 +2144,186 @@ } }, "@babel/plugin-transform-computed-properties": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.7.4.tgz", - "integrity": "sha512-bSNsOsZnlpLLyQew35rl4Fma3yKWqK3ImWMSC/Nc+6nGjC9s5NFWAer1YQ899/6s9HxO2zQC1WoFNfkOqRkqRQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", + "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-destructuring": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.7.4.tgz", - "integrity": "sha512-4jFMXI1Cu2aXbcXXl8Lr6YubCn6Oc7k9lLsu8v61TZh+1jny2BWmdtvY9zSUlLdGUvcy9DMAWyZEOqjsbeg/wA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz", + "integrity": "sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.7.tgz", - "integrity": "sha512-b4in+YlTeE/QmTgrllnb3bHA0HntYvjz8O3Mcbx75UBPJA2xhb5A8nle498VhxSXJHQefjtQxpnLPehDJ4TRlg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", + "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.7.4.tgz", - "integrity": "sha512-g1y4/G6xGWMD85Tlft5XedGaZBCIVN+/P0bs6eabmcPP9egFleMAo65OOjlhcz1njpwagyY3t0nsQC9oTFegJA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", + "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.7.4.tgz", - "integrity": "sha512-MCqiLfCKm6KEA1dglf6Uqq1ElDIZwFuzz1WH5mTf8k2uQSxEJMbOIEh7IZv7uichr7PMfi5YVSrr1vz+ipp7AQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", + "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-for-of": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.7.4.tgz", - "integrity": "sha512-zZ1fD1B8keYtEcKF+M1TROfeHTKnijcVQm0yO/Yu1f7qoDoxEIc/+GX6Go430Bg84eM/xwPFp0+h4EbZg7epAA==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz", + "integrity": "sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.4.tgz", - "integrity": "sha512-E/x09TvjHNhsULs2IusN+aJNRV5zKwxu1cpirZyRPw+FyyIKEHPXTsadj48bVpc1R5Qq1B5ZkzumuFLytnbT6g==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", + "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" }, "dependencies": { - "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/highlight": "^7.8.3" + } + }, + "@babel/helper-function-name": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1913,119 +2340,190 @@ } }, "@babel/plugin-transform-literals": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.7.4.tgz", - "integrity": "sha512-X2MSV7LfJFm4aZfxd0yLVFrEXAgPqYoDG53Br/tCKiKYfX0MjVjQeWPIhPHHsCqzwQANq+FLN786fF5rgLS+gw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", + "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.7.4.tgz", - "integrity": "sha512-9VMwMO7i69LHTesL0RdGy93JU6a+qOPuvB4F4d0kR0zyVjJRVJRaoaGjhtki6SzQUu8yen/vxPKN6CWnCUw6bA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", + "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-modules-amd": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.7.5.tgz", - "integrity": "sha512-CT57FG4A2ZUNU1v+HdvDSDrjNWBrtCmSH6YbbgN3Lrf0Di/q/lWRxZrE72p3+HCCz9UjfZOEBdphgC0nzOS6DQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz", + "integrity": "sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.7.5", - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.5.tgz", - "integrity": "sha512-9Cq4zTFExwFhQI6MT1aFxgqhIsMWQWDVwOgLzl7PTWJHsNaqFvklAU+Oz6AQLAS0dJKTwZSOCo20INwktxpi3Q==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz", + "integrity": "sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.7.5", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.7.4", + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-simple-access": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.7.4.tgz", - "integrity": "sha512-y2c96hmcsUi6LrMqvmNDPBBiGCiQu0aYqpHatVVu6kD4mFEXKjyNxd/drc18XXAf9dv7UXjrZwBVmTTGaGP8iw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz", + "integrity": "sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-hoist-variables": "^7.8.3", + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-modules-umd": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.7.4.tgz", - "integrity": "sha512-u2B8TIi0qZI4j8q4C51ktfO7E3cQ0qnaXFI1/OXITordD40tt17g/sXqgNNCcMTcBFKrUPcGDx+TBJuZxLx7tw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz", + "integrity": "sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.7.4.tgz", - "integrity": "sha512-jBUkiqLKvUWpv9GLSuHUFYdmHg0ujC1JEYoZUfeOOfNydZXp1sXObgyPatpcwjWgsdBGsagWW0cdJpX/DO2jMw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", + "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.7.4" + "@babel/helper-create-regexp-features-plugin": "^7.8.3" } }, "@babel/plugin-transform-new-target": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.7.4.tgz", - "integrity": "sha512-CnPRiNtOG1vRodnsyGX37bHQleHE14B9dnnlgSeEs3ek3fHN1A1SScglTCg1sfbe7sRQ2BUcpgpTpWSfMKz3gg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", + "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-object-super": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.7.4.tgz", - "integrity": "sha512-ho+dAEhC2aRnff2JCA0SAK7V2R62zJd/7dmtoe7MHcso4C2mS+vZjn1Pb1pCVZvJs1mgsvv5+7sT+m3Bysb6eg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", + "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-parameters": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.7.7.tgz", - "integrity": "sha512-OhGSrf9ZBrr1fw84oFXj5hgi8Nmg+E2w5L7NhnG0lPvpDtqd7dbyilM2/vR8CKbJ907RyxPh2kj6sBCSSfI9Ew==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz", + "integrity": "sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA==", "dev": true, "requires": { - "@babel/helper-call-delegate": "^7.7.4", - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-call-delegate": "^7.8.3", + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" }, "dependencies": { "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -2042,93 +2540,157 @@ } }, "@babel/plugin-transform-property-literals": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.7.4.tgz", - "integrity": "sha512-MatJhlC4iHsIskWYyawl53KuHrt+kALSADLQQ/HkhTjX954fkxIEh4q5slL4oRAnsm/eDoZ4q0CIZpcqBuxhJQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", + "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-regenerator": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.5.tgz", - "integrity": "sha512-/8I8tPvX2FkuEyWbjRCt4qTAgZK0DVy8QRguhA524UH48RfGJy94On2ri+dCuwOpcerPRl9O4ebQkRcVzIaGBw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz", + "integrity": "sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA==", "dev": true, "requires": { "regenerator-transform": "^0.14.0" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.7.4.tgz", - "integrity": "sha512-OrPiUB5s5XvkCO1lS7D8ZtHcswIC57j62acAnJZKqGGnHP+TIc/ljQSrgdX/QyOTdEK5COAhuc820Hi1q2UgLQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", + "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.7.4.tgz", - "integrity": "sha512-q+suddWRfIcnyG5YiDP58sT65AJDZSUhXQDZE3r04AuqD6d/XLaQPPXSBzP2zGerkgBivqtQm9XKGLuHqBID6Q==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", + "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-spread": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.7.4.tgz", - "integrity": "sha512-8OSs0FLe5/80cndziPlg4R0K6HcWSM0zyNhHhLsmw/Nc5MaA49cAsnoJ/t/YZf8qkG7fD+UjTRaApVDB526d7Q==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", + "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.7.4.tgz", - "integrity": "sha512-Ls2NASyL6qtVe1H1hXts9yuEeONV2TJZmplLONkMPUG158CtmnrzW5Q5teibM5UVOFjG0D3IC5mzXR6pPpUY7A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", + "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-regex": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-template-literals": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.7.4.tgz", - "integrity": "sha512-sA+KxLwF3QwGj5abMHkHgshp9+rRz+oY9uoRil4CyLtgEuE/88dpkeWgNk5qKVsJE9iSfly3nvHapdRiIS2wnQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", + "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.7.4.tgz", - "integrity": "sha512-KQPUQ/7mqe2m0B8VecdyaW5XcQYaePyl9R7IsKd+irzj6jvbhoGnRE+M0aNkyAzI07VfUQ9266L5xMARitV3wg==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", + "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.4.tgz", - "integrity": "sha512-N77UUIV+WCvE+5yHw+oks3m18/umd7y392Zv7mYTpFqHtkpcc+QUz+gLJNTWVlWROIWeLqY0f3OjZxV5TcXnRw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", + "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + } } }, "@babel/polyfill": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.7.0.tgz", - "integrity": "sha512-/TS23MVvo34dFmf8mwCisCbWGrfhbiWZSwBo6HkADTBhUa2Q/jWltyY/tpofz/b6/RIhqaqQcquptCirqIhOaQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.8.3.tgz", + "integrity": "sha512-0QEgn2zkCzqGIkSWWAEmvxD7e00Nm9asTtQvi7HdlYvMhjy/J38V/1Y9ode0zEJeIuxAI0uftiAzqc7nVeWUGg==", "dev": true, "requires": { "core-js": "^2.6.5", @@ -2144,77 +2706,80 @@ } }, "@babel/preset-env": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.7.7.tgz", - "integrity": "sha512-pCu0hrSSDVI7kCVUOdcMNQEbOPJ52E+LrQ14sN8uL2ALfSqePZQlKrOy+tM4uhEdYlCHi4imr8Zz2cZe9oSdIg==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.4.tgz", + "integrity": "sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.7.4", - "@babel/plugin-proposal-dynamic-import": "^7.7.4", - "@babel/plugin-proposal-json-strings": "^7.7.4", - "@babel/plugin-proposal-object-rest-spread": "^7.7.7", - "@babel/plugin-proposal-optional-catch-binding": "^7.7.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.7.7", - "@babel/plugin-syntax-async-generators": "^7.7.4", - "@babel/plugin-syntax-dynamic-import": "^7.7.4", - "@babel/plugin-syntax-json-strings": "^7.7.4", - "@babel/plugin-syntax-object-rest-spread": "^7.7.4", - "@babel/plugin-syntax-optional-catch-binding": "^7.7.4", - "@babel/plugin-syntax-top-level-await": "^7.7.4", - "@babel/plugin-transform-arrow-functions": "^7.7.4", - "@babel/plugin-transform-async-to-generator": "^7.7.4", - "@babel/plugin-transform-block-scoped-functions": "^7.7.4", - "@babel/plugin-transform-block-scoping": "^7.7.4", - "@babel/plugin-transform-classes": "^7.7.4", - "@babel/plugin-transform-computed-properties": "^7.7.4", - "@babel/plugin-transform-destructuring": "^7.7.4", - "@babel/plugin-transform-dotall-regex": "^7.7.7", - "@babel/plugin-transform-duplicate-keys": "^7.7.4", - "@babel/plugin-transform-exponentiation-operator": "^7.7.4", - "@babel/plugin-transform-for-of": "^7.7.4", - "@babel/plugin-transform-function-name": "^7.7.4", - "@babel/plugin-transform-literals": "^7.7.4", - "@babel/plugin-transform-member-expression-literals": "^7.7.4", - "@babel/plugin-transform-modules-amd": "^7.7.5", - "@babel/plugin-transform-modules-commonjs": "^7.7.5", - "@babel/plugin-transform-modules-systemjs": "^7.7.4", - "@babel/plugin-transform-modules-umd": "^7.7.4", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.7.4", - "@babel/plugin-transform-new-target": "^7.7.4", - "@babel/plugin-transform-object-super": "^7.7.4", - "@babel/plugin-transform-parameters": "^7.7.7", - "@babel/plugin-transform-property-literals": "^7.7.4", - "@babel/plugin-transform-regenerator": "^7.7.5", - "@babel/plugin-transform-reserved-words": "^7.7.4", - "@babel/plugin-transform-shorthand-properties": "^7.7.4", - "@babel/plugin-transform-spread": "^7.7.4", - "@babel/plugin-transform-sticky-regex": "^7.7.4", - "@babel/plugin-transform-template-literals": "^7.7.4", - "@babel/plugin-transform-typeof-symbol": "^7.7.4", - "@babel/plugin-transform-unicode-regex": "^7.7.4", - "@babel/types": "^7.7.4", - "browserslist": "^4.6.0", - "core-js-compat": "^3.6.0", + "@babel/compat-data": "^7.8.4", + "@babel/helper-compilation-targets": "^7.8.4", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-proposal-async-generator-functions": "^7.8.3", + "@babel/plugin-proposal-dynamic-import": "^7.8.3", + "@babel/plugin-proposal-json-strings": "^7.8.3", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.8.3", + "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.8.3", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.8.3", + "@babel/plugin-transform-arrow-functions": "^7.8.3", + "@babel/plugin-transform-async-to-generator": "^7.8.3", + "@babel/plugin-transform-block-scoped-functions": "^7.8.3", + "@babel/plugin-transform-block-scoping": "^7.8.3", + "@babel/plugin-transform-classes": "^7.8.3", + "@babel/plugin-transform-computed-properties": "^7.8.3", + "@babel/plugin-transform-destructuring": "^7.8.3", + "@babel/plugin-transform-dotall-regex": "^7.8.3", + "@babel/plugin-transform-duplicate-keys": "^7.8.3", + "@babel/plugin-transform-exponentiation-operator": "^7.8.3", + "@babel/plugin-transform-for-of": "^7.8.4", + "@babel/plugin-transform-function-name": "^7.8.3", + "@babel/plugin-transform-literals": "^7.8.3", + "@babel/plugin-transform-member-expression-literals": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.8.3", + "@babel/plugin-transform-modules-commonjs": "^7.8.3", + "@babel/plugin-transform-modules-systemjs": "^7.8.3", + "@babel/plugin-transform-modules-umd": "^7.8.3", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", + "@babel/plugin-transform-new-target": "^7.8.3", + "@babel/plugin-transform-object-super": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.8.4", + "@babel/plugin-transform-property-literals": "^7.8.3", + "@babel/plugin-transform-regenerator": "^7.8.3", + "@babel/plugin-transform-reserved-words": "^7.8.3", + "@babel/plugin-transform-shorthand-properties": "^7.8.3", + "@babel/plugin-transform-spread": "^7.8.3", + "@babel/plugin-transform-sticky-regex": "^7.8.3", + "@babel/plugin-transform-template-literals": "^7.8.3", + "@babel/plugin-transform-typeof-symbol": "^7.8.4", + "@babel/plugin-transform-unicode-regex": "^7.8.3", + "@babel/types": "^7.8.3", + "browserslist": "^4.8.5", + "core-js-compat": "^3.6.2", "invariant": "^2.2.2", - "js-levenshtein": "^1.1.3", + "levenary": "^1.1.1", "semver": "^5.5.0" }, "dependencies": { - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.7.4.tgz", - "integrity": "sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -2231,9 +2796,9 @@ } }, "@babel/register": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.7.7.tgz", - "integrity": "sha512-S2mv9a5dc2pcpg/ConlKZx/6wXaEwHeqfo7x/QbXsdCAZm+WJC1ekVvL1TVxNsedTs5y/gG63MhJTEsmwmjtiA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.8.3.tgz", + "integrity": "sha512-t7UqebaWwo9nXWClIPLPloa5pN33A2leVs8Hf0e9g9YwUP8/H9NeR7DJU+4CXo23QtjChQv5a3DjEtT83ih1rg==", "dev": true, "requires": { "find-cache-dir": "^2.0.0", @@ -4154,18 +4719,27 @@ } }, "@wordpress/e2e-test-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-4.0.0.tgz", - "integrity": "sha512-w9IQo4+nlrwQxKKOOk03JLQ6BF/Op/jH5/RHsDIQChli5KJYGY2TkKy5ilVcx1/tLerwkXSIWUrNDlOszhoSig==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-4.2.0.tgz", + "integrity": "sha512-EkwnGmFr7ShA2CB7GocJ6OxCuAMh7i37vcosyhW0f4rlZz2nDd3Hyi7oaRKQtCgfCbqam6kegtBoMHzxH86sPw==", "dev": true, "requires": { - "@babel/runtime": "^7.4.4", - "@wordpress/keycodes": "^2.7.0", - "@wordpress/url": "^2.9.0", + "@babel/runtime": "^7.8.3", + "@wordpress/keycodes": "^2.9.0", + "@wordpress/url": "^2.10.0", "lodash": "^4.17.15", "node-fetch": "^1.7.3" }, "dependencies": { + "@babel/runtime": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", + "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", @@ -4175,12 +4749,12 @@ } }, "@wordpress/i18n": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-3.7.0.tgz", - "integrity": "sha512-yavu3yAKbSkEosQvEd0lCa064SdFFb8i6f7RfZGDq/TQfJHBaJQvRA4Hd/CtrOXqS6DLjw2rLNrVG4XcJFss1A==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-3.9.0.tgz", + "integrity": "sha512-ACpLPvdzAosAPqSLUaYQSX7fB5yAV5dFy8Y37FWLsZrv4NhUQ+rfDLdrXrCWm19LEZ5nTFfZUT0TIbYKekqIug==", "dev": true, "requires": { - "@babel/runtime": "^7.4.4", + "@babel/runtime": "^7.8.3", "gettext-parser": "^1.3.1", "lodash": "^4.17.15", "memize": "^1.0.5", @@ -4188,6 +4762,15 @@ "tannin": "^1.1.0" }, "dependencies": { + "@babel/runtime": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", + "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", @@ -4197,16 +4780,25 @@ } }, "@wordpress/keycodes": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-2.7.0.tgz", - "integrity": "sha512-FPOFKSPY5WrvQuNr1l/WYn/ey+NoRO+RKQTlGR2EgpfWonqVGpV+CfEVyvgPVj8BBVcQHVDJYGkNEKDsoZ5l+g==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-2.9.0.tgz", + "integrity": "sha512-m9SO9eYbzuGv5kNZLimL2O7khDddb+uNAkCJC7juD9K/a+l2LiXSLJRm6gAmnBdrGP8UrTudR0oLaPZLcKXYZA==", "dev": true, "requires": { - "@babel/runtime": "^7.4.4", - "@wordpress/i18n": "^3.7.0", + "@babel/runtime": "^7.8.3", + "@wordpress/i18n": "^3.9.0", "lodash": "^4.17.15" }, "dependencies": { + "@babel/runtime": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", + "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", @@ -4216,13 +4808,31 @@ } }, "@wordpress/url": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-2.9.0.tgz", - "integrity": "sha512-ntrXO42/NElNHIrezoYPjWrXNyNYqyHzvvtBVSMLwwwMf7836t/C7GACuk56O3PwQEmSikMNStHQnNCwmyeaag==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-2.10.0.tgz", + "integrity": "sha512-BmB3nPSNuT0vKoUQpcrCI99mrJtr3yKz/yUjVsZoThrvNs4OpAKVSfYXHuVgDkJR7oPP29K/EPG71G3ZzQ4Vhg==", "dev": true, "requires": { - "@babel/runtime": "^7.4.4", + "@babel/runtime": "^7.8.3", + "lodash": "^4.17.15", "qs": "^6.5.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", + "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } } }, "abab": { @@ -4604,52 +5214,63 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" }, "autoprefixer": { - "version": "9.7.3", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.3.tgz", - "integrity": "sha512-8T5Y1C5Iyj6PgkPSFd0ODvK9DIleuPKUPYniNxybS47g2k2wFgLZ46lGQHlBuGKIAEV8fbCDfKCCRS1tvOgc3Q==", + "version": "9.7.4", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.4.tgz", + "integrity": "sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g==", "dev": true, "requires": { - "browserslist": "^4.8.0", - "caniuse-lite": "^1.0.30001012", + "browserslist": "^4.8.3", + "caniuse-lite": "^1.0.30001020", "chalk": "^2.4.2", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.23", + "postcss": "^7.0.26", "postcss-value-parser": "^4.0.2" }, "dependencies": { "browserslist": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.0.tgz", - "integrity": "sha512-HYnxc/oLRWvJ3TsGegR0SRL/UDnknGq2s/a8dYYEO+kOQ9m9apKoS5oiathLKZdh/e9uE+/J3j92qPlGD/vTqA==", + "version": "4.8.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.6.tgz", + "integrity": "sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001012", - "electron-to-chromium": "^1.3.317", - "node-releases": "^1.1.41" + "caniuse-lite": "^1.0.30001023", + "electron-to-chromium": "^1.3.341", + "node-releases": "^1.1.47" } }, "caniuse-lite": { - "version": "1.0.30001013", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001013.tgz", - "integrity": "sha512-hOAXaWKuq/UVFgYawxIOdPdyMQdYcwOCDOjnZcKn7wCgFUrhP7smuNZjGLuJlPSgE6aRA4cRJ+bGSrhtEt7ZAg==", + "version": "1.0.30001023", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz", + "integrity": "sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA==", "dev": true }, "electron-to-chromium": { - "version": "1.3.322", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz", - "integrity": "sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA==", + "version": "1.3.344", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz", + "integrity": "sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw==", "dev": true }, "node-releases": { - "version": "1.1.41", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.41.tgz", - "integrity": "sha512-+IctMa7wIs8Cfsa8iYzeaLTFwv5Y4r5jZud+4AnfymzeEXKBCavFX0KBgzVaPVqf0ywa6PrO8/b+bPqdwjGBSg==", + "version": "1.1.47", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.47.tgz", + "integrity": "sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA==", "dev": true, "requires": { "semver": "^6.3.0" } }, + "postcss": { + "version": "7.0.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.26.tgz", + "integrity": "sha512-IY4oRjpXWYshuTDFxMVkJDtWIk2LhsTlu8bZnbEJA4+bYT16Lvpo8Qv6EvDumhYRgzjZl489pmsY3qVgJQ08nA==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -5306,6 +5927,16 @@ "dev": true, "optional": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", @@ -5377,14 +6008,14 @@ "dev": true }, "browserslist": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.2.tgz", - "integrity": "sha512-+M4oeaTplPm/f1pXDw84YohEv7B1i/2Aisei8s4s6k3QsoSHa7i5sz8u/cGQkkatCPxMASKxPualR4wwYgVboA==", + "version": "4.8.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.6.tgz", + "integrity": "sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001015", - "electron-to-chromium": "^1.3.322", - "node-releases": "^1.1.42" + "caniuse-lite": "^1.0.30001023", + "electron-to-chromium": "^1.3.341", + "node-releases": "^1.1.47" } }, "bser": { @@ -5483,9 +6114,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001016", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001016.tgz", - "integrity": "sha512-yYQ2QfotceRiH4U+h1Us86WJXtVHDmy3nEKIdYPsZCYnOV5/tMgGbmoIlrMzmh2VXlproqYtVaKeGDBkMZifFA==", + "version": "1.0.30001023", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz", + "integrity": "sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA==", "dev": true }, "capture-exit": { @@ -6004,6 +6635,12 @@ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, + "compare-versions": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.5.1.tgz", + "integrity": "sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg==", + "dev": true + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -6027,9 +6664,9 @@ } }, "config": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/config/-/config-3.2.4.tgz", - "integrity": "sha512-H1XIGfnU1EAkfjSLn9ZvYDRx9lOezDViuzLDgiJ/lMeqjYe3q6iQfpcLt2NInckJgpAeekbNhQkmnnbdEDs9rw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/config/-/config-3.2.5.tgz", + "integrity": "sha512-8itpjyR01lAJanhAlPncBngYRZez/LoRLW8wnGi+6SEcsUyA1wvHvbpIrAJYDJT+W9BScnj4mYoUgbtp9I+0+Q==", "dev": true, "requires": { "json5": "^1.0.1" @@ -6076,12 +6713,12 @@ "dev": true }, "core-js-compat": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.0.tgz", - "integrity": "sha512-Z3eCNjGgoYluH89Jt4wVkfYsc/VdLrA2/woX5lm0isO/pCT+P+Y+o65bOuEnjDJLthdwTBxbCVzptTXtc18fJg==", + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", + "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==", "dev": true, "requires": { - "browserslist": "^4.8.2", + "browserslist": "^4.8.3", "semver": "7.0.0" }, "dependencies": { @@ -6642,9 +7279,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.322", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz", - "integrity": "sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA==", + "version": "1.3.344", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz", + "integrity": "sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw==", "dev": true }, "elegant-spinner": { @@ -6702,23 +7339,36 @@ } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", + "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", "dev": true, "requires": { - "es-to-primitive": "^1.2.0", + "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + } } }, "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { "is-callable": "^1.1.4", @@ -7323,6 +7973,13 @@ "integrity": "sha1-peeo/7+kk7Q7kju9TKiaU7Y7YSs=", "dev": true }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fileset": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", @@ -7430,6 +8087,15 @@ "pinkie-promise": "^2.0.0" } }, + "find-versions": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "dev": true, + "requires": { + "semver-regex": "^2.0.0" + } + }, "findup": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/findup/-/findup-0.1.5.tgz", @@ -7585,41 +8251,38 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", + "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" + "node-pre-gyp": "*" }, "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "bundled": true, "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "bundled": true, "dev": true, "optional": true }, "aproba": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "bundled": true, "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7629,15 +8292,13 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "bundled": true, "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7646,44 +8307,38 @@ } }, "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "version": "1.1.3", + "bundled": true, "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "bundled": true, "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "bundled": true, "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "bundled": true, "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "bundled": true, "dev": true, "optional": true }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "3.2.6", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7692,46 +8347,40 @@ }, "deep-extend": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "bundled": true, "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "bundled": true, "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "bundled": true, "dev": true, "optional": true }, "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "version": "1.2.7", + "bundled": true, "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.6.0" } }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "bundled": true, "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7746,9 +8395,8 @@ } }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.6", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7762,15 +8410,13 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "bundled": true, "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7778,9 +8424,8 @@ } }, "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "version": "3.0.3", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7789,8 +8434,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7799,23 +8443,20 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "version": "2.0.4", + "bundled": true, "dev": true, "optional": true }, "ini": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "bundled": true, "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7824,15 +8465,13 @@ }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "bundled": true, "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7841,15 +8480,13 @@ }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "bundled": true, "dev": true, "optional": true }, "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "version": "2.9.0", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7858,19 +8495,17 @@ } }, "minizlib": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "version": "1.3.3", + "bundled": true, "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.9.0" } }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7878,28 +8513,25 @@ } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "bundled": true, "dev": true, "optional": true }, "needle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", - "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", + "version": "2.4.0", + "bundled": true, "dev": true, "optional": true, "requires": { - "debug": "^4.1.0", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", - "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", + "version": "0.14.0", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7912,13 +8544,12 @@ "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", - "tar": "^4" + "tar": "^4.4.2" } }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7927,16 +8558,23 @@ } }, "npm-bundled": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", - "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", + "version": "1.4.7", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7946,8 +8584,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7959,22 +8596,19 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "bundled": true, "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "dev": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -7983,22 +8617,19 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "bundled": true, "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "bundled": true, "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -8008,22 +8639,19 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "bundled": true, "dev": true, "optional": true }, "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "version": "2.0.1", + "bundled": true, "dev": true, "optional": true }, "rc": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -8035,8 +8663,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "bundled": true, "dev": true, "optional": true } @@ -8044,8 +8671,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -8059,9 +8685,8 @@ } }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "2.7.1", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -8070,50 +8695,43 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "bundled": true, "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "bundled": true, "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "bundled": true, "dev": true, "optional": true }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "version": "5.7.1", + "bundled": true, "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -8124,8 +8742,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -8134,8 +8751,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -8144,38 +8760,34 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "bundled": true, "dev": true, "optional": true }, "tar": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "version": "4.4.13", + "bundled": true, "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "bundled": true, "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -8184,15 +8796,13 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "bundled": true, "dev": true, "optional": true }, "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "version": "3.1.1", + "bundled": true, "dev": true, "optional": true } @@ -8283,6 +8893,11 @@ "globule": "^1.0.0" } }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==" + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -9391,14 +10006,16 @@ "dev": true }, "husky": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/husky/-/husky-4.0.10.tgz", - "integrity": "sha512-Ptm4k2DqOwxeK/kzu5RaJmNRoGvESrgDXObFcZ8aJZcyXyMBHhM2FqZj6zYKdetadmP3wCwxEHCBuB9xGlRp8A==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.1.tgz", + "integrity": "sha512-Qa0lRreeIf4Tl92sSs42ER6qc3hzoyQPPorzOrFWfPEVbdi6LuvJEqWKPk905fOWIR76iBpp7ECZNIwk+a8xuQ==", "dev": true, "requires": { "chalk": "^3.0.0", "ci-info": "^2.0.0", + "compare-versions": "^3.5.1", "cosmiconfig": "^6.0.0", + "find-versions": "^3.2.0", "opencollective-postinstall": "^2.0.2", "pkg-dir": "^4.2.0", "please-upgrade-node": "^3.2.0", @@ -9736,9 +10353,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", "dev": true }, "is-ci": { @@ -9897,12 +10514,12 @@ "dev": true }, "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", "dev": true, "requires": { - "has": "^1.0.1" + "has": "^1.0.3" } }, "is-regexp": { @@ -12071,12 +12688,6 @@ "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", "dev": true }, - "js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", - "dev": true - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -12268,6 +12879,23 @@ "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", "dev": true }, + "levenary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", + "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "dev": true, + "requires": { + "leven": "^3.1.0" + }, + "dependencies": { + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + } + } + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -12767,14 +13395,6 @@ "requires": { "pify": "^4.0.1", "semver": "^5.6.0" - }, - "dependencies": { - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - } } }, "makeerror": { @@ -13073,9 +13693,9 @@ } }, "mocha": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.0.tgz", - "integrity": "sha512-CirsOPbO3jU86YKjjMzFLcXIb5YiGLUrjrXFHoJ3e2z9vWiaZVCZQ2+gtRGMPWF+nFhN6AWwLM/juzAQ6KRkbA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.1.tgz", + "integrity": "sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -13361,9 +13981,9 @@ } }, "node-releases": { - "version": "1.1.43", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.43.tgz", - "integrity": "sha512-Rmfnj52WNhvr83MvuAWHEqXVoZXCcDQssSOffU4n4XOL9sPrP61mSZ88g25NqmABDvH7PiAlFCzoSCSdzA293w==", + "version": "1.1.47", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.47.tgz", + "integrity": "sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA==", "dev": true, "requires": { "semver": "^6.3.0" @@ -13651,13 +14271,13 @@ } }, "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" } }, "object.pick": { @@ -13939,6 +14559,12 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz", "integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==" }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", @@ -14755,9 +15381,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, "optional": true }, @@ -14897,9 +15523,9 @@ "dev": true }, "regjsparser": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.1.tgz", - "integrity": "sha512-7LutE94sz/NKSYegK+/4E77+8DipxF+Qn2Tmu362AcmsF2NYq/wx3+ObvU90TKEhjf7hQoFXo23ajjrXP7eUgg==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.2.tgz", + "integrity": "sha512-E9ghzUtoLwDekPT0DYCp+c4h+bvuUpe6rRHCTYn6eGoqj1LgKXxT6I0Il4WbjhQkOghzi/V+y03bPKvbllL93Q==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -15657,6 +16283,12 @@ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true }, + "semver-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", + "dev": true + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", diff --git a/package.json b/package.json index b82e8b3e3ca..10999ee293a 100644 --- a/package.json +++ b/package.json @@ -19,19 +19,19 @@ "git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && node ./node_modules/husky/husky.js install" }, "devDependencies": { - "@babel/cli": "7.7.7", - "@babel/core": "7.7.7", - "@babel/polyfill": "7.7.0", - "@babel/preset-env": "7.7.7", - "@babel/register": "7.7.7", - "@wordpress/e2e-test-utils": "4.0.0", - "autoprefixer": "9.7.3", + "@babel/cli": "7.8.4", + "@babel/core": "7.8.4", + "@babel/polyfill": "7.8.3", + "@babel/preset-env": "7.8.4", + "@babel/register": "7.8.3", + "@wordpress/e2e-test-utils": "4.2.0", + "autoprefixer": "9.7.4", "babel-eslint": "10.0.3", "chai": "4.2.0", "chai-as-promised": "7.1.1", "commander": "4.1.0", "eslint-plugin-jest": "23.6.0", - "config": "3.2.4", + "config": "3.2.5", "cross-env": "6.0.3", "eslint": "6.8.0", "eslint-config-wpcalypso": "5.0.0", @@ -53,12 +53,12 @@ "grunt-shell": "3.0.1", "grunt-stylelint": "0.13.0", "grunt-wp-i18n": "1.0.3", - "husky": "4.0.10", + "husky": "4.2.1", "istanbul": "1.0.0-alpha.2", "jest": "25.1.0", "jest-puppeteer": "4.4.0", "lint-staged": "9.5.0", - "mocha": "7.0.0", + "mocha": "7.0.1", "node-sass": "4.13.0", "prettier": "github:automattic/calypso-prettier#c56b4251", "puppeteer": "2.0.0", @@ -71,7 +71,8 @@ }, "husky": { "hooks": { - "pre-commit": "lint-staged" + "pre-commit": "lint-staged", + "post-merge": "./bin/post-merge.sh" } }, "lint-staged": { diff --git a/readme.txt b/readme.txt index 73051b48c86..90ee3fa59a1 100644 --- a/readme.txt +++ b/readme.txt @@ -179,92 +179,7 @@ INTERESTED IN DEVELOPMENT? == Changelog == -= 3.9.0 - 2020-01-21 = - -* Enhancement - Added a "Show" button next to the password field on the login fields. #24915 -* Enhancement - New WooCommerce Onboarding experience (shows to only 10% of new users). #24991 -* Enhancement - Introduced Payment Gateway API to support "pay button". #25000 -* Enhancement - Includes WooCommerce Blocks 2.5.3, introducing an "All Products" block, a new block listing products using client side rendering (requires WordPress 5.3), and more. #25181 -* Tweak - Updated PayPal standard "Thank you" page message to comply with PayPal Guidelines. #24756 -* Tweak - Account for non-EU countries that collect VAT and rename tax to VAT on the frontend. #24999 -* Tweak - Cache checkout fragments and update DOM on change only. #24227 -* Tweak - Eliminate extra update order AJAX request on checkout page load. #24271 -* Tweak - Prevent billing address from being updated on shipping update. #24374 -* Tweak - Added a tooltip in the "Coupon expity date" field. #24749 -* Tweak - Make phone numbers clickable in emails. #24786 -* Tweak - Prevent PHP warnings in tracker if order doesn't have a created date yet. #24846 -* Tweak - Capitalize "T" in "Move to Trash" phrase on order page in wp-admin to be consistent with product and coupon pages. #24867 -* Tweak - Changed `wp_cache` invalidation from using increment to using microtime. #24961 -* Tweak - Made the usage tracking link on the setup wizard more transparent. #25026 -* Tweak - Fixed menu highlight of My Account page when browsing "Add payment method" page. #25041 -* Tweak - Prevent creating products before registering related post types and taxonomies. #25049 -* Tweak - Include processing orders in tracker data when opted in. #25071 -* Tweak - Centralize check for default themes to fix Storefront appearance in the Setup Wizard. #25216 -* Tweak - Adds a WordPress version check before recommending the WooCommerce Admin plugin during setup. #25260 -* Fix - Added license key support recent changes from MaxMind GeoLite2. #25378 -* Fix - Honor tax rounding preference in edit item and refund flows. #24208 -* Fix - Prevent incorrect number of decimal points in prices. #24281 -* Fix - Fixed initial support for Gutenberg's Experimental Legacy Widget block. #24292 -* Fix - Fix overriding of query when using orderby on archives with a static homepage. #24683 -* Fix - Use of `wp_unslash()` function when escaping admin settings values. #24793 -* Fix - Do not set the tracking cookie when doing ajax requests. #24798 -* Fix - Display button to delete images from product galleries in the admin when using a mobile device. #24840 -* Fix - Fixed order note's date format. #24843 -* Fix - Refactored `WC_Order_Factory::get_order()` to remove function deprecated in PHP 7.0. #24852 -* Fix - Fixed product stock status changes on Bulk Edit save when "Enable stock management" is disabled. #24876 -* Fix - Fixed default country code fallback in wc_get_customer_default_location(). #24884 -* Fix - Fixed misleading message for Shipping options in cart. #24914 -* Fix - Customizer not loading when viewing from WordPress.com. #24935 -* Fix - Prevent notice when a variable product has no images. #24986 -* Fix - Adjusted the slug generation for duplicated variable products to prevent performance degradation when using templates. #25064 -* Fix - Added appropriate minification to photoswipe.css. #25074 -* Fix - Corrected the sorting behavior for the "products" shortcode when manually sorting products. #25084 -* Fix - Fixed invalid backlinks for in-app purchases. #25098 -* Fix - Corrected the media element player initialization for product variation descriptions. #25103 -* Fix - Enable WooCommerce.com Site API on installations not using permalink. #25131 -* Fix - WooCommerce.com Site API now returns success if the plugin was previously installed. #25140 -* Fix - WooCommerce.com Site API checks to `move_product` case to make sure result array contains `folder_exists` item and doesn't return a warning. #25160 -* Fix - Ensure that categories containing only private products are selectable in the product exporter. #25132 -* Fix - Prevent variable product parents from being added to orders. #25162 -* Fix - Use sorting settings as a default to product shortcodes. #25180 -* Fix - Applied setup wizard CSS fixes to the respective WP versions. #25197 -* Fix - Fixed "account erasure request" URL in WordPress 5.3. #25208 -* Fix - Ensure all cache get removed on webhook deletion. #25164 -* Fix - Adjusted the checkout email validation regex to be more accurate. #25251 -* Template - Introduced `woocommerce_product_related_products_heading` filter. #25059 -* Template - Introduced `woocommerce_before_lost_password_confirmation_message` and `woocommerce_after_lost_password_confirmation_message` hooks. #25096 -* REST API - Fixed `date_created` and `date_created_gmt` for customers v2. #25181 -* REST API - Fixed Restored "Total post count" section on System Status endpoint v2 and v3. #25181 -* REST API - Filter empty objects from results before loop. #25181 -* Dev - Introduce new PHP 7.0 minimum requirement. -* Dev - Introduce new WordPress 5.0 minimum requirement. -* Dev - Check for max discount to be "-ve" to prevent overwriting refunded fee amount. #24341 -* Dev - Add unload event to the checkout page to prevent reloading during checkout after placing an order. #24609 -* Dev - Only toggle form field description if element exists. #24752 -* Dev - Introduced `woocommerce_{$export_type}_export_delimiter` filter to change separator string while exporting CSV files. #24759 -* Dev - Introduced `woocommerce_after_order_refund_item_name` hook. #24760 -* Dev - Introduced `woocommerce_kses_notice_allowed_tags` filter. #24849 -* Dev - Introduced `woocommerce_shipping_not_enabled_on_cart_html` filter. #24914 -* Dev - Introduced `woocommerce_show_invalid_variations_notice` filter. #24934 -* Dev - Introduced `woocommerce_upsells_order` filter. #25017 -* Dev - Introduced `woocommerce_before_settings_{current_tab}` and `woocommerce_after_settings_{current_tab}` hooks. #25028 -* Dev - Included third parameter `$order` to `woocommerce_order_get_formatted_billing_address` and `woocommerce_order_get_formatted_shipping_address` filters. #24870 -* Dev - Pass the `$clear_persistent_cart` variable to the `woocommerce_before_cart_emptied` and `woocommerce_cart_emptied actions`. #24930 -* Dev - Made variables in `assets/css/_variables.scss` default. #24822 -* Dev - Refactor to use the same rounding logic in orders and cart. #24828 -* Dev - Add order note immediately after status change before the `woocommerce_order_status_changed action. #24879 -* Dev - Added support for custom attributes in `wc_placeholder_img()`. #24937 -* Dev - Added initial support for inline notices on checkout. #25001 -* Dev - Introduced wc_get_product_object() helper. #25031 -* Dev - Pass the correct `$this->updated_props` variable to the `woocommerce_coupon_object_updated_props` action's second paramater. #25077 -* Dev - Remove a few calls to `func_get_args()` and `call_user_func_array()` with the spread operator for better code legibility and performance gains. #25101 -- Dev - New `woocommerce_valid_order_statuses_for_payment` hook that triggers when an order is paid. Use this new hook instead of `woocommerce_order_status_changed` or *woocommerce_order_status_{old_status}}_to_{new_status}` to trigger code for payment completion. #25158 -* Dev - Ability to exclude certain product types from product search calls. #25162 -* Dev - Raise exception when `WC_Product_Variation` is instantiated with an ID that belongs to an object that is not a variation. #25178 -* Localization - Add subdivisions of Laos. #24765 -* Localization - Fixed translatable string in WooCommerce's libraries. #24892 #24894 -* Localization - Fixed translatable string comments for translators. #24928 -* Localization - Add postcode validation for Slovenia. #25174 += 4.0.0 - 2020-03-03 = [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce/master/CHANGELOG.txt). diff --git a/templates/cart/shipping-calculator.php b/templates/cart/shipping-calculator.php index f4b0665542a..ab3980496b6 100644 --- a/templates/cart/shipping-calculator.php +++ b/templates/cart/shipping-calculator.php @@ -28,7 +28,7 @@ do_action( 'woocommerce_before_shipping_calculator' ); ?>